Here’s an annoying longtable bug for those of you using LaTeX for a living. Sometimes, but rarely so, a longtable will break at the oddest places when using horizontal lines (hline), including right after the header. The solution is to define a special kind of hline called “nobreakhline” and use that instead where you don’t want any page breaks.


\makeatletter
\def\nobreakhline{%
\multispan\LT@cols\unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr
\noalign{\penalty10000}}
\makeatother

No Comments »

No comments yet.

Leave a comment

Warning: When entering a long comment, please ensure that you make copy of your text prior to submitting it. If the server should fail or if you hit a bug, you might lose your work. I am not responsible for your lost effort.

To spammers: I carefully review every single post and make sure that spam gets deleted. You are wasting your time if you are manually entering spam using this form. Read my terms of use to see what I consider to be abusive.

Example: duo plus septem is '9'. The numbers are expressed in latin numerals but you should give your answers using ordinary digits.

 

« Blog's main page

Powered by WordPress