[texhax] Quick question on \hline

Herbert Voss LaTeX at zedat.fu-berlin.de
Wed Aug 2 12:25:28 CEST 2006


James Smith wrote:

> as advised, I'm using the \tabular environment for my psuedo code
> listings which works fine. I want to enclose each listing with a
> horizontal line that goes right across the page. I've tried this...
> 
> \begin{tabular}
> {l>{$}l<{$}>{$}l<{$}}
> \\
> \hline\\
> .
> .
> .
> \\
> \hline\\
> \end{tabular}
> 
> ...but the hline only goes as far across as the code itself, not all the
> way across.
> 
> Is there a way around this?

\begin{tabular*}{\linewidth}
{@{}l>{$}l<{$}>{$}l<{$}@{}}
\\
\hline\\
.
.
.
\\
\hline\\
\end{tabular*}


Herbert




More information about the texhax mailing list