I wanted to build a little command to show me the different lengths of spaces. Sadly I am having problems with \verb accepting my parameter.
\documentclass{article}
\usepackage{listings}
\begin{document}
% this works:
$I\ I$ \verb|'\ '|
% interpretes the spaces
%\newcommand{\genLine}[1]{$I#1I$ & \texttt{'#1'}\}
% doesn't work with command
%\newcommand{\genLine}[1]{$I#1I$ & \verb|'#1'|\}
% package listings has problems with the ''
\lstset{language=Tex}
\lstMakeShortInline{|}
\newcommand{\genLine}[1]{$I#1I$ & \lstinline|'#1'|\}
\begin{tabular}{rl}
Beispiel & Befehl \ \hline
\genLine{,}
\genLine{:}
\genLine{;}
\genLine{$ $}
\genLine{\ }
\genLine{\enspace}
\genLine{\quad}
\genLine{\qquad}
\end{tabular}
\end{document}