tudace / tuda_latex_templates

LaTeX Templates for TU Darmstadt
LaTeX Project Public License v1.3c
212 stars 71 forks source link

Wrong rendering of \vee when using STIX 2 (T1) math fonts #318

Closed ewontfix closed 3 years ago

ewontfix commented 3 years ago

Hi, I am writing a master thesis using the tudapub document class. If I understand the reasoning behind issue #42 correctly, I can only use T1 fonts for PDF/A compliant documents. I would like to use the STIX 2 fonts for math in my thesis. As theses need to be PDF/A compliant, I need to use the T1 version of the STIX 2 fonts. This version is provided by the stix2 package, which I load with the option notext to prevent any change of the text fonts.

I have noticed that \vee is rendered wrongly as "â". This already happens with the following minimal working example:

\documentclass{tudapub}

\usepackage[notext]{stix2}

\begin{document}
Here is some math:
\[c = \sqrt{2 + a^2 + b^2}\]
\[\psi = \phi \vee \phi\]
\end{document}

When I change the document class in the above code to scrartcl the document renders as expected. I am unsure why the example does not work with the tudapub document class.

For diagnostics I have attached the transcript as written by LuaLaTeX: LaTeXTests.log Wrong rendering: WrongRendering Expected rendering: ExpectedRendering

TeXhackse commented 3 years ago

Hi,

42 is outdated (I will add information there) therefore we don't longer enforce T1 for PDF/A - funfact: the current version of the T1 fonts can't create PDF/A anymore.

For stix2 you'd need to enforce T1, because fontspec is not compatible with it, this means you can use the T1 option which will be passed to tudafonts:

\documentclass[T1]{tudapub}
\usepackage[notext]{stix2}

\begin{document}
    Here is some math:
    \[c = \sqrt{2 + a^2 + b^2}\]
    \[\psi = \phi \vee \phi\]
\end{document}

But this will not be PDF/A compliant because of the T1.

ewontfix commented 3 years ago

Hi, thanks for extremely quick answer.

Good to know that T1 is no longer needed and used for PDF/A documents. Does this mean I can can use OTF fonts with PDF/A documents? In this case I will switch to the OTF versions of STIX 2, which are preferable anyway.

TeXhackse commented 3 years ago

Correct. You can use OTF math fonts and a prefered unicodmath setup.

I assume STIX contains all necessary metrics for PDF/A, but I did not test it. So I'd recommend you validate a test using that. (OpenSource ODf validator: https://verapdf.org/software/)

ewontfix commented 3 years ago

Perfect. Thanks!