Skip to content

Commit

Permalink
Add subsection page
Browse files Browse the repository at this point in the history
  • Loading branch information
Pasquale Claudio Africa committed Jun 26, 2019
1 parent 72726d6 commit b90547d
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Focus v2.3
# Focus v2.4
A presentation theme for LaTeX Beamer that aims at a clean and minimalist design,
so to minimize distractions and put the focus directly on the content.

Expand All @@ -14,7 +14,7 @@ Demo
A full demo is available. Refer to `demo.tex` and `demo.pdf`.

![](https://github.com/elauksap/focustheme/blob/master/demo-screenshots/demo-titlepage.jpg)
![](https://github.com/elauksap/focustheme/blob/master/demo-screenshots/demo-sectionpage.jpg)
![](https://github.com/elauksap/focustheme/blob/master/demo-screenshots/demo-subsectionpage.jpg)
![](https://github.com/elauksap/focustheme/blob/master/demo-screenshots/demo-typeset.jpg)
![](https://github.com/elauksap/focustheme/blob/master/demo-screenshots/demo-focus.jpg)
![](https://github.com/elauksap/focustheme/blob/master/demo-screenshots/demo-references.jpg)
Expand Down
1 change: 1 addition & 0 deletions beamerfontthemefocus.sty
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
\setbeamerfont{date}{size=\large, shape=\scshape}

\setbeamerfont{sectiontitle}{size=\huge, series=\scshape\bfseries}
\setbeamerfont{subsectiontitle}{size=\Large, series=\scshape\bfseries}
\setbeamerfont{frametitle}{size=\Large, shape=\scshape}

\setbeamerfont{footline}{size=\scriptsize}
Expand Down
42 changes: 39 additions & 3 deletions beamerinnerthemefocus.sty
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@

\vspace*{\baselineskip}
\begin{minipage}[t]{\textwidth}
\usebeamerfont{date}{\insertdate}
\usebeamerfont{date}
\insertdate
\end{minipage}

\vspace*{0pt plus 100fill}
Expand All @@ -100,8 +101,13 @@
\usebeamercolor[fg]{frametitle}
\let\hyperlink\@secondoftwo\insertsection
\end{minipage}

\vspace*{0pt plus 100fill}

\vspace{1.5\baselineskip}
\begin{minipage}[t][0.55\paperheight]{\textwidth}
\usebeamerfont{subsectiontitle}
\usebeamercolor[bg]{frametitle}
\insertsubsection
\end{minipage}
}

\AtBeginSection[]{%
Expand All @@ -110,4 +116,34 @@
\end{frame}%
}

% Subsection page.
\defbeamertemplate*{subsection page}{focus}{%
{%
\usebeamercolor{frametitle}\colorlet{focus@@temp}{bg}%
\begin{tikzpicture}[overlay, remember picture]
\fill[color=focus@@temp] (current page.north west) rectangle ([shift = {(0, -0.45\paperheight)}] current page.north east);
\end{tikzpicture}%
}

\vspace{-2.5\baselineskip}
\begin{minipage}[b][0.45\paperheight]{\textwidth}
\usebeamerfont{sectiontitle}
\usebeamercolor[fg]{frametitle}
\let\hyperlink\@secondoftwo\insertsection
\end{minipage}

\vspace{1.5\baselineskip}
\begin{minipage}[t][0.55\paperheight]{\textwidth}
\usebeamerfont{subsectiontitle}
\usebeamercolor[bg]{frametitle}
\insertsubsection
\end{minipage}
}

\AtBeginSubsection[]{%
\begin{frame}[plain, noframenumbering]{}
\subsectionpage
\end{frame}%
}

\mode<all>
2 changes: 1 addition & 1 deletion beamerthemefocus.sty
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
% along with beamerthemefocus. If not, see <http://www.gnu.org/licenses/>.

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerthemefocus}[2019/01/18 v2.3 Focus Beamer theme]
\ProvidesPackage{beamerthemefocus}[2019/06/26 v2.4 Focus Beamer theme]

\mode<presentation>

Expand Down
Binary file removed demo-screenshots/demo-sectionpage.jpg
Binary file not shown.
Binary file added demo-screenshots/demo-subsectionpage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo.pdf
Binary file not shown.
4 changes: 4 additions & 0 deletions demo.tex
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
\maketitle
\end{frame}

% Use starred version (e.g. \section*{Section name})
% to disable (sub)section page.
\section{Section 1}
\subsection{Subsection 1.1}
\begin{frame}{Simple frame}
This is a simple frame.
\end{frame}
Expand All @@ -25,6 +28,7 @@
This is a frame with plain style and it is numbered.
\end{frame}

\subsection{Subsection 1.2}
\begin{frame}[t]
This frame has an empty title and is aligned to top.
\end{frame}
Expand Down

0 comments on commit b90547d

Please sign in to comment.