Browse Source

Added multiple columns

main
Kenneth John Odle 3 years ago
parent
commit
ea989b5c9a
  1. 8
      README.md
  2. 73
      multiple_columns.md

8
README.md

@ -1,3 +1,9 @@
# latex-notes # latex-notes
A place to keep some notes and demo files.
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.

73
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}
```
Loading…
Cancel
Save