# How to customize fontsize of sections and subections in beamer madrid in outline frame?

I have been using the default theme Madrid of beamer. I have many sections and subsections. I have an outline frame, where before starting any subsection, it should be appeared while other subsections are hidden. The problem is that I have many sections/subsections which don't appear in the frame. Is there is any way so I have all sections/subsections in one slide? I am thinking of a solution that just highlight the current section and its subsections while making others are no longer displayed. For example, If I am at section C, only subsections of section C are highlighted while subsections A, B, D, E are no longer displayed. This will make the audience to focus on current section contents.

\documentclass{beamer}
\usecolortheme{beaver}
\usepackage{utopia}
\usepackage[normalem]{ulem}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{multicol}

\usefonttheme{professionalfonts}

\title[Title]{Title}
%\author{M. Saiful Bari\inst{1} \and Mr X\inst{2}}
\author{My Name\inst{1}}
\institute{
\inst{1}
Sample University testing and testing
}

\date{20 June, 2017}
\AtBeginSubsection[]
{
\begin{frame}
\frametitle{Outline}
\tableofcontents
[
currentsection,
currentsubsection
]
\end{frame}
}

\begin{document}
\frame{\titlepage}
\section{Section A}
\subsection{subsection A1}
\subsection{subsection A2}
\subsection{subsection A3}
\subsection{subsection A4}
\section{Section B}
\subsection{subsection B1}
\subsection{subsection B2}
\subsection{subsection B3}
\subsection{subsection B4}
\section{Section C}
\subsection{subsection C1}
\subsection{subsection C2}
\subsection{subsection C3}
\subsection{subsection C4}
\section{Section D}
\subsection{subsection D1}
\subsection{subsection D2}
\subsection{subsection D3}
\subsection{subsection D4}
\subsection{subsection D5}
\section{Section E}
\subsection{subsection A}
\subsection{subsection A}

\end{document}

• Is this what you are looking for? That is, you may want to add subsectionstyle=show/shaded/hide to the options of \tableofcontents such that it becomes \tableofcontents [ currentsection, currentsubsection, subsectionstyle=show/shaded/hide ].
– user194703
Feb 23, 2020 at 4:54
• No. This solution hide all subsections. I want to focus on the current section only and its subsections to save space Feb 23, 2020 at 6:34

I suppose you want something like this:

\AtBeginSubsection[]
{
\begin{frame}<beamer>
\frametitle{Outline}
\tableofcontents[
currentsection,
sectionstyle=show/hide,
]
\end{frame}
}


The result will be this:

Containing exclusively the current section and shaded it's subsections...

PS: Better than hiding the other (non-current) subsections in order to give the audience at least the ability to see if the current section is near its end.

EDIT:

\begin{frame}{\contentsname}
\begin{multicols}{2}
\small
\tableofcontents
\end{multicols}
\end{frame}


should work

PS: \small command is just an adition to show that you could also decrease the font size if needed to your chosen size

• Your solution works very well. However, still the first outline frame that shows all sections and subsections not showing all of the presentation talk overview (like the image above). Is there is a solution to reduce the section fontsize to make all the text appear in the slide Feb 23, 2020 at 18:03
• @HebaMohsen I don't really know what you mean about the first outline frame and the presentation talk overview ... Not appearing in the codes' combinations ... May be you mean the table of contents ... But not sure about that... Confirm please or make it clear in your question by using the above code too to reproduce the problem. Feb 23, 2020 at 18:22
• I mean if you the first slide of table of contents. All of items are shown, but the a few items are not showing. this only in the first slide of the presenation Feb 23, 2020 at 19:54
• @HebaMohsen See my edit... Feb 23, 2020 at 20:02
• It works very well. Thanks a lot. Can I have space between sections in the table of contents since they are very close to each other Feb 23, 2020 at 20:15