LaTeX forum ⇒ Presentations and PostersAligning block titles and giving them borders

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

Aligning block titles and giving them borders

Postby cheesesofnazareth » Wed Jun 09, 2021 3:00 pm

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:

\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

Bartman
Posts: 203
Joined: Fri Jan 03, 2020 2:39 pm

Postby Bartman » Wed Jun 09, 2021 4:16 pm

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: 6
Joined: Mon May 10, 2021 2:11 pm

Postby cheesesofnazareth » Wed Jun 09, 2021 6:15 pm

Oh apologies. I have this MWE compiled and working. Just a copy-paste error. Apologies.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9705
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Jun 15, 2021 9:08 am

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


Return to “Presentations and Posters”

Who is online

Users browsing this forum: No registered users and 3 guests