我用memoir
类。在我的词汇表中,我需要强调肯定术语(和描述),但让其他的用罗马字。
命令就是\glossary{term}{description}
这样的,我尝试执行,\glossary{\emph{term}}{\emph{description}}
并且强调就在那里。但是,这就是我的问题,强调的术语随后在符号中排序。我认为这是因为 \emph 命令是由 makeindex 逐字解释的。
有办法吗?我可以\glossaryemph
为这种格式创建另一个特定/替代命令吗?怎么样?memoir.cls 有这些行(l.8660-8667),它们似乎与我相关,但我真的不确定:
\newcommand{\memwritetoglo}[5]{\endgroup}
\newcommand{\@ctualm@mwritetoglo}[5]{%
\immediate\write \memglofile{\string\glossaryentry{#1\@nameuse{memglsact\m@mgf}
{\string\memgloterm{#2}}{\string\memglodesc{#3}}
{\string\memgloref{#4}}\@nameuse{memglsnf\m@mgf}}{#5}}%
\endgroup}
\AtBeginDocument{%
\let\memwritetoglo\@ctualm@mwritetoglo}
梅威瑟:
\documentclass[12pt,a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{filecontents}
\makeglossary % glossaire, fichié généré: .gls
%generate .gst style file
\begin{filecontents}{\jobname.gst}
% Output style parameters
preamble "\\begin{theglossary}"
postamble "\n\\end{theglossary}\n"
item_0 "\n\\glossitem"
delim_0 "{\\memglonum{"
encap_suffix "}}}"
heading_prefix "{\\bfseries\\hfil "
heading_suffix "\\hfil}\\nopagebreak\n"
headings_flag 1
% Input style parameters
keyword "\\glossaryentry"
\end{filecontents}
% general glossary styling
\renewcommand{\memgloterm}[1]{\textbf{#1}} % glossary term in bold
\renewcommand{\memglodesc}[1]{\hspace{2ex}#1} % glossary description: distance
\renewcommand{\memglonum}[1]{} % no glossary (page) numbers
\begin{document}
Some text.
\glossary{v.}{voir}
\glossary{\emph{Aa.Vv.}}{\emph{Autori vari}}
\glossary{OJLS}{Oxford Journal of Legal Studies}
\printglossary
\end{document}
输出:
答案1
您可以使用key
参数指定正确的排序顺序;例如,
\glossary(Aa){\emph{Aa.Vv.}}{\emph{Autori vari}}
一个完整的例子
\documentclass[12pt,a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{filecontents}
\makeglossary % glossaire, fichié généré: .gls
%generate .gst style file
\begin{filecontents}{\jobname.gst}
% Output style parameters
preamble "\\begin{theglossary}"
postamble "\n\\end{theglossary}\n"
item_0 "\n\\glossitem"
delim_0 "{\\memglonum{"
encap_suffix "}}}"
heading_prefix "{\\bfseries\\hfil "
heading_suffix "\\hfil}\\nopagebreak\n"
headings_flag 1
% Input style parameters
keyword "\\glossaryentry"
\end{filecontents}
% general glossary styling
\renewcommand{\memgloterm}[1]{\textbf{#1}} % glossary term in bold
\renewcommand{\memglodesc}[1]{\hspace{2ex}#1} % glossary description: distance
\renewcommand{\memglonum}[1]{} % no glossary (page) numbers
\begin{document}
Some text.
\glossary{v.}{voir}
\glossary(Aa){\emph{Aa.Vv.}}{\emph{Autori vari}}
\glossary{Ab}{Ab test}
\glossary{OJLS}{Oxford Journal of Legal Studies}
\printglossary
\end{document}
由此产生的词汇表: