I have some math formulas where I need bold roman style for some math expressions. Since they appear quite often, I need a macro for them. The obvious way is to write \newcommand{\foo}[1]{\mathbf{#1}}
, which works in principle. However, it falls apart when the command argument contains a superscript, and there is a subscript added outside the command, like so: \foo{x^k}_t
which results in
where the t subscript is too far away, presumably because it's outside an mbox
. Using the bm
package and defining \newcommand{\foo}[1]{\bm{#1}}
, I get the correct spacing as I want it:
But now I'm back to the wrong font as it's no longer in Roman style. And all approaches I've tried to combine \bm
and switching to a Roman style show up fail in one way or another. I can't seem to find a solution that will look like the second case, but use a Roman font like in the first case. Any ideas on how I could solve this? Thanks in advance!
Best Answer
You can get from the markup you want to the markup barabra correctly said that you need: