\documentclass[aspectratio=169]{beamer}

\usetheme{Celestia}

\subject{\LaTeX{} Presentation}
\title[The Celestia Beamer Theme]{A Tour of the Celestia Beamer Theme}
\subtitle{Showcasing the main features}
\author{Razik Ikhlef}
\institute{https://edulatex.xyz}
\date{\today}

\newcommand{\apercu}[2]{%
  \begin{frame}[celestia={#1}]{Prime numbers}
    \framesubtitle{#2}
    \begin{definition*}[title=Prime number]
      An integer $p \geq 2$ is \emph{prime} if its only divisors are $1$ and itself.
    \end{definition*}
    \begin{example*}
      $2$, $3$, $5$, $7$ and $11$ are prime; $9 = 3 \times 3$ is not.
    \end{example*}
    \begin{alertblock}{Warning}
      The number $1$ is not prime.
    \end{alertblock}
  \end{frame}}

\begin{document}

\maketitle

\begin{frame}{Outline}
    \tableofcontents
\end{frame}

\section{Getting started}

\begin{frame}{A simple slide}
    Celestia is a modern, polished Beamer theme designed for professional and visually appealing presentations.

    \medskip

    It ships with:
    \begin{itemize}
        \item 7 carefully crafted color palettes
        \item 10 frame title styles
        \item 11 footer styles
        \item 22 block styles
        \item 5 code styles and 6 preset styles
    \end{itemize}
\end{frame}

\begin{frame}{Numbered lists and descriptions}
    \framesubtitle{Frame subtitle support}

    All three compilation engines are supported:
    \begin{enumerate}
        \item pdfLaTeX --- fast compilation, maximum compatibility
        \item LuaLaTeX --- native access to system fonts
        \item XeLaTeX --- advanced OpenType font handling
    \end{enumerate}

    \medskip

    \begin{description}
        \item[serifface] Serif font (secondary)
        \item[sansface] Sans-serif font (body text)
        \item[monoface] Monospace font for code
        \item[mathface] Font for mathematical formulas
    \end{description}
\end{frame}

\section{Blocks and environments}

\begin{frame}{The three block types}
    \begin{block}{Standard block}
        This block uses the \texttt{blockcolor} defined by the current palette. It highlights important information.
    \end{block}

    \begin{exampleblock}{Example block}
        This block uses the \texttt{examplecolor}. It is well suited for concrete examples and illustrations.
    \end{exampleblock}

    \begin{alertblock}{Alert block}
        This block uses the \texttt{alertcolor}. It draws attention to critical points or common pitfalls.
    \end{alertblock}
\end{frame}

\begin{frame}{Theorem and proof}
    \begin{theorem}[title=Sum of the first integers]
        For every integer $n \geq 1$:
        \[ 1 + 2 + \cdots + n = \frac{n(n+1)}{2} \]
    \end{theorem}

    \begin{proof}
        Let $S = 1 + 2 + \cdots + n$.
        Writing the sum in reverse order:
        $S = n + (n-1) + \cdots + 1$.
        Adding term by term: $2S = n(n+1)$.
    \end{proof}
\end{frame}

\begin{frame}{Definitions and properties}
    \begin{definition}[title=Prime number]
        An integer $\mathterm{p} \geq 2$ is called \emph{prime} if its only divisors are $1$ and itself.
    \end{definition}

    \begin{property}[title=Infinitude of primes]
        There are infinitely many prime numbers.
    \end{property}

    \begin{remark}
        The number $1$ is not considered prime by convention.
    \end{remark}
\end{frame}

\begin{frame}{Lemma, corollary and proposition}
    \begin{lemma}[title=Euclidean division]
        For every integer $a$ and every integer $b > 0$, there exists a unique pair $(q, r)$ such that $a = bq + r$ with $0 \leq r < b$.
    \end{lemma}

    \begin{corollary}
        Every integer is either even or odd.
    \end{corollary}

    \begin{proposition}
        If $p$ is prime and $p \mid ab$, then $p \mid a$ or $p \mid b$.
    \end{proposition}
\end{frame}

\begin{frame}{Method, activity, application and exercise}
    \begin{method}[title=Factorization]
        To factor $n$, test divisibility by $2, 3, 5, 7, \ldots$ up to $\sqrt{n}$.
    \end{method}

    \begin{columns}[T]
        \begin{column}{0.48\textwidth}
            \begin{activity}
                Find the prime factorization of $360$.
            \end{activity}
        \end{column}

        \begin{column}{0.48\textwidth}
            \begin{application}
                Simplify the fraction $\dfrac{360}{84}$ using prime factorization.
            \end{application}
        \end{column}
    \end{columns}

    \begin{exercise}
        Show that $2^{10} - 1$ is not prime.
    \end{exercise}
\end{frame}

\begin{frame}[fragile]{Summary and styles per family}
    \begin{summary}
        \begin{itemize}
            \item Every integer $n \geq 2$ is a product of prime factors.
            \item There are infinitely many prime numbers.
        \end{itemize}
    \end{summary}

    Each family of blocks has its own style: a panel for definitions and results, a mark for examples, remarks, proofs and activities, a rule under the title for exercises. One option per family changes it:

    \begin{lstlisting}[style=latex]
\usetheme[theoremblock=ruled, proofblock=masthead]{Celestia}
    \end{lstlisting}
\end{frame}

\section{Components}

\begin{frame}{Multiple choice question}
    \framesubtitle{The \texttt{quiz} environment with \texttt{\textbackslash correct}}

    What is the value of $\displaystyle\int_0^1 2x\,dx$?

    \bigskip

    \begin{quiz}
        \item $0$
        \correct{$1$}
        \item $2$
        \item $\dfrac{1}{2}$
    \end{quiz}

    \bigskip

    \only<2>{\alert{The correct answer is highlighted on click.}}
\end{frame}

\begin{frame}[fragile]{Syntax highlighting}
    A ready-to-use \texttt{python} style is included for keyword coloring:

    \begin{lstlisting}[style=python]
def fibonacci(n):
    if n <= 1:
        return n
    return fibonacci(n-1) + fibonacci(n-2)

for i in range(10):
    print(fibonacci(i))
    \end{lstlisting}
\end{frame}

\begin{frame}[fragile]{Program and output}
    \begin{code}{python}
for n in range(1, 4):
    print(f"{n} squared is {n * n}")
    \end{code}

    \begin{results}
1 squared is 1
2 squared is 4
3 squared is 9
    \end{results}
\end{frame}

\begin{frame}{Columns and blocks}
    \begin{columns}[T]
        \begin{column}{0.48\textwidth}
            \begin{block}{Highlights}
                \begin{itemize}
                    \item Polished design
                    \item Fine-grained customization
                    \item 7 color palettes
                    \item pdfLaTeX compatible
                \end{itemize}
            \end{block}
        \end{column}

        \begin{column}{0.48\textwidth}
            \begin{exampleblock}{Font options}
                Customizable fonts:
                \begin{itemize}
                    \item \texttt{serifface} (literata)
                    \item \texttt{sansface} (inter)
                    \item \texttt{monoface} (plex-mono)
                    \item \texttt{mathface} (inter)
                \end{itemize}
            \end{exampleblock}
        \end{column}
    \end{columns}
\end{frame}

\begin{frame}{Tables}
    The ten palettes of the theme:

    \medskip

    \centering
    \begin{tabular}{llc}
        \hline
        \tablehead{Palette} & \tablehead{Character} & \tablehead{Background} \\
        \hline
        nordic & icy blues (default) & \texttt{\#F5F8F8} \\
        palatial & midnight blue and gold & \texttt{\#F8FAFC} \\
        petrol & petrol green and brass & \texttt{\#F9FBF9} \\
        terracotta & terracotta & \texttt{\#FFF9F5} \\
        velvet & plum and gold & \texttt{\#FBF9F8} \\
        forest & forest green and copper & \texttt{\#F7FAF8} \\
        burgundy & burgundy and gold & \texttt{\#FDF8F8} \\
        graphite & graphite grey and orange & \texttt{\#FCFBFA} \\
        midnight & deep indigo, dark background & \texttt{\#161828} \\
        dusk & dark teal, dark background & \texttt{\#131C20} \\
        \hline
    \end{tabular}

    \bigskip

    The last two suit dimly lit rooms.
\end{frame}

\begin{frame}{Key figures and source}
    \begin{columns}[T]
        \begin{column}{0.3\textwidth}
            \keyfigure{7}{color palettes}
        \end{column}
        \begin{column}{0.3\textwidth}
            \keyfigure{6}{preset styles}
        \end{column}
        \begin{column}{0.3\textwidth}
            \keyfigure{3}{compilation engines}
        \end{column}
    \end{columns}

    \vspace{2em}

    The \texttt{\textbackslash keyfigure} command sets a number in a large size, followed by its label. The \texttt{\textbackslash source} command writes a source line above the footer.

    \source{Source: Celestia documentation.}
\end{frame}

\begin{frame}{Formatting commands}
    Celestia provides a set of dedicated commands:

    \medskip

    \begin{itemize}
        \item \alert{Alert text} with \texttt{\textbackslash alert\{...\}}
        \item $\mathterm{x}$ is a math term (\texttt{\textbackslash mathterm})
        \item $\mathdef{f}$ is a math definition (\texttt{\textbackslash mathdef})
        \item \texttt{Inline code} with \texttt{\textbackslash texttt\{...\}}
    \end{itemize}

    \bigskip

    Formulas blend in seamlessly:
    \[
        e^{i\pi} + 1 = 0
    \]
\end{frame}

\celestiaset{sectiontoc}

\section{Settings in the course of the document}

\begin{frame}[fragile, celestia={block=shaded}]{A slide with its own settings}
    The \texttt{celestia} frame option changes the settings for a single slide:

    \begin{lstlisting}[style=latex]
\begin{frame}[celestia={block=shaded}]{A slide with its own settings}
    \end{lstlisting}

    \begin{block}{\texttt{shaded} blocks}
        This slide is the only one to use this block style. The next one gets the settings of the document back.
    \end{block}
\end{frame}

\begin{frame}[fragile, celestia={palette=midnight}]{A dark slide}
    Colors change in the same way:

    \begin{lstlisting}[style=latex]
\begin{frame}[celestia={palette=midnight}]{A dark slide}
    \end{lstlisting}

    \begin{exampleblock}{For the rest of the document}
        Placed between two slides, the \texttt{\textbackslash celestiaset\{...\}} command applies to all the slides that follow.
    \end{exampleblock}
\end{frame}

\begin{frame}{The outline on the section slides}
    The \texttt{sectiontoc} option recalls the outline of the presentation on every section slide.

    \medskip

    \begin{itemize}
        \item \texttt{sectiontoc}: the list of sections takes the place of the title. This is the form of the section slide before this one.
        \item \texttt{sectiontoc=dots}: the title stays alone, followed by one dot per section. This is the form of the section slide after this one.
    \end{itemize}
\end{frame}

\celestiaset{sectiontoc=dots}

\section{Preset styles and palettes}

\begin{frame}{Preset styles and palettes}
    A preset style sets the palette, the frame title, the footer and the blocks in one go. The next six slides show each of the styles, the seven after them each of the palettes.

    \medskip

    Every setting of a style can still be changed: \texttt{style=modern, palette=petrol}.
\end{frame}

\apercu{style=celestia}{\texttt{style=celestia}: palette nordic, title ruled, footer info, blocks roles}
\apercu{style=modern}{\texttt{style=modern}: palette nordic, title subtle, footer info, blocks sober}
\apercu{style=signature}{\texttt{style=signature}: palette petrol, title cosmic, footer cosmic, blocks fullbar}
\apercu{style=executive}{\texttt{style=executive}: palette palatial, title leftbar, footer fullbar, blocks fullbar}
\apercu{style=sober}{\texttt{style=sober}: palette terracotta, title gradient, footer info, blocks sober}
\apercu{style=stage}{\texttt{style=stage}: palette midnight, title ruled, footer minimalist, blocks ribbon}

\apercu{palette=nordic}{\texttt{palette=nordic}: icy Scandinavian blues (default)}
\apercu{palette=palatial}{\texttt{palette=palatial}: midnight blue with gold accents}
\apercu{palette=petrol}{\texttt{palette=petrol}: petrol greens with brass accents}
\apercu{palette=terracotta}{\texttt{palette=terracotta}: warm terracotta tones}
\apercu{palette=velvet}{\texttt{palette=velvet}: dark plum with gold accents}
\apercu{palette=forest}{\texttt{palette=forest}: forest green with copper accents}
\apercu{palette=burgundy}{\texttt{palette=burgundy}: burgundy with gold accents}
\apercu{palette=graphite}{\texttt{palette=graphite}: graphite grey with an orange accent}
\apercu{palette=midnight}{\texttt{palette=midnight}: light text on a deep indigo background}
\apercu{palette=dusk}{\texttt{palette=dusk}: light text on a dark teal background}

\begin{frame}{Text and quotations}
    The body text uses a sans-serif typeface optimised for projection. Contrast ratios are calibrated to ensure readability, even in large lecture halls.

    \vspace{1em}

    \begin{quote}
        \emph{Simplicity is the ultimate sophistication.}

        \hfill\textcolor{emphasis}{--- Leonardo da Vinci}
    \end{quote}

    \begin{quote}
        \emph{The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.}

        \hfill\textcolor{emphasis}{--- Edsger W. Dijkstra}
    \end{quote}
\end{frame}

\begin{frame}[quote]
    Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.\\[0.6em]
    {\small Antoine de Saint-Exupéry}
\end{frame}

\begin{frame}[standout]
    Thank you for your attention!

    \vspace{1em}
    \large celestia v2.3.0
\end{frame}

\end{document}
