Re: (how) can I use \cite and \ref commands in IPE for embedding in a large document?

T T <t34www-gM/[email protected]>
Newsgroups gmane.comp.graphics.ipe.general
Message-ID <[email protected]>
On 14 March 2011 11:48, elwood151 <elwood151-S0/[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.