Thursday, September 11, 2014

Embedding BASE-14 Fonts in PDF from Latex output

By looking into the fonts pane of the  properties of a PDF File with Adobe Acrobat Reader you see, whether all fonts are embedded or not.

Initially I followed this little Tutorial to set the options right:

However, one configuration entry was still missing to get everything embedded in a Miktex Windows environment:

Finally, I print to pdf with the following flags using GPL Ghostscript 9.14:

-dPDFSETTINGS=/prepress  -dCompatibilityLevel=1.3 -dHaveTrueTypes=true -dEmbedAllFonts=true -sPAPERSIZE=a4 -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile="%bm.pdf" -c save pop -f ""

(%bm.pdf are just wildards for document names of texnic center)

Thanks to Georg for sending me his options and giving me the important hint!

Wednesday, September 10, 2014

Myth about [T1]{fontenc}

! LaTeX Error: Command \iint already defined. Problem between pxfonts and other package e.g. amsmath

Problem cause:
The included packages have the same commands defined instead of redefined.
The solution here was simply to load amsmath first and afterwards pxfonts:


However, this might generate the problem, that your entire document text changes.
In my case I just wanted to have fixed/monofont inside the lstlistings.
For that I got rid of the general usepackage and did the following in my lstlisting setup:


Monday, September 1, 2014

Cannot run batch file with double click (Windows 8) (*.bat)

All you have to do is open the registry and delete this key:



Taken from here