Is there a way to keep the "boldness" of text, in math mode: eg:

\newcommand{\mathkeepboldness}[1]{\ensuremath{#1}} % this should keep the text formating
    Here \mathkeepboldness{a^b} should not be bold\\
    \textbf{Here: \mathkeepboldness{a^b} should be bold}\\

enter image description here Alternatively to detect the "boldness" would also help. Then I could write a new command

\newcommand{\keepbold}[1]    \ifbold {\ensuremath{\mathbf{#1}}} {\ensuremath{#1}}

I want this ideally to work on any LaTeX distribution.

Thanks in advance


I'm using the acronym package to map my variables to the meaning of it. eg:

\acro{v} [\ensuremath{v}] {velocity}

This allows me to use the acronym in text and equations: eg:

\ac{v} is defined as:

And I want this to also work when in bold text.

  • 1
    Please always try to show a minimal working example instead of code snippets only. Maybe you want amsmath command \text. But this is only a guess.
    – cabohah
    Apr 15 at 9:49
  • \mathbf makes things upright roman` I guess you are looking for \bfseries\boldmath bold text $ bold math$ Apr 15 at 10:58
  • Note most math publishers do not make math bold in bold regions as unlike text where boldness is just stylistic choice, changing to a bold font can change the meaning, eg make a scalar variable a vector. Apr 15 at 10:59

1 Answer 1


Be careful with this: boldface letters in math mode usually have their proper meaning. In some stylistic choices, boldface is also transferred to math, but of course you cannot use boldface for particular symbols.




Here $a^b$ should not be bold

\textbf{Here: $a^b$ should be bold}


enter image description here

You must log in to answer this question.

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