[texhax] spaces at beginning of environment

Carlos Oliveira coliveira at gmail.com
Tue Dec 28 19:00:10 CET 2004

I wrote a simple macro for algorithms, that I use as

% algorithm here

To improve this, I defined the following:


But now there is a space before the first line of the algorithm when I use


Can you see what is generating this space, and how can I remove it?


The rest of the macros are bellow, if you need to check it;

\newcount\indentnum \newcount\alglinenum
   \global\indentnum=0 %
   \global\advance\alglinenum by1 \printlnum\>\ntab\indentnum}
\def\br{\\\global\advance\alglinenum by1 \printlnum\>\ntab\indentnum}
\def\brp{\global\advance\indentnum by1\br} 
\def\brl{\global\advance\indentnum by-1\br}
\def\For{{\bf for}\ }
\def\While{{\bf while}\ }


Carlos Oliveira
Ind. Engineering and Mgmt
322 Engineering North, OK State University
Stillwater OK, 74078

More information about the texhax mailing list