我努力寻找问题的解决方案,但无法在此网站或 Google 上找到。我尝试过:、、、minipage
。我阅读了文档,但一无所获。multicol
longtable
tabu
glossaries
我有一个词汇表,里面有语言词汇缩写。我只需要词汇条目缩写和描述。不需要第三部分。为了节省纸张,我希望词汇表分为两栏(缩写 描述 缩写 描述),并且不希望它放在单独的页面上。
我的 MWE:
\documentclass[openright,12pt,dutch]{report}
\usepackage{longtable}
\usepackage[nomain,nonumberlist,nogroupskip,nostyles]{glossaries} % voor de lijst met glossen.
\usepackage{glossary-super}
\usepackage{leipzig} % voor glossen
\makeglossaries
\newglossarystyle{myglosses}{
\renewenvironment{theglossary}{
\longtable{r l}
}{
\endlongtable
}
\renewcommand*{\glossaryheader}{}
\renewcommand*{\glsgroupheading}[1]{}
\renewcommand*{\glsgroupskip}{}
\renewcommand*{\glsclearpage}{}
% set how each entry should appear:
\renewcommand*{\glossentry}[2]{
\glstarget{##1}{\textsc{\glossentryname{##1}}}
&
\glossentrydesc{##1} \\
}
\renewcommand*{\subglossentry}[3]{%
\glossentry{##2}{##3}
}
}
\begin{document}
What does \Pl{} mean? My (\Fsg{}.\Poss{}) houses (house-\Pl{}). \Agr, \Antip, \Ben, \Caus, \Compl, \Comp, \Third, \Dem, \Erg, \Fut, \F, \Loc, \Irr, \Impf, \Inf, \Ind, \Indf, \Ins, \Neg, \N, \M, \Nmlz, \Obj, \Obl, \Parg, \Prf, \Prs, \Prog.
\printglossary[style=myglosses,type=\leipzigtype,title=].
\end{document}
记得跑makeglossaries
。我非常感谢你对我的论文的帮助。
答案1
像这样吗?
\documentclass[openright,12pt,dutch]{report}
\usepackage{multicol}
\usepackage[nomain,nonumberlist,nogroupskip,nostyles]{glossaries} % voor de lijst met glossen.
\usepackage{glossary-super}
\usepackage{leipzig} % voor glossen
\makeglossaries
\newglossarystyle{myglosses}{%
\renewenvironment{theglossary}%
{\begin{multicols}{2}\raggedright}
{\end{multicols}}
\renewcommand*{\glossaryheader}{}
\renewcommand*{\glsgroupheading}[1]{}
\renewcommand*{\glsgroupskip}{}
\renewcommand*{\glsclearpage}{}
% set how each entry should appear:
\renewcommand*{\glossentry}[2]{
\noindent\makebox[7em][l]{\glstarget{##1}{\textsc{\glossentryname{##1}}}}
\glossentrydesc{##1}
}
\renewcommand*{\subglossentry}[3]{%
\glossentry{##2}{##3}
}
}
\renewcommand*{\glossarysection}[2][]{\section*{Glossary}}
%\setglossarystyle{inline}
\begin{document}
What does \Pl{} mean? My (\Fsg{}.\Poss{}) houses (house-\Pl{}). \Agr, \Antip, \Ben, \Caus, \Compl, \Comp, \Third, \Dem, \Erg, \Fut, \F, \Loc, \Irr, \Impf, \Inf, \Ind, \Indf, \Ins, \Neg, \N, \M, \Nmlz, \Obj, \Obl, \Parg, \Prf, \Prs, \Prog.
\printglossary[style=myglosses,type=\leipzigtype,title=].
\end{document}
答案2
multicol
以下是使用\parbox
命令格式化词汇表的一种方法。section=section
包选项用于通过将分节级别从默认章节更改为节(不开始新页面)来防止词汇表之前的分页符。
\documentclass[openright,12pt,dutch]{report}
\usepackage[nomain,nonumberlist,nogroupskip,nostyles,section=section]{glossaries} % voor de lijst met glossen.
\usepackage{leipzig} % voor glossen
\usepackage{multicol}
\makeglossaries
\newglossarystyle{myglosses}{%
\renewenvironment{theglossary}{%
\setlength{\parindent}{0pt}%
\begin{multicols}{2}%
}{%
\end{multicols}%
}%
\renewcommand*{\glossaryheader}{}%
\renewcommand*{\glsgroupheading}[1]{}%
\renewcommand*{\glsclearpage}{\columnbreak}%
% set how each entry should appear:
\renewcommand*{\glossentry}[2]{%
\parbox{.3\linewidth}{\hskip \fill\glstarget{##1}{\textsc{\glossentryname{##1}}}}%
\hspace{.1\linewidth}%
\parbox{.6\linewidth}{\glossentrydesc{##1}\hskip \fill}\par%
}%
\renewcommand*{\subglossentry}[3]{%
\glossentry{##2}{##3}%
}%
}
\begin{document}
What does \Pl{} mean? My (\Fsg{}.\Poss{}) houses (house-\Pl{}). \Agr, \Antip, \Ben, \Caus, \Compl, \Comp, \Third, \Dem, \Erg, \Fut, \F, \Loc, \Irr, \Impf, \Inf, \Ind, \Indf, \Ins, \Neg, \N, \M, \Nmlz, \Obj, \Obl, \Parg, \Prf, \Prs, \Prog.
\printglossary[style=myglosses,type=\leipzigtype,title=]
\end{document}
答案3
我将为 leipzig 2.0 添加一个答案(刚刚于 2017-06-16 添加到 CTAN)。对于你的论文来说已经太晚了,但可能会对其他人有所帮助。
我已在此版本的 leipzig 中包含了预定义的多列词汇表样式。经过大量试验,我最终决定,任何基于表格格式的样式都不合适,因为它们通常不能很好地跨页显示,而词汇表缩写列表通常长达数页。
相反,预定义的块样式是基于词汇表包的alttree
和mcolalttree
样式构建的。设置缩写词汇表样式的最简单方法是使用包选项 [mcolblock]。
leipzig 的所有未知软件包选项都传递给词汇表。因此,像 @cfr 一样,我使用 [section] 选项在节标题而不是章节标题中打印词汇表名称。如果您确实不需要标题,可以取消注释一行以重新定义词汇表部分以不执行任何操作。
梅威瑟:
\documentclass[openright,12pt,dutch]{report}
% leipzig 2.0 has a simpler preamble declaration!
\usepackage[%
mcolblock,% multicolumn block glossary
section,% glossary begins with a section header (not chapter header)
]{leipzig} % voor glossen
\makeglossaries
% Uncomment if you want no chapter/section heading at all:
%\renewcommand*{\glossarysection}[2][]{}
\begin{document}
What does \Pl{} mean? My (\Fsg{}.\Poss{}) houses (house-\Pl{}). \Agr, \Antip, \Ben, \Caus, \Compl, \Comp, \Third, \Dem, \Erg, \Fut, \F, \Loc, \Irr, %\Impf, % changed to \Ipfv!
\Ipfv, \Inf, \Ind, \Indf, \Ins, \Neg, \N, \M, \Nmlz, \Obj, \Obl, \Parg, \Prf, \Prs, \Prog.
\printglosses
\end{document}
输出:
您还可以看到 leipzig 2.0 修复了一些错误!不再有 PL.pluralpl。