![缩写词条目与其描述之间的空格](https://linux22.com/image/346924/%E7%BC%A9%E5%86%99%E8%AF%8D%E6%9D%A1%E7%9B%AE%E4%B8%8E%E5%85%B6%E6%8F%8F%E8%BF%B0%E4%B9%8B%E9%97%B4%E7%9A%84%E7%A9%BA%E6%A0%BC.png)
我正在使用 latex 来撰写我的论文报告,因此我使用词汇表包来生成首字母缩略词列表,但是我在首字母缩略词和它的描述之间得到了一个小空间,这是我的最小代码:
\documentclass{report}
\usepackage{graphicx}
\usepackage[colorlinks]{hyperref}
\usepackage[savewrites,nopostdot,toc,acronym,symbols,nogroupskip]{glossaries}
\makeglossaries
\newacronym{CICS}{CICS}{Customer Information Control System}
\newacronym{EHDM}{EHDM}{Enhanced Hierarchical Development Methodology}
\newacronym{ASF}{ASF}{Algebraic Specification Formalism}
\newacronym{ProCos}{ProCos}{Provably Correct Systems}
\newacronym{HOL}{HOL}{Higher Order Logic}
\newacronym{LOTOS}{LOTOS}{Language Of Temporal Ordering Specification}
\newacronym{CCS}{CCS}{Calculus of Communicating Systems}
\newacronym{CSP}{CSP}{Communicating Sequential Processes}
\newacronym{RAISE}{RAISE}{Rigorous Approach to Industrial Software Engineering}
\newacronym{VDM}{VDM}{Vienna Development Method }
\begin{document}
\tableofcontents
\chapter{Sample}
This is a sample document that uses the dummy glossary entries
supplied with the glossaries bundle for testing.
\gls{ASF} \gls{CICS}
Here are all the entries (including acronyms):
\gls{ASF} \gls{CICS} \gls{CSP} \gls{ProCos}
\gls{VDM} \gls{RAISE} \gls{CCS} \gls{ASF}
\gls{HOL} \gls{EHDM}
\printglossary[type=acronym,style=tree]
\end{document}
我得到了这个输出:
我怎样才能更改缩写词条目和其描述之间的空格?你能帮帮我吗?
答案1
在序言中,将宏重新定义\glstreepredesc
为缩写描述前面的内容。如果不修改它,它将扩展为一个空格。如果您将其重新定义为
\renewcommand\glstreepredesc{\quad}
那么缩略词和其描述之间的间距将增加到\quad
。
\documentclass{report}
\usepackage{graphicx}
\usepackage[colorlinks]{hyperref}
\usepackage[savewrites,nopostdot,toc,acronym,symbols,nogroupskip]{glossaries}
\makeglossaries
\newacronym{CICS}{CICS}{Customer Information Control System}
\newacronym{EHDM}{EHDM}{Enhanced Hierarchical Development Methodology}
\newacronym{ASF}{ASF}{Algebraic Specification Formalism}
\newacronym{ProCos}{ProCos}{Provably Correct Systems}
\newacronym{HOL}{HOL}{Higher Order Logic}
\newacronym{LOTOS}{LOTOS}{Language Of Temporal Ordering Specification}
\newacronym{CCS}{CCS}{Calculus of Communicating Systems}
\newacronym{CSP}{CSP}{Communicating Sequential Processes}
\newacronym{RAISE}{RAISE}{Rigorous Approach to Industrial Software Engineering}
\newacronym{VDM}{VDM}{Vienna Development Method }
\renewcommand\glstreepredesc{\quad}
\begin{document}
\tableofcontents
\chapter{Sample}
This is a sample document that uses the dummy glossary entries
supplied with the glossaries bundle for testing.
\gls{ASF} \gls{CICS}
Here are all the entries (including acronyms):
\gls{ASF} \gls{CICS} \gls{CSP} \gls{ProCos}
\gls{VDM} \gls{RAISE} \gls{CCS} \gls{ASF}
\gls{HOL} \gls{EHDM}
\printglossary[type=acronym,style=tree]
\end{document}
编辑:从评论中的讨论来看,问题似乎是垂直对齐描述。应用答案词汇表:首字母缩略词的长名称垂直对齐当前问题将导致以下变化:
在
\printglossary
命令中,使用style=long
而不是style=tree
。如果您希望将首字母缩略词以粗体显示(使用样式时
long
则为正常字体),请在加载包后将以下行添加到您的序言中glossaries
:\renewcommand{\glsnamefont}[1]{\textbf{#1}}
为了增加可用于描述的空间,请在加载包后将以下几行添加到序言中
glossaries
:\setlength\LTleft{0pt} \setlength\LTright{0pt} \setlength\glsdescwidth{0.8\hsize}
\documentclass{report}
\usepackage{graphicx}
\usepackage[colorlinks]{hyperref}
\usepackage[savewrites,nopostdot,toc,acronym,symbols,nogroupskip]{glossaries}
\renewcommand{\glsnamefont}[1]{\textbf{#1}}
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\setlength\glsdescwidth{0.8\hsize}
\makeglossaries
\newacronym{CICS}{CICS}{Customer Information Control System}
\newacronym{EHDM}{EHDM}{Enhanced Hierarchical Development Methodology}
\newacronym{ASF}{ASF}{Algebraic Specification Formalism}
\newacronym{ProCos}{ProCos}{Provably Correct Systems}
\newacronym{HOL}{HOL}{Higher Order Logic}
\newacronym{LOTOS}{LOTOS}{Language Of Temporal Ordering Specification}
\newacronym{CCS}{CCS}{Calculus of Communicating Systems}
\newacronym{CSP}{CSP}{Communicating Sequential Processes}
\newacronym{RAISE}{RAISE}{Rigorous Approach to Industrial Software Engineering}
\newacronym{VDM}{VDM}{Vienna Development Method }
\begin{document}
\tableofcontents
\chapter{Sample}
This is a sample document that uses the dummy glossary entries
supplied with the glossaries bundle for testing.
\gls{ASF} \gls{CICS}
Here are all the entries (including acronyms):
\gls{ASF} \gls{CICS} \gls{CSP} \gls{ProCos}
\gls{VDM} \gls{RAISE} \gls{CCS} \gls{ASF}
\gls{HOL} \gls{EHDM}
\printglossary[type=acronym,style=long]
\end{document}