[XeTeX] Trimming an included pdf file

Mojca Miklavec mojca.miklavec.lists at gmail.com
Sat Jan 27 16:29:58 CET 2007


On 1/27/07, Malcolm Ross wrote:
> I am including pdf files containing graphics produced with pgf in a
> xelatex document, and find that they sit too far to the right on the
> page in the final document.

One question: if you're using pgf graphics - why don't you include
them literally (with sources) in the document instead of compiling PDF
first and then include them as pictures?

Also note that a few days ago the following line was included into tikz source:
    \ifx\XeTeXversion\undefined\else\def\pgfsysdriver{pgfsys-dvipdfm.def}\fi
You probably need that line as well if you want your graphic to work
with XeTeX (unless you have the latest cvs distribution).

> I assume the problem is that the left
> margin of the graphic file is being included in the final file,
> giving a double margin. Once upon a time, when xelatex used the
> \includegraphic command, there was a trim option which be could used
> to deal with this problem. But now with \XeTeXpdffile there is
> apparently no such option. Or am I missing something?
>
> Is there a simpler way to deal with this than cropping the graphics
> manually in a graphics application like GraphicConverter? (I'm
> working on a Mac).

Others should tell you about trimming options in graphic inclusions,
but alternatives to crop pdf itself:
- there is "pdfcrop" in some TeX distributions
- you can adjust page margins in TeX itself when you create the
graphics (if you would like to go that way, feel free ask again, but I
guess that placing pgf source directly in the document should be the
easiest way)

Mojca


More information about the XeTeX mailing list