PDF download Download Article

Indent a paragraph by tabbing in LaTeX

PDF download Download Article

LaTeX is an incredible math writing and formatting tool. There are a few easy ways to tab and indent paragraphs. You can try the tabbing environment to set your own tab stops. Or, use \quad and \hspace to insert predefined spaces. This wikiHow shows you how to tab in LaTeX.

Things You Should Know

  • Use the tabbing environment to create your own tab stops.
  • Alternatively, use \quad to make an 18 mu space.
  • Or, use \hspace{5cm} to make a 5 cm space.
Section 1 of 3:

Using the Tabbing Environment

PDF download Download Article
  1. This will initiate the tabbing environment in your LaTeX code. This method manually sets tab stops in your text.[1]
  2. This is just normal text that we’ll add tab stops to in the next step.
    • Make sure to end each line of text with \\ to end the line and start a new line.
    Advertisement
  3. Place this syntax in the first line of text wherever you want there to be tab stops.
  4. This is normal text in which we’ll add tab stop advances. Don’t forget to add a \\ at the end!
  5. Place this syntax in the second line of text where you want the text to be inline with the tab stops placed in the first line.
    • After this, you can repeat this process with new lines of text until you’ve completed your document.
  6. Type this code after the end of your text to close tabbing mode.[2] You’re done!
    • As you continue your math journey, check out our guide on how to learn math for general tips!
  7. Advertisement
Section 2 of 3:

Using \quad

PDF download Download Article
  1. This code will create a space of 18 mu wherever you place it. This is great for consistent paragraph indenting.[3]
    • “mu” is a LaTeX length unit equal to 1/18 em. An “em” is about the width of an uppercase “M” in the font you’re using.[4]
  2. This code has a space length of 36 mu, twice the length of \quad. This is great for organizing text by using indentation to indicate nesting.[5]
  3. Advertisement
Section 3 of 3:

Using \hspace

PDF download Download Article
  1. This code will create a space 5 centimeters (cm) wide. This is great for creating spacing dependent on length rather than font (unlike \quad).[6]
    • Vary the distance inside the {} to get the spacing you need. You can use multiple \hspace of different lengths to organize your text.
  2. This code fills the remaining space in the line of text (to the right-side margin). This is helpful if you’re writing a resume in LaTex and you want to right-align the dates.[7]
    • For example, if you type:
      • Hello \hfill World
    • “Hello” will be on the left side of the text box, and “World” will be on the right side, against the right margin.
  3. Advertisement

Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Insert Spaces in HTML Insert Spaces in HTML & CSS: 5 Easy Ways with Examples
Indent in WordIndent in Word
Set Tabs in a Word DocumentHow Do You Set Tab Stops in Word? Everything You Need to Know
Format a Word DocumentEasily Format Word Docs from Scratch or Using Templates
Double Space in WordDouble Space in Word
Format a Word Document to Look ProfessionalEasy Steps to Make a Word Document Look Professional
Use OpenOffice WriterUse OpenOffice Writer
Indent the First Line of Every Paragraph in Microsoft WordStep-By-Step Guide to Indent in Microsoft Word
Create a Table in HTMLCreate a Table in HTML
Indent in Excel4 Easy Ways to Indent Text in Microsoft Excel
Insert a Line in HTML Create a Horizontal Line in HTML
Double SpaceDouble Space
Insert Equations in Microsoft WordInsert Equations in Microsoft Word
Do MLA Format on Google DocsMLA Format in Google Docs: Easy Guide to Setting Up Your Paper
Advertisement

About This Article

Kyle Smith
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Kyle Smith. Kyle Smith is a wikiHow Technology Writer, learning and sharing information about the latest technology. He has presented his research at multiple engineering conferences and is the writer and editor of hundreds of online electronics repair guides. Kyle received a BS in Industrial Engineering from Cal Poly, San Luis Obispo. This article has been viewed 71,405 times.
How helpful is this?
Co-authors: 3
Updated: January 6, 2025
Views: 71,405
Categories: Software
Thanks to all authors for creating a page that has been read 71,405 times.

Is this article up to date?

Advertisement