![背景](https://rvso.com/image/475711/%E8%83%8C%E6%99%AF.png)
数式モードでテキストの「太字」を維持する方法はありますか: 例:
\documentclass{standalone}
\newcommand{\mathkeepboldness}[1]{\ensuremath{#1}} % this should keep the text formating
\begin{document}
\begin{tabular}{l}
Here \mathkeepboldness{a^b} should not be bold\\
\textbf{Here: \mathkeepboldness{a^b} should be bold}\\
\end{tabular}
\end{document}
代わりに「太字」を検出することも役立ちます。その後、新しいコマンドを書くことができます
\newcommand{\keepbold}[1] \ifbold {\ensuremath{\mathbf{#1}}} {\ensuremath{#1}}
理想的には、どの LaTeX ディストリビューションでもこれが動作するようにしたいと考えています。
前もって感謝します
背景
私は頭字語パッケージを使用して、変数をその意味にマッピングしています。例:
\acro{v} [\ensuremath{v}] {velocity}
...
これにより、テキストや数式で頭字語を使用できるようになります。例:
\ac{v} is defined as:
\begin{equation}
\ac{v}=\frac{\ac{d}}{\ac{t}}
\end{equation}
また、太字のテキストでもこれが機能するようにしたいと思います。