如何使缩写条目遵循短格式和长格式的固定宽度样式

如何使缩写条目遵循短格式和长格式的固定宽度样式

我想让我的首字母缩略词列表看起来像这样。 我想要实现的目标 以下是我设法实现的。我希望短格式和长格式有一些固定宽度。我最接近想要的外观是通过

\renewcommand{\glossentry}[2]{\item[\begin{tabular}{@{}p{8ex}@{}}\textbf{\glsentryshort{#1}}:\end{tabular}]{\glsentrylong{#1}}}

我取得了什么成就,但也有抵消 但现在,短格式和长格式不再水平对齐。完整格式从基线略微向上偏移。最小工作示例有点用,但在我的实际工作/论文中实现不起作用。

\documentclass{report}
\usepackage[acronym]{glossaries}
\usepackage{newtxtext}
\makeglossaries
\newacronym{bh}{BH}{Black Hole}
\newacronym{xb}{XB}{X-ray Binary}
\newacronym{bhc}{BHC}{Black Hole Candidate}
\begin{document}
\renewcommand{\glossentry}[2]{\item[\begin{tabular}{@{}p{8ex}@{}}\textbf{\glsentryshort{#1}}:\end{tabular}]{\glsentrylong{#1}}}
\acrfull{bh} is an interesting astrophysical object. There are some \acrfull{xb} that host the \acrfull{bhc}.
\printglossary[type=\acronymtype,title={\vspace{-3cm}\centering LIST OF ACRONYMS AND ABBREVIATIONS},nonumberlist]
\end{document}

相关内容