I want to create something similar to \listoffigures, \listoftables etc. What I've done so far:
\def\startloa#1
{
\begingroup
\begin{listofabbrv}{SPMD}
\@input{\jobname.#1}
\end{listofabbrv}
\global\@nobreakfalse
\endgroup
\newpage
}
\newcommand{\listofabbreviations}
{
\@startloa{loa}
}
% abvr{abvr}{text}
\def\abvr#1#2
{
\makeatletter
\immediate\write\tempfile{\backslash item[#1] #2}
\makeatother
}
\newwrite\tempfile
\begin{document}
\immediate\openout\tempfile=\jobname.loa
\listofabbreviations
\abvr{NULL}{/dev/null}
\immediate\closeout\tempfile
\end{document}
The \begin/\end{listofabbvr} is predefined in the style I'm using, so I can't change it. Is it done this way:
\begin{listofabbrv}{SPMD}
\item[NULL] /dev/null
\end{listofabbrv}
The main problems:
The
\abvrcommand does not work. The file output is:\delimiter "026E30F item[NULL] /dev/nullinstead of
\item[NULL] /dev/nullThe command
\listofabbreviationsdoes not work. Is there something wrong with\def\startloa? A little snippet of the output log:ERROR: 74 ! You can't use `\spacefactor' in vertical mode. 75 \@->\spacefactor 76 \@m 77 l.133 \listofabbreviations 78 79 ! Missing $ inserted. --- x --- x --- ERROR: 79 ! Missing $ inserted. 80 <inserted text> 81 $ 82 l.133 \listofabbreviations 83 84 ! Missing $ inserted. --- x --- x --- ERROR: 84 ! Missing $ inserted. 85 <inserted text> 86 $ 87 l.134 88 89 [3] --- x --- x ---
I've already tried \textbackslash, \, $$, @backslashchar and none worked.
– Jul 28 '11 at 15:34@in macro names: http://tex.stackexchange.com/questions/8351/what-do-makeatletter-and-makeatother-do – Andrey Vihrov Jul 28 '11 at 16:54nomenclor theglossariespackages. – Andrey Vihrov Jul 28 '11 at 16:58