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 am trying to number two equations at the same line as subequation.

My problem seems to be due to case environment, since if i comment the case environment, the problem disappears.

Here is a short example of my code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
 \begin{subequations}
  \begin{tabular}{@{}*{2}{m{0.4\linewidth}}@{}}
   \begin{align}
      \Theta[n] = \begin{cases}
                0, & n < 0, \\
                1, & n \ge 0, 
              \end{cases}
   \end{align} &
   \begin{align}
     m_{ij}^{det} = \left|\Delta_{ij}\right|
   \end{align}
  \end{tabular}
 \end{subequations}                           
\end{document}
share|improve this question
1  
Why align and not equation? –  egreg Nov 30 '11 at 15:47
1  
Your example works if you make the change suggested by @egreg. (And add the array package, which is missing.) –  Torbjørn T. Nov 30 '11 at 15:50
add comment

1 Answer 1

up vote 3 down vote accepted

This works:

\documentclass{article}
\usepackage{amsmath,array}

\begin{document}

\begin{subequations}
\noindent\begin{tabular}{@{}*{2}{m{0.5\linewidth}@{}}}
\begin{equation}
  \Theta[n] = \begin{cases}
                0, & n < 0, \\
                1, & n \ge 0,
              \end{cases}
\end{equation} &
\begin{equation}
  m_{ij}^{\det} = \left|\Delta_{ij}\right|
\end{equation}
\end{tabular}
\end{subequations}

\end{document}

Notice the slight changes: I gave half of the linewidth to both equations, removing all intercolumn spaces (and said \noindent).

The det at the exponent should be in roman type, as it's not the product of three variables, but an abbreviation. The \det operator is handy, in other cases it should be \textup{...}.

It would have worked also with align, provided you put the cases environment in a pair of braces (the & confuses LaTeX), but align is wrong when no alignment is done.

share|improve this answer
add comment

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.