4

I'm writing an article whose math font needs to be Times New Roman. To this end, I'm using the newtxmath package. However, it doesn't seem to support sans-serif bold in math mode.

Usually I can write

\documentclass{article}

\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}

\begin{document}

Sans serif, no bold: $\mathsf{A}, \mathsf{\Omega}$

Sans serif, bold: $\boldsymbol{\mathsf{A}}, \boldsymbol{\mathsf{\Omega}}$

\end{document}

which produces

Correct output, no newtxmath

However, when the newtxmath is included

\documentclass{article}

\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{newtxmath}

\begin{document}

Sans serif, no bold: $\mathsf{A}, \mathsf{\Omega}$

Sans serif, bold: $\boldsymbol{\mathsf{A}}, \boldsymbol{\mathsf{\Omega}}$

\end{document}

one gets

Wrong output with newtxmath

Is there any workaround to this? Using mathptmx instead isn't the best option, since I also need upright Greek symbols which are provided automatically in newtxmath.

1 Answer 1

7

You should also load newtxtext, for the text fonts. A small correction should be made as well, for \mathsf{\Omega}. Also load bm, which is better than the standard version for \boldsymbol provided by amsmath. You can also use \bm instead of \boldsymbol.

\documentclass{article}

\usepackage{amsmath}
\usepackage{bm}
\usepackage{newtxtext,newtxmath}

\DeclareMathAlphabet{\mathsf}{OT1}{\sfdefault}{m}{n}
\SetMathAlphabet{\mathsf}{bold}{OT1}{\sfdefault}{b}{n}


\begin{document}

Sans serif, no bold: $\mathsf{A}, \mathsf{\Omega}$

Sans serif, bold: $\boldsymbol{\mathsf{A}}, \boldsymbol{\mathsf{\Omega}}$

\end{document}

enter image description here

3
  • I was using times for the text font as newtxtext wouldn't even render \mathsf{\Omega} at all, but now it's working perfectly with your correction. Thank you.
    – hfs
    Apr 11, 2016 at 11:24
  • i like this but it will only work with upper case greek letters. How can I make it work with lower case?
    – J Peterson
    Oct 12 at 16:33
  • @JPeterson You need a whole new symbol font with sans serif Greek lowercase, with a boldface variant.
    – egreg
    Oct 12 at 22:21

You must log in to answer this question.

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