Giter Site home page Giter Site logo

Comments (36)

TeXhackse avatar TeXhackse commented on August 12, 2024

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?

from tuda_latex_templates.

StefanFabian avatar StefanFabian commented on August 12, 2024

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)

from tuda_latex_templates.

marklaz avatar marklaz commented on August 12, 2024

Personally, I am a fan of the AMS Euler fonts ;)

We should include some additional math config to produce consistent documents.

from tuda_latex_templates.

marklaz avatar marklaz commented on August 12, 2024

Is it a complete TeXlive installation?
Do you have some minimal example file?

from tuda_latex_templates.

StefanFabian avatar StefanFabian commented on August 12, 2024

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.

from tuda_latex_templates.

marklaz avatar marklaz commented on August 12, 2024

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...)

from tuda_latex_templates.

StefanFabian avatar StefanFabian commented on August 12, 2024

I'm not 100% certain but it seems to be Charter Italic.

from tuda_latex_templates.

StefanFabian avatar StefanFabian commented on August 12, 2024

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.

from tuda_latex_templates.

marklaz avatar marklaz commented on August 12, 2024

Sounds sensible to me, at least for a starting point.

@TeXhackse:
Could we tune the math font configuration in that (XCharter) direction?

from tuda_latex_templates.

StefanFabian avatar StefanFabian commented on August 12, 2024

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.

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024

@StefanFabian You can use unicodemath to adjust the font freely. It's fontspec compatible. Will have look at the rest now.

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024

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.

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024

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.

from tuda_latex_templates.

schoeps avatar schoeps commented on August 12, 2024

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?

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024

@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.

from tuda_latex_templates.

schoeps avatar schoeps commented on August 12, 2024

@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?

from tuda_latex_templates.

marklaz avatar marklaz commented on August 12, 2024

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.

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024

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.

from tuda_latex_templates.

ahueck avatar ahueck commented on August 12, 2024

Hallo,
ich habe die Aenderung bzgl. des math fonts auf meinem Dokument getestet.
Als Folge verliere ich die bold fonts:

  • in Formeln funktioniert \mathbf nicht mehr
  • in Listings mit \ttfamily als basicstyle sind keine (roboto) mono bold fonts mehr vorhanden

Nach 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}

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024

@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.

mathfont.pdf

from tuda_latex_templates.

ahueck avatar ahueck commented on August 12, 2024

Anbei logs zu beiden Versionen.

tex-logs.zip

Nachtrag: Habe es bei mir mit pdflatex (statt lualatex, was ich sonst benoetige) ausprobiert, und es scheint zu funktionieren.

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024

Danke, ich hab einen Verdacht. Rest sehen wir morgen.

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024

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

from tuda_latex_templates.

schoeps avatar schoeps commented on August 12, 2024

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?

from tuda_latex_templates.

marklaz avatar marklaz commented on August 12, 2024

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.

from tuda_latex_templates.

schoeps avatar schoeps commented on August 12, 2024

@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?

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024

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 ;-) )

from tuda_latex_templates.

schoeps avatar schoeps commented on August 12, 2024

@TeXhackse as mentioned before, I cannot contribute much. However, I really don't like different default fonts based on the latex engine used.

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024

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.

from tuda_latex_templates.

marklaz avatar marklaz commented on August 12, 2024

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.)

https://tug.org/FontCatalogue/mathfonts.html

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024

@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.

from tuda_latex_templates.

marklaz avatar marklaz commented on August 12, 2024

For me that solution is fine.

Two last questions concerning this topic:

  • Do the math font mechanisms currently work consistently between pdfLaTeX and LuaLaTeX, i.e., do documents look identically independent of the chosen compiler? I wonder, because in the FontCatalogue on tug.org (cf. link above) the default Computer Modern math fonts are listed as available in type1 only.
  • Does this solution also work for TUDaBeamer (cf. #30)? I think, that selection of a sans serif font for math on slides should be as simple as possible, because this blends well optically with the surrounding (typically sans serif) text fonts.

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024
  • There are OTF, just in other Packages. e.g. https://ctan.org/pkg/cm-unicode?lang=en It should work out but I will recheck that. Though identical won't work anyway since the Kerning Features might differ. But they won't be identical in anyway, due to other mechanisms as well. LuaLaTeX and pdfLaTeX have not been designed for that. Both are designed to get the typographically best typestting with their toolset.
  • I am currently working on that. Will post that in that issue asap. + I want to add, that there currently is no complete sans sarif math font. All are just somehow combined glyphs. There's a DANTE project working on that.

from tuda_latex_templates.

marklaz avatar marklaz commented on August 12, 2024

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 ;)

from tuda_latex_templates.

StefanFabian avatar StefanFabian commented on August 12, 2024

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}

from tuda_latex_templates.

TeXhackse avatar TeXhackse commented on August 12, 2024

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.

from tuda_latex_templates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.