Last-page column equalization for latex IEEEtran class?

8.7k views Asked by At

In the documentation for the IEEEtran LaTeX class, it's mentioned that the two columns on the last page need to be manually adjusted in order to be balanced (have the same length).

I see that \newpage will allow me to break the first column so the rest of the content is on the second column. This allows for paragraph-level equalization, and looks good, but I'm having trouble with line-level equalization, that is, breaking the column by lines instead of by paragraphs.

When I insert \newpage in the middle of a paragraph (instead of between paragraphs), LaTeX effectively splits the paragraph in two. The second part goes to the top of the second column (as desired) and the first part remains in the first column. There are two issues I've found with this, and I've only solved one of them.

The first issue is that the partial paragraph on the top of the second column is treated by LaTeX as a new paragraph, so it's indented. I fixed this by adding \noindent after \newpage so that it's not indented.

The second issue is that for the partial paragraph in the first column, the paragraph is justified (as expected), but the last line is ragged (no justification). Is there a way to force justification of this last line? LaTeX has environments and commands to disable justification, but I can't find anything to fully justify a paragraph, including the last line.

4

There are 4 answers

2
Nathan Grigg On BEST ANSWER

Two possibilities:

  1. Ending a line with \linebreak will force the line to be justified, no matter how empty it is.

    To do what you are trying to do you could replace \newpage \noindent with \linebreak \newpage \noindent. Note this will create a blank line before the end of the page, which may or may not be a problem. In certain cases it could create an empty page between your pages.

  2. Another option would be \pagebreak. It tells LaTeX to start a new page when you get to the end of the current line. You don't have control of the exact word where the page break occurs.

0
koppor On

(Posting for the googlers landing here)

The quickest solution is

\usepackage{pbalance}

(Package documentation at https://ctan.org/pkg/pbalance?lang=de)

In case that does not work, one can try the special command \IEEEtriggeratref{10}, which adds a column break before reference 10. Replace 10 by the actual number of the reference. See the documentation of IEEEtran, section "XIV. Last Page Column Equalization" for more details).

1
StephenB On

You can adjust the following lengths to make LaTeX fill the last line of a paragraph. Put this in your preamble:

\newcommand{\filllastline}[1]{
\setlength\leftskip{0pt}
\setlength\rightskip{0pt}
\setlength\parfillskip{0pt}
#1}

Then in your document do this:

\filllastline{The text for your partial para in 1st col goes here...}

(For future LaTeX questions you should probable post to https://tex.stackexchange.com/)

1
Boocko On

What about making the last page (column) shorter using

 \enlargethispage{-50mm}

and maybe forcing LaTeX to split after the appropriate line? Of course the amount of shortening should be guessed by trial and error, and re-guessed after changing the text. (Just an idea, may be impossible to implement in your case.)