排版黏滯阻尼係數

排版黏滯阻尼係數

我想像這樣排版阻尼係數(力道/速度)

c = 100 N/(m/s)

或者

               -1
c = 100 N (m/s)

使用 LaTeX 和siunitx包,但我不知道是否可以進行我想做的那種分組。

你可以幫幫我嗎?

答案1

\documentclass[12pt]{article}
\usepackage{siunitx}
% \usepackage{amsmath}

\begin{document}

First method, from @Sebastiano:
\begin{verbatim}
$c=100\, \unit{N \per(\meter\per\second)}$ or $c=\,100 \unit{N (m\per s)^{-1}}$
\end{verbatim}

$c=100\, \unit{N \per(\meter\per\second)}$ or $c=\,100 \unit{N (m\per s)^{-1}}$

\vspace{1ex}
Same, but with the thin space separating the number from the units in the second case corrected:

\begin{verbatim}
$c=100\, \unit{N \per(\meter\per\second)}$ or $c=100 \, \unit{N (m\per s)^{-1}}$
\end{verbatim}

$c=100\, \unit{N \per(\meter\per\second)}$ or $c=100 \, \unit{N (m\per s)^{-1}}$

\vspace{1ex}
Another approach which uses a fractional form.  This wasn't requested by the original poster, but I personally find it more readable:
\begin{verbatim}
$c = \qty{100}{\frac{N}{m/s}}$
\end{verbatim}

$c = \qty{100}{\frac{N}{m/s}}$

\end{document}

在此輸入影像描述

答案2

怎麼樣這個?

\documentclass[12pt]{article}
\usepackage{siunitx}

\begin{document}
$c=100\, \unit{N \per(\meter\per\second)}$ or $c=\,100 \unit{N (m\per s)^{-1}}$
\end{document}

在此輸入影像描述

相關內容