<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% -*- coding: utf-8 -*-
% ----------------------------------------------------------------------------
% Author:  Jianrui Lyu &lt;tolvjr@163.com&gt;
% Website: https://github.com/lvjr/concrete
% License: The LaTeX Project Public License 1.3c
% ----------------------------------------------------------------------------

\ProvidesPackage{beamerthemecdirichlet}[2024-01-21 v2024B Beamer Theme cDirichlet]

\makeatletter

% compatible with old versions of beamer
\providecommand{\beamer@endinputifotherversion}[1]{}

\RequirePackage{tikz,adjustbox}
\usetikzlibrary{decorations.pathmorphing,calc}

\mode&lt;presentation&gt;

\setbeamersize{text margin left=8mm,text margin right=8mm}

%% ----------------- background canvas and background ----------------

\defbeamertemplate{background}{dirichlet}{%
  \begin{tikzpicture}
    \useasboundingbox (0,0) rectangle (\paperwidth,\paperheight);
    \foreach \i in {0,16,...,128} \foreach \j in {0,16,...,96} {
      \path[draw=blue77!90!black] (\i mm,\j mm) circle (16mm);
    }
  \end{tikzpicture}%
}

% need "text badly ragged" option for correct space skips
% see http://tex.stackexchange.com/a/132748/8956
\gdef\my@background@title
{%
  \begin{tikzpicture}
  \useasboundingbox (0,0) rectangle (\paperwidth,\paperheight);
  \path[fill=fcolor]
    (0,0.25\paperheight) -- (0,0) -- (\paperwidth,0) -- (\paperwidth,0.25\paperheight)
       decorate[decoration={snake,segment length=3.15mm}] { -- cycle };
  \path[draw=dcolor,thick] (\paperwidth,0.25\paperheight)
       decorate[decoration={snake,segment length=3.15mm}] { -- (0,0.25\paperheight) };
  \path[fill=fcolor]
    (0,0.85\paperheight) -- (0,\paperheight) -- (\paperwidth,\paperheight) -- (\paperwidth,0.85\paperheight)
       decorate[decoration={snake,segment length=3.15mm}] { -- cycle };
  \path[draw=dcolor,thick] (\paperwidth,0.85\paperheight)
       decorate[decoration={snake,segment length=3.15mm}] { -- (0,0.85\paperheight) };
  \node[text width=0.9\paperwidth,text badly ragged] at (0.5\paperwidth,0.925\paperheight) {%
    \begin{minipage}[c][0.15\paperheight]{0.9\paperwidth}%
      \centering
      \usebeamerfont{date}\usebeamercolor[fg]{date}\insertdate
    \end{minipage}
  };
  \node[text width=0.9\paperwidth,text badly ragged] at (0.5\paperwidth,0.55\paperheight) {%
    \begin{minipage}[c][0.6\paperheight]{0.9\paperwidth}
      \centering
      \usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle
      \ifx\insertsubtitle\@empty\else
        \\[5pt]\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}
        \insertsubtitle
      \fi
    \end{minipage}
  };
  \node[text width=0.9\paperwidth,text badly ragged] at (0.5\paperwidth,0.125\paperheight) {%
    \begin{minipage}[c][0.25\paperheight]{0.9\paperwidth}
      \centering
      \usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor\\[3pt]
      \usebeamerfont{institute}\usebeamercolor[fg]{institute}\insertinstitute
    \end{minipage}
  };
  \end{tikzpicture}
}

\gdef\my@background@section
{%
  \begin{tikzpicture}
  \useasboundingbox (0,0) rectangle (\paperwidth,\paperheight);
  \path[fill=fcolor]
    (0,0.1\paperheight) -- (0,0) -- (\paperwidth,0) -- (\paperwidth,0.1\paperheight)
                        to[bend right=10] ($(0,0.1\paperheight)$);
  \path[draw=dcolor,thick] (\paperwidth,0.1\paperheight) to[bend right=10] ($(0,0.1\paperheight)$);
  \node[text width=\textwidth,text badly ragged] at (0.5\paperwidth,0.6\paperheight) {%
    \begin{minipage}[c]{\textwidth}
      \usebeamertemplate{section page content}%
    \end{minipage}
  };
  \end{tikzpicture}
}

