2

I know I am sounding crazy, but this looks like a veritable pdflatex bug to me. even small innocent changes to the file make it go away.

\documentclass[12pt]{article}

\usepackage[english]{babel}  %% hyphenation and other small changes
\RequirePackage[T1]{fontenc} %% hyphenation of accented words, copy-paste pdf output, pipe sign, less than ,etc.
\RequirePackage{charter} %% the main font, scaleable
\usepackage{microtype}  %% should always be the default

\newcommand{\textxsmally}[1]{#1}
\newcommand{\lmc}[1]{$\backslash$#1}

\begin{document}

\lmc{textbf} (\textbf{bold}) an \lmc{textsf} (\textsf{sans-serif}), and define \lmc{textxsmall} (\textxsmally{anything}).

\end{document}

just removing even some obviously innocent characters in the text, and, poof, it is gone.

this is under

pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
kpathsea version 6.1.1
Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.2.49; using libpng 1.2.49
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.24.1

and it only rears its head under pdflatex, not under latex (which is of course also pdftex).

is there something wrong with my install or can this be replicated elsewhere?


UPDATE: This is a little more interesting. If you look at the example above, realize that I did not (want to) use the computer modern fonts, but charter fonts, which are scaleable.

One way to eliminate the bug is to remove the microtype, which apparently is doing font expansion (whatever this may be). Searching the log file for pk tells me the culprit: fonts/pk/ljfour/jknappen/ec/ecss1200.600pk. I did not realize that we were even using them. pdffonts tells me

$ pdffonts ...pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
HAJUBM+CMSY10                        Type 1            Builtin          yes yes no       4  0
CZKSHZ+CharterBT-Roman               Type 1            Custom           yes yes no       5  0
KMKFIH+CharterBT-Bold                Type 1            Custom           yes yes no       6  0
[none]                               Type 3            Custom           yes no  no       7  0

hmmm...maybe the first font is the problem. I did not believe that any CMS fonts were still being used, once I usepackage{charter}. but I was mistaken. obviously CMSY10 is still there, as is some unidentified Type-3 font.

so, I need to get rid of bitmap CMR fonts, even though I do not want to use them. I can do so by including package lmodern before package charter, even though I do not believe any of its fonts are actually used. So, this worked for me:

\documentclass[12pt]{article}

\usepackage[english]{babel}  %% hyphenation and other small changes
\usepackage[T1]{fontenc} %% hyphenation of accented words, copy-paste pdf output, pipe sign, less than ,etc.
\usepackage{lmodern}
\usepackage{charter} %% the main font, scaleable
\usepackage{microtype}  %% should always be the default

\newcommand{\textxsmally}[1]{#1}
\newcommand{\lmc}[1]{$\backslash$#1}

\begin{document}

\lmc{textbf} (\textbf{bold}) an \lmc{textsf} (\textsf{sans-serif}), and define \lmc{textxsmall} (\textxsmally{anything}).

\end{document}

and the resulting font output is

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
CQLPTE+LMMathSymbols10-Regular       Type 1            Custom           yes yes no       4  0
CZKSHZ+CharterBT-Roman               Type 1            Custom           yes yes no       5  0
KMKFIH+CharterBT-Bold                Type 1            Custom           yes yes no       6  0
OHZRNJ+LMSans12-Regular              Type 1            Custom           yes yes no       7  0

hope this helps some other hapless soul(s).

/iaw

  • 3
    You probably don't have the Type1 version of the European Modern fonts; try adding \usepackage{lmodern}. – egreg Jan 28 '14 at 20:46
  • 3
    I advise you to change all occurrences of \RequirePackage to \usepackage. This is unrelated to the error but is a good practice. – marczellm Jan 28 '14 at 20:49
  • install the cm-super package or load the Latin-Modern-Fonts. – user2478 Jan 28 '14 at 21:14
  • I know I can make it go away, e.g., by using different fonts, or changing the text. the question is: is this a veritable pdftex bug? – ivo Welch Jan 28 '14 at 21:24
  • 6
    No it's not a bug. If you use microtype and enable font expansion you can't use bitmap fonts. – Ulrike Fischer Jan 28 '14 at 21:45