This is about a hard-to-reproduce problem that has plagued me intermittently for years. I reported it earlier, but to no avail. I was now finally able to boil it down to a very small test case and I thought it would be better to make this a new question. Here's my MWE:




\fancyfoot[RO]{{\tiny{\sffamily\textls[150]{\MakeUppercase{Gesichter der Mathematik}}}\rule[-1.6\dp\strutbox]{.3pt}{1.4\baselineskip}}}

Erst im 20. Jahrhundert kam die volle Wahrheit ans Licht.  Die Inhalte des
Buches stammten tatsächlich von Johann, der gute didaktische Aufbau war jedoch
das Werk L'Hospitals.  Hinter der Sache stand ein Arrangement, demzufolge
Bernoulli für seine Mathematik bezahlt wurde und im Gegenzug zustimmte, seine
Ergebnisse nicht selbst zu publizieren.  Der junge Bernoulli hatte sich quasi
verkauft und das später bereut.




I'm on Windows 10 with MikTeX updated today (but the problem has been there for years). If I compile this file from TeXWorks with the pdfLaTeX option, everything is fine. If I compile it from a console window with pdflatex test.tex, the first line of the last paragraph is incomplete - see image below. (pdflatex test.tex on Ubuntu Linux (running in WSL) works fine.)

This is the line where text is missing

To provoke the error in my MWE, the amsmath package must be present although it is not used. Also, the \textsl command in the footer seems to be necessary. The whole MWE is very fragile: change one bit and the error is gone.

FWIW, below are the differences between the two runs as reported by the log files. (I noticed that TeXWorks calls miktex-pdftex.exe instead of pdflatex.exe. But if there is a program called pdflatex.exe, shouldn't it work as expected?) What is happening here?

--- pdflatex.log    2024-04-05 22:23:22.784217000 +0200
+++ texWorks.log    2024-04-05 22:20:31.551568000 +0200
@@ -1,4 +1,4 @@
-This is pdfTeX, Version 3.141592653-2.6-1.40.26 (MiKTeX 24.3.31) (preloaded format=pdflatex 2024.4.5)  5 APR 2024 22:23
+This is pdfTeX, Version 3.141592653-2.6-1.40.26 (MiKTeX 24.3.31) (preloaded format=pdflatex 2024.4.5)  5 APR 2024 22:20
 entering extended mode
  restricted \write18 enabled.
  %&-line parsing enabled.
@@ -367,16 +367,16 @@
 Here is how much of TeX's memory you used:
  6262 strings out of 474400
- 106989 string characters out of 4507339
- 3925496 words of memory out of 8000000
+ 106989 string characters out of 5757339
+ 1932496 words of memory out of 6000000
  28534 multiletter control sequences out of 15000+600000
- 592261 words of font info for 70 fonts, out of 2000000 for 9000
+ 592261 words of font info for 70 fonts, out of 8000000 for 9000
  1141 hyphenation exceptions out of 8191
  65i,12n,69p,1003b,446s stack positions out of 10000i,1000n,20000p,200000b,200000s
-Output written on test.pdf (2 pages, 261653 bytes).
+Output written on test.pdf (2 pages, 261644 bytes).
 PDF statistics:
  27 PDF objects out of 1000 (max. 8388607)
  0 named destinations out of 1000 (max. 500000)

[Update 2024-04-06] I've put the code (with the suggested debugging line) and the uncompressed PDF files at https://www.dropbox.com/scl/fi/ksld8e2db09m39evjncg1/MWE.zip?rlkey=61d9avkrpghs6ecmq6gp9b64o&dl=0

If I compare the two PDF files, the main difference seems to be the following (where the first line is from the correct output):


[(Erst)]TJ -32626.8 0 Td [(im)-250(20.)-250(Jahrhundert)-250(kam)-250(die)-250(v)8(olle)-250(W)60(ahrheit)-250(ans)-250(Licht.)-250(Die)]

The first one was compiled using miktex-pdftex.exe -undump=pdflatex test.tex, the second one with pdflatex.exe test.tex. TeXWorks was not involved. (I'm mentioning this because some people misunderstood me and thought this was about an issue with TeXWorks. This is about a bug in the MiKTeX distribution of pdflatex as far as I understand it.)

[Second update from 2024-04-06] Digging through my old e-mails, maybe I found the culprit. Years ago, I did this (following some advice from someone I forgot):

initexmf --edit-config-file pdflatex

Add this to the file and save it:


Then run this:

initexmf --dump=pdflatex

With these settings, I get the error. If I repeat the process with an empty config file, the error is gone.

  • are you using the same viewer, are you sure the text really isn't there, rather than a viewer bug making it vanish? Apr 5 at 20:59
  • can you make the two pdf available somewhere (gdrive or dropbox or something similar)? Apr 5 at 21:00
  • For what it's worth, I still have an unresolved MikTex (TexWorks) viewer bug: tex.stackexchange.com/questions/597749/…. It views OK on Adobe, just not on TeXworks. Apr 5 at 21:02
  • the pdflatex log is made with a different sizes for all the fixed size arrays, so probably a different format Apr 5 at 21:03
  • @DavidCarlisle It's not a viewer bug. The line is missing in SumatraPDF as well as Acrobat Reader. I noticed the different sizes as well. But what exactly does "different format" mean?
    – Frunobulax
    Apr 5 at 23:03


You must log in to answer this question.

Browse other questions tagged .