\gdef\my@background@subsection
{%
  \begin{tikzpicture}
  \useasboundingbox (0,0) rectangle (\paperwidth,\paperheight);
  \path[fill=fcolor]
    (0,0.1\paperheight) -- (0,0) -- (\paperwidth,0) -- (\paperwidth,0.1\paperheight)
                        to[bend right=10] ($(0,0.1\paperheight)$);
  \path[draw=dcolor,thick] (\paperwidth,0.1\paperheight) to[bend right=10] ($(0,0.1\paperheight)$);
  \node[text width=\textwidth,text badly ragged] at (0.5\paperwidth,0.6\paperheight) {%
    \begin{minipage}[c]{\textwidth}
      \usebeamertemplate{subsection page content}%
    \end{minipage}
  };
  \end{tikzpicture}
}

%% -------------------------- title page -----------------------------

\defbeamertemplate{title page}{snake}
{%
  \nointerlineskip
  \begin{adjustbox}{width=\paperwidth,center}%
    \my@background@title
  \end{adjustbox}%
}

%% ----------------------- section and subsection --------------------

% create new template for section
\defbeamertemplate{section}{simple}{%
  \insertsectionnumber.\hspace*{1ex}\insertsection%
}

\AtBeginSection[]{\begin{frame}{\sectionpage}\end{frame}}

\defbeamertemplate{section page}{snake}{%
  \nointerlineskip
  \begin{adjustbox}{width=\paperwidth,center}%
    \my@background@section
  \end{adjustbox}%
}

\defbeamertemplate{section page content}{simple}{
  \begin{beamercolorbox}[wd=\textwidth,center]{section title}%
    \usebeamerfont{section title}
    \usebeamertemplate{section}%
  \end{beamercolorbox}
}

% create new template for subsection
\defbeamertemplate{subsection}{simple}{%
  \insertsectionnumber.\insertsubsectionnumber\hspace*{2ex}\insertsubsection%
}

\AtBeginSubsection[]{\begin{frame}{\subsectionpage}\end{frame}}

\defbeamertemplate{subsection page}{snake}{%
  \nointerlineskip
  \begin{adjustbox}{width=\paperwidth,center}%
    \my@background@subsection
  \end{adjustbox}%
}

\defbeamertemplate{subsection page content}{simple}{
  \begin{beamercolorbox}[wd=\textwidth,center]{subsection title}%
  \usebeamerfont{subsection title}%
  \usebeamertemplate{subsection}%
  \end{beamercolorbox}%
}
\defbeamertemplate{subsection page content}{dirichlet}{%
  \noindent
  \begin{minipage}{0.5\textwidth}
    \usebeamerfont{section title}%
    \usebeamertemplate{section}%
  \end{minipage}%
  \begin{minipage}{0.5\textwidth}
    \tableofcontents[sectionstyle=hide,subsectionstyle=show/shaded/hide]
  \end{minipage}%
}

\defbeamertemplate{subsection in toc}{dirichlet}{%
   \leavevmode
   \smash{\color{text1}\hspace{-1pt}\rule[-0.6em]{2pt}{2em}}\quad
   $\circ$ \inserttocsubsection\par
}

%% ---------------------- headline and footline ----------------------

\newif\ifmy@subsection \my@subsectionfalse

\newcommand{\my@sectionentry}[5]{%
  \hfill
  \ifnum\c@section=#1%
    \usebeamercolor{headline highlight}%
  \else%
    \usebeamercolor{headline}%
  \fi%
  \hyperlink{Navigation#3}{%
    \colorbox{bg}{%
      \hspace{0.2em}\rule[-1ex]{0pt}{3.25ex}\color{fg}#2\hspace{0.2em}%
    }%
  }%
  \let\slideentry=\my@slideentry
}

\newcommand{\my@subsectionentry}[5]{\my@subsectiontrue}

\newcommand{\my@slideentry}[6]{%
  \ifmy@subsection
    \usebeamercolor{headline}%
    \def\my@box{$\circ$}%
    \ifnum\c@section=#1%
      \usebeamercolor{headline highlight}%
      \ifnum\c@subsection=#2%
        \def\my@box{$\bullet$}%
      \fi
    \fi
    \beamer@link(#4){%
      \colorbox{bg}{%
        \rule[-1ex]{0pt}{3.25ex}\hspace{0.1em}\color{fg}\my@box\hspace{0.1em}%
      }%
    }%
    \my@subsectionfalse
  \fi
}

