문제

I am compiling a latex file on a server and download from there the generated dvi, ps and pdf files to view them.

The latex file by \includegraphics includes some figure files which are not on my local machine. I found that dvi file generated by latex command does not show the figures after dowloaded to my local, but ps file generated by dvips -Ppdf have the figures, and pdf file generated by either ps2pdf or pdflatex seem not have the figures again. Is it because the figures are not actually embeded as part of the dvi and pdf files by those compilation commands? How to actually embed figures so we can only export the document files to other machines?

Are the case for tables in separated tex files included into main tex file by /input and the case for style files included by \usepackage similar to the above case for figure files included by \includegraphics ?

도움이 되었습니까?

해결책

Background

Embedded images, like eps files, are not supported in Knuth's original dvi specification — not surprising since dvi is an older format than Postscript; instead, they are encoded using an extension capability that is accessed in Tex through the \special command and in dvi by some reserved codes.

dvips set a standard for how to use specials, which gave a very flexible means for including Postscript facilties in Tex, but not all dvi utilities fully support these.

Answer, part one: where are the figures?

All figures imported using \includegraphics are encoded in the dvi as Postscript using the \special code, so to the first part of your questions - yes, the image content is all in the dvi file. So you don't need to worry about where the files are that were used to generate the dvi.

However, different programs that process the dvi can do flaky things. dvips is the standard, and it's based on ghostscript, which has seen various kinds of flakiness over the years. Other dvi software has simply not supported specials, or supported them oddly.

Answer, part two: fixing things

Why do you think the figures are missing? Have you looked at the files in an on-screen viewer, or have you printed them out? It can often be that an on-screen viewer is flaky; that is rarely the case with the print-out.

Otherwise, look at the bug tracking systems for the various bits of software you are using. I've found pdftex insulates me from a lot of these issues; I've found ghostscript bugs to be particularly annoying to deal with over the years. Adobe Acrobat is clunky, but it is the standard and it's good for troubleshooting ps/pdf issues. Try other software.

다른 팁

you should look at the warnings. i am sure there some, because for ps you will need eps pictures and for pdflatex you'll need png or jpeg (try compiling at your local machine first, e.g. with kile or the gedit plugin)

I am using kile's compile commands for pdf generation which works always fine (pics incl.). they use pdflatex for that.

it depends a lot on the format of your picture files, and how those formats are handled by the various tools you use to convert dvi -> ps -> pdf

If you product ps, the best is to provide your figures in eps (encapsulated postscript) format, compile with latex and use dvips.

If you want to generate pdf, then provide your fgure in pdf or png format, and use pdflatex.

See http://en.wikibooks.org/wiki/LaTeX/Importing_Graphics and http://amath.colorado.edu/documentation/LaTeX/reference/figures.html for good explanations of what happens.

The output of the latex command can be very informative about whant happens with your figures too.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top