Optimizing vector graphics for Latex a.
Why do we need optimization: eps and pdf vector files saved by the editor are not always fully compatible with Latex ohms. In addition, the reduction of their size positively affects the size of the document and the speed of operation of dvi viewer.
Besides the vector editor, we need eps2eps and epstopdf. These two utilities exist in Windows, Linux and Mac OS. In Windows they are part of MiKTeX. On Linux and Mac OS, as far as I know, they also come with Tex ohms.
The whole process looks the following way. Create an image in the editor and saved to eps. Running it through eps2eps and this optimized file through epstopdf. Optimized eps and pdf are served from Latex (actually pdfTeX'). Let me remind you that if you compile
Format eps2eps:
Option

annotations: the output file Name must differ from input, otherwise you'll get an empty eps file. To check the result, especially the quality of the fonts, it never hurts. It is useful to keep the original eps, the text after the edit processing does not happen.
Format epstopdf:
Not to do each time all manually, I wrote a small script under Windows:
All eps files in the current directory are processed eps2eps, and create them in pdf version. Carefully, the original eps is overwritten! Make backups!
Article based on information from habrahabr.ru
Besides the vector editor, we need eps2eps and epstopdf. These two utilities exist in Windows, Linux and Mac OS. In Windows they are part of MiKTeX. On Linux and Mac OS, as far as I know, they also come with Tex ohms.
The whole process looks the following way. Create an image in the editor and saved to eps. Running it through eps2eps and this optimized file through epstopdf. Optimized eps and pdf are served from Latex (actually pdfTeX'). Let me remind you that if you compile
\includegraphics{your_image}
in dvi — automatically using your_image.eps
to a pdf file — your_image.pdf
. Format eps2eps:
eps2eps -dNOCACHE input.eps output.eps
Option
-dNOCACHE
translates fonts into curves. Without it, the fonts are bitmaps.
annotations: the output file Name must differ from input, otherwise you'll get an empty eps file. To check the result, especially the quality of the fonts, it never hurts. It is useful to keep the original eps, the text after the edit processing does not happen.
Format epstopdf:
Get the input.pdf.epstopdf input.eps
Not to do each time all manually, I wrote a small script under Windows:
@echo off
for /f "delims=." %%a in ('dir /b *.eps') do eps2eps -dNOCACHE %%a.eps %%a.prep_tmp
del /Q *.eps
ren *.prep_tmp *.eps
for %%a in (*.eps) do epstopdf %%a
All eps files in the current directory are processed eps2eps, and create them in pdf version. Carefully, the original eps is overwritten! Make backups!
Комментарии
Отправить комментарий