\hline
is not meant for use in the
{tabbing}
environment. Internally it uses
\noalign
which cannot be used here and which is why you get the error. You could instead use a standard
\rule
:
Code: Select all
\documentclass[12pt]{report}
\begin{document}
\begin{tabbing}
\rule{\linewidth}{\arrayrulewidth}\\
\textbf{Alg}\=\textbf{orithm 1} Sampling from $PG(1,z)$ \+ \\
\textbf{Input}: $z$ a positive real number\\
\end{tabbing}
\end{document}
You could also define a custom command
\tabrule
for this, maybe with an optional argument for the width:
Code: Select all
\documentclass{article}
\newcommand*\tabrule[1][]{%
\if\relax\detokenize{#1}\relax
\rule{\linewidth}{\arrayrulewidth}%
\else
\rule{#1}{\arrayrulewidth}%
\fi
}
\begin{document}
\begin{tabbing}
\tabrule\\
\textbf{Alg}\=\textbf{orithm 1} Sampling from $PG(1,z)$ \+ \\
\textbf{Input}: $z$ a positive real number\\
\end{tabbing}
\end{document}

- tabbing.png (7 KiB) Viewed 13668 times
Regards