我的表格对于页面来说似乎太宽了。如何调整它

我的表格对于页面来说似乎太宽了。如何调整它
\begin{table}[ht!]
\centering
\caption{Implementation of Volt/VAR Control and CVR.}
\begin{tabular}{|l|l|l|l|}
\hline
Step & Description  & Phase & Benefit \\
\hline \multirow{5}{*}{1} & Capacitors installed on substation & \multirow{5}{*}{Traditional Starting Point} & Power factor penalties are avoided \\ 
\cline{2-2} \cline{4-4} & Load tap changer on substation transformer & & Substation voltage is periodically adjusted \\ 
\cline{2-2} \cline{4-4}  & Substation feeder regulators & & Feeder voltage can be adjusted independently \\ 
\cline{2-2} \cline{4-4} & Fixed and switched feeder capacitors (stand-alone) & & Reduction of line losses (capacity and voltage is improved) \\
\cline{2-2} \cline{4-4} & Feeder regulators (stand-alone) & & Basic voltage maintenance \\ 
\hline \multirow{2}{*}{2} & VAR optimization with additional fixed/switched capacitors & \multirow{2}{*}{Integrated Volt/VAR Control (IVVC)} & Advanced reduction of line losses and improved voltage/capacity  \\ 
\cline{2-2} \cline{4-4} & Voltage profile optimization & & Advanced control of voltage profile and system operating efficiency \\
\hline \multirow{3}{*}{3} & Manual control of regulators and capacitors using SCADA & \multirow{3}{*}{Basic CVR} & Reduction of peak demand using CVR \\ 
\cline{2-2} \cline{4-4} & Line Drop Compensation settings in regulators (not using SCADA) & & Peak demand and energy reduction using CVR \\ 
\cline{2-2} \cline{4-4} & Local capacitor controls (not using SCADA) & & Peak demand and energy reduction using CVR \\ 
\hline \multirow{2}{*}{4} & Integrated monitoring with Advanced Metering Infrastructure and feeder Distribution Automation equipment & \multirow{2}{*}{Advanced CVR} & Continuous feedback for real-time decision-making \\ 
\cline{2-2} \cline{4-4} & Dynamic CVR through Distribution Management System or other Distribution Automation control software & & \\ 
\hline
\end{tabular}
\label{Table 2}
\end{table}

答案1

如果不了解一些非常重要的参数,例如字体和字体大小以及文本块的宽度和高度,就不可能给出明确的解决方案。不过,很明显,如果您希望表格能够适合文本块的宽度,您需要让第 2、3 和 4 列的内容换行。

以下代码使用 LaTeXp列类型的修改形式来表示第 2 至第 4 列。它还使用longtable环境,因为材料可能不适合一页(除非文本块很宽)。请注意,我已放弃所有垂直线和\cline-type 水平线;其余几条已被软件包提供的规则绘制宏替换booktabs。我用替换了几个/(“斜线”)字符,\slash以便让 LaTeX 在字符后插入换行符。(表格标题上方的水平线只是为了说明文本块的宽度。)

下面的截图大致显示了包含上述建议的上半部分longtable。顺便说一句,我不禁觉得第 2 列和第 3 列的顺序可能应该颠倒一下。然而,这个想法并没有在这里使用的代码中实现。

enter image description here

\documentclass{article}

\usepackage{longtable,array,ragged2e,booktabs}
\newcolumntype{P}[1]{>{\hangindent=1em \hangafter=1 
                       \RaggedRight\arraybackslash}p{#1}}
\setlength\tabcolsep{4pt}  % default: 6pt

\usepackage[english]{babel}
\begin{document}

\hrule  % just to demonstrate width of text block

\begin{longtable}{@{} l
     P{0.32\textwidth}
     P{0.23\textwidth}
     P{0.32\textwidth} @{}}

\caption{Implementation of Volt/VAR Control and CVR.} 
\label{Table 2}\\

\toprule
Step & Description  & Phase & Benefit \\
\midrule
\endfirsthead

\multicolumn{4}{c}{Table \ref{Table 2}, continued}\\
\addlinespace
\toprule
Step & Description  & Phase & Benefit \\
\midrule
\endhead

\addlinespace
\multicolumn{4}{r@{}}{\small (continued)}\\
\endfoot

\bottomrule
\endlastfoot

1 & Capacitors installed on substation 
  & Traditional Starting Point 
  & Power factor penalties are avoided \\ 
  & Load tap changer on substation transformer & 
  & Substation voltage is periodically adjusted \\ 
  & Substation feeder regulators & 
  & Feeder voltage can be adjusted independently \\ 
  & Fixed and switched feeder capacitors (stand-alone) & 
  & Reduction of line losses (capacity and voltage is improved) \\
  & Feeder regulators (stand-alone) & 
  & Basic voltage maintenance \\ 
\midrule 
2 & VAR optimization with additional fixed\slash switched capacitors 
  & Integrated Volt\slash VAR Control (IVVC) 
  & Advanced reduction of line losses and improved voltage\slash capacity  \\ 
  & Voltage profile optimization & 
  & Advanced control of voltage profile and system operating efficiency \\
\midrule
3 & Manual control of regulators and capacitors using SCADA 
  & Basic CVR 
  & Reduction of peak demand using CVR \\ 
  & Line Drop Compensation settings in regulators (not using SCADA) & 
  & Peak demand and energy reduction using CVR \\ 
  & Local capacitor controls (not using SCADA) & 
  & Peak demand and energy reduction using CVR \\
\midrule 
4 & Integrated monitoring with Advanced Metering Infrastructure and feeder Distribution Automation equipment 
  & Advanced CVR 
  & Continuous feedback for real-time decision-making \\ 
  & Dynamic CVR through Distribution Management System or other Distribution Automation control software & 
  & \\ 
\end{longtable}

\end{document}

答案2

您也可以尝试 \maxsizebox{\textwidth}{\textheight} { 你的表格 } ,使用 adjustbox

相关内容