I have a beamer presentation with the following structure:
|Section 1
| |-Subsection 1
| |-Subsection 2
|Section 2
| |-Subsection 1
| |-Subsection 2
| |-Subsection 3
| |-Subsection 4
|Section 3
|Section 4
I activated beamer's the sidebar with
\useoutertheme[hideallsubsections]{sidebar}
but this makes only the sections to be viewed at the side. I wonder if it is possible to show at the sidebar all the sections, but to show also section 2 subsections.
That is, kind of a hybrid between the default option for \useoutertheme{sidebar} and the hideallsubsections option mentioned above:
The code:
\documentclass[dvipsnames]{beamer}
\setbeamertemplate{navigation symbols}{} % suppresses all navigation symbols
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}
\useoutertheme[width=20mm,hideallsubsections]{sidebar} %
\usetheme{Berkeley}
\usecolortheme{default}
\begin{document}
\section{Section1}
\begin{frame}
Hello World
\end{frame}
\subsection{Subsection1}
\subsection{Subsection2}
\section{Section2}
\begin{frame}
Lorem ipsum
\end{frame}
\subsection{Subsection1}
\subsection{Subsection2}
\subsection{Subsection3}
\section{Section3}
\begin{frame}
Dolor sit amet
\end{frame}
\section{Section4}
\begin{frame}
Nam dui ligula
\end{frame}
\end{document}
Nonetheless I want those hidden subsections to appear at the table of contents!
(To hide the subsections in the screenshot I used Windows Paint)

\subsection[]{Subsection1}, etc. to exclude from the sidebar. – Simon Dispa Jun 13 '21 at 18:16[]bracket is the string to be passed to the sidebar, so I can in effect choose my own heading for this section of subsection, right? – tush Jun 13 '21 at 20:33