Download Article
Download Article
Indent a paragraph by tabbing in LaTeX
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.
Steps
Section 1 of 3:
Using the Tabbing Environment
-
Type
\begin{tabbing}
. This will initiate the tabbing environment in your LaTeX code. This method manually sets tab stops in your text. [1] X Research source- If you’re just getting started, check out our guides on installing LaTeX and coding .
-
Type the first line of text. 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 - Make sure to end each line of text with
-
Insert
\=
for tab stops. Place this syntax in the first line of text wherever you want there to be tab stops. -
Type the second line of text. This is normal text in which we’ll add tab stop advances. Don’t forget to add a
\\
at the end! -
Insert
\>
for tab stop advances. 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.
-
Type
\end{tabbing}
. Type this code after the end of your text to close tabbing mode. [2] X Research source You’re done!- As you continue your math journey, check out our guide on how to learn math for general tips!
Advertisement
Section 2 of 3:
Using \quad
-
Insert
\qquad
. 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] X Research source
Advertisement
Section 3 of 3:
Using \hspace
-
Insert
\hspace{5cm}
. 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] X Research source- Vary the distance inside the {} to get the spacing you need. You can use multiple \hspace of different lengths to organize your text.
-
Insert
\hfill
. 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] X Research source- 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.
- For example, if you type:
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!
References
- ↑ https://latexref.xyz/tabbing.html
- ↑ https://latexref.xyz/tabbing.html
- ↑ https://www.overleaf.com/learn/latex/Spacing_in_math_mode
- ↑ https://www.overleaf.com/learn/latex/Lengths_in_LaTeX
- ↑ https://www.overleaf.com/learn/latex/Spacing_in_math_mode
- ↑ https://www.overleaf.com/learn/latex/Line_breaks_and_blank_spaces
- ↑ https://www.overleaf.com/learn/latex/Line_breaks_and_blank_spaces
About This Article
Thanks to all authors for creating a page that has been read 64,640 times.
Advertisement