1

Is there any existing way to include references to page numbers in the supporting material in a beamer presentation?

Assume that I have two files, one for generating the handout in article class, and one for the presentation which use a shared input file (along the lines suggested on page 206 of the beamer documentation). Assume further that the handout includes extensive source code/a complete derivation of a proof/a complete list of example sentences/a long table or similar in the handout which the audience will have in front of them. My idea would be to define a command \hopageref{label} that digs for the page number of label in the corresponding handout (i.e. article) file's .aux file, which would be used something like this:

\mode<article>{\label{longtable}
    % include long table here
    }
\mode<presentation>{(Details on page \hopageref{longtable})}

(this workflow would require to compile the handout before the presentation to assure correct page numbers, but that seems like an acceptable limitation.)

Unfortunately, defining such a command exceeds my coding skills, but maybe something similar already exists?

  • 1
    The package xr allows this, but obviously you have to use a different filename for the article and the presentation, or the .aux file would be overwritten. At least you have to rename the .aux file you get after the final typesetting in article mode. – egreg May 19 '13 at 19:19
  • I'm aware that I'll need two aux files. I'm thinking about having a shared content file and two master files which refer to it as input. So the xr package seems like a perfect solution. Feel free to make this an answer. – JakobMST May 20 '13 at 20:01
2

The xr package, or maybe zref-xr for more powerful features, is the tool you're looking for.

However, you have to use different names for your files, say

jakob-art.tex

and

jakob-pres.tex

for the article mode and presentation mode versions respectively. Both can input a common file jakob.tex, of course. In the presentation version you'll add

\input{xr}
\externaldocument{jakob-art}

The labels should only appear in the article mode, of course.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.