简体   繁体   English

在脚注中每页仅打印一次首字母缩略词的脚注。- LaTeX

[英]Only print a footnote of a acronym once per page in the footnotes.- LaTeX

I want the acronym package to only print a footnote, if its not already printed on that specific page.我希望首字母缩略词 package 仅打印脚注,如果它尚未打印在该特定页面上。 And give the \acf{XX} the same number in the text.并在文本中给 \acf{XX} 相同的数字。 It should look like this:它应该如下所示:

Text
The USA¹ are country as well as the UAE², but the USA¹ are bigger.

___________________
1 United States of America, 2 United Arabic Emirates

Next page:

The UAE¹ are still a country.

___________________
1 United Arabic Emirates

But it looks like this:但它看起来像这样:

Text
The USA¹ are country as well as the UAE², but the USA³ are bigger.

___________________
1 United States of America, 2 United Arabic Emirates, 3 United States of America

Next page:

The UAE¹ are still a country.

___________________
1 United Arabic Emirates

My code:我的代码:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[footnote]{acronym}
\usepackage{hyperref}
\usepackage{perpage}
\MakePerPage[1]{footnote} 



\begin{document}

\section*{Acronyms}
\begin{acronym}[ECU]
\acro{USA}{United States of America}
\acro{UAE}{United Arabic Emirates}
%[...]
\end{acronym}
\newpage

\section{Text}
The \acf{USA} are a country as well as the \acf{UAE}, but the \acf{USA} are bigger.
\newpage
The \acf{USA} are still a country.
\end{document}

I tried a lot but couldnt find out a Solution on my own - Maby someone here is better in LaTeX as me and could provide me some help.我尝试了很多,但无法自己找到解决方案 - 可能有人在 LaTeX 中比我更好,可以为我提供一些帮助。

Greetings Tristan.问候特里斯坦。

When you use \acf you request a "full acronym", so you explicitly override what the package would normally do.当您使用\acf时,您需要一个“完整的首字母缩写词”,因此您明确地覆盖了 package 通常会执行的操作。 If you use \af instead, you'll only get the footnote the first time.如果你改用\af ,你只会第一次得到脚注。

As for "first time¨: the acronym package tracks whether it has spelled out the acronym already. You can reset this counter with \acresetall . This is independent of pages. In your example with the forced page break you could simply add \acresetall after \newpage . In larger documents you could add it to each \section or \chapter , or have it done automatically with the etoolbox package or look into this answer to hook it into a page break.至于“第一次”:首字母缩写词 package 跟踪它是否已经拼出了首字母缩写词。您可以使用\acresetall重置此计数器。这与页面无关。在您的示例中,您可以简单地添加\acresetall之后\newpage 。在较大的文档中,您可以将其添加到每个\section\chapter中,或者使用etoolbox package 自动完成,或者查看此答案以将其挂钩到分页符中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM