I need to typeset some augmented matrices, but some of them contain fractions.
I also need to do that with gmatrix
, as I need its features.
The following code is used to create the line in between the entries:
\newcommand{\mline}{%
\hspace{-\arraycolsep}%
\strut\vrule
\hspace{-\arraycolsep}%
}
With that I can create something like this:
Code:
\begin{align}
\begin{gmatrix}[p]
1 & 2 & 3 & \mline & 40 \\
2 & 3 & 4 & \mline & 500 \\
3 & 4 & 5 & \mline & 6000
\end{gmatrix}
\end{align}
But when it contains fractions, it looks more like this:
Code:
\begin{align}
\begin{gmatrix}[p]
1 & 2 & \frac{1}{3} & \mline & 40 \\
2 & 3 & \frac{1}{4} & \mline & 500 \\
3 & 4 & 5 & \mline & \frac{1}{6}
\end{gmatrix}
\end{align}
The line gets kind of dashed which does not really work. It also looks unaesthetic that the fractions almost touch.
I hope you are able to help me.
Best Answer
I can offer you a manual fix:
For conflicting fractions, use a new
\gfrac
macroHowever, my advice is to use the slashed form for fractions.