![表格环境后的空间](https://linux22.com/image/347662/%E8%A1%A8%E6%A0%BC%E7%8E%AF%E5%A2%83%E5%90%8E%E7%9A%84%E7%A9%BA%E9%97%B4.png)
我想在表格环境后添加一个空格。我尝试使用 \vspace 命令,但它不起作用,它会在表格前的第一行和第二行之间添加空格,而不是在第一行和表格本身之间添加空格。有什么建议吗?
以下是代码:
\begin{tabular}{||m{0.3\textwidth} | m{0.7\textwidth} ||}
\hline \hline
Instruments and measure set up &
\begin{itemize}
\item Power supply
\item Waveform generator ($f=1\mathrm{kHz}, V_{pp}=0.8943\mathrm{V}$)
\item Oscilloscope
\end{itemize}
\\
\hline
Measured data &
\begin{itemize}
\item Output voltage: $V_o$
\end{itemize}
\\
\hline
Involved variables, measured values and procedure &
Using \textit{Math Mode}, measure the voltage drop amplitude across the $8\mathrm\Omega$ resistor taking into account the $\frac{1}{\sqrt{2}}$ factor of the RMS.\newline
Applying the following formula:
$$ P_o = I\cdot V_{o_{RMS}} = \frac{V_{o_{RMS}}^{2}}{R_L}
= \frac{V_o^{2}}{2\cdot8\mathrm{\Omega}}$$
we obtain the power delivered by the amplifier to the speaker.
\\
\hline \hline
\end{tabular}
\vspace{1cm}
\noindent
Specification: $1\mathrm{W} \le P_o \le 3\mathrm{W}$\\ \\
Measurements:
\begin{itemize}
\item $V_o=\frac{V_{pp}}{2}=\frac{7.68\mathrm V}{2}=3.84$V
\end{itemize}
\noindent
\\
{\Large \textbf{Result:} $P_o=0.92$W}
答案1
稍微紧凑一点。单位和值已处理siunitx
以确保它们排版正确。更改了表格第二列的宽度,以考虑 LaTeX 在列两侧添加的少量空间。删除了垂直线以使其更平滑一些。添加了包,parskip
因为这似乎是您真正想要的。如果这是家庭作业,没有人会争论它,如果这是在论文或报告中,我会重新考虑整个演示。
\documentclass{article}
\usepackage{array}
\usepackage{geometry}
\usepackage{ragged2e}
\newcommand{\tabitem}{\par\RaggedRight\textbullet~}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{parskip}
\begin{document}
\begin{tabular}{m{0.3\textwidth} m{0.64\textwidth} }
\toprule
Instruments and measure set up &
\tabitem Power supply
\tabitem Waveform generator ($f=\SI{1}{\kilo\hertz}, V_{pp}=\SI{0.8943}{\volt}$)
\tabitem Oscilloscope
\\
\midrule
Measured data &
\tabitem Output voltage: $V_o$
\\
\midrule
Involved variables, measured values and procedure &
Using \textit{Math Mode}, measure the voltage drop amplitude across the \SI{8}{\ohm} resistor taking into account the $\sqrt{2}^{-1}$ factor of the RMS.\newline
Applying the following formula:\par
$\displaystyle P_o = I\cdot V_{o_\mathrm{{RMS}}} = \frac{V_{o_{\text{RMS}}}^{2}}{R_L}
= \frac{V_o^{2}}{2\cdot\SI{8}{\ohm}}$\par
we obtain the power delivered by the amplifier to the speaker.
\\
\bottomrule
\end{tabular}
\medbreak
Specification: $\SI{1}{\watt} \le P_o \le \SI{2}{\watt}$
Measurements:
\tabitem $V_o=\frac{V_{pp}}{2}=\frac{\SI{7.68}{\volt}}{2}=\SI{3.84}{\volt}$
{\Large \textbf{Result:} $P_o=\SI{0.92}{\watt}$
\end{document}
答案2
我建议使用tabularx
具有精确的列宽比率,以及表格后垂直间距的描述环境,以及其他一些改进:
\documentclass{article}
\usepackage{array}
\usepackage[showframe]{geometry}
\usepackage{ragged2e}
\newcommand{\tabitem}{\par\RaggedRight\textbullet~}
\usepackage{siunitx}
\usepackage{booktabs, tabularx}
\usepackage{enumitem, nccmath}%
\renewcommand{\tabularxcolumn}[1]{>{\abovedisplayskip=2pt\belowdisplayskip=5pt\arraybackslash}m{#1}}
\newcolumntype{Y}{>{\hsize=0.6\hsize}X}
\newcolumntype{Z}{>{\hsize=1.4\hsize}X}
\begin{document}
{\centering%}
\begin{tabularx}{\linewidth}{YZ }
\toprule
Instruments and measure set up &
\tabitem Power supply
\tabitem Waveform generator ($f=\SI{1}{\kilo\hertz}, V_{pp}=\SI{0.8943}{\volt}$)
\tabitem Oscilloscope
\\
\midrule
Measured data &
\tabitem Output voltage: $V_o$
\\
\midrule
Involved variables, measured values and procedure &
Using \textit{Math Mode}, measure the voltage drop amplitude across the \SI{8}{\ohm} resistor taking into account the $\sqrt{2}^{-1}$ factor of the RMS.\newline
Applying the following formula:
\[ P_o = I\cdot V_{o_\mathrm{{RMS}}} = \frac{V_{o_{\text{RMS}}}^{2}}{R_L}
= \frac{V_o^{2}}{2\cdot\SI{8}{\ohm}} \]
we obtain the power delivered by the amplifier to the speaker.
\\
\bottomrule
\end{tabularx}
}
\begin{description}[font=\normalfont, leftmargin=0pt]
\item[Specification:] $\SI{1}{\watt} \le P_o \le \SI{2}{\watt}$.
\item[Measurements:]\leavevmode\vspace{-1.5ex}
\begin{fleqn}
\begin{equation*}
\bullet\enspace V_o=\frac{V_{pp}}{2}=\frac{\SI{7.68}{\volt}}{2}=\SI{3.84}{\volt}
\end{equation*}
\end{fleqn}
\end{description}
\vspace*{\topsep}
{\Large \textbf{Result:} $P_o=\SI{0.92}{\watt}$
\end{document}