请问如何对齐第一部分和第二部分 od 表?
\documentclass[12pt,a4paper]{report}
\usepackage{booktabs, makecell}
\usepackage[output-decimal-marker={,}]{siunitx}
\begin{document}
\begin{table}[htb]
\small
\setlength\tabcolsep{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}
c
S[table-format=1.6(2)]
S[table-format=5.3(2)]
S[table-format=1.4(2)]
S[table-format=3.1(2)]
cc
}
\Xhline{4\arrayrulewidth}
&&&&&&\\[-10pt]
\makecell[t]{Číslo\\ zdroje}
& {\makecell[t]{$a$\\ ($\mathrm{M}_{\odot}$)}}
& {\makecell[t]{$i$\\ (\si{\degree})}}
& {\makecell[t]{$q = \frac{M_2}{M_1}$}}
& {\makecell[t]{$\omega$\\ (\si{\degree})}}
& {\makecell[t]{$i$\\ ($\mathrm{M}_{\odot}$)}}
& {\makecell[t]{$a$\\ ($\mathrm{M}_{\odot}$)}} \\
\midrule
5 & 43,9(3) & 81,0(11) & 0,3821 & & & \\
\Xhline{4\arrayrulewidth}
\multicolumn{7}{l}{\footnotesize \textit{Pozn:}
Čísla v závorkách jsou chyby posledních uvedených cifer.}
\end{tabular*}
\end{table}
\end{document}
编辑
\documentclass[12pt,a4paper]{report}
\usepackage{booktabs, makecell,amsmath, graphicx}
\usepackage[output-decimal-marker={,}]{siunitx}
\newcommand\stack[1]{\multicolumn{1}{c}{\shortstack{#1}}}
\begin{document}
\begin{table}[htb]
\small\centering
\begin{tabular}{@{}
c
S[table-format=3.2(2)]
S[table-format=3.2(2)]
S[table-format=1.4]
S[table-format=2.3(2)]
S[table-format=2.3(2)]
S[table-format=6.0]
}\Xhline{4\arrayrulewidth}
&&&&&&\\[-10pt]
\shortstack{Číslo\\ zdroje}
& \stack{$q = \dfrac{M_2}{M_1}$}
& \stack{$M_1$\\ ($\mathrm{M}_{\odot}$)}
& \stack{$M_2$ \\ ($\mathrm{M}_{\odot}$)}
& \stack{$R_1$\\ ($\mathrm{R}_{\odot}$)}
& \stack{$R_2$\\ ($\mathrm{R}_{\odot}$)}
& \stack{$V_{\gamma}$\\ (\si{\kilo\meter\per\second})} \\\midrule
5 & 43,9(3) & 81,0(11) & 0,3821 &3,534(55) &
5,615(84) & 30000 \\
6 & 43,0(24) & 76,4 & 0,3906 &
& & \\
\Xhline{4\arrayrulewidth}
\end{tabular}
\smallskip
\resizebox{\linewidth}{!}{\textit{Pozn:}
Čísla v závorkách jsou chyby posledních uvedených cifer. $^*$značí fixované
parametry.}
\caption{Příklady zjištěných parametrů II}
\end{table}
\end{document}
答案1
使用
\documentclass[12pt,a4paper]{report}
\usepackage{booktabs, makecell,amsmath, graphicx}
\usepackage[output-decimal-marker={,}]{siunitx}
\newcommand\stack[1]{\multicolumn{1}{c}{\shortstack{#1}}}
\begin{document}
\begin{table}[htb]
\small\centering
\begin{tabular}{@{}
c
S[table-format=3.2(2)]
S[table-format=3.2(2)]
S[table-format=1.4]
S[table-format=2.3(2)]
S[table-format=2.3(2)]
S[table-format=6.0]
}\Xhline{4\arrayrulewidth}
&&&&&&\\[-10pt]
\shortstack{Číslo\\ zdroje}
& \stack{$a$\\ ($\mathrm{M}_{\odot}$)}
& \stack{$i$\\ ($\si{\degree}$)}
& \stack{$q = \dfrac{M_2}{M_1}$}
& \stack{$\Omega_1$\\ ($\si{\degree}$)}
& \stack{$\Omega_2$\\ ($\si{\degree}$)}
& \stack{$T_1$\\ ($\mathrm{K}$)} \\\midrule
5 & 43,9(3) & 81,0(11) & 0,3821 &3,534(55) &
5,615(84) & 30000$^*$ \\
6 & 43,0(24) & 76,4$^*$ & 0,3906 &
& & \\
\Xhline{4\arrayrulewidth}
\end{tabular}
\smallskip
\resizebox{\linewidth}{!}{\textit{Pozn:}
Čísla v závorkách jsou chyby posledních uvedených cifer. $^*$značí fixované
parametry.}
\caption{Příklady zjištěných parametrů II}
\end{table}
\end{document}
答案2
通过利用已加载的包并根据我之前对您(几乎相同)问题的回答:
\documentclass[12pt,a4paper]{report}
\usepackage{booktabs, makecell}
\usepackage{amsmath, amssymb, bm}
\usepackage[output-decimal-marker={,},
table-align-text-post=false]{siunitx}
\begin{document}
\begin{table}[htb]
\small
\setlength\tabcolsep{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}
c
S[table-format=2.1(1)]
S[table-format=2.1(2)]
S[table-format=1.4]
S[table-format=1.3(2)]
S[table-format=1.3(2)]
S[table-format=5.0,
table-space-text-post={*}]
}
\toprule
\makecell{Číslo\\ zdroje}
& {\makecell{$a$\\ ($\mathrm{M}_{\odot}$)}}
& {\makecell{$i$\\ (\si{\degree})}}
& {\makecell{$q = \frac{M_2}{M_1}$}}
& {\makecell{$\omega$\\ (\si{\degree})}}
& {\makecell{$i$\\ ($\mathrm{M}_{\odot}$)}}
& {\makecell{$a$\\ ($\mathrm{M}_{\odot}$)}} \\
\midrule
5 & 43,9(3) & 81,0(11) & 0,3821 &3,534(55) &
5,615(84) & 30000$^*$ \\
6 & 43,0(24) & 76,4$^*$ & 0,3906 &
& & \\
\midrule[\heavyrulewidth]
\multicolumn{7}{l}{\footnotesize \textit{Pozn:}
Čísla v závorkách jsou chyby posledních uvedených cifer.}
\end{tabular*}
\end{table}
\end{document}