Skip to content

Instantly share code, notes, and snippets.

@apoorvalal
Last active January 20, 2024 02:25
Show Gist options
  • Save apoorvalal/40843c0b6de8f43b6cf9031404aab9df to your computer and use it in GitHub Desktop.
Save apoorvalal/40843c0b6de8f43b6cf9031404aab9df to your computer and use it in GitHub Desktop.
generate both an article and slide-deck from the same tex file using beamerswitch.
\documentclass[%
article,
% beamer,
beameroptions={ignorenonframetext,14pt},
articleoptions={a4paper,12pt},
also={trans,handout,article}
]{beamerswitch}
\handoutlayout{nup=3plus,border=1pt}
\articlelayout{maketitle,frametitles=none}
\mode<article>{\usepackage[hmargin=2cm,vmargin=2cm]{geometry}}
\mode<beamer>{
\usecolortheme{metropolis}
\beamertemplatenavigationsymbolsempty
}
\title{Article and Slides}
\subtitle{\texttt{beamerswitch} is magic}
\author{Apoorva Lal}
\date{\today}
\begin{document}
\begin{frame} \maketitle \end{frame}
This very brief demonstration shows how to use the
\textsf{beamerswitch} class. It allows easy switching between four
\textsf{beamer} modes:
\begin{frame}{Beamer modes}
\begin{itemize}[<+->]
\item \textbf{beamer:} regular slides
\item \textbf{handout:} slides suitable for printing on paper
\end{itemize}
\end{frame}
Notice how the text outside frames is only shown in article mode. Also,
This PDF also has title and author information saved in the metadata (look
at the properties in your PDF viewer).
Happy {\LaTeX}ing!
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment