From b9e50bd451cfd6a7b5aa9b3cfb5d42eea7312979 Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Thu, 1 Jul 2021 17:19:53 -0400 Subject: [PATCH] automated update from build.py --- blog/20070522-latex-tips.html | 63 +++++++++++++++++++++++++++++++++++ sitemap.txt | 1 + 2 files changed, 64 insertions(+) create mode 100644 blog/20070522-latex-tips.html diff --git a/blog/20070522-latex-tips.html b/blog/20070522-latex-tips.html new file mode 100644 index 0000000..2462bf7 --- /dev/null +++ b/blog/20070522-latex-tips.html @@ -0,0 +1,63 @@ + + + + + + + + + + +LaTeX Tips | Colin McMillen + + + + + + + + + + +
+
+ + +
+

LaTeX Tips

+

Posted: 2007-05-22

+

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
+------------------------------------ ------------ --- --- --- ---------
+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

+

This creates a file figures/Mprime-new.pdf that is hopefully identical to the input file figures/Mprime.pdf, except that the fonts are embedded. Run pdffonts on it to check.

+

Once all your figures are in PDF format, remake the paper again. Hopefully, all your fonts are now embedded — check again with pdffonts.

+
+
+ + +
+ + + diff --git a/sitemap.txt b/sitemap.txt index df4552e..924986e 100644 --- a/sitemap.txt +++ b/sitemap.txt @@ -1,3 +1,4 @@ +https://www.mcmillen.dev/blog/20070522-latex-tips.html https://www.mcmillen.dev/blog/20190403-update.html https://www.mcmillen.dev/blog/20200209-sneak.html https://www.mcmillen.dev/index.html