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?
2 Answers
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.
- 223,288
-
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}
– Gonzalo Medina Oct 24 '11 at 20:31of course, writingbin a new line after\end{landscape}` (which I cannot do here in this comment) -
\documentclassso 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