1

When using this code: \DeclareSymbolFont{letters}{OT1}{cmss}{m}{n} % my dots become semicolon when they are inside of dollar markers $...$.

How can I fix this?

Ref: Non italic text in equations

5
  • 1
    That's quite normal, as the letters are usually in OML encoding. I guess you are trying to get sans-serif math. I suggest using the sansmathfonts package.
    – campa
    Commented May 12, 2017 at 8:01
  • I'm new at latex, so i'm not really sure what OML encoding is. What i was trying to do is to make my text in equation non-italic. Afterwards i made the greek letters non-italic using this code: \usepackage{upgreek,xspace} \def\alpha{\ensuremath\upalpha\xspace} But now all of my dots became semi colons. Is there a work around for this problem? Thx. Commented May 12, 2017 at 8:08
  • Thx @campa. \usepackage{sansmath} Did the trick. Commented May 12, 2017 at 8:32
  • @campa Would you like to write up an answer? Commented Jun 3, 2017 at 20:58
  • @TorbjørnT. Sorry, took a while...
    – campa
    Commented Jun 15, 2017 at 13:18

1 Answer 1

1

The standard definition of the letters (from fontmath.ltx) is

\DeclareSymbolFont{letters}{OML}{cmm}{m}{it}

and a few lines later in the same file the period is defined as

\DeclareMathSymbol{.}{\mathord}{letters}{"3A}

This means that when you type a period . in math-mode, the symbol in the slot "3A (i.e. 58 in decimal numbers) from the letters is used. In an OML encoding this is indeed the period, as one may see from the following font table

enter image description here

With your command (whose purpose, I guess, is to have upright (?) sans-serif math)

\DeclareSymbolFont{letters}{OT1}{cmss}{m}{n}

your are saying that the letters have to be taken from a OT1-encoded Computer Modern sans-serif font; the font table is in this case

enter image description here

Comparing the two tables shows that the capital greek letters as well as the latin letters indeed take up the same slot in both cases, but most other symbols don't. In particular, typing . still looks for the slot "3A but now there is a colon there.

To make the long story short: if you want sans-serif math it's better you don't mess with low-level commands (unless you know them) but rather use dedicated packages like sansmath or sansmathfonts.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .