改善餐桌布局

改善餐桌布局

关于如何改善此表格布局,您有什么想法吗?恕我直言,它看起来很糟糕。

在此处输入图片描述

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{amsmath}

\begin{document}
\begin{table}[!h]
\centering
\begin{tabular}{c|c|c|c|c|c|c}
\toprule
\bfseries{Grandezza}&\bfseries{\makecell{Unità di \\ misura}}&\(\boldsymbol{t_a}\)&\(\boldsymbol{t_d}\)&\(\boldsymbol{t_p}\)&\bfseries{RMS}&\bfseries{Picco}\\ \hline \\[-1em]
\(\Delta t_i\)  &   \(s\)   &   0.2 & 0.2   &   0.3 &   &\\ \hline \\[-1em]
\(\dot{\theta}_{C}^{MAX}\)  &   \(rad/s\)   & 7.85  & 7.85 & 0  &  & 7.85 \\ 
\hline \\[-1em]
\(\overline{\dot{\theta}}_{C}\) &   \(rad/s\)   & 3.93  & 3.93  & 0 & 3.43 & 
\\ \hline \\[-1em]
 \(\ddot{\theta}_{C}^{MAX}\)& \(rad/s^{2}\) &   39.3 & -39.3    &   0 & 29.7 & 39.3 \\ \hline \\[-1em]
\(J_t\cdot\ddot{\theta}_{C}\)& \(Nm\)   & 66.81 &-66.81 & 0 &   & \\ \hline \\[-1em]
\(C_c\) & \(Nm\)&   1.4 &   1.4 &   0 & & \\ \hline \\[-1em]
\(C_{pd}\) & \(Nm\)  &  0.3 &   0 & 0 & & \\ \hline \\[-1em]
\(C_v^{Picco}\) & \(Nm\) &  1.57 &  1.57  & 0 & & \\ \hline \\[-1em]
\(C_v^{Medio}\) & \(Nm\) &  0.79 &  0.79  & 0 & & \\ \hline \\[-1em]
\(C_R^{Picco}\) & \(Nm\) &  3.27 &  2.97  & 0 & & \\ \hline \\[-1em]
\(T_{2}^{Picco}\)&\(Nm\)    & 70.1  & -63.8 & 0 &   & 70.1 \\ \hline \\[-1em]
\(T_{2}^{Media}\)&\(Nm\)    & 69.3  & -64.6 & 0 & 50.7  &  \\ \hline \\[-1em]
Tipo di moto & - &  Dir. & Retr. & - &  & \\ \hline \\[-1em]
&   &   &   &   &   & \\ \hline \\[-1em]
&   &   &   &   &   & \\ \hline \\[-1em]
&   &   &   &   &   & \\ 
\bottomrule
\end{tabular}
\caption{Tabella riassuntiva per il dimensionamento del riduttore della tavola rotante}
\label{tab:dimensionamento_tavola_rotante}
\end{table}
\end{document}

答案1

这里对表格代码做了一些改进和简化。对于与表格宽度相等的标题宽度,最简单的方法是使用环境来threeparttable测量此宽度。此外,我\overline{\dot{\theta}}在第一行用替换了\widebar{\dot{\theta}},这借鉴了mathabx字体包,考虑到数学希腊字母是斜体的。

