Text FormattingList Indentation

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Willie
Posts: 42
Joined: Sat Aug 27, 2011 3:43 am

List Indentation

Post by Willie »

Hello. I created a paragraph text which I want to be indented the same distance from both margins. However, because I put it in a list, it became too far away from the left margin, because of the list indentation.
How can I fix it to have equal indentation from both margins?
a minimal example is attached:

Code: Select all

\documentclass[a4paper,11pt,english]{article}
\usepackage[top=2.5cm,bottom=2.5cm,inner=2.5cm,outer=2.5cm]{geometry}
\usepackage{parskip}
\usepackage[english]{babel}
\usepackage{blindtext}

\begin{document}
\emph{This text is not indented correctly (too far from the left)}:
	\medskip
	\begin{enumerate}
		\item  \blindtext
	\end{enumerate}
	\bigskip
\emph{This text is indented correctly, but not numbered (not enumerated list as I wanted)}:
	
	\blindtext
	
\end{document}
Last edited by Willie on Thu Sep 08, 2011 11:39 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

List Indentation

Post by localghost »

This is a job for the enumitem package.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[margin=2.5cm]{geometry}
\usepackage{babel}
\usepackage{parskip}
\usepackage{enumitem}
\usepackage{blindtext}

\begin{document}
  \emph{This text is now indented correctly}:
  \medskip
  \begin{enumerate}[leftmargin=*]
    \item  \blindtext
  \end{enumerate}

  \bigskip
  \emph{This text is indented correctly, but not numbered (not enumerated list as I wanted)}:
  \blindtext
\end{document}

Thorsten
Willie
Posts: 42
Joined: Sat Aug 27, 2011 3:43 am

List Indentation

Post by Willie »

good. thanks for the fast replying

why did you use

Code: Select all

\usepackage[T1]{fontenc}
?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

List Indentation

Post by localghost »

Just an automatism of mine. It's for enabling Type 1 Encoding (Cork Encoding). Gets important with regard to Postscript fonts. But in general provides better font qualitiy.
Post Reply