Remove default indent of itemize in LaTeX
Generally when you create an itemize
in LaTeX, in the output, it will take a default amount of space (indentation). Although it does not look bad, we sometimes don’t need that indentation.
So in this tutorial, I will show you how to remove the natural indentation of itemize
in LaTeX. Let me see the topics.
- Remove indentation of itemize globally
- Remove indentation of itemize locally
Remove indentation of itemize globally
In order to disable or remove the indentation of itemize globally, you have to set the leftmargin
with \setlist
command. In the preamble of your document, you have to write this \setlist[itemize]{leftmargin=*}
code to remove the indentation.
And make sure you load the enumitem
package otherwise it will not work.
\documentclass{article} \usepackage[showframe=true]{geometry}% Show the margin \usepackage{lipsum} \usepackage{enumitem} \setlist[itemize]{leftmargin=*} % To remove the indentation \begin{document} \noindent Remove indentation globally of \verb|itemize|: \begin{itemize} \item \textbf{Point 1:} \lipsum[1][1-5] \item \textbf{Point 2:} \lipsum[1][1-5] \item \textbf{Point 3:} \lipsum[1][1-5] \end{itemize} \end{document}
Output:
Remove indentation of itemize locally
To remove the indentation of a specific list (itemize), you have to set leftmargin
for the specific itemize
like this \begin{itemize}[leftmargin=<value>]
. Here you can set the <value>
0 or *, for different values you will get different outputs. Load the enumitem
package in the preamble of the document. Take a look.
\documentclass{article} \usepackage[showframe=true]{geometry}% Show the margin \usepackage{enumitem} \begin{document} \textbf{\underline{Remove indentation of itemize locally}}\\[5pt] Natural indentation of itemize: \begin{itemize} \item First item \item Second item \item Third item \end{itemize} Remove indentation using \verb|[leftmargin=*]|: \begin{itemize}[leftmargin=*] \item First item \item Second item \item Third item \end{itemize} Remove indentation using \verb|[leftmargin=0pt]|: \begin{itemize}[leftmargin=0pt] \item First item \item Second item \item Third item \end{itemize} \end{document}
Output:
Leave a Reply