2

How do you make commas in mathematical equations align with the bottom of mathematical equations, looking something like this:

\linespread{0.6}

$\begin{bmatrix}[1.6] a\\b\\ \end{bmatrix}$\\
\-\hspace{3.5ex}$^{,}$

Instead of the normal behaviour, which puts the comma in the middle

$\begin{bmatrix} a\\b\\ \end{bmatrix},$

Similar behaviour with tall maths equations. Is there a way to correct these?

(The [1.6] is from here:How can I increase the line spacing in a matrix?)

lijvt
  • 21
  • 2

2 Answers2

2

Try this:

\def\lowcomma{_{\textstyle,}}

and you can use it:

${\begin{bmatrix}[1.6] a\\b\\ \end{bmatrix}}\lowcomma$
2

This approach uses \smallmatrix to get an inline matrix that doesn’t leave the text baseline, and adjustbox to lower the comma by the amount of its height. It declares the \lowcomma as math punctuation to get the spacing right.

\documentclass[varwidth, preview]{standalone}

\usepackage{amsmath}
\usepackage{unicode-math}
\usepackage{adjustbox}

\newlength\commaheight

\newcommand\lowcomma{%
\settoheight{\commaheight}{\text{,}}%
\mathpunct{\adjustbox{valign=b,raise=-\commaheight}{\text{,}}}%
}

\begin{document}
\linespread{0.6}

\( \left[\begin{smallmatrix} a\\b\\ \end{smallmatrix}\right]
\lowcomma
\)
\end{document}

Image

Davislor
  • 44,045