[OS X TeX] Mac OS X Question

Bruno Voisin bvoisin at mac.com
Thu Nov 9 14:06:48 CET 2006


Le 7 nov. 06 à 15:58, Louis S VanSlyck a écrit :

> When typesetting in XeTeX, using TeXshop on a Mac G4, running OS X  
> 10.3.9,
> the following command will paste a pdf graphic:
>
> \XeTeXpicfile "Logo.PDF"  scaled 150
>
> Is there a neat way to do this using plainTeX?

Le 7 nov. 06 à 23:45, Louis S VanSlyck a écrit :

> I googled  "graphics plain tex", but the explanation is too anemic  
> for me. I thought the syntax would be like:
>
> \input color
>
> {\color{red} This prints red.}    % This works fine.
>
> which suggests (to me) that one should write:
>
> \input picture
>
> {\picture{Logo.pdf}}
>
> to place the graphic named "Logo.pdf".    % But that fails.

Coming late in the game (I was away):

First, in order to be able to include PDF graphics, you need to use  
the pdfTeX mode of TeXShop, as opposed to "TeX and Ghostscript".

Then, with pdfTeX you have two ways to include the graphics:

- Use, as others have already mentioned, the plain TeX wrapper  
graphicx.tex for the LaTeX graphics package. This wrapper is located  
in teTeX at:

/usr/local/teTeX/share/texmf.tetex/tex/plain/graphics/

and in TeXLive at:

/usr/local/TeXLive/texmf.texlive/doc/plain/plgraph/
/usr/local/TeXLive/texmf.texlive/tex/plain/plgraph/

The syntax of the LaTeX graphics package is described for teTeX in:

/usr/local/teTeX/share/texmf.tetex/doc/latex/graphics/grfguide.ps

For TeXLive the same doc must be somewhere, but I can't find it right  
now.

For your specific need, you could try:

\input graphicx
\includegraphics[scale=0.15]{Logo}

- Second solution is to use directly the pdfTeX graphics inclusion  
primitives, as described in the pdfTeX doc, for teTeX in section 7.6 of:

/usr/local/teTeX/share/texmf.tetex/doc/pdftex/manual/pdftex-a.pdf

and for TeXLive in section 7.7 of:

/usr/local/TeXLive/texmf.texlive/doc/pdftex/manual/pdftex-a.pdf

Beware: that's not for the faint of heart! In your case, it should be  
something like:

\newbox\logobox
\newdimen\logoheight
\setbox\logobox=\hbox{\pdfximage{Logo.pdf}\pdfrefximage\pdflastximage}
\logoheight=\ht\logobox
%\divide\logoheight by\mag % depending on your needs
\multiply\logoheight by150
\setbox\logobox=\hbox{\pdfximage height\logoheight{LogoLegiPantone.pdf}%
   \pdfrefximage\pdflastximage}
\copy\logobox

Hope this helps,

Bruno Voisin------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list