Fonts & Character Sets ⇒ Separate Text and Math Fonts
Separate Text and Math Fonts
Any hints, help or articles would be very appreciated! Thanks in advance!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Separate Text and Math Fonts
Code: Select all
\usepackage{eulervm}
\usepackage{tgtermes}
If you want to do things “like” this, but not this, probably the easiest things would be to switch to XeLaTeX and use the fontspec and mathspec and/or unicode-math packages, which make it really easy to switch regular and math fonts at will.
Re: Separate Text and Math Fonts
It seems that there are many font packages that modify both text and math environments. But let's suppose I only wanted the math modification but not the text modification. Are there any commands that can allow me to choose?
For example, CONCMATH changes both my math and text fonts to concrete. But what if I wanted to only change the math font and keep my text at the default Computer Modern Roman?
Thanks in advance, again!
Separate Text and Math Fonts
You can always use “low level” font commands to change fonts rather than relying on packages, but using packages just tends to make things much easier. There's a summary of the basic font commands here:
http://tex.loria.fr/general/new/fntguide.html
Changing math fonts without using a package with regular latex/pdflatex is really really difficult. Changing the main text font isn't comparatively as hard. Probably if you wanted a unique combination, and didn't want to use XeLaTeX, my advice would be to load the package for the font, even if it applied to both modes, and then switch the text modes back afterwards.
For example, if you wanted Computer Modern as your text mode font, and something else (concmath or whatever) as your math mode font, I'd load the package for math mode, and then afterwards, put it:
Code: Select all
\renewcommand{\rmdefault}{cmr}
\renewcommand{\sfdefault}{cmss}
\renewcommand{\ttdefault}{cmtt}
Re: Separate Text and Math Fonts
It sounds like I am better off investing time in learning XeTex or LuaTex.
Thanks!
Re: Separate Text and Math Fonts
I don't really understand what you mean about Computer Modern becoming "lighter" than normal. Perhaps this has something to do with the font encoding changing?
Re: Separate Text and Math Fonts
Thanks for all the help. Much appreciated!
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Separate Text and Math Fonts
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10