# How to get bold times new roman in math

I'm using \usepackage{mathptmx} to use times new roman font in math. But I can't make the font bold by using \boldmath, which works fine with default computer modern font.

I'm using \renewcommand{\rmdefault}{ptm} to use times new roman for the whole document.

How to get bold times new roman font in math so that it blends well with other text?

-
Welcome to TeX.sx! A tip: You can use backticks  to mark your inline code. Also, it would be great if you could add a minimal working example (MWE) that illustrates your problem. It is considered a lot better to put in some code that will compile, as it makes it a lot easier for us to copy it into our text editor and work with it, and see exactly what it is you are trying to do. –  Corentin Nov 8 '12 at 16:25

The mathptmx package is not the best way to load the times font as the fonts are both incomplete and a patchwork of symbols from different sources.

Among the free fonts, you best choice today is probably newtx (alternatively, on older distributions, you have txfonts, but they have some spacing problems):

\documentclass{article}

\usepackage{newtxtext}
\usepackage{newtxmath}

\begin{document}

$y = f(x)$

$\mathbf{y=f(x)}$

{\boldmath$y=f(x)$}

\end{document}

-
and newtxmath is not a patchwork? –  Herbert Nov 8 '12 at 18:41
Does it change font of non-math text? I'm using \renewcommand{\rmdefault}{ptm} to set default font to times new roman. –  user21916 Nov 8 '12 at 19:35
@user21916: if you only want to change the math, then don't load newtxtext. But the text fonts are more complete than ptm (they have real small caps), so it's probably a good idea to load both packages. –  Philippe Goutet Nov 8 '12 at 19:38
I have a lot of tables, in the header row of every table there are many math stuff. Is there a way to turn on math bold universally? something like \boldmath and \unboldmath –  user21916 Nov 8 '12 at 19:46
I found that \boldmath and \unboldmath work here. –  user21916 Nov 8 '12 at 20:04

there are no free math fonts for Times in Type 1 format. However, use the new OpenType font TeX Gyre Pagella Math with xelatex or lualatex

\documentclass{article}

\usepackage{unicode-math}
\setmainfont{TeX Gyre Termes}
\setmathfont[bold-style=TeX]{TG Termes Math}
\begin{document}

Times are gonna change \ldots

$y=f(x)$
$\mathbf{y=f(x)}$

\end{document}


If the bold letters should also be in italic use

\setmathfont[bold-style=ISO]{TG Termes Math}

-
the mathtime pro 2 lite fonts are (a) times-based, (b) pretty satisfactory for general user, and (c) free. they're not on ctan (in principle they could be withdrawn at any time) but they seem a good bargain to me (i don't write maths any more...) –  wasteofspace Nov 8 '12 at 17:05
the lite version has no bold symbols –  Herbert Nov 8 '12 at 17:26
Thanks for the solution but I didn't manage to set up XeLaTeX or LuaLaTeX in my Linux box –  user21916 Nov 8 '12 at 20:06

Use \mathbf{..} instead of {\boldmath ..}. The following minimal example

\documentclass{article}
\usepackage{mathptmx}% http://ctan.org/pkg/mathptmx
\DeclareMathAlphabet{\mathbfit}{T1}{ptm}{b}{it}
\showoutput
\begin{document}
aaa\textbf{aaa}\textbf{\textit{aaa}}
$aaa \mathbf{aaa} \mathbfit{aaa}$
\end{document}


lists the output fonts as

Completed box being shipped out [1]
\vbox(633.0+0.0)x407.0
.\glue 16.0
.\vbox(617.0+0.0)x345.0, shifted 62.0
..\vbox(12.0+0.0)x345.0, glue set 12.0fil
...\glue 0.0 plus 1.0fil
...\hbox(0.0+0.0)x345.0
..\glue 25.0
..\glue(\lineskip) 0.0
..\vbox(550.0+0.0)x345.0, glue set 539.77744fil
...\write-{}
...\glue(\topskip) 5.27003
...\hbox(4.72997+0.16492)x345.0, glue set 239.18018fil
....\hbox(0.0+0.0)x15.0
....\OT1/ptm/m/n/10 a
....\OT1/ptm/m/n/10 a
....\OT1/ptm/m/n/10 a
....\kern 0.0
....\OT1/ptm/b/n/10 a
....\OT1/ptm/b/n/10 a
....\OT1/ptm/b/n/10 a
....\kern 0.0
....\OT1/ptm/b/it/10 a
....\OT1/ptm/b/it/10 a
....\OT1/ptm/b/it/10 a
....\kern 0.0
....\glue 2.5 plus 1.49998 minus 0.59998
....\mathon
....\OML/ztmcm/m/it/10 a
....\OML/ztmcm/m/it/10 a
....\OML/ztmcm/m/it/10 a
....\hbox(4.72997+0.13994)x15.0
.....\OT1/ptm/b/n/10 a
.....\OT1/ptm/b/n/10 a
.....\OT1/ptm/b/n/10 a
....\hbox(4.555+0.13495)x15.0
.....\T1/ptm/b/it/10 a
.....\T1/ptm/b/it/10 a
.....\T1/ptm/b/it/10 a
....\mathoff
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
...\glue 0.0 plus 1.0fil
...\glue 0.0
...\glue 0.0 plus 0.0001fil
..\glue(\baselineskip) 23.18011
..\hbox(6.81989+0.0)x345.0, glue set 170.0fil
...\glue 0.0 plus 1.0fil
...\OT1/ptm/m/n/10 1
...\glue 0.0 plus 1.0fil


As a reference, see Bold italic vectors.

-
running pdffonts <file>.pdf is a bit shorter ... –  Herbert Nov 8 '12 at 17:45
how to have italic bold when using both mathptmx and mathbf? –  user21916 Nov 8 '12 at 19:43
Is it possible to make \mathbfit the default for math env? –  user21916 Nov 8 '12 at 19:58
As in all math is \mathbfit`? Always? –  Werner Nov 8 '12 at 20:00
If mathptmx can be used for bold math, why \boldmath does not work? –  user21916 Nov 8 '12 at 20:15