I am trying to use NiceTabular to create neat arrangements of slides. However, items inside itemize do not seem to properly align with the titles.
My questions are as follows
- How to precisely align the first item in
itemizewith the title in the first column? - How to remove the empty line between the sample text and the itemization in tables?
- I am basically trying to get
NiceTabularto behave similar totabularx, but with the awesome functionalities provided byNiceTabular(such as the ability to determine contents horizontal alignment withpcolumns in concise fashion andhvlines), I would love to useNiceTabular. Is it possible to get the second and third columns to fill the remaining of\textwidthautomatically?
My MWE
\documentclass[aspectratio=169, xcolor={x11names},t]{beamer}
\useinnertheme{rectangles}
\usecolortheme{seahorse}
\usepackage{calc}
\usepackage[export]{adjustbox}
\usepackage{blindtext}
\usepackage{booktabs}
\usepackage{nicematrix}
\newlength{\widthSideBar}
\setlength{\widthSideBar}{0mm}
\newlength{\widthTextMarginLeft}
\setlength{\widthTextMarginLeft}{10mm}
\newlength{\widthTextMarginRight}
\setlength{\widthTextMarginRight}{5mm}
\setbeamersize{text margin left=\widthTextMarginLeft, text margin right=\widthTextMarginRight}
\setbeamersize{sidebar width left=\widthSideBar, sidebar width right=0cm}
\setbeamertemplate{itemize items}[triangle]
% Adjusting \leftmargini for adjustbox environments
\newlength{\widthItemizeIcon}
\setlength{\widthItemizeIcon}{3.1mm}% good value 3.1mm
\newcommand{\adjustboxItemize}{
\addtolength{\leftmargini}{\widthItemizeIcon}
\addtolength{\leftmargini}{\labelsep}}
\setlength{\leftmargini}{0mm}
\setlength{\parskip}{5mm}
\makeatletter
\newcommand{\itemizecompact}{
\def@listi{\leftmargin\leftmargini
\setlength{\topsep}{0mm}
\setlength{\itemsep}{0mm}
\setlength{\parsep}{0mm}
}
\let@listI@listi
@listi
}
\makeatother
\newlength{\widthQuad}
\setlength{\widthQuad}{\widthof{\widthof{\quad}}}
\newcommand{\sampletext}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis sem. Nullamnec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec ante.}
\begin{document}
\begin{frame}[plain]
\adjustboxItemize
\itemizecompact
{\noindent\setlength{\tabcolsep}{5.5pt}%
\begin{NiceTabular}{@{}>{\bfseries}p[l]{2.5cm} p[l]{\dimexpr 0.63\linewidth - \tabcolsep - 2.5cm/2 \relax} @{\quad}p[l]{\dimexpr 0.37\linewidth - \tabcolsep - 2.5cm/2 - \widthQuad \relax}}
One-line title & \blindlist{itemize} & \includegraphics[width=\columnwidth, valign=t]{example-image-a}
\\
One-line title & \sampletext \newline \blindlist{itemize} & \includegraphics[width=\columnwidth, valign=t]{example-image-b}
\\
\end{NiceTabular}
}
\end{frame}
\end{document}


nicematrix. In fact, it's a problem of theitemizein aminipagein Beamer. See that question – F. Pantigny Sep 13 '21 at 15:44