\defbeamertemplate{headline}{dirichlet}{%
  \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex]{headline}%
    \usebeamerfont{headline}%
    \kern\beamer@leftmargin
    \setlength{\fboxsep}{0pt}%
    \let\sectionentry=\my@sectionentry
    \let\beamer@subsectionentry=\my@subsectionentry
    \hskip 0pt plus -1fill\dohead
    \hskip 0pt plus 9fill\relax
    \Acrobatmenu{GoToPage}{\insertframenumber{}/\inserttotalframenumber}%
    \kern\beamer@rightmargin
  \end{beamercolorbox}%
  % default height is 0.4pt, which is ignored by adobe reader, so we increase it by 0.2pt
  {\color{dcolor}\hrule height 0.6pt}%
}

%% ------------------------- frame title -----------------------------

\defbeamertemplate{frametitle}{simple}{%
  \nointerlineskip
  \begin{beamercolorbox}[wd=\paperwidth,sep=0pt,leftskip=\beamer@leftmargin,%
                         rightskip=\beamer@rightmargin]{frametitle}
    \usebeamerfont{frametitle}%
    \rule[-3.6mm]{0pt}{12mm}\insertframetitle\rule[-3.6mm]{0pt}{12mm}\par
  \end{beamercolorbox}
}

%% ------------------- block and theorem -----------------------------

\defbeamertemplate{theorem begin}{simple}
{%
  \upshape%\bfseries\inserttheoremheadfont
  {\usebeamercolor[fg]{theoremname}%
  \inserttheoremname\inserttheoremnumber
  \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi%
  %\inserttheorempunctuation
  }%
  \quad\normalfont
}
\defbeamertemplate{theorem end}{simple}{\par}

\defbeamertemplate{proof begin}{simple}
{%
  %\bfseries
  {\usebeamercolor[fg]{proofname}\insertproofname}%
  \quad\normalfont
}
\defbeamertemplate{proof end}{simple}{\par}

%% --------------------------- font theme ----------------------------

\setbeamerfont{title}{size=\LARGE}
\setbeamerfont{subtitle}{size=\large}
\setbeamerfont{author}{size=\large}
\setbeamerfont{institute}{size=\normalsize}
\setbeamerfont{date}{size=\large}
\setbeamerfont{section in toc}{size=\Large}
\setbeamerfont{subsection in toc}{size=\large}
\setbeamerfont{headline}{size=\scriptsize}
\setbeamerfont{frametitle}{size=\large}
\setbeamerfont{block title}{size=\normalsize}

\usefonttheme{professionalfonts}
%\usepackage{arev}

%\setlength{\parskip}{5pt plus 1pt minus 1pt}

%% ---------------------------- color theme --------------------------

% always use rgb colors in pdf files
\substitutecolormodel{hsb}{rgb}

\definecolor{red69}{Hsb}{0,0.6,0.9}
\definecolor{yellow69}{Hsb}{60,0.6,0.9}
\definecolor{yellow99}{Hsb}{60,0.9,0.9}
\definecolor{green69}{Hsb}{120,0.6,0.9}
\definecolor{cyan69}{Hsb}{180,0.6,0.9}
\definecolor{azure53}{Hsb}{210,0.5,0.3}
\definecolor{blue77}{Hsb}{240,0.7,0.7}
\definecolor{blue88}{Hsb}{240,0.8,0.8}
\definecolor{blue97}{Hsb}{240,0.9,0.7}
\definecolor{magenta69}{Hsb}{300,0.6,0.9}
\definecolor{purple94}{Hsb}{330,0.9,0.4}

\colorlet{text1}{white}
\colorlet{back1}{blue77}
\colorlet{accent1}{yellow69}
\colorlet{accent2}{green69}
\colorlet{accent3}{red69}
\colorlet{accent4}{cyan69}
\colorlet{accent5}{magenta69}
\colorlet{filler1}{accent1!40!back1}
\colorlet{filler2}{accent2!40!back1}
\colorlet{filler3}{accent3!40!back1}
\colorlet{filler4}{accent4!40!back1}
\colorlet{filler5}{accent5!40!back1}
\colorlet{dcolor}{white}
\colorlet{fcolor}{azure53}

