我想添加一个粗体数学符号,就像\bm{u}
词汇表中那样。但我不知道如何让它工作。我的代码如下
\documentclass{article}
\usepackage{amsmath}
\usepackage{bm}
\usepackage[acronym,symbols,nogroupskip,nonumberlist,automake,toc=true,section]{glossaries-extra}
%The entry i want in the glossary
\glsxtrnewsymbol[description={Control vector}]{\bm{u}}{\ensuremath{\bm{u}}}
\printnoidxglossary[type=symbols,sort=use,style=long,title={List of Symbols}]
\begin{document}
$\gls{\bm{u}}$
\end{document}
有人知道怎样让它工作吗?
答案1
您应该使用一串字符作为符号的“名称”。
\documentclass{article}
\usepackage{amsmath}
\usepackage{bm}
\usepackage[
acronym,
symbols,
nogroupskip,
nonumberlist,
toc=true,
section
]{glossaries-extra}
%The entry i want in the glossary
\glsxtrnewsymbol[description={Control vector}]{bmu}{\ensuremath{\bm{u}}}
\makenoidxglossaries
\begin{document}
\printnoidxglossary[
type=symbols,
sort=use,
style=long,
title={List of Symbols}
]
\section{Some title}
Here I use it $\gls{bmu}$
\end{document}