## LaTeX forum ⇒ Page Layout ⇒ LaTeX: How to make acronyms automatically printet in its long form into the footnotes Topic is solved

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
TrizZm4ster
Posts: 1
Joined: Tue Dec 28, 2021 1:46 am

### LaTeX: How to make acronyms automatically printet in its long form into the footnotes

[Found out a bit myself - edited]
Hi,
I'm a bit lost and really hope to get some help here.
I want the following to work:

1.Get the long version of an acronym printed in the footnotes. [check]
2.Do this every time I use a acronym, but only once per page. [Once per page not working]
3.Reset Footnote numbers for every page - So every pages foot numbers start with counting with one again. [check]

I tried quite a lot without finding a solution and really hope to find someone, who is a lot better with Latex than me. The following is not close to working, but gives a minimized Code to refer to for a working example:

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

\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}


The output of what I need 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


P.S. English is only my third language and I apologize for probably made mistakes.
Tristan

LaTeXguide.org • LaTeX-Cookbook.net

cgnieder
Site Moderator
Posts: 1996
Joined: Sat Apr 16, 2011 7:27 pm

### LaTeX: How to make acronyms automatically printet in its long form into the footnotes  Topic is solved

I answered the same question on TeX.sx:

The package fixfoot can be used for footnotes with the same text that are repeatedly used.

Switching from the acronym package to acro we can
• modify \DeclareAcronym to also declare a new fixed footnote;
• define a new template for the first appearance which calls said fixed footnote.

Here is an example document:

\documentclass{article}

% for demonstration purposes only: make the page small!
\usepackage[
paperwidth=.5\textwidth,
paperheight=15\baselineskip,
margin=5pt,
bottom=1.5cm]{geometry}

\usepackage{acro}
\usepackage{fixfoot}
\usepackage{perpage}
\MakePerPage[1]{footnote}

\NewCommandCopy\DeclareAcroymCopy\DeclareAcronym
\RenewDocumentCommand\DeclareAcronym{m+m}{%
\DeclareAcroymCopy{#1}{#2}%
\expandafter\DeclareFixedFootnote\csname#1@fixed@foot\endcsname{\acrofield{#1}{long}}%
}

\NewAcroTemplate{fixfoot}{%
\acrowrite{short}%
\acroiffirstT{\csname\AcronymID @fixed@foot\endcsname}%
}

\acsetup{
first-style=fixfoot,
% subsequent-style=fixfoot
}

\DeclareAcronym{USA}{short=USA,long=United States of America}
\DeclareAcronym{UAE}{short=UAE,long=United Arabic Emirates}

\begin{document}

\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}

Someone more familiar with the acronym package can now maybe suggest a solution with it as well.
site moderator & package author