Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I noticed a strange behaviour with the aligned environment:

\begin{equation}\label{eq:direct_limit}
\begin{aligned}
[x] + [y] & := [\eta_{ik}(x) + \eta_{jk}(y)],\\
[x] \cdot r & := [x \cdot r].
\end{aligned} 
\end{equation}

If I compile this, the first "[x]" in the equation is missing. Does anybody know why?

share|improve this question

3 Answers 3

up vote 6 down vote accepted

The [x] is misinterpreted as the optional argument for aligned. You can use a \relax:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}\label{eq:direct_limit}
\begin{aligned}\relax
[x] + [y] & := [\eta_{ik}(x) + \eta_{jk}(y)],\\ [x] \cdot r & := [x \cdot r].
\end{aligned} 
\end{equation}

\end{document}

enter image description here

Instead of := you could use \coloneqq from mathtools:

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\begin{equation}\label{eq:direct_limit}
\begin{aligned}\relax
[x] + [y] & \coloneqq [\eta_{ik}(x) + \eta_{jk}(y)],\\ 
[x] \cdot r & \coloneqq [x \cdot r].
\end{aligned} 
\end{equation}

\end{document}

enter image description here

share|improve this answer

Use an empty {} to prevent [x] from getting added as optional argument of aligned.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
  \begin{equation}\label{eq:direct_limit}
\begin{aligned}
{}[x] + [y] & := [\eta_{ik}(x) + \eta_{jk}(y)],\\
[x] \cdot r & := [x \cdot r].
\end{aligned}
\end{equation}
\end{document}
share|improve this answer

A simple solution is to use mathtools package to fix the problem in \\ command and amsmath's some environments.

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\begin{equation}\label{eq:direct_limit}
\begin{aligned}
[x] + [y] & := [\eta_{ik}(x) + \eta_{jk}(y)],\\
[x] \cdot r & := [x \cdot r].
\end{aligned} 
\end{equation}

\end{document}
share|improve this answer

Your Answer

 
discard

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.