将首字母缩略词加粗,但不要使用符号

将首字母缩略词加粗,但不要使用符号

我想让缩写粗体。我曾经\renewcommand{\glsnamefont}[1]{\textbf{#1}}实现过这个。但有一个副作用:\text{...}符号也变得粗体,这是不想要的。如何摆脱这个副作用?

在此处输入图片描述

梅威瑟:

\documentclass[a4paper,12pt]{article}

\usepackage[acronym,symbols,nomain,nopostdot,nogroupskip,nonumberlist,automake]{glossaries-extra}

\renewcommand{\glsnamefont}[1]{\textbf{#1}}
\renewcommand*{\glspostdescription}{\medskip}   % Add vertical space after each glossary item
\setabbreviationstyle[acronym]{long-short}
\newglossarystyle{mystyle}{%
    \glossarystyle{long}%
    \renewenvironment{theglossary}%
        {\begin{longtable}{p{3cm}p{\glsdescwidth}}}%
        {\end{longtable}}%
}

\setabbreviationstyle[acronym]{long}

\newacronym
[
    description=Evolutionary Strategy,
    longplural=evolutionary strategies
]
{es}{ES}{evolutionary strategy}
\glsxtrnewsymbol
    [description={Minimal element density}]
    {min-element-density}
    {\ensuremath{\rho_{e,\,\text{min}}}}
\makeglossaries


\begin{document}
\setglossarystyle{mystyle}
\printglossary[type=acronym,title={List of Acronyms}]
\printglossary[type=symbols,title={List of Symbols}]
\glsaddallunused

\end{document}

相关内容