我怎样才能重新创建该表?

我怎样才能重新创建该表?

我想使用与该图中使用的相同类型的设置,但是我似乎无法找到如何以一种在编译时不会出错的方式添加多行。

在此处输入图片描述

答案1

实际上没有太多的事情要做:计算要跨越的行数。

\documentclass{article}
\usepackage{geometry}
\usepackage{newpxtext,newpxmath}

\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{multirow}

\DeclareSIUnit{\voltac}{VAC}
\DeclareSIUnit{\kilogrammetre}{kgm}

\begin{document}

\begin{table}[htp]
\centering

\begin{tabular}{ccc}
\toprule
\multirow{9}{*}{PMSG} &
  Rated Power & \qty{2}{\mega\watt} \\
& Rated rotate speed & \qty{650}{rpm} \\
& Rated Voltage & \qty{690}{\voltac} \\
& Rated current & \qty{1673.5}{\ampere} \\
& Number of pole pairs & 4 \\
& Resistance ($R_s$) & \qty{0.0024}{\ohm} \\
& Inductances ($L_d=L_q$) & \qty{0.3552}{\milli\henry} (line-phase) \\
& Magnetic flux ($\Psi_m$) & \qty{0.666}{\weber} \\
& Inertia (J) & \qty{2}{\kilogrammetre^2} \\ 
\midrule
\multirow{3}{*}{Grid side Filter} &
  Inductance & \qty{1.6}{\milli\henry} \\
& Resistance & \qty{0.01}{\ohm} \\
& Rated charge/discharge currents & \qty{1500}{\ampere} \\
\midrule
\end{tabular}

\end{table}

\end{document}

完全的。

在此处输入图片描述

另一方面,这样的表格很难读懂。这里有一个不同的提议。

\documentclass{article}
\usepackage{geometry}
\usepackage{newpxtext,newpxmath}

\usepackage{siunitx}
\usepackage{booktabs}

\DeclareSIUnit{\voltac}{VAC}
\DeclareSIUnit{\voltrms}{Vrms}

\begin{document}

\begin{table}[htp]
\centering

\newcommand{\partheader}[1]{\multicolumn{2}{@{}l}{\itshape #1}}

\begin{tabular}[t]{@{\quad}lll@{}}
\toprule
\partheader{PMSG} \\
  Rated Power & \qty{2}{\mega\watt} \\
  Rated rotate speed & \qty{650}{rpm} \\
  Rated Voltage & \qty{690}{\voltac} \\
  Rated current & \qty{1673.5}{\ampere} \\
  Number of pole pairs & 4 \\
  Resistance & \qty{0.0024}{\ohm} & $R_s$ \\
  Inductances & \qty{0.3552}{\milli\henry} & $L_d=L_q$, line-phase \\
  Magnetic flux & \qty{0.666}{\weber} & $\Psi_m$ \\
  Inertia & \qty{2}{\kilogram\square\metre} & J \\ 
\midrule
\partheader{Grid side Filter} \\
  Inductance & \qty{1.6}{\milli\henry} \\
  Resistance & \qty{0.01}{\ohm} \\
  Rated currents & \qty{1500}{\ampere} & charge/discharge \\
\midrule
\partheader{Grid} \\
  Voltage & \qty{690}{\voltrms} \\
  Frequency & \qty{50}{\hertz} \\
\midrule
\partheader{Generator Side Filter} \\
  Inductance & \qty{1}{\milli\henry} \\
  Resistance & \qty{0.01}{\ohm} \\
\midrule
\partheader{DC-link} \\
  Total power & \qty{265}{\kilo\watt} \\
  DC-link voltage & \qty{1200}{\volt} & $V_{\mathrm{dc}}$ \\
  DC-link current & \qty{1000}{\ampere} & $I_{\mathrm{dc\_max}}$ \\
\midrule
\partheader{Supercapacitor} \\
  Capacitance & \qty{15.8}{\farad} & \qty{83}{\farad}, 21 in series, 4 parallel loop \\
  Resistance & \qty{52.5}{\milli\ohm} & $R_{\mathrm{sc}}$ \\
  Voltage Initial & \qty{650}{\volt} & $V_{\mathrm{initial}}$, $C_{\mathrm{sc\_nominal}}$ \qty{48}{\volt} each \\
\midrule
\partheader{Reference Values} \\
  Active Power & \qty{265}{\kilo\watt} \\
  Reactive Power & 0 \\
\midrule
\partheader{Other} \\
  Sample Time Rec. & \qty{1e-4}{\second} \\
  Sample Time Inv. & \qty{1e-4}{\second} \\
  Sample Time bidirectional & \qty{7e-5}{\second} \\
  Simulator Run Time & \qty{20}{\second} \\
\bottomrule
\end{tabular}

\end{table}

\end{document}

在此处输入图片描述

相关内容