2

In an equation I want to write force vector with boldface f and its components in normal font. The result of this code

\begin{equation}
\mathbf{f} \neq f
\end{equation}

is unacceptable:

enter image description here

Any suggestions, apart from switching to a different character?

my2cts
  • 315
  • 2
    use the bm package and use \bm instead of \mathbf – daleif Mar 15 '24 at 11:49
  • 2
    You only say what is unacceptable. What do you want it to look like? – mickep Mar 15 '24 at 12:21
  • @mickep - Unless I'm badly mistaken, the OP wants the bold "f" glyph to mimic the shape of the non-bold "f" glyph -- italic/slanted with a long "lower tail". – Mico Mar 15 '24 at 12:24
  • I did not see bm in the texlive lsiting. How do I get it? – my2cts Mar 15 '24 at 20:16
  • @Mico Or vice versa. They should be clearly the same symbol. – my2cts Mar 15 '24 at 20:17
  • @my2cts - You wrote, "I did not see bm in the texlive [listing]. How do I get it?"How about by typing \usepackage{bm} (as is also demonstrated in my answer). FWIW, I use TeXLive2023. – Mico Mar 15 '24 at 20:29
  • @my2cts - If you don't like the output generated by \mathbf (or its Plain-TeX variant, $\bf f$) please take up your grievance with Don Knuth, the creator of the TeX system. This setting has been around for 40+ years... – Mico Mar 15 '24 at 20:44

3 Answers3

6

By design, \mathbf generates upright bold glyphs. As @daleif has already pointed out in comment, you should use \bm (a macro provided by the bm package) to generate slanted ("italic") bold glyphs in math mode.

enter image description here

\documentclass{article}
\usepackage{bm}
\begin{document}
$\mathbf{f} \quad \bm{f} \quad f$
\end{document}
Mico
  • 506,678
3

With a compilation in lualatex and the package unicode-math

% !TeX TS-program = lualatex
\documentclass{article}
\usepackage{unicode-math}
\begin{document}
$\symbfit{f} \quad f$
\end{document}

enter image description here

pascal974
  • 4,652
2

You can use unicode-math (with LuaLaTeX) with the math-style=ISO option to avoid many of the "unacceptable" inconsistencies in traditional TeX math typesetting. This will also give you italic capital Greek letters.

% !TeX program = lualatex
\documentclass{article}

\usepackage[ math-style=ISO, ]{unicode-math}

\AtBeginDocument{% \let\vec\symbf }

\begin{document}

[ f \vec{f} ]

\end{document}

MWE output

schtandard
  • 14,892