[Ipe-discuss] (how) can I use \cite and \ref commands in IPE for embedding in a large document?

T T t34www at googlemail.com
Mon Mar 14 16:26:00 CET 2011


On 14 March 2011 11:48, elwood151 <elwood151 at web.de> wrote:
>
> I want to create graphics with IPE for my phd thesis (pdflatex on MacOS
> 10.6).
>
> I wonder if there is a way to use commands like \cite{} or \ref{} /
> \pageref{} in pdf documents created with IPE which I want to include in the
> pdfLaTeX file of my dissertation as images / tables.
>
> The problem is obvious: the number of a citation or a reference to a chapter
> or page number can only be created when compiling the LaTeX document, so it
> would not be possible to just "paste" the finished pdf in the latex
> document.
>
> Is there a trick to make that work?

There is a trick for everything :)  For \ref{} / \pageref{} there's xr
package, but doesn't work for \cite{}.  The trick is to grep the
\newlabel / \bibcite stuff from your main document aux file(s) and
input that in your IPE graphic, e.g., put in the graphic preamble
(requires -shell-escape option):

\immediate\write18{grep -E 'newlabel|bibcite' mainfile.aux >> \jobname.aux}

Cheers,

Tomek



More information about the Ipe-discuss mailing list