LaTeX/C3/Inserting-a-Column/English

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

Title of the script: Inserting a Column

Authors: Ambika Vanchinathan, Ketki Bhamble

Keywords: latex, siunitx, table formatting, insert column, vertical lines, pipe symbol, video tutorial.


Visual Cue Narration
Slide 1

Title Slide

Welcome to the spoken tutorial on Inserting a Column.
Slide 2

Learning Objectives

In this tutorial, we will learn to
  • Add a column.
  • Insert vertical lines between table columns.
Slide 3

System Requirements

To record this tutorial, I am using:
  • Ubuntu Linux OS version 22.04 and
  • Texworks version 0.6.6
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. SIunitx-eg2.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.

Now let us begin.
Highlight:

\usepackage{siunitx}

\begin{document}

\begin{table}

\caption{Standard behaviour of the \texttt{S} column type with a column of text \label{tab:S:standard}}

\begin{center}

This line imports the siunitx package.

These lines show a table with a decimal alignment.

Highlight p{5cm}:

\begin{tabular}{l@{}S@{}rp{5cm}}

This command shows paragraph format.

It shows a fixed width of 5 centimetres for the entries of the fourth column.

%\begin{tabular}{|l@{}|S@{}|r|p{5cm}|} This commented line is used for adding vertical lines.

The | (Pipe) symbols add vertical lines to separate the columns.

Highlight:

No. & {Some Values} & Var. & Description\\

This command creates a table with four columns:

Number, some Values, var and Description.

Description column is for explaining the text.

Highlight:

1 & 1 & 1000 & Whole number\\

2 & 1.0 & 1000 & Number with a decimal point in the second column\\

3 & 34.2345 & 100 & Number with a decimal point in the second column\\

4 & -555.12 & & Number with a negative sign and a decimal point\\

These commands show the data in the table.

Each row contains four columns separated by & ampersand.

Click the green Typeset button. Now let’s run the code to see the output.

Here is the output of the code.

Show the code. Let’s comment and uncomment the code to see how the output changes.
Comment line number 10 and uncomment line number 11

show the output.

Let us comment line number 10, and uncomment line number 11.

Let’s run the code.

The output shows vertical lines to separate the columns.

Slide 6

Summary

In this tutorial we will learnt to,

  • Add a column
  • Insert and remove vertical lines between table columns.
With this we come to the end of this tutorial. Let us summarise.
Slide 7

Assignment

As an Assignment

Change the width of the Description column to 7cm.

Slide 8

Thank you

Thank you for joining.

Contributors and Content Editors

Ketkinaina, Madhurig