0

I have a document in which I use the packet acro:

\usepackage{acro}
\input{./acronyms.tex}

Here, in the file acronyms.tex, I have all the definitions I want. It works properly when I use the command \ac{..} and so on.

I would like to have a page at the beginning of the document with the "List of Acronyms", in the same way of List of Figures or Table.

I have found this example but it does not work: if I add the usage of the packet acronym I get latex error.

Question: is there a way for generating automatically a new page with acronyms by using the acro?

The main doc is structured in this way:

\include{formatAndDefs}
\graphicspath{{D01_Figures/}}
\begin{document}
\include{A01_TitlePage/TitlePage}
%....other things here

\dominitoc
\begin{spacing}{1.3}
\pagenumbering{roman}
  \cleardoublepage
\include{A02_Acknowledgements/Acknowledgements}
  \cleardoublepage
\include{A03_Abstract/Abstract}
  \cleardoublepage
\include{A03_Abstract/AbstractSpanish}
\tableofcontents
  \cleardoublepage
\listoffigures
  \cleardoublepage
\listoftables
  \cleardoublepage
\mainmatter

\include{B01_Chapter1/Chapter1}
\include{B02_Chapter2/Chapter2}
\include{B03_Chapter3/Chapter3}
\include{B04_Chapter4/Chapter4}
\include{B05_Chapter5/Chapter5}
\include{B06_Chapter6/Chapter6}
\end{spacing}
\bibliographystyle{unsrt} 
\bibliography{biblio}
\end{document}

So, in this context, if I use, for example, `\printacronyms', how to generate a new page in a similar way of "List of Figure"?

Edit: if I use the solution proposed in the answer, the result is:

enter image description here

4
  • Did you already try with \printacronyms? To quote from the doumentation: "Printing the whole list of acronyms is easy: just place \printacronyms where ever you wantthe list to be."
    – leandriis
    Commented Jan 16, 2020 at 15:54
  • nope, try it right now
    – Leos313
    Commented Jan 16, 2020 at 15:57
  • 2
    If I were to guess than your list of figures uses a \chapter* while \printacronyms uses \section*. But you can change this: \printacronyms[heading=chapter*] or maybe \chapter*{Acronyms} \printacronyms[heading=]
    – cgnieder
    Commented Jan 16, 2020 at 21:55
  • 1
    In your MWE, there is no printacronyms command. What if you include your acronyms.tex instead of inputting it? Or just do a cleardoublepage before the input like you did for the other lists?
    – thymaro
    Commented Jan 17, 2020 at 6:10

1 Answer 1

1

You can use the \printacronyms command for this. You can specify the name you like with the name option (e.g. "List of acronyms", as mentioned in your question). Since your question asks about printing the list on a new page, you can just use \clearpage beforehand. Here is a minimal working example:

\documentclass{article}

\usepackage{acro}

\DeclareAcronym{jpg}
{
    short = JPEG ,
    sort  = jpeg ,
    alt   = JPG ,
    long  = Joint Photographic Experts Group
}
\DeclareAcronym{la}
{
    short        = LA ,
    short-plural = ,
    long         = Los Angeles,
    long-plural  = ,
    class        = city
}

\begin{document}

    I live in \ac{la} and love \ac{jpg}

    \clearpage

    \printacronyms[name = {List of acronyms}]

\end{document}
4
  • +1 it works properly. However, it does not generate a page like in the case of List of Figure of List of Table. For instance, it has just generate the Acronyms in the page of List of Table
    – Leos313
    Commented Jan 16, 2020 at 16:03
  • @Leos313, could you provide a more detailed MWE in your question? It would be easier to help you.
    – Droplet
    Commented Jan 16, 2020 at 16:04
  • question updated with the result
    – Leos313
    Commented Jan 16, 2020 at 16:18
  • Your MWE isn't self contained so it's hard to tell you what went wrong. If I add a table and \listoftables to the example in my answer, I get the same thing as \printacronyms. As @cgnieder pointed out, your issue is likely due to the fact that \listoftables uses a chapter in the class you used but we can't know for sure as long as you don't provide an complete example that we can copy/paste and compile.
    – Droplet
    Commented Jan 17, 2020 at 9:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .