When I submitted my first major college report to Advanced College of Engineering and Management, it came back rejected. Not because of the content—my research was fine. The formatting was wrong.

Specifically: margins.

My college requires 1.25 inches on the left side for binding, and 1 inch on the top, bottom, and right. I had 1 inch everywhere because I didn’t know you could set different margins for each side. The binding ate into my text when they printed and bound it.

That’s when I learned: in academic and professional documents, page layout isn’t just aesthetic—it’s a requirement. And unlike Microsoft Word where you click through menus hoping to find the right setting, LaTeX gives you precise control over every aspect of page layout.

Since then, I’ve formatted multiple reports, project documentation, and even my CV in LaTeX. Each required different layouts—different margins for binding, custom headers for chapters, specific page numbering schemes. LaTeX handles all of it, once you know the commands.

Let me show you exactly how to control margins, headers, footers, and page numbering in LaTeX, using real examples from documents I’ve actually built.


Why Page Layout Actually Matters

Before diving into commands, let me explain why this matters beyond “it looks professional.”

Submission Requirements

My college reports need:

  • 1.25″ left margin (for binding)
  • 1″ top, bottom, right margins
  • Page numbers in footer, centered
  • Chapter titles in header
  • No page number on title page

Get one wrong? Rejected. Resubmit. Delayed grade.

Readability

Proper margins and spacing make documents easier to read. Too narrow? Text feels cramped. Too wide? Lines become too long, eyes get tired.

Real experience: My Gold Price Prediction report was 25 pages. With proper line spacing and margins, readers (professors, project evaluators) actually read it. Bad layout? They skim.

Professional Appearance

Compare these:

  • Word document with default settings → looks like every other student report
  • LaTeX document with proper layout → looks published

Recruiters notice. Professors notice. The difference is subtle but real.


Setting Margins in LaTeX (The Right Way)

The geometry package controls all margin settings. This is the first package I add to any document.

Basic Uniform Margins

All sides identical:

\documentclass{article}
\usepackage[margin=1in]{geometry}

\begin{document}
Content here...
\end{document}

This sets 1 inch on all four sides. Simple, works for most assignments.

Different Margins for Each Side

For college reports (my actual setup):

\usepackage[
    top=1in,
    bottom=1in,
    left=1.25in,    % Extra space for binding
    right=1in
]{geometry}

Why 1.25″ left? When the report gets printed and bound, the binding mechanism takes about 0.25 inches. Without extra margin, text gets cut off or unreadable near the spine.

My mistake: First report, I used 1″ everywhere. After binding, text on the left side of each page was too close to the spine. Uncomfortable to read. Professor mentioned it. I’ve used 1.25″ left ever since.

Paper Size Specification

For international submissions:

\usepackage[a4paper, margin=1in]{geometry}

For US submissions:

\usepackage[letterpaper, margin=1in]{geometry}

Default is usually A4, but always specify explicitly. I once had a document render incorrectly because I assumed paper size—always state it.

Temporary Margin Changes

For specific pages (like wide tables or figures):

\newgeometry{left=0.5in, right=0.5in}
% Wide content here
\restoregeometry  % Back to original margins

Real use case: My Gold Price Prediction report had comparison tables too wide for standard margins. I used \newgeometry{} for those pages, then \restoregeometry to return to normal. The table fit perfectly without affecting other pages.


Custom Headers and Footers (Making Documents Look Professional)

The fancyhdr package gives you complete control over headers and footers. This is what makes documents look published instead of amateur.

Basic Setup

My standard header/footer template:

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}  % Clear default headers/footers

\fancyhead[L]{Gold Price Prediction Report}  % Left header
\fancyhead[R]{\leftmark}                     % Right header (section name)
\fancyfoot[C]{Page \thepage}                 % Center footer (page number)

Result:

  • Left header: Document title (constant on every page)
  • Right header: Current section/chapter name (changes automatically)
  • Footer center: Page X

Why this layout? Readers always know which document they’re reading (left header) and which section they’re in (right header). Page numbers in footer are standard for academic work.

Understanding Header/Footer Positions

Position codes:

  • [L] = Left
  • [C] = Center
  • [R] = Right

For headers: \fancyhead[L]{...}\fancyhead[C]{...}\fancyhead[R]{...}
For footers: \fancyfoot[L]{...}\fancyfoot[C]{...}\fancyfoot[R]{...}

Dynamic Content in Headers

\leftmark – Shows current chapter/section name
\rightmark – Shows current subsection name
\thepage – Shows current page number

Example from my project report:

\fancyhead[L]{ACEM Minor Project 2024}
\fancyhead[R]{\leftmark}  % Shows "1. Introduction" or "3. Methodology"
\fancyfoot[C]{\thepage}

As I write different sections (Introduction, Methodology, Results), the right header automatically updates to show which section the reader is in. No manual updating needed.

Removing Header/Footer Lines

By default, fancyhdr adds lines above headers and below footers.

To remove them:

\renewcommand{\headrulewidth}{0pt}  % Remove header line
\renewcommand{\footrulewidth}{0pt}  % Remove footer line

My preference: Keep header line (looks professional), remove footer line (cleaner).

\renewcommand{\headrulewidth}{0.4pt}  % Thin line above header
\renewcommand{\footrulewidth}{0pt}    % No line below footer

Different Headers for Even/Odd Pages (For Books/Thesis)

For two-sided printing:

\fancyhead[LE,RO]{\thepage}        % Page number: left on even, right on odd
\fancyhead[RE]{\leftmark}           % Section name: right on even pages
\fancyhead[LO]{\rightmark}          % Subsection: left on odd pages

When I use this: For thesis-style documents that get printed double-sided and bound like books. Most college reports are single-sided, so I stick with simpler headers.


Page Numbering Styles (Roman vs Arabic, When to Use Each)

Different sections of academic documents use different numbering styles. Understanding when to use each matters for formal submissions.

Available Numbering Styles

\pagenumbering{arabic}     % 1, 2, 3, 4...
\pagenumbering{roman}      % i, ii, iii, iv...
\pagenumbering{Roman}      % I, II, III, IV...
\pagenumbering{alph}       % a, b, c, d...
\pagenumbering{Alph}       % A, B, C, D...

Standard Academic Document Structure

My thesis/major project numbering:

\documentclass{report}
\usepackage{fancyhdr}
\pagestyle{fancy}

\begin{document}

% Front matter: roman numerals
\pagenumbering{roman}

\begin{titlepage}
\thispagestyle{empty}  % No number on title page
% Title content...
\end{titlepage}

\tableofcontents
\newpage

\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}
% Abstract content...
\newpage

% Main content: arabic numerals (restart from 1)
\pagenumbering{arabic}

\chapter{Introduction}
% Introduction content...

\chapter{Methodology}
% Methodology content...

\chapter{Results}
% Results content...

\end{document}

Result:

  • Title page: no page number
  • Table of Contents: page i
  • Abstract: page ii
  • Introduction (first chapter): page 1
  • Subsequent chapters: page 2, 3, 4…

Why this structure? Standard academic format. Front matter (TOC, Abstract, Acknowledgments) uses roman numerals. Main content uses arabic numerals starting from 1. This is what every thesis/dissertation follows.

Resetting Page Numbers

\pagenumbering{} automatically resets count to 1

\pagenumbering{roman}  % Starts at i
% Several pages...
\pagenumbering{arabic} % Restarts at 1 (not continuing from roman)

My mistake when learning: I thought switching to arabic would continue counting (iii → 3). It doesn’t—it resets. This is actually what you want for thesis structure.


Suppressing Page Numbers (Title Pages and Special Cases)

Some pages shouldn’t have page numbers—title pages, blank pages between chapters, copyright pages.

Removing Page Number from One Page

Use \thispagestyle{empty} on that specific page:

\begin{titlepage}
\centering
{\Huge Gold Price Prediction Using Machine Learning \par}
\vspace{1cm}
{\Large Sohan Dhungel \par}
\vspace{1cm}
{\large Minor Project Report \par}
\vspace{1cm}
{\large Advanced College of Engineering and Management \par}
\vfill
{\large 2024 \par}

\thispagestyle{empty}  % No page number on title page
\end{titlepage}

Important: \thispagestyle{empty} goes inside the environment (titlepage, chapter, etc.), not after it.

Removing Page Numbers from Entire Document

For documents that never need page numbers:

\pagestyle{empty}

Put this in the preamble (before \begin{document}). Every page will have no headers or footers.

When I use this: Never for formal reports (they always need page numbers). Sometimes for single-page documents like posters or flyers.

Removing Just the Header or Footer

Keep page numbers, remove header:

\fancyhf{}            % Clear everything
\fancyfoot[C]{\thepage}  % Add back only page number

Keep header, remove page numbers:

\fancyhf{}
\fancyhead[L]{Document Title}
\fancyhead[R]{\leftmark}
% No footer commands = no page numbers

Line Spacing (Often Required for Submissions)

Many academic submissions require specific line spacing. My college requires 1.5 line spacing for readability.

Using setspace Package

\usepackage{setspace}

% Options:
\singlespacing      % 1.0 line spacing
\onehalfspacing     % 1.5 line spacing
\doublespacing      % 2.0 line spacing

My standard setup for reports:

\usepackage{setspace}
\onehalfspacing  % 1.5 spacing, readable without being too spread out

Why not double spacing? Makes documents unnecessarily long. 1.5 is the sweet spot—readable, allows for annotations, doesn’t waste paper.

Temporary Spacing Changes

For specific sections (like code listings or quotes):

\begin{singlespace}
    % Code or quote with single spacing
\end{singlespace}

Real use: In my Gold Price Prediction report, I used single spacing for code snippets. Made them more compact and easier to read. Main text stayed at 1.5 spacing.


Paragraph Indentation and Spacing

LaTeX indents the first line of every paragraph by default. Sometimes you want to change this.

Removing All Paragraph Indentation

\setlength{\parindent}{0pt}

Adds space between paragraphs instead:

\setlength{\parindent}{0pt}
\setlength{\parskip}{1em}

My preference: Keep default indentation for formal reports (looks academic), remove it for modern documents like CVs or project proposals.

Removing Indentation for One Paragraph

\noindent This paragraph won't be indented.

This paragraph will be indented normally.

When I use \noindent: After section headings, before figures, or when starting a new topic without a formal paragraph break.


Page Size and Orientation

Document Class Paper Size

Specified in document class:

\documentclass[a4paper, 12pt]{article}    % A4 paper
\documentclass[letterpaper, 12pt]{article} % US Letter

Available sizes:

  • a4paper – International standard (210 × 297 mm)
  • letterpaper – US standard (8.5 × 11 inches)
  • a5paper – Half of A4
  • legalpaper – US legal (8.5 × 14 inches)

My default: a4paper since that’s what my college uses. Always check your institution’s requirements.

Landscape Orientation

For wide tables or figures:

\usepackage{pdflscape}

\begin{landscape}
    % Content in landscape orientation
    \begin{figure}
        \includegraphics[width=\textwidth]{wide_diagram.png}
    \end{figure}
\end{landscape}

Real use case: My Gold Price Prediction report had a comparison table with 8 models and 6 metrics each. Portrait orientation = unreadable tiny text. Landscape = perfect fit.


Complete Working Example (My Actual Report Setup)

Here’s the exact preamble I use for college reports at ACEM:

\documentclass[12pt, a4paper]{report}

% Margins (1.25" left for binding)
\usepackage[
    top=1in,
    bottom=1in,
    left=1.25in,
    right=1in
]{geometry}

% Headers and footers
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{Gold Price Prediction Report}
\fancyhead[R]{\leftmark}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0.4pt}

% Line spacing
\usepackage{setspace}
\onehalfspacing

% Other useful packages
\usepackage{graphicx}
\usepackage{hyperref}

\begin{document}

% Title page (no page number)
\begin{titlepage}
\centering
{\Huge Gold Price Prediction Using Machine Learning \par}
\vspace{1cm}
{\Large Sohan Dhungel \par}
{\Large Project Partner Name \par}
\vspace{1cm}
{\large Minor Project Report \par}
\vspace{0.5cm}
{\large Department of Computer Engineering \par}
{\large Advanced College of Engineering and Management \par}
\vfill
{\large 2024 \par}
\thispagestyle{empty}
\end{titlepage}

% Front matter: roman numerals
\pagenumbering{roman}

\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}
This report presents a machine learning approach to predicting gold prices...

\tableofcontents
\newpage

% Main content: arabic numerals
\pagenumbering{arabic}

\chapter{Introduction}
Gold price prediction is important for investors...

\chapter{Literature Review}
Previous research has explored various approaches...

\chapter{Methodology}
We collected five years of historical gold price data...

\chapter{Results and Analysis}
Our LSTM model achieved 85\% directional accuracy...

\chapter{Conclusion}
We demonstrated that deep learning approaches...

\end{document}

This setup:

  • Title page with no page number ✓
  • Roman numerals for front matter (Abstract, TOC) ✓
  • Arabic numerals for main chapters ✓
  • Proper margins for binding ✓
  • Professional headers with chapter names ✓
  • 1.5 line spacing for readability ✓

Result: Accepted first submission, no formatting issues.


Common Problems I’ve Solved

Problem 1: Headers Appear on Pages They Shouldn’t

Symptom: Title page or chapter start pages have headers when they shouldn’t.

Cause: LaTeX’s default behavior for special pages.

Solution:

\fancypagestyle{plain}{
    \fancyhf{}
    \fancyfoot[C]{\thepage}
    \renewcommand{\headrulewidth}{0pt}
}

This redefines the plain page style (used for chapter starts) to have no header.

My experience: First thesis chapter had a header on the first page. Looked weird. Added this fix, problem solved.

Problem 2: Page Numbers Don’t Reset When Switching Styles

Symptom: Switch from roman to arabic but numbering continues (iii → 3 instead of restarting at 1).

This shouldn’t happen—\pagenumbering{} resets automatically.

If it does:

\pagenumbering{arabic}
\setcounter{page}{1}  % Force reset

Problem 3: Different Margins Not Applying

Symptom: Set different margins for each side, but document looks wrong.

Check:

  1. Is geometry package loaded?
  2. Did you spell options correctly? (left not Left)
  3. Are you using conflicting packages? (Two geometry calls)

My mistake: Had \usepackage{geometry} in preamble with one setting, then another \geometry{} command later with different settings. Second one overwrote the first. Use only one geometry specification.

Problem 4: Headers/Footers Too Long

Symptom: Long chapter names overflow in header.

Solution – Shorter header text:

\chapter[Short Title]{Very Long Chapter Title That Describes Everything In Detail}

The [Short Title] appears in headers and TOC. Full title appears in document.

Real example:

\chapter[Methodology]{Methodology: Data Collection, Preprocessing, Model Development, and Evaluation}

Header shows “Methodology”. Document shows full title.

Problem 5: Blank Page After Title Page

Symptom: Unwanted blank page between title and table of contents.

Cause: LaTeX’s report class starts new chapters on odd pages (right side in book format).

Solution:

\documentclass[12pt, a4paper, oneside]{report}
% Add 'oneside' option

Or manually:

\let\cleardoublepage\clearpage

My fix: Added oneside to document class. Problem gone.


Page Layout for Different Document Types

For College Reports (What I Use)

% Setup
\usepackage[top=1in, bottom=1in, left=1.25in, right=1in]{geometry}
\usepackage{setspace}
\onehalfspacing
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{Report Title}
\fancyhead[R]{\leftmark}
\fancyfoot[C]{\thepage}

Features:

  • Binding margin
  • Chapter names in header
  • 1.5 line spacing
  • Page numbers in footer

For CVs/Resumes

% Minimal layout - maximize content space
\usepackage[margin=0.75in]{geometry}
\pagestyle{empty}  % No headers/footers/page numbers
\setlength{\parindent}{0pt}

See my full CV layout guide for complete setup.

For Two-Column Documents (Conference Papers)

