我想告诉nomencl
打印单页上的所有内容。
如果我使用\documentclass{article}
我的代码让 LaTeXnomitemsep
自己计算正确的长度,那么它就可以正常工作。
但是如果我使用\documentclass{scrartcl}
计算则会nomitemsep
返回错误的值(太小的值)。
\documentclass{scrartcl}
\usepackage{mathtools}
\usepackage{nomencl}
\makenomenclature
%\setlength{\nomitemsep}{\textheight / (27 * \baselineskip)}
\setlength{\nomitemsep}{0.12cm}
\begin{document}
%TODO this are 28 items
\nomenclature{$\alpha$}{}
\nomenclature{$\beta$}{}
\nomenclature{$\gamma$}{}
\nomenclature{$\delta$}{}
\nomenclature{$\epsilon$}{}
\nomenclature{$\zeta$}{}
\nomenclature{$\eta$}{}
\nomenclature{$\theta$}{}
\nomenclature{$\iota$}{}
\nomenclature{$\kappa$}{}
\nomenclature{$\lambda$}{}
\nomenclature{$\mu$}{}
\nomenclature{$\nu$}{}
\nomenclature{$\xi$}{}
\nomenclature{$o$}{}
\nomenclature{$\pi$}{}
\nomenclature{$\rho$}{}
\nomenclature{$\sigma$}{}
\nomenclature{$\tau$}{}
\nomenclature{$\upsilon$}{}
\nomenclature{$\phi$}{}
\nomenclature{$\chi$}{}
\nomenclature{$\psi$}{}
\nomenclature{$\omega$}{}
\nomenclature{$\Gamma$}{}
\nomenclature{$\Delta$}{}
\nomenclature{$\Theta$}{}
\nomenclature{$\Lambda$}{}
\printnomenclature
\end{document}
答案1
您无法对长度进行这样的操作。但是,该解决方案避免对项目进行计数,只要它们可以放在一页中即可:
\documentclass{scrartcl}
\usepackage{mathtools}
\usepackage{nomencl}
\usepackage{showframe}% just for the example
\makenomenclature
\setlength{\nomitemsep}{\fill}
\renewcommand{\nompostamble}{\vspace{-\topsep}}% remove the space inserted by \endlist
\begin{document}
x % to get the nomenclature
\nomenclature{$\alpha$}{}
\nomenclature{$\beta$}{}
\nomenclature{$\gamma$}{}
\nomenclature{$\delta$}{}
\nomenclature{$\epsilon$}{}
\nomenclature{$\zeta$}{}
\nomenclature{$\eta$}{}
\nomenclature{$\theta$}{}
\nomenclature{$\iota$}{}
\nomenclature{$\kappa$}{}
\nomenclature{$\lambda$}{}
\nomenclature{$\mu$}{}
\nomenclature{$\nu$}{}
\nomenclature{$\xi$}{}
\nomenclature{$o$}{}
\nomenclature{$\pi$}{}
\nomenclature{$\rho$}{}
\nomenclature{$\sigma$}{}
\nomenclature{$\tau$}{}
\nomenclature{$\upsilon$}{}
\nomenclature{$\phi$}{}
\nomenclature{$\chi$}{}
\nomenclature{$\psi$}{}
\nomenclature{$\omega$}{}
\nomenclature{$\Gamma$}{}
\nomenclature{$\Delta$}{}
\nomenclature{$\Theta$}{}
\nomenclature{$\Lambda$}{}
\clearpage % go to a fresh page
\begingroup % limit the effect of \flushbottom
\flushbottom
\printnomenclature
\clearpage % eject the page
\endgroup % end the group
\end{document}