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.

Why won't these matrices become left-aligned?

\documentclass[11pt,a4paper,oneside]{report} 
\usepackage[pdftex]{graphicx} 
\usepackage[T1]{fontenc} 
\usepackage{fouriernc}
\usepackage{mathtools}
\usepackage{amsfonts,amsmath,amssymb,amsthm}
\usepackage[a4paper, hmargin={3.5cm,3cm}, vmargin={2.5cm,2.5cm}]{geometry} % margin
\usepackage{multicol}


\begin{document}
\begin{align*}
&\renewcommand\arraystretch{1.4}
\begin{bmatrix}
a_{1}&u_{2}&\frac{a_{1}}{d}u_{3}\\
a_{2}&u_{1}&\frac{a_{2}}{d}u_{3}\\
a_{3}&0&u_{4}\\
\end{bmatrix}\\
\intertext{with} 
&\renewcommand\arraystretch{1.4}
\begin{vmatrix}
a_{1}&u_{2}&\frac{a_{1}}{d}u_{3}\\
a_{2}&u_{1}&\frac{a_{2}}{d}u_{3}\\
a_{3}&0&u_{4}
\end{vmatrix}=1
\end{align*}
\end{document}

enter image description here

Thank you

share|improve this question
1  
They are left-aligned, but the delimiter glyph [ in this font has a margin. –  tohecz Sep 2 at 8:49
    
Adding a \! before the bmatrix almost annihilates this margin (~ 0.5pt of difference in alignment). –  Bernard Sep 2 at 9:08
    
Thank you Bernard. It also works nicely. –  user124471 Sep 2 at 9:26

1 Answer 1

up vote 4 down vote accepted

This is a very dirty trick, but it works. It aligns the matrices' elements rather than the delimiters.

enter image description here

\documentclass[11pt,a4paper,oneside]{report} 
\usepackage[pdftex]{graphicx} 
\usepackage[T1]{fontenc} 
\usepackage{fouriernc}
\usepackage{mathtools}
\usepackage{amsfonts,amsmath,amssymb,amsthm}
\usepackage[a4paper, hmargin={3.5cm,3cm}, vmargin={2.5cm,2.5cm}]{geometry} % margin
\usepackage{multicol}


\begin{document}
\begin{gather*}
\renewcommand\arraystretch{1.4}
\begin{bmatrix}
a_{1}&u_{2}&\frac{a_{1}}{d}u_{3}\\
a_{2}&u_{1}&\frac{a_{2}}{d}u_{3}\\
a_{3}&0&u_{4}\\
\end{bmatrix}\mathrel{\phantom{=1}}
\intertext{with} 
\renewcommand\arraystretch{1.4}
\begin{vmatrix}
a_{1}&u_{2}&\frac{a_{1}}{d}u_{3}\\
a_{2}&u_{1}&\frac{a_{2}}{d}u_{3}\\
a_{3}&0&u_{4}
\end{vmatrix}=1
\end{gather*}
\end{document}
share|improve this answer
    
Dirty or not, but it surely does the job. Thank you! –  user124471 Sep 2 at 8:56
    
@user124471 I just realized that the \mathclap construct is a non-sense and can be removed. It is much less dirty now :) –  tohecz Sep 2 at 8:58
    
Ok, I will remove it. Thanks again. –  user124471 Sep 2 at 9:00

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.