Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

As usual I have quite a number of abbreviations (acronyms, initialism, ...) in my thesis and I'm not happy with the way I have to do it with glossaries.

I 'only' need the following:

  1. Abbreviations are defined as simple pairs of the abbreviations and its full version. Example: 'GEOAA' -> 'Great Example Of An abbreviations'
  2. The very first time I use the abbreviations the long form followed by the short form in parentheses should be used: "Great Example Of An Abbreviations (GEOAA)". Afterwards only the short form.
  3. For some important abbreviations I like to be able to reset this (2.) for every chapter.
  4. A need a "List of Abbreviations", i.e. a \chapter* heading and a two-column table (supertabular, longtable, ...) which lists this abbreviations in alphabetic order.
  5. Bonus: Abbreviations should be "easily" sharable between different documents, but this is not that important.

I found some material about how to do this with glossaries, but it is actually overkill for simple abbreviations. Also there is never a good instruction on how to handle the table. I hacked the following together which read the abbreviations file twice, once for the definition and once for the table. This kind of works (but no sorting etc.) but I really think we should have a better solution for this common task here on TeX.sx.

% thesis.tex (main file; preamble)
% acronyms.tex
\myacronym{ADC}{analog-to-digital converter}
\myacronym{ASCII}{american standard code for information interchange}
\myacronym{ASIC}{application specific integrated circuit}
\myacronym{BUFG}{global clock buffer}
\myacronym{CLB}{configurable logic block}
% ...
% abbreviations.tex (loaded where the List Of Abbreviations should be displayed) 
\renewcommand{\myacronym}[2]{{#1} & {#2}\\}%

\tablehead{\textbf{Abbreviation} & \textbf{Meaning}\\}%

(PS: please don't mind the file names; I know the difference between abbreviations and acronyms.)

share|improve this question
I have the funny idea in my mind to define an own tabular like environment using \halign which defines and typesets the abbreviations. Sorting is as always an issue, but I don't mind an occasional manual :%!sort command in Vim. –  Martin Scharrer Jul 20 '11 at 14:12

1 Answer 1

up vote 4 down vote accepted

Something like this?


    \acro@reset\csname acro@##1\endcsname}\the\acro@resetlist\endgroup}
  \use@acro\csname acro@#1\endcsname}
\def\use@acro#1#2#3{\ifx n#1
  #3 (#2)\global\@namedef{acro@#2}{o{#2}{#3}}%
\providecommand\listacronymname{List of acronyms}
  \toks2={#2}\xdef#1{\the\toks2 \the\toks0 }}


\acrodef{GEOAA}{Great Example Of An abbreviations}
\acrodef{IMO}{In My Opinion}
\acrodef*{OP}{Original Poster}











Acronyms are defined in the environment acronyms; the *-variant acronyms* also prints directly the list. In any case the command \listofacronyms is available for printing the list at the desired place.

For acronyms that must be reset at chapters use the macro \acrodef* that, besides doing the same as \acrodef, puts the first argument (the acronym) into a list, so that at \chapter the list can be executed and change the o sentinel into n again. The command \acro@doresetlist is also added to \section or \chapter, depending if the latter is defined.

To minimize dependencies on external packages, I've defined \g@preto@macro that is similar to \preto of etoolbox.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.