\documentclass[a4paper, italian]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} 
\usepackage{babel}
\usepackage[showframe]{geometry}
\usepackage[table, svgnames]{xcolor}
\usepackage{siunitx}
\def\rd{\radian}
\usepackage{amsmath}
\usepackage{makecell, booktabs, threeparttable}
\renewcommand{\theadfont}{\small\bfseries\boldmath}
\newcommand{\colhead}[1]{{\small\bfseries\boldmath#1}}

\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
<-6> mathx5 <6-7> mathx6 <7-8> mathx7
<8-9> mathx8 <9-10> mathx9
<10-12> mathx10 <12-> mathx12
}{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}
\DeclareMathAccent{\widebar}{0}{mathx}{"73}

\begin{document}

\begin{table}[!htb]
\centering\sisetup{per-mode = symbol, table-format = 2.2, table-number-alignment = center}
\renewcommand{\arraystretch}{1.6}
\setlength{\tabcolsep}{9pt}
\begin{threeparttable}
\rowcolors{2}{WhiteSmoke!80!Lavender}{Gainsboro!50!Lavender}
\begin{tabular}{ >{$}l<{$}cSS[table-format=-2.2]S[table-format=1.1]SS}
\rowcolor{SlateGray!40}
\textbf{\small Grandezza} & \thead{Unità di\\misura}& \colhead{$t_a$} & \colhead{$t_d$} & \colhead{$t_p$}
& \colhead{RMS} & \colhead{Picco} \\
 \Delta t_i & \si{\second} & 0.2 & 0.2 & 0.3 & &\\
\dot{\theta}_{C}^{\max} & \si{\rd\per\s} & 7.85 & 7.85 & 0 & & 7.85 \\
\widebar{\dot{\theta}}_{C} & \si{\rd\per\s} & 3.93 & 3.93 & 0 & 3.43 & \\
\ddot{\theta}_{C}^{\max} & \si{\rd\per\square\s} & 39.3 & -39.3 & 0 & 29.7 & 39.3 \\
J_t\cdot\ddot{\theta}_{C} & \si{\N\m} & 66.81 & -66.81 & 0 & & \\
C_c & \si{\N\m}& 1.4 & 1.4 & 0 & & \\
C_\text{pd} & \si{\N\m} & 0.3 & 0 & 0 & & \\
C_v^\text{Picco} & \si{\N\m} & 1.57 & 1.57 & 0 & & \\
C_v^\text{Medio} & \si{\N\m} & 0.79 & 0.79 & 0 & & \\
C_R^\text{Picco} & \si{\N\m} & 3.27 & 2.97 & 0 & & \\
T_{2}^\text{Picco} &\si{\N\m} & 70.1 & -63.8 & 0 & & 70.1 \\
T_{2}^\text{Media} &\si{\N\m} & 69.3 & -64.6 & 0 & 50.7 & \\
\text{Tipo di moto} & -- & {Dir.} & {Retr.} & {--} & & \\
\end{tabular}
\caption{Tabella riassuntiva per il dimensionamento del riduttore della tavola rotante}
\label{tab:dimensionamento_tavola_rotante}
\end{threeparttable}
\end{table}

\end{document} 

在此处输入图片描述

答案2

一些建议:

  • 水平线数量较少,但间距更好

  • 没有垂直线。没有!

  • 使用array环境而不是tabular环境。

  • 用于\si单位

  • 使用S数字列的列类型

在此处输入图片描述

\documentclass{article}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{booktabs,makecell,amsmath,siunitx}
\sisetup{per-mode=symbol}
\begin{document}
\begin{table}[!h]
\renewcommand\arraystretch{1.33}
\centering
$\begin{array}{@{} lc S[table-format=2.2]
                      S[table-format=-2.2]
                      S[table-format=1.1]
                      S[table-format=2.2]
                      S[table-format=2.2] @{}}
\toprule
\text{\bfseries Grandezza}&
\makecell{\text{\bfseries Unità di}\\ \text{\bfseries misura}}&
{\boldsymbol{t_a}} &
{\boldsymbol{t_d}} &
{\boldsymbol{t_p}} &
{\text{\bfseries RMS}} &
{\text{\bfseries Picco}}\\ 
\midrule
\Delta t_i  & \si{\second} &   0.2 & 0.2   &   0.3 &   &\\  
\dot{\theta}_{C}^{\mathrm{MAX}} & \si{\radian\per\second} & 7.85 & 7.85 & 0  &  & 7.85 \\ 
\bar{\dot{\theta}}_{C}          & \si{\radian\per\second} & 3.93 & 3.93  & 0 & 3.43 & \\  
\ddot{\theta}_{C}^{\mathrm{MAX}}& \si{\radian\per\second\squared}& 39.3 & -39.3 & 0 & 29.7 & 39.3 \\  
J_t\cdot\ddot{\theta}_{C}& \si{\newton\meter} & 66.81 &-66.81 & 0 & & \\  
C_c                      & \si{\newton\meter}  &   1.4 &   1.4 &   0 & & \\  
C_{pd}                   & \si{\newton\meter} &  0.3 &   0 & 0 & & \\  
C_v^{\mathrm{Picco}}     & \si{\newton\meter} &  1.57 &  1.57  & 0 & & \\  
C_v^{\mathrm{Medio}}     & \si{\newton\meter} &  0.79 &  0.79  & 0 & & \\  
C_R^{\mathrm{Picco}}     & \si{\newton\meter} &  3.27 &  2.97  & 0 & & \\  
T_{2}^{\mathrm{Picco}}   & \si{\newton\meter} & 70.1  & -63.8 & 0 &   & 70.1 \\  
T_{2}^{\mathrm{Media}}   & \si{\newton\meter} & 69.3  & -64.6 & 0 & 50.7  &  \\  
\text{Tipo di moto}      & \text{--}          & {\text{Dir.}} & {\text{Retr.}} & \text{--} & & \\
\bottomrule
\end{array}$
\caption{Tabella riassuntiva per il dimensionamento del riduttore della tavola rotante}
\label{tab:dimensionamento_tavola_rotante}
\end{table}
\end{document}

答案3

这是一个版本(没有垂直线,尽管你喜欢它们)。进一步的改进:

  • 排版单位siunitx(您可以使用它的选项来改变外观)
  • 尽可能将列左对齐,并在小数点处对列进行编号
  • 调整了垂直间距(最左边的列是一个垂直怪物)

您可以考虑:

  • 将标题宽度更改为表格宽度
  • 使小数位数保持一致

桌子

代码:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{array}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{amsmath}

\begin{document}
\begin{table}[!h]
\centering
\renewcommand{\arraystretch}{1.4}
\begin{tabular}{llS[table-format=2.2]SSS[table-format=2.2]S[table-format=2.2]}
\toprule
Grandezza & Unità di & $t_a$ & {$t_d$} & $t_p$ & {RMS} & {Picco}\\[-.4em]
& misura & & & & &\\\midrule
\(\Delta t_i\)  &   \si{\second}   &   0.2 & 0.2   &   0.3 &   &\\
\(\dot{\theta}_{C}^{MAX}\)  &   \si{\radian\per\second}   & 7.85  & 7.85 & 0  &  & 7.85 \\ 
\(\overline{\dot{\theta}}_{C}\) &   \si{\radian\per\second}   & 3.93  & 3.93  & 0 & 3.43 & \\
 \(\ddot{\theta}_{C}^{MAX}\)& \si{\radian\per\square\second} &   39.3 & -39.3    &   0 & 29.7 & 39.3 \\
\(J_t\cdot\ddot{\theta}_{C}\)& \si{\newton\metre}   & 66.81 & -66.81 & 0 &   & \\
\(C_c\) & \si{\newton\metre}&   1.4 &   1.4 &   0 & & \\
\(C_{pd}\) & \si{\newton\metre}  &  0.3 &   0 & 0 & & \\
\(C_v^{Picco}\) & \si{\newton\metre} &  1.57 &  1.57  & 0 & & \\
\(C_v^{Medio}\) & \si{\newton\metre} &  0.79 &  0.79  & 0 & & \\ 
\(C_R^{Picco}\) & \si{\newton\metre} &  3.27 &  2.97  & 0 & & \\
\(T_{2}^{Picco}\)&\si{\newton\metre}    & 70.1  & -63.8 & 0 &   & 70.1 \\
\(T_{2}^{Media}\)&\si{\newton\metre}    & 69.3  & -64.6 & 0 & 50.7  &  \\
Tipo di moto & -- &  {Dir.} & {Retr.} & {--} &  & \\
\bottomrule
\end{tabular}
\caption{Tabella riassuntiva per il dimensionamento del riduttore della tavola rotante}
\label{tab:dimensionamento_tavola_rotante}
\end{table}
\end{document}

编辑:这是一个带有“水平规则”的版本,看起来并不是太糟糕。

有色

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[table]{xcolor}
\usepackage{siunitx}
\usepackage{amsmath}
\begin{document}
\begin{table}[!h]
\centering
\renewcommand{\arraystretch}{1.6}
\setlength{\tabcolsep}{9pt}
\rowcolors{2}{black!2}{gray!20}
\begin{tabular}{llS[table-format=2.2]SSS[table-format=2.2]S[table-format=2.2]}
\rowcolor{gray!40}Grandezza & Unità di & $t_a$ & {$t_d$} & $t_p$ & {RMS} & {Picco}\\[-.4em]
\rowcolor{gray!40}& misura & & & & &\\
\(\Delta t_i\)  &   \si{\second}   &   0.2 & 0.2   &   0.3 &   &\\
\(\dot{\theta}_{C}^{MAX}\)  &   \si{\radian\per\second}   & 7.85  & 7.85 & 0  &  & 7.85 \\ 
\(\overline{\dot{\theta}}_{C}\) &   \si{\radian\per\second}   & 3.93  & 3.93  & 0 & 3.43 & \\
 \(\ddot{\theta}_{C}^{MAX}\)& \si{\radian\per\square\second} &   39.3 & -39.3    &   0 & 29.7 & 39.3 \\
\(J_t\cdot\ddot{\theta}_{C}\)& \si{\newton\metre}   & 66.81 & -66.81 & 0 &   & \\
\(C_c\) & \si{\newton\metre}&   1.4 &   1.4 &   0 & & \\
\(C_{pd}\) & \si{\newton\metre}  &  0.3 &   0 & 0 & & \\
\(C_v^{Picco}\) & \si{\newton\metre} &  1.57 &  1.57  & 0 & & \\
\(C_v^{Medio}\) & \si{\newton\metre} &  0.79 &  0.79  & 0 & & \\ 
\(C_R^{Picco}\) & \si{\newton\metre} &  3.27 &  2.97  & 0 & & \\
\(T_{2}^{Picco}\)&\si{\newton\metre}    & 70.1  & -63.8 & 0 &   & 70.1 \\
\(T_{2}^{Media}\)&\si{\newton\metre}    & 69.3  & -64.6 & 0 & 50.7  &  \\
Tipo di moto & -- &  {Dir.} & {Retr.} & {--} &  & \\
\end{tabular}
\caption{Tabella riassuntiva per il dimensionamento del riduttore della tavola rotante}
\label{tab:dimensionamento_tavola_rotante}
\end{table}
\end{document}

答案4

这是另一个建议,使用垂直线,减少水平线。

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{amsmath}
\usepackage{siunitx}


\begin{document}
\begin{table}[!h]
\renewcommand{\arraystretch}{1.4}
\centering
\begin{tabular}{l|l|S[table-format=2.2]|S[table-format=-2.2]|S[table-format=1.1]|S[table-format=2.2]|S[table-format=2.2]}
\hline
\bfseries{Grandezza}&\bfseries{\makecell{Unità di \\ misura}}&\(\boldsymbol{t_a}\)&\(\boldsymbol{t_d}\)&\(\boldsymbol{t_p}\)&\bfseries{RMS}&\bfseries{Picco}\\\hline
\(\Delta t_i\)  &   \si{\s}   &   0.2 & 0.2   &   0.3 &   &\\ 
\(\dot{\theta}_{C}^{MAX}\)  &  \si{\radian\per\s}  & 7.85  & 7.85 & 0  &  & 7.85 \\ 

\(\overline{\dot{\theta}}_{C}\) &   \si{\radian\per\s}   & 3.93  & 3.93  & 0 & 3.43 & 
\\ 
 \(\ddot{\theta}_{C}^{MAX}\)& \si{\radian\per\s\square} &   39.3 & -39.3    &   0 & 29.7 & 39.3 \\ \hline
\(J_t\cdot\ddot{\theta}_{C}\)& \si{\newton\metre}   & 66.81 &-66.81 & 0 &   & \\ 
\(C_c\) & \si{\newton\metre}&   1.4 &   1.4 &   0 & & \\ 
\(C_{pd}\) & \si{\newton\metre}  &  0.3 &   0 & 0 & & \\ 
\(C_v^{Picco}\) & \si{\newton\metre} &  1.57 &  1.57  & 0 & & \\ \hline
\(C_v^{Medio}\) & \si{\newton\metre} &  0.79 &  0.79  & 0 & & \\ 
\(C_R^{Picco}\) & \si{\newton\metre} &  3.27 &  2.97  & 0 & & \\ 
\(T_{2}^{Picco}\)& \si{\newton\metre}    & 70.1  & -63.8 & 0 &   & 70.1 \\
\(T_{2}^{Media}\)& \si{\newton\metre}   & 69.3  & -64.6 & 0 & 50.7  &  \\ \hline
Tipo di moto & - &  {Dir.} & {Retr.} & {-} &  & \\ 
&   &   &   &   &   & \\
&   &   &   &   &   & \\
&   &   &   &   &   & \\ 
\hline
\end{tabular}
\caption{Tabella riassuntiva per il dimensionamento del riduttore della tavola rotante}
\label{tab:dimensionamento_tavola_rotante}
\end{table}


\end{document}

在此处输入图片描述

相关内容