Page LayoutAdjusting Columns width

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
dasatti
Posts: 12
Joined: Sun Sep 09, 2012 5:14 pm

Adjusting Columns width

Post by dasatti »

I am using a twocolumn article class for my document (\documentclass[a4paper,10pt,twocolumn]{article}) and can some body tell me what is the default columns width for this class and what is the default space between the columns? I want my document columns to be 3-1/16 inches (7.85 cm) wide and with a 3/8 inch (0.81 cm) space between them. If these are not the default values please tell me how to adjust my document according to them.

Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Adjusting Columns width

Post by cgnieder »

The columnwidth equals (textwidth - columnsep)/2:

Code: Select all

\documentclass[twocolumn]{article}
\begin{document}

\the\textwidth

\the\columnwidth

\the\columnsep

\end{document}
twocolumn.png
twocolumn.png (2.89 KiB) Viewed 20215 times
From the LaTeX kernel latex.ltx:

Code: Select all

\def \twocolumn {%
  \clearpage
  \global\columnwidth\textwidth
  \global\advance\columnwidth-\columnsep
  \global\divide\columnwidth\tw@
  ...
Regards
site moderator & package author
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Adjusting Columns width

Post by cgnieder »

Here's a possibility how to set the columns:

Code: Select all

\documentclass[twocolumn]{article}
\usepackage{lipsum}% for dummy text
\setlength\textwidth{\dimexpr (3in -1in/16)*2 + 3in/8\relax}
\setlength\columnsep{\dimexpr 3in/8\relax}
\begin{document}

\lipsum

\end{document}
And here's another one:

Code: Select all

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\usepackage[twocolumn,textwidth=16.31cm,columnsep=.81cm]{geometry}

\begin{document}

\lipsum

\end{document}
Regards
site moderator & package author
dasatti
Posts: 12
Joined: Sun Sep 09, 2012 5:14 pm

Re: Adjusting Columns width

Post by dasatti »

Great. It solved my issue. Thank you very much for the help :) .
Post Reply