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.

For some reason LaTeX indents the text right after the end of a "landscape" section of my DVI output, even though I don't want it to do so. Any thoughts on how I can fix this?

share|improve this question
2  
Welcome to TeX.SE. It is always best to compose a MWE that illustrates the problem including the \documentclass so that those trying to help don't have to recreate it. Personally, I have often solved my own problems in the process of reducing the amount of code actually required to reproduce the problem. –  Peter Grill Oct 24 '11 at 19:38

2 Answers 2

You can use \noindent to prevent indentation.

share|improve this answer

What is happening is that after the \end{landscape} a new paragraph is started. LaTeX adds an indent to the beginning of the paragraph unless you have globally disabled this.

So, you could either add \noindent immediately after the \end{landscape} (as per @GonzaloMedina's solution), or modify the \end{landscape} to always add a \noindent for you:

\begin{document}

\let\OldEndLandscape\endlandscape
\def\endlandscape{\OldEndLandscape\noindent}

\begin{landscape}
\lipsum[1]
\end{landscape}
\lipsum[2]
\end{document}

As per the comments, you need to ensure that there is no space after \end{landscape}, or use a % to terminate any blank lines as in:

...
\end{landscape}
   %
\lipsum[2]

If you desire an automated solution that enforces no indentation after \end{landscape}, perhaps you can use the solution at Looking for an \ignorespacesandpars.

share|improve this answer
    
But this won't work with "regular" text, since it won't take care of the space after \end{landscape}: an example: \documentclass{article} \usepackage{lscape} \let\OldEndLandscape\endlandscape \def\endlandscape{\OldEndLandscape\noindent} \begin{document} \begin{landscape} a \end{landscape} b\\c \end{document} of course, writing b in a new line after \end{landscape} (which I cannot do here in this comment) –  Gonzalo Medina Oct 24 '11 at 20:31
    
Good point: I have added that point to the solution. –  Peter Grill Oct 24 '11 at 20:55

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.