1

I understand that you can left-align text using \intertext{...} inside \begin{align}...\end{align} environment, e.g. this answer.

Is it possible to do the same but inside \begin{equation}...\end{equation}?

The end goal is to wrap the whole environment inside a display formula (\[ \]) as part of bullet point within a list. I've tried wrapping the align environment this way, but for some reason \intertext{...} does not work as the text is squeezed together without spaces.

EDIT: clarifying the question with an example and more context.

First, I should say that I'm trying to do this in org-mode in Emacs, i.e. compiling a org doc a PDF via LaTeX. The equations appear as part of an item in a list, e.g.

- Blah blah blah, then \[\begin{align*} \label{eq1} \text{something text}
   &= \frac{a}{b} \\ &= \frac{a}{c+d} \\ & \intertext{some other text, gives}
   \\ \label{eq2} a &= b+c \end{align*}\]

In other words, I want the block of displayed equations to be centered w.r.t the list item they belong to, and I want the intertext{...} text to be left-aligned w.r.t the start of each list item, or, at least to the left edge of the displayed formula block.

At the top of the .org doc, I have

#+OPTIONS: TeX:t LaTeX:t
#+LaTeX_CLASS: article
#+LaTeX_HEADER: \usepackage{amsmath}

So far, Emacs seems to compile and produces a PDF file, except that the \intertext segment inside the display formula is wrong:

enter image description here

How do I correct it? I am also open to suggestions that utilize something other than a single \begin{align}...\end{align} environment to achieve the same effect inside a list item.

  • 1
    align and equation are both displayed environments for math. – Johannes_B Jan 17 '16 at 8:57
  • Could you give an example of "\intertext{...} [not working] as the text is squeezed together without spaces"? – Mico Jan 17 '16 at 9:22
  • 2
    align is a multi-line display and \intertext inserts lines of text between the lines of math. equation is a single line display so \intertext would have no obvious use here. – David Carlisle Jan 17 '16 at 10:16
  • your description of \intertext suggests it has been used incorrectly but unless you give an example it will be impossible to help. – David Carlisle Jan 17 '16 at 10:17
  • 1
    the question of left-aligning an equation as part of a bulleted list is addressed in this answer to the question Vertical alignment of align* in enumerate. while that answer directly addresses a multi-line equation, the principle is also applicable to a one-line equation, but the equation must be entered with a command for a "subsidiary" environment, not with \[ ... \] or equation. – barbara beeton Jan 17 '16 at 13:36
2

If I complete your fragment to make a document

\documentclass{article}
\usepackage{amsmath}
\begin{document}

Blah blah blah, then \[\begin{align*} \label{eq1} \text{something text}
   &= \frac{a}{b} \\ &= \frac{a}{c+d} \\ & \intertext{some other text, gives}
   \\ \label{eq2} a &= b+c \end{align*}\]

\end{document}

then TeX produces

! Package amsmath Error: Erroneous nesting of equation structures;
(amsmath)                trying to recover with `aligned'.

See the amsmath package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.7    \\ \label{eq2} a &= b+c \end{align*}
                                           \]
? 

! Package amsmath Error: Invalid use of \intertext.

See the amsmath package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.7    \\ \label{eq2} a &= b+c \end{align*}
                                           \]
? 

! Package amsmath Error: Multiple \label's: label 'eq1' will be lost.

See the amsmath package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.7    \\ \label{eq2} a &= b+c \end{align*}
                                           \]
? 
[1

After an error any typeset output that may be produced is essentially arbitrary and not really to be looked at, TeX recovers from errors only to allow further syntax checking, usually the typeset result is nonsense.

If I fix the errors reported namely align* should not be inside \[, \intertext should be at the start of the line and you shouldn't use \label as the * form is not numbered so there is nothing to reference, I get

\documentclass{article}
\usepackage{amsmath}
\begin{document}

Blah blah blah, then
\begin{align*}  \text{something text}
   &= \frac{a}{b} \\ &= \frac{a}{c+d} \\
\intertext{some other text, gives}
   \\ a &= b+c 
\end{align*}

\end{document}

which produces

enter image description here

  • thanks for the answer. \intertext{...} does display the text now, but its positioning is still off. How do I make it aligned to the start of the list item, e.g. 'Blah blah ...' in my example above. – Skyork Jan 17 '16 at 22:23
  • @Skyork it is aligned with the left margin of the text, Blah is just to the right due to being the start of a paragraph. – David Carlisle Jan 17 '16 at 22:24
  • @Skyork if you want to ask about usage in a list your example should have a complete document as above but showing usage in an enumerate or itemize or whatever list you need. Can't expect people to guess. – David Carlisle Jan 17 '16 at 22:27

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.