10

I have observed when using flushend package to balance the references at the last page, if at the same time the package linenois loaded, the last page of reference will not be displayed. I have tested using \twocolumn document with default package option for lineno.

As soon as I remove either flushend or lineno package definition, the thing go well! Is there any incompatibility between these two packages?

In the following MWE, the last page will be gone if you include the lineno package:

\documentclass{article}

\twocolumn
\usepackage{lipsum}
\usepackage{flushend}
\usepackage[switch]{lineno}
\linenumbers

\begin{document}

\lipsum

\end{document}

EDIT:
Is there any other way I can balance the columns at the last page without using flushend and balance and multicol packages? multicol with \twocolum will not result in nice output, if I use \onecolum before \begin{multicols} it will create new page, which I dont want.

4
  • 2
    Please (always) make a small example document that shows the problem. Commented Oct 7, 2013 at 23:23
  • Yes, they appear to be incompatible. Both are meddling with output routines. Commented Oct 8, 2013 at 7:56
  • 1
    Is there any other way I can balance the columns at the last page without using flushend and balance packages?
    – M.Reza
    Commented Oct 8, 2013 at 19:50
  • Crosslink: tex.stackexchange.com/questions/688370/… contains a solution using pbalance package.
    – user202729
    Commented May 7 at 6:04

1 Answer 1

4

Unfortunately, as you observe flushend does not work well with lineno. On the other hand, the lineno package does include specific code to cope with multicol. So I suggest you use mulitcol for the whole document insead of \twocolumn. To allow space for the line numbers, you should increase the space between the columns by setting \columnsep:

Sample output

\documentclass{article}

\usepackage{lipsum}
\usepackage{multicol}
\usepackage{lineno}
\linenumbers

\setlength{\columnsep}{4em}
\begin{document}

\begin{multicols}{2}
  \lipsum
\end{multicols}

\end{document}
2
  • 1
    Thank you for the reply Andrew. There are several reasons I prefare \twocolumn or multicol. table and figure won't display correctly and need modification. Moreover, the document won't look good after changing to multicol which will take quiet a while to fix every part. BTW, is there any way to switch to \onecolumn without incurring a page break?!
    – M.Reza
    Commented Oct 10, 2013 at 7:35
  • I understand. A command \myonec defined as \makeatletter \def\myonec{\global\columnwidth\textwidth \global\hsize\columnwidth \global\linewidth\columnwidth \global\@twocolumnfalse \col@number \@ne \@floatplacement} \makeatother will switch to one column without page break, but behaves badly with respect to floats, and I don't see how it helps your situation. Commented Oct 10, 2013 at 9:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .