6

intertext command seems to remove the indentation. Is there a way to get the normal indentation while in math mode?

enter image description here

\documentclass[11pt, a4paper]{IEEEtran}

\usepackage{amsmath}
\usepackage{amssymb, amsfonts}

\begin{document}

The indentation in this paragraph works well without any issues

\begin{align}
    y &= a \thinspace x + c
    %
    \\
    \intertext{The indentation in this paragraph has been removed since this is an intertext. How can I force this text to retain the default indentation?}
    e &= m \thinspace c^{2}
\end{align}

\end{document}

1 Answers1

8

You could just restore the paragraph indent by hand, but I am not sure if I personally would want to do that. To be more specific, I would create two separate aligns/equations in that case, simply because \intertext is not made for this. \intertext is, as pointed out by Mico, meant to insert some short text between two aligned equations. (I do, however, understand that this way you make sure that the equality sign of both equations is, well, aligned, but this can also be achieved by other means, see e.g. here.)

Anyway, here comes the "by hand" restoration of the paragraph-type indentation.

\documentclass[11pt, a4paper]{IEEEtran}

\usepackage{amsmath}
\usepackage{amssymb, amsfonts}

\begin{document}

The indentation in this paragraph works well without any issues

\begin{align}
    y &= a \thinspace x + c
    %
    \\
    \intertext{\indent The indentation in this paragraph has been removed since this is an intertext. How can I force this text to retain the default indentation?}
    e &= m \thinspace c^{2}
\end{align}

\end{document}

enter image description here

Mico
  • 506,678
  • 1
    +1. You may want to add a sentence or two to point out that the reason why \intertext doesn't insert a paragraph indent is because its purpose is to let users insert a small amount of text (usually no more than a few words) without starting a new (logical) paragraph. The OP's example represents a somewhat unusual (and borderline questionable) use case. – Mico Jun 29 '18 at 05:13
  • 1
    @Mico Thanks! Done. (Now I refer to some other post, probably you know better whether or not this is a reasonable choice.) –  Jun 29 '18 at 05:26
  • 2
    as shown by the big white hole in your image never leave a blank line before a display math environment such as align – David Carlisle Jun 29 '18 at 06:51