Here is the code:
Code: Select all
\documentclass[12pt]{article}
\usepackage{xfor}
\gdef\ac#1{\bfseries #1!!!}
\gdef\setOneAcronym#1{\expandafter\newcommand\csname#1\endcsname{\ac{#1}}}
\makeatletter
\gdef\setAcronyms#1{\@for\@@a:={#1}\do{\setOneAcronym\@@a}}
\setAcronyms{GR,UZ,LZ}
\makeatother
\begin{document}
The acronym for GR is \GR\ or (\ac{GR}).
\end{document}
! Undefined control sequence.
\@@a->\@nil
l.17 The acronym for GR is \GR
\or (\ac{GR}}.
What do I need to change to get the \@@a to expand.
Thanks
Jeff