3

I want to use madrid's blocks (which somehow are wider than frankfurt's?) with frankfurt's modified navigation. Specifically I'd like to align the block more left and make it wider. How might I do so in the below MWE? \setbeamertemplate{blocks}[madrid] didn't work... Thanks!

\documentclass[9pt, notes]{beamer}
\usetheme{Frankfurt} % nice bullets at top
\usepackage{amsmath,amssymb,amsthm,
%minted,
%float,
%multicol,
mathtools,dsfont,
%hyperref,
rotating,cleveref,bm,tikz,algorithm,algpseudocode,
%xcolor,
vwcol}

% -------------------------------------------
% modifications
% -------------------------------------------
\setbeamertemplate{footline}[frame number]{} % gets rid of bottom navigation bars
\usecolortheme{rose} % lighten the headers
% \definecolor{UBCblue}{rgb}{0.04706, 0.13725, 0.26667}
% \setbeamercolor{alerted text}{fg=UBCblue}

% -------------------------------------------
% setup
% -------------------------------------------
\title{A Title}
\subtitle{some subtitle}
\author{Some One}%\inst{1}}
\institute{Some Where \\ Department }
\date{May 27, 2018}
\subject{MWE}

% ToC command
\AtBeginSubsection[]
{
  \begin{frame}<beamer>{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}

% subsections in navigation
\makeatletter
\def\sectionentry#1#2#3#4#5{% section number, section title, page
  \ifnum#5=\c@part%
  \beamer@section@set@min@width
  \box\beamer@sectionbox\hskip1.875ex plus 1fill%
  \beamer@xpos=0\relax%
  \beamer@ypos=1\relax%
  \setbox\beamer@sectionbox=
  \hbox{\def\insertsectionhead{#2}%
    \def\insertsectionheadnumber{#1}%
    \def\insertpartheadnumber{#5}%
    {%
      \usebeamerfont{section in head/foot}\usebeamercolor[fg]{section in head/foot}%
      \ifnum\c@section=#1%
        \hyperlink{Navigation#3}{{\usebeamertemplate{section in head/foot}}}%
        :~\insertsubsectionhead%
      \else%
        \hyperlink{Navigation#3}{{\usebeamertemplate{section in head/foot shaded}}}%
      \fi}%
  }%
  \ht\beamer@sectionbox=1.875ex%
  \dp\beamer@sectionbox=0.75ex%
  \fi\ignorespaces}  
\makeatother

% wider block environment
\newenvironment<>{varblock}[2][\textwidth]{
     \begin{center}
       \begin{minipage}{#1}
         \setlength{\textwidth}{#1}
           \begin{actionenv}#3
             \def\insertblocktitle{#2}
             \par
             \usebeamertemplate{block begin}}
   {\par
       \usebeamertemplate{block end}
     \end{actionenv}
   \end{minipage}
\end{center}}


% ===========================================
% content
% ===========================================
\begin{document}
\begin{frame}[plain]
  \titlepage
\end{frame}

% ===========================================
\section{Introduction}
% ===========================================

% -------------------------------------------
\subsection{Motivation}
% -------------------------------------------
\begin{frame}
  p1
\end{frame}

% -------------------------------------------
\subsection{Something else}
% -------------------------------------------
\begin{frame}
\begin{block}{test}
How can I left align this more and make the box wider? In the `madrid' theme, it's ok
\end{block}
\end{frame}


% -------------------------------------------
\subsubsection{Point 1}
% -------------------------------------------
\begin{frame}
  p2
\end{frame}
\begin{frame}
  p3
\end{frame}

\end{document}

enter image description here

3
\documentclass{beamer}
\usetheme{Frankfurt}
\setbeamersize{text margin left=1em,text margin right=1em}


\begin{document}

\begin{frame}
\begin{block}{title}
content...
\end{block}
\end{frame}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.