Difference between revisions of "LaTeX/C3/Adding-Line-Numbers-in-LaTeX/English"
(Created page with "{| border =1 |- || '''Visual Cue''' || '''Narration''' |- || '''Slide 1''' '''Title Slide''' || Welcome to the spoken tutorial on '''Adding Line Numbers '''in '''LaTeX.'''...") |
|||
| Line 1: | Line 1: | ||
| + | Title of the Script: '''Adding line numbers in LaTeX''' | ||
| + | |||
| + | Author: Ambika Vanchinathan | ||
| + | |||
| + | Keywords: LaTeX, lineno package, line numbers, math environments, linelabel, modulolinenumbers, mathlines, video tutorial. | ||
| + | |||
| + | '''Pre-requisite: Writing Style Files in LaTeX''' | ||
| + | |||
| + | |||
{| border =1 | {| border =1 | ||
|- | |- | ||
Latest revision as of 11:51, 1 December 2025
Title of the Script: Adding line numbers in LaTeX
Author: Ambika Vanchinathan
Keywords: LaTeX, lineno package, line numbers, math environments, linelabel, modulolinenumbers, mathlines, video tutorial.
Pre-requisite: Writing Style Files in LaTeX
| Visual Cue | Narration |
| Slide 1
Title Slide |
Welcome to the spoken tutorial on Adding Line Numbers in LaTeX. |
| Slide 2
Learning Objectives |
In this tutorial, we will learn to
|
| Slide 3
System Requirements
|
To record this tutorial, I am 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 files are required to practice this tutorial: 1. lineno-eg.tex
|
The following code file is required to practice this tutorial.
|
| Let us get started. | |
| Highlight:
\usepackage{lineno} |
This command loads the line number package.
It is recommended to keep the installation up to date.
|
| Highlight:
\linenumbers
|
\linenumbers command enables printing line numbers on the document.
Click the green Typeset button to run the code. Output shows the line numbers printed on all lines except the math equations.
|
| Comment line 5
Uncomment line 7 Click the green Typeset button and show the output |
Comment line 5
Uncomment line 7 Run the code to see the output.
|
| Highlight:
line 7 |
Option [mathlines, displaymath] with
\usepackage{lineno}, enables line numbers in math environments.
|
| Uncomment lines 23, 49
Click the green Typeset button and show the output |
Uncomment lines 23 and 49.
Run the code Here we must compile the code twice. In the first run we see question marks. That is, the first run assigns line numbers. The second run fixes the references.
Let us compile again. Here is the output after the second compilation. Observe the line number and page number reference at the end of the document. |
| Highlight:
line 23, 49 |
\linelabel command labels the line number.
|
| Uncomment line 17
Click the Typeset button and show the output |
Uncomment line 17.
Run the code Here is the output. We see that line numbers are printed after every 5 lines. |
| Highlight:
line 17 |
Command \modulolinenumbers[5]
enables line numbering in steps of 5. We can change the number 5 to reset to a required jump. |
| Uncomment line 14
Click the Typeset button and show the output |
Uncomment the line 14.
Run the code. Here is the output. |
| Highlight:
line 14
|
We can see that the font color and size of the line numbers have changed.
|
| Slide 6
Summary
|
With this we come to the end of this tutorial.
Let us summarise.
|
| Slide 7
Assignment |
As an Assignment,
Print line numbers after every 3 lines in blue colour. |
| Slide 8
Thank you |
Thank you for joining |