\setbeamercolor{normal text}{bg=blue77,fg=white}
\setbeamercolor{structure}{fg=yellow99}
\setbeamercolor{local structure}{fg=accent2}
\setbeamercolor{headline}{bg=azure53,fg=white}
\setbeamercolor{headline highlight}{parent=headline,bg=purple94}
\setbeamercolor{navigation symbols}{bg=purple94}
\setbeamercolor{navigation symbols dimmed}{fg=purple94}
\setbeamercolor{title}{use=structure,fg=structure.fg}
\setbeamercolor{subtitle}{fg=white}
\setbeamercolor{author}{fg=white}
\setbeamercolor{institute}{fg=white}
\setbeamercolor{date}{fg=white}
\setbeamercolor{section in toc}{parent=title}
\setbeamercolor{subsection in toc}{parent=title}
\setbeamercolor{section in toc shaded}{parent=normal text}
\setbeamercolor{subsection in toc shaded}{parent=normal text}
\setbeamercolor{frametitle}{parent=title}
\setbeamercolor{theoremname}{parent=subtitle}
\setbeamercolor{proofname}{parent=subtitle}
\setbeamercolor{block title}{fg=accent1,bg=back1!50!gray}
\setbeamercolor{block body}{bg=back1!50!lightgray}
\setbeamercolor{block title example}{fg=accent2,bg=back1!50!gray}
\setbeamercolor{block body example}{bg=back1!50!lightgray}
\setbeamercolor{block title alerted}{fg=accent3,bg=back1!50!gray}
\setbeamercolor{block body alerted}{bg=back1!50!lightgray}

%% ------------------------ select templates -------------------------

\setbeamertemplate{background canvas}[default]
\setbeamertemplate{background}[dirichlet]
\setbeamertemplate{title page}[snake]
\setbeamertemplate{section page}[snake]
\setbeamertemplate{section page content}[simple]
\setbeamertemplate{subsection page}[snake]
\setbeamertemplate{subsection page content}[dirichlet]
\setbeamertemplate{section}[simple]
\setbeamertemplate{subsection}[simple]
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[dirichlet]
\setbeamertemplate{section in toc shaded}[default][100]
\setbeamertemplate{subsection in toc shaded}[default][100]
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{headline}[dirichlet]
\setbeamertemplate{frametitle}[simple]
\setbeamertemplate{theorem begin}[default]
\setbeamertemplate{theorem end}[default]
\setbeamertemplate{proof begin}[default]
\setbeamertemplate{proof end}[default]
\setbeamertemplate{itemize items}[default]
\setbeamertemplate{enumerate items}[default]

%% ----------------------- handout mode ------------------------------

\mode&lt;handout&gt;{
  \setbeamertemplate{background canvas}{}
  \setbeamertemplate{background}{}
  \setbeamertemplate{subsection page content}[simple]
  \colorlet{text1}{black}
  \colorlet{back1}{white}
  \colorlet{accent1}{blue!90!black}
  \colorlet{accent2}{teal!70!black}
  \colorlet{accent3}{red!50!black}
  \colorlet{dcolor}{gray}
  \colorlet{fcolor}{white}
  \setbeamercolor{normal text}{fg=black, bg=white}
  \setbeamercolor{title}{fg=blue}
  \setbeamercolor{subtitle}{fg=black}
  \setbeamercolor{author}{fg=black}
  \setbeamercolor{institute}{fg=black}
  \setbeamercolor{date}{fg=black}
  \setbeamercolor{section in toc}{fg=blue!90!gray}
  \setbeamercolor{subsection in toc}{fg=blue!80!gray}
  \setbeamercolor{section in toc shaded}{fg=lightgray}
  \setbeamercolor{subsection in toc shaded}{fg=lightgray}
  \setbeamercolor{section title}{fg=blue!90!gray}
  \setbeamercolor{subsection title}{fg=blue!80!gray}
  \setbeamercolor{headline}{bg=white,fg=black}
  \setbeamercolor{headline highlight}{fg=blue!90!gray,bg=white}
  \setbeamercolor{frametitle}{fg=blue!70!gray,bg=}
  \setbeamercolor{theoremname}{fg=blue!60!gray}
  \setbeamercolor{proofname}{fg=blue!60!gray}
}

\mode
&lt;all&gt;

\makeatother
</pre></body></html>