[Tex/LaTex] Holiday present-ation vs. content contest

documentclass-writingfunmacrostypography

Need something to do during holiday break? Enter this holiday contest!

Your challenge is to write a happyholidays class that will compile the following input document in the most creative, entertaining, and impressive way.

\documentclass{happyholidays}

\begin{document}

\caroltitle{Deck the Halls}

\begin{carol}
Deck the halls with boughs of holly, \eol
\Falala. \eol
'Tis the season to be jolly, \eol
\Falala. \eol
Don we now our gay apparel, \eol
\Falala. \eol
Troll the ancient Yuletide carol, \eol
\Falala! \eol
\end{carol}

\illustration

\end{document}

If you've never written a class before, here's a start. You'll need to create the file happyholidays.cls, which should begin and end something like this:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{happyholidays}[2016/12/19 Stackexchange holiday challenge]
\LoadClass{article} % or a different class, or process options, etc.
% ...
\endinput

Using your tools of choice, you'll need to define the command caroltitle, a carol environment, the commands \Falala and \eol, and \illustration.
In case you don't know the song, the refrain should be "Fa la la la la, la la la la".

Here are some ideas to get you started:

  • Use one of the cursive, or blackletter, or uncial fonts from the LaTeX Font Catalog (or more!)
  • Use colors!
    • Perhaps: put the \Falala in a different color than the rest, and write the macro so the punctuation is included
  • Think of the different ways you could define carol: a tabular, a poem, or something wildly different
  • Draw the illustration in Tikz or other LaTeX tool
  • Use notated music with MusiXTeX as the illustration
  • Animation
  • Class options to radically change the layout, colors, fonts, etc.

Best Answer

A duck is running away from becoming a Christmas roast while jumping along the lines to help with the carol singing. Luckily it ran fast enough and is meeting all his friends on the last slide.

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{happyholidays}[2016/12/19 Stackexchange holiday challenge]
\LoadClass{beamer}
\RequirePackage{phaistos}
\RequirePackage{stackengine}
\RequirePackage{tikz}
\RequirePackage{bbding}
\RequirePackage{cookingsymbols}

\RequirePackage{venturis}
\renewcommand*\familydefault{\sfdefault}

