3

For my paper (medieval studies) I would like to create a list of mentioned persons and a list of mentioned manuscripts (they often have only a signature but no name in the strict sense). For this I used the acro package, which works somehow... but I have two problems:

  1. In the list of manuscripts, I want to print the short form (or long form. It does not matter as these are identical for the manuscripts!) and not both short and long form. Is this even possible with the acro package to only print one form?

  2. In the list of persons, I would like to swap the order of short form and long form (so first long form, then short form). Would that be possible?

\documentclass{scrbook}

\usepackage{acro}

\acsetup{
    pages / display = all
}

\DeclareAcronym{john}{
    short =     {Johnny},
    long =      {John Example},
    long-post = {\space (1900--1980)},
    extra =     {1900--1980, poet},
    tag={person}
}

\DeclareAcronym{abc_123}{
    short =     {ABC~123},
    long =      {ABC~123},
    long-post = {\space (20th century)},
    extra = {20th century, paper manuscript},
    tag={manuscript},
}

\begin{document}
    
    \acl{john} wrote \acs{abc_123}. 

    \printacronyms[include=person, name=Persons, preamble={Something about people.}]
    \printacronyms[include=manuscript, name=Manuscripts, preamble={Something about manuscripts.}]   
    
\end{document}

I have studied the acro-manual quite a bit and also googled it, looked here. I'm probably just blind.... I'd be very grateful if someone could help me. Still new to LaTeX. Thanks a million.

4
  • 1
    Please add a short, but compilable test file which allows us to reproduce the problem. It should include a class, the necessary packages and a document environment. Jan 8 at 15:28
  • Thanks, I edited my post! Let me know if something is still missing. Jan 8 at 16:32
  • You don't want the long-post appearing in the lists?
    – Dai Bowen
    Jan 8 at 17:45
  • Thanks for the question. I'm thinking about using "extra" to add the information from "long-post" to the lists. I left it out of the example because I didn't think it was important for my problems. But I'll add it - maybe it is relevant?! Jan 8 at 17:53

1 Answer 1

4

My first thought is that nomencl or glossaries would be a better tool for the persons list, and biblatex for the manuscripts list, but you can absolutely customise the list of acronyms in acro as requested.

The relevant part of the documentation is III 25 Templates, the default list template is

\NewAcroTemplate[list]{description}{%
  \acroheading
  \acropreamble
  \begin{description}
    \acronymsmapF{%
      \item[\acrowrite{short}\acroifT{alt}{/\acrowrite{alt}}]
        \acrowrite{list}%
        \acroifanyT{foreign,extra}{ (}%
        \acroifT{foreign}{\acrowrite{foreign}\acroifT{extra}{, }}%
        \acroifT{extra}{\acrowrite{extra}}%
        \acroifanyT{foreign,extra}{)}%
        \acropagefill
        \acropages
          {\acrotranslate{page}\nobreakspace}
          {\acrotranslate{pages}\nobreakspace}%
      }
      {\item\AcroRerun}
  \end{description}
}

For the manuscript lists I'd swawp the \acrowrite{short} for \acrowrite{list} (by default the long, but overwriteable with list) and modify the printing of extra so it appears outside the brackets, but leave foreign keys appearance unmodified.

\NewAcroTemplate[list]{manuscripts}{%
  \acroheading
  \acropreamble
  \begin{description}
    \acronymsmapF{%
      \item[\acrowrite{list}\acroifT{alt}{/\acrowrite{alt}}]
        \acrowrite{extra}%
        \acroifT{foreign}{ (%
        \acrowrite{foreign}%
        )}%
        \acropagefill
        \acropages
          {\acrotranslate{page}\nobreakspace}
          {\acrotranslate{pages}\nobreakspace}%
      }
      {\item\AcroRerun}
  \end{description}
}

Compiled code showing the result of the manuscripts list template

While for the persons we just swap the \acrowrite{short} and \acrowrite{list} keys and otherwise leave it unmodified

\NewAcroTemplate[list]{persons}{%
  \acroheading
  \acropreamble
  \begin{description}
    \acronymsmapF{%
      \item[\acrowrite{list}\acroifT{alt}{/\acrowrite{alt}}]
        \acrowrite{short}%
        \acroifanyT{foreign,extra}{ (}%
        \acroifT{foreign}{\acrowrite{foreign}\acroifT{extra}{, }}%
        \acroifT{extra}{\acrowrite{extra}}%
        \acroifanyT{foreign,extra}{)}%
        \acropagefill
        \acropages
          {\acrotranslate{page}\nobreakspace}
          {\acrotranslate{pages}\nobreakspace}%
      }
      {\item\AcroRerun}
  \end{description}
}

Compiled code showing the result of the persons list template

0

You must log in to answer this question.

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