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:
- Abbreviations are defined as simple pairs of the abbreviations and its full version. Example: 'GEOAA' -> 'Great Example Of An abbreviations'
- 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.
- For some important abbreviations I like to be able to reset this (2.) for every chapter.
- 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. - 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)
\usepackage[shortcuts]{glossaries}
\newcommand*{\myacronym}[3][]{%
\newacronym[#1]{#2}{#2}{#3}%
}
\loadglsentries{acronyms}
% 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)
\chapter*{Abbreviations}
\thispagestyle{fancy}
\begingroup
\renewcommand{\myacronym}[2]{{#1} & {#2}\\}%
\par\noindent
\tablehead{\textbf{Abbreviation} & \textbf{Meaning}\\}%
\begin{supertabular}{@{}ll}
\input{acronyms}\\
\end{supertabular}
\endgroup
(PS: please don't mind the file names; I know the difference between abbreviations and acronyms.)
tabularlike environment using\halignwhich defines and typesets the abbreviations. Sorting is as always an issue, but I don't mind an occasional manual:%!sortcommand in Vim. – Martin Scharrer♦ Jul 20 '11 at 14:12