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 using mathmode with split. How can you use multiple tab stops. I want to span an equation across multiple lines, but then the last few I want to indent even more.

\[
\begin{split}

some& stuff here \\
    &some &more stuff here \\
          &even more stuff here

\end{split}
\]

Notice the 2nd tab stop and I want to look like it's shown with the tabs.

share|improve this question
    
    
@cmhuges not really as that uses align, but i found \qquad which is fine for me. –  Matt Oct 13 '11 at 3:15
1  
Could you provide a screenshot of what you'd like? –  cmhughes Oct 13 '11 at 3:15
1  
If you post an example of the kind of equation you'd like to typeset, I'm pretty sure people will come up with solutions that might work better for you than using \qquad. \qquad is not the same as a tab, as it just adds a fixed amount of space and doesn't ensure proper alignment. –  Jake Oct 13 '11 at 3:21
add comment

2 Answers

up vote 6 down vote accepted

amsmath provides the alignat environment that is able to provide tab stops as needed. Some overlap support may be required via mathtools. It provides the mathematical equivalent of \llap and \rlap.

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\usepackage{mathtools}% http://ctan.org/pkg/mathtools
\begin{document}
\begin{alignat*}{2}
  E&=\mathrlap{mc^2-2x^4+abc} \\
   &\phantom{{}={}}ayz-2 && +3+2 \\
   &                     && -b+\operatorname{ord}(xyz-ijk)
\end{alignat*}
\end{document}

alignat in amsmath

share|improve this answer
    
What does rlap do?, also i see phantom a lot, what does that do? Is there no way to do this with split? Thanks! –  Matt Oct 13 '11 at 3:43
    
\rlap{<stuff>} is equivalent to \makebox[0pt][l]{<stuff>} (providing a right overlap), while \llap{<stuff>} does the same for a right overlap (\makebox[0pt][r]{<stuff>}). \phantom{<stuff>} prints a box of width & height of <stuff> without actually typesetting <stuff>. Similarly, \hphantom{<stuff>} and \vphantom{<stuff>} provides horizontal/vertical-only spacing of <stuff> without actually typesetting anything. The split environment only allows a single alignment character &, so you'd have to use spacing (\quad or otherwise). –  Werner Oct 13 '11 at 3:58
add comment

The nath package provides \wall and \return to align at arbitrary locations. Here is Werner's example coded using nath syntax.

\documentclass{article}
\usepackage{nath}
\begin{document}
\begin{equation}
  E \wall = m c^2 - 2x^2 + abca \\
          \quad ayz-2 \wall{} +3+2 \\
              {} - b + `ord (xyz-ijk) 
      \return \return
\end{equation}
\end{document}

which gives

enter image description here

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.