[texhax] pagewise linenumbers, \include, and multicols

Steve Schwartz s.schwartz at imperial.ac.uk
Sun Mar 25 13:44:23 CEST 2007


I have hit an obscure bug/incompatibility (?) illustrated by the
appended source. It seems. The minimal conditions to reproduce the
behaviour seem to be:

use packages:
[pagewise]{lineno}    % running linenumbers are ok
{multicol}

use:
\tableofcontents
\include inside the multicols without any non-included (initial?) text.

This combination results in latex hanging during processing (after the
1st run-through); interrupting reveals that it is stuck at the
\tableofcontents line. Now that I've found this, I can work around, but
it took some serious detective work to isolate this :-)

Steve

Here's the main file:

\documentclass{article}

\usepackage[pagewise]{lineno}   %works ok without pagewise
\linenumbers
\usepackage{multicol}
\newcommand{\blah}{This is a line of text and another to test various
things I can't get to work. }

\begin{document}

\tableofcontents

\begin{multicols}{2}

Hello  % if you remove this, latex will hang trying to typeset
       % the tableofcontents
\include{sec3}
\include{sec4}
\end{multicols}
\end{document}

while the included files look like:

sec3.tex:
\section{Sec 3}
\blah \blah \blah\par \blah \blah \blah

sec4.tex:
\section{Sec 4}
\blah \blah \blah\par \blah \blah \blah



-- 
+-------------------------------------------------------------------+
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