词汇表 - 无分隔线

词汇表 - 无分隔线

我正在尝试生成一个首字母缩略词和定义列表,其中每个条目与前一个条目之间都有一定距离。两行之间的距离开箱即用,我对此很满意,但它并不适用于所有条目 - 有些条目在前一行结束后从下一行开始。我还看到很多underfull hbox警告,我认为这可能与条目之间的间距有关,但我不知道如何解决这个问题。有没有办法保持条目之间的两行间距,即使单词之间的间距有点违反允许值?

\documentclass[12pt,twoside,a4paper]{book}
\usepackage[xindy,nonumberlist,nopostdot]{glossaries}
\usepackage{tabulary}
\usepackage{setspace}
\usepackage{parskip}
\usepackage{setspace}
\loadglsentries{glossaries}

\makeglossaries
\begin{document}
\glossarystyle{long}
\glsaddall
\printglossaries
\end{document}

词汇表文件:

\newglossaryentry{functesting}
{
name={functional testing},
description={Testing based on an analysis of the specification of the functionality of a        component or system. Performed by black-box testing  techniques.\cite{istqb_glossary}\nopostdesc}
}

\newglossaryentry{regtesting}
{
name={regression testing},
description={Testing of a previously tested program following modification to ensure  that defects have not been introduced or uncovered in unchanged areas of the software, as a result of the changes made. Performed when the software or its environment is changed.\cite{istqb_glossary}\nopostdesc}
}

\newglossaryentry{regtesting2}
{
name={regression testing2},
description={Testing of a previously tested program following modification to ensure that defects have not been introduced or uncovered in unchanged areas of the software, as a result of the changes made. Performed when the software or its environment is changed.\cite{istqb_glossary}\nopostdesc}
}

\newglossaryentry{testauto}
{
name={test automation},
description={See \textit{automated testing}.}
}

\newglossaryentry{sysofsys}
{
name={system of systems},
description={Multiple heterogeneous, distributed systems that are embedded in networks at multiple levels and in multiple interconnected domains, addressing large-scale inter-disciplinary common problems and purposes, usually without a common management structure.\cite{istqb_glossary}\nopostdesc}
}

\newglossaryentry{sysintegrtest}
{
name={system integration testing},
description={Testing the integration of systems and packages; testing interfaces to external organizations.\cite{istqb_glossary}\nopostdesc}
}

\newglossaryentry{CR}
{
name={capture/replay},
description={A type of test execution tool where inputs are recorded during manual testing in order to generate automated test scripts that can be executed later (i.e. replayed). These tools are often used to support automated regression testing.Also known as record/playback, capture/playback.\cite{istqb_glossary}\nopostdesc}
}

\newglossaryentry{RP}
{
name={record/playback},
description={See \textit{capture/replay}.\nopostdesc}
}

\newglossaryentry{CP}
{
name={capture/playback},
description={See \textit{capture/replay}.\nopostdesc}
}

答案1

您可以修改long使用 的样式longtable。将此定义放入您的序言中:

\newglossarystyle{mylong}{
\glossarystyle{long}
  \renewcommand*{\glossaryentryfield}[5]{%
    \glsentryitem{##1}\glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\[10pt]}%
}

并使用 代替\glossarystyle{mylong}\glossarystyle{long}上面的 定义\glossaryentryfield与 样式 的原文完全相同long,只是10pt在每个条目后面添加了一个空格。

相关内容