% creating the title page
\newcommand{\caroltitle}[1]{
    \title{#1}
    \titlepage
}

%remove navigation symbols
\setbeamertemplate{navigation symbols}{}

% Note: very bad idea to use frame in a custom environment
% will break for fragile frames ... but for the spirit of X-Mas
\newenvironment{carol}{\begin{frame}[plain]}
{\end{frame}}

% not really a duck, but close enough
\newcommand{\duck}{\textcolor{red!70!black}{\visible<+>{\PHdove}}}

% Jumps from line to line
\newcommand{\eol}{\duck\newline}

% and helps the singer along the refrain
\newcommand{\lalala}{%
    \foreach \i in {1,...,4}{%
        \Longstack{{\duck} \colorstring{green!40!black}{red!70!black}{la}}\hskip-7pt%
        }
}

% refrain
\newcommand{\Falala}{%
    \Longstack[l]{{\duck} \colorstring{green!40!black}{red!70!black}{Fa}}\hskip-7.5pt%
    \lalala{},\lalala
}

% from http://tex.stackexchange.com/a/286126/36296
\newcommand\colorstring[3]{\def\colorA{#1}\def\colorB{#2}\colorstringhelp#3%
  \relax\relax\relax}
\def\colorstringhelp#1#2#3\relax{\textcolor<.->{\colorA}{#1}\textcolor<.->{\colorB}{#2}%
  \ifx\relax#3\else\colorstringhelp#3\relax\relax\fi}

% modified from http://tex.stackexchange.com/a/165087/36296
\pgfmathsetseed{\number\pdfrandomseed} % seed for random generator
\newcommand{\illustration}{%
        \setbeamertemplate{background canvas}{}
    \begin{frame}
        \frametitle{HoHoHo! Merry X-MAS!}
        \begin{tikzpicture}
%         \useasboundingbox (0,0) rectangle (\the\paperwidth, \the\paperheight); 
         \foreach \i in {1,...,100} {
               \pgfmathsetmacro{\x}{random(0,10000)/10000+0.2}%
               \pgfmathsetmacro{\y}{random(0,10000)/10000-0.3}%
               \pgfmathsetmacro{\r}{random(0,10000)/100}%
               \rotatebox{\r}{
                   \pgftext[at=\pgfpoint{\x\paperwidth}{\y\paperheight}, left, base]{\textcolor{red!\i!black}{\Large\PHdove}}
               }
           }; 
       \end{tikzpicture}
    \end{frame}
}

% snow in the background
\setbeamertemplate{background canvas}{%
        \begin{tikzpicture}
         \useasboundingbox (0,0) rectangle (\the\paperwidth, \the\paperheight); 
         \foreach \i in {1,...,100} {
               \pgfmathsetmacro{\x}{random(0,10000)/10000}%
               \pgfmathsetmacro{\y}{random(0,10000)/10000}%
               \pgfmathsetmacro{\r}{random(0,10000)/5000}%
               \rotatebox{\r}{
                   \pgftext[at=\pgfpoint{\x\paperwidth}{\y\paperheight},left,base]{\textcolor{gray!\i!white}{\SnowflakeChevron}}
               }
           }; 
       \end{tikzpicture}
}

% Titlepage
\setbeamertemplate{title page}{%
    \begin{frame}[plain]
    \centering
    \usebeamerfont{title}\inserttitle
    \vskip1cm
    \scalebox{3}{\color{red!70!black}\Huge\Oven~\color{green!40!black}\Large\PHdove}
    \end{frame}
}

\endinput

enter image description here


Now that the absence of ducks in latex is finally cured I can replace the dove staging as a duck by a real duck (warning: the following code may take a while to compile)

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{happyholidays}[2016/12/19 Stackexchange holiday challenge]
\LoadClass{beamer}
\RequirePackage{phaistos}
\RequirePackage{stackengine}
\RequirePackage{tikz}
\RequirePackage{bbding}
\RequirePackage{cookingsymbols}
\RequirePackage{tikzducks}
\RequirePackage{venturis}
\renewcommand*\familydefault{\sfdefault}

% creating the title page
\newcommand{\caroltitle}[1]{
    \title{#1}
    \titlepage
}

%remove navigation symbols
\setbeamertemplate{navigation symbols}{}

% Note: very bad idea to use frame in a custom environment
% will break for fragile frames ... but for the spirit of X-Mas
\newenvironment{carol}{\begin{frame}[plain]}
{\end{frame}}

% really a duck :) 
\newcommand{\santa}{\visible<+>{\raisebox{-0.6em}{\begin{tikzpicture}[scale=0.3]
\duck
\end{tikzpicture}}}}


% Jumps from line to line
\newcommand{\eol}{\santa\newline}

% and helps the singer along the refrain
\newcommand{\lalala}{%
    \foreach \i in {1,...,4}{%
        \Longstack{{\santa} \colorstring{green!40!black}{red!70!black}{la}}\hskip-7pt%
        }
}

% refrain
\newcommand{\Falala}{%
    \Longstack[l]{{\santa} \colorstring{green!40!black}{red!70!black}{Fa}}\hskip-7.5pt%
    \lalala{},\lalala
}

% from http://tex.stackexchange.com/a/286126/36296
\newcommand\colorstring[3]{\def\colorA{#1}\def\colorB{#2}\colorstringhelp#3%
  \relax\relax\relax}
\def\colorstringhelp#1#2#3\relax{\textcolor<.->{\colorA}{#1}\textcolor<.->{\colorB}{#2}%
  \ifx\relax#3\else\colorstringhelp#3\relax\relax\fi}

% modified from http://tex.stackexchange.com/a/165087/36296
\pgfmathsetseed{\number\pdfrandomseed} % seed for random generator
\newcommand{\illustration}{%
        \setbeamertemplate{background canvas}{}
    \begin{frame}
        \frametitle{HoHoHo! Merry X-MAS!}
        \centering
\begin{tikzpicture}[scale=3]
    \duck
    \fill[red!60!black] 
        (0.430,1.803) .. controls (0.590,2.174) and (0.837,2.065) ..
        (1.118,1.954) .. controls (1.679,1.731) and (1.328,1.193) .. 
        (1.647,1.057) .. controls (1.638,1.255) and (1.745,2.104) .. 
        (1.168,2.270) .. controls (0.867,2.356) and (0.536,2.280) .. 
        (0.430,1.803) -- cycle;
    \fill[white!80!brown] 
        (0.44,1.733) .. controls (0.211,2.299) and (1.082,2.188) .. 
        (1.456,1.759) .. controls (1.534,1.637) and (1.480,1.545) .. 
        (1.400,1.566) .. controls (1.265,1.714) and (0.577,2.267) .. 
        (0.44,1.733) -- cycle;
    \fill[white!80!brown] (1.6,1.0) circle (0.17);
    \end{tikzpicture}
    \end{frame}
}

% snow in the background
\setbeamertemplate{background canvas}{%
        \begin{tikzpicture}
         \useasboundingbox (0,0) rectangle (\the\paperwidth, \the\paperheight); 
         \foreach \i in {1,...,100} {
               \pgfmathsetmacro{\x}{random(0,10000)/10000}%
               \pgfmathsetmacro{\y}{random(0,10000)/10000}%
               \pgfmathsetmacro{\r}{random(0,10000)/5000}%
               \rotatebox{\r}{
                   \pgftext[at=\pgfpoint{\x\paperwidth}{\y\paperheight},left,base]{\textcolor{gray!\i!white}{\SnowflakeChevron}}
               }
           }; 
       \end{tikzpicture}
}

% Titlepage
\setbeamertemplate{title page}{%
    \begin{frame}[plain]
    \centering
    \usebeamerfont{title}\inserttitle
    \vskip1cm
    \scalebox{3}{\color{red!70!black}\Huge\Oven~\color{green!40!black}}\raisebox{-0.4em}{\begin{tikzpicture}
        \duck[magichat,magicwand]
        \end{tikzpicture}}
    \end{frame}
}

\endinput

enter image description here enter image description here