[texhax] \verbdef + \xspace in one
Andre Majorel
aym-xet at teaser.fr
Sat May 26 11:18:50 CEST 2012
Hello all. Instead of
\verbdef{\lcallwithasillysuffix}|LC_ALL|
\newcommand{\lcall}{\lcallwithasillysuffix\xspace}
\begin{document}
\lcall
\end{document}
I would like to be able to do
\foo{lcall}{LC_ALL}
\begin{document}
\lcall
\end{document}
This doesn't work :
\documentclass{paper}
\usepackage{verbdef}
\usepackage{datetime}
\usepackage{xspace}
%\verbdef{\lcallsillysuffix}{LC_ALL}
%\newcommand{\lcall}{\lcallsillysuffix\xspace}
\newcommand{\lit}[2]{
\expandafter\verbdef{\csname #1sillysuffix \endcsname}{#2}
\expandafter\newcommand{\csname #1 \endcsname}[0]
{\csname #1sillysuffix \endcsname\xspace}
}
\lit{lcall}{LC_ALL}
\begin{document}
\xxivtime \ \lcall \xxivtime
\end{document}
(The call to \lit triggers a bunch of errors starting with
"! Missing = inserted for \ifnum.").
Anyone can see what my mistake is ? Thanks in advance.
--
André Majorel http://www.teaser.fr/~amajorel/
More information about the texhax
mailing list