Closed StefanFabian closed 5 years ago
Actually the template does no changes on math fonts at all (if i remember correctly -- will check that). Therefore the setup with that relies on your System settings and additional config.
@marklaz should we add some configuration on math?
Hm, I noticed I get a warning that the font shape TS1/XCharter(0)/m/n is undefined at the begin of the document and "Some font shapes were not available, defaults substituted" at the documentclass. I thought all fonts were included? Any idea what's missing and how I can fix it?
More information: System: Ubuntu 18.04 TeX: LuaTex 1.10.0 (TeX Live 2019)
Personally, I am a fan of the AMS Euler fonts ;)
We should include some additional math config to produce consistent documents.
Is it a complete TeXlive installation? Do you have some minimal example file?
I've tracked it down to the gensymb package, if I remove that I don't have any missing font warnings anymore. Doesn't change anything about the math font though, so I take it that this is the AMS Euler font and it looks as intended? Is there some command or "hack" that could be used to change the font until there's a config because personally, I am a fan of the left font ;) That's just a nitpick, though.
Which font is the left font?
Concerning AMS Euler fonts, I only expressed my appreciation. I do not know which font is used by default in tuda-ci. As there is no specific configuration taking place at the moment, it might be some computer modern math fonts. (For me, the TeX-Gyre-Math fonts look nice also...)
I'm not 100% certain but it seems to be Charter Italic.
Hm, I've looked a bit more into it and the old font is definitely bitstream charter which the new one should also be since the text is also Charter and from what I've found its strongly recommended that the math and the text should have the same font. I've no idea what font the new one is but it's not Charter.
Sounds sensible to me, at least for a starting point.
@TeXhackse: Could we tune the math font configuration in that (XCharter) direction?
Any idea how I can change the font in the meantime? Everything I've found regarding this broke the fonts in other places, e.g. bold texts not being bold anymore etc.
@StefanFabian You can use unicodemath to adjust the font freely. It's fontspec compatible. Will have look at the rest now.
I now added the charter BT math font using mathdesign to the branch https://github.com/tudace/tuda_latex_templates/tree/19-mathfonts
Would be great if you had a look at it. Then I'd wait with 1.10 and add it to that relase as well.
Just to Note: There is no really complete math font at all. The BT only got the most common characters and mixes those up with mathdesign glyphs as well as others. It looks quite similar anyway.
I'd do a new release on monday. If I get any information on this font thing before that I can include it. Otherwise we will save this for the following one.
Wenn ich alles richtig verstanden habe, dann würde ich es auch befürworten, dass wir Charter auch für die Mathe-Umgebungen nutzen. Das ist nicht unbedingt die "schönste" Schrift dafür, aber die konsistenteste. Man könnte in der Dokumentation ein kleines Beispiel angeben, wie man das überschreiben kann, wenn man das ändern möchte.
@marklaz was meinst Du?
@schoeps das mit dem überschreiben hat halt dann echt viele Möglichkeiten. Hängt auch vom Compiler ab. Wir könnten sonst auch eine Option einführen die das deaktiviert und zum Standard zurückfällt. Wenn man es ändern will hängt es davon ab, in welche Richtung. Schriftarten sind da etwas komplex.
@texhackse Ich kenne das Paket nicht gut. Kann man die Option nur beim Laden setzen? Wenn man das später überschreiben kann, dann würde es ja reichen nur auf das entsprechende Paket bzw. dessen Doku zu verweisen?
Der Einfachheit und Konsistenz halber fände ich es auch sinnvoll, bei den Fonts standardmäßig voll auf Charter zu setzen. Wenn hier bereits ein Math-Font verfügbar ist, umso besser.
Die Idee mit dem Charter-Default-Ausschalten/-Überschreiben finde ich auch nicht schlecht. Ich sehe aber auch, dass das dann wirklich eher etwas für LaTeX-Fortgeschrittene wäre, die bzgl. Math-Fonts wissen, was sie tun, bzw. alternative Font-Packages einzubinden wissen. Wahrscheinlich gibt es hier abhängig vom Paket auch Unterschiede zwischen pdfLaTeX und LuaLaTeX.
Mein Votum für das nächste Release: Default Math-Font: Charter Mit ganz kurzem Hinweis, wie ein anderer Font eingebunden werden könnte. Ggf. stattdessen auch Verweis auf die Koma-Skript-Doku oder Fontspec-Doku, wenn dort der wesentliche Mechanismus bereitgestellt wird.
Okay, mach ich. Allerdings gibt es keinen allgemeinen Compiler unabhängigen Mechanismus (Und auch keine Allgemeinen Beschreibungen dazu). Man kann aber einen anderen Font drüber laden. Das geht wie sonst auch, solange das nach der Kalsse gemacht wird.
Hallo, ich habe die Aenderung bzgl. des math fonts auf meinem Dokument getestet. Als Folge verliere ich die bold fonts:
\mathbf
nicht mehr\ttfamily
als basicstyle
sind keine (roboto) mono bold fonts mehr vorhandenNach kurzer Suche scheint das mit einer Re-Deklaration verschiedener font-Einstellungen im mathdesign package zusammenzuhaengen.
Minimales Beispiel, current release -- siehe Unterschied mit/ohne mathdesign
:
\documentclass[
ngerman,
ruledheaders=chapter,% Ebene bis zu der die Überschriften mit Linien abgetrennt werden, vgl. DEMO-TUDaPub
class=article,% Basisdokumentenklasse. Wählt die Korrespondierende KOMA-Script Klasse
thesis={
type=dr,
dr=rernat
},
accentcolor=2c,% Auswahl der Akzentfarbe
custommargins=true,% Ränder werden mithilfe von typearea automatisch berechnet
marginpar=false,% Kopfzeile und Fußzeile erstrecken sich nicht über die Randnotizspalte
parskip=half,%Absatzkennzeichnung durch Abstand vgl. KOMA-Sript
fontsize=11pt,%Basisschriftgröße laut Corporate Design ist mit 9pt häufig zu klein
]{tudapub}
\usepackage[charter]{mathdesign}
\begin{document}
Abc {\ttfamily abc \bfseries abc}
$a=b^\mathbf{x}$
\end{document}
@ahueck Kann ich nicht reproduzieren. Bitte einmal die logs und aux mit anhängen. Dann kann ich das Testsystem entsprechend Konfigurieren. Auf allen bisher getesteten Systemen läuft es gut durch. Die Charter BT in fett ist lediglich nicht wirklich viel fetter als die normale, aber die Glympenzuordnung stimmt.
Anbei logs zu beiden Versionen.
Nachtrag: Habe es bei mir mit pdflatex (statt lualatex, was ich sonst benoetige) ausprobiert, und es scheint zu funktionieren.
Danke, ich hab einen Verdacht. Rest sehen wir morgen.
Okay - the problem is, that Bitstream Charter is in TeX Live only available as Type1. It would be possible to use this one with lualatex, but I would not recommend that. It's kind of senseless to switch to lualatex (or xelatex) and then stick to Type1 fonts. I own a math version with OTF - thats why I did not realize. Sorry about that. So the point is, there is no Charter variant with math Support in TTF or OTF in typical TeX distribustions.
How should be handle this? @schoeps @marklaz
The xcharter documentation supplies some comparision between different math variants. Still with Focus on Type1, but I could try to make examples for those. http://texdoc.net/texmf-dist/doc/fonts/xcharter/xcharter-doc.pdf
Sorry, I am lost. I know and care about nice fonts but I do not know enough about the different latex engines to understand the implications. May I start with a basic question? Why is it bad to use the Type1 font in lualatex?
I will try a short reply to your question, being sure that @TeXhackse can do that much better: LuaLaTeX is meant to make life easier with fonts by using TTF or OTF fonts directly. Using Type1 fonts, like in classical pdfLaTeX, is kind of anachronistic as you have to take care of things again, like virtual fonts etc., which were not required otherwise anymore. I.e., different font selection mechanisms (and font standards) would interact within one single document.
What about the TeXGyre fonts for math? There are quite some font families available, which might work fine together with Charter. TeXGyre fonts are available in Type1 and OTF in all relevant distributions as far as I know.
@MarkusL thanks! However, changing the math font to anything else than Charter is not implied by the TU design guide, right? So, if Charter cannot (easily) be used for math then why not keeping the default?
Beside the info @marklaz already gave: OpenType fonts will be the future, especially not that Adobe announced to drop the Type1 Support. Additionally those fonts have more Features concerning the Kerning and additional Ligatures ...
So the main Problem is @marklaz TexGyre math fonts are only existant as OTF. So we could use Charter (which is as I said no really math font, just a kind of ajustment) for pdflatex and TeXGyre for lualatex which somehow would also be confusing. The best matching would then stick to Times based fonts, as newtxmatch for pdflatex and TeX Gyre Math for lualatex. This also could be confusing especially if we allow users to modify.
How about adding some Information on math font choosing and leave this to the author. Thing is, that in general everyone has his/her own favourite there, and depending on compiler this would make things quite complicated in any way.
So I'd just suggest to add some Information to TUDaPub documentation on that. We could maybe even start a document only concerning fonts but stick to the default. Especially since there's no perfect match (Which is actually the case because designers usually don't care about match ;-) )
@TeXhackse as mentioned before, I cannot contribute much. However, I really don't like different default fonts based on the latex engine used.
I won't close this one yet but currently it seems like we cannot manage to get a perfect variant. I will now continue with 1.10.
For further discussion of this topic (after v1.10): How about BaskervilleF or Linux Libertine for math? They are not exactly the same font class (transitional-serif) as Charter (slab-serif) but come quite close and are available in Type1 and OTF. (But I cannot comment on how simple it is to integrate these fonts as math font for TUDa templates.)
@schoeps and me discussed that yesterday once again. Is it okay for everyone if we add some comments concerning this to the Demo files + some more to the documentation? Then everyone could choose the math font themselves concerning the compiler + personal favourites.
The default would stay the same as up to now.
For me that solution is fine.
Two last questions concerning this topic:
Thanks for your clarifications. I might have said better “macro-typographically similar” in my first question, I did not want to focus on details here too much ;)
Update
Nevermind, just including \usepackage[charter]{mathdesign}
works now since T1 is enforced for pdfa #42.
Old:
~In case anyone else is looking for a prettier and more fitting math font. This is what I'm currently using.
If you find ways to improve the look even further, I'm open to suggestions.~
\usepackage{unicode-math}
\setmathfont[Scale=MatchUppercase]{LibertinusMath-Regular.otf}
\setmathfont[range=up/{latin,Latin},Scale=0.96]{XCharter-Roman}
\setmathfont[range=bfup/{latin,Latin},Scale=0.96]{XCharter-Bold}
\setmathfont[range=it/{latin,Latin},Scale=0.96]{XCharter-Italic}
\setmathfont[range=bfit/{latin,Latin},Scale=0.96]{XCharter-BoldItalic}
% Replace nu because Libertinus nu looks very much like Charter v
\setmathfont[range=\mupnu,Scale=MatchUppercase]{XITS Math}
\setmathfont[range=\mitnu,Scale=MatchUppercase]{XITS Math}
\setmathfont[range=\mbfnu,Scale=MatchUppercase]{XITS Math-Bold}
\setmathfont[range=\mbfitnu,Scale=MatchUppercase]{XITS Math-Bold}
\setmathfont[range=\int,Scale=MatchUppercase]{XITS Math}
To note, that this is loading fontspec and will break the Type1 enforcement if pdfa=true. The mathdesign package could offer an alternative in that case.
It might make sense to provide some example PDFs with a confirmed working installation to make it easier to check if the fonts are working correctly.
Quite a few seem to have changed including the fonts in the math environment which I'm not sure is correct on my machine since the old one looked a lot cleaner. Left one is the old template and pdflatex, right one compiled with this template and luatex.