[Tex/LaTex] Typesetting commas in bracket vector notation

fractionspunctuationvector

This is my first post so please go easy on me.

I am writing a vector using the bracket notation as shown below:

\[
     \vec{u} = \left\langle \frac{1}{10} , \frac{1}{3} \right\rangle
\]

Fraction Valued Vector, comma centered vertically

The comma is typeset in the center of the fractions in line with the Vinculum (division line), and I'm wondering if there is a way to put it at the bottom in line with the denominators?

Or, is this the proper typesetting notation, and I should just be okay with where it is at?

Best Answer

As User Schrödinger's cat suggested, including \includepackage{amsmath} in the preamble, the following code produces the desired result:

\[\vec{u} = \left\langle \frac{1}{10} \genfrac{}{}{0pt}{}{}{,} \frac{1}{3} \right\rangle\]

For my implementation, I've defined a new macro as a shortcut in the preamble as:

\newcommand{\fraccomma}{\genfrac{}{}{0pt}{}{}{,}}

Then the final code produces:

\[
     \vec{u} = \left\langle \frac{1}{10} \fraccomma \frac{1}{3} \right\rangle
\]

Comma in line with denominators

Edit:

However, as User egreg also pointed out, when implementing this solution we should also consider that it might not be appropriate if not all of the terms are fractions. In that event, then a more appropriate typesetting would be to just leave the comma in it's default position: \vec{u} = \left\langle \frac{1}{10} , 3 \right\rangle