I'm working off the excellent answer provided here: Creating a gls from a spreadsheet
I want to store my entries for the glossaries package in a .csv file, which is (IMHO) easier to edit and visualize than as a raw glossaries entry. The difference between my problem and the one above is that I'm trying to use acronyms, rather than a full glossary entry.
MWE:
\usepackage{datatool}
\usepackage[xindy,% better indexing
acronym% to allow acronyms
]{glossaries} % make glossaries
\makeglossaries
\setacronymstyle{long-short}
\DTLloaddb{data}{GeneralAcro.csv} % load the database .csv file
\DTLforeach*{data}% data set
{% assignments
\label=Command,%
\abbrev=Short,%
\longv=Long
}{
\newacronym{\label}{\abbrev}{\longv}
}
\begin{document}
\Gls{ipcc} makes \glspl{gcm} using \glspl{fem}.
\printglossaries
\end{document}
This gives me the following output when using pdflatex + makeindex + pdflatex:
NULL (IPCC) makes NULLS (GCMs) using NULLs (FEMs)
1 Acronyms FEM NULL
For reference, here is the GeneralAcro.csv file contents:
Command,Short,Long
gcm,GCM,Global Climate Model
ipcc,IPCC,International Panel on Climate Change
fem,FEM,Finite Element Model