Presentations and PostersAligning block titles and giving them borders

Beamer, Powerdot and KOMA-Script presentations, Conference posters (a0poster, baposter, tikzposter)
Post Reply
cheesesofnazareth
Posts: 8
Joined: Mon May 10, 2021 2:11 pm

Aligning block titles and giving them borders

Post by cheesesofnazareth »

In one of my slides, I am trying to make two adjacent blocks. I want the block sizes to be the same size, so that the titles are at the same level/height. I also want border around the blocks of the same colour as its title.
Here is my MWE:

Code: Select all

\documentclass[xcolor=dvipsnames]{beamer}
\usetheme{default}
\usepackage[latin1]{inputenc}
\usepackage{microtype}
\usepackage{xcolor}
\usepackage{color}

\setbeamersize{text margin left=10mm, text margin right=10mm}

\setbeamertemplate{blocks}[rounded]
\setbeamertemplate{blocks}[framed]
\setbeamercolor{block title}{fg=MidnightBlue}

\setbeamertemplate{footline}{\hspace{.5cm}\scriptsize{\insertshorttitle
\hspace{25pt} \hfill\insertframenumber\hspace{0.5cm}}
\vspace{9pt}}

\setbeamercolor{title}{fg=MidnightBlue}
\setbeamercolor{titlelike}{fg=MidnightBlue}
\setbeamertemplate{itemize items}[circle]
\setbeamercolor{caption name}{fg=MidnightBlue}

\beamertemplatenavigationsymbolsempty

\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{microtype}

\setbeamertemplate{frametitle}{
\vspace*{4mm}\hspace*{-0.1mm}\insertframetitle\vspace*{1mm}\hrule}

\usepackage{graphicx}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}

\title[\textsc{My Name}]{My Name\\~\\ My education and career}
%%% Until here marks the preamble

\begin{document}
\begin{frame}{Internships}
\begin{columns}
\column{0.5\textwidth}
\begin{exampleblock}{Company 1}
\begin{minipage}[l]{0.5\textheight}
\begin{itemize}
\item ELISA assay 
\item Chromatography
\item Histology
\end{itemize}
\end{minipage}
\end{exampleblock}

\column{0.5\textwidth}
\begin{block}{Company 2}
\begin{minipage}[l]{0.5\textheight}
\begin{itemize}
\item Learnt statistical methods and was introduced to the use of R
\item Was introduced to the use of \LaTeX
\item Developed a novel compounds which is currently being considered for a patent.
\end{itemize}
\end{minipage}
\end{block}
\end{columns}
\end{frame}
\end{document}
Last edited by Stefan Kottwitz on Tue Jun 15, 2021 9:06 am, edited 1 time in total.
Reason: \end{document} added

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Bartman
Posts: 366
Joined: Fri Jan 03, 2020 2:39 pm

Aligning block titles and giving them borders

Post by Bartman »

You could test the example with one click if you didn't have to add the end of the document environment first. Please make sure your example is complete before you send it.
cheesesofnazareth wrote:I want the block sizes to be the same size, so that the titles are at the same level/height.
Read section 12.7 "Splitting a Frame into Multiple Columns" in the beamer manual.
cheesesofnazareth
Posts: 8
Joined: Mon May 10, 2021 2:11 pm

Aligning block titles and giving them borders

Post by cheesesofnazareth »

Oh apologies. I have this MWE compiled and working. Just a copy-paste error. Apologies.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Aligning block titles and giving them borders

Post by Stefan Kottwitz »

Hi,

I added the missing \end{document}. So the code compiles here in the forum when I click the "Run LaTeX here" button.

Did you already get the information from the manual, as Bartman posted the link above? Does it work?

Stefan
LaTeX.org admin
Post Reply