Site icon texblog

Adding a column separator line and extra space between columns in LaTeX

Documents with two columns are very popular, especially in academic publishing. In other scenarios, it may be desirable to have three or even more columns. In this brief post, I show how to add a separator line between columns as well as how to adapt the space between columns, for a better visual separation of the content.

 
Adding a separator line between columns

By default, there is no separator line between columns, neither with the twocolumn option nor with the multicol package. In practise, this is because the width of the separator line is set to zero by default (0pt).

Therefore, to add a separator line it suffices to change the width of the column separator rule using the \setlength macro. Its width would usually be a small number in points, for example: 0.4pt or 1pt. The following figures illustrate this for two columns with the twocolumn option and for three columns with the multicol package. A minimal example is given below each figure.

 

 
Code

\documentclass[11pt,twocolumn]{article}
\usepackage{blindtext}
\setlength{\columnseprule}{0.4pt}
\begin{document}
\blinddocument
\end{document}

 

 
Code

\documentclass[11pt]{article}
\usepackage{blindtext, multicol}
\setlength{\columnseprule}{1pt}
\begin{document}
\begin{multicols}{3}
\blindtext
\end{multicols}
\end{document}

 
Changing space between columns

The space between columns is defined by the length of \columnsep. To modify it, we use the \setlength macro again. Similarly to the previous examples, this works for two columns with the twocolumn option set and for two or more columns with the multicol package.

 

 
Code

\documentclass[11pt,twocolumn]{article}
\usepackage{blindtext}
\setlength{\columnseprule}{0.4pt}
\setlength{\columnsep}{3em}
\begin{document}
\blinddocument
\end{document}
Exit mobile version