Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

By default, I prefer to have no paragraph indentation (which I have implemented by putting \setlength\parindent{0pt} in the preamble of my document), but for my current document I would like to be able to return to the standard paragraph indentation (i.e. what I would get if I hadn't put that command in my preamble) for certain paragraphs. I tried putting \indent in front of the paragraphs I wanted to affect, but it didn't work (presumably because the command \indent uses the value of \parindent). The only way I can think of to do what I want would be to leave the default \parindent alone, and put \noindent almost everywhere, but that would be kind of a pain. Is there any better way to do this?

This answer seems to imply that it might be necessary to write my own document class in order to accomplish this. Is that really true?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

Why don’t you renew the definition of \indent?

\documentclass[11pt,a4paper]{scrartcl}
\setlength{\parindent}{0pt}
\setlength{\parsep}{1\baselineskip}
\renewcommand{\indent}{\hspace*{10.95003pt}\ignorespaces}
\begin{document}
\verb+\parindent+ = \the\parindent

These are some paragraphs

\indent and this is on is not indendet

as you can see here \dots
\end{document}
share|improve this answer
    
Thanks, that makes a lot of sense. May I ask, is 1em the length of a default indent (since I want the indents to be exactly as they would have been without setting \parindent to 0)? If so, how/where did you find that out? I might want to do this process with other settings in the future. –  Zev Chonoles May 22 '11 at 9:15
2  
@Zev you could use \showthe\parindent to print the length into the LOG file or \the\parindetn to type it in the Text. While testing I noticed, that the length seems to be changed at the \begin{document} so put the command after that. (I added it to the example.) –  Tobi May 22 '11 at 9:57
    
Thanks for your help! –  Zev Chonoles May 22 '11 at 10:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.