Vedran Miletić avatar Vedran Miletić committed 717e481

Add real support for section page and subsection page. They can be styled independantly of part page now.

Comments (0)

Files changed (5)

base/beamerbasesection.sty

 %
 % Subsection Definitions
 %
+\def\subsectionname{\translate{Subsection}}
 \newcounter{subsection}[section]
 \renewcommand\thesubsection{\@arabic\c@subsection}
 
   \beamer@resumemode}
 \def\insertsubsection{}
 
+\def\insertsubsectionnumber{\@arabic\c@subsection}
+
 \def\beamer@untitledsubsection{%
   \refstepcounter{subsection}%
   \def\insertsubsection{}%

base/beamerbasetitle.sty

 \def\titlepage{\usebeamertemplate*{title page}\@thanks}
 \def\partpage{\usebeamertemplate*{part page}}
 \def\sectionpage{\usebeamertemplate*{section page}}
-%\def\subsectionpage{\usebeamertemplate*{subsection page}} % TODO
+\def\subsectionpage{\usebeamertemplate*{subsection page}}
 
 \mode
 <article>
 {\renewcommand\titlepage{}
-\providecommand\partpage{}}
+\providecommand\partpage{}
+\providecommand\sectionpage{}
+\providecommand\subsectionpage{}}
 
 
 %

themes/color/beamercolorthemedefault.sty

 \setbeamercolor{part name}{}
 \setbeamercolor{part title}{parent=titlelike}
 
+\setbeamercolor{section name}{}
+\setbeamercolor{section title}{parent=titlelike}
+
 \setbeamercolor{section in toc}{parent=structure}
 \setbeamercolor{section in toc shaded}{parent=section in toc}
 \setbeamercolor{section in head/foot}{parent=palette tertiary}
 \setbeamercolor{section in sidebar shaded}{use=section in sidebar,fg=section in sidebar.fg!40!bg}
 \setbeamercolor{section number projected}{parent=item projected}
 
+\setbeamercolor{subsection name}{}
+\setbeamercolor{subsection title}{parent=titlelike}
+
 \setbeamercolor{subsection in toc}{}
 \setbeamercolor{subsection in toc shaded}{parent=subsection in toc}
 \setbeamercolor{subsection in head/foot}{parent=palette secondary}

themes/font/beamerfontthemedefault.sty

 \setbeamerfont{date in head/foot}{}
 \setbeamerfont{date in sidebar}{}
 
-\setbeamerfont{part name}{size=\Large}
-\setbeamerfont{part title}{parent=title}
+\setbeamerfont{part name}{size=\LARGE}
+\setbeamerfont{part title}{size=\LARGE,parent=title}
+
+\setbeamerfont{section name}{size=\Large}
+\setbeamerfont{section title}{size=\Large,parent=title}
 
 \setbeamerfont{section in toc}{parent=structure}
 \setbeamerfont{section in toc shaded}{parent=section in toc}
 \setbeamerfont{section in sidebar}{size=\tiny}
 \setbeamerfont{section number projected}{size=\small,parent={section in toc,projected text}}
 
+\setbeamerfont{subsection name}{size=\large}
+\setbeamerfont{subsection title}{size=\large,parent=title}
+
 \setbeamerfont{subsection in toc}{}
 \setbeamerfont{subsection in toc shaded}{parent=subsection in toc}
 \setbeamerfont{subsection in head/foot}{}

themes/inner/beamerinnerthemedefault.sty

   \begin{centering}
     {\usebeamerfont{part name}\usebeamercolor[fg]{part name}\partname~\insertromanpartnumber}
     \vskip1em\par
-    \begin{beamercolorbox}[sep=8pt,center,#1]{part title}
+    \begin{beamercolorbox}[sep=16pt,center,#1]{part title}
       \usebeamerfont{part title}\insertpart\par
     \end{beamercolorbox}
   \end{centering}
 \defbeamertemplate*{section page}{default}[1][]
 {
   \begin{centering}
-    {\usebeamerfont{part name}\usebeamercolor[fg]{part name}\sectionname~\insertsectionnumber}
+    {\usebeamerfont{section name}\usebeamercolor[fg]{section name}\sectionname~\insertsectionnumber}
+    \vskip1em\par
+    \begin{beamercolorbox}[sep=12pt,center,#1]{part title}
+      \usebeamerfont{section title}\insertsection\par
+    \end{beamercolorbox}
+  \end{centering}
+}
+
+% Subection page: default
+
+\defbeamertemplate*{subsection page}{default}[1][]
+{
+  \begin{centering}
+    {\usebeamerfont{subsection name}\usebeamercolor[fg]{subsection name}\subsectionname~\insertsubsectionnumber}
     \vskip1em\par
     \begin{beamercolorbox}[sep=8pt,center,#1]{part title}
-      \usebeamerfont{part title}\insertsection\par
+      \usebeamerfont{subsection title}\insertsubsection\par
     \end{beamercolorbox}
   \end{centering}
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.