[powerdot] Re: keyjnote/accentuate

  • From: Virgil Stokes <vs@xxxxxxxx>
  • To: powerdot@xxxxxxxxxxxxx
  • Date: Sat, 11 Oct 2008 10:32:03 +0200

Chris Ellison wrote:
On Tue, Oct 7, 2008 at 6:11 AM, Tom Schneider <toms@xxxxxxxxxxx> wrote:
Martin:
> Hyperlinks are a rectangle that can "pivot" so that they will maintain
> a different orientation than the page.
> If the hyperlink were a square, this wouldn't matter, but since it is
> not in some cases, the coordinates are
> transposed relative to the orientation of the page. Beamer was the
> primary target of KeyJnote, so it was only
> concerned with pages made without rotation. But since powerdot creates
> the page and rotates it 90 degrees
> (apparently) we have a problem. I'm looking into parsing out the
> /Rotate command and then applying the fix
> instead of making it an option.
>
> I'll keep you posted.

Thanks for taking the time to explain, interesting connection!

With respect to the question of why ps2pdf inserts "/Rotate 90" commands in the pdf, this is because powerdot works with landscape orientation, if requested. This means that powerdot inserts commands that tell the dvi viewer and dvips that the paper should be  rotated. This is done to ensure that the dvi and ps are properly formatted and useable. ps2pdf uses autorotation (by reading text etc on the page) to determine the orientation and does not use the ps commands. If it needs to rotate stuff, it inserts "/Rotate 90" commands.

So why doesn't this happen with beamer? That's very simple. beamer doesn't make an attempt to process things into the dvi or ps correctly. It puts tiny slides somewhere on portrait (!) paper, and the resulting dvi and ps are not useful. The fact that the pdf is proper is due to the fact that beamer uses a cropbox to tell ps2pdf to cut out a landscape looking piece from the portrait paper. So no rotations were necessary, and ps2pdf doesn't insert "/Rotate 90" commands.

That said, the pdf generated by ps2pdf is of course a valid and proper pdf, and standard viewers do not have trouble reading and following the hyperlinks.  In other words, they are able to handle "/Rotate 90" commands without problems and without any custom hacks that search for information within the pdf stating that the original source was a powerdot latex document  (note that this information does exist in the pdf, but it should *not* be used).  Thus, there exists a general solution within accentuate (or pdftk) that will render powerdot pdfs properly.

To really drive this home, note that accentuate has problems reading hyperlinks in *any* landscape document. Consider:

\documentclass[landscape]{
article}
\usepackage[dvips]{hyperref}
\begin{document}
\hypertarget{mytarget}{page 1}
\newpage
test
\newpage
\hyperlink{mytarget}{jump to page 1}
\end{document}

The latex/dvips/ps2pdf pdf is attached.  Probably, if accentuate can handle hyperlinks in the attached document, it will work without issue in powerdot documents as well.  Note, "/Rotate 270" appears in this pdf, highlighting the need for a general solution. 

Hopefully, this can be worked out, as I suspect there are many who would like to use accentuate while giving presentations.  Please be sure to report anyprogress!
Thanks Chris for a very detailed and informative reply to Tom's email. This helps me to better understand Powerdot.

--V. Stokes

Other related posts: