I have a problem with a command i make for a specific glossary:
\newcommand{\term}[4]{\glslink{term:#1}{#2}}
\makeatletter
\def\term#1{\def\tempa{#1}\futurelet\next\term@i}% Save first argument
\def\term@i{\ifx\next\bgroup\expandafter\term@ii\else\expandafter\term@end\fi}%Check brace
\def\term@ii#1{\glslink{term:\tempa}{#1}}%Two args
\def\term@end{\glslink{term:\tempa}{\tempa}}%Single args
\makeatother
It should work like this:
'\term{BAR}' -> '\glslink{term:BAR}{BAR}'
'\term{BAR}{FOO}' -> '\glslink{term:BAR}{FOO}'
It works fine except of the space that is entered before the Result.
It seems to work like that
'\term{BAR}' -> '\xspace\glslink{term:BAR}{BAR}'
'\term{BAR}{FOO}' -> '\xspace\glslink{term:BAR}{FOO}'
