LaTeX 中的词汇表包和脚注

发布于 2024-08-08 22:22:18 字数 1162 浏览 4 评论 0原文

我目前陷入困境,有两个单独的术语表: main & 缩写词Acronyms 词汇表在文本中首次使用时打印脚注,但 main 词汇表则不会。有没有办法制作除acronyms之外的任何其他词汇表来在首次使用该术语时打印脚注?我不明白该怎么做。

以下是使用 TeXnic Center 和 MiKTeX 2.7 编译的代码示例:

\documentclass{article}
\usepackage{index}
\usepackage[toc,style=long3colheaderborder,footnote,acronym]{glossaries} 

\makeindex 
\makeglossaries


\newglossaryentry{appdomain}{name={application domain}, description={app Domain Description...}}
\newglossaryentry{sample}{name={[has been inserted aaa]},description={testing testing 123}}

\newacronym{aca}{aca}{a contrived acronym}

\begin{document}
\section{this is a test section}
This is the test line... a \gls{sample} \gls{appdomain} 
\index{entry} and \gls{aca}
\thispagestyle{empty}\cleardoublepage

\printglossary[type=main,title={Glossary},toctitle={Glossary}]
\thispagestyle{empty}\cleardoublepage
\printglossary[type=\acronymtype,title={List of Abbreviations},toctitle={List of Abbreviations}]

\printindex
\thispagestyle{empty}\cleardoublepage
\end{document}

我希望示例和 appdomain 包含带描述的脚注或脚注说明:请参阅词汇表

非常感谢,
奥瓦内斯

I am currently stuck, having two separate glossaries: main & acronyms. Acronyms glossary prints footnotes on first use in the text, but main glossary does not. Is there any way to make any other glossary than acronyms to print footnote on first use of the term? I don't get how to do it.

Here is the code example compiled with TeXnic Center and MiKTeX 2.7:

\documentclass{article}
\usepackage{index}
\usepackage[toc,style=long3colheaderborder,footnote,acronym]{glossaries} 

\makeindex 
\makeglossaries


\newglossaryentry{appdomain}{name={application domain}, description={app Domain Description...}}
\newglossaryentry{sample}{name={[has been inserted aaa]},description={testing testing 123}}

\newacronym{aca}{aca}{a contrived acronym}

\begin{document}
\section{this is a test section}
This is the test line... a \gls{sample} \gls{appdomain} 
\index{entry} and \gls{aca}
\thispagestyle{empty}\cleardoublepage

\printglossary[type=main,title={Glossary},toctitle={Glossary}]
\thispagestyle{empty}\cleardoublepage
\printglossary[type=\acronymtype,title={List of Abbreviations},toctitle={List of Abbreviations}]

\printindex
\thispagestyle{empty}\cleardoublepage
\end{document}

I want sample and appdomain either contain a footnote with description or a footnote stating: please refer to Glossary

Many thanks,
Ovanes

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

朱染 2024-08-15 22:22:18

简而言之,使用 glossaries 包,您无法在首次使用非首字母缩略词词汇表时获得脚注。

但是,您可以在序言中重新定义一些命令(在 \usepackage{glossaries} 之后)来获得您想要的内容:

\makeatletter
\renewcommand{\gls@main@displayfirst}[4]{
  #1#4\protect\footnote{#2}
}
\makeatother

但这非常脆弱。

In short, with the glossaries package, you can't get footnotes on the first use for non-acronym glossaries.

However, you can redefine some commands in the preamble (after you \usepackage{glossaries}) to get what you want:

\makeatletter
\renewcommand{\gls@main@displayfirst}[4]{
  #1#4\protect\footnote{#2}
}
\makeatother

But that will be really fragile.

伤感在游骋 2024-08-15 22:22:18

我认为有一种更简单的方法可以做到这一点。也许它是新的,但

\defglsdisplayfirst[main]{#1#4\protect\footnote{#2}}

似乎实现了完全相同的事情(如果我错了,请纠正我)。请参阅词汇表手册,版本2.03,第2.4.1小节更改文本格式

不幸的是,像 \gls\autoref 这样的命令似乎在这些脚注中不起作用。

I think there is an easier way of doing this. Maybe it's new, but

\defglsdisplayfirst[main]{#1#4\protect\footnote{#2}}

appears to achieve the exact same thing (correct me if I'm wrong). See the glossaries manual, version 2.03, subsection 2.4.1 changing the format of the text.

Unfortunately, it appears commands like \gls or \autoref does not work in those footnotes.

中性美 2024-08-15 22:22:18

以下是一个很好的技术,可以在脚注中说明定义的位置:

\label{nom} %put this on the page your term appears, so that it can collect page number

\newcommand{\g}{\footnote{For all abbreviations see the glossary on page \pageref{nom}.}}

我从此处找到了这个。

Following is a good technique, to put a footnote stating where the definitions are:

\label{nom} %put this on the page your term appears, so that it can collect page number

\newcommand{\g}{\footnote{For all abbreviations see the glossary on page \pageref{nom}.}}

I've found this from here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文