LaTeX How Do You Handle Font Discrepancies Between Math and Text in LaTeX?

  • Thread starter Thread starter DrDu
  • Start date Start date
  • Tags Tags
    Latex Text
Click For Summary
Font discrepancies between math and text in LaTeX can lead to aesthetic issues, particularly when using plain LaTeX for subscripts and exponents. Users often prefer to avoid math mode to maintain compatibility with publishers who may not accept LaTeX, opting instead for packages like comptex to align text and math fonts. Solutions include using specific packages such as times or charter to harmonize fonts, and commands like \textsubscript{} and \textsuperscript{} for superscripts and subscripts outside math mode. The discussion highlights the importance of maintaining a cohesive appearance while acknowledging that LaTeX's design philosophy separates content from formatting. Ultimately, users are encouraged to explore existing packages or create custom solutions to address font discrepancies effectively.
DrDu
Science Advisor
Messages
6,423
Reaction score
1,004
I've been using Latex for many years now. But there is a feature which I feel more and more uneasy about: At least in plain latex you are supposed to do subscripts, minus signs, in math mode, even when writing a simple number with exponent in text mode. Another example would be expressions like "α-particle". However, latex uses different fonts for math and text, which produces quite ugly results.
I know that there are packages like comptex etc. which provide some commands for text mode.
My main reason I want to avoid using math mode is that I am working now on a field where latex is not very common for publications and not all publishers (or colleagues) accept it. So I want to be able to convert a file into rtf with latex2rtf in case of emergency.

What are your favourite solutions to this problem?
 
Physics news on Phys.org
I match the text and math fonts by using

% For Times
\usepackage{times}
\usepackage{txfonts}

or

% For Charter
\usepackage{charter}
\usepackage[charter]{mathdesign}

(More options "ftp://tug.ctan.org/pub/tex-archive/info/Free_Math_Font_Survey/survey.html"[/URL].)
 
Last edited by a moderator:
DrDu said:
At least in plain latex you are supposed to do subscripts, minus signs, in math mode, even when writing a simple number with exponent in text mode.

You can use \textsubscript{} and \textsuperscript{} outside math mode. If you use them a lot, make your own shorter names for them.

Or you can use \mathrm{} or \mbox{} to get "normal" text inside math mode.

Arguably math minus signs $-$, em dashes -- and en dashes --- should be three different glyphs, but nobody is going to arrest you for font violation if you think otherwise.

The whole point of LaTeX is to separate the content of the document from the details of its appearance. In genuinely "plan latex" you would be using Knuth's Computer Modern fonts for the text so everything will look harmonious (but not necessarily pretty, unless you really like the CMR fonts). If you want to override the math fonts, you can do that with many existing packages, or you can do it yourself. To find out how, use an existing package (e.g. file txfonts.sty) as an example, and find out what the commands do if you can't guess.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
42K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
8K