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 \begin{align*} to typeset set of equations. I want to say that the first one applies to case of dimension [T] (time), and the second for [L] (length) and the third for [M] (mass). I want to put these markers at the start of each equation (left side) but not too far away. But these are not part of the equation, and not an equation number or a label.

An example will explain better.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
[T]  \quad 0 &= -a      \\
[L]  \quad 1 &= a-3b    \\
[M]  \quad 0 &= b+c
\end{align*}
\end{document}

Mathematica graphics

This seems to work ok, except when I have a minus sign or value in the LHS that is different size than the others, now things shift around and the equations look ugly

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
[T]  \quad -1 &  = -a      \\
[L]  \quad 1  &  = a-3b    \\
[M]  \quad 0  &  = b+c
\end{align*}
\end{document}

Mathematica graphics

Clearly I need to better alignment env. Do I need to use table for this? I want the [] tags to be in the left most side of the equations.

What would be the correct way to do this? Using texlive 2013 thank you

share|improve this question

3 Answers 3

up vote 5 down vote accepted

Use of aligned environment

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{aligned}
&[T]  & -1 &  = -a      \\
&[L]  & 1  &  = a-3b    \\
&[M]  & 0  &  = b+c
\end{aligned}
\]
\end{document}
share|improve this answer

Use the alignat* environment from »amsmath« like in this approach.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath}

\begin{document}
  \begin{alignat*}{2}
    [T]  & \quad & -1 &  = -a   \\
    [L]  &       &  1 &  = a-3b \\
    [M]  &       &  0 &  = b+c
  \end{alignat*}
\end{document}

Further reading


enter image description here

share|improve this answer

I think logically they are (text) equation labels rather than part of the math alignment so the markup should be

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\tag{T}   0 &= -a      \\
\tag{L}   1 &= a-3b    \\
\tag{M}   0 &= b+c
\end{align}
\end{document}

By default that puts them on the right in () rather than on the left in [] but that can be changed (if necessary) with style customisation of amsmath eg leqno option, rather than changing the markup.

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.