Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math minus sign not printed on paper #1232

Open
engeir opened this issue Nov 7, 2024 · 0 comments
Open

Math minus sign not printed on paper #1232

engeir opened this issue Nov 7, 2024 · 0 comments

Comments

@engeir
Copy link

engeir commented Nov 7, 2024

When printing math formulas with the minus sign to paper, the minus sign is missing. The generated PDF look fine in digital format.

A minimal example is shown below, where all packages I use are included. I included the packages since I thought the issue might be related to some package that is missing.

% src/main.tex
\documentclass[11pt,addpoints]{exam}

\usepackage{amsmath,amssymb,caption,color,hyperref,mhchem,pdfpages,siunitx,tikz}
\usetikzlibrary{decorations.pathreplacing,positioning}

\begin{document}
  Universal gas constant: \(R=\SI{8.314}{\joule\mole^{-1}\kelvin^{-1}}\)%
\end{document}

Generate with tectonic -X build (using the continuous version from Sep 20 2024) and

# Tectonic.toml
[doc]
name = "Exam 2024"
bundle = "https://data1.fullyjustified.net/tlextras-2022.0r0.tar"

# The exam problem set PDF
[[output]]
name = "exam"
type = "pdf"
inputs = "main.tex"

One thing I find to solve the issue is to create a new file with ghostscript and then overwriting:

gs -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -sOutputFile=build/exam/out.pdf build/exam/exam.pdf
mv build/exam/out.pdf build/exam/exam.pdf

The image below show on the left a file re-written with the ghostscript hack, and on the right a PDF compiled with tectonic, both opened in okular. The left PDF is printed to paper just fine, while the right document has minus signs missing. See bottom image.

issue

IMG_20241107_125603

I tried a few things in the main.tex file without success:

\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{pdfversion=1.7}
\documentclass[11pt,addpoints]{exam}

\usepackage{amsmath,amssymb,caption,color,hyperref,mhchem,pdfpages,siunitx,tikz}
\usetikzlibrary{decorations.pathreplacing,positioning}

\begin{document}
  Universal gas constant: \(R=\SI{8.314}{\joule\mole^{-1}\kelvin^{-1}}\)%
\end{document}
\documentclass[11pt,addpoints]{exam}

\usepackage{amsmath,amssymb,caption,color,hyperref,mhchem,pdfpages,siunitx,tikz}
\usetikzlibrary{decorations.pathreplacing,positioning}

\usepackage{newunicodechar}
\newunicodechar{−}{-}

\begin{document}
  Universal gas constant: \(R=\SI{8.314}{\joule\mole^{-1}\kelvin^{-1}}\)%
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant