I have a document that uses twocolumn with scrbook. How can I set the width of the space between the two columns?
-
Why was there a -1 vote? – raphink Feb 29 '16 at 20:25
3 Answers
Use \setlength{\columnsep}{<width>} in the preamble of your document, i.e. before \begin{document}.
Changing \columnsep also works if you use the multicol package.
- 29,535
- 250,273
-
3I used \setlength{\columnsep}{5 in} but it didn't make any difference. I'm a beginner to latex. I think there's a problem with dimensions. Please help. – meteors Aug 27 '13 at 05:00
-
1In the case of the
multicolpackage, the\setlengthcommand need not necessarily appear in the preamble; it can appear inside the body as well, as long as it precedes the\multicolsormulticols*environment that it is intended to apply to. Consider, for instance, a document with two\multicolsenvironments. These environments can have different inter-column spaces, but then the\columnsepparameter must be set inside the body. – Evan Aad Jun 11 '17 at 09:19 -
3Thank you, but no matter where in the document I set it—in the preamble, in the body, before the environment, after the environment (which wouldn't make sense anyway, but I tried it just in case)—this command has no effect on my document. The columns always stay quite far apart. Nor does setting the width make a difference, as suggested by Muaz Khan below. I am using \begin{multicols}{3}. – Vincent Oostelbos Sep 25 '17 at 11:54
I ran into this problem earlier today. As Mauz Khan and Evan Aad note, the solution of adding \setlength{\columnsep}{<width>} to the preamble or in the body (prior to starting the multicol environment) does not always work. If you are in certain modes (Beamer, for instance) where \usepackage{multicol} is being called in your .sty file (rather that in the preamble of your actual document), modifying \columnsep in your document's preamble will not work. In this case, you would need to modify the length in the preamble of the .sty file by adding \setlength{\columnsep}{<width>} there instead, rather than in your document.
I hope this helps someone else! Perhaps its more of a comment, but this is what I am limited to.
- 141
-
-
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review – Bobyandbob Mar 24 '18 at 20:25
-
Hi @Bobyandbob, I think it is worth leaving here because the accepted answer will not work in all cases, as I have noted above. Sorry for the ambiguity! – NWaters Mar 24 '18 at 22:55
-
If you set it to a negative value, e.g.
\setlength{\columnsep}{-3.0mm}
it should work.
– Tony Power Dec 07 '18 at 13:41