2

I realized that when I put the power on the unit, the m/s^2 is displayed inline instead of in a \frac format.

MWE:

\documentclass[12pt]{article}
\usepackage{units}
\usepackage{siunitx}
\usepackage{amsmath}
\usepackage[margin=1in]{geometry}

\begin{document}
    \begin{equation*}
        \SI[per-mode=fraction]{9.81}{\meter\per\second}
    \end{equation*}
    \begin{equation*}
        \SI[per-mode=fraction]{9.81}{\meter\per\second^2}
    \end{equation*}
\end{document}

Output:

current output

Is there a way to display m/s^2 in a \frac format?

1 Answer 1

1

Generally, in the siunitx package they want you to type units in a similar way you would express those same units orally. For example:

\documentclass[12pt]{article}
%\usepackage{units}
\usepackage{siunitx}
\usepackage{amsmath}
\usepackage[margin=1in]{geometry}

\begin{document}
    \begin{equation*}
        %\SI[per-mode=fraction]{9.81}{\meter\per\second}
        \SI[per-mode=fraction]{9.81}{\meter\per\second\squared}
        \quad
        \SI[per-mode=fraction]{9.81}{\meter\per\square\second}
    \end{equation*}
    \begin{equation*}
        \SI[per-mode=fraction]{9.81}{\meter\per\second^2}
    \end{equation*}
\end{document}
1
  • 1
    Perhaps add that \meter\per\second^2 is treated as 'literal' input: there's no attempt to parse it, rather siunitx simply typesets the input in math mode.
    – Joseph Wright
    Feb 21 at 7:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .