[texhax] Using *.eps files with Latex
Martin Heller
mr_heller at yahoo.dk
Sun Sep 13 13:23:27 CEST 2009
bill lam wrote:
> On Sun, 13 Sep 2009, Martin Heller wrote:
>> will let you include eps, jpg, png and pdf in the same document if
>> you load the graphicx package with the dvipdfmx driver.
>>
>> \usepackage[dvipdfmx]{graphicx}
>
> I tried with it to use eps for pdf output. It didn't complain but the
> eps was invisble/not shown.
>
It works on my system and it should work on yours as well.
Here is a test document:
\documentclass{article}
\usepackage[dvipdfmx]{graphicx}
\begin{document}
\begin{tabular}{cc}
\includegraphics[width=2cm]{rose.eps}&
\includegraphics[width=2cm]{rose.png}\\
\includegraphics[width=2cm]{rose.jpg}&
\includegraphics[width=2cm]{rose.pdf}
\end{tabular}
\end{document}
I used rose.eps shipping with Ghostscript to test and converted it to
png, jpg and pdf:
martin at nox:~/tmp/test$ epstopdf rose.eps
martin at nox:~/tmp/test$ sam2p rose.eps rose.png
martin at nox:~/tmp/test$ sam2p rose.eps rose.jpg
martin at nox:~/tmp/test$ latex --shell-escape test.tex
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
\write18 enabled.
%&-line parsing enabled.
entering extended mode
(./test.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax,
dumylang, noh
yphenation, arabic, farsi, croatian, ukrainian, russian, bulgarian,
czech, slov
ak, danish, dutch, finnish, basque, french, german, ngerman, ibycus,
greek, mon
ogreek, ancientgreek, hungarian, italian, latin, mongolian, norsk,
icelandic, i
nterlingua, turkish, coptic, romanian, welsh, serbian, slovenian,
estonian, esp
eranto, uppersorbian, indonesian, polish, portuguese, spanish, catalan,
galicia
n, swedish, ukenglish, pinyin, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo))
(/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty
(/usr/share/texmf-texlive/tex/latex/graphics/trig.sty)
(/etc/texmf/tex/latex/config/graphics.cfg) (./dvipdfmx.def))) (./test.aux)
<rose.eps> <rose.png> <rose.jpg> <rose.pdf> [1] (./test.aux) )
Output written on test.dvi (1 page, 456 bytes).
Transcript written on test.log.
and then
martin at nox:~/tmp/test$ dvipdfmx test.dvi
generates a pdf-file where all four images are visible.
More information about the texhax
mailing list