<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \iffalse meta-comment
%
% Copyright (C) 1995 Arne John Glenstrup
%               2000 Uffe Friis Lichtenberg
%               2024 Kristoffer Levin Hansen
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3 of this license or (at your option) any later
% version. The latest version of this license is in:
%
% http://www.latex-project.org/lppl.txt
%
% and version 1.3 or later is part of all distributions of
% LaTeX version 2005/12/01 or later.
%
%&lt;*driver&gt;
\ProvidesFile{ucph-revy.dtx}
%&lt;/driver&gt;
%&lt;class&gt;\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%&lt;class&gt;\ProvidesClass{ucph-revy}
%&lt;*class&gt;
    [2024/12/18 v1.1.0  A class for making musical manuscripts]
%&lt;/class&gt;
%&lt;*driver&gt;
\documentclass[a4paper]{ltxdoc}
\makeatletter

\usepackage[\revy@doclang]{babel}
\usepackage{iflang}
\usepackage{calc}
\usepackage{fancyvrb}
\usepackage{hypdoc}
\usepackage{tabulary}
\usepackage{tikz}
\usepackage{caption}
\DeclareCaptionFormat{revy}{%
  \hfill{\bfseries\sffamily\small #1\hspace{-1cm}}

  \footnotesize{#3}
}
\captionsetup[figure]{format=revy}
\let\oldfigure=\figure
\let\oldendfigure=\endfigure
\renewenvironment{figure}[1][]{
  \oldfigure[#1]
  \rule{\textwidth + 1cm}{.5pt}
  
  \vspace*{-.8em}\caption{}%
  \let\oldcaption\caption
  \def\caption##1{
    \let\caption\oldcaption
    \par\rule{\textwidth + 1cm}{1pt}
    \par\vspace*{-.4em}
    \caption*{##1}}%
  
  \vspace*{-1.5em}%
}{
  \oldendfigure
}
\bibliographystyle{plain}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\long\def\jump#1\land{}
\newenvironment{implementation}{%
  \par\pagebreak[2]\noindent
  \interlinepenalty 100%
  \let\imppar=\par
  \def\par{\penalty 100\imppar}%
  \rule{\textwidth + 1cm}{.5pt}%
  \makebox[0pt][r]{%
    \hfill\small\raisebox{-1em}{\bfseries{\sffamily{%
          \IfLanguageName{danish}{Implementering}{Implementation}%
        }}}%
  }\par\nopagebreak%
}{%
  \par\noindent%
  \raisebox{.7em}{\rule{\textwidth + 1 cm}{1pt}}%
  \par\pagebreak[2]%
}
\IfLanguageName{danish}{
  \newenvironment{danish}{\relax}{\relax}
  \newenvironment{english}{%
    \long\def\totheend##1\end##2{%
      \IfStrEq{english}{##2}{\end{english}}{\totheend}}%
    \totheend
  }{\relax}
}{
  \newenvironment{english}{\relax}{\relax}
  \newenvironment{danish}{%
    \long\def\totheend##1\end##2{%
      \IfStrEq{danish}{##2}{\end{danish}}{\totheend}}%
    \totheend
  }{\relax}
}
\newenvironment{showcommand}{\quote}{\endquote}
\usepackage{hyperref}

% Multicol ToC:
\usepackage{tocloft}
\renewcommand\cfttocprehook{\begin{multicols}{2}}
\renewcommand\cfttocposthook{\end{multicols}}

\urlstyle{sf}
%&lt;/driver&gt;
%&lt;*class&gt;
%
% \fi
% \begingroup
% ^^A we'll just hijack some functionality here...
%  \let\endinput\relax
%  \MaybeStop{
%    \gdef\implementation{%
%      \def\decide##1{%
%        \IfStrEq{implementation}{##1}%
%          {\end{implementation}}%
%        { \catcode`\{=12 \catcode`\}=12
%          \totheend
%        }
%      }
%      \long\def\totheend##1\end{%
%        \catcode`\{=1 \catcode`\}=2
%        \decide
%      }
%      \catcode`\{=12 \catcode`\}=12
%      \totheend
%    }
%    \gdef\endimplementation{\relax}
%  }
%\endgroup
%
% \changes{v1.0.0}{2023/05/23}{Initial conversion to a class}
%
% \GetFileInfo{ucph-revy.dtx}
%
% \DoNotIndex{\#,\$,\%,\&amp;,\@,\\,\{,\},\^,\_,\~,\ ,\,,\/,\TeX,\LaTeX}
% \DoNotIndex{\@ne}
% \DoNotIndex{\fi,\else}
% \DoNotIndex{\advance,\begingroup,\catcode,\closein,\end,\begin}
% \DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup,\xdef}
% \DoNotIndex{\newcommand,\renewcommand,\newenvironment,\renewenvironment}
%
% \newcommand{\cn}{\textsf{ucph--revy}}
%
% \title{\begin{english}The \cn\ class\end{english}\begin{danish}
%   Klassen \cn\end{danish}\thanks{This document corresponds to
% \cn~\fileversion, dated \filedate.}}
% \author{Kristoffer Levin Hansen \\
% \href{mailto:kristoffer@levinhansen.dk}{\sf kristoffer@levinhansen.dk}}
%
% \maketitle
%
% \begin{abstract}
%   \IfLanguageName{danish}{
%   En klasse, som kommer med kommer med kommandoerne til at typesÃ¦tte
%   et manuskript i den stil, som bruges blandt SaTyR--revyerne ved
%   Science pÃ¥ KÃ¸benhavns Universitet. Tidligere kendt som
%   \texttt{revy.sty}.
% }{
%   A \LaTeX\ class for typesetting scripts in the style used for
%   student theatric productions at the University of Copenhagen's
%   (ucph) science faculties. Formerly known to some as
%   \texttt{revy.sty}. }
% \end{abstract}
%
% \tableofcontents
% 
%   \begin{figure}[p]
%     \centering
%     \newtoks\tabtoks
%     \tabtoks={\undertab 0\text Akt 1\stop\overtab 1\text Introsang\stop\overtab 2\text Eksempel\stop\overtab 3\text Example\stop\overtab 4\text Studiepolitisk indlÃ¦g\stop\undertab 4\text Akt 2\stop\overtab 5\text Noget om kvant\stop\overtab 6\text Sang til en forelÃ¦ser\stop\undertab 6\text Ekstranumre\stop\overtab 7\text Under bÃ¦ltestedet\stop\undertab 7\text\done\stop}
%     \edef\revy@tabs{\the\tabtoks}
%     \let\LARGE\small
%     \let\Large\footnotesize
%     \let\large\scriptsize
%     \tiny
%     \renewenvironment{document}{}{}
%     \IfLanguageName{danish}{\exDaPre}{}
%     \IfLanguageName{english}{\exEnPre}{}
%     \paperheight 90em
%     \def\rectoheaderthumbtab{%
%       \vspace*{-82em}
%       \revy@thumbindex{
%         \tabheight 11.5em
%         \def\overtableft{-0.4cm}
%         \def\overtabright{0.1cm}
%         \def\undertableft{\overtableft - 0.4cm}
%         \def\underlabeloffset{\undersign.2cm}
%         \filtername{\@title}
%       }
%       \hspace{-8.1em}%
%     }%
%       \begin{minipage}[t][\textheight]{\textwidth}
%       \vfill
%     \hspace{-4cm}
%     \fbox{
%     \hspace{1cm}
%     \begin{minipage}[t][81em]{.55\textwidth}
%       \def\getpagerefnumber#1{2}
%       \let\maketitle\class@maketitle
%       \vbox to 0pt{\vss
%         \hbox to \textwidth {\hfil\rectoheaderthumbtab }}
%       \vspace{8em}
%       \begin{danish}
%         \exDaPOne
%       \end{danish}
%       \begin{english}
%         \exEnPOne
%       \end{english}
%       \vspace{1em}
%     \end{minipage}
%     \hspace{1cm}
%   }
%     \fbox{
%     \hspace{1cm}
%     \begin{minipage}[t][81em]{.55\textwidth}
%       \ps@revyheadings
%       \let\thepage=2
%       \def\pageref#1{2}
%       \vspace{3em}
%       \@oddhead
%       \begin{danish}
%         \exDaPTwo
%         \exDaPThree
%         \exDaPFour
%       \end{danish}
%       \begin{english}
%         \exEnPTwo
%         \exEnPThree
%         \exEnPFour
%       \end{english}
%     \end{minipage}
%     \hspace{1cm}
%   }
%     \hspace*{-15cm}
%
%     \vfill
%     
%     \caption{
%     \begin{danish}
%       Et eksempel pÃ¥, hvad denne klasse kan bruges til at
%       lave.
%     \end{danish}
%     \begin{english}
%       An example of what this class can be used to create.
%     \end{english}
%     }\label{eksempel}\label{example}
%     \end{minipage}
%   \end{figure}
%
% \begin{danish}
%   \section{Introduktion}
%
%   I umindelige tider har studenterrevyerne pÃ¥ KU Science brugt den
%   samme stil til at typesÃ¦tte deres manuskripter. Den har indtil nu
%   boet i filen \texttt{revy.sty}, som er blevet det rundt mellem
%   revyster og revytter i andÃ¦gtig stilhed. Den her klasse bibeholder
%   funtionaliteten fra \texttt{revy.sty}, men implementerer den nu i
%   dens korrekte plads i \LaTeX--hierakiet, som en
%   klasse\cite{overleaf:classpackage}, og med et mere beskrivende
%   navn, sÃ¥ den kan udgives i en pakkesamling.
%
%   Klassen kan sÃ¦tte bÃ¥de talt dialog og sangtekster, med
%   rolleangivelse, og kommer med en bestemt stil til titler,
%   sidehoveder og ting som rolle- og rekvisitlister.
%
%   Et eksempel pÃ¥, hvordan manuskripter skrevet i vores stil ser ud,
%   er gengivet i figur \ref{eksempel}. Den er tiltÃ¦nkt til brug i en
%   revy, hvor hvert nummer lever sit eget liv indtil ret sent i
%   processen. Derfor er hvert nummer sit eget dokument, med egen
%   titel og andre informationer, og samlingen til et fÃ¦rdigt \TeX
%   hÃ¦fte er ikke inden for klassens emnefelt.
%
%   Vi har ogsÃ¥ lavet en programpakke, som stÃ¥r for at lave et samlet
%   \TeX hÃ¦fte ud af en samling af \texttt{.tex}--filer (som bruger
%   den her dokumentklasse). Den er sidst set pÃ¥ adressen
% \end{danish}
% \begin{english}
%   \section{Introduction}
%
%   A style of typesetting scripts in \LaTeX, originally developed for
%   DIKURevy, the students' revue at DIKU, the Computer Scinece
%   Institute at ucph, the University of Copenhagen. It has spread to
%   adjacent revues at ucph Science as they have sprung into
%   existence. Once known to its users as the package
%   \texttt{revy.sty}, that package has been transplanted into this
%   class, at the proper place in the \LaTeX\
%   hierarchy\cite{overleaf:classpackage}, practically in its
%   entirety.
%
%   This class features the ability to set lines of dialogue and song
%   lyrics with a clearly associated indication of the speaker or
%   singer, along with stage directions. The style is intended for a
%   revue, which is formed out of a number of little pieces, so there
%   commands for typesetting a cast list and prop list, along with
%   relevant information like the time to perform, or the name of a
%   larger piece, which are intended to be typeset along with the
%   title.
%
%   Figure \ref{eksempel} shown an example of how all this looks when
%   typeset.
%
%   If you're looking for the script package that's designed to help
%   with typesetting and compositing a full manuscript, it was last
%   seen at
% \end{english}^^A
% \url{https://github.com/fysikrevy/fysikrevytex}.
%
% \begin{danish}^^A
%   IfÃ¸lge \texttt{revy.sty} var de originale forfattere
% \end{danish}^^A
% \begin{english}^^A
%   According to \texttt{revy.sty}, its origianl authors were
% \end{english}^^A
% Uffe Friis Lichtenberg, Arne John Glenstrup
% \begin{danish}^^A
%   og 
% \end{danish}^^A
% \begin{english}
%   and 
% \end{english}^^A
% Anders KomÃ¡r Ravn.
%
% \PrintChanges
%
% \begin{danish}
%   \section{Brugsvejledning}
%   Et eksempel pÃ¥ en \texttt{.tex}-fil, som kan bruges til at
%   producere noget nÃ¦r det i figur \ref{eksempel}, er gengivet i sin
%   helhed i appendiks \ref{fullex}, eller filen
%   \texttt{Eksempel.tex}, som \LaTeX\ burde have produceret sammen
%   med den fil, som du lÃ¦ser nu. Her gennemgÃ¥r vi nogle af
%   hÃ¸jdepunkterne, for at forstÃ¥ hvordan klassen kan bruges.
% \end{danish}
% \begin{english}
%   \section{Usage}
%   An example of a \texttt{.tex} file that will typeset something
%   like figure \ref{example} is presented in appendix \ref{fullex},
%   or in the file \texttt{Example.tex}, which should have been
%   produced by \LaTeX\ alongside the documentation file that you are
%   reading. In the present section, we'll hit some of the highlights
%   of that file, to understand how it works.
% \end{english}
% \begin{danish}
%   \subsection{Invokering og valgmuligheder}
%   Klassen (ned)kaldes, ved at starte en \texttt{.tex}--fil med
% \end{danish}
% \begin{english}
%   \subsection{Invoking and arguments}
%   First, to use the \cn\ class in a \verb|.tex| file, that file must
%   start with
% \end{english}
%
% \begin{verbatim}
% \documentclass{ucph-revy}
% \end{verbatim}
%
% \begin{danish}
%   \cn\ nedarver fra \DescribeMacro{article}
%   \textsf{article}--klassen, sÃ¥ alle valgmuligheder, som godtages af
%   \texttt{article} godtages ogsÃ¥ af \cn. Som standard vÃ¦lger \cn\
%   \texttt{a4paper} og \texttt{11pt}, fra \textsf{article}'s
%   valgmuligheder, hvis \cn\ ikke bliver kaldt med nogen
%   valgmuligheder, som er i modstrid med dem.
%
%   Derudover tilfÃ¸jer \cn\
%   valgmulighederne \DescribeMacro{thumbindex} \verb|thumbindex|
%   og \DescribeMacro{planfile=} \verb|planfile|, som tilfÃ¸jer
%   registermÃ¦rkninger og lader forfatteren Ã¦ndre hvilken fil
%   registermÃ¦rkningerne bliver bygget ud fra. Hvad det mere specifikt
%   betyder bliver gennemgÃ¥et i sektion \ref{thumbindex}.
% \end{danish}
% \begin{english}
%   \cn\ inherits from the \texttt{article}\DescribeMacro{article}\ 
%   class, and accepts all its options. It sets \texttt{a4paper} and
%   \texttt{11pt} by default, if not given any contrary options.
%
%   In addition, \cn\ add the options
%   \DescribeMacro{thumbindex} \verb|thumbindex|
%   and \DescribeMacro{planfile=}\verb|planfile|, which activates the
%   construction of thumb indexes in the file and allows setting the
%   file that the thumb index is built from. We'll go through exactly
%   how this works in seciton \ref{thumbindex}.
% \end{english}
%
% \begin{implementation}
%   \label{loadclass}
%   \begin{danish}
%     Vi hÃ¥ndterer valgmuligheder til klassen her, i starten af
%     filen. Vi skal bruge den her pakke.
%   \end{danish}
%   \begin{english}
%     We handle class options here, at the start of the file. To do
%     so, we need this package.
%   \end{english}
%    \begin{macrocode}
\RequirePackage{xstring}
%    \end{macrocode}
% \begin{macro}{\if@thumbindex}
%     \begin{danish}
%       Kommer til at holde styr pÃ¥, om \verb|thumbindex| er givet. Vi
%       kommer til at gÃ¸re noget med den nede i sektion
%       \ref{thumbindex}.
%     \end{danish}
%     \begin{english}
%       Keeps track of \verb|thumbindex|. We will do stuff with it
%       when we get to section \ref{thumbindex}.
%     \end{english}
%    \begin{macrocode}
\newif\if@thumbindex\@thumbindexfalse
%    \end{macrocode}
% \end{macro}
% \iffalse
%&lt;*driver&gt;
\jump
%&lt;/driver&gt;
% \fi
% \begin{danish}
%   Og nu kan vi definere valgmulighederne:
% \end{danish}
% \begin{english}
%   And now we're ready to define the arguments:
% \end{english}
% \begin{macro}{thumbindex}
%    \begin{macrocode}
\DeclareOption{thumbindex}{\@thumbindextrue}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{planfile=}
%   \begin{danish}
%     Tager en tekststreng, sÃ¥ den skal behandles helt
%     specielt. \textsf{xstring} definerer bl.a. makroen
%     \verb|\IfBeginWith|.
%   \end{danish}
%   \begin{english}
%     Takes a text string, and
%     so needs particular treatment. \textsf{xstring} defines, among
%     other things, the macro \verb|\IfBeginWith|
%   \end{english}
%    \begin{macrocode}
\newcommand{\planfile}{aktoversigt.plan}
\DeclareOption*{
  \IfBeginWith{\CurrentOption}{planfile=}{
    \def\planfile#1=#2{#2}
    \edef\planfile{\expandafter\planfile\CurrentOption}
  }{
    \PassOptionsToClass{\CurrentOption}{article}
  }
}
\ProcessOptions\relax
\LoadClass[a4paper,11pt]{article}
%    \end{macrocode}
% \end{macro}
% \end{implementation}
%
% \begin{implementation}
%   \begin{danish}
%     De her kommandoer gÃ¸r tekstblokken hÃ¸jere.
%   \end{danish}
%   \begin{english}
%     These commands make the text block taller.
%   \end{english}
%    \begin{macrocode}
\setlength{\topmargin}{0cm}
\setlength{\voffset}{-1cm}
\setlength{\textheight}{\paperheight}
\addtolength{\textheight}{-4cm}
%    \end{macrocode}
% \end{implementation}
%
% \begin{danish}
%   \changes{v1.0.2}{2024/09/24}{Skift fontenc til OT1}
%   I eksemplet inkluderer vi fire pakker. De er ikke strengt
%   nÃ¸dvendige for at fÃ¥ \cn\ til at fungere, men de kommer nÃ¦sten med
%   sikkerhed til at gÃ¸re dit liv lettere.
%
% \medskip\noindent\begin{tabulary}{\textwidth}{lL}
%   \verb|\usepackage[utf8]{inputenc}| &amp;  \\
%   \verb|\usepackage[OT1]{fontenc}| &amp;
%     GÃ¸r \LaTeX's hÃ¥ndtering af danske bogstaver mere moderne. \\
%   \verb|\usepackage[danish]{babel}| &amp;
%     FortÃ¦ller \LaTeX\ en masse ting om dansk, bl.a. hvordan
%     man bryder ord.\\
%   \verb|\usepackage{hyperref}| &amp;
%     Giver mulighed for at lave links, som det til Youtube i
%     figur \ref{eksempel}.\\
%   \verb|\urlstyle{sf}| &amp;
%     GÃ¸r, at links bliver sat med \textsf{sans serif} tekst
%     i stedet for \texttt{monospace}.
% \end{tabulary}
% \end{danish}
% \begin{english}
%   \changes{v1.0.2}{2024/09/24}{Change fontenc to OT1}
%   In the example, we've included three packages that aren't strictly
%   necessary for \cn\ to function, but will probably make your life
%   easier.
% 
% \medskip\noindent\begin{tabulary}{\textwidth}{lL}
%   \verb|\usepackage[utf8]{inputenc}| &amp;  \\
%   \verb|\usepackage[OT1]{fontenc}| &amp;
%     Modernize \LaTeX's handling of (particularly special)
%     characters.\\
%   \verb|\usepackage{hyperref}| &amp;
%     Enables the creation of hyperlinks, like the one in
%     figure \ref{example}.\\
%   \verb|\urlstyle{sf}| &amp;
%     Demands that hyperlinks be set in \textsf{sans serif},
%     rather than \texttt{monospace}
% \end{tabulary}
% \end{english}
% 
% \begin{danish}
%   \subsection{RegistermÃ¦rkninger}\label{thumbindex}
%
%   \changes{v1.0.0}{2023/09/05}{Nyt maskineri til registermÃ¦rkninger}
%   Kasserne i kanten af siderne i figur \ref{eksempel} er
%   registermÃ¦rkninger. De er tÃ¦nkt som en hjÃ¦lp med at finde rundt i
%   manuskripter, nÃ¥r de bliver sat sammen af flere enkelte numre, som
%   hver isÃ¦r bruger \cn. De giver kun mening at bruge i dokumenter
%   som er en del af en stÃ¸rre samling, sÃ¥ for at sÃ¦tte dem skal
%   klassen gives
%   valgmuligheden \DescribeMacro{thumbindex}\verb|thumbindex|.
% \end{danish}
% \begin{english}
%   \subsection{Thumb index}\label{thumbindex}
%
%   \changes{v1.0.0}{2023/09/05}{New machinery for thumb indexes}
%   To help organizing a compiled manuscript, which might consist of a
%   collection of many \texttt{.tex} files, we profide a facility for
%   creating a thumb index in the typeset margins. That's the gray and
%   black boxes on the edge of the pages in figure \ref{eksempel}. It
%   is off by default, since it only really makes sense in a
%   compilation of documents, but is enabled by giving the
%   option \DescribeMacro{thumbindex}\verb|thumbindex| to the class.
% \end{english}
%
% \begin{implementation}
%   \begin{danish}
%     \verb|\if@thumbindex|\DescribeMacro{\if@thumbindex}\ blev
%         defineret pÃ¥ side \pageref{loadclass}, og fortÃ¦ller bare, om
%         \verb|thumbindex| er blevet valgt. Hvis den ikke er, sÃ¥
%         springer vi al koden i det her afsnit over.
%   \end{danish}
%   \begin{english}
%     \verb|\if@thumbindex|\DescribeMacro{\if@thumbindex}\ was defined
%         on page \pageref{loadclass}, and just tells us if the option
%         \verb|thumbindex| was given. If it wasn't, well just skip
%         all the code in this section.
%   \end{english}
%    \begin{macrocode}
\if@thumbindex
  \expandafter\@firstofone
\else
  \expandafter\@gobble
\fi{
%    \end{macrocode}
% \end{implementation}
% \label{begintabdefgroup}
% 
% \begin{danish}
%   \cn\ fÃ¥r at vide hvilke numre, som er med i et manuskript, fra en
%   ekstern tekstfil, som vi som standard gÃ¥r ud fra hedder
%   \texttt{aktoversigt.plan}, og ligger i samme mappe som
%   \texttt{.tex}--dokumentet. Hvis det ikke passer, kan det laves om,
%   ved at give
%   valgmuligheden \DescribeMacro{planfile=}\verb|planfile=|\meta{filnavn}
%   til pakken. SÃ¥ for eksempel, hvis planfilen ligger i mappen over
%   \texttt{.tex}--dokumentet og hedder \texttt{plan.txt}, kan pakken
%   kaldes sÃ¥ledes:
% \end{danish}
% \begin{english}^^A
%   The structure of the consolidated manuscript is
%   defined in a seperate text file, which contains the filenames of
%   the \texttt{.tex} files that make up the manuscript, and divide
%   the show into sections with their own headings. By default, we
%   assume that the plan file is in the same folder as the current
%   \texttt{.tex} file, and named \verb|aktoversigt.plan|. This may be
%   changed by
%   passing \DescribeMacro{planfile=}\verb|planfile=|\meta{filename}
%   as a parameter to the class. Calling both these options might look
%   like so:
% \end{english}
% \begin{verbatim}
%\documentclass[thumbindex,planfile=../plan.txt]{ucph-revy}
%   \end{verbatim}
% \begin{danish}
%   Et eksempel pÃ¥ en sÃ¥dan planfil kunne vÃ¦re:
% \begin{verbatim}
% Akt 1
% sange/introsang.tex
% sketches/Eksempel.tex
% sketches/studiepolitisk_indlÃ¦g.tex
%
% Akt 2
% sketches/noget_om_kvant.tex
% sange/sang_til_en_forelÃ¦ser.tex
%
% Ekstranumre
% sange/under_bÃ¦ltestedet.tex
% \end{verbatim}
%   Mappenavnene (\texttt{sange}, \texttt{sketches}) er ikke
%   nÃ¸dvendige for at registermÃ¦rkningerne kan fungere, de er bare et
%   eksempel. \texttt{.tex}--filerne kan placeres hvor som helst,
%   \TeX\ kan lÃ¦se fra.
%   
%   Ud fra sÃ¥dan en planfil kan klassen generere et
%   register\textbf{indeks} som ligner det i figur \ref{registerex},
%   eller register\textbf{mÃ¦rkninger} som dem i figur
%   \ref{eksempel}. De titler, som er vist i figur \ref{registerex},
%   finder \cn\, ved at lÃ¦se \verb|\title|--makroen i de filer, som er
%   angivet i planfilen.
%
%   \begin{figure}[hbtp]
%     \paperheight 18em
%     \tabtoks={\undertab 0\text Akt 1\stop\overtab 1\text Introsang\stop\overtab 2\text Eksempel\stop\overtab 3\text Studiepolitisk indlÃ¦g\stop\undertab 3\text Akt 2\stop\overtab 4\text Noget om kvant\stop\overtab 5\text Sang til en forelÃ¦ser\stop\undertab 5\text Eks.\stop\overtab 6\text Under bÃ¦ltestedet\stop\undertab 6\text\done\stop}
%     \edef\revy@tabs{\the\tabtoks}
%     \hfill\rectothumbindexwithtitles
%     \caption{Et eksempel pÃ¥ et indeks til registermÃ¦rkninger. I brug
%     er det tÃ¦nkt til at fylde hele siden i hÃ¸jden, sÃ¥ mÃ¦rkningernes
%     placering matcher registermÃ¦krningerne (som i figur
%     \ref{eksempel}).}
%     \label{registerex}
%   \end{figure}
%
%   For at sÃ¦tte et registermÃ¦rke i et enkelt dokument, altsÃ¥ som i
%   figur \ref{eksempel}, skal \cn\ vide hvor den aktuelle fil er i
%   rÃ¦kkefÃ¸lgen. For at finde ud af det, lÃ¦ser den hver fil, som er
%   oplistet i planfilen, og sammenligner indholdet af deres
%   \verb|\title|--makroer med den seneste \verb|\title|, som \TeX\
%   har set.
%
%   Derfor er det nÃ¸dvendigt, for at \cn\ kan sÃ¦tte registermÃ¦rkerne,
%   at der er angivet en \verb|\title|. Det er altid den sidste
%   \verb|\title| i en fil, som \cn\ sammenligner med den
%   \verb|\title|, som \TeX\ kender. Det kan gÃ¥ galt, hvis der er
%   flere \verb|\title|'r i en fil.
%
%   Hvis der er flere af filerne i planfilen, som har den
%   \verb|\title| som \cn\ leder efter, vil \cn\ sÃ¦tte registermÃ¦rker
%   for alle de tilsvarende pladser i rÃ¦kkefÃ¸lgen.
% \end{danish}
%
% \begin{english}
%   An example of such a plan file might be:
% \begin{verbatim}
% Act 1
% songs/opener.tex
% sketches/Example.tex
% sketches/anarchocommunist_commune.tex
%
% Act 2
% songs/glitzy_dance_act.tex
% sketches/crossdressing.tex
%
% Act 3
% sketches/stop_police.tex
% \end{verbatim}
%   Note that the folder names (\texttt{songs}, \texttt{sketches}) are
%   merely for illustration. The \texttt{.tex} files can be placed at any
%   location that \TeX\ can read.
%
%   From this plan file, the class can generate a thumb mark for each
%   of thsee individual files, as demonstrated in figure
%   \ref{eksempel}, which shows the location of that file in the
%   larger structure of the piece. It can also generate a thumb index,
%   as demonstrated in figure \ref{thumbindexex}, which outlines the
%   location of every part of the piece, and can serve as an aide to
%   navigation.
%   
%   \begin{figure}[hbtp]
%     \paperheight 18em
%     \tabtoks={\undertab 0\text Act 1\stop\overtab 1\text Opener\stop\overtab 2\text Example\stop\overtab 3\text Anarchocommunist Commune\stop\undertab 3\text Act 2\stop\overtab 4\text Non--sequitor Dance Act\stop\overtab 5\text Find a Reason to Dress as Ladies\stop\undertab 5\text Act 3\stop\overtab 6\text Stop, Police\stop\undertab 6\text\done\stop}
%     \edef\revy@tabs{\the\tabtoks}
%     \hfill\rectothumbindexwithtitles
%     \caption{An example thumb index. This example is compressed
%     vertically. It is intended to be nearly the height of the page,
%     to match the thumb markings (such as the ones in figure
%     \ref{eksempel}).}
%     \label{thumbindexex}
%   \end{figure}
%
%   The titles in the thumb index demonstrated in figure
%   \ref{thumbindexex} are taken from the content of the \verb|\title|
%   macro in the files listed in the plan file. Also, the routine for
%   setting the thumb mark for an individual file determine
%   \emph{which} file it is in by comparing the content of the
%   \verb|\title| macro in the files in the plan file with the title
%   that \TeX\ knows about in the current file.
%
%   Therefore, it is necessary for the thumb index to work that a
%   \verb|\title| is declared in each of the files that are listed in
%   the plan file.
%
%   If there are more than one \verb|\title| invocations in a file,
%   the thumb index routine will use the last one. If several of the
%   files in the plan file have the same name, those files will end up
%   with several thumb marks.
% \end{english}
%
% \begin{implementation}
%   \begin{danish}
%     For at sammenligningen kan fungere, er vi afhÃ¦ngige af, at
%     tekstreprÃ¦sentationen ikke skifter undervejs. Det kan ske, hvis
%     \verb|.tex|--filen kalder
%     \DescribeMacro{fontenc}\textsf{fontenc}, og titlerne indeholder
%     specialtegn. Den simple og effektive\footnote{LÃ¦s: det er et
%     hack, som ikke har givet mig problemer \emph{endnu}.}  lÃ¸sning
%     er bare at kalde \textsf{fontenc} selv, sÃ¥ der ikke er plads til
%     misforstÃ¥elser.
%   \end{danish}
%   \begin{english}
%     For this comparing of titles to work, we depend of the text
%     representation not changing between the \verb|\title|
%     declaration and the time when the thumb index routine runs. It
%     might, though, if \DescribeMacro{fontenc}\textsf{fontenc} is
%     called. To quickly knock that problem on the head,\footnote{In a
%     way that hasn't come back to bite \emph{me} yet.} we'll just
%     call \textsf{fontenc} ourselves.
%   \end{english}
%    \begin{macrocode}
  \RequirePackage[OT1]{fontenc}
%    \end{macrocode}
% 
% \begin{danish}
%   Koden, som lÃ¦ser og forstÃ¥r planfilen og de andre
%   \verb|.tex|--filer bor i den her gruppe. I sidste ende kommer vi
%   til at definere
%   makroen \DescribeMacro{\revy@tabs}\verb|\revy@tabs|, som burde,
%   for hver overskrift i planfilen, indeholde sekvensen
%   \begin{showcommand}
%     \verb|\undertab| \meta{tÃ¦ller ved start} \verb|\text|
%     \meta{overskrift} \verb|\stop|,
%   \end{showcommand}
%   for hvert filnavn i planfilen indeholde sekvensen
%   \begin{showcommand}
%     \verb|\overtab| \meta{tÃ¦ller} \verb|\text|
%     \meta{titel i fil} \verb|\stop|,
%   \end{showcommand}
%   og som afslutning sekvensen
%   \begin{showcommand}
%     \verb|\undertab| \meta{antal filer} \verb|\text| \verb|\done|
%     \verb|\stop|.
%   \end{showcommand}
%   Undervejs bygger vi de her sekvenser op i en
%   \verb|toks|. Konstruktionen, hvor \verb|\act| bliver defineret, og
%   sÃ¥ kaldt med det samme, er for at styre, hvor dybt \TeX\ udvider
%   vores makroer\cite{eijkhout:toksstack}.
% \end{danish}
% \begin{english}
%   The code that reads and comprehends the plan file and the listed
%   \texttt{.tex} files lives in this group. The ultimate effect ought
%   to be defining the
%   macro \DescribeMacro{\revy@tabs}\verb|\revy@tabs|, which will
%   contain, for each heading in the plan file, the sequence
%   \begin{showcommand}
%     \verb|\undertab| \meta{counter at start} \verb|\text|
%     \meta{hading} \verb|\stop|,
%   \end{showcommand}
%   for each file name in the plan file, the sequence
%   \begin{showcommand}
%     \verb|\overtab| \meta{counter} \verb|\text|
%     \meta{title in file} \verb|\stop|,
%   \end{showcommand}
%   and finally the sequence
%   \begin{showcommand}
%     \verb|\undertab| \meta{no. of files} \verb|\text| \verb|\done|
%     \verb|\stop|.
%   \end{showcommand}
%   As we go, these sequences will be built up in a \verb|toks|. The construction where \verb|\act| is defined, and then immediately called, controls how deeply \TeX\ will expand our macros\cite{eijkhout:toksstack}.
% \end{english}
%    \begin{macrocode}
  \begingroup
%    \end{macrocode}
%    \begin{macrocode}
    \count256=0
    \endlinechar=-1
    \newtoks\tabtoks
    \newread\tabtex
    \newread\planread
    \openin\planread=\planfile
%    \end{macrocode}
%    \begin{macrocode}
    \def\expandFiHere#1\fi{\fi #1}
%    \end{macrocode}
%    \begin{macrocode}
    \def\patheat#1/#2{%
      \ifx\relax#2\else
        \expandFiHere#1/\patheat#2%
      \fi
    }
    \edef\planpath{\expandafter\patheat\planfile/\relax}
%    \end{macrocode}
%    \begin{macrocode}
    \def\titleeater#1#2\title#3{%
      \ifx\done#3%
        #1%
      \else
        \expandFiHere
        \titleeater{#3}%
      \fi
    }
%    \end{macrocode}
% \begin{danish}
%   Her i \verb|\loop|'et tjekker vi fÃ¸rst, om vi er fÃ¦rdige med
%   planfilen (\verb|\repeat| kobler pÃ¥ den \verb|\else|, som hÃ¸rer
%   til den fÃ¸rste \verb|\ifeof|. Hvis den \verb|\ifeof| er sand, sÃ¥
%   lÃ¦ser \TeX\ kun den \verb|\fi|, som er gemt inde i
%   \verb|\repeat|, og kalder ikke den rekursion, som ogsÃ¥ ligger
%   derinde. Jeg prÃ¸ver at forklare det her for mig selv, for jeg
%   bliver forvirret hver gang jeg vender tilbage til den her
%   konstruktion.) SÃ¥ tjekker vi, om der {\em ikke} er en Ã¥ben fil i
%   \verb|\tabtex|. Hvis ikke, prÃ¸ver vi at greje den nÃ¦ste linje i
%   planfilen. Ellers leder vi efter \verb|\title|--kald i filen i
%   \verb|\tabtex| (og hÃ¥ber, at det ikke spÃ¦nder over flere
%   linjer).
% \end{danish}
% \begin{english}
%   In this loop, we read the plan file plan file line by line. If the
%   line ends in \texttt{.tex}, we take it as a file name, and open
%   that file, looking for \verb|\title| commands, which hopefully do
%   not span across any line breaks.
% \end{english}
%    \begin{macrocode}
    \loop\ifeof\planread
      \closein\planread
    \else
      \ifeof\tabtex
        \let\readline\empty
        \read\planread to \line
        \expandafter\ifx\expandafter\par\line\else
          \IfEndWith{\line}{.tex}{
            \advance\count256 by 1
%    \end{macrocode}
% \begin{danish}
%   \verb|\set@curr@file| tager sig af problemer med catcode'er.
% \end{danish}
% \begin{english}
%   \verb|\set@curr@file| beats down issues with catcodes in
%   filenames.
% \end{english}
%    \begin{macrocode}
            \set@curr@file{\line}
            \openin\tabtex={\planpath\@curr@file}
          }{%
            \edef\act{\noexpand\tabtoks={%
              \the\tabtoks
              \noexpand\undertab
              \number\count256
              \noexpand\text
              \line
              \noexpand\stop
            }}\act
          }
        \fi
      \else
        \read\tabtex to \subline
        \edef\readline{%
          \expandafter\titleeater
          \expandafter\readline\subline\title\done
        }
        \ifeof\tabtex
          \edef\act{\noexpand\tabtoks={%
              \the\tabtoks
              \noexpand\overtab
              \number\count256
              \noexpand\text
              \readline
              \noexpand\stop
            }}\act
        \fi
      \fi
    \repeat
    \closein\tabtex
%    \end{macrocode}
%    
% \begin{danish}
%   Afslutningssekvensen:
% \end{danish}
% \begin{english}
%   The final sequence:
% \end{english}
%    \begin{macrocode}
    \edef\act{\noexpand\tabtoks={%
        \the\tabtoks
        \noexpand\undertab
        \number\count256
        \noexpand\text
        \noexpand\done
        \noexpand\stop
      }}\act
%    \end{macrocode}
% \begin{macro}{\revy@tabs}
% And then, the money shot.
%    \begin{macrocode}
    \xdef\revy@tabs{\the\tabtoks}
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
  \endgroup
%    \end{macrocode}
% \end{implementation}
% 
% \begin{danish}
%   I eksemplet i appendiks \ref{fullex} er \verb|thumbindex| ikke
%   taget med, fordi det kun rigtig giver mening at lave
%   registermÃ¦rkninger i en samling af manuskripter. Men hvis der
%   ligger en fil i samme mappe som eksempelfilen, som hedder
%   \texttt{aktoversigt.plan}, hvor indholdet er eksemplet fra fÃ¸r, og
%   hvis invokeringen i eksempelfilen skiftes ud med
% \end{danish}
% \begin{english}
%   The thumbindex hasn't been enabled in the example file in appendix
%   \ref{fullex}, since there's nothing to index. However, if you were
%   to place the example plan file above in a file along side
%   \texttt{Example.tex} named \texttt{aktoversigt.plan}, and replace
%   the class invocation at the top of \texttt{Example.tex} with
% \end{english}
% \begin{verbatim}
%\documentclass[thumbindex]{ucph-revy}
% \end{verbatim}
% \begin{danish}
%   sÃ¥ burde \texttt{.tex}--filen kompilere til et resultat, som har
%   registermÃ¦rkninger ligesom i eksemplet i figur
%   \ref{eksempel}. Manglende filer bliver bare ignoreret.
%
%   Det lyder mÃ¥ske som en god idÃ© at have en side med et register,
%   som ligner det i figur \ref{registerex}, men som passer i
%   stÃ¸rrelsen til de mÃ¦rkninger, som bliver sat i den enkelte
%   manuskriptfil. Et eksempel pÃ¥ hvordan man kunne lave en side med
%   sÃ¥dan et registerindeks findes i appendiks
%   \ref{registerindeks}. Hvis du har adgang til klassens kildefiler
%   kan du ogsÃ¥ trÃ¦kke den kode ud i filen \texttt{Thumbindex.tex},
%   ved at kÃ¸re filen \texttt{upch-revy-ex-thumb.ins} igennem \LaTeX.
% \end{danish}
% \begin{english}
%   then the typeset result should have a thumb marking like the one
%   in figure \ref{example}. Nonexistent files are simply ignored when
%   constructing the thumb index.
%
%   You might also like to have a page with an index of the thumb
%   markings, something similar to figure \ref{thumbindexex}, but
%   scaled to a full page. Appendix \ref{registerindeks} hold a
%   complete example of one way to make a page like that. If you have
%   access to the package's source files, you can also extract that
%   code as the file \texttt{Thumbindex.tex}, by running the file
%   \texttt{ucph-revy-ex-thumb.ins} through \LaTeX.
% \end{english}
% 
% \begin{implementation}
% \begin{danish}
%   \textsf{Ti{\em k}Z} er ikke et tegneprogram\cite{tikz}, men vi
%   bruger den alligevel til at tegne registermÃ¦rkningerne.
% \end{danish}
% \begin{english}
%   \textsf{Ti{\em k}Z} is not a drawing program\cite{tikz}, but we'll
%   use it to draw our thumbtabs regardless.
% \end{english}
%    \begin{macrocode}
  \RequirePackage{tikz}
%    \end{macrocode}
%    
% \begin{macro}{\revy@thumbindex}
%   \begin{danish}
%     Den her makro indeholder alle procedurene, som typesÃ¦tter
%     registermÃ¦rkningerne. Argumentet bliver ekspanderet lige fÃ¸r
%     typesÃ¦tningen rent faktisk finder sted, sÃ¥ makroens interne
%     tilstand kan justeres. LÃ¦g sÃ¦rligt mÃ¦rke til makroerne
%     \verb|\filter|, \verb|\movetoleftside| og
%     \verb|\writetitlestrue|, som bliver defineret internt i makroen,
%     og som lave om pÃ¥ hvilke dele af registermÃ¦rkerne, som bliver
%     typesat. Makroerne, som bliver defineret pÃ¥ side
%     \pageref{thumbindexuse} og frem, demonstrerer hvordan de
%     bruges.
%     
%     Vi kommer til at se den fremgangsmÃ¥de, at der bliver lavet
%     definitioner af \verb|\undertab| og \verb|\overtab|, som vi
%     bagte ind i \verb|\revy@tabs| i den forrige kodeblok, der gÃ¸r
%     det arbejde, vi Ã¸nsker at fÃ¥ lavet, nÃ¥r \verb|\revy@tabs| bliver
%     ekspanderet.
%   \end{danish}^^A
%   \begin{english}^^A
%     This macro contains the procedures that typeset
%     the thumb index. Its argument is expanded immediately before the
%     thumb tabs are actually typeset, allowing you to modify the
%     macro's internal state at that point. For this purpose, you'll
%     want to pay special attention to the macros \verb|\filter|,
%     \verb|\movetoleftside| and \verb|\writetitlestrue|, which will
%     be defined internally in this macro, and alter which parts of
%     the thumbindex are typeset.
%     
%     The approach that we will see used, as we go through the macro,
%     is to define \verb|\undertab| and \verb|\overtab| in such a way
%     that they perform the tasks that we want to see performed, when
%     we expand \verb|\revy@tabs|.
%   \end{english}
%   \iffalse
%&lt;*driver&gt;     
}
\land
%&lt;/driver&gt; 
% \fi
%    \begin{macrocode}
  \def\revy@thumbindex#1{%
    \begingroup
%    \end{macrocode}
% \begin{macro}{\expandFiHere}
%   \begin{danish}
%     Du genkender mÃ¥ske den her som \verb|\hop|, hvis du har lÃ¦st
%     \cite{eijkhout:hop}.
%   \end{danish}
%   \begin{english}
%     You man reckognize this one as \verb|\hop| if you've read
%     \cite{eijkhout:hop}.
%   \end{english}
%    \begin{macrocode}
\def\expandFiHere##1\fi{\fi ##1}
%    \end{macrocode}
% \end{macro}
%   \begin{danish}
%     Find ud af hvor hÃ¸jt et enkelt mÃ¦rke skal vÃ¦re.
%   \changes{v1.0.1}{2024/02/07}{Den mÃ¥ ikke dividere med 0}
%   \end{danish}
%   \begin{english}
%     Find the height of a single tab.
%   \changes{v1.0.1}{2024/02/07}{Don't let it divide by 0}
%   \end{english}
%    \begin{macrocode}
      \newdimen\tabheight
      \tabheight=\paperheight
      \advance\tabheight by -1cm%
      \def\undertab##1\text##2\stop{
        \ifx\done##2%
          \divide\tabheight by \ifnum0=##1 1 \else ##1\fi%
        \fi
      }
      \def\overtab##1\text##2\stop{}%
      \revy@tabs
%    \end{macrocode}
%   \begin{macro}{\movetoleftside}
%   \begin{danish}^^A
%     De her definitioner indeholder forskellen pÃ¥ at vende
%     registermÃ¦rkningerne mod hÃ¸jre eller mod venstre.
%   \changes{v1.0.1}{2024/02/07}{Juster mÃ¦rkebredden}
%   \changes{v1.1.0}{2024/12/18}{GÃ¸r tabsne bredere, sÃ¥ printere ikke skÃ¦rer dem af}
%   \end{danish}^^A
%   \begin{english}^^A
%     These definitions contain the differences
%     between right and left facing thumb tabs.
%   \changes{v1.0.1}{2024/02/07}{Adjust tab width}
%   \changes{v1.1.0}{2024/12/18}{Make tabs wider, to clear cutoff when printed}
%   \end{english}
%    \begin{macrocode}
      \def\overtableft{-.75cm}
      \def\overtabright{1.0cm}
      \def\undertabright{\overtabright}
      \def\undertableft{\overtableft - 1cm}
      \def\underangle{|-}
      \def\underpos{.25}
      \def\undersign{}
      \def\underlabeloffset{\undersign.5cm}
      \def\textanchorcorner{east}
      \def\textoffset{\undertableft - .5cm}
      \def\textside{right}
      \def\movetoleftside{
%    \end{macrocode}
%    \begin{macrocode}
        \def\overtableft{-2.3cm}
        \def\overtabright{.2cm}
        \def\undertabright{\overtabright + 1cm}
        \def\undertableft{\overtableft}
        \def\underangle{-|}
        \def\undersign{-}
        \def\underpos{.75}
        \def\textanchorcorner{west}
        \def\textoffset{\undertabright + .5cm}
        \def\textside{left}
      }
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\ifwritetitles}
%    \begin{macrocode}
\newif\ifwritetitles\writetitlesfalse
%    \end{macrocode}
% \end{macro}
% \begin{danish}
%   Her kobler vi mening pÃ¥ de tokens, som vi stoppede ind i
%   \verb|\revy@tabtoks| tidligere.
% \end{danish}
% \begin{english}
%   Here, we attach meaning to the tokens we stuffed into
%   \verb|\revy@tabtoks| previously.
% \end{english}
%    \begin{macrocode}
      \def\printovertab##1##2{
        \fill ( 0, -##1\tabheight ) 
        node[ text=white, anchor=east ]{\bfseries##1}
        +( \overtableft, -.5\tabheight + 1mm )
        rectangle +( \overtabright, .5\tabheight - 1mm )
        +( \textoffset, 0 )
        \ifwritetitles
          node[ anchor=\textanchorcorner ]{\small\bfseries##2}
        \fi
        ;
      }%
%    \end{macrocode}
%    \begin{macrocode}
      \def\printundertab##1##2##3{%
        \path ( 0, -##1\tabheight ) +( \undertabright, -.5\tabheight - 1mm )
        coordinate (topright);
        \path ( 0, -##2\tabheight ) +( \undertableft, -.5\tabheight + 1mm )
        coordinate (bottomleft);
        \fill[ color=black!30 ] (topright) rectangle (bottomleft);
        \path (bottomleft)
        \underangle node[ xshift=\underlabeloffset,
        pos=\underpos,
        rotate=\undersign90
        ]{\Large##3}
        (topright);
      }%    
%    \end{macrocode}
%    \begin{macrocode}
      \def\overtab##1\text##2\stop{%
        \printovertab{##1}{##2}
      }
%    \end{macrocode}
%    \begin{macrocode}
      \def\undertab##1\text##2\stop{
        \ifx\done##2\else
          \let\undertab\undertabspan
          \expandFiHere
          \undertab##1\text##2\stop
        \fi
      }
%    \end{macrocode}
%    \begin{macrocode}
      \def\undertabspan##1\text##2\stop##3\undertab##4\text##5\stop{%
        \printundertab{##1}{##4}{##2}%
        ##3%
        \ifx\done##5\else
          \expandFiHere
          \undertab##4\text##5\stop
        \fi
      }%
%    \end{macrocode}
% \begin{macro}{\filtername}
%    \begin{macrocode}
      \def\filtername##1{
        \def\doWhenMatch{}
        \def\overtab####1\text####2\stop{
          \IfStrEq{##1}{####2}{
            \doWhenMatch
            \printovertab{####1}{####2}
          }{}
        }
%    \end{macrocode}
%    \begin{macrocode}
        \def\undertabspan####1\text####2\stop####3\undertab####4\text####5\stop{
          \def\doWhenMatch{
            \printundertab{####1}{####4}{####2}
            \def\doWhenMatch{}
          }
%    \end{macrocode}
%    \begin{macrocode}
          ####3
          \ifx\done####5\else
            \expandFiHere
            \undertab####4\text####5\stop
          \fi
        }
      }
%    \end{macrocode}
% \end{macro}
%   \begin{danish}
%     Som lovet, argumentet til makroen, lige fÃ¸r registermÃ¦rkningerne
%     bliver typesat.
%   \end{danish}
%   \begin{english}
%     As promised, the macro argument, just before the thumbindex is
%     actually typeset.
%   \end{english}
%    \begin{macrocode}
      #1
%    \end{macrocode}
%    \begin{macrocode}
      \begin{tikzpicture}
        \revy@tabs
        \path (0, 0) -- (0, -\paperheight + .5cm);
      \end{tikzpicture}
    \endgroup
  }
%    \end{macrocode}
%   \begin{danish}
%     Og sÃ¥ledes slutter \verb|\revy@thumbindex|.
%   \end{danish}
%   \begin{english}
%     And thus concludes \verb|\revy@thumbindex|.
%   \end{english}
% \end{macro}
% \end{implementation}
%
% \label{thumbindexuse}
% \begin{danish}
%   I resten af det her afsnit fÃ¸lger de makroer, som kan bruges til
%   at tegne registermÃ¦rkningerne.
% \end{danish}
% \begin{english}
%   In the remaider of this section, we list the macros that may be
%   used to typeset the thumb indices.
% \end{english}
%
% \begin{macro}{\rectothumbtabfor}
% \begin{danish}
%   \begin{showcommand}
%     \verb|\rectothumbtabfor|\marg{titel}
%   \end{showcommand}
%   SÃ¦tter et registermÃ¦rke, som er orienteret mod hÃ¸jre,
%   altsÃ¥ egenet til en recto--side, for filen (eller filerne), hvis
%   titel matcher dens argument. Det giver mest mening hvis den fÃ¥r
%   titlen pÃ¥ det aktuelle dokument, som er gemt i \verb|\@title|. Det
%   er den her makro, som bliver brugt til at sÃ¦tte registermÃ¦rkerne i
%   eksemplet i figur \ref{eksempel}.
% \end{danish}
% \begin{english}
%   \begin{showcommand}
%     \verb|\rectothumbtabfor|\marg{title}
%   \end{showcommand}
%   Sets a thumb tab, oriented to the right, so suitable for a recto
%   page, that corresponds to the file (or files) whose discovered
%   title matches the argument. The most sensible argument to give it
%   is the title of the current document, which can be found in
%   \verb|\@title|. This is the macro that typeset the thumb tabs in
%   figure \ref{example}.
% \end{english}
% \begin{implementation}
%    \begin{macrocode}
  \newcommand{\rectothumbtabfor}[1]{
    \revy@thumbindex{
      \filtername{#1}
    }
  }
%    \end{macrocode}
% \end{implementation}
% \end{macro}
% \begin{macro}{\rectothumbindexwithtitles}
%   \begin{showcommand}
%     \verb|\rectothumbindexwithtitles|
%   \end{showcommand}
%   \begin{danish}
%     SÃ¦tter registerindekset, som i figur \ref{registerex}. LÃ¦g mÃ¦rke
%     til, at eksemplet i figur \ref{registerex} er trykket sammen i
%     hÃ¸jden. Som standard skalerer den her makro indekset efter
%     \verb|\paperheight|, ligesom mÃ¦rkerne i figur \ref{eksempel} er.
%   \end{danish}
%   \begin{english}
%     Sets the thumbs index, as was demonstrated in figure
%     \ref{thumbindexex}. Do note that the example in figure
%     \ref{thumbindexex} has been squeezed vertically. By default, the
%     index is scaled vertically after \verb|\paperheight|, like the
%     thumb tabs in figure \ref{example} were.
%   \end{english}
%   \begin{implementation}
%    \begin{macrocode}
  \newcommand{\rectothumbindexwithtitles}{
    \revy@thumbindex{
      \writetitlestrue
    }
  }
%    \end{macrocode}
% \end{implementation}
% \end{macro}
% \begin{macro}{\rectothumbindex}
%   \begin{showcommand}
%     \verb|\rectothumbindex|
%   \end{showcommand}
%   \begin{danish}
%     SÃ¦tter alle mÃ¦rkerne, ligesom den forrige makro, men uden
%     titelnavnene.
%   \end{danish}
%   \begin{english}
%     Sets all the thumb marks, just like the previous macro, but
%     without writing out the titles.
%   \end{english}
%   \begin{implementation}
%    \begin{macrocode}
  \newcommand{\rectothumbindex}{
    \revy@thumbindex{}
  }
%    \end{macrocode}
% \end{implementation}
% \end{macro}
% \begin{macro}{\rectothumbtabwithtitlefor}
% \begin{danish}
%   \begin{showcommand}
%     \verb|\rectothumbtabwithtitlefor|\marg{titel}
%   \end{showcommand}
%   SÃ¦tter kun registermÃ¦rket for indgangen(e) med samme titel som
%   parameteren, og skriver dens titel. Det svÃ¦ver lidt i det uhvisse,
%   hvad det gavner, at gÃ¸re sÃ¥dan, men muligheden er med for
%   fuldstÃ¦ndighedens skyld.
% \end{danish}
% \begin{english}
%   \begin{showcommand}
%     \verb|\rectothumbtabwithtitlefor|\marg{title}
%   \end{showcommand}
%   Sets only the thumb tab for the entr(y/ies) with the title given
%   in the parameter. It's unclear why you'd want to, but the option
%   is included, for completeness.
% \end{english}
% \begin{implementation}
%    \begin{macrocode}
  \newcommand{\rectothumbtabwithtitlefor}[1]{
    \revy@thumbindex{
      \filtername{#1}
      \writetitlestrue
    }
  }
%    \end{macrocode}
% \end{implementation}
% \end{macro}
% 
% \begin{macro}{\versothumbtabfor}
% \begin{macro}{\versothumbindexwithtitles}
% \begin{macro}{\versothumbindex}
% \begin{macro}{\versothumbtabwithtitlefor}
% \begin{danish}
%   Alle disse makroer kommer ogsÃ¥ i en venstreorienteret udgave, som
%   egner sig til marginen pÃ¥ en verso--side:
% \end{danish}
% \begin{english}
%   These macros also come in left oriented versions, suitable for the
%   margin of verso pages.
% \end{english}
% \begin{showcommand}
%   \verb|\versothumbtabfor|\marg{titel}
%   \item\verb|\versothumbindexwithtitle|
%   \item\verb|\versothumbindex|
%   \item\verb|\versothumbtabwithtitlefor|\marg{titel}
% \end{showcommand}
% \begin{implementation}
%    \begin{macrocode}
  \newcommand{\versothumbindex}{
    \revy@thumbindex{
      \movetoleftside
    }
  }
  \newcommand{\versothumbindexwithtitles}{
    \revy@thumbindex{
      \movetoleftside
      \writetitlestrue
    }
  }
  \newcommand{\versothumbtabfor}[1]{
    \revy@thumbindex{
      \movetoleftside
      \filtername{#1}
    }
  }
  \newcommand{\versothumbtabwithtitlefor}[1]{
    \revy@thumbindex{
      \movetoleftside
      \filtername{#1}
      \writetitlestrue
    }
  }
%    \end{macrocode}
% \end{implementation}
%   \iffalse
%&lt;*driver&gt;
\jump
{
%&lt;/driver&gt;
% \fi
% \begin{implementation}
% \begin{danish}
%   Og sÃ¥ledes afsluttes den betingede gruppe for
%   \verb|\if@thumbindex|.
% \end{danish}
% \begin{english}
%   And thus concludes the conditional group for
%   \verb|\if@thumbindex|.
% \end{english}
%    \begin{macrocode}
}
%    \end{macrocode}
% \end{implementation}
% \end{macro}\end{macro}\end{macro}\end{macro}
%
% \begin{danish}
%   \subsection{Infoblokken}
%   Lige efter titlen kan vi sÃ¦tte en masse information, som er
%   brugbar i arbejdet med at organisere en revy. Figur \ref{title}
%   viser et eksempel pÃ¥, hvordan titlen ser ud med alle informationer
%   fyldt ud.
%
%   \begin{figure}[hbtp]
% \begin{macro}{\maketitle}
%   \changes{v1.0.0}{2023/09/05}{Nyt layout af titelblokken}
%   \phantom{.}
%   \begingroup
%   \exDaPre
%   \def\getpagerefnumber#1{2}
%   \vspace{6em}
%   \class@maketitle
%   \medskip
%   \endgroup
%   \caption{Et eksempel pÃ¥, hvordan titlen er ud, nÃ¥r alle de
%   informationer, som kan sÃ¦ttes sammen med den, er fyldt ud. Det
%   bliver sat med kommandoen \texttt{\textbackslash
%   maketitle}.\label{title}}
% \end{macro}
% \end{figure}
% 
%   I \texttt{.tex}--filen fortÃ¦ller vi \cn\ om de her ting med en
%   rÃ¦kke makroer i preamble'en. For eksemplets skyld er alle
%   makroerne vist i eksemplet, men de kan, untagen versionsnummeret,
%   sagtens udelades i et \cn--dokument, hvis det ikke giver mening
%   at have dem med. Makroerne var:
%\end{danish}
%\begin{english}
%  \subsection{The infoblock}
%  \cn's modified title block contains some additinal information that
%  is useful in organizing a show. Figure \ref{title} shows an example
%  of how the title block looks with every possilbe piece of
%  informaiton included.
%
%   \begin{figure}[hbtp]
% \begin{macro}{\maketitle}
%   \changes{v1.0.0}{2023/09/05}{New layout of the tile block}
%   \phantom{.}
%   \begingroup
%   \exEnPre
%   \def\getpagerefnumber#1{2}
%   \vspace{6em}
%   \class@maketitle
%   \medskip
%   \endgroup
%   \caption{An example of how \cn's tilte block looks with every
%   possible piece of information filled in. It is set with the
%   command \texttt{\textbackslash maketitle}.\label{title}}
% \end{macro}
% \end{figure}
% 
%   We give \cn\ this information with a series of preamble
%   commands. For the sake of the example, the example file includes
%   all of these commands, but they are not required for a \cn\
%   document to compile. If they don't make sense to include in a
%   document, just leave them out. The macros were:
% \end{english}
% \iffalse
%&lt;*driver&gt;
\land
%&lt;/driver&gt;
% \fi
% \begin{macro}{\version}
%\begin{verbatim}
%\version{1.0}
%\end{verbatim}
%   \begin{implementation}
%    \begin{macrocode}
\def\version#1{\def\@version{#1}}
%    \end{macrocode}
%   \end{implementation}
%   \begin{danish}
%     \verb|\version| er den eneste af de her kommandoer, som ikke kan
%     udelades, fordi versionskontrol er vigtigt\footnote{MÃ¥ske synes
%     du, at der findes bedre mÃ¥der, at lave versionskontrol pÃ¥ her i
%     det futuristiske Ã¥r 2023, men sÃ¥ kan du se det her pÃ¥mindelse om
%     rent faktiske at bruge dem.}.
%   \end{danish}
%   \begin{english}
%     \verb|\version| is the only one of these commands that may not
%     be omitted, because version conrol is important\footnote{You
%     might be of the opinion that there are better ways of doing
%     version control in the far future year 2023. In which case, you
%     may take this as a reminder to actually use one of them.}.
%   \end{english}
%   \begin{implementation}
%     \begin{danish}
%       Versionsnummeret gÃ¸res pÃ¥krÃ¦vet af de her kommandoer:
%     \end{danish}
%     \begin{english}
%       The version number is made a requirement by these commands:
%     \end{english}
%    \begin{macrocode}
\def\@version{\@ifundefined{the@version}
{\typein[\versionsnr]{Indtast revytekstens versionsnummer: }%
\global\let\the@version=\versionsnr}{}\the@version}
%    \end{macrocode}
%   \end{implementation}
% \end{macro}
%
% \begin{macro}{\revyname}
% \begin{macro}{\revyyear}
% \begin{macro}{\title}
% \begin{danish}
%\begin{verbatim}
%\revyname{FysikRevy\texttrademark}
%\revyyear{2019}
%\title{Eksempel}
%\author{en eksempelsmed}
%\end{verbatim}
%\end{danish}
%\begin{english}
%  \begin{verbatim}
%\revyname{The Meaning of Liff}
%\revyyear{3001}
%\title{Example}
%\author{an examplesmith}
%  \end{verbatim}
%\end{english}
%   \begin{implementation}
%    \begin{macrocode}
\def\revyname#1{\def\@revyname{#1}}
\def\revyyear#1{\def\@revyyear{#1}}
%    \end{macrocode}
% \begin{danish}
%   \verb|\title| og \verb|\author| bliver ikke Ã¦ndret.
% \end{danish}
% \begin{english}
%   \verb|\title| and \verb|\author| remian unaltered.
% \end{english}
% \end{implementation}
% \begin{danish}
%   Hvis \cn\ ikke fÃ¥r at vide, hvad revyens navn og Ã¥r skal vÃ¦re,
%   og hvad titlen er, gÃ¥r den som standard ud fra, at det er
%   "`DIKUrevy"', "`1973"' og "`En sketch"'.
% \end{danish}
% \begin{english}
%   If \cn\ isn't given a revue name, year or a title, it will use the
%   defaults of ``DIKUrevy'', ``1973'' and ``En sketch''.
% \end{english}
% \begin{implementation}
%    \begin{macrocode}
\def\@revyyear{1973}
\def\@revyname{DIKUrevy}
\def\@title{En sketch}
%    \end{macrocode}
% \end{implementation}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\author}
% \begin{macro}{\status}
% \begin{macro}{\eta}
% \begin{macro}{\responsible}
% \begin{macro}{\melody}
%   \begin{danish}
%     De resterende bliver ikke sat, hvis de ikke bliver defineret.
%\begin{verbatim}
%\status{eksempel}
%\eta{$1$ minut, $47$ sekunder}
%\responsible{Dig}
%\author{en eksempelsmed}
%\melody{Queen: "`Bohemian Rhapsody"' (\url{https://youtu.be/fJ9rUzIMcZQ})}
%\end{verbatim}
%   \end{danish}
%   \begin{english}
%     The rest aren't typeset if they are not defined.
%\begin{verbatim}
%\status{example}
%\eta{$1$ minute, $47$ seconds}
%\responsible{Probably you}
%\melody{Monty Python: ``Always look on the bright side of life''
%  (\url{https://youtu.be/SJUhlRoBL8M})}
%\end{verbatim}
%   \end{english}
%   \begin{implementation}
%     \begin{danish}
%       For at holde styr pÃ¥, om de her ting er defineret, definerer
%       vi fÃ¸lgende \verb|\if|--makroer, og sÃ¦tter dem til falsk som
%       udgangspunkt:
%     \end{danish}
%     \begin{english}
%       These new \verb|\if| macros keep track of which of these
%       things have been defined.
%     \end{english}
%    \begin{macrocode}
\newif\if@author\@authorfalse
\newif\if@status\@statusfalse
\newif\if@eta\@etafalse
\newif\if@responsible\@responsiblefalse
\newif\if@melody\@melodyfalse
%    \end{macrocode}
% \begin{danish}
%   Og sÃ¥ makroerne, som sÃ¦tter vÃ¦rdierne:
% \end{danish}
% \begin{english}
%   And these macros define them:
% \end{english}
%    \begin{macrocode}
\def\author#1{\def\@author{#1}\@authortrue}
\def\status#1{\def\@status{#1}\@statustrue}
\def\eta#1{\def\@eta{#1}\@etatrue}
\def\responsible#1{\def\@responsible{#1}\@responsibletrue}
\def\melody#1{\def\@melody{#1}\@melodytrue}
%    \end{macrocode}
% \begin{danish}
%   Vi sÃ¸rger for, at de interne makroer ikke er udefinerede:
% \end{danish}
% \begin{english}
%   Ensuring that the internal macros aren't undefined:
% \end{english}
%    \begin{macrocode}
\def\@author{}
\def\@status{}
\def\@eta{}
\def\@responsible{}
\def\@melody{}
%    \end{macrocode}
% \end{implementation} 
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\auteurs}
% \begin{danish}
%   Og som bonus har vi bibeholdt \verb|\auteurs|, som er et alias til
%   \verb|\author|, for folk med fine fornemmelser.
% \end{danish}
% \begin{english}
%   And as a bonus, we've retained \verb|\auteurs| as an alias of
%   \verb|\author|, for fancy folk.
% \end{english}
% \begin{implementation}
%    \begin{macrocode}
\let\auteurs\author
%    \end{macrocode}
% \end{implementation}
% \end{macro}
%
% \begin{macro}{\writtenbyname}  
% \begin{macro}{\melodyname}     
% \begin{macro}{\responsibletext}
% \begin{macro}{\statustext}     
% \begin{danish}
%   MÃ¦rkaterne, som \cn\ bruger i infoblokken, altsÃ¥
%   "`\@writtenbyname"', "`\@melodyname"', etc., kan laves om med
%   makroerne
%   \begin{showcommand}
%     \verb|\writtenbyname|\marg{tekst}
%     \item\verb|\melodyname|\marg{tekst}
%     \item\verb|\responsibletext|\marg{tekst}
%   \end{showcommand}
%   og
%   \begin{showcommand}
%     \verb|\statustext|\marg{tekst}
%   \end{showcommand}
%   De fleste af dem tager bare den nye mÃ¦rkat som argument, sÃ¥ fx
%   "`\@responsibletext"' kan laves om til "`KÃ¦mpehare:"' ved at sige
%   \begin{verbatim}
%\responsibletext{KÃ¦mpehare:}
%   \end{verbatim}
% \end{danish}
% \begin{english}
% \begin{verbatim}
%\writtenbyname{written by}
%\melodyname{Melody:}
%\responsibletext{\TeX--responsible}
% \end{verbatim}
%   The labels on some of the bits of info are in danish by default:
%   ``\@writtenbyname'', ``\@melodyname'' and ``\@responsibletext'',
%   respectively.  These commands overwrite those defaults. There is
%   also a command for changing the ``Status'' label, which happens
%   not to be necessary in english:
%   \begin{showcommand}
%     \verb|\statustext| \marg{text}
%   \end{showcommand}
% \end{english}
% \begin{implementation}
%    \begin{macrocode}
\def\writtenbyname#1{\def\@writtenbyname{#1}}
\def\melodyname#1{\def\@melodyname{#1}}
\def\responsibletext#1{\def\@responsibletext{#1}}
\def\statustext#1{\def\@statustext{#1}}
\def\@writtenbyname{skrevet af}
\def\@melodyname{Melodi:}
\def\@responsibletext{\TeX--ansvarlig:}
\def\@statustext{Status:}
%    \end{macrocode}
% \end{implementation}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\pagessum}
%   \begin{danish}
%     Men sidetallet er lidt mere kompliceret, sÃ¥ her har vi brug for
%     en makro, som tager 1 argument (et \meta{tal}), og sÃ¦tter ordet
%     `side' i det rigtige tal efter det. SÃ¥ \verb|\pagessum{0}| giver
%     "`0 sider"', mens \verb|\pagessum{1}| giver "`1 side"'. En ny
%     makro, som hedder \verb|\pagessum|, men gÃ¸r noget andet, kan
%     defineres med \verb|\renewcommand|.
%   \end{danish}
%   \begin{english}
%     The page count is a touch more complicated, and requires a macro
%     that takes 1 argument (a \meta{number}), and evaluates to the
%     grammatically correct phrase for that page count. Thus
%     \verb|\pagessum{0}| becomes ``0 sider'' (the plural), while
%     \verb|\pagessum{1}| becomes ``1 side'' (the singular).
%   \end{english}
%   \begin{implementation}
%     \begin{english}
%       The default macro, for danish, is
%     \end{english}
%    \begin{macrocode}
\newcommand{\pagessum}[1]{#1 side\ifnum1=#1\else r\fi}
%    \end{macrocode}
% \end{implementation}
%   \begin{english}
%     In the example, such a macro is given for english in the line
%     \begin{verbatim}
%\renewcommand{\pagessum}[1]{#1 page\ifnum#1=1\else s\fi}
%     \end{verbatim}
%   \end{english}
% \end{macro}
%
% \begin{implementation}
% \begin{macro}{\maketitle}
%   \begin{danish}
%     omskrives, sÃ¥ den laver en titelblok som den i figur \ref{title}.
%   \end{danish}
%   \begin{english}
%     is rewritten to create a title segment like what was shown in
%     figure \ref{title}.
%   \end{english}
%   \iffalse
%&lt;*driver&gt;
%^^A I do want to keep the real \maketitle in the .dtx file, though
\let\actual@maketitle\maketitle
%&lt;/driver&gt; 
% \fi
%    \begin{macrocode}
\def\maketitle{{\thispagestyle{empty}
  \vspace*{-\headheight}\vspace*{-\headsep}
  \centering{\Large\@revyname{} \@revyyear}\vspace{5pt}\\
  {\LARGE \bf \@title}\vspace{5pt}\\
  \if@author{\large\@writtenbyname{} \@author}\vspace{5pt}\\\fi
  \if@melody{\sl\@melodyname{} \@melody}\vspace{5pt}\\\fi
%    \end{macrocode}
%    \begin{macrocode}
  \if@leftfields
    \begin{varwidth}[t]{\bigheaderwidth}\raggedleft
      \if@status{\@statustext{} \@status}\vspace{2pt}\\\fi
      \if@responsible{\@responsibletext{} \@responsible}\vspace{2pt}\\\fi
      \if@eta{(\@eta)}\\\fi
    \end{varwidth}%
%    \end{macrocode}
%   \begin{danish}
%     Det eksplicitte mellemrum her holder formatteringen konsistent.
%   \end{danish}
%   \begin{english}
%     The explicit space here keeps the foratting regular.
%   \end{english}
%    \begin{macrocode}
    \ \hspace{.5em}\vrule{}\hspace{.5em}
    \begin{varwidth}[t]{\smallheaderwidth}\raggedright
      Version \@version\vspace{2pt}\\
      \today\vspace{2pt}\\
      \pagessum{\getpagerefnumber{lastpage}}
    \end{varwidth}
%    \end{macrocode}
%    \begin{macrocode}
  \else
    Version \@version
    \ \hspace{.5em}\vrule\hspace{.5em}
    \today
    \ \hspace{.5em}\vrule\hspace{.5em}
    \pagessum{\getpagerefnumber{lastpage}}
  \fi
  \vskip 5pt }}
%    \end{macrocode}
%   \iffalse
%&lt;*driver&gt;     
\let\class@maketitle\maketitle
\let\maketitle\actual@maketitle
%&lt;/driver&gt;
% \fi
% 
% \begin{danish}
%   MiljÃ¸et \verb|varwidth|\DescribeEnv{varwidth}\ styrer placeringen
%   af dobbeltkolonnedelen af titelblokken. Det kommer fra
% \end{danish}
% \begin{english}
%   The environment \verb|varwidth|\DescribeEnv{varwidth}\ controls the
%   placement of the two--column part of the title block. It comes
%   from
% \end{english}
%    \begin{macrocode}
\RequirePackage{varwidth}
%    \end{macrocode}
% \iffalse
%&lt;*driver&gt;
\jump
%&lt;/driver&gt; 
% \fi
% 
% \begin{danish}
%   \texttt{\bslash getpagerefnumber} er en version af \texttt{\bslash
%   pageref} som kan udvides. Den kommer fra
% \end{danish}
% \begin{english}
%   \texttt{\bslash getpagerefnumber} is an expandable version of
%   \texttt{\bslash pageref} from
% \end{english}
%    \begin{macrocode}
\RequirePackage{refcount}
%    \end{macrocode}
%   
% \begin{macro}{\if@leftfields}
%   \begin{danish}
%     Den her makro fungerer som\footnote{her er $\lor$ logisk
%     `eller'.}  \verb|\if@responsible| $\lor$ \verb|\if@status|
%     $\lor$ \verb|\if@eta|. \TeX{}'s \texttt{\bslash
%     if}--mekanisme understÃ¸tter ikke som sÃ¥dan en
%     $\lor$--operator, sÃ¥ vi bruger tallene 0 og 1 som
%     stedfortrÃ¦dere for booliske vÃ¦rdier, og bruger
%     talsammenligninger til at definere
%   \end{danish}
%   \begin{english}
%     This macro is defined to effectively be\footnote{$\lor$ being
%     logical OR.}  \verb|\if@responsible| $\lor$ \verb|\if@status|
%     $\lor$ \verb|\if@eta|. In the absence of a real
%     $\lor$--operator for \TeX{}'s \texttt{\bslash if}, it uses
%     1's and 0's as standins for boolean values.
%   \end{english}
%   \iffalse
%&lt;*driver&gt;                   
\land
%&lt;/driver&gt; 
%   \fi
%    \begin{macrocode}
\def\if@leftfields{
  \def\@responsiblenum{\ifx\iftrue\if@responsible 1 \else 0 \fi}
  \def\@statusnum{\ifx\iftrue\if@status 1 \else 0 \fi}
  \def\@etanum{\ifx\iftrue\if@status 1 \else 0 \fi}
%    \end{macrocode}
%    \begin{macrocode}
  \ifnum1=\ifnum1=\@responsiblenum 1
    \else \ifnum1=\@statusnum 1
    \else \ifnum1=\@etanum 1
    \else 0
  \fi\fi\fi
}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\smallheaderwidth}
% \begin{macro}{\bigheaderwidth}
%   \begin{danish}
%     Og disse lÃ¦ngder blev brugt.
%   \end{danish}
%   \begin{english}
%     And these lengths were used.
%   \end{english}
%    \begin{macrocode}
\newlength{\smallheaderwidth}
\setlength{\smallheaderwidth}{22ex}
\newlength{\bigheaderwidth}
\setlength{\bigheaderwidth}{\textwidth}
\addtolength{\bigheaderwidth}{-\smallheaderwidth}
\addtolength{\bigheaderwidth}{-1.5em}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \iffalse
%&lt;*driver&gt;   
\jump
%&lt;/driver&gt; 
% \fi
% \end{macro}
% \end{implementation}
%
% \begin{danish}
%   \subsubsection{Sidehoveder}
%   Klassen definerer ogsÃ¥ sine egne sidehoveder, illustreret i figur
%   \ref{sidehoved}, som indeholder nogle af de samme informationer.
% \end{danish}
% \begin{english}
%   \subsubsection{Page headers}
%   The class also defines its own header style, which is illustrated
%   in figure \ref{sidehoved}, and contains some of the same information.
% \end{english}
%
% \begin{figure}[htbp]
%   \begingroup
%   \IfLanguageName{danish}{\exDaPre}{}
%   \IfLanguageName{english}{\exEnPre}{}
%   \ps@revyheadings
%   \let\thepage=2
%   \def\pageref#1{2}
%   \renewcommand{\rectoheaderthumbtab}{}
%   \vspace{3em}
%   \@oddhead
%   \medskip
%   \endgroup
%   \begin{danish}
%     \caption{Et eksempel pÃ¥ sidehovederne, som \cn\ definerer.}
%   \end{danish}
%   \begin{english}
%     \caption{An example of the headers that \cn\ define.}
%   \end{english}
%   \label{sidehoved}
% \end{figure}
%
% \iffalse
%&lt;*driver&gt;
\land
%&lt;/driver&gt;
% \fi
%
% \begin{danish}
%   De her sidehoveder hÃ¸rer til en ny \texttt{pagestyle}, som hedder
%   \texttt{revyheadings}.
% \end{danish}
% \begin{english}
%   These headers belong ot a new \texttt{pagestyle} named
%   \texttt{revyheadings}
% \end{english}
% \begin{implementation}
% \begin{macro}{\ps@revyheadings}
%    \begin{macrocode}
\gdef\ps@revyheadings{
  \def\@oddhead{\vbox to 0pt{\vss
      \hbox to \textwidth{\hfil\rectoheaderthumbtab}
      \hbox{\rm\strut\@revyname{} \@revyyear}
      \hbox to \textwidth{Version \@version\quad\today
        \hfil {\large\sl\@title}\hfil
        Side \rm\thepage/\pageref{lastpage}}
      \hrule}}
  \def\@evenhead{\vbox to 0pt{\vss
      \hbox{\versoheaderthumbtab}
      \hbox to \textwidth{\hfil\rm\strut\@revyname{} \@revyyear}
      \hbox to \textwidth{Side \rm\thepage/\pageref{lastpage}
        \hfil {\large\sl\@title}\hfil
        Version \@version\quad\today}
      \hrule}}
  \def\@oddfoot{}\def\@evenfoot{}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\rectoheaderthumbtab}
% \begin{macro}{\versoheaderthumbtab}
%   \begin{danish}
%     Her er \verb|\rectoheaderthumbtab| og
%     \verb|\versoheaderthumbtab| makroer, som placerer
%     registermÃ¦rkningerne korrekt pÃ¥ siden i forhold til sidehovedet,
%     og kalder kommandoen, som tegner dem, sÃ¥ lÃ¦nge \cn\ er blevet
%     kaldt med valgmuligheden \verb|thumbindex|, se sektion
%     \ref{thumbindex}. Hvis ikke, sÃ¥ gÃ¸r de ikke noget.
%   \end{danish}
%   \begin{english}
%     Here, the \verb|\rectoheaderthumbtab| and
%     \verb|\versoheaderthumbtab| are macros that place the thumb
%     markings correctly in relation to the page header, and call the
%     drawing macro, so long as \cn\ has been given the option
%     \verb|thumbindex|, see section \ref{thumbindex}. If not, they do
%     nothing.
%   \end{english}
%    \begin{macrocode}
\newcommand{\rectoheaderthumbtab}{%
  \if@thumbindex
    \rectothumbtabfor{\@title}%
    \vspace*{ -\paperheight }\vspace*{ -\voffset }\vspace*{ 0.32in }%
    \hspace{-\paperwidth }\hspace{ 1in }\hspace{ \oddsidemargin }%
    \hspace{ \hoffset }\hspace{ \textwidth }\hspace{-.6cm}%
  \fi
}
\newcommand{\versoheaderthumbtab}{%
  \if@thumbindex
    \hspace{ -2.5in }\hspace{ -\evensidemargin }%
    \hspace{ -\hoffset }\hspace{ -1in }%
    \versothumbtabfor{\@title}%
    \vspace*{ -\paperheight }\vspace*{ -\voffset }\vspace*{ 0.32in }%
  \fi
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \iffalse
%&lt;*driver&gt;     
\jump
%&lt;/driver&gt; 
% \fi
% \end{implementation}
% \begin{danish}
%   Den nye \texttt{pagestyle} er aktiveret som standard.
% \end{danish}
% \begin{english}
%   The new \texttt{pagestyle} is activated by default.
% \end{english}
% \begin{implementation}
%    \begin{macrocode}
\pagestyle{revyheadings}
%    \end{macrocode}
%   \DescribeMacro{\ps@empty}
%   \begin{danish}^^A
%     Men vi omdefinerer ogsÃ¥ \texttt{pagestyle}'en "`\texttt{empty}"'
%     til at vÃ¦re
%   \end{danish}^^A
%   \begin{english}^^A
%     But we also redefine the \texttt{pagestyle} ``\texttt{enpty}'' to be
%   \end{english}
%    \begin{macrocode}
\gdef\ps@empty{
  \def\@oddhead{\vbox to 0pt{\vss
      \hbox to \textwidth {\hfil\rectoheaderthumbtab }
      \vbox to 2em{}}}
  \def\@evenhead{\vbox to 0pt{\vss\hbox{\versoheaderthumbtab}}}
  \def\@oddfoot{}\def\@evenfoot{}}
%    \end{macrocode}
% \end{implementation}
%
% \begin{danish}
%   \subsection{Tildelingslister}
%
%   Rolle- og rekvisitlisterne i starten af eksemplet, som ogsÃ¥ er
%   gengivet i figur \ref{lists}, produceres af fÃ¸lgende linjer:
%
%\begin{verbatim}
% \begin{roles}
%   \role{PH}[Jophiel] Per Hedegaard
%   \role{I} Vred instruktÃ¸r
%   \role{A9}[A--ni] Anine
% \end{roles}
% \begin{props}
%   \prop{Hedegaard--hÃ¥r}[Person, der skaffer]
%   \prop{Didgeridoo}[Anine]
% \end{props}
%\end{verbatim}
%
%   \begin{figure}[htbp]
%     \medskip
%     \begin{roles}
%       \role{PH}[Jophiel] Per Hedegaard
%       \role{I} Vred instruktÃ¸r
%       \role{A9}[A--ni] Anine
%     \end{roles}
%     \begin{props}
%       \prop{Hedegaard--hÃ¥r}[Person, der skaffer]
%       \prop{Didgeridoo}[Anine]
%           Et traditionelt Australsk blÃ¦seinstrument
%     \end{props}
%     \medskip
%     \caption{Eksempel pÃ¥ lister, som kan sÃ¦ttes med \cn\ til at
%     uddele, for eksempel, roller og ansvar for for rekvisitter.}
%     \label{lists}
%   \end{figure}
%
% \end{danish}
% \begin{english}
%   \subsection{Assignement lists}
%
%   We provide a number of environments for setting information about
%   the material in a file in lists. In the example file, we produce
%   something like the lists shown in figure \ref{lists}, with the
%   passage
%   \begin{verbatim}
%\rolename{Roles:}
%\begin{roles}
%  \role{KA}[Graham] Arthur, king of all the Britons
%  \role{P}[Michael] Peasant
%  \role{RC}[John] Roman Centurion
%  % [...]
%\end{roles}
%\propname{Props:}
%\begin{props}
%  \prop{Large sign}
%  \prop{Field of crosses}
%\end{props}
%   \end{verbatim}
%   \begin{figure}[hbtp]
%     \medskip
%     \rolename{Roles:}
%     \begin{roles}
%       \role{KA}[Graham] Arthur, king of all the Britons
%       \role{P}[Michael] Peasant
%       \role{RC}[John] Roman Centurion
%     \end{roles}
%     \propname{Props:}
%     \begin{props}
%       \prop{Large sign}
%       \prop{Field of crosses}
%     \end{props}
%     \medskip
%     \caption{Examples of the assignment lists that can be typeset
%     with \cn, for noting cast lists, among other things.}
%     \label{lists}
%   \end{figure}
% \end{english}
%
% \iffalse
%&lt;*driver&gt;     
\land
%&lt;/driver&gt; 
% \fi
% \begin{implementation}
% \begin{environment}{revy@list}
%   \begin{danish}
%     Begge de miljÃ¸er blev udledt fra det her miljÃ¸.
%   \end{danish}
%   \begin{english}
%     Both those environments are derived from this environment.
%   \end{english}
%    \begin{macrocode}
\newenvironment{revy@list}[1]%
{{\smallskip\noindent\Large\bf#1}
  \begin{list}{}{
      \labelwidth 8em
      \leftmargin 10em
      \rightmargin 0em
      \labelsep 1em
      \listparindent 0em
      \topsep 1ex
      \partopsep 0ex
      \parsep 1ex
      \itemsep -1ex\relax
    }%
  }%
  {\end{list}\smallskip\hfil\rule{6cm}{0.1mm}\medskip\par}
%    \end{macrocode}
%   \begin{danish}
%     Argumentet, som det her miljÃ¸ tager, er listens overskrift.
%   \end{danish}
%   \begin{english}
%     The argument that this environment takes is the title for the
%     list.
%   \end{english}
% \end{environment}
%
% \begin{macro}{\revy@itemwithout,\revy@itemwith,\revy@itemname}
%   \begin{danish}
%     Fordi \texttt{revy@list} er afledt fra \texttt{list}--miljÃ¸et,
%     sÃ¥ forventer det, at punkter pÃ¥ listen bliver kaldt med
%     \verb|\item|. Vi, som brugere, forventer, at vi kan bruge vores
%     egne navne for punkter pÃ¥ de her lister, og at de bliver sat i
%     deres egen stil. \verb|\revy@itenmane| laver de definitioner,
%     som er nÃ¸dvendige, for at bruge de kommandoer, mens
%     \verb|\revy@itenwith| og \verb|\revy@itemwithout| holder
%     oversÃ¦ttelsen til en \verb|\item|--kommando.
%     \changes{v1.0.1}{2024/02/07}{Fjernede unÃ¸dvendige omdefinitioner.}
%   \end{danish}
%   \begin{english}
%     As the \texttt{revy@list} environment is derived from the
%     \texttt{list} environment, it expects entries in its list to
%     ultimately be called with \verb|\item|. However, for the
%     environments presented to the end user, we like to provide item
%     commands that more closely match the intended
%     use. \verb|\revy@itemname| bundles the process of creating those
%     commands, while \verb|\revy@itemwith| and
%     \verb|\revy@itemwithout| hold the translation to an \verb|\item|
%     command.
%     \changes{v1.0.1}{2024/02/07}{Eliminated spurious redefinitions.}
%   \end{english}
%    \begin{macrocode}
\def\revy@itemwithout#1{\item [{\bf #1} \hfill] }
\def\revy@itemwith#1[#2]{\item [{\bf #1} (#2) \hfill] }
\def\revy@itemname#1{%
  \expandafter\def\csname #1\endcsname##1{%
    \@ifnextchar [ %]
    {\revy@itemwith{##1}}{\revy@itemwithout{##1}}%
  }
}
%    \end{macrocode}
%   \begin{danish}
%     Argumentet er navnet pÃ¥ den kommando, som kommer til at sÃ¦tte
%     punkter pÃ¥ listen.
%     
%     Se nogle eksempler pÃ¥, hvordan den bruges, lige under her.
%   \end{danish}
%   \begin{english}
%     The argument is the name of the macro that will be created for
%     setting items on our lists.
%     
%     Some examples of how these are used will follow.
%   \end{english}
% \end{macro}
% \end{implementation}
%
% \begin{environment}{roles}
%   \begin{danish}
%     I rollelisten, for eksempel, sÃ¦ttes hver rolletildeling med
%     kommandoen
%
%     \verb|\role|\marg{fk.}\oarg{skuespiller}\meta{rollebeskrivelse}.
%   \end{danish}
%   \begin{english}
%     In the role list, each role is set with the macro
%
%     \verb|\role|\marg{abr.}\oarg{actor}\meta{description}
%   \end{english}
%   \begin{implementation}
%     \begin{danish}
%       Her afledes rollelistemiljÃ¸et fra \texttt{revy@list}.
%     \end{danish}
%     \begin{english}
%       The roles list environment is here derived from
%       \texttt{revy@list}.
%     \end{english}
%    \begin{macrocode}
\newenvironment{roles}{
  \begin{revy@list}{\@rolename}
    \revy@itemname{role}
 }{
  \end{revy@list}
}
%    \end{macrocode}
%   \end{implementation}
% \end{environment}
%
% \begin{environment}{props}
% \begin{environment}{costumes}
%   \begin{danish}
%     \changes{v1.1.0}{2024/12/18}{Introducer Kostume-miljÃ¸et}
%   \end{danish}
%   \begin{english}
%     \changes{v1.1.0}{2024/12/18}{Introduce costumes environment}
%   \end{english}
% \begin{environment}{mics}
% \begin{environment}{instructors}
%   \begin{danish}
%     Ud over rollelisten findes ogsÃ¥ miljÃ¸er til lister over
%     rekvisitter (som ogsÃ¥ ver med i eksemplet), kostumer, mikrofoner
%     og instruktÃ¸rere.\footnote{\cn\ stiller ikke nogen krav til
%     hvorvidt nogen af de her miljÃ¸er bliver brugt. Check med din
%     revyorganisation for at hÃ¸re hvad der skal vÃ¦re med i materiale
%     til din revy.} For de sidste miljÃ¸er er kommandoerne til at lave
%     et punkt pÃ¥ de lister henholdsvis
%     \begin{showcommand}
%       \verb|\prop|\marg{rekvisit}\oarg{ansvarlig}\meta{beskrivelse},
%       
%     \end{showcommand}
%     \begin{showcommand}
%       \verb|\costume|\marg{kostume}\oarg{ansvarlig}\meta{beskrivelse},
%     \end{showcommand}
%     \begin{showcommand}
%       \verb|\mic|\marg{fk.}\oarg{skuespiller}\meta{mikrofon}
%     \end{showcommand}
%     og
%     \begin{showcommand}
%       \verb|\instructor|\oarg{titel}\meta{navn}.
%     \end{showcommand}
%   \end{danish}
%   \begin{english}
%     Beyond the roles environment, \cn\ defines these four
%     additional environments, for typesetting lists that may be
%     useful to a production. Of these, the examples in figures
%     \ref{eksempel} and \ref{lists} used \verb|props|.
%     
%     Within these environments, \verb|props|, \verb|costumes|,
%     \verb|mics| and \verb|instructors|, the macros for setting a
%     list item are
%     \begin{showcommand}
%       \verb|\prop|\marg{prop}\oarg{responsible}\meta{description},
%     \end{showcommand}
%     \begin{showcommand}
%       \verb|\costume|\marg{costume}\oarg{responsible}\meta{description},
%     \end{showcommand}
%     \begin{showcommand}
%       \verb|\mic|\marg{abr.}\oarg{actor}\meta{microphon}
%     \end{showcommand}
%     and
%     \begin{showcommand}
%       \verb|\instructor|\oarg{title}\meta{name},
%     \end{showcommand}
%     respectively.
%   \end{english}
%   \begin{implementation}
%     \begin{danish}
%       Definitionen fÃ¸lger de samme linjer som definitionen af
%       \texttt{roles}--miljÃ¸et.
%     \end{danish}
%     \begin{english}
%       Their definitions run along the same lines as the
%       \texttt{roles} environment.
%     \end{english}
%    \begin{macrocode}
\newenvironment{props}{
  \begin{revy@list}{\@propname}
    \revy@itemname{prop}
  }{
  \end{revy@list}
}
\newenvironment{costumes}{
  \begin{revy@list}{\@costumename}
    \revy@itemname{costume}
  }{
  \end{revy@list}
}
\newenvironment{mics}{
  \begin{revy@list}{\@micname}
    \revy@itemname{mic}
  }{
  \end{revy@list}
}
%    \end{macrocode}
% \begin{danish}
%   Strukturen i listekommandoen \verb|\instructor|, i
%   \texttt{instructors}, er forskellig fra den, som
%   \verb|\revy@itemname| definerer, sÃ¥ vi implementerer den sÃ¦rskilt.
% \end{danish}
% \begin{english}
%   However, the structure of the item macro in \texttt{instructors}
%   doesn't fit the pattern, and so needs its own particular
%   implementation.
% \end{english}
%    \begin{macrocode}
\newenvironment{instructors}{
  \begin{revy@list}{\@instructorname}
    \def\@instructorwith[##1]{\item [{\bf ##1} \hfill] }
    \def\@instructorwithout{\item}
    \def\instructor{%
      \@ifnextchar [{\@instructorwith}{\@instructorwithout}%]
    }
  }{
  \end{revy@list}
}
%    \end{macrocode}
% \end{implementation}
% \end{environment}
% \end{environment}
% \end{environment}
% \end{environment}
%
%
% \begin{macro}{\rolename}
% \begin{macro}{\costumename}
% \begin{macro}{\propname}
% \begin{macro}{\micname}
% \begin{macro}{\instructorname}
%   \begin{danish}
%     MiljÃ¸ernes standardoverskrifter---"`Roller:"', "`Kostumer:"',
%     "`Rekvisitter:"', "`Mikrofoner"' og "`InstruktÃ¸rer:"'---kan
%     Ã¦ndres med makroerne
%     \begin{showcommand}
%       \verb|\rolename|\marg{tekst},
%       \item\verb|\costumename|\marg{tekst},
%       \item\verb|\propname|\marg{tekst},
%       \item\verb|\micname|\marg{tekst}
%     \end{showcommand}
%     og
%     \begin{showcommand}
%       \verb|\instructorname|\marg{tekst}
%     \end{showcommand}
%   \end{danish}
%   \begin{english}
%     The default headings for these environments---``Roller:'',
%     ``Kostumer:'', ``Rekvisitter:'', ``Mikrofoner'' and
%     ``InstruktÃ¸rer:''---may be changed with the macros
%     \begin{showcommand}
%       \verb|\rolename|\marg{text},
%       \item\verb|\costumename|\marg{text},
%       \item\verb|\propname|\marg{text},
%       \item\verb|\micname|\marg{text}
%     \end{showcommand}
%     og
%     \begin{showcommand}
%       \verb|\instructorname|\marg{text}
%     \end{showcommand}
%   \end{english}
%   \begin{implementation}
%    \begin{macrocode}
\def\rolename#1{\def\@rolename{#1}}
\def\costumename#1{\def\@costumename{#1}}
\def\propname#1{\def\@propname{#1}}
\def\micname#1{\def\@micname{#1}}
\def\instructorname#1{\def\@instructorname{#1}}
%    \end{macrocode}
% \begin{danish}
%   Makroerne, som opbevarer de her navne, er
% \end{danish}
% \begin{english}
%   The macros that store these names are
% \end{english}
%    \begin{macrocode}
\def\@rolename{Roller:}
\def\@costumename{Kostumer:}
\def\@propname{Rekvisitter:}
\def\@micname{Mikrofoner:}
\def\@instructorname{InstruktÃ¸rer:}
%    \end{macrocode}
% \end{implementation}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% 
% \begin{danish}
%   \subsection{BrÃ¸dtekst}
% \end{danish}
% \begin{english}
%   \subsection{Body text}
% \end{english}
% \subsubsection{\texttt{sketch}}
% \begin{environment}{sketch}
%   \begin{danish}
%     \changes{v1.0.0}{2023/09/05}{BrÃ¸dtekst--makroer
%     (\texttt{\textbackslash scene}, etc.) findes ikke lÃ¦ngere uden for
%     \texttt{song} og \texttt{sketch} miljÃ¸erne.}
%     For at sÃ¦tte talte replikker, som eksemplet vist i figur
%     \ref{sketchex}, bruger vi miljÃ¸et |sketch|.
%
%     \begin{figure}[hbtp]
%       \begin{center}$\vdots$\end{center}
%       \begin{sketch}
%         \says{A9} NÃ¥, men sÃ¥ mÃ¥ jeg jo hellere begynde at lede. \act{Vender
%         sig mod Bandet} Bandet, har I...?
%         \scene Hvert bandmedlem holder sin egen didgeridoo op.
%         \says{A9}[Til PH] Den ser ud til at vÃ¦re i vinkel.
%         \says{PH} Sejt.
%       \end{sketch}
%       \begin{center}$\vdots$\end{center}
%       \caption{Et eksempel pÃ¥, hvordan replikker typesÃ¦ttes med
%       \texttt{sketch}--miljÃ¸et.}
%       \label{sketchex}
%     \end{figure}
%   \end{danish}
%   \begin{english}
%     \changes{v1.0.0}{2023/09/05}{The body text macros
%     (\texttt{\textbackslash scene}, etc.) are no longer available
%     outside the \texttt{song} and \texttt{sketch} environments.}
%     To typese spoken lines, as in the example shown in figure
%     \ref{sketchex}, use the \texttt{sketch} envrionment.
%
%     \begin{figure}[hbtp]
%       \begin{center}$\vdots$\end{center}
%       \begin{sketch}
%         \says{RC}[To KA] Did you write th... wait a minute. \act{Off
%         stage} It's him! \act{Back at KA} How did you get here?
%         
%         \does{KA} attempts to sidle away.
%         
%         \says{RC} Get him!
%         
%         \scene Several Roman soldiers appear, and drag \role{KA} off
%         stage, while \role{KA} attempts to protest.
%       \end{sketch}
%       \begin{center}$\vdots$\end{center}
%       \caption{An example of how spoken lines are typeset, using the
%       \texttt{sketch} environment.}
%       \label{sketchex}
%     \end{figure}
%   \end{english}
%
%   \begin{implementation}
%     \begin{danish}
%       \verb|sketch| er, ligesom tildelingslisterne, implementeret
%       ved brug af \verb|list|--milljÃ¸et. MiljÃ¸et
%       \verb|revy@bodycommon| introducerer makroer, som er fÃ¦lles
%       mellem miljÃ¸erne \verb|sketch| og \verb|song|. Den bliver
%       defineret pÃ¥ side \pageref{bodycommon}.
%     \end{danish}
%     \begin{english}
%       \verb|sketch|, like the assignment list environments, is
%       derived from the \verb|list| environment. The environment
%       \verb|revy@bodycommon| introduces macros that are shared
%       between the \verb|sketch| and \verb|song| environments. It is
%       defined on page \pageref{bodycommon}.
%     \end{english}
%    \begin{macrocode}
\newenvironment{sketch}{%
  \begin{revy@bodycommon}
  \rm\begin{list}{}{
      \labelwidth 2em
      \leftmargin 3em
      \rightmargin 0em
      \labelsep 0.5em
      \listparindent 2em
      \topsep 1ex
      \partopsep 1ex
      \parsep 0ex
      \itemsep 1ex\relax}%
  \item \rule{0.2em}{0em}\vspace{-1em}\par %}
%    \end{macrocode}
%   \end{implementation}
%
% \begin{macro}{\says}
%   \begin{danish}
%     Inde i \verb|sketch| sÃ¦tter makroen \verb|\says| hver enkelt
%     replik. Den fulde syntaks er:
%     \begin{showcommand}
%       \verb|\says|\marg{fk.}\oarg{instruktion} \meta{replik}
%     \end{showcommand}
%   \end{danish}
%   \begin{english}
%     Inside the \verb|sketch| environment, the macro \verb|\says|
%     sets each line of dialouge. Its complete syntax is:
%     \begin{showcommand}
%       \verb|\says|\marg{abr.}\oarg{direction} \meta{line}
%     \end{showcommand}
%   \end{english}
%   \begin{implementation}
%     \begin{danish}
%       \verb|\says| og \verb|\scene| (se side \pageref{sceneuse})
%       skifter frem og tilbage mellem hver deres tilstand i
%       miljÃ¸et. Vi piller ved \verb|\leftskip|, for at Ã¦ndre
%       indrykningen af \verb|\scene|.
%     \end{danish}
%     \begin{english}
%       \verb|\says| and \verb|\scene| (see page \pageref{sceneuse})
%       effectively shift the environment back and forth between two
%       modes of typesetting. We mess around with \verb|\leftskip| to
%       accomplish changes in indentation.
%     \end{english}
%    \begin{macrocode}
  \newdimen\old@leftskip
  \old@leftskip \leftskip
  \newdimen\short@leftskip
  \short@leftskip \leftskip
  \advance\short@leftskip -1.5em
%    \end{macrocode}
% \begin{macro}{\says}
%    \begin{macrocode}
\def\says##1{\@ifnextchar [{\@saysas{##1}}{\@says{##1}}} %]
\def\@saysas##1[##2]{\rm\item [{\bf ##1 }{\it (##2)\,}\hfill:]
  \leftskip \old@leftskip}
\def\@says##1{\rm\item [{\bf ##1\,}\hfill:]\leftskip \old@leftskip}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\scene}
%    \begin{macrocode}
\def\scene{\medskip\par\noindent\it\leftskip \short@leftskip }
%    \end{macrocode}
% \end{macro}
% \end{implementation}
%
%   \begin{danish}
%     SÃ¥ for eksempel den nÃ¦stsidste replik i figur \ref{sketchex} er
%     kreÃ©ret med fÃ¸lgende kode:
%     \begin{verbatim}
% \says{A9}[Til PH] Den ser ud til at vÃ¦re i vinkel.
%     \end{verbatim}
%   \end{danish}
%   \begin{english}
%     Thus, for example, part of the first line of figure
%     \ref{sketchex} gets created with the following code:
%     \begin{verbatim}
% \says{RC}[To KA] Did you write th... wait a minute. \act{Off stage} (...)
%     \end{verbatim}
%   \end{english}
% \end{macro}
% 
% \begin{implementation}
%   \begin{danish}
%     Og her afslutter vi \verb|sketch|--miljÃ¸et.
%   \end{danish}
%   \begin{english}
%     And here, the \verb|sketch| environment is concluded.
%   \end{english}
%    \begin{macrocode}
  }{%
  \end{list}
  \end{revy@bodycommon}
}
%    \end{macrocode}
% \end{implementation}
% \end{environment}
%
% \subsubsection{\texttt{song}}
% \begin{environment}{song}
%   \begin{danish}
%     \changes{v1.0.0}{2023/09/05}{BrÃ¸dtekst--makroer
%     (\texttt{\textbackslash scene}, etc.) findes ikke lÃ¦ngere uden for
%     \texttt{song} og \texttt{sketch} miljÃ¸erne.}
%     MiljÃ¸et \verb|song| er til sangtekster, som sÃ¦ttes som eksemplet
%     i figur \ref{songex}.
%
%     \begin{figure}[hbtp]
%       \begin{center}$\vdots$\end{center}
%       \begin{song}
%         \scene{Bandet spiller "`Bohemian Rhapsody"' af Queen,
%         udelukkende pÃ¥
%         didgeridoo.}
%         \sings{A9} Ã…h, Per Hede               
%                    Er den lede                
%                    Og han dumped' mig i kvant!
%
%          \sings{PH} Per Hedegaard har er reeksamenssÃ¦t til dig
%       \end{song}
%       \begin{center}$\vdots$\end{center}
%       \caption{Et eksempel pÃ¥, hvordan sangtekster typesÃ¦ttes, med
%       miljÃ¸et \texttt{song}.}
%       \label{songex}
%     \end{figure}
%   \end{danish}
%   \begin{english}
%     \changes{v1.0.0}{2023/09/05}{The body text macros
%     (\texttt{\textbackslash scene}, etc.) are no longer available
%     outside the \texttt{song} and \texttt{sketch} environments.}
%     The \verb|song| environment is for song lyrics, which are set as
%     demonstrated in figure \ref{songex}.
%
%     \begin{figure}[hbtp]
%       \begin{center}$\vdots$\end{center}
%       \begin{song}
%          \sings{CC} ...be silly chumps,
%                     Just purse you're lips and whistle,
%                     That's the thing.
%        
%                     And, always look on the bright side of life,
%       \end{song}
%       \begin{center}$\vdots$\end{center}
%       \caption{An example of how song lyrics are typeset, using the
%       \texttt{song} environment.}
%       \label{songex}
%     \end{figure}
%   \end{english}
%
%   \begin{implementation}
%     \begin{danish}
%       \verb|song|--miljÃ¸et er ogsÃ¥ implementeret ud fra \verb|list|
%       og \verb|revy@bodycommon|.
%     \end{danish}
%     \begin{english}
%       The \verb|song| environment is also implemented as a
%       derivative of \verb|list| and uses \verb|revy@bodycommon|.
%     \end{english}
%    \begin{macrocode}
\newenvironment{song}{%
  \begin{revy@bodycommon}
  \rm\begin{list}{}{%
      \raggedright
      \labelwidth 4.5em
      \leftmargin 7em
      \rightmargin 0em
      \labelsep 2em
      \listparindent -2em
      \topsep 0ex
      \partopsep \bigskipamount
      \parsep .6\baselineskip
      \itemsep -.6\baselineskip
      \relax
    }
  \item[] \rule{0.2em}{0em}\vspace{-\baselineskip}\strut\par %}
%    \end{macrocode}
%   \end{implementation}
%
% \begin{macro}{\sings}
%   \begin{danish}
%     Inde i \verb|song|--miljÃ¸et sÃ¦tter makroen \verb|\sings|
%     sangstrofer. Den fulde syntaks er
%
%     \begin{showcommand}
%       \verb|\sings|\marg{fk.}\oarg{instruktion} \meta{sangtekst}
%     \end{showcommand}
%     
%     Linjeskift er vigtige i sangtekster, sÃ¥ \verb|song|--miljÃ¸et
%     Ã¦ndrer, hvordan \LaTeX\ reagerer pÃ¥ linjeskift i kildefilen. For
%     eksempel kan \textbf{A9}'s strofer i figur \ref{songex} kreeres
%     med denne kildekode:
%     \begin{verbatim}
% \sings{A9} Ã…h, Per Hede               
%            Er den lede                
%            Og han dumped' mig i kvant!
%     \end{verbatim}
%   \end{danish}
%   \begin{english}
%     Within the \verb|song| environment, the macro \verb|\sings| sets
%     song lyrics. Its full syntax is
%     \begin{showcommand}
%       \verb|\sings|\marg{abr.}\oarg{direction} \meta{lyric}
%     \end{showcommand}
%
%     Line breaks are significant in song lyrics, and so the
%     \verb|song| chanees how \LaTeX\ reacts to carriage returns in
%     the source file. For example, the lyric shown in figure
%     \ref{songex} is the product, in part, of this source code:
%     \begin{verbatim}
%  \sings{CC} ...be silly chumps,
%             Just purse you're lips and whistle,
%             That's the thing.
%     \end{verbatim}
%   \end{english}
%   \begin{implementation}
%     \begin{danish}
%       \verb|\sings| og \verb|\scene| skifter frem og tilbage mellem
%       to endnu mere forskellige tilstande, end \verb|\says| og
%       \verb|\scene| i \verb|sketch|--miljÃ¸et. LÃ¦g isÃ¦r mÃ¦rke til
%       brugen af \verb|\obeycr| og \verb|\restorecr|.
%     \end{danish}
%     \begin{english}
%       \verb|\sings| and \verb|\scene| shift back and forth between
%       to even more different states within the \verb|song|
%       environment than was the case in \verb|sketch|. Much of the
%       magic relates to the macros \verb|\obeycr| and
%       \verb|\restorecr|.
%     \end{english}
%    \begin{macrocode}
  \newdimen\old@leftskip
  \old@leftskip \leftskip
  \newdimen\short@leftskip
  \short@leftskip \leftskip
  \advance\short@leftskip -5.5em
%    \end{macrocode}
% \begin{macro}{\sings}
%    \begin{macrocode}
\def\sings##1{\obeycr
  \@ifnextchar [{\@singsas{##1}}{\@sings{##1}}} %}
\def\@singsas##1[##2]{\rm\item [\hskip\@leftsingpad{\bf ##1 }{\it
    (##2)\,}:\hskip\@rightsingpad]\hskip-2em\leftskip \old@leftskip}
\def\@sings##1{\rm\item [\hskip\@leftsingpad{\bf ##1\,}:\hskip
  \@rightsingpad]\hskip-2em\leftskip \old@leftskip}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\scene}
%    \begin{macrocode}
\let\old@sings=\sings
\def\scene{%
  \def\sings{\let\sings=\old@sings \medskip\sings}
  \medskip\par\leftskip \short@leftskip \restorecr
  \it\noindent\relax
}
%    \end{macrocode}
% \end{macro}
% 
% \begin{danish}
%   \verb|\@leftsingpad| og \verb|\@rightsingpad| gÃ¸r det muligt, at
%   stille sangtekster til at vÃ¦re venstre- eller hÃ¸jrejusterede.
% \end{danish}
% \begin{english}
%   \verb|\@leftsingpad| and \verb|\@rightsingpad| allow us to set
%   lyrics to be left or right justfied.
% \end{english}
%    \begin{macrocode}
  \newskip\@leftsingpad
  \newskip\@rightsingpad
  \def\flushsingsright{\@leftsingpad 0pt plus 1fill\@rightsingpad 0pt\relax}
  \def\flushsingsleft{\@leftsingpad 0pt\@rightsingpad 0pt plus 1fill\relax}
%    \end{macrocode}
% \begin{danish}
%   Som standard sÃ¦tter vi venstrejustering.
% \end{danish}
% \begin{english}
%   We set left justification as the default.
% \end{english}
%    \begin{macrocode}
  \flushsingsleft
%    \end{macrocode}
% \end{implementation}
% \end{macro}
%
%    \begin{implementation}
%     \begin{danish}
%       Vi kalder \verb|\obeycr| her, sammen med nogle kommandoer, som
%       fortÃ¦ller \LaTeX, at den ikke skal bekymre sig sÃ¥ meget om
%       lÃ¦ngderne pÃ¥ linjer.
%     \end{danish}
%     \begin{english}
%       We call \verb|\obeycr| here, along with some macros that get
%       \LaTeX\ to be less concerned about the proper length of lines.
%     \end{english}
%    \begin{macrocode}
  \tolerance10000\hfuzz21cm\obeycr
}{
  \end{list}
  \end{revy@bodycommon}
}
%    \end{macrocode}
% \end{implementation}
%
% \begin{implementation}
% \begin{macro}{\obeycr}
% \begin{macro}{\restorecr}
%   \begin{danish}
%     Makroerne, som gÃ¸r linjeskift--magien mulig, er
%   \end{danish}
%   \begin{english}
%     The macros that make the line breaking magic possible, are
%   \end{english}
%    \begin{macrocode}
\newif\if@newpar
{
  \catcode`\^^M=13
%    \end{macrocode}
%   \begin{danish}
%     SÃ¥ nu skal vi passe pÃ¥ med vores linjeskift her i koden...
%   \end{danish}
%   \begin{english}
%     At this point, we must be careful with carriage returns in the
%     code itself...
%   \end{english}
%    \begin{macrocode}
  \gdef\@carriagereturn{%
    \@ifnextchar^^M{%
      \@newpartrue%
    }{%
      \@ifnextchar\end{}{%
        \@ifnextchar\sings{%
          \if@newpar\bigskip\par\fi\@newparfalse%
        }{%
          \if@newpar\par\else\\\fi\@newparfalse%
        }%
      }%
    }%
  }%
  \gdef\obeycr{%
    \catcode`\^^M=13 %
    \let^^M=\@carriagereturn%
    \@gobblecr%
  }%
  \gdef\restorecr{\catcode`\^^M=5 }%
}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{implementation}
% \end{environment}
%
%   \begin{danish}
%
%     \subsubsection{FÃ¦lles for \texttt{sketch} og \texttt{song}}
%     Vi har ogsÃ¥ de fÃ¸lgende makroer, som kan bruges i bÃ¥de
%     \verb|song|- og \verb|sketch|--miljÃ¸erne:
%   \end{danish}
%   \begin{english}
%   \subsubsection{Both \texttt{sketch} and \texttt{song}}
%     The \verb|sketch| and \verb|song| macros both provide the
%     following macros:
%   \end{english}
%   \begin{implementation}\label{bodycommon}
% \begin{environment}{revy@bodycommon}
%   \begin{danish}
%     De bliver pakket i miljÃ¸et \verb|revy@bodycommon|.
%   \end{danish}
%   \begin{english}
%     They are packaged in the environment \verb|revy@bodycommon|.
%   \end{english}
%   \DescribeEnv{revy@bodycommon}
%    \begin{macrocode}
\newenvironment{revy@bodycommon}{
%    \end{macrocode}
%   ^^A}
% \end{environment}
% \end{implementation}
% 
% \begin{macro}{\role}
%   \begin{danish}
%     En makro til at formattere rolleforkortelser i teksten.
%   \end{danish}
%   \begin{english}
%     A macro for formatting role abbreviations within the text.
%   \end{english}
%   \begin{implementation}
%     \begin{danish}
%       Den her makro har det samme navn som indgangskommandoen i
%       \verb|roles|--miljÃ¸et. Men det er fint, for den bliver
%       defineret inde i \verb|roles|'s interne \verb|group|.
%     \end{danish}
%     \begin{english}
%       This macro has the same name as the item command inside the
%       \verb|roles| environment. But it's OK, because that command is
%       defined inside \verb|roles|'s internal \verb|group|.
%     \end{english}
%    \begin{macrocode}
  \let\role = \textbf
%    \end{macrocode}
% \end{implementation}
% \end{macro}
% 
% \begin{macro}{\does}
%   \begin{danish}
%     \changes{v1.0.0}{2023/09/05}{Ny makro}
%     En makro til at give instruktioner til en bestemt rolle, som
%     ikke er en talt replik, som for eksempel
% \begin{verbatim}
%\does{I} reagerer med Ã¥benmundet vantro.
%     \end{verbatim}
%   \end{danish}
%   \begin{english}
%     \changes{v1.0.0}{2023/09/05}{New macro}
%     A macro for giving instructions for a particular role that
%     aren't a spoken line, such as
% \begin{verbatim}
%\does{KA} attempts to sidle away.
%     \end{verbatim}
%   \end{english}
%   \begin{implementation}
%     \begin{danish}
%       Udrykningen pÃ¥ 1em er en hÃ¥rdt indkodet lÃ¦ngde, som passer
%       til, hvordan \verb|song| og \verb|sketch| er sat op lige
%       nu. Jeg er sikker pÃ¥ den ikke kommer til at hoppe op og bide
%       nogen bagi senere...
%     \end{danish}
%     \begin{english}
%       The 1em exdent is a hardcoded length that matches how
%       \verb|song| and \verb|sketch| are defined right now. I'm sure
%       it won't jump up and bite anyone in the future...
%     \end{english}
%    \begin{macrocode}
  \def\does##1{\scene \hspace{-1em}\role{##1}}
%    \end{macrocode}
% \end{implementation}
% \end{macro}
% 
% \begin{macro}{\scene}\label{sceneuse}
%   \begin{danish}
%     \verb|\scene| bruges til regibemÃ¦rkninger, som for eksempel
% \begin{verbatim}
% \scene Hvert bandmedlem holder sin egen didgeridoo op.
%     \end{verbatim}
%   \end{danish}
%   \begin{english}
%     \verb|\scene| is used for stage directions, such as
% \begin{verbatim}
% \scene P \&amp; KA are startled.
%     \end{verbatim}
%   \end{english}
%   \begin{implementation}
%     \begin{danish}
%       \verb|\scene| blev implementeret inde i \verb|sketch|- og
%       \verb|song|--miljÃ¸erne.
%     \end{danish}
%     \begin{english}
%       \verb|\scene| was implemented inside the \verb|sketch| and
%       \verb|song| environments.
%     \end{english}
%   \end{implementation}
% \end{macro}
% 
% \begin{macro}{\act}
%   \begin{danish}
%     \verb|\act| er til instruktioner, som for eksempel
% \begin{verbatim}
% (...) \act{Vender sig mod Bandet} Bandet, har I...?
%     \end{verbatim}
%   \end{danish}
%   \begin{english}
%     \verb|\act| is for directions, such as in
% \begin{verbatim}
% (...) It's him! \act{Back at KA} How did you get here?
%     \end{verbatim}
%   \end{english}
%   \begin{implementation}
%    \begin{macrocode}
  \def\act##1{\textit{(##1)}}
%    \end{macrocode}
% \end{implementation}
% \end{macro}
% 
% \begin{danish}
%   De blev begge brugt til at lave eksemplet i figur \ref{sketchex}.
% \end{danish}
% \begin{english}
%   Both were used in the example in figure \ref{sketchex}.
% \end{english}
% 
% \begin{implementation}
%   \begin{danish}
%     Og her afslutter vi miljÃ¸et \verb|revy@bodycommon|.
%   \end{danish}
%   \begin{english}
%     And here, we end the the environment \verb|revy@bodycommon|.
%   \end{english}
%    \begin{macrocode}
}{}
%    \end{macrocode}
% \end{implementation}
%
%   \begin{danish}
%     \subsection{Assorterede emner}
%     \subsubsection{\SaTyR}
%   \end{danish}
%   \begin{english}
%     \subsection{Miscellenia}
%     \subsubsection{\SaTyR}
%   \end{english}
%   \begin{macro}{\SaTyR}
%   \begin{danish}
%     \changes{v1.0.2}{2024/09/24}{SaTyR-makro}
%     Man skriver \SaTyR{}Revy ved at elske alle dyr, og derefter
%     skrive
%   \end{danish}
%   \begin{english}
%     \changes{v1.0.2}{2024/09/24}{SaTyR-macro}
%     \SaTyR{}Revy, which is produced by the students at the Faculty
%     of Science at the University of Copenhagen, is properly written
%     by saying
%   \end{english}
%     \begin{verbatim}
%\SaTyR{}Revy
%     \end{verbatim}
%     \begin{implementation}
%    \begin{macrocode}
\newcommand{\SaTyR}{S\hspace*{-.2ex}\raisebox{-.15em}{A}\hspace*{-.5ex}TyR}
%    \end{macrocode}
%     \end{implementation}
%     \end{macro}
% \iffalse
%&lt;*driver&gt;
\jump
%&lt;/driver&gt;
% \fi
% \begin{implementation}
%     \begin{danish}
%     \subsubsection{\texttt{.aux}--filen}
%     Til fremtidigt brug sÃ¸rger vi for, at vores metadata ogsÃ¥ bliver
%     skrevet ud til \texttt{.aux}--filen, nÃ¥r dokumentet er fÃ¦rdigt.
%
%     Det er ogsÃ¥ her, vi sÃ¦tter en \texttt{label} pÃ¥ den sidste side.
%   \end{danish}
%   \begin{english}
%     \subsubsection{The \texttt{.aux} file}
%     For futue use, we will also ensure that our metadata is written
%     to the \texttt{.aux} file at the end of the document.
%
%     This is also where we \texttt{label} the last page.
%   \end{english}
%    \begin{macrocode}
\let\revyinfo=\relax
\newtoks\@titletoks
\newtoks\@authortoks
\newtoks\@melodytoks
\newtoks\@revyrevynametoks
\newtoks\@revyrevyyeartoks
\let\end@document=\enddocument
\def\enddocument{\label{lastpage}\write\@auxout
  {\string\@ifundefined{revyinfo}{\string\def\string
  \revyinfo\string##1\string##2\string##3\string
  ##4\string##5\string##6\string##7\string##8{}}{}}\@titletoks=
  \expandafter{\@title}\@titletoks=
  \expandafter{\@title}\@authortoks=
  \expandafter{\@author}\@melodytoks=
  \expandafter{\@melody}\@revyrevynametoks=
  \expandafter{\@revyname}\@revyrevyyeartoks=
  \expandafter{\@revyyear}\write\@auxout
  {\string\revyinfo{\the\@titletoks}{\@version}
    {\today}%
    {\the\@authortoks}%
    {\the\@melodytoks}%
    {}%
    {\the\@revyrevynametoks}%
    {\the\@revyrevyyeartoks}%
  }%
  \end@document
}
%    \end{macrocode}
% \end{implementation}
%
% \appendix
% \bibliography{ucph-revy}
% \begin{implementation}
%   \PrintIndex
% \end{implementation}
% \begin{danish}
%   \section{Komplet eksempel}
%   \changes{v1.0.2}{2024/09/24}{Tilpasninger i eksempelfil}
%   \label{fullex}
%   \VerbatimInput{Eksempel.tex}
% \end{danish}
% \begin{english}
%   \section{Complete example}
%   \changes{v1.0.2}{2024/09/24}{Minor adjustments in example file}
%   \label{fullex}
%   \VerbatimInput{Example.tex}
% \end{english}
%
% \iffalse
%&lt;/class&gt;
%&lt;*ex-da&gt;
\documentclass{ucph-revy}

\usepackage[utf8]{inputenc}
\usepackage[OT1]{fontenc}
\usepackage[danish]{babel}
\usepackage{hyperref}
%&lt;*driver&gt;
\land
\def\exDaPre{
%&lt;/driver&gt;
\urlstyle{sf}

\version{1.0}
%% fÃ¸lgende definitioner kan godt fjernes, hvis der ikke er brug for dem:
\revyname{FysikRevy\texttrademark}
\revyyear{2019}
\status{eksempel}
\eta{$1$ minut, $47$ sekunder}
\responsible{Dig}

\title{Eksempel}
\author{en eksempelsmed}
\melody{Queen: â€žBohemian Rhapsody`` (\url{https://youtu.be/fJ9rUzIMcZQ})}
%&lt;*driver&gt;
}
\def\exDaPOne{
%&lt;/driver&gt; 

\begin{document}
\maketitle

\begin{roles}
  \role{PH}[Jophiel] Per Hedegaard
  \role{I} Vred instruktÃ¸r
  \role{A9}[A--ni] Anine
\end{roles}
%% props-miljÃ¸et kan fjernes, hvis der ikke er brug for det
\begin{props}
  \prop{Hedegaard--hÃ¥r}[Person, der skaffer]
  \prop{Didgeridoo}[Anine]
\end{props}

\begin{sketch}
  \scene{Lys op}
  \says{PH} Hej venner. I den her sketch, der spiller jeg Per
  Hedegaard. Det kan man se ud fra farven pÃ¥ mit hÃ¥r. Men bare rolig,
  jeg er ikke Per Hedegaard i virkeligheden, der er ikke nogen
  regneÃ¸velser, I har glemt at lave.

  Se, hvis jeg tager hÃ¥ret af \act{fjerner parykken}, sÃ¥ er det helt
  tydeligt, at jeg ikke er den rigtige Hedegaard.

  \says{I}[Stormer ind pÃ¥ scenen] \emph{NEEEEEJ}, for helvede. Du mÃ¥
  ikke pille ved den fjerde vÃ¦g. Det er simpelthen sÃ¥ uprofessionelt,
  det der!

  \says{PH} Se, venner, det var meningen, at der skulle have vÃ¦ret en
  anden replik der, men fordi der ikke er sat nogen pÃ¥ den rolle i
  rollelisten, sÃ¥ kunne vi ikke hÃ¸re nogen som helst kritik af min
  performance.

  \does{I} reagerer med Ã¥benmundet vantro.

  \says{PH} Det mÃ¥ ogsÃ¥ vÃ¦re svÃ¦rt at fÃ¸lge skuepil--instruktioner,
  nÃ¥r man ikke eksisterer, kan jeg forestille mig.

  \says{A9} Hej Jophiel.
  \does{PH} tager sin paryk pÃ¥ igen.
  \says{A9} Hej, Per Hedegaard.
  \says{A9} Var det ikke meningen, at det her skulle vÃ¦re en sang?
  \says{PH} Jo, for dÃ¦len. Har du en didgeridoo med?
  \says{A9} Didgeridoo?
  \says{PH} Ja. Der stÃ¥r i rekvisitlisten, at du skaffer en.
  \says{A9} Jamen sÃ¥ mÃ¥ det jo passe.
  \says{PH} Ja, ellers skriver vi "`Person, der skaffer,"' for at
  minde os om at skrive et navn ind.
  \says{A9} NÃ¥, men sÃ¥ mÃ¥ jeg jo hellere begynde at lede. \act{Vender
  sig mod Bandet} Bandet, har I...?
%&lt;*driver&gt;
\end{sketch}
\end{document}
}
\def\exDaPTwo{
  \begin{document}
  \begin{sketch}
%&lt;/driver&gt;
  \scene{Hvert bandmedlem holder sin egen didgeridoo op.}
  \says{A9}[Til PH] Den ser ud til at vÃ¦re i vinkel.
  \says{PH} Sejt.
  \says{PH}[RÃ¥ber til Bandet] Og \emph{tre!} \emph{Fire!}
\end{sketch}
%&lt;*driver&gt;
}
\catcode`\^^M=13%
\def\exDaPThree{%
%&lt;/driver&gt;
\begin{song}%
%&lt;*driver&gt;
  % \restorecr doesn't work, if the cr's have already been tokenized,
  % so we need to do something else
  \let\old@scene=\scene%
  \let\old@cr=^^M%
  \def\scene{\old@scene\def^^M{ \relax}}%
  \let\old@sings\sings%
  \def\sings{\let^^M=\old@cr \old@sings}%
%&lt;/driver&gt;
  \scene{Bandet spiller ``Bohemian Rhapsody" af Queen, udelukkende pÃ¥
    didgeridoo.}
  
  \sings{A9} Ã…h, Per Hede
             Er den lede
             Og han dumped' mig i kvant!

  \sings{PH} Per Hedegaard har er reeksamenssÃ¦t til dig
  \sings{A9} Til mig?
  \sings{PH} Til dig!
  \scene{Episk didgeridoo--solo, mens A9 lÃ¸ser reeksamenssÃ¦t.}
  
  \scene ...
  
  \does{A9} rÃ¦kker hÃ¥nden i vejret, og bandet stopper.
\end{song}%
%&lt;*driver&gt;
}\catcode`\^^M=5
\def\exDaPFour{
%&lt;/driver&gt;
\begin{sketch}
  \says{PH}[Er et stykke tid om at lÃ¦gge mÃ¦rke til A9, men kommer til
  sidst over] Ja, spÃ¸rgsmÃ¥l?
  \says{A9} Det her eksamenssÃ¦t er jo trivielt...?
  \scene{Lys ned}
\end{sketch}

\end{document}
%&lt;/ex-da&gt;
%&lt;*driver&gt;
}
\jump
%&lt;/driver&gt;
%&lt;*ex-en&gt;
\documentclass{ucph-revy}

\usepackage[utf8]{inputenc}
\usepackage[OT1]{fontenc}
\usepackage{hyperref}
%&lt;*driver&gt;
\land
\def\exEnPre{
%&lt;/driver&gt; 
\urlstyle{sf}

\version{1.0}
%% The settings below may be omitted if their inclusion is undesired
\revyname{The Meaning of Liff}
\revyyear{3001}
\title{Example}
\author{an examplesmith}
\status{example}
\eta{$1$ minute, $47$ seconds}
\responsible{Probably you}
\melody{Monty Python: ``Always look on the bright side of life''
  (\url{https://youtu.be/SJUhlRoBL8M})}

\writtenbyname{written by}
\melodyname{Melody:}
\responsibletext{\TeX--responsible}

%&lt;*driver&gt; 
\renewcommand{\pagessum}[1]{##1 page\ifnum##1=1\else s\fi}
}
\iffalse
%&lt;/driver&gt;
\renewcommand{\pagessum}[1]{#1 page\ifnum#1=1\else s\fi}
%&lt;*driver&gt;
\fi
\def\exEnPOne{
%&lt;/driver&gt;

\begin{document}
\maketitle

\rolename{Roles:}
\begin{roles}
  \role{KA}[Graham] Arthur, king of all the Britons
  \role{P}[Michael] Peasant
  \role{RC}[John] Roman Centurion
  \role{R1...?} Several Roman Soldiers
  \role{CC}[Eric] Crucified Criminal
  \role{B}[Graham] Brian
\end{roles}
%% The props environment may be omitted if found to be superfluous
\propname{Props:}
\begin{props}
  \prop{Large sign}
  \prop{Field of crosses}
\end{props}

\begin{sketch}
  \scene Lights up on a muddy field with a castle in the background.

  \says{KA}[As he enters] Hello!

  \says{KA} Now, by rights, you should all be kneeling, given that I
  am Arthur, king of all the Britons. However, it has been brought to
  my attention that the audence seating is not laid out to allow for
  that. We had some considerable trouble during dress rehearsals. So I
  will excuse you from that requirement.

  Now, has anyone seen a particularly fancy cup? Perhaps out
  in the bar? You see, I am on a quest given to me by God, to find the
  holy... \act{Interrupted, as he steps in a hole.} Oh dear...

  \says{P}[Shrieking, as he rears up from the ground] Oi! What do you
  think you're doing!

  \says{P} You broke my sign!

  \says{KA} Sign? What sign?

  \says{P} Well, look.

  \does{P} raises up a sign that reads

  \begin{center}\sc Romanes Eunt Dom[ ]\end{center}

  The last bit of the sign has a foot--shaped hole in it.

  \says{P} You can't read it anymore!

  \says{KA} You certainly can! It says ``Romans go home.''

  \says{RC}[Appears from offstage] No it doesn't.

  \does{P \&amp; KA} are startled.

%&lt;*driver&gt;
\end{sketch}
\end{document}
}
\def\exEnPTwo{
  \begin{sketch}
%&lt;/driver&gt;
  \says{RC}[To KA] Did you write th... wait a minute. \act{Off stage}
  It's him! \act{Back at KA} How did you get here?

  \does{KA} attempts to sidle away.

  \says{RC} Get him!

  \scene Several Roman soldiers appear, and drag \role{KA} off stage,
  while \role{KA} attempts to protest.

  \says{KA}[As he is dragged off] I am not him! I am Arthur, King of
  the Britons!

  \scene The scene changes to a field of crosses, with several
  crucified criminals and B.

  \does{CC} is in the middle of singing to \role{B}.
\end{sketch}
%&lt;*driver&gt;
}
\catcode`\^^M=13%
\def\exEnPThree{%
%&lt;/driver&gt;
\begin{song}%
%&lt;*driver&gt;
  % \restorecr doesn't work, if the cr's have already been tokenized,
  % so we need to do something else
  \let\old@scene=\scene%
  \let\old@cr=^^M%
  \def\scene{\old@scene\def^^M{ \relax}}%
  \let\old@sings\sings%
  \def\sings{\let^^M=\old@cr \old@sings}%
%&lt;/driver&gt;
  \sings{CC} ...be silly chumps,
             Just purse you're lips and whistle,
             That's the thing.

             And, always look on the bright side of life,
             Always look on the right side of life,
             For life is quite absurd,
             An. death's the final word...
\end{song}
%&lt;*driver&gt;
}\catcode`\^^M=5
\def\exEnPFour{
\begin{document}
%&lt;/driver&gt;
\begin{sketch}
  \says{RC}[Shouting as he walks on stage] Right, you lanky reprobate!
  Don't think that the mighty Roman bureaucracy doesn't keep track of
  its inmates

    \scene KA is dragged on stage by two Roman soldiers behind RA.

    \says{RA} Look, we have your designated cross ready for you
    right... \act{points to B'a cross, then falters when he notices
      B.}

    \scene Everyone looks back and forth between B and KA.

    \scene End scene
\end{sketch}  
\end{document}
}
%&lt;/ex-en&gt;
%\fi
%\begin{danish}
%
%\section{Eksempel pÃ¥ registerindeks}\label{registerindeks}
% \end{danish}
% \begin{english}
%   \section{Example of a thumb index page}\label{registerindeks}
% \end{english}
% \iffalse
%&lt;*driver&gt;
\jump
%&lt;/driver&gt;
%&lt;*registerindex&gt;
% \fi
%\begin{verbatim}

\documentclass[a4paper,11pt,thumbindex]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[danish]{babel}
\usepackage{calc}
\usepackage{tikz}

\version{1.0}
\title{Registerindeks}

\begin{document}
\thispagestyle{empty}
\newlength{\torightside}
\setlength{\torightside}{ \paperwidth - 1in - \hoffset %
  - \oddsidemargin + .6cm}
\newlength{\totop}
\setlength{\totop}{ -\headsep - \headheight - \topmargin %
  - \voffset - 1in - .5cm}

\vbox to 0pt{\vskip \totop \hbox to \torightside{\hss%
    \rectothumbindexwithtitles%
  }}
\vbox to 0pt{\tikz \path (0,0) -- (0, -.5\textheight)
  node[rotate=90]{\parbox{\textheight}{\maketitle}}; }
\end{document}
%\end{verbatim}
% \iffalse
%&lt;/registerindex&gt;
%&lt;*driver&gt;
\land
%&lt;/driver&gt;
% \fi
\endinput
% Local Variables:
% mode: doctex
% TeX-master: "ucph-revy-da-doc.ins"
% End:
</pre></body></html>