# How to align tikz figure and equations in a tabular environment

I am following this example to add text (in my case Math) inside tikz arrow nodes. In the cells adjacent to the arrows I have equations. I have two problems:

1. How to horizontally align the arrow and equations?
2. How to reverse the direction of the blue arrow? Instead of left to right, right to left (-Latex doesn't seem to work!? ).

Below is what I have so far.

\documentclass[table]{beamer}
\usepackage{makecell}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{shapes, arrows, arrows.meta}
\begin{document}
\begin{frame}{Relationship Among Frequency Variables}
\begin{table}[]
\setlength{\tabcolsep}{6pt} % Default value: 6pt
\renewcommand{\arraystretch}{1.5} % Default value: 1
\begin{center}
\label{tab:table1}
\begin{tabular}{@{}ccc@{}} \toprule
Continuous-time signals & & Discrete-time signals \\
\midrule
$\Omega = 2\pi F$ &  & $\omega = 2\pi f$ \\
$\frac{\text{radians}}{\text{sec}} \quad \text{Hz}$ & & $\frac{\text{radians}}{\text{sample}} \quad \frac{\text{cycles}}{\text{sample}}$ \\
\midrule
&
\begin{tikzpicture}[every node/.style={single arrow}]
\node (A) [draw,fill=red!10] {$\omega=\Omega T, f=F\//F_s$};
\end{tikzpicture}%
& $-\pi \leq \omega \leq \pi$ \\
&
\begin{tikzpicture}[every node/.style={single arrow}]
\node (B) [draw,fill=blue!10, -Latex] {$\Omega=\omega\//T, F=f \cdot F_s$};
\end{tikzpicture}%
& $-\frac{1}{2} \leq f \leq \frac{1}{2}$ \\
\midrule
$-\infty < \Omega < \infty$ & & $-\pi\//T \leq \Omega \leq \pi\//T$ \\
$-\infty < F < \infty$ & & $-F_{s}\//2 \leq F \leq F_{s}\//2$ \\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\end{frame}
\end{document}


Like this:

To each tikzpicture you need to add baseline=(current bounding box.center), option, or as is done beside some tiny code improvements in MWE below, define common \tikzset for both pictures:

\documentclass[table]{beamer}
\usepackage{booktabs, makecell, tabularx}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, shapes}
\begin{document}
\begin{frame}[fragile]
\frametitle{Relationship Among Frequency Variables}
\begin{table}
\tikzset{
baseline = (current bounding box.center),
SA/.style = {single arrow, draw, fill=#1, minimum height=11em}
}
\renewcommand{\arraystretch}{1.5} % Default value: 1
\centering
\begin{tabular}{@{} >{$}c<{$} c  >{$}c<{$} @{}}
\toprule
\text{Continuous-time signals}
&   &   \text{Discrete-time signals}                    \\
\midrule
\Omega = 2\pi F
&   &   \omega = 2\pi f                                 \\
\midrule
&   \begin{tikzpicture}
\node (A) [SA=red!10] {$\omega=\Omega T,\ f=F\//F_s$};
\end{tikzpicture}
&   -\pi \leq \omega \leq \pi                           \\
&   \begin{tikzpicture}
\node (B) [SA=blue!10] {$\Omega=\omega/T,\ F=f{\cdot}F_s$};
\end{tikzpicture}
&   -\frac{1}{2} \leq f \leq \frac{1}{2}            \\
\midrule
-\infty < \Omega < \infty
&   &   -\pi\//T \leq \Omega \leq \pi\//T               \\
-\infty < F < \infty
&   &   -F_{s}\//2 \leq F \leq F_{s}\//2                \\
\bottomrule
\end{tabular}
\end{table}
\end{frame}
\end{document}


Addendum: for change direction of the single arrow is intended argument shape border rotate. For details see see TikZ & PGF manual, page 811 (version 3.12.8b):

\documentclass[table]{beamer}
\usepackage{booktabs, makecell, tabularx}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, shapes}
\begin{document}
\begin{frame}[fragile]
\frametitle{Relationship Among Frequency Variables}
\begin{table}
\tikzset{
baseline = (current bounding box.center),
SA/.style = {single arrow, draw, fill=#1, minimum height=11em} % <---
}
\renewcommand{\arraystretch}{1.5} % Default value: 1
\centering
\begin{tabular}{@{} >{$}c<{$} c  >{$}c<{$} @{}}
\toprule
\text{Continuous-time signals}
&   &   \text{Discrete-time signals}                    \\
\midrule
\Omega = 2\pi F
&   &   \omega = 2\pi f                                 \\
\midrule
&   \begin{tikzpicture}
\node (A) [SA=red!10] {$\omega=\Omega T,\ f=F\//F_s$};
\end{tikzpicture}
&   -\pi \leq \omega \leq \pi                           \\
&   \begin{tikzpicture}
\node (B) [SA=blue!10,
shape border rotate=180] {$\Omega=\omega/T,\ F=f{\cdot}F_s$};
\end{tikzpicture}
&   -\frac{1}{2} \leq f \leq \frac{1}{2}            \\
\midrule
-\infty < \Omega < \infty
&   &   -\pi\//T \leq \Omega \leq \pi\//T               \\
-\infty < F < \infty
&   &   -F_{s}\//2 \leq F \leq F_{s}\//2                \\
\bottomrule
\end{tabular}
\end{table}
\end{frame}
\end{document}


• I see, I have to add a baseline to each tikzpicture. Thanks. Any suggestions on how to reverse the direction of the blue node arrow? Feb 22, 2021 at 9:32
• @Rhandley, see TikZ & PGF manual, page 811: shape border rotate. I will add this option ASAP. Feb 22, 2021 at 9:54
• @Rhandley, now I see, that arrows should be in opposite direction. Now this is considered in addendum to answer. Feb 22, 2021 at 10:10
• many thanks. I seem to have used rotate=180, and the text also rotated. I have forgotten the shape border rotate option. Feb 22, 2021 at 10:13