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?
- 769
2 Answers
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:
\sloppywill be in effect,- the default value of
\parindentwill be1em, \textwidthwill be set to either469pt(USLetter, ca. 6.49") or452pt(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
\sloppywill not be in effect by default,- the default value of
\parindentwill be 15pt, and \textwidthwill be set to345pt(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.
- 506,678
Beside that some format defaults changed (as explained in Mico's answer), it is worth to note that:
The document class
twocolumnoption can be used only once, but you switch between\twocolumnand\onecolumnas 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 columnsto switch from one to two columns in the same page, without using themulticolpackage. Note that you cannot include some commandsas \chapter{}of the standard book class in the optional argument, but it works inscrbookormemoirclass with thearticleoption.
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}
- 80,769
-
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 05: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 likeasdfasfdsdfsfasfasdfsfasdfto 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:
http://pastebin.com/Kxn2xMtZ
I gave it one week of retention time.
– djnavas Oct 21 '16 at 00: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 01:26
-
1@djnavas 1) You cannot use
\chapterin a article document class 2) Use{\bfseries ...}for several praragrahs in bold, not\textbf{ ....}. 3)\bigskipand\hruleare defined even in theminimaldocument 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 thebabelpackage!. The packagemicrotype also help a lot when there are a small text width to avoid a overfull\hbox`. – Fran Oct 21 '16 at 03:50 -
@djnavas The comments are not the place to solve new problems due to new code not related with the question or the answers. If you see yourself stuck with error, first search here in TeX.SX for some people asking with similar problems. If you do not find the right question & answer, then open a new question for the problem (only a problem per question, please). – Fran Oct 21 '16 at 04:02

\twocolumnaffects only a specific part of your document – Yorgos Oct 01 '16 at 11:46