Possible Duplicate:
babel shorthand "| doesn’t work in macros
I know there is a deeper non-understanding of LaTeX mechanics at work here, but I have no idea how to phrase my question to cover the general case, sorry.
\documentclass{scrbook}
\usepackage[ngerman]{babel}
% Trivial case, the "real" macro is a *bit* more involved
\newcommand{\mymacro}[1]{"`#1"'}
\begin{document}
"`Foo"'
\mymacro{Bar}
\end{document}
"Foo" gets typeset as expected, with the correct "German" quotation marks. But "Bar" gets typeset verbatim:
"`Bar"'
Apparently, the quotation marks "transformation" doesn't work inside \newcommand.
Since I never really understood what the more "magic" LaTeX commands (like \relax, \detokenize or \makeatletter) really were about, or how the underlying TeX really works, I'm stuck and cannot figure out what I need to make the quotation marks inside the macro work properly...
\glqqand\grqq:\newcommand{\mymacro}[1]{\glqq #1\grqq}.gstands for German,landrfor left and right,qqfor the double quotes; the same system is used to provide macros for single quotes (\??q) and the French Guillemets (\f???). – Qrrbrbirlbel Jan 10 '13 at 14:58