# Do not indent second paragraph after macro was used

I defined a macro that I occasionally use at the beginning of sections. After this macro has been used, I do not want the first real' paragraph (which technically is the second paragraph) to be indented. However, I can only achieve this by omitting any new lines between the macro and the first paragraph. Is there a more elegant way?

\documentclass{article}

\begin{document}

\newcommand{\note}[1]{
\begin{flushright}
\textit{#1}
\end{flushright}
}

\section{First section}

First paragraph is correctly NOT indented.

\section{Second section}

\note{My Note}
First real' paragraph is correctly NOT indented.

\section{Third section}

\note{My Note}

First real' paragraph should NOT be indented, but IS.

\end{document}


• If you leave an empty line, it will be the 2nd paragraph. You can use \noindent, if you wish. Feb 19 '15 at 12:56
• I am aware of this fact and the corresponding workarounds. I was wondering whether there is some way to tune macro \note to achieve the \noindent effect. Feb 19 '15 at 12:59

You can use the commands used by \section to suppress indentation:

\documentclass{article}

\begin{document}
\makeatletter
\newcommand{\note}[1]{%
\begin{flushright}
\textit{#1}
}
\makeatother

\section{First section}

First paragraph is correctly NOT indented.

\section{Second section}

\note{My Note}
First real' paragraph is correctly NOT indented.

\section{Third section}

\note{My Note}

First real' paragraph should NOT be indented, and ISN'T.

\end{document}
`
• So easy! +1 :-) Feb 19 '15 at 13:14
• Thanks. This worked perfectly. Although I do not quite understand why (i.e. I do not know/understand what these commands do). Feb 19 '15 at 13:14