can someone please tell what I’m doing wrong here?
\newcommand{\bc}{\small\begin{verbatim}}
\newcommand{\ec}{\normalsize\end{verbatim}}
and then
\bc
1 3 6 7 89 10
22 7 7 45
\ec
but I get
Runaway argument?
^^M1 3 6 7 89 10^^M 22 7 7 45^^M\ec^^M^^M\section{Reading on\ETC.
! File ended while scanning use of \@xverbatim.
<inserted text>
\par
<*> i4c.tex
?
! Emergency stop.
<inserted text>
\par
<*> i4c.tex
I thought it was pretty safe to do that, since most commands are just text substitutions… any hints?
How
\begin{verbatim}works. briefly and roughly.\begin{verbatim}is expanded to\verbatim.\verbatimsets category code of each special characters to 12.Now all chars is like digits or puncts.
\verbatimsets font, parindent and calls\@xverbatim.\@xverbatimcatches the end of verbatim using the following trick:Then \end{verbatim} finishes work.
How
newcommand{\bc}{\small\begin{verbatim}}works.\bсexpands to\small\begin{verbatim}.\begin{verbatim}expands to\varbatim.\varbatimchanges all categories and font.\verbatimcalls\@xverbatim.\@xverbatimtries to catch your argument using the following trick:but it is impossible because of
\@xverbatimtries to catch\endwhere all letters (\,e,n,d) have the category 12 and 11.But in fact there are only
\ecexsits.\@xverbatimis trying and trying to find\endwhere backslash (\) has category 12 but….File ended while scanning use of \@xverbatim