1

I have this command, call it \foo which I want to make sure will result in text written at the beginning of the paragraph. So, if you write:

Quick brown fox jumped over the lazy dog etc. etc.
... over the lazy dog.

\foo

I want \foo to do the equivalent of \noindent; but if you write:

Quick brown fox jumped over the lazy dog etc. etc.
... over the lazy dog. \foo

More text here

I want \foo to be on a separate paragraph than the Quick brown fox text, as though my source were:

Quick brown fox jumped over the lazy dog etc. etc.
... over the lazy dog. 

\noindent \foo

More text here

Is this possible?

1

If I understand correctly, you want \foo to start a new, unindented paragraph. The solution is to just use \par\noindent.

\documentclass{article}
\newcommand*\foo{\par\noindent[This is foo!]}

\begin{document}

Quick brown fox jumped over the lazy dog etc. etc.
... over the lazy dog.

\foo

Quick brown fox jumped over the lazy dog etc. etc.
... over the lazy dog. \foo

More text here
\end{document}

enter image description here

  • Ah, \par is what I was missing, yes. Thank you. – einpoklum Jun 13 '17 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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