From ea989b5c9ae9fc20ec7e4238e268e2d7f0e40695 Mon Sep 17 00:00:00 2001 From: Kenneth Odle Date: Sat, 28 Aug 2021 10:45:52 -0400 Subject: [PATCH] Added multiple columns --- README.md | 8 +++++- multiple_columns.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 multiple_columns.md diff --git a/README.md b/README.md index 014be28..b679cfa 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ # latex-notes -A place to keep some notes and demo files. \ No newline at end of file +A place to keep some notes and demo files. + +## My interest in LaTeX + +I'm a designer by nature. One of the earliest jobs I had was working for a printer in college who reprinted old books and other, mostly religious, publications from the late 19th century. What caught my eye was how beautifully they were laid out. Paper and ink (and therefore *space*) were at a premium, so they had to make the most of these resources. + +And they did a wonderful job. I printed thousands of copies of page after page of densely typset text, and yet it was all readable, and well organized. diff --git a/multiple_columns.md b/multiple_columns.md new file mode 100644 index 0000000..51e9625 --- /dev/null +++ b/multiple_columns.md @@ -0,0 +1,73 @@ +# Multiple Columns + +To make an *entire* document render in two columns, just pass the `twocolumn` parameter to the document class: + +``` +\documentclass[twocolumn]{article} +``` + +To achieve finer control over multiple columns, use the `multicol` package. (Extended documentation is [here](https://ctan.org/pkg/multicol?lang=en).) Just add the following to the document's preamble: + +``` +\usepackage{multicol} +``` + +The basic use is: + +``` +\begin{multicols}{3} + +Lorem ipsum + +\end{multicols} +``` + +To include a section which is *not* multiple columns, enclose that text in square brackets: + +``` +\begin{multicols}{3} + +[ +This line will not be in multiple columns +] + +This line and all remaining text will be in three columns. + +\end{multicols} +``` + +## Column Separation + +The distance between the columns is controlled by `\columnsep` in the `\setlength` parameter in the document's preamble: + +``` +\setlength{\columnsep}{0.5in} +``` + +## Unbalanced Columns + +By default, the `multicol` package will do its best to balance all the columns. If you want *unbalanced* columns, then use `multicols*` instead: + +``` +\begin{multicols*}{3} + +This text will have unbalanced columns. + +Lorem ipsum. +\end{multicols} +``` + +## Column Rules + +To insert a vertical line between columns, pass `\columnseprule` to the `\setlength` parameter in the document's preamble: + +``` +\setlength{columnseprule}{1pt} +\def\columnseprulecolr{\color{blue}} +``` + +In order to add colors, be sure to use the `color` package by adding the following to the document's preamble: + +``` +\usepackage{color} +```