# [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

\begin{tabbing}
\begalg
% algorithm here
\end{tabbing}

To improve this, I defined the following:

\newenvironment{algenv}{\begin{tabbing}\begalg}{\end{tabbing}}

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

\begin{algenv}
%algorithm
\end{algenv}

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

Regards,
-Carlos

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

---------------------
\def\ntab#1{\ifcase#1\relax\or\>\or\>\>\or\>\>\>\or\>\>\>\>\or%
\>\>\>\>\>\or\>\>\>\>\>\>\or\>\>\>\>\>\>\>\or\>\>\>\>\>\>\>\>\fi}
\newcount\indentnum \newcount\alglinenum
\def\printlnum{{\footnotesize\oldstylenums{\number\alglinenum}}}
\global\indentnum=0 %
\def\For{{\bf for}\ }
\def\While{{\bf while}\ }

---------------------

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