LaTeX/C3/Typesetting-Text-in-Multiple-Columns/English

From Script | Spoken-Tutorial
Jump to: navigation, search

Title of the Script: Typesetting Text in Multiple Columns

Author: Ambika Vanchinathan

Keywords: LaTeX,  multicols, columnbreak, column seprule,  multicols*, column seprulecolor,  two-column, video tutorial

Visual Cue Narration
Slide 1

Title Slide

Welcome to the spoken tutorial on Typesetting Text in Multiple Columns.
Slide 2

Learning Objectives

In this tutorial, we will learn to
  • Create multi-column text layouts
  • Add and customize column separation lines
  • Implement unbalanced columns using multicols*
  • Insert manual column breaks
Slide 3

System Requirements

To record this tutorial, I am using:

  • Linux Mint OS v21.3
  • Texworks v0.6.6
To record this tutorial I’m using the following setup.
Slide 4

Pre-requisites

To follow this tutorial, learners should have basic knowledge of LaTeX.
Slide 5

Code files

The following code file is required to practice this tutorial:

1. multicols-eg.tex

This file is provided in the Code Files link of this tutorial page.

The following code file is required to practice this tutorial

This file is provided in the Code Files link of this tutorial page.

Let us get started.
Highlight: Line 5

\usepackage{multicol}

This command imports the multicol package.It allows us to typeset text in multiple columns within a page.
Highlight: Line 14

{mutlicols}

Highlight: lines 14 to 17

Highlight: \section

Point to the parameters and the optional bracket

The multicols environment accepts two parameters:
  • The number of columns (up to 10)
  • An optional header text

Here, we used \section command and a paragraph inside the optional brackets.

Click the green Typeset button and show the output Click the green Typeset button to run the code.

Here is the output.

The text in the document is typeset using the multicols environment as:

  • a single paragraph,
  • two columns and
  • three columns simultaneously
Uncomment the line 8 Let’s uncomment line 8.
Highlight: Line 8 \columnseprule separates the columns using lines.
Run the code and show the outputPoint the cursor on black column separation lines. Let’s run the code

The output shows column separation lines in black.

Uncomment the lines 6, 9 Uncomment lines 6 and 9.
Highlight:

Line 9

\def\columnseprulecolor{\color{red}}

\usepackage{color}

This command generates the column separation lines in red colour.

We have loaded the \usepackage{color} in the preamble.

Run the code and show the output Run the code.

We can see that the colour of the lines has changed to red.

Change {3} to {5} in line 28.

Run the code

Change {3} to {5} in line 28

Run the codeWe see five columns instead of 3 columns.

Change 5 to 3 in line 28

Run the code

Revert back to 3 in line 28

Run the codeIt is now back to the original 3 columns

Comment the lines 28, 41

Uncomment the lines 29, 40

Comment lines 28 and 41.

Uncomment lines 29 and 40.

Highlight:

Lines 29, 40

Highlight:

line 14.

multicols* environment fills each column completely.

Here columns are not adjusted to the same height.

Whereas, multicols environment fills all the columns simultaneously to the same height.

Run the code and show the output Run the code.

The output shows that the columns are not filled to the same height.

Uncomment the line 33

Run the code and show the output

Uncomment line 33

Run the code to see the output.

Highlight: line 33 \columnbreak forces text to break manually at that point.

The text continues in the next column.

Slide 6

Summary

In this tutorial, we have learnt to

  • Create multi-column text layouts
  • Add and customize column separation lines
  • Implement unbalanced columns using multicols*
  • Insert manual column breaks
With this we come to the end of this tutorial.

Let us summarise.

Slide 7

Assignment

Create a document with

  • One 2-column section with a header
  • One 3-column section without a header
  • Colour the separation lines using the color of your choice.
As an Assignment, please do the following
Slide 8

Thank you

Thank you for joining

Contributors and Content Editors

Ketkinaina