3

I have the following MWE and output:

\documentclass[a4paper]{article}
\usepackage[landscape]{geometry}
\usepackage{booktabs}
\usepackage{siunitx}
\sisetup{per-mode = reciprocal-positive-first
}
\DeclareSIUnit{\esu}{esu}

\begin{document}

\begin{table}
\centering
\sisetup{table-format=3.2}
\begin{tabular}{l c S[table-format=1.8] c c}
    \toprule
    Quantity & Symbol/Expression & {Values} & SI Units & cgs Units \\
    \midrule
    Speed of light in Vacuum & $c$ & 2.99792458 & \SI{e8}{\m.\s^{-1}} & \SI{e10}{\cm.\s^{-1}}\\
    Elementary Charge & $e$ & 4.8032068 & & \SI{e-10}{\esu.\s}\\
    \bottomrule
\end{tabular}
\end{table}

\end{document}

enter image description here

Question

For both the cgs and SI units column, how can I align the units using the siunitx package? What I mean is that the cm s^{-1} and the esu s should be aligned vertically to each other. Right now they are offset from each other because of the negative power on the 10.

2

You could split the \Si{...}{...} material into two columns: the first, right-aligned column contains the \num{...} material and the second, left-aligned column contains the \si{...} material.

enter image description here

\documentclass[a4paper]{article}
\usepackage[landscape]{geometry}
\usepackage{booktabs}
\usepackage{siunitx}
\sisetup{per-mode = reciprocal-positive-first}
\DeclareSIUnit{\esu}{esu}
\begin{document}

\begin{table}
\centering
\sisetup{table-format=3.2}
\begin{tabular}{l c S[table-format=1.8] r@{\,}l r@{\,}l}
    \toprule
    Quantity & Symbol/Expression & {Values} & 
    \multicolumn{2}{c}{SI Units} & 
    \multicolumn{2}{c}{cgs Units} \\
    \midrule
    Speed of light in vacuum & $c$ & 2.99792458 & 
    \num{e8}  & \si{\m.\s^{-1}} & 
    \num{e10} & \si{\cm.\s^{-1}}\\
    Elementary charge & $e$ & 4.8032068 & && 
    \num{e-10} & \si{\esu.\s}\\
    \bottomrule
\end{tabular}
\end{table}
\end{document}
1

Maybe you want one of these? It requires only eqparbox.

\documentclass[a4paper]{article}
\usepackage[landscape]{geometry}
\usepackage{booktabs}
\usepackage{siunitx}
\sisetup{per-mode = reciprocal-positive-first
}
\DeclareSIUnit{\esu}{esu}
\usepackage{eqparbox}

\begin{document}

\begin{table}[!htb]
\centering
\sisetup{table-format=3.2}
\begin{tabular}{l c S[table-format=1.8] cl}
    \toprule
    Quantity & Symbol/Expression & {Values} & SI Units & \multicolumn{1}{c}{cgs Units} \\
    \midrule
    Speed of light in Vacuum & $c$ & 2.99792458 & \SI{e8}{\m.\s^{-1}} & \eqmakebox[U][l]{\num{e10}}\si{\cm.\s^{-1}}\\
    Elementary Charge & $e$ & 4.8032068 & & \eqmakebox[U][l]{\num{e-10}\,}\si{\esu.\s}\\
    \bottomrule
\end{tabular}
\end{table}

\begin{table}[!htb]
\centering
\sisetup{table-format=3.2}
\begin{tabular}{l c S[table-format=1.8] cl}
    \toprule
    Quantity & Symbol/Expression & {Values} & SI Units & \multicolumn{1}{c}{cgs Units} \\
    \midrule
    Speed of light in Vacuum & $c$ & 2.99792458 & \SI{e8}{\m.\s^{-1}} & \eqmakebox[U][r]{\num{e10}}\,\si{\cm.\s^{-1}}\\
    Elementary Charge & $e$ & 4.8032068 & & \eqmakebox[U][r]{\num{e-10}}\,\si{\esu.\s}\\
    \bottomrule
\end{tabular}
\end{table}

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.