GeneralReducing the height of a row in a table

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
marbocam
Posts: 43
Joined: Thu Dec 19, 2024 11:14 am

Reducing the height of a row in a table

Post by marbocam »

Hi there!

I'm trying to figure out how to reduce the height of rows in a table, but '\arraystretch' doesn't seem to work.. I beleive the issue is that I should place it in the preamble of my main document, although I just need to redeuce the height of the rows in one table within a chapter of my thesis...

Here is the code of my table so far:

Code: Select all

\begin{table}[h!]
\caption{Current amplitude response at low frequencies in the mmW band (small signal regime)}
\centering
\small
\renewcommand{\arraystretch}{0.8}% Tighter
\begin{tabular}{p{1.5cm}p{7cm}}
\hline\hline
& \centering\arraybackslash $i(2\omega_{RF}\pm\omega_{IF})$\\
\hline
\[\text{OB2B}\] & \begin{equation}
\Re P_0 m_{AM}m_{RF}^2\sin^2 \varphi_{DC}   \label{gain_OB2B}
\end{equation}\\
\[\text{SSMF}\] & \begin{equation}
\Re P_0 m_{AM}m_{RF}^2\sin^2 \varphi_{DC}(1\pm j \alpha \kappa P_0 \beta L \omega_{RF}) \label{gain_SSMF}
\end{equation}\\
\hline\hline
\end{tabular}\label{gainTable1}
\end{table}
Any ideas on how to fix this?
Many thanks in advance!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

marbocam
Posts: 43
Joined: Thu Dec 19, 2024 11:14 am

Re: Reducing the height of a row in a table

Post by marbocam »

I actually managed to fix it using

Code: Select all

\begin{minipage}{7cm}
\begin{equation}
\Re P_0 m_{AM}m_{RF}^2 \sin^2 \varphi_{DC} 
\label{gain_OB2B}
\end{equation}
\end{minipage} \\[-4pt]
User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
Joined: Mon Mar 10, 2008 9:44 pm

Re: Reducing the height of a row in a table

Post by Stefan Kottwitz »

Yes, you may use such a workaround. The reason is, that you use equations in table cells, and equations have vertical space around.

Take a look here, I set the values to 0pt:

Code: Select all

\documentclass{article}
\usepackage{amsmath,array}
\begin{document}
\begin{table}[h!]
\caption{Current amplitude response at low frequencies
in the mmW band (small signal regime)}
\centering
\small
\renewcommand{\arraystretch}{0.1}% Tighter
\abovedisplayskip=0pt
\belowdisplayskip=0pt
\abovedisplayshortskip=0pt
\belowdisplayshortskip=0pt
\begin{tabular}{p{1.5cm}p{7cm}}
\hline\hline
& \begin{equation*} i(2\omega_\text{RF}\pm\omega_\text{IF})\end{equation*}\\
\hline
\[\text{OB2B}\] & \begin{equation}
\Re P_0 m_\text{AM}m_\text{RF}^2\sin^2 \varphi_\text{DC}\label{gain_OB2B}
\end{equation}\\[-5pt]
\[\text{SSMF}\] & \begin{equation}
\Re P_0 m_\text{AM}m_\text{RF}^2\sin^2 \varphi_\text{DC}(1\pm j
  \alpha \kappa P_0 \beta L \omega_\text{RF}) \label{gain_SSMF}
\end{equation}\\
\hline\hline
\end{tabular}\label{gainTable1}
\end{table}
\end{document}
equation-table.jpg
equation-table.jpg (29.26 KiB) Viewed 176 times
I would also recommend using \text for the indices, as they are not variables but kind of text labels.

Stefan
LaTeX.org admin
Post Reply