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.

Is there an intelligent way to left-align the parts right of & of the two cases environments shown below (if x >= 0, otherwise, if y < 0, otherwise). I wonder if there is a better way than using manual spaces:

\begin{align*}
 u(x) &=
  \begin{cases}
   0        & \text{if } x \geq 0 \\
   1        & \text{otherwise}
  \end{cases}
  \\
 \tau &=
  \begin{cases}
   a+b+c+d  & \text{if } y < 0 \\
   1        & \text{otherwise}
  \end{cases}
\end{align*}

alt text

share|improve this question
2  
The easiest solution I can come up with is to use the mathtools package and use something like \mathrlap0\hphantom{a+b+c+d} in place of your 0. But that's playing with manual spacing, I suppose. –  TH. Sep 21 '10 at 2:04
1  
You can use the solutions to an earlier question, just exchanging the order of the statements. –  Caramdir Sep 21 '10 at 2:09
    
Both great. Thanks. Much better than fiddling with manual \quad-s etc. –  Frank Seifert Sep 21 '10 at 2:16
1  
@TH, @Caramdir: Why not post actual answers? –  SamB Sep 27 '10 at 21:14
    
@TH, @Caramdir: If you can put up an answer or two, as @SamB suggests, then we can shift this qn off the "Unanswered" list. –  Charles Stewart Oct 5 '10 at 7:54
add comment

1 Answer

up vote 4 down vote accepted

You can use the solutions to an earlier question, just exchanging the order of the statements.

Another solution is to use the mathtools package and use something like \mathrlap0\hphantom{a+b+c+d} in place of your 0.

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.