Not indent the first paragraph of a LaTeX document
Posted
by Andrew
on Stack Overflow
See other posts from Stack Overflow
or by Andrew
Published on 2009-08-12T17:47:28Z
Indexed on
2010/04/30
3:27 UTC
Read the original article
Hit count: 371
latex
|indentation
In the standard LaTeX article class (and probably others as well), paragraph indentation follows standard American publishing norms of not indenting the first paragraph after a section{}
or subsection{}
.
I've redefined \maketitle
in a LaTeX document and put the actual title left-aligned as the last line, fairly close to the actual text (kind of like this)
Author
Date
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
Duis aute irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.
Section title
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
Duis aute irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.
Since the title is left-aligned and so close to the text, I'd like the first paragraph of the document to not be indented, just like with the headings
...
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.
Duis aute irure dolor...
...
I've attempted to use @afterindentfalse
, which is what the section
commands use, inside my renewed commands, but it doesn't work.
\makeatletter
\def\noindentation{\let\@afterindentfalse}
\newcommand{\mytitle}[1]{%
\vskip 2em
{\bf\sffamily\LARGE #1}
\noindentation}
\renewcommand{\@maketitle}{
\begin{flushleft}{
% Author
\@author \par
% Date
\@date \par
% Title
\mytitle{\@title}
} \end{flushleft}
}
\makeatother
By default the first paragraph in the article class is indented, so this question is applicable whether or not I renew \maketitle
.
So, what's the best way to automatically not indent the first paragraph of the document?
Thanks!
© Stack Overflow or respective owner