\documentclass[12pt, twocolumn]{article}
\usepackage[margin=0.75in]{geometry}

Narrower margins because two-column layout needs less width per column.

For Books/Thesis (Two-Sided Printing)

\documentclass[12pt, a4paper, twoside]{report}
\usepackage[
    top=1in,
    bottom=1in,
    inner=1.25in,  % Inside margin (near binding)
    outer=1in      % Outside margin
]{geometry}

inner and outer automatically flip on odd/even pages.


Tools and Resources

Visual Margin Testing

Want to see margins?

\usepackage[showframe]{geometry}

Adds visible borders showing exactly where margins are. Remove before final PDF.

My debugging process: When margins look wrong, I add showframe to see what’s actually happening. Usually reveals the problem immediately.

Checking Layout

Compile your document and check:

  • Does text get cut off when bound?
  • Are headers/footers readable?
  • Do page numbers appear consistently?
  • Is line spacing comfortable?

I print the first few pages to check physical appearance. What looks good on screen might look different on paper.

Official Documentation

Both are actually readable, unlike most LaTeX docs.


My Page Layout Checklist

Before submitting any document, I verify:

Margins:

  • [ ] Correct binding margin if applicable
  • [ ] Meets institutional requirements
  • [ ] Tested with physical printing

Headers/Footers:

  • [ ] Appropriate for document type
  • [ ] Consistent across all pages
  • [ ] No headers on title page

Page Numbering:

  • [ ] Roman for front matter
  • [ ] Arabic for main content
  • [ ] No number on title page
  • [ ] Numbers in correct position

Spacing:

  • [ ] Line spacing meets requirements
  • [ ] Paragraph spacing appropriate
  • [ ] Readable when printed

Special Pages:

  • [ ] Title page formatted correctly
  • [ ] Chapter starts look right
  • [ ] No unwanted blank pages

Final Thoughts

Page layout in LaTeX seems complicated at first—so many packages, so many commands. But once you understand the structure, it’s actually simpler than Word.

In Word: Click through menus, hope settings stick, fight with formatting breaking when you edit content.

In LaTeX: Write commands once, compile, layout stays perfect forever.

My honest experience: First document took hours to get layout right. Now I have templates. New report? Copy preamble from previous report, adjust title and margins if needed, done in 5 minutes.

The initial learning curve pays off quickly.

For more LaTeX guides:

Related topics:


Common Questions About Page Layout

Q: How do I change margins for only one page?
Use \newgeometry{} for that page, then \restoregeometry to return to normal:

\newgeometry{top=1cm, bottom=1cm, left=1cm, right=1cm}
% Wide content here
\restoregeometry

Q: How do I completely remove page numbers?
Add \pagestyle{empty} at the beginning of your document. This removes all headers and footers.

Q: How do I insert the chapter title in the header?
Use \fancyhead[R]{\leftmark} with the fancyhdr package. The \leftmark command automatically shows the current chapter name.

Q: Can I add custom text like “Confidential” in the footer?
Yes:

\fancyfoot[L]{Confidential}
\fancyfoot[C]{\thepage}
\fancyfoot[R]{Internal Use Only}

Q: What’s the standard thesis margin size?
Most universities require 1 inch (2.54 cm) on all sides, with 1.25-1.5 inches on the binding side. Always check your specific institution’s guidelines—they vary.

Q: Why do my headers appear on chapter start pages?
LaTeX uses the plain page style for chapter starts. Redefine it:

\fancypagestyle{plain}{\fancyhf{}\fancyfoot[C]{\thepage}}

Q: How do I make different headers for even and odd pages?
Use two-sided layout:

\documentclass[twoside]{report}
\fancyhead[LE,RO]{\thepage}  % Page numbers: left on even, right on odd
\fancyhead[RE]{\leftmark}     % Chapter on right of even pages
\fancyhead[LO]{\rightmark}    % Section on left of odd pages

For more tutorials on LaTeXFlutter developmentAI tools, and web scraping, visit Deadloq.

Leave a Reply

Your email address will not be published. Required fields are marked *