17

what is the difference between \twocolumn and \documentclass[twocolumn]{book}? when I use \twocolumn , the line spread seems smaller?(compare with the same document using \documentclass[twocolumn]{book}) why?

  • 1
    I believe that twocolumn option affects your whole document, whereas \twocolumn affects only a specific part of your document – Yorgos Oct 1 '16 at 11:46
20

If you specify the document class option twocolumn, and if use the book document class, a default font size of 10pt, and paper size of A4 or USLetter, the entire document will be typeset in two-column mode, and also:

  • \sloppy will be in effect,
  • the default value of \parindent will be 1em,
  • \textwidth will be set to either 469pt (USLetter, ca. 6.49") or 452pt (A4paper, ca. 6.25").

(The widths of the margins will depend on whether oneside or twoside is in effect.)

If you do not specify this document class option but issue the instruction \twocolumn, either in the preamble or somewhere in the body of the document, the subsequent material will be typeset in two-column mode (with a page break inserted first, if necessary), but

  • \sloppy will not be in effect by default,
  • the default value of \parindent will be 15pt, and
  • \textwidth will be set to 345pt (ca. 4.77").

Oh, and the distance to the margin block is also affected by the presence or absence of the twocolumn option.

Of course, default page parameters can be overridden, e.g., via the macros and options of the geometry package.

9

Beside that some format defaults changed (as explained in Mico's answer), it is worth to note that:

  • The document class twocolumn option can be used only once, but you switch between \twocolumn and \onecolumn as you want, on a per-page basis (i.e., you cannot switch in the middle of a page, this always cause a page break).

  • Nonetheless, you can use \twocolumn[text in one colum] text in two columns to switch from one to two columns in the same page, without using the multicol package. Note that you cannot include some commands as \chapter{} of the standard book class in the optional argument, but it works in scrbook or memoirclass with the article option.

Example:

\documentclass[a4paper]{scrbook}
\usepackage[margin=1in,columnsep=.8cm]{geometry}
\usepackage{lipsum,microtype}
\begin{document}
\twocolumn[\chapter{Nice chapter with long title and summary}
\hrule\bigskip {\lipsum[1]}\bigskip\hrule\bigskip]
\lipsum[2-6]
\end{document}

mwe

  • I used the example without lipsum and adding for instance \textbf or \texttt and does not work. In the first case, text is boldfaced outside the text between braces and in the second case, can't adjust the text to the right margin protuding into the second column. – djnavas Oct 12 '16 at 5:39
  • @djnavas I can change {\lipsum[1]}by \textbf{bla bla ... bla} or \texttt{bla bla ... bla} without any problem. You're making something else wrongly, as using unbreakable long words like asdfasfdsdfsfasfasdfsfasdf to test the code. – Fran Oct 12 '16 at 11:46
  • my example is too long for a 600 character comment. I leave this link to a code that exemplifies what I try to expose to you: pastebin.com/Kxn2xMtZ I gave it one week of retention time. – djnavas Oct 21 '16 at 0:15
  • I supressed the bold face problem, changing \textbf{... paragraph ... paragraph} with {bfserires ... paragraph ... paragraph ...}, but persists other problems: a) "undefined control sequence" due to \bigskip\hrule\bigskip, even if replace \hrule with \hrulefill; b) several overfull boxes of 5, 18 and 56 pt too wide in paragraph. – djnavas Oct 21 '16 at 1:26
  • 1
    @djnavas 1) You cannot use \chapter in a article document class 2) Use {\bfseries ...} for several praragrahs in bold, not \textbf{ ....}. 3) \bigskip and \hrule are defined even in the minimal document class, so this error should be due to another comands ... Maybe \chapter? 4) You have many overfull boxes because words LaTeX does not know what languages are you using, and therefore words are not hyphenated. Use the babel package!. The package microtype also help a lot when there are a small text width to avoid a overfull \hbox`. – Fran Oct 21 '16 at 3:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.