[texhax] Quick question on \hline

Steve Schwartz s.schwartz at imperial.ac.uk
Wed Aug 2 11:10:22 CEST 2006


\hlines are designed to fit your table's natural width, so you either
need to make your tabular environment fill the whole width of the page
(e.g., by using a p{...} column specifier to specify the width of each
column), or draw your line outside your tabular environment using \rule,


(these lines are probably too think, but you can make them any size you
like by adjusting the length (1st argument) and thickness (2nd


On Wed, 2006-08-02 at 09:15 +0100, James Smith wrote:
> Hi all,
> 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?
> Kind regards,
> Jim
Professor Steven J Schwartz      Phone: +44-(0)20-7594-7660
Space and Atmospheric Physics    Fax:   +44-(0)20-7594-7772
The Blackett Laboratory          E-mail: s.schwartz at imperial.ac.uk
Imperial College London          Office: Huxley 6M70 
London SW7 2BW, U.K.             Web: http://www.sp.ph.ic.ac.uk/~sjs

More information about the texhax mailing list