# How to indent locally while using the package parskip?

I have searched if this question has been asked before, but I have only seen (what I understood to be) global solutions, not local ones.

I am using the parskip package to avoid indents, but there are a few places in my document where I do want an indent. I tried guessing and using the command \indent, but this did not seem to work. Is there a way to do it? Thanks.

Use

\setlength\parindent{2cm}


(or whatever value you want) also most likely you will want

\setlength\parskip{0pt}


in the same scope to suppress vertical skip.

\indent indents by \parindent but that is set to 0pt by the parskip package, it is almost never needed as indentation is automatic at the start of paragraphs, and places where automatic indentation is suppressed, \indent typically does not work either.

• Thank you! .... – Helix Jul 23 at 3:54

I can't see any reason for indenting in “a few places”. Is the reader supposed to understand some meaning in this indentation? If so, what meaning? Anyway, \newcommand{\forceindent}{{\setlength{\parindent}{2em}\indent}} will define a \forceindent command that you can use instead of \indent.

\documentclass{article}
\usepackage{parskip}

\newcommand{\forceindent}{{\setlength{\parindent}{2em}\indent}}
\newcommand{\forceindentnoparskip}{{%
\setlength{\parskip}{0pt plus 0.1pt}%
\setlength{\parindent}{2em}%
\indent
}}

\begin{document}

Some non indented text some non indented text some non indented text
some non indented text some non indented text some non indented text.

Some non indented text some non indented text some non indented text
some non indented text some non indented text some non indented text.

\forceindent Some indented text some indented text some indented text
some indented text some indented text some indented text.

Some non indented text some non indented text some non indented text
some non indented text some non indented text some non indented text.

\forceindentnoparskip Some indented text some indented text some indented text
some indented text some indented text some indented text.

Some non indented text some non indented text some non indented text
some non indented text some non indented text some non indented text.

\end{document}


The additional braces ensure that the setting to \parskip and \parindent are forgotten as soon as the command is executed.

Now you can see the ugliness of the thing.

• Thanks for the answer! I am following a certain format for the beginning of the document; the guidelines say to indent, so I indent. However, the rest of the document is up to me, and I prefer not to indent. – Helix Jul 23 at 3:53