Page LayoutEliminating automatic indentation

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
pottertl
Posts: 7
Joined: Wed Jan 05, 2011 10:33 pm

Eliminating automatic indentation

Post by pottertl »

Is there a way to format a document so that all automatic indentation is suppressed, but \indent functions normally? When I use the \setlength{\parindent}{0in} it seems as if \indent stops working. Thoughts?

Recommended reading 2024:

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

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

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Eliminating automatic indentation

Post by Juanjo »

I suppose you want to supress indentation in each paragraph, but preserve the \indent functionality to manually introduce indentation in some isolated paragraphs, isn't it? Since \parindent is the skip that \indent puts, by definition, at the beginning of each paragraph, if you set \parindent to 0 pt, then you «disable» \indent. Anyway, you can define your own macro, say, \tab, and use it instead of \indent. For example:

Code: Select all

\documentclass{article}
\usepackage{lipsum}

\usepackage{parskip}
\newcommand{\tab}{\hspace*{2em}}

\begin{document}
\lipsum[1]

\tab \lipsum[2]

\lipsum[3]

\tab \lipsum[4]
\end{document}
Please note the use of the parskip package, which sets \parindent to 0pt and increases \parskip in order to make distinguishable two consecutive paragraphs.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Post Reply