缩进和词汇表

缩进和词汇表

我正在写一本书,我想在书的最后添加一个词汇表。我面临几个问题:

  1. 似乎词汇表有一个左边距(查看与“词汇表”标题的距离)。我在 MWE 上显示了框架。
  2. 我想缩进每一个描述与他们的相比姓名(但事实是我的整本书没有缩进,如 MWE 所示)
  3. 我不认为在描述很清楚。我可以在数字前添加类似“...”的内容吗?或者在右侧放置一排点和页码?

有人知道如何解决这些问题吗?

在此处输入图片描述

梅威瑟:

\documentclass{book}
\usepackage[showframe]{geometry}

\usepackage[xindy,toc,acronym,nopostdot]{glossaries} %TOC = in table of content, xindy = indexation tool, needs to be BEFORE HYPERLINK
\setglossarystyle{altlist}
\renewcommand{\glsgroupskip}{}
\makeglossaries

\usepackage{enumitem}
\setlist[enumerate]{topsep=3pt,itemsep=1pt,partopsep=0ex,parsep=0ex}
\setlist[itemize]{topsep=3pt,itemsep=1pt,partopsep=0ex,parsep=0ex}
\setlist[description]{topsep=3pt,itemsep=2pt,partopsep=0ex,parsep=0ex,leftmargin=15pt,labelindent=15pt}
\parindent 0in
\parskip 0.05in
\setlength{\textfloatsep}{0.8\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}

\newglossaryentry{Alpha}
{ name=Alpha,
  description={Smoothing factor applied to the demand level in the various exponential smoothing models. In theory: \ensuremath{ 0 < \alpha \leq 1}, in practice: \ensuremath{0 < \alpha \leq 0.6}}}
\newglossaryentry{Beta}
{ name=Beta,
  description={Smoothing factor applied to the trend in the various exponential smoothing models. In theory: \ensuremath{ 0 < \beta \leq 1}, in practice: \ensuremath{0 < \beta \leq 0.6}}}
\newglossaryentry{Gamma}
{ name=Gamma,
  description={Smoothing factor applied to the seasonality (either additive or multiplicative) in the triple exponential smoothing models. In theory: \ensuremath{ 0 < \gamma \leq 1}, in  practice: \ensuremath{0.05 < \gamma \leq 0.3}}}
\newglossaryentry{Phi}
{ name=Phi,
  description={Damping factor applied to the trend in the exponential smoothing models. This reduces the trend after each period. In theory: \ensuremath{ 0 < \phi \leq 1}, in practice: \ensuremath{0.7 \leq \phi \leq 1}}}
\begin{document}
\glsaddall
\printglossary
\end{document}

答案1

您可以重新定义theglossary以传递可选参数desciption

\renewenvironment{theglossary}{%
  \begin{description}[style=standard,labelindent=0pt]%
}{\end{description}}

该命令\glspostdescription控制在描述和页码之间插入什么,用点填充使用

\renewcommand\glspostdescription{\dotfill}

这导致

\documentclass{book}
\usepackage[showframe]{geometry}

\usepackage[xindy,toc,acronym,nopostdot]{glossaries} %TOC = in table of content, xindy = indexation tool, needs to be BEFORE HYPERLINK
\setglossarystyle{altlist}%
\renewenvironment{theglossary}{%
  \begin{description}[style=standard,labelindent=0pt]%
}{\end{description}}
\renewcommand\glspostdescription{\dotfill}
\makeglossaries

\usepackage{enumitem}
\setlist[enumerate]{topsep=3pt,itemsep=1pt,partopsep=0ex,parsep=0ex}
\setlist[itemize]{topsep=3pt,itemsep=1pt,partopsep=0ex,parsep=0ex}
\setlist[description]{topsep=3pt,itemsep=2pt,partopsep=0ex,parsep=0ex,leftmargin=15pt,labelindent=15pt}
\parindent 0in
\parskip 0.05in
\setlength{\textfloatsep}{0.8\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip}

\newglossaryentry{Alpha}
{ name=Alpha,
  description={Smoothing factor applied to the demand level in the various exponential smoothing models. In theory: \ensuremath{ 0 < \alpha \leq 1}, in practice: \ensuremath{0 < \alpha \leq 0.6}}}
\newglossaryentry{Beta}
{ name=Beta,
  description={Smoothing factor applied to the trend in the various exponential smoothing models. In theory: \ensuremath{ 0 < \beta \leq 1}, in practice: \ensuremath{0 < \beta \leq 0.6}}}
\newglossaryentry{Gamma}
{ name=Gamma,
  description={Smoothing factor applied to the seasonality (either additive or multiplicative) in the triple exponential smoothing models. In theory: \ensuremath{ 0 < \gamma \leq 1}, in  practice: \ensuremath{0.05 < \gamma \leq 0.3}}}
\newglossaryentry{Phi}
{ name=Phi,
  description={Damping factor applied to the trend in the exponential smoothing models. This reduces the trend after each period. In theory: \ensuremath{ 0 < \phi \leq 1}, in practice: \ensuremath{0.7 \leq \phi \leq 1}}}
\begin{document}
\glsaddall
\printglossary
\end{document}

在此处输入图片描述

相关内容