0

Using the following code from this question, how can the spacing between the text and cell margins (vertically and horizontally) be adjusted.

\documentclass{beamer}
\setbeamertemplate{navigation symbols}{}
\setbeamerfont{frametitle}{series=\bfseries}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash\hspace{0pt}}m{#1}}
\begin{document}
\begin{frame}[t]
\frametitle{Types of ...}
\begin{table}
    \bfseries
    \begin{tabular}{|C{.16\textwidth}|C{.16\textwidth}|C{.28\textwidth}|}
    \hline
    hello & \textcolor{blue}{hello} \textcolor{green}{hello} & receptors\\ \hline
    hello & \textcolor{blue}{hello} \textcolor{green}{hello} & \\ \hline
    hello & \textcolor{blue}{hello} \textcolor{green}{hello} & \\ \hline
\end{tabular}
\end{table}
\end{frame}
\end{document} 
1

see, if the following solution can help you:

\documentclass{beamer}
\setbeamertemplate{navigation symbols}{}
\setbeamerfont{frametitle}{series=\bfseries}

    \usepackage{cellspace,                  % for adding vertical space around cells' contents
                tabularx}
    \setlength\cellspacetoplimit{7pt}
    \setlength\cellspacebottomlimit{7pt}
    \newcolumntype{C}{>{\centering\arraybackslash}X}
    \addparagraphcolumntypes{C}
    \usepackage{ragged2e}

\begin{document}
\begin{frame}[t,fragile]
\frametitle{Types of ...}
    \renewcommand\tabularxcolumn[1]{m{#1}}  % for vertical centering of X cell contents
    \setlength\tabcolsep{12pt}              % increase horizontal space around cell         \begin{table}
\bfseries
\begin{tabularx}{0.75\linewidth}{|*{2}{>{\hsize=0.25\hsize}SC|}
                                       >{\hsize=0.50\hsize}C|
                                } \hline
hello & \textcolor{blue}{hello} \textcolor{green}{hello} & receptors\\ \hline
hello & \textcolor{blue}{hello} \textcolor{green}{hello} &          \\ \hline
hello & \textcolor{blue}{hello} \textcolor{green}{hello} &          \\ \hline
\end{tabularx}
    \end{table}
\end{frame}

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.