From 9b2ade160c18d1825c3438d7837a05b55b741a8c Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Thu, 1 Jul 2021 17:34:34 -0400 Subject: [PATCH] automated update from build.py --- blog/20070522-latex-tips.html | 18 +++++++++++------- feed.atom | 18 +++++++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/blog/20070522-latex-tips.html b/blog/20070522-latex-tips.html index 4b1fcb9..b8489c8 100644 --- a/blog/20070522-latex-tips.html +++ b/blog/20070522-latex-tips.html @@ -31,22 +31,26 @@

LaTeX Tips

-

Posted 2007-05-22.

+

Posted 2007-05-22; updated 2021-07-01.

+

Note that these instructions are over a decade old. Some things may have changed since then. :)

Embedding fonts in PDFs

To check whether fonts are embedded, use pdffonts, which is included with xpdf. pdffonts gives output that looks like this:

$ pdffonts paper.pdf
-name                                 type         emb sub uni object ID
+name                                 type         emb sub uni object ID
 ------------------------------------ ------------ --- --- --- ---------
-FHQIOS+NimbusRomNo9L-Medi            Type 1       yes yes no       6  0
-NEESMN+NimbusRomNo9L-Regu            Type 1       yes yes no       9  0
-PJQNOS+CMSY10                        Type 1       yes yes no      12  0
+FHQIOS+NimbusRomNo9L-Medi            Type 1       yes yes no       6  0
+NEESMN+NimbusRomNo9L-Regu            Type 1       yes yes no       9  0
+PJQNOS+CMSY10                        Type 1       yes yes no      12  0
 

You want emb to be yes for all fonts (and possibly sub as well; also, all fonts should be Type 1, not Type 3). By default in Ubuntu, pdflatex should embed all fonts. Just in case, you can check /etc/texmf/updmap.d/00updmap.cfg, which should have a line like this:

pdftexDownloadBase14 true

-

If it’s set to false, change it to true, then run update-updmap as root. Remake the PDF; if it still has non-embedded fonts, your figures are probably to blame. Check your PDF figures and make sure their fonts are embedded (using the pdffonts command). For anything that doesn’t have embedded fonts, you can try the following magical invocation (all on one line):

-
gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=figures/Mprime-new.pdf -f figures/Mprime.pdf
+

If it’s set to false, change it to true, then run update-updmap as root. Remake the PDF; if it still has non-embedded fonts, your figures are probably to blame. Check your PDF figures and make sure their fonts are embedded (using the pdffonts command). For anything that doesn’t have embedded fonts, you can try the following magical invocation:

+
gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
+-sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer \
+-dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true \
+-dEmbedAllFonts=true -sOutputFile=figures/Mprime-new.pdf -f figures/Mprime.pdf
 
diff --git a/feed.atom b/feed.atom index fb33e24..00a416e 100644 --- a/feed.atom +++ b/feed.atom @@ -18,22 +18,26 @@ LaTeX Tips -

Posted 2007-05-22.

+

Posted 2007-05-22; updated 2021-07-01.

+

Note that these instructions are over a decade old. Some things may have changed since then. :)

Embedding fonts in PDFs

To check whether fonts are embedded, use pdffonts, which is included with xpdf. pdffonts gives output that looks like this:

$ pdffonts paper.pdf
-name                                 type         emb sub uni object ID
+name                                 type         emb sub uni object ID
 ------------------------------------ ------------ --- --- --- ---------
-FHQIOS+NimbusRomNo9L-Medi            Type 1       yes yes no       6  0
-NEESMN+NimbusRomNo9L-Regu            Type 1       yes yes no       9  0
-PJQNOS+CMSY10                        Type 1       yes yes no      12  0
+FHQIOS+NimbusRomNo9L-Medi            Type 1       yes yes no       6  0
+NEESMN+NimbusRomNo9L-Regu            Type 1       yes yes no       9  0
+PJQNOS+CMSY10                        Type 1       yes yes no      12  0
 

You want emb to be yes for all fonts (and possibly sub as well; also, all fonts should be Type 1, not Type 3). By default in Ubuntu, pdflatex should embed all fonts. Just in case, you can check /etc/texmf/updmap.d/00updmap.cfg, which should have a line like this:

pdftexDownloadBase14 true

-

If it’s set to false, change it to true, then run update-updmap as root. Remake the PDF; if it still has non-embedded fonts, your figures are probably to blame. Check your PDF figures and make sure their fonts are embedded (using the pdffonts command). For anything that doesn’t have embedded fonts, you can try the following magical invocation (all on one line):

-
gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=figures/Mprime-new.pdf -f figures/Mprime.pdf
+

If it’s set to false, change it to true, then run update-updmap as root. Remake the PDF; if it still has non-embedded fonts, your figures are probably to blame. Check your PDF figures and make sure their fonts are embedded (using the pdffonts command). For anything that doesn’t have embedded fonts, you can try the following magical invocation:

+
gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
+-sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer \
+-dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true \
+-dEmbedAllFonts=true -sOutputFile=figures/Mprime-new.pdf -f figures/Mprime.pdf