Code: Select all
\show\,
Code: Select all
> \,=macro:
->\x@protect \,\protect \, .
Thanks.
Code: Select all
\show\,
Code: Select all
> \,=macro:
->\x@protect \,\protect \, .
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
show
can be very helpful, but if i know where a command is comming from, i go to the source and have a look. \,
is defined.Code: Select all
\DeclareRobustCommand{\,}{%
\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi
}
\show
with macros which are robust in the 2e-sense can be a bit frustrating: they usually have definitions like the one you're seeing:Code: Select all
\show\foo
% > \foo=macro:
% ->\protect \foo .
\foo
includes a trailing space! In such cases a trick can help:
Code: Select all
\begingroup
\let\protect\show \foo
\endgroup
\protect
to mean \show
and then call the command.\x@protect
in a way that it eats the following \,
:Code: Select all
\documentclass{article}
\begin{document}
\show\,
% > \,=macro:
% ->\x@protect \,\protect \, .
\begingroup\makeatletter
\let\x@protect\@gobble\let\protect\show\,
% > \, =\long macro:
% ->\relax \ifmmode \mskip \thinmuskip \else \thinspace \fi .
\endgroup
\end{document}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis