2

I want to add a space after a tabular environement. I tried to use the \vspace comand but it does not work, it adds the space between the first and the second line before the table instead of between the first line and the table itself. Any suggestions?

Here is the code:

\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}  
  • Put an empty line before the vspace. – Johannes_B Jan 15 '17 at 11:08
  • Now it generates the space between the second and third line... – jagjordi Jan 15 '17 at 11:10
  • 2
    please always post a complete document so people can see the problem. But tabular has no special spacing rules it is just like a big letter X any space you add with vspace or hspace are unrelated to the tabular you would get the same space if you replaced the tabular by X or \rule{2cm}{3cm} or any other tex box. – David Carlisle Jan 15 '17 at 11:16
  • 3
    the \\ you have in that fragment outside the table are completely wrong and you should start by removing them (they surely make warnings in the log file? then add blank lines where you want to start a paragraph, and then vspace will work as you expect/ – David Carlisle Jan 15 '17 at 11:18
5

A little bit more compact. Units and values done with siunitx to ensure they are properly typeset. Changed the width of the second column of the tabular, to account the little space that LaTeX adds at both sides of a column. Removed the vertical lines to make it a bit more smooth. Added package parskip because that seems to be what you actually want here. If this is a homework assignment, no one will argue about it, if this is within a thesis or report, i would reconsider the whole presentation.

jagjordiTabular

\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}
  • regarding table width: try with \begin{tabular}{>{\raggedright}m{\dimexpr0.3\textwidth-2\tabcolsep} >{\raggedright\arraybackslash}m{\dimexpr0.7\textwidth-2\tabcolsep} } – Zarko Jan 15 '17 at 11:53
  • @zarko Nah. It doesn't ned to be perfect :-) – Johannes_B Jan 15 '17 at 11:55
  • Thanks @Johannes_B, this was a homework. Also thanks for the \siunitx package recommendation it works grerat. – jagjordi Jan 15 '17 at 19:16
2

I propose to use tabularx to have the exact columnwidths ratio, and a description environment for the vertical spacing after the table, and some other improvements:

\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} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.