[XeTeX] Generating cropped PDF graphics file

Mojca Miklavec mojca.miklavec.lists at gmail.com
Tue Apr 15 09:09:50 CEST 2008


On Tue, Apr 15, 2008 at 8:27 AM, R (Chandra) Chandrasekhar wrote:
> Dear Folks,
>
>  I used to generate an EPS graphics file for a logo by typesetting the text and
>  lines in LaTeX as foo.tex and compiling so
>
>  latex foo
>  dvips -E -ofoo.eps foo.dvi
>  epstopdf foo.eps
>
>  to get foo.pdf.
>
>  I am now using TTF/OTF fonts in the logo and am using xelatex instead, along
>  with xcolor. I have two questions:
>
>  1. Does xdvipdfmx support colours defined in xcolor using
>  \definecolor[named]{mycolor}{cmyk}{c, m, y, k} where c, m, y, k are in [0, 1]?
>
>  2. To crop the generated PDF file to contain only the graphic, I am compiling
>  foo.tex so:
>
>  xelatex foo
>  pdfcrop foo
>
>  to get the output foo-crop.pdf.
>
>  Is this the preferred way to go about it, or is there another?
>
>  Many thanks.

Hello,

I don't know about XeLaTeX, but in ConTeXt you could use

% engine=xetex
\setupcolors[state=start]
\definecolor[mycolor][c=1,m=.5,y=0,k=0]
\starttext
% this will adapt the page size automatically
\startTEXpage
\color[mycolor]{any text}
\stopTEXpage
\stoptext

and then compile it with "texexec [--xtx] filename".

Mojca


More information about the XeTeX mailing list