TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Minimal CODE




a &= b
& c \tabularnewline\hline


How to avoid & conflict when using \begin{align} in a tabular cell?

share|improve this question
Put the environment into braces {...}. However there will be a problem with the equationnumber. A number makes no real sense to me. Do you really need it? – Herbert Jan 8 '11 at 15:53
@Herbert, my real scenario is to create INPUT-OUTPUT table. Input cell contains the LaTeX code and the OUTPUT cell contains the corresponding output. When I want to show \begin{align}, the output should provide the proper output. :-) – xport Jan 8 '11 at 15:56
If you want to create INPUT-OUTPUT table, maybe you should just use minipage instead of tabular. – Leo Liu Jan 8 '11 at 16:47
the align environment is buggy when you want to cut off the surrounding white space, see page 74 in http://mirror.ctan.org/info/math/voss/mathmode/Mathmode.pdf. Use only the m column type without a parbox or minipage – Herbert Jan 8 '11 at 17:52
up vote 2 down vote accepted

If you use \parbox or minipage within the cell, the & works as expected and you would get also the equation number. For example:

    a &= b
  & c \tabularnewline\hline

longtable with align in cell

share|improve this answer
thanks for answering. Both Herbert's and your solutions work. – xport Jan 8 '11 at 17:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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