Hi,
while trying out the new version of ConTeXt LMTX (2024.06.14 09:18) I
encountered some problems related to the PDF output files.
First, I tried to print a single page of the excellent new math manual
(many thanks to everyone involved in creating it, it’s great for
beginners like me and surely for experienced users too), but I noticed
that all of the extensibles in the formulas (like the bar in \frac,
\sqrt, long integral signs, and probably more) have disappeared.
Everything else was printed correctly.
After investigating, I found out that Okular on Linux converts the PDF
file to PostScript before printing (at least on my system), and I was
able to replicate this behavior by converting it manually to PostScript
with Poppler (pdftops in.pdf out.ps) or Ghostscript (pdf2ps in.pdf out.ps).
Printing from Firefox was not affected for me as it did not convert to
PostScript.
I was unable to reproduce this with my own documents (created with
ConTeXt LMTX 2024.05.31 18:50), so I decided to try this with the new
version. And with it, that was indeed reproducible.
To ensure that this is the PDF’s fault, I decided to try this on Windows
with Adobe Acrobat Reader on a different Computer with another fresh
installation of ConTeXt. But it wasn’t any better:
Adobe Acrobat Reader displayed two different error messages when trying
to scroll through or zoom in on the math manual:
1. “An error exists on this page. Acrobat may not display the page
correctly. Please contact the person who created the PDF document to
correct the problem.”
2. “There was an error processing a page. A number is out of range.”
Sometimes the first one is shown, sometimes the second one.
Additionally, some parts of the manual were blank (they were displayed
correctly in Okular, Firefox, and many more viewers), I suspect those
who contain extensibles in formulas. Following example leads to the same
behaviour:
\setuppapersize[S33] % Just to make page smaller
\setupbodyfont[modern, 11pt]
\starttext
Hello.
\startformula
\frac{a^2 + b^2}{1} = c^2
\stopformula
\page
Hello.
\startformula
a^2 + b^2 = c^2
\stopformula
\stoptext
The first page is empty in Acrobat Reader, whereas it’s displayed
correctly in all other PDF viewers I tried. But again, when converting
to PostScript, the fraction bar vanishes. The second page is fine.
I attached the faulty example.pdf file and some screenshots of it opened
in different PDF viewers, and of the math manual. The screenshot of the
math manual opened in Acrobat Reader shows that the second half of the
page is completely gone. example_pdftops-ps2pdf.pdf is example.pdf
converted to PostScript with Poppler and then converted to PDF again
with Ghostscript (attaching the PostScript file isn’t possible because
of file size). Opened in Okular or other Poppler based viewers you’ll
see a dot instead of the fraction bar (which gets infinitely smaller
while zooming-in), and openend in Firefox, MuPDF or Acrobat Reader
you’ll see a cut off bar.
One last thing, for some reason “\italiansqrt” on page 52 of the math
manual is converted perfectly fine to PostScript (at least it looks right).
Please let me know if you would like me to provide more information.
Best,
Ralph