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.

6

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

| improve this answer | |
  • 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 '16 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.