Document Classes ⇒ Indentation of new paragraphs
Indentation of new paragraphs
Latex by default indents new paragraphs. But it is actually nicer if it only does so after another paragraph, and not after equations, figures and other objects that leave enough space anyway. The manual solution of adding \noindent or \% is not practical in a large document (I'm writing a book), especially since floating objects move and you never know a priory whether the paragraph will be preceded by another paragraph or not.
Is there any package that solves this problem ?
Thank you for your help,
Ofer
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- pumpkinegan
- Posts: 91
- Joined: Thu May 03, 2007 10:29 pm
Indentation of new paragraphs
Code: Select all
Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text.\begin{equation}e^{i \pi} = -1\end{equation}Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text.
Code: Select all
Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text.%%--------------------\begin{equation}e^{i \pi} = -1\end{equation}%%--------------------Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text. Default text.
Code: Select all
%%---------------------\begin{figure}[!ht]...\end{figure}%%---------------------
Re: Indentation of new paragraphs
Yet this is not a good solution, because of several reasons:
1. it forces you to make a distinction between a new paragraph that is after an equation, say, and a paragraph that is after another paragraph.
The point is that after the equation/figure it IS a new paragraph, I just don't want it to be indented because there is no need for it.
2. With figures it is even worse. Suppose I take your suggestion and write
text 1.
%
\begin{figure}
...
\end{figure}
%
text 2.
text2 is a new paragraph - it is not a continuation of text1. But since latex will put this float somewhere else, it will cause text2 to appear right after text1, as it belongs to the same paragraph.
What is really needed is a package that knows automatically to indent only after another paragraph. Not after equation, figure, in the beginning of a page etc.
Looking at various text books, I see that people try to achieve this effect sometimes, apparently manually, but most of the time they are inconsistent. This shows me that this is a problem that many people have.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Indentation of new paragraphs
Code: Select all
…\begin{equation}…\end{equation}\noindent…
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10