Hi,
I'm having some serious issues, and have spent several hours, trying to figure out how the heck to change font, only for mathematical expressions.
I have a figure I've made using TIKZ, and I want to change the font in that figure because I have to use \tiny on some mathematical elements to make them fit properly. And when I use the standard font (which I think is Computer Modern for maths right? And palatino for normal text?) it doesn't get smaller on the width using \tiny, only on the height. So its rather unusable. Times on the other hand scales nicely.
The top of my page looks like this:
\documentclass{article}
\usepackage{mathptmx} %enables times in the whole document.
I want to use Palatino in normal text, and Times in mathematical figures.
The best on the other hand would be to scale to nicely looking \normal when using palatino font in mathematical expressions, using some postscript scaling or so.
I'm very new at LaTeX, so it is very possible the solution is simple.
Any answers are highly appreciated =)
Best Regards
Text Formatting ⇒ Math font
-
- Posts: 2
- Joined: Wed Sep 08, 2010 10:08 pm
Math font
Last edited by diamondfish on Thu Sep 09, 2010 9:48 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Math font
LaTeX defaults to Computer Modern in both text and math modes. If you're getting Palatino, you must be loading a package or using a command to introduce it.
Palatino in text mode and Times in math mode sounds extremely ugly to me. But if you must, the easiest way to get it might be to combine mathptmx with tgpagella (which provides a Palatino clone in text mode only).
If you want Palatino in both math and text modes, then you can load either pxfonts or mathpazo:
or
As for scaling in math mode, what you describe for \tiny does not sound like normal behavior at all. Perhaps you could post a minimal working example showing the problem?
You could also try the \mathsmaller{...} command from the relsize package. (You can nest this as many times as necessary.) Yet another alternative would be to use a \scalebox command from the graphicx package.
Palatino in text mode and Times in math mode sounds extremely ugly to me. But if you must, the easiest way to get it might be to combine mathptmx with tgpagella (which provides a Palatino clone in text mode only).
Code: Select all
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage{tgpagella}
Code: Select all
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
Code: Select all
\usepackage[T1]{fontenc}
\usepackage{pxfonts}
You could also try the \mathsmaller{...} command from the relsize package. (You can nest this as many times as necessary.) Yet another alternative would be to use a \scalebox command from the graphicx package.
-
- Posts: 2
- Joined: Wed Sep 08, 2010 10:08 pm
Re: Math font
By accident I came across the command \scalebox{<factor>}{<content>} which made my life much, much easier. Now I can use the \normalstyle font-size and just scale it down to a reasonable size.
Thank you for the answer though, that might come in handy some other time.
Thank you for the answer though, that might come in handy some other time.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Math font
Now that the problem seems to be solved, please mark the topic accordingly as clearly described in Section 3 of the Board Rules.
Best regards and welcome to the board
Thorsten
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10