Difference between revisions of "LaTeX/C3/Changing-Page-Layout/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with "Title of the Script: '''Changing Page Layout in LaTeX'' Author: Ambika Vanchinathan Keywords: LaTeX, geometry package, page layout, newgeometry, geometry, restoregeometry, s...")
 
Line 1: Line 1:
Title of the Script: '''Changing Page Layout in LaTeX''
+
'''Title of the Script: Changing Page Layout in LaTeX'''
  
Author: Ambika Vanchinathan
+
'''Author: Ambika Vanchinathan'''
  
Keywords: LaTeX, geometry package, page layout, newgeometry, geometry, restoregeometry, showframe, margins, video tutorial
+
'''Keywords:''' LaTeX, geometry package, page layout, newgeometry, geometry, restoregeometry, showframe, margins, video tutorial
  
 
{|border=1
 
{|border=1

Revision as of 13:33, 19 September 2025

Title of the Script: Changing Page Layout in LaTeX

Author: Ambika Vanchinathan

Keywords: LaTeX, geometry package, page layout, newgeometry, geometry, restoregeometry, showframe, margins, video tutorial

Visual Cue Narration
Slide 1

Title Slide

Welcome to the spoken tutorial on Changing Page Layout in LaTeX.
Slide 2

Learning Objectives

In this tutorial, we will learn to:
  • Use the geometry package
  • Change page dimensions and margins
  • Display page frames
  • Use newgeometry or restoregeometry for dynamic layout changes
Slide 3

System Requirements

To record this tutorial, I am using:
  • Linux Mint OS version 21.3
  • 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. geometry-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:

\usepackage{geometry}

The command \usepackage{geometry} imports the geometry package.
Click the green Typeset button and show the output Here is the output
Highlight:

line 8 to 11.

Here, \geometry{} command :

sets the page size to A4;

the text width to 12 cm;

and the text height to 19 cm.

This command should be placed before the

\begin{document} in the preamble.

Since it modifies the page layout parameters, such as paper size, orientation etc.,

These must be set before the document starts rendering.

Uncomment line 13 Let us uncomment line 13.
Highlight:

line 13

Click the green Typeset button and show the output

Option {showframe=true} with \geometry displays page frame.

It shows text area, marginsep, marginwidth, footskip, headsep, header etc

Run the code to see the output.

The document now shows margins and page layout.

Point the cursor to Marginsep

Point the cursor to Marginwidth

Point the cursor to footskip

Point the cursor to headsep

Point the cursor to headerin the output pdf file.

Marginsep is the space between the main text area and the margin notes.

Marginwidth controls the width of the margin note area.

footskip is the distance between the bottom of the text body to the footer.

headsep is the vertical space between the header and the main text body.

header is the space at the top of a page, above the main text area.

Note the options with \geometry{} keep getting added to the previous ones.

Uncomment line 15 Let’s uncomment the line 15.
Highlight:

line 15

left=1.5in,

top=1.5in,

twocolumn

Sets the left margin of the page to 1.5 inches.

Sets the top margin of the page to 1.5 inches.

Sets the page layout to two columns like in newspapers or journals.

Click the green Typeset button and show the output Run the code to see the output.

We see the left and top margins set as specified.

The page is displayed in two column format.

Comment 6, 8, 9, 10, 11, 13, 15 Now comment the lines 6, 8, 9, 10, 11, 13, and 15.
Uncomment line 17 Uncomment the line 17.
Click the green Typeset button and show the output Run the code to see the output.
Highlight:

line 17

To simplify, we replaced earlier commands with a single command.

Since the output remains unchanged, the previous commands are redundant.

Uncomment line 42 Uncomment the line 42
Highlight:

line 42

\newgeometry{} command dynamically changes the page layout within the document.

It redefines the page geometry from the point it is used onward.

Click the green Typeset button and show the output Run the code.

The layout changes from the second page onwards.

Notice the paragraph format on page two.

Uncomment line 51 Uncomment the line 51
Highlight:

line 51

\restoregeometry restores the previous setting.

This command has no arguments

All the text after this command changes to the original set-up

Click the green Typeset button and show the output Run the code.

Notice that the third page in the output returns to the two-column layout.

Slide 6

Summary

In this tutorial we have learnt to:

  • Use the 'geometry package
  • Change page dimensions and margins
  • Display page frames
  • Use newgeometry or restoregeometry for dynamic layout changes
With this we come to the end of this tutorial.

Let us summarise.

Slide 7

Assignment

Create a LaTeX document with:

  • Page size: A4
  • Text width & height: 11cm, 21cm
  • Left margin & Top margin: 1 inch each
  • Show frame
As an Assignment please do the following.
Slide 8

Thank you

Thank you for joining

Contributors and Content Editors

Ketkinaina, Madhurig