0

I made some slides for finding roommates/housing in Beamer; however, upon closer inspection, I noticed that two exact same blocks have different spacing - one of them has a larger header bar but the other does not, making them slightly uneven. Both of the blocks were made in the exact same template and are split evenly using two columns of width 0.5\textwidth. Here is the code:

\documentclass{beamer}  
% Variableblock styling + bullet point styling:
\newenvironment{variableblock}[3]{%
  \setbeamercolor{block body}{#2}
  \setbeamercolor{block title}{#3}
  \setbeamercolor{itemize item}{fg=black}
  \begin{block}{#1}}{\end{block}}
\setbeamertemplate{itemize/enumerate body begin}{\scriptsize}

% Slide:
\begin{document}
\begin{frame}
\frametitle{Roommate Preferences}
\framesubtitle{What I'm looking for \& Dealbreakers}
I actually don't really want a roommate, but I would be down to have 1-2 housemates to share an apartment.
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{variableblock}{What I'm Looking For}{bg=green!10,fg=black}{bg=green!40,fg=black}
\begin{itemize}
\item Friendly/agreeable person.
\item Has some sense of organization and hygiene.
\item Mindful of my circumstances (e.g. don't bring too many people over when I have exams/are sleeping/having an anxiety attack).
\item Be able to talk things out in a civil manner.
\item Someone who I can probably hang out with/study with/talk to.
\item $\uparrow$ Preferably share similar academic interests/major.
\end{itemize}
\end{variableblock}
\end{column}
\begin{column}{0.5\textwidth}
\begin{variableblock}{Deal Breakers}{bg=red!10,fg=black}{bg=red!40,fg=black}
\begin{itemize}
\item Drugs/Alcohol/Excessive Partying.
\item Political/Religious views. I've already got my yeehaw neighbor for that.
\item Lack of hygiene/cleanliness in shared spaces. No, I will not be vacuuming the entire room and taking out all the trash for another year.
\item Toxicity/Negativity/Being Inconsiderate/Disregarding Privacy/Boundaries.
\item Being loud/excessive amount of visitors/relationships \& PDA.
\end{itemize}
\end{variableblock}
\end{column}
\end{columns}
\end{frame}
\end{document}

This creates the following output:

enter image description here

As you can see, the green block has some extra spacing under the block text, while the red does not, despite being from the same template and having pretty much the same code with the exception of bullet point content. If anyone knows why the spacing is turning out strange and/or has any remedy to this issue, please let me know. Thanks!

3

2 Answers 2

2

Instead of columns you could use a tcbraster (from tcolorbox) which can automatically adjust boxes heights. The result is quite similar. The different width in following figure is due to extra width added by columns environment which is not used with tcolorbox solution.

\documentclass{beamer}  
\usepackage[most]{tcolorbox}
% Variableblock styling + bullet point styling:
\newenvironment{variableblock}[3]{%
  \setbeamercolor{block body}{#2}
  \setbeamercolor{block title}{#3}
  \setbeamercolor{itemize item}{fg=black}
  \begin{block}{#1}}{\end{block}}
\setbeamertemplate{itemize/enumerate body begin}{\scriptsize}

% Slide:
\begin{document}
\begin{frame}
\frametitle{Roommate Preferences}
\framesubtitle{What I'm looking for \& Dealbreakers}
I actually don't really want a roommate, but I would be down to have 1-2 housemates to share an apartment.
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{variableblock}{What I'm Looking For}{bg=green!10,fg=black}{bg=green!40,fg=black}
\begin{itemize}
\item Friendly/agreeable person.
\item Has some sense of organization and hygiene.
\item Mindful of my circumstances (e.g. don't bring too many people over when I have exams/are sleeping/having an anxiety attack).
\item Be able to talk things out in a civil manner.
\item Someone who I can probably hang out with/study with/talk to.
\item $\uparrow$ Preferably share similar academic interests/major.
\end{itemize}
\end{variableblock}
\end{column}
\begin{column}{0.5\textwidth}
\begin{variableblock}{Deal Breakers}{bg=red!10,fg=black}{bg=red!40,fg=black}
\begin{itemize}
\item Drugs/Alcohol/Excessive Partying.
\item Political/Religious views. I've already got my yeehaw neighbor for that.
\item Lack of hygiene/cleanliness in shared spaces. No, I will not be vacuuming the entire room and taking out all the trash for another year.
\item Toxicity/Negativity/Being Inconsiderate/Disregarding Privacy/Boundaries.
\item Being loud/excessive amount of visitors/relationships \& PDA.
\end{itemize}
\end{variableblock}
\end{column}
\end{columns}
\end{frame}

\begin{frame}
\frametitle{Roommate Preferences}
\framesubtitle{What I'm looking for \& Dealbreakers}
I actually don't really want a roommate, but I would be down to have 1-2 housemates to share an apartment.
\begin{tcbitemize}[raster columns=2, raster equal height=rows, sharp corners, coltitle=black, boxrule=0pt, left=0pt, right=0pt]
\tcbitem[title=What I'm Looking For, colbacktitle=green!40, colback=green!10]
\begin{itemize}
\item Friendly/agreeable person.
\item Has some sense of organization and hygiene.
\item Mindful of my circumstances (e.g. don't bring too many people over when I have exams/are sleeping/having an anxiety attack).
\item Be able to talk things out in a civil manner.
\item Someone who I can probably hang out with/study with/talk to.
\item $\uparrow$ Preferably share similar academic interests/major.
\end{itemize}
\tcbitem[title=Deal Breakers, colbacktitle=red!40, colback=red!10]
\begin{itemize}
\item Drugs/Alcohol/Excessive Partying.
\item Political/Religious views. I've already got my yeehaw neighbor for that.
\item Lack of hygiene/cleanliness in shared spaces. No, I will not be vacuuming the entire room and taking out all the trash for another year.
\item Toxicity/Negativity/Being Inconsiderate/Disregarding Privacy/Boundaries.
\item Being loud/excessive amount of visitors/relationships \& PDA.
\end{itemize}
\end{tcbitemize}
\end{frame}
\end{document}

enter image description here

0

Manually add space (I think looking nice) enter image description here

 \documentclass{beamer}  
\newenvironment{variableblock}[3]{%
  \setbeamercolor{block body}{#2}
  \setbeamercolor{block title}{#3}
  \setbeamercolor{itemize item}{fg=black}
  \begin{block}{#1}}{\end{block}}
\setbeamertemplate{itemize/enumerate body begin}{\scriptsize}

\begin{document}


% Slide:
\begin{frame}
\frametitle{Roommate Preferences}
\framesubtitle{What I'm looking for \& Dealbreakers}
I actually don't really want a roommate, but I would be down to have 1-2 housemates to share an apartment.

\begin{minipage}[t]{0.48\textwidth}
\begin{variableblock}{What I'm Looking For}{bg=green!10,fg=black}{bg=green!40,fg=black}
\begin{itemize}
\item Friendly/agreeable person.
\item Has some sense of organization and hygiene.
\item Mindful of my circumstances (e.g. don't bring too many people over when I have exams/are sleeping/having an anxiety attack).
\item Be able to talk things out in a civil manner.
\item Someone who I can probably hang out with/study with/talk to.
\item $\uparrow$ Preferably share similar academic interests/major.  
\vspace{0.15cm}
\end{itemize}
\end{variableblock}
\end{minipage}
\hfill
\begin{minipage}[t]{0.48\textwidth}
\begin{variableblock}{Deal Breakers}{bg=red!10,fg=black}{bg=red!40,fg=black}
\begin{itemize}
\item Drugs/Alcohol/Excessive Partying.
\item Political/Religious views. I've already got my yeehaw neighbor for that.
\item Lack of hygiene/cleanliness in shared spaces. No, I will not be vacuuming the entire room and taking out all the trash for another year.
\item Toxicity/Negativity/Being Inconsiderate/Disregarding Privacy/Boundaries.
\item Being loud/excessive amount of visitors/relationships \& PDA.  
\end{itemize}
\end{variableblock}
\end{minipage}
\end{frame}

\end{document} 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .