Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Failed to insert eps file into xelatex
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
hgecol
n00b
n00b


Joined: 31 Jul 2011
Posts: 16

PostPosted: Tue Aug 30, 2011 2:59 pm    Post subject: Failed to insert eps file into xelatex Reply with quote

Texlive has been updated sometime ago.
I tried to recompile a old file again today, but found that failed to insert eps file.


In my TEX file:
Code:
....
\includegraphics[width=10cm]{method}
....
[/code]

'WARNING' messages:
Code:
** WARNING ** No image converter available for converting file "./method.eps" to PDF format.
** WARNING ** >> Please check if you have 'D' option in config file.
** WARNING ** pdf: image inclusion failed for "method.eps".
** WARNING ** Failed to read image file: method.eps
** WARNING ** Interpreting special command PSfile (ps:) failed.
** WARNING ** >> at page="8" position="(39.6851, 31.3265)" (in PDF)
** WARNING ** >> xxx "PSfile="method.eps" llx=-1 lly=0 urx=702 ury=498 rwi=2834 "


Code:
[ebuild   R    ] dev-texlive/texlive-xetex-2010-r1  USE="X -doc -source" 0 kB
[ebuild   R    ] dev-tex/xcolor-2.11  0 kB
[ebuild   R    ] dev-tex/pgf-2.10  USE="-doc -source" 0 kB
[ebuild   R    ] dev-tex/latex-beamer-3.10-r1  USE="-doc -examples -lyx" 0 kB
[ebuild   R    ] app-text/texlive-2010-r2  USE="X png truetype -cjk -context -detex -doc -dvi2tty -dvipdfm -extra -games -graphics -humanities -jadetex -latex3 -luatex -music -omega -pdfannotextractor -pstricks -publishers -science -tex4ht -xetex -xindy -xml" LINGUAS="-af -ar -as -bg -bn -bo -ca -cs -cy -da -de -el -en -en_GB -eo -es -et -eu -fa -fi -fr -ga -gl -gu -he -hi -hr -hsb -hu -hy -ia -id -is -it -ja -kn -ko -la -lo -lt -lv -ml -mn -mr -nb -nl -nn -no -or -pa -pl -pt -ro -ru -sa_IN -sk -sl -sr -sv -ta -te -th -tk -tr -uk -vi -zh" 0 kB
Back to top
View user's profile Send private message
erikm
l33t
l33t


Joined: 08 Feb 2005
Posts: 634

PostPosted: Wed Aug 31, 2011 5:57 am    Post subject: Reply with quote

You're in luck; converting EPS to PDF is easy using the 'epstopdf' script, which is part of dev-texlive/texlive-fontutils. Just make sure that is emerged, do
Code:
~ $ epstopdf <EPS file>

for all your EPS files, and then leave the \includegraphics specifications as they are, making sure that the file names are given without extensions. Then latex, and voila.
Back to top
View user's profile Send private message
hgecol
n00b
n00b


Joined: 31 Jul 2011
Posts: 16

PostPosted: Thu Sep 15, 2011 11:18 am    Post subject: Reply with quote

"dev-texlive/texlive-fontutils" has been emerged, and "epstopdf" also works well.
But it still can not inculde "eps" file directly when using 'xelatex'.

Before updated, "eps" file could be include directly, but also xelatex the old tex files, "warning" information always show when meet eps

Code:

** WARNING ** Could not open config file "dvipdfmx.cfg".
** WARNING ** Unknown token "SDict"
** WARNING ** Interpreting PS code failed!!! Output might be broken!!!
** WARNING ** Interpreting special command ps: (ps:) failed.
** WARNING ** >> at page="1" position="(362.835, -1.2643e-05)" (in PDF)
** WARNING ** >> xxx "ps::SDict begin /_KUbgcolor [currentrgbcolor] bind def"
** WARNING ** >> Reading special command stopped around >>begin /_KUbgcolor [currentrgbcolor] bind def<<
** WARNING ** No image converter available for converting file "./BPH.eps" to PDF format.
** WARNING ** >> Please check if you have 'D' option in config file.
** WARNING ** pdf: image inclusion failed for "BPH.eps".
** WARNING ** Failed to read image file: BPH.eps
** WARNING ** Interpreting special command PSfile (ps:) failed.
** WARNING ** >> at page="4" position="(39.6851, 120.675)" (in PDF)
** WARNING ** >> xxx "PSfile="BPH.eps" llx=0 lly=0 urx=582 ury=249 rwi=2834 "
** WARNING ** No image converter available for converting file "./method.eps" to PDF format.
** WARNING ** >> Please check if you have 'D' option in config file.
** WARNING ** pdf: image inclusion failed for "method.eps".
** WARNING ** Failed to read image file: method.eps
** WARNING ** Interpreting special command PSfile (ps:) failed.
** WARNING ** >> at page="8" position="(39.6851, 31.3281)" (in PDF)
** WARNING ** >> xxx "PSfile="method.eps" llx=-1 lly=0 urx=702 ury=498 rwi=2834 "
Back to top
View user's profile Send private message
hgecol
n00b
n00b


Joined: 31 Jul 2011
Posts: 16

PostPosted: Fri Sep 16, 2011 12:40 am    Post subject: Reply with quote

The problem has solved.

Code:

#emerge -av dvipdfmx
#cd /usr/share/texmf-dist/
#mkdir -p dvipdfmx && cd dvipdfmx
#ln -s /etc/texmf/dvipdfm/dvipdfmx.cfg
#texhash


If I copy "/etc/texmf/dvipdfm/dvipdfmx.cfg" to "/usr/shaded/texmf-dist/dvipdfmx/", and unmerge "dvipdfmx", it also works well.
Back to top
View user's profile Send private message
erikm
l33t
l33t


Joined: 08 Feb 2005
Posts: 634

PostPosted: Fri Sep 23, 2011 1:31 pm    Post subject: Reply with quote

Congratulations on solving the problem.

For similar snags in the future, though, let me restate my suggestion, which you appear not to have understood correctly:

LaTex works well with PDF, and less well with (Enhanced-) PostScript graphics. The epstopdf script lets you convert EPS graphics to PDF, which you can then use in your LaTex document with generally very good results. This is what I recommended.
Back to top
View user's profile Send private message
njsg
Tux's lil' helper
Tux's lil' helper


Joined: 17 Dec 2005
Posts: 88

PostPosted: Sat Feb 11, 2012 8:12 am    Post subject: Reply with quote

Just to clarify: Actually, LaTeX is unable to deal with PDF. As far as good ol' LaTeX is concerned, the way to include external images is to use Encapsulated PostScript, which gets included in the document when converting the DVI output to PostScript. So LaTeX actually works well with EPS, and does not work with PDF.

pdfLaTeX uses a different driver so that it is able to include PDF, but it is unable to include EPS.

Now, this is XeTeX, which, I am told, breaks this old barrier, making it possible to include both EPS and PDF in the document. I guess it does, as far as that package is installed.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum