I have the following table in beamer presentation, is it possible to move the table slightly up in the page?
This is my output:
\documentclass {beamer}
\mode<beamer>{\usetheme{Madrid}}
\title[Test Title]{Test}
\usepackage{systeme}
\usepackage{tabularray}
\UseTblrLibrary{booktabs, varwidth}
\usepackage{enumitem}
\setlist[itemize]{nosep,
leftmargin=*,
label=\tiny\color{black}$\blacksquare$,
after =\vspace{-\baselineskip},% <---
before=\vspace{-\baselineskip} % <---
}
\setenumerate{label=(\arabic*),itemsep=3pt,topsep=3pt}
\begin{document}
\begin{frame}{Title}
\framesubtitle{Subtitle}
\begin{table}[!htb]
\small
\begin{tblr}{hlines, vlines,
colspec = {Q[l,m] X X},
row{1} = {font=\bfseries},
measure = \ }
One & Two & Three \\
Method 1
& \begin{itemize}
\item text
\item text
\item text
\item text
\end{itemize}
& \begin{itemize}
\item text
\item text
\item text
\item text
\end{itemize} \\
Method 2
& \begin{itemize}
\item text
\item text
\item text
\item text
\end{itemize}
& \begin{itemize}
\item text
\item text
\item text
\item text
\end{itemize} \\
Method 3
& \begin{itemize}
\item text
\item text
\item text
\item text
\end{itemize}
& \begin{itemize}
\item text
\item text
\item text
\item text
\end{itemize} \\
Method 4
& \begin{itemize}
\item text
\item text
\item text
\end{itemize}
& \begin{itemize}
\item text
\item text
\item text
\end{itemize} \\
\end{tblr}
\end{table}
\end{frame}
\end{document}
EDIT:
Best Answer
Try this updated code in your system..
It will produce a table centered vertically in the frame.
If this is not the case, check if any packages need to be updated.
Added
\listfiles
to list in the.log
file all the files loaded and compare with my output.The
table
environment adds unnecessary spaces.Also corrected
measure
to compile you code.measure = vbox
is needed forvarwidth
to measure the width of the cells when they contains vertical material, as in this case.Note that
after =\vspace{-\baselineskip}
fails to work properly and you get warnings fromvarwidth
, butafter=\vspace{<dimension>}
works fine. This is the reason to use\vshift
:\the\vshift
will result in-13.6pt
, the (-) baseline skip.I changed the columns specs but this is not related with the question.
Output of the .log file
First lines
At the end of the file