LaTeX two column layouts and rubber lengths

Today I gave my advisor the draft of the final chapter of my dissertation, which I have been working on fervently for the last week or so. I decided that I deserved a little break before getting back to the grindstone of implementing comments from my advisor. I decided to spend some time working on the two column layout of my dissertation.

Two columns! You may be thinking that I am crazy. Certainly my institution wouldn’t allow me to use a two column layout for my dissertation! That is indeed correct. The requirements set by the University of Michigan produce a pretty ugly document — one-sided, double-spaced (or 1.5), and running headers aren’t allowed. They actually don’t specify if you can use two columns or not, but I didn’t even bother asking, because I am pretty certain the answer is no. Now, just because the official copy that I hand in has to look boring doesn’t mean that I can’t make a nice copy for myself, and for other people I give a copy, like the members of my committee. And with LaTeX, that is relatively easy to do.

original format two column format
one column layout one column layout

Many scholarly journals, especially scientific journals use a two column layout. There are good reasons for this. When reading text, one of the most difficult tasks is to move down a line. Most languages of the world (but not all) are read either right to left or left to right, which means that moving down a line means moving your eyes all the way across the width of the text. As the width of a text gets wider, so does this task. For this reason, many books use relatively small paper. A common novel usually has paper sized about 6in x 8in. This is fine for books which are professionally printed, but the printing of a dissertation is usually restricted to standard 8.5 x 11 inch paper. Having a one column format (with reasonable margins of 0.5 to 1 inch) on 8.5 x 11 inch paper is very hard to read. A two column layout is much easier for readers.

For the most part, making a two column layout in LaTeX is extremely easy. Simply specify twocolumn in the document class definition:


GeSHi Error: GeSHi could not find the language tex (using path /home/robfelty/robfelty.com/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

However, one quickly notices that some things need adjusting. First off, equations, figures, and tables which are too wide to fit in one column need to be specified as double column width. For figures and tables, simply use table* and figure* environments. Equations can be a bit trickier, but luckily I didn’t have any really long equations. In addition, using table* in a one-column document doesn’t have any effect, which makes it very easy to switch back and forth between one and two column layouts. (Note that LaTeX only allows two-column floats at the top of the page by default, though some different class files, such as JASAtex, get around this somehow).

Some of the main jobs of LaTeX are:

  1. format text into fully justified paragraphs, hyphenating when necessary
  2. Break pages at appropriate places (i.e. don’t start a new section at the bottom of a page, or leave one line stranded on an otherwise blank page
  3. place tables and figures in appropriate positions

In a two column layout, all of these jobs get a little trickier. LaTeX uses several parameters which controls the behavior of the processes that handle these jobs. LaTeX realizes that hyphenating words at line breaks should be avoided if possible, but sometimes it is necessary in order to have justified text which has approximately equal inter-word spacing. In a two column layout, each column usually has fewer characters than in a one column layout, which means that more words will be hyphenated. If you don’t like this, you can increase the \hypenpenalty, which will cause LaTeX to hyphenate fewer words, and instead be a little sloppier about inter-word spacing


GeSHi Error: GeSHi could not find the language tex (using path /home/robfelty/robfelty.com/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

You may also wish to alter float placement a bit. By default, LaTeX puts figures and tables on their own page if they take up more than 70% of a page, and says that float pages should be at least 70% full of floats. I would prefer to squeeze a bit more onto a page, so I increase these values a bit:


GeSHi Error: GeSHi could not find the language tex (using path /home/robfelty/robfelty.com/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

There are a few more parameters which you can tweak to save a little space. Now that we have big floats on a page, we might need to make a little more room for text, so we can decrease the textfloatsep from the default value of 20pt


GeSHi Error: GeSHi could not find the language tex (using path /home/robfelty/robfelty.com/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

Now those rubber lengths. Notice that the above lengths include plus and minus. What this says is that the dbltextfloatsep should be 9pt, but can be anywhere between 6pt and 14pt. Rubber lengths allow LaTeX to adjust spacing (in this case vertical spacing), to make better page breaks. Looking at the code from the standard book.cls, we will also find rubber lengths in the definition of sectioning commands, e.g.:


GeSHi Error: GeSHi could not find the language tex (using path /home/robfelty/robfelty.com/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

While I still have yet to find exactly what all this means, I am pretty sure that the two middle lines specify how much space should come before and after the section heading. This says that there should be between -4.5ex and -3.3ex before the heading, and 2.3ex to 2.5ex after the heading, before the beginning of the section text. It also says that the font of the heading should be Large and bold. While this looks quite nice by default, I found the spacing too large for a two column layout, so I redefined some of these commands:


GeSHi Error: GeSHi could not find the language tex (using path /home/robfelty/robfelty.com/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

Notice that for subsubsection, the lengths seem to be reversed, in that the first length is positive, and the second is negative. This has the effect that the heading is placed on the same line as the text, instead of on a separate line. Paragraphs and subparagraphs are formatted like this, but I wanted it for subsubsection, which is the lowest level of sectioning I use in my dissertation.

I made one additional modification to all these parameters. The default space between columns seems to be about .1in, which is not very much. I increased this to .25in.


GeSHi Error: GeSHi could not find the language tex (using path /home/robfelty/robfelty.com/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

With just a little tweaking, I turned the default formatting into a very professional looking document.

Addendum — equations

Several people have asked about how to handle long equations. There is no great way, and it will depend on your equation. If you absolutely need the whole page, you have to put the equation in a figure* or table* environment, which means that it can only appear at the top of a page. Other options are to split the equation up into multiple lines, make the font a bit smaller, or go into the margins a bit. I used all of these techniques for one equation in my dissertation. Here is the code:


GeSHi Error: GeSHi could not find the language tex (using path /home/robfelty/robfelty.com/wp-content/plugins/codecolorer/lib/geshi/) (code 2)

And the resulting output.

screenshot of a long equation

screenshot of a long equation that uses the margins a bit, has smaller font, and uses multiple lines

It is not perfect, but I am pretty happy with the results.

This entry was posted in latex. Bookmark the permalink.

55 Responses to LaTeX two column layouts and rubber lengths

  1. Yiannis says:

    Love the article! Great work Rob!

  2. boovetses says:

    [url=http://us.startv.com/synopsis/laughter-ke-phatke-synopsis]hips and thighs diet[/url] ocellaris clownfish diet diet plan for a runner [url=http://us.startv.com/shows/saath-nibhaana-saathiya]eat of blood type diet a[/url] using ensure for a diet liquid shake diets [url=http://us.startv.com/shows/laughter-ke-phatke]dietetics studies[/url] weight loss program for teenagers in mississippi weight watchers how points lose weight [url=http://us.startv.com/gallery/best-mjht-10]diet stalls[/url] balanced diets for athletes articles on dietary supplements [url=http://us.startv.com/shows/behenein]how t olose stomach fat without diet[/url] natural diet recipes consumer reviews best diet pills [url=http://us.startv.com/synopsis/karishma-kapoor-film-festival]song from diet coke with lime commercial[/url] ibs dietary guidelines a healthy diet at [url=http://us.startv.com/synopsis/master-chef-india]urge incontinence diet[/url] braks diet smoothie for weight loss [url=http://us.startv.com/shows/baa]suppressant diet[/url] first national bank of dieterich biliary colic diet [url=http://us.startv.com/gallery/odhani-ep-70]christianity dietary laws[/url] broccoli diet brain mediterranean diet daily menu [url=http://us.startv.com/shows/premjyotish-koffee-karan-3]raquel welchs diet secrets[/url] chinese weight loss on abc change in stool color while on diet [url=http://us.startv.com/character/geet]diet as tolerated for dengue patient[/url] monaslim diet pill no rx order weight loss clinical research [url=http://us.startv.com/gallery/nupur-returns-2]dieta gastrite[/url] diaic diet donts weight gain diet plan for women [url=http://us.startv.com/node/7/shows]post pardom diet[/url] jewish dietary laws origin dietary level [url=http://us.startv.com/character/ye-ajnabbi-characters]la weight loss eating[/url] lo carb diet menstral cycle carol vorderman 30 day cellulite diet
    [url=http://dnpig.com/viewtopic.php?f=3&t=8264]healthy mexican diet plans dietetica a [/url]
    [url=http://www.cvlocal.com/forum/showthread.php?p=416518#post416518]are there safe diet pills diet mountin dew [/url]
    [url=http://zivot.surikata.cz/viewtopic.php?p=9595#9595]loss 10 pound diet n diethyl p phenylenediamine [/url]
    [url=http://businessideasprofitable.com/hunts-forum-to-understand-new-lep/comment-page-1#comment-56261]diet food delivered bonita california best lifed diet mag [/url]
    [url=http://stjohntravelforum.com/new/viewtopic.php?f=40&t=33&p=2279#p2279]37.5 diet mg phentermine pill modified fat diet [/url]

  3. Sooxiahix says:

    Tele Medicine Coordinator Job Description http://www.stampingallery.com/ – seroquel quetiapine Buy cheap Seroquel (Quetiapine) without a prescription. No hidden fees! [url=http://www.stampingallery.com/]seroquel xr[/url]

  4. Thanks for every other informative site. Where else may I am getting that type of information written in such an ideal approach? I’ve a challenge that I’m simply now running on, and I have been at the look out for such information.

  5. I loved up to you’ll receive carried out proper here. The sketch is attractive, your authored material stylish. however, you command get bought an nervousness over that you would like be turning in the following. sick unquestionably come further until now again since precisely the same just about very steadily within case you shield this increase.