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.

So for example, in the next code I get my equations in center aligment, I'd like to have them aligned to the left.

$(a_{2})_{pq}=\left \{ \begin{smallmatrix} (a_{1})_{pq} ,p\neq i \\ (ca_{1})_{pj}+(a_{1})_{pq},p\neq i \end{smallmatrix}\right.$ 

Note: I'm using smallmatrix environmet so I can have my definition inline, I mean like being part of the same line.

share|improve this question
    
smallmatrix is intended for setting matrices, for groups of equations you want something like aligned –  David Carlisle Feb 13 '13 at 18:14
add comment

2 Answers 2

up vote 7 down vote accepted

You can get the alignment as in cases by adding "fill" glue:

$(a_{2})_{pq}=
 \left\{
 \begin{smallmatrix}
   (a_{1})_{pq},\hfill&p\neq i\hfill\\
   (ca_{1})_{pj}+(a_{1})_{pq},\hfill& p\neq i\hfill
 \end{smallmatrix}\right.$

However, such constructs are best placed in a display. See the result as a witness.

enter image description here

share|improve this answer
    
This is pretty useful. It might be a good idea for the amsmath guide to mention this. –  MSC May 9 '13 at 15:39
add comment

I'd say use cases. (You need the amsmath package for this.)

Here an example:

Code

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
(a_{2})_{pq}=
    \begin{cases}
    (a_{1})_{pq}               & p\neq i \\ 
    (ca_{1})_{pj}+(a_{1})_{pq} & p\neq i
    \end{cases}
\]
\end{document}

Result

image

share|improve this answer
    
The thing is that I'm using smallmatrix environmet so I can have my definition inline, I mean like being part of the same line. If I do this then my definition is not on the same line and it is not as small as it is produced by using smallmatrix environment. –  Daniela Diaz Feb 13 '13 at 18:24
    
Well, I guess you could just change \[...\] to $...$. –  xfoo Feb 13 '13 at 18:30
    
Yes, Almost, except for the size. –  Daniela Diaz Feb 13 '13 at 18:35
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.