summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/thalie
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-12-12 03:03:41 +0000
committerNorbert Preining <norbert@preining.info>2022-12-12 03:03:41 +0000
commitd9c472147310b678beb9f80f0e90fc82f8825ec5 (patch)
tree70534e066d5d0d30ac8c0b9939e574a2696e8d83 /macros/latex/contrib/thalie
parent6e749f2b4d0cbb91f8d2c872981d7ebba3a0fb52 (diff)
CTAN sync 202212120303
Diffstat (limited to 'macros/latex/contrib/thalie')
-rw-r--r--macros/latex/contrib/thalie/CHANGELOG.md37
-rw-r--r--macros/latex/contrib/thalie/README.md10
-rw-r--r--macros/latex/contrib/thalie/thalie.dtx2298
-rw-r--r--macros/latex/contrib/thalie/thalie.ins59
-rw-r--r--macros/latex/contrib/thalie/thalie.pdfbin484998 -> 242799 bytes
-rw-r--r--macros/latex/contrib/thalie/thalie.sty693
-rw-r--r--macros/latex/contrib/thalie/thalie.tex1325
7 files changed, 2046 insertions, 2376 deletions
diff --git a/macros/latex/contrib/thalie/CHANGELOG.md b/macros/latex/contrib/thalie/CHANGELOG.md
index f91eca7082..476bba7780 100644
--- a/macros/latex/contrib/thalie/CHANGELOG.md
+++ b/macros/latex/contrib/thalie/CHANGELOG.md
@@ -1,3 +1,12 @@
+* thalie 0.13a (2022-12-11)
+
+ * Documentation overhaul.
+ * [\character] Fix tests of forbidden combination of arguments (some combinations were wrongfully forbidden, some were wrongfully allowed).
+ * Add `defaultcast` option to dramatis personae, and `cast` option to `\character`.
+ * Add a `castgroup` environment.
+
+ -- Louis Paternault <spalax@gresille.org>
+
* thalie 0.12a (2022-10-09)
* The `xspace` option also affects \did.
@@ -46,26 +55,26 @@
* Thalie.sty
- * Commands `\playmark`, `\actmark` and `\scenemark` no longer include label (e.g. "Act 1"). It is up to the user to add it or not.
- * Display default translations, even in language environments using non-latin characters where no latin font is available (closes #24).
- * Do not add a wrong indentation after character name in verse environment (closes #3).
- * Package options can be redefined anywhere in the document (closes #5).
- * Reduce vertical space around character names in style `imprimerie-verse` (closes #6).
- * Replace package [ifthen](http://ctan.org/pkg/ifthen) with package [etoolbox](http://ctan.org/pkg/etoolbox) (closes #29).
- * Style of ramatis personæ can be customized (closes #9 #15 #18 #19).
- * Use [translations](http://ctan.org/pkg/translations) to translate words ("act", "scene", etc.).
+ * Commands `\playmark`, `\actmark` and `\scenemark` no longer include label (e.g. "Act 1"). It is up to the user to add it or not.
+ * Display default translations, even in language environments using non-latin characters where no latin font is available (closes #24).
+ * Do not add a wrong indentation after character name in verse environment (closes #3).
+ * Package options can be redefined anywhere in the document (closes #5).
+ * Reduce vertical space around character names in style `imprimerie-verse` (closes #6).
+ * Replace package [ifthen](http://ctan.org/pkg/ifthen) with package [etoolbox](http://ctan.org/pkg/etoolbox) (closes #29).
+ * Style of dramatis personæ can be customized (closes #9 #15 #18 #19).
+ * Use [translations](http://ctan.org/pkg/translations) to translate words ("act", "scene", etc.).
* Documentation
- * Add sections *Examples* and *Localization*.
- * Add a note about non-latin characters and character style `bold` (closes #26).
- * Fix `\customact` example.
- * Various minor improvements.
+ * Add sections *Examples* and *Localization*.
+ * Add a note about non-latin characters and character style `bold` (closes #26).
+ * Fix `\customact` example.
+ * Various minor improvements.
* README
- * Convert README from text to markdown.
- * Add examples.
+ * Convert README from text to markdown.
+ * Add examples.
-- Louis Paternault <spalax@gresille.org>
diff --git a/macros/latex/contrib/thalie/README.md b/macros/latex/contrib/thalie/README.md
index f6babe79fe..83874b5328 100644
--- a/macros/latex/contrib/thalie/README.md
+++ b/macros/latex/contrib/thalie/README.md
@@ -5,13 +5,13 @@ It defines commands to introduce characters' lines, to render stage direction,
to divide a play into acts and scenes, to automatically build the dramatis
personae, etc.
-- Version 0.12a (2022-10-09)
+- Version 0.13a (2022-12-11)
- Usage and installation instruction are available in the [documentation](http://mirrors.ctan.org/macros/latex/contrib/thalie/thalie.pdf).
- Examples
- - [French play, in verse](https://framagit.org/spalax/thalie/raw/v0.12a/examples/cyrano.pdf) ([source](https://framagit.org/spalax/thalie/raw/v0.12a/examples/cyrano.tex))
- - [French play, in prose](https://framagit.org/spalax/thalie/raw/v0.12a/examples/domjuan.pdf) ([source](https://framagit.org/spalax/thalie/raw/v0.12a/examples/domjuan.tex))
- - [English play, in prose](https://framagit.org/spalax/thalie/raw/v0.12a/examples/hamlet.pdf) ([source](https://framagit.org/spalax/thalie/raw/v0.12a/examples/hamlet.tex))
- - [English play, in verse](https://framagit.org/spalax/thalie/raw/v0.12a/examples/henry.pdf) ([source](https://framagit.org/spalax/thalie/raw/v0.12a/examples/henry.tex))
+ - [French play, in verse](https://spalax.frama.io/thalie/examples/cyrano.pdf) ([source](https://framagit.org/spalax/thalie/-/blob/main/examples/cyrano.tex))
+ - [French play, in prose](https://spalax.frama.io/thalie/examples/domjuan.pdf) ([source](https://framagit.org/spalax/thalie/-/blob/main/examples/domjuan.tex))
+ - [English play, in prose](https://spalax.frama.io/thalie/examples/hamlet.pdf) ([source](https://framagit.org/spalax/thalie/-/blob/main/examples/hamlet.tex))
+ - [English play, in verse](https://spalax.frama.io/thalie/examples/henry.pdf) ([source](https://framagit.org/spalax/thalie/-/blob/main/examples/henry.tex))
License
-------
diff --git a/macros/latex/contrib/thalie/thalie.dtx b/macros/latex/contrib/thalie/thalie.dtx
deleted file mode 100644
index d9ba447489..0000000000
--- a/macros/latex/contrib/thalie/thalie.dtx
+++ /dev/null
@@ -1,2298 +0,0 @@
-% \iffalse meta-comment
-% Copyright 2010-2022 Louis Paternault
-%
-% This work 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.
-%
-% This work has the LPPL maintenance status `maintained'.
-%
-% The Current Maintainer of this work is Louis Paternault
-%
-% This work consists of the files thalie.dtx and thalie.ins
-% and the derived file thalie.sty.
-% \fi
-%
-% \iffalse
-%<*driver>
-\ProvidesFile{thalie.dtx}
-%</driver>
-%
-%<package>\NeedsTeXFormat{LaTeX2e}
-%<package>\ProvidesPackage{thalie}
-%<*package>
- [2022/10/09 v0.12a A package to typeset drama plays]
-%</package>
-%
-%<*driver>
-\documentclass{ltxdoc}
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
-\usepackage{array}
-\usepackage{csquotes}
-\usepackage{enumerate}
-\usepackage{multirow}
-\usepackage{hyperref}
-\usepackage{thalie}
-\usepackage{showexpl}
-\usepackage{listings}
-\usepackage{xcolor}
-\usepackage{manfnt}
-\usepackage[normalem]{ulem}
-\lstset{
- language=[LaTeX]TeX,
- numbers=left,
- numberstyle=\tiny,
- backgroundcolor=\color{yellow!20},
- basicstyle=\small\color{black}\ttfamily,
- keywordstyle=\color{blue!80}\sffamily,
- commentstyle=\color{olive},
- stringstyle=\color{red},
-}
-\usepackage[english]{babel}
-\begin{document}
-\DocInput{thalie.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \CheckSum{0}
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
-% \GetFileInfo{thalie.dtx}
-%
-% \DoNotIndex{\@backslashchar, \@ifnextchar}
-% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ ,\!,\(,\),\,}
-% \DoNotIndex{\addcontentsline, \addto, \ae, \AND, \arabic, \abovedisplayshortskip, \abovedisplayskip, \addtolength}
-% \DoNotIndex{\begin, \bfseries, \boolean, \baselineskip, \belowdisplayskip, \belowdisplayshortskip, \boolfalse, \booltrue}
-% \DoNotIndex{\captionsenglish, \captionsfrench, \center, \centering, \ClassError, \cleardoublepage, \csname, \csundef}
-% \DoNotIndex{\def, \defcharcommand@with, \defcharcommand@without, \dimen, \dimexpr}
-% \DoNotIndex{\emph, \end, \endcsname, \equal, \expandafter, \endlist, \endmath, \endminipage}
-% \DoNotIndex{\framebox, \fi}
-% \DoNotIndex{\gappto, \gdef, \global, \GetTranslation}
-% \DoNotIndex{\hspace}
-% \DoNotIndex{\@ifpackageloaded, \indent, \if@xspace, \ifbool, \ifboolexpr, \ifcsundef, \ifcsdef, \ifdef, \ifdefempty, \ifdefstring, \ifstrempty, \ifstrequal, \ifundef, \ignorespacesafterend, \item}
-% \DoNotIndex{\LARGE, \Large, \left, \leftskip, \leftmargin, \list, \linewidth, \LoadDictionaryFor, \LoadDictionary}
-% \DoNotIndex{\medskip, \MakeUppercase, \markboth, \markright, \MakeLowercase, \math, \minipage}
-% \DoNotIndex{
-% \@actlevel,
-% \@actstyle,
-% \@clearpage,
-% \@cmd,
-% \@definecharactercommand,
-% \@desc,
-% \@displaytitle,
-% \@drama,
-% \@dramatis@clear,
-% \@empty@,
-% \@grouplength,
-% \@groupname,
-% \@interludelevel,
-% \@label,
-% \@maybexspace,
-% \@ne,
-% \@playlevel,
-% \@playstyle,
-% \@scenelevel,
-% \@scenestyle,
-% \@short,
-% \@spaceaftergroup,
-% \@speaks,
-% \@verseadjust,
-% }
-% \DoNotIndex{\newcommand, \newcounter, \newenvironment, \noindent, \noexpand, \NOT, \newif, \newlength, \newline, \nopagebreak, \notbool}
-% \DoNotIndex{\OR}
-% \DoNotIndex{\par, \pgfkeys, \ProcessPgfPackageOptions, \protect, \protected@xappto, \parindent, \parskip, \predisplaysize, \prevgraf, \providebool, \providecommand}
-% \expandafter\DoNotIndex\expandafter{\string\ } ^^A From https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex%2F3540
-% \DoNotIndex{\quad}
-% \DoNotIndex{\refstepcounter, \renewcommand, \RequirePackage, \right, \Roman, \relax, \rightmargin}
-% \DoNotIndex{\section, \setboolean, \setlength, \sffamily, \smallskip}
-% \DoNotIndex{\tabularnewline, \textrm, \textsc, \textwidth, \thispagestyle, \textbf, \the, \tmp}
-% \DoNotIndex{\undef}
-% \DoNotIndex{\vspace, \vskip}
-% \DoNotIndex{\WithSuffix}
-% \DoNotIndex{\xappto, \xspace, \xdef}
-% \DoNotIndex{\z@}
-%
-% \newcommand{\bbackslash}{\symbol{92}}
-% \newcommand{\danger}{\marginpar[\hfill\dbend]{\dbend\hfill}}
-%
-% \title{The \textsf{thalie} package\thanks{
-% This document corresponds to \textsf{thalie}~\fileversion, dated \filedate.
-% Home page, bug requests, etc. at \url{http://framagit.org/spalax/thalie}
-% }\\A package to typeset drama plays}
-% \author{Louis Paternault\\ \texttt{spalax(at)gresille(dot)org}}
-%
-% \maketitle
-%
-% \begin{abstract}
-% This package is meant to typeset drama plays using \LaTeX{}. It provides
-% commands to introduce characters' lines, to render stage direction, to divide
-% a play into acts and scenes, to automatically build the dramatis person\ae{},
-% etc.
-% \end{abstract}
-%
-% \setcounter{tocdepth}{2}
-% \tableofcontents
-%
-% \section{Introduction}
-% This document introduces the \textsf{thalie} package, used to typeset drama
-% plays.
-%
-% \subsection{Other classes and packages}
-% This package is far from being the only one that can be used to render drama
-% plays. If you do not like my work, you can use one of the following ones (and
-% I guess there exists others):
-% |drama| \cite{drama},
-% |dramatist| \cite{dramatist},
-% |play| \cite{play},
-% |screenplay| \cite{screenplay},
-% |sides| \cite{sides}.
-%
-% I began to write this package in 2010, and now, at the end of 2012, I must
-% admit that I wonder why I started this\ldots There are already several such
-% packages in
-% \textsc{ctan}\footnote{\url{http://www.ctan.org/topic/drama-script}}, and the
-% |dramatist| package seems really nice (I borrowed some ideas and copied some
-% code from it). There are actually a few improvements in my package compared
-% to |dramatist|: in my package, plays, acts and scenes appear in the table of
-% contents; it is possible to include several plays in a single document; there
-% are more options when building the dramatis person\ae{}; headers and footers
-% are taken into account, etc. But these improvements are small; it might have
-% been smarter to contribute to |dramatist| instead of starting my own package.
-% The good part is that I have a package that fits my needs, and I learned how
-% to write a \LaTeX{} package.
-%
-% Oh, yes! I know why I started this: I am a geek\ldots
-%
-% \subsection{License}
-% This work 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.
-%
-% Further information can be found in the |.dtx| file used to build this
-% document.
-%
-% In short (but this paragraph has no legal value), you can use this package
-% freely to render your drama plays, and modify it almost freely. Nevertheless,
-% if you like my work, you can invite me to the performance of the play you
-% typeset using my package\footnote{You will not take a big risk, since there
-% is little chance I travel half the world to see a play. But if by chance I
-% can attend it, it would make me really happy.}.
-%
-% \subsection{Acknowledgements}
-% I borrowed ideas and lines of code from the \LaTeX{} packages
-% |drama|\cite{drama} and |dramatist|\cite{dramatist}.
-%
-% I used the following guides to package my package: \emph{How to Package Your
-% \LaTeX{} Package} \cite{dtxtut}, and \emph{\LaTeXe{} for class and package
-% writers} \cite{clsguide}.
-%
-% \subsection{Examples}
-%
-% Most of the examples are taken from Edmond Rostand's \emph{Cyrano de Bergerac}
-% \cite{cyrano} or from William Shakespeare's \emph{A Midsummer Night's Dream}
-% \cite{midsummer}. The snippets of \emph{Cyrano de Bergerac} are from the
-% original (French) version of this play, roughly translated by myself (which
-% means that they must be of poor quality).
-%
-% \subsection{Overview}
-% Installation instruction are given in section \ref{sec:install}.
-% Documentation about how to use this package is given in section
-% \ref{sec:usage}. In particular, section \ref{sec:sectioning} explains how to
-% use acts and scenes, sections \ref{sec:dramatis} and \ref{sec:characters} explains how to define
-% characters, and use these definitions to introduce characters' lines, and
-% section \ref{sec:directions} describes commands used to render stage
-% directions. At last, specific instruction about how to use this package with
-% a language other than English (or a non-latin alphabet) are given in section
-% \ref{sec:i18n}. Examples are given in section \ref{sec:examples}.
-%
-% Implementation is given in section \ref{sec:implementation}.
-%
-% \section{Download and Install}
-% \label{sec:install}
-%
-%
-% \subsection{\textsc{Gnu}/Linux Distribution}
-%
-% If applicable, the easiest way to get |thalie| working is by installing it by your distribution package. With Debian (and Ubuntu, and surely other distributions that inherit from Debian), simply run:
-%
-% \begin{quote}
-% |sudo apt-get install texlive-humanities|
-% \end{quote}
-%
-% \subsection{\LaTeX{} distribution}
-%
-% This package is included both in \TeX{}Live and MiK\TeX{}. It can be installed by their respective package managers.
-%
-% \subsection{Manual installation}
-%
-% \begin{itemize}
-% \item Download the lastest archive :
-% \begin{description}
-% \item[Stable version] \url{http://mirrors.ctan.org/install/macros/latex/contrib/thalie.tds.zip}
-% \item[Development version] \url{https://framagit.org/spalax/thalie/repository/archive.zip?ref=main}
-% \end{description}
-% \item Unzip the archive.
-% \item If you got the archive from CTAN (stable version), move file \texttt{tex/latex/thalie/thalie.sty} in a \LaTeX{} path.
-% \item If you got the development version, |cd| to the main archive directory, and run |latex thalie.ins| to build |thalie.sty|. Move this file into a \LaTeX{} path.
-% \end{itemize}
-%
-% \section{Usage}
-% \label{sec:usage}
-%
-% \subsection{Localization}
-% \changes{v0.09a}{2017/04/22}{Add section \emph{Localization}.}
-%
-% By default, commands \lstinline|\act|, \lstinline|\scene|, etc. use English words, but they are
-% translated to the current language used by |babel| or
-% |polyglossia|\footnote{Given that someone provided the translation. See
-% \ref{sec:languages} for the list of available languages.}. More information
-% is given in section \ref{sec:l10n}.
-%
-% \subsection{Package options}
-% \label{sec:options}
-%
-% Package options are summed up in table \ref{table:packageoptions}.
-%
-% Note that any package option can be redefined anywhere in the document. This
-% makes it possible to have several plays collected in a single document, while
-% applying different styles or options to each play. See section
-% \ref{sec:redefine} for more detail.
-%
-% \begin{table}
-% \centering
-% \begin{tabular}{c|c|c}
-% Name & Available options & Default \tabularnewline
-% \hline
-% \hline
-% |characterstyle| & |bold| |margin| |center| |simple| |arden| & |simple| \tabularnewline
-% & |imprimerie-verse| |imprimerie-prose| & \tabularnewline
-% \hline
-% |playstyle| & \multirow{3}{*}{|center| |bigcenter| |box| |custom|} & |box| \tabularnewline
-% |actstyle| & & |bigcenter| \tabularnewline
-% |scenestyle| & & |center| \tabularnewline
-% \hline
-% |playlevel| & \multirow{3}{*}{|part| |chapter| |section| \ldots |subparagraph|} & |chapter| \tabularnewline
-% |actlevel| & & |section| \tabularnewline
-% |scenelevel| & & |subsection| \tabularnewline
-% \hline
-% |interludelevel| & |play| |act| |scene| & |act| \tabularnewline
-% \hline
-% |xspace| & |true| |false| & |true|\tabularnewline
-% \end{tabular}
-% \caption{Package options summary}
-% \label{table:packageoptions}
-% \end{table}
-%
-% \subsubsection{Space following character commands and stage directions}
-% \label{option:xspace}
-% \changes{v0.07}{2015/12/28}{New package option \texttt{xspace}.}
-% As commands introducing characters' lines and displaying characters' names
-% may be frequently used, it might be tempting to omit the following \lstinline|{}| For
-% instance, one might prefer to write:
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\cyrano Indeed, \cyranoname is my name!
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-% instead of:
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\cyrano{} Indeed, \cyranoname{} is my name!
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% If package option |xspace| is set (e.g. |xspace=true|), space is automatically
-% added after those commands if necessary\footnote{This is done with
-% the |$\backslash$xspace| command (from the |xspace| package), hence the name.};
-% otherwise, it is not. The same rule applies after a |\did| command.
-%
-% For historical reasons, the option |xspace| default is |true|, but this might
-% change in some later non-backward compatible version.
-%
-% \subsubsection{Style}
-% The way characters' lines are displayed, as well as play, act and scene
-% titles, can be set when loading the options.
-% To set character style, use option |characterstyle=|\meta{style}. Available
-% styles, and indication to use a custom one, are described in section
-% \ref{sec:lines}.
-%
-% Several play, act and scene title styles are defined. Choose it using options
-% |playstyle|=\meta{style}, |actstyle|=\meta{style} and
-% |scenestyle|=\meta{style}. Description of available styles, and how to define
-% your own one, are described in section \ref{sec:sectionstyles}.
-%
-% \subsubsection{Sectioning levels}
-% If you use a table of contents, or if you also use ``usual'' sectioning
-% commands (\lstinline|\chapter|, \lstinline|\section| and so on), the relative importance of
-% plays, acts and scenes is important. You can set this using options
-% |playlevel=|\meta{level}, |actlevel=|\meta{level} and
-% |scenelevel=|\meta{level}. The argument is the name of the corresponding
-% sectioning level, i.e. one of |part|, |chapter|, |section|, |subsection|,
-% |subsubsection|, |paragraph| and |subparagraph|.
-%
-% Setting the interlude level is slightly different. While setting it using
-% |interludelevel=|\meta{level}, instead of choosing one of \LaTeX{} vanilla
-% sectioning levels as the level, you may choose |play|, |act| or |scene|. It
-% defines if an interlude is at the same level as a play, an act or a scene.
-%
-% \subsubsection{Redefining options}
-% \label{sec:redefine}
-% \DescribeMacro{\setthalieoptions}
-%
-% Packages options can be reset in the document body using command
-% \lstinline|\setthalieoptions|\marg{package options}. Its only argument has the same
-% syntax as the package options.
-%
-% For instance, if you are writing a collections of plays, some in prose, some in verses, you might want to write something like the following.
-%
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\documentclass{book}
-...
-\usepackage{thalie}
-...
-\begin{document}
-...
-\play{First play}
-\setthalieoptions{characterstyle=imprimerie-verse}
-...
-\play{Second play}
-\setthalieoptions{characterstyle=impriemie-prose}
-...
-\end{document}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% \subsection{Sectioning}
-% \label{sec:sectioning}
-% Here begin the parts explicitly relating to drama.
-% \subsubsection{Levels}
-% \DescribeMacro{\play}
-% \DescribeMacro{\play*}
-% \DescribeMacro{\act}
-% \DescribeMacro{\act*}
-% \DescribeMacro{\scene}
-% \DescribeMacro{\scene*}
-% To introduce a new play, act or scene, use commands \lstinline|\play|, \lstinline|\act| and
-% \lstinline|\scene|. Their behaviour is as close as the ``usual'' sectioning commands
-% (\lstinline|\chapter|, \lstinline|\section| and so on) as possible, i.e.:
-% \begin{itemize}
-% \item Their signature is \lstinline|\play|\oarg{short title}\marg{longtitle} (the
-% optional short title is the one used in the table of content, and in headers
-% and footers).
-% \item A starred version (\lstinline|\play*|, \lstinline|\act*| and \lstinline|\scene*|) is provided, which
-% inserts a play (or act, or scene) which is not numbered, and does not insert
-% any line in the table of content.
-% \item Headers and footers are changed (more information in section \ref{sec:header}).
-% \end{itemize}
-%
-% Both commands \lstinline|\act| and \lstinline|\scene| (and their starred versions) are designed to
-% deal with empty titles. Indeed, it is common not to give any name to acts and
-% scenes.
-%
-% By default, a play is as deep (regarding to the table of contents) as a
-% chapter, an act as a section, and a scene as a subsection. But this can be
-% set using package options |playlevel|, |actlevel| and |scenelevel| (see
-% packages options, page \pageref{sec:options}). That way, you can use in your
-% document plays, acts and scenes as well as chapters, sections and so on. It
-% can be useful if you want a foreword, and appendix, etc.
-%
-% It is not compulsory to use all three commands \lstinline|\play|, \lstinline|\act| and \lstinline|\scene|.
-% The rule of thumb is: if only one element exists, skip the corresponding
-% command: if your document has a single play, you should ignore \lstinline|\play|; if
-% your document has several single act plays, set
-% |playlevel=section,scenelevel=subsection| and ignore \lstinline|\act|; etc.
-%
-% \DescribeMacro{\interlude}
-% \DescribeMacro{\interlude*}
-% You may want to use interludes, which are acts or scenes which are not
-% numbered, but which should appear in the table of content. Command
-% \lstinline|\interlude|\oarg{short title}\marg{long title} has this purpose.
-%
-% You may choose the sectioning level an interlude is equivalent to in the
-% package options. If your interludes are acts, use |interludelevel=act|; if
-% they are scenes, use |interludelevel=scene|.
-%
-% \DescribeMacro{\curtain}
-% At last, to mark the end of an act or of the play, you can use command
-% \lstinline|\curtain|, which prints the word \lstinline|\GetTranslation{Curtain}| in the middle of its
-% own line.
-%
-% \subsubsection{Title styles}
-% \label{sec:sectionstyles}
-% Several styles are available to render play, act and scene titles. Choose
-% them using package options |playstyle|, |actstyle| and |scenestyle|. Default
-% is |playstyle=box|, |actstyle=bigcenter|, |scenestyle=center|.
-%
-% \paragraph{Custom titles}
-% Unfortunately, as play, act and scene titles are not considered (by \LaTeX{})
-% as usual sections, package
-% |titlesec|\footnote{\url{http://www.ctan.org/pkg/titlesec}} cannot be used to
-% use alternative section titles. Here is the way to set your own one.
-%
-% \begin{figure}[p]
-% \centering
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\newcommand\customact[2]{
- \begin{center}
- \textsc{\GetTranslation{Act} #1}
-
- #2
- \end{center}
-}
-\WithSuffix\newcommand\customact*[1]{
- \begin{center}
- #1
- \end{center}
-}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-% \caption{Example of custom act definition}
-% \label{fig:custom}
-% \end{figure}
-%
-% \DescribeMacro{\customplay}
-% \DescribeMacro{\customact}
-% \DescribeMacro{\customscene}
-% When loading the package, use |custom| as the style of the title you want to
-% customize (e.g. |actstyle=custom|). Then, commands
-% \lstinline|\customact|\marg{counter}\marg{title} and \lstinline|\customact*|\marg{title} will be
-% called by this package to render titles. You \emph{must} define them. Figure
-% \ref{fig:custom} gives the example of the definition of the |center| style.
-%
-% The first argument of \lstinline|\customact| is the label of the act being printed
-% (that is, \lstinline|\theact| for an act, \lstinline|\theplay| for a play, etc.), its second
-% argument is its title. Command \lstinline|\customact*| only has one argument, which is
-% the act title.
-%
-% \subsubsection{Labels and counters}
-%
-% \DescribeMacro{\theplay}
-% \DescribeMacro{\theact}
-% \DescribeMacro{\thescene}
-% Using the same tools as \lstinline|\chapter|, \lstinline|\section| and so on, it is possible to
-% define the way counters of plays, acts and scenes are displayed. You can do
-% this by redefining \lstinline|\theplay|, \lstinline|\theact| and \lstinline|\thescene|. For example, to
-% have acts numbered using letters, use \lstinline|\renewcommand{\theact}{\Alph{act}}|.
-%
-% \subsubsection{Headers and footers}
-% \label{sec:header}
-%
-% \DescribeMacro{\playmark}
-% \DescribeMacro{\actmark}
-% \DescribeMacro{\scenemark}
-% Once again, similar tools as those used by \lstinline|\section| are provided to deal
-% with headers and footers. When introducing, a new play, act or % scene,
-% respectively, commands \lstinline|\playmark|\marg{label}, \lstinline|\actmark|\marg{label} and
-% \lstinline|\scenemark|\marg{label} are called, so that titles can be used in headers
-% and footers. If the default behaviour does not suit you (which should be the
-% case if you did not choose the default option for |playlevel|, |actlevel| or
-% |scenelevel|), you can redefine them.
-%
-% Examples are given in section \ref{sec:examples:headers}.
-%
-% \subsection{Dramatis person\ae}
-% \label{sec:dramatis}
-% This part explains how to build and display the dramatis person\ae{}.
-%
-% Definition of characters is done in document body.
-% As it is possible to have several plays in a single documents (for a
-% collection of plays or sketches), it is possible to define several
-% dramatis person\ae{}. A new one disables the character commands
-% defined by the previous one.
-%
-% \DescribeEnv{dramatis}
-% Definition of characters is done inside the |dramatis| environment. If the
-% |hidden| option is given, the dramatis person\ae{} is not printed (its
-% only purpose is then to define the character commands).
-%
-% \begin{quote}
-% \lstinline|\begin{dramatis}|\oarg{hidden}
-% \end{quote}
-%
-% Then, several commands are available to define characters, and organize
-% character definitions.
-%
-% \DescribeMacro{\characterspace}
-% Command \lstinline|\characterspace| put some vertical space into the dramatis
-% person\ae{}.
-%
-% \subsubsection{Character definition}
-% \paragraph{Basic definition}
-% \label{paragraph:basiccharacter}
-%
-% \begin{figure}[p]
-% \centering
-% \iffalse
-%<*example>
-% \fi
-% \begin{LTXexample}[pos=b]
-\begin{dramatis}
- \character[cmd={cyrano}, drama={Cyrano de Bergerac}]{Cyrano}
- \character[cmd={lebret}]{Le Bret}
- \character[cmd={bellerose}]{Bellerose}
-\end{dramatis}
-
-\bigskip
-
-\lebret[to \cyranoname, holding his arm]
-Let's talk !
-
-\cyrano
-Wait for the crowd to leave. \did{To \bellerosename} Can I stay?
-% \end{LTXexample}
-% \iffalse
-%</example>
-% \fi
-% \caption{Example of character definition}
-% \label{fig:character_example}
-% \end{figure}
-%
-% \DescribeMacro{\character}
-% To define a character, use command \lstinline|\character|.
-% \begin{quote}%
-% \lstinline|\character|\oarg{\emph{cmd=}command,\emph{drama=}dramatis,\emph{desc=}description}\marg{name}%
-% \end{quote}
-% The mandatory argument is the name of the character, as it will appear in each of this character's line. It is later possible to redefine it using command \lstinline|\setcharactername| (see part \ref{setcharactername}). Optional arguments are:
-% \begin{description}
-% \item[desc] is a description of your character, appearing in the dramatis person\ae{};
-% \item[cmd] is the name of the command that will be used to introduce this character's lines in the remaining part of your document;
-% \item[drama] is the name of your character, as it will appear in the dramatis person\ae{}. The name of the character (mandatory argument) is used as a default value.
-% \end{description}
-%
-% If \emph{cmd} is defined, this command creates two new commands: |\|\meta{cmd}
-% and |\|\meta{cmd}|name|. The
-% first one is used to introduce a character's line. The second one prints the
-% character's name. An error is raised if a command with any of these two names
-% already exists.
-%
-% An example of the use of this command is given in figure
-% \ref{fig:character_example}.
-%
-% \paragraph{Special character definition}
-%
-% Although optional arguments are not mandatory, not defining them, or leaving the mandatory argument blank, have special meaning. The combination are summed up in table \ref{table:character}.
-%
-% \begin{table}
-% \centering
-% \begin{tabular}{cc||c|c|c|c|}
-% \multicolumn{2}{c||}{} & \multicolumn{2}{c|}{empty \meta{name}} & \multicolumn{2}{c|}{\meta{name}} \\
-% \multicolumn{2}{c||}{} & no \meta{cmd} & \meta{cmd} & no \meta{cmd} & \meta{cmd} \\
-% \hline
-% \hline
-% \multirow{4}{*}{no \meta{drama}} & \multirow{2}{*}{no \meta{desc}} & & & silent\textsuperscript{\ref{character:silent}} & default\textsuperscript{\ref{character:default}} \\
-% & & & & & hidden\textsuperscript{\ref{character:hidden}}\\
-% \cline{2-6}
-% & \multirow{2}{*}{ \meta{desc}} & description & & silent\textsuperscript{\ref{character:silent}} & default\textsuperscript{\ref{character:default}} \\
-% & & only\textsuperscript{\ref{character:description}} & & & \\
-% \hline
-% \multirow{2}{*}{ \meta{drama}} & no \meta{desc} & silent\textsuperscript{\ref{character:silent}} & & & default\textsuperscript{\ref{character:default}} \\
-% \cline{2-6}
-% & \meta{desc} & silent\textsuperscript{\ref{character:silent}} & & & default\textsuperscript{\ref{character:default}} \\
-% \hline
-% \end{tabular}
-%
-% An empty cell means that the corresponding combination is forbidden. The superscript number refers to the list of special character definitions (page \pageref{specialcharaclist}).
-% \caption{(Not) defining arguments in character definition}
-% \label{table:character}
-% \end{table}
-%
-% \label{specialcharaclist}
-% \begin{enumerate}[(i)]
-% \item \label{character:default} \textbf{Default definition (\meta{name} and \meta{cmd} are given; \meta{desc} and \meta{drama} may be omitted):} The character is defined as described in \ref{paragraph:basiccharacter}. If \meta{description} is omitted, no description appear in the dramatis person\ae{}; if no \meta{drama} is given, character in the dramatis person\ae{} has the same name as it will have in the document.
-% Example:
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\character[
- drama={A ghost},
- desc={the king's ghost},
- cmd={ghost},
- ]{The ghost}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-% \item \label{character:description} \textbf{Description only (everything omitted but \meta{desc}):} A description is inserted in the dramatis person\ae{}. Useful to add characters such as \emph{The kings' armies}.
-% Example:
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\character[desc={The kings' armies}]{}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-% \item \label{character:hidden} \textbf{Hidden character (\meta{drama} is empty (defined, but empty), \meta{cmd} and \meta{name} are defined, \meta{desc} is omitted)} Definition of a character that does not appear in the dramatis person\ae{}.
-% Example:
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\character[drama={}, cmd={postman}]{The postman}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-% \item \label{character:silent} \textbf{Silent character (one of \meta{name} or \meta{drama} is defined; \meta{desc} may be omitted; \meta{cmd} is omitted):} The character only appear in the dramatis person\ae{}. It will not be used elsewhere in the document. An optional description may also appear in the dramatis person\ae{}.
-% Example:
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\character{A priest}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-% \end{enumerate}
-%
-% \paragraph{Group of characters}
-% \DescribeEnv{charactergroup}
-% It is possible to group several characters' definition if they have the same
-% description. This is done with environment
-% |charactergroup|\oarg{width}\marg{description}. The optional argument sets
-% the group width (on the left of the brace).
-% See an example on figure \ref{fig:charactergroup}.
-%
-% \begin{figure}[p]
-% \centering
-% \iffalse
-%<*example>
-% \fi
-% \begin{LTXexample}[pos=b]
-\begin{dramatis}
-\begin{charactergroup}[2.5cm]{Officers}
- \character[desc={a soldier}]{Marcellus}
- \character[desc={a soldier}]{Bernardo}
-\end{charactergroup}
-\end{dramatis}
-% \end{LTXexample}
-% \iffalse
-%</example>
-% \fi
-% \caption[Defining a group of characters]{Defining a group of characters}
-% \label{fig:charactergroup}
-% \end{figure}
-%
-% The effect of this code will be, in the dramatis person\ae{}, to have a
-% nice brace mapping the three characters to their common description.
-%
-% The behaviour of nested |charactergroup| environments is
-% undefined\footnote{It might work; it might not. It might work now, but stop
-% working in the future; it might not work now, but work by accident in the
-% future. Etc.}.
-%
-% \subsubsection{Customize style of dramatis person\ae}
-% \DescribeEnv{dramatisenv}
-% \DescribeMacro{\dramatischaracter}
-% \DescribeMacro{\dramatischaractername}
-% \DescribeMacro{\dramatischaracterdescription}
-%
-% A default style is used to display the dramatis person\ae, but is it made to
-% be customized.
-% The following commands can be redefined to make dramatis person\ae look
-% different. They do nothing apart from displaying text (no internal
-% definition, etc.).
-%
-% \begin{itemize}
-% \item |dramatisenv|: This environment wraps the dramatis person\ae.
-% \item \lstinline|\dramatischaracter|\marg{name}\marg{description} Renders the character name and description. It should take care of cases where name or descsription (but not both) is missing.
-% \item \lstinline|\dramatischaractername|\marg{name} Renders the character name.
-% \item \lstinline|\dramatischaracterdescription|\marg{description} Renders the character description.
-% \item Environment |charactergroup|\oarg{width}\marg{description} Renders a group of characters.
-% \item \lstinline|\characterspace| Adds a vertical character space.
-% \end{itemize}
-
-% Figure \ref{fig:dramatisconversion} illustrates how those commands are used.
-%
-% \begin{figure}[p]
-% \iffalse
-%<*example>
-% \fi
-\begin{lstlisting}
-\begin{dramatis}
- \character{The queen}
- \character[desc={the queen's husband.}]{The king}
- \begin{charactergroup}{Lords and ladies}
- \character{Lord Foo}
- \character[desc={Lord Foo's sister.}]{Lady Bar}
- \character[desc={Lord and Lady Baz.}]{}
- \end{charactergroup}
- \characterspace
- \character[desc={Several servants}]{}
-\end{dramatis}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% To display the dramatis person\ae{} above, the commands below are called.
-%
-% \iffalse
-%<*example>
-% \fi
-\begin{lstlisting}
-\begin{dramatisenv}
- \dramatischaracter{The queen}{}
- \dramatischaracter{The king}{the queen's husband.}
- \begin{charactergroup}{Lords and ladies}
- \dramatischaracter{Lord Foo}{}
- \dramatischaracter{Lady Bar}{Lord Foo's sister.}
- \dramatischaracter{}{Lord and Lady Baz.}
- \end{charactergroup}
- \characterspace
- \dramatischaracter{}{Several servants}
-\end{dramatisenv}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% And command \lstinline|\dramatischaracter|\marg{Name}\marg{Description} is defined as something like the following code (excepted that parts taking care of cases where there is no character name or description is omitted here).
-% \iffalse
-%<*example>
-% \fi
-\begin{lstlisting}
-\newcommand{\dramatischaracter}[2]{ %
- \dramatischaractername{#1}, \dramatischaracterdescription{#2}\\
-}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-% \caption{Commands used to display the dramatis person\ae.}
-% \label{fig:dramatisconversion}
-% \end{figure}
-%
-% For example, to render character names in small caps, one would define :
-%
-% \iffalse
-%<*example>
-% \fi
-\begin{lstlisting}[numbers=none]
-\renewcommand{\dramatischaractername}[1]{\textsc{#1}}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% Or to make dramatis
-% person\ae{} include a title, one can define :
-% \iffalse
-%<*example>
-% \fi
-\begin{lstlisting}[numbers=none]
-\renewenvironment{dramatisenv}{%
- \list{}{\rightmargin1cm\leftmargin2cm}\item[]
- \act*{Dramatis person\ae}%
-}{%
- \endlist%
-}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% \subsection{Characters}
-% \label{sec:characters}
-% This part explains how to define characters, and introduce character's lines.
-%
-% It has been explained that definition of a character in the dramatis
-% person\ae{} (previous subsection) also creates commands used to introduce
-% lines of characters. For instance, defining a character using
-% \lstinline|\character[cmd=cyrano]{Cyrano}| means than Cyrano's lines can now be
-% introduced using the following code.
-% \iffalse
-%<*example>
-% \fi
-\begin{lstlisting}
-\cyrano
-No! It's a bit short, young man\ldots
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-% This would display the name \emph{Cyrano} using the current character style, then
-% his line.
-%
-% \subsubsection{Custom characters}
-%
-% \paragraph{Disposable character}
-% \DescribeMacro{\disposablecharacter}
-% One can need to define characters that are used only once (or a few times).
-% Command \lstinline|\disposablecharacter| is here to help.
-% \begin{quote}\lstinline|\disposablecharacter|\oarg{directions}\marg{name}\end{quote}
-% This command, used in the body, introduces a line for character |name|, with optional stage
-% directions. It is rendered the same way regular characters are rendered, but
-% nothing is added to the dramatis person\ae{}. It is used in figure
-% \ref{fig:setcharactername_example}.
-%
-% This command is also useful to introduce lines of characters in non standard
-% ways, for instance if several characters speak at once. See examples in
-% section \ref{sec:examples:characterslines}.
-%
-% \subsubsection{Changing character's name}
-% \label{setcharactername}
-% \DescribeMacro{\setcharactername}
-%
-% \begin{figure}[p]
-% On the first scenes of Cyrano de Bergerac, the main character (Cyrano) is
-% somewhere in a crowd, and only appears as \emph{a voice}. He appears as
-% Cyrano in the following verses.
-%
-% \centering
-% \iffalse
-%<*example>
-% \fi
-% \begin{LTXexample}[pos=b]
-\begin{dramatis}[hidden]
- \character[desc={Cyrano de Bergerac}, cmd=cyrano]{The voice}
- \character[cmd=montfleury]{Montfleury}
-\end{dramatis}
-
-\cyrano Leave!
-
-\disposablecharacter{The crowd} Oh!
-
-\montfleury[losing his voice] ``Happy he who far away from court\ldots''
-
-\setcharactername{cyrano}{Cyrano}
-
-\cyrano[emerging from the crowd, standing up on a chair {[}\ldots{]} with
- a terrible nose] Ah! I am getting angry!\ldots
-% \end{LTXexample}
-% \iffalse
-%</example>
-% \fi
-% \caption{Example of changing the name of a character}
-% \label{fig:setcharactername_example}
-% \end{figure}
-%
-% It is possible to change the name that appears to introduce character's lines
-% within the text. This can be used, for example, when a character is first
-% refered to as \emph{A voice}, until we learn his real identity, which is
-% \emph{Cyrano}. An example is given in figure
-% \ref{fig:setcharactername_example}.
-% \begin{quote}\lstinline|\setcharactername|\marg{command}\marg{name}\end{quote}
-%
-% This command takes two mandatory arguments. The first one, |command|, is the
-% command used to introduce this character's line. The second one is the name
-% to display for this character.
-%
-% \subsubsection{Lines}
-% \label{sec:lines}
-% To introduce characters' lines, use the commands defined in the character
-% definition (see the \lstinline|\character| command, or the example in figure
-% \ref{fig:character_example}).
-%
-% \paragraph{Choose style}
-% \changes{v0.06}{2014/06/25}{New character styles \texttt{imprimerie-verse}, \texttt{imprimerie-prose} and \texttt{arden}.}
-% Several styles are available, to typeset character's name and lines in
-% different ways. Change the style by loading package using option
-% |characterstyle=|\marg{style} (available styles are |bold|, |center|,
-% |margin|, |simple|, |imprimerie-verse|, |imprimerie-prose|). A few notes:
-% \begin{itemize}
-% \item Default style is |simple|.
-% \item |imprimerie-verse| and |imprimerie-prose| styles are French
-% \emph{de facto} standards for typesetting drama plays, respectively in verse
-% and in prose, as defined by the \emph{Imprimerie nationale}
-% \cite{imprimerienationale}.
-% \item |arden| tries to mimick typesetting of the Arden Shakespeare series.
-% \item |bold| needs a sans serif font to be defined (it should be done by
-% default with latin alphabets, but must be done by hand with languages using
-% non latin characters (greek, hindi, etc.)).
-% \end{itemize}
-%
-% \paragraph{Customize style}
-% \DescribeMacro{\speakswithoutdirection}
-% \DescribeMacro{\speakswithdirection}
-% If available styles does not fit your need, you can also define your own one.
-% To do so, you can redefine the following commands.
-% \begin{quote}
-% \lstinline|\speakswithoutdirection|\marg{name}\\
-% \lstinline|\speakswithdirection|\marg{name}\marg{direction}
-% \end{quote}
-% The first one (\lstinline|\speakswithoutdirection|) is invoked to display a character's name
-% to introduce its line. It takes one argument, which is the character's line.
-% The second one (\lstinline|\speakswithdirection|) is also invoked to display a character's
-% name to introduce its line, but it takes a second argument, which is stage
-% directions to be printed together with character's name.
-%
-% See also section \ref{sec:directions} to see other ways to print stage
-% directions.
-%
-% \subsection{Stage directions}
-% \label{sec:directions}
-% Let us begin with a warning: since we could not figure out a nice command
-% name made from ``stage directions'', we used the French word
-% \emph{(didascalie)} to build up command names.
-%
-% \DescribeMacro{\did}
-% \DescribeEnv{dida}
-% We define two ways to render stage directions: a short one, that is printed
-% inline, and a long one, printed in its own paragraph\footnote{For people writing math:
-% They act a bit like \lstinline|$1+1=2$| and \texttt{\bbackslash[1+1=2\bbackslash]} for formulas.}.
-% The first way is the command \lstinline|\did|\marg{directions}. The second way is the
-% environment |dida|.
-%
-% Note that option \lstinline|xspace| may be used to automatically add a space,
-% if necessary, after a \lstinline|\did| command (see section \ref{option:xspace}, page \pageref{option:xspace}).
-%
-% \DescribeMacro{\onstage}
-% Some stage directions are displayed centered under the scene or act
-% definition (I often see it in classical drama, where the list of characters
-% appearing in each scene is displayed that way). Command
-% \lstinline|\onstage|\marg{directions} can be used to display such information.
-%
-% \DescribeMacro{\pause}
-% As we often need to mark pauses in theater, we created the command \lstinline|\pause|,
-% which is a shortcut for \lstinline|\did{\GetTranslation{Pause}}|.
-%
-% \subsection{Splitting verses}
-%
-% When writing verses, it is sometimes useful to split a verse between two
-% characters: the first character starts it in its line, and the second one
-% finishes it in a second line. Visually, the start of the second line is
-% vertically aligned to the end of the first line.
-%
-% \begin{figure}[p]
-% \centering
-% \iffalse
-%<*example>
-% \fi
-% \begin{dramatis}[hidden]
-% \character[cmd={hermia}]{Hermia}
-% \character[cmd={theseus}]{Theseus}
-% \end{dramatis}
-% \setthalieoptions{characterstyle=imprimerie-verse}
-% \begin{LTXexample}[pos=b]
-\hermia
-So is Lysander.\pauseverse
-
-\theseus
-\resumeverse In himself he is.
-% \end{LTXexample}
-% \setthalieoptions{characterstyle=simple}
-% \iffalse
-%</example>
-% \fi
-% \caption{Example of commands to split verse}
-% \label{fig:splitverse}
-% \end{figure}
-%
-% \begin{figure}[p]
-% \centering
-% \iffalse
-%<*example>
-% \fi
-% \begin{dramatis}[hidden]
-% \character[cmd={hermia}]{Hermia}
-% \character[cmd={theseus}]{Theseus}
-% \end{dramatis}
-% \begin{LTXexample}[pos=b]
-\adjustverse{-7em}
-
-\hermia
-So is Lysander.\pauseverse
-
-\theseus
-\resumeverse In himself he is.
-% \end{LTXexample}
-% \iffalse
-%</example>
-% \fi
-% \caption{Example of commands to adjust splitted verse}
-% \label{fig:splitverse-adjusted}
-% \end{figure}
-%
-% \begin{figure}[p]
-% \centering
-% \iffalse
-%<*example>
-% \fi
-% \begin{dramatis}[hidden]
-% \character[cmd={hermia}]{Hermia}
-% \character[cmd={theseus}]{Theseus}
-% \end{dramatis}
-% \begin{LTXexample}[pos=b]
-\hermia
-So is Lysander.
-
-\theseus
-\phantom{So is Lysander.} In himself he is.
-% \end{LTXexample}
-% \iffalse
-%</example>
-% \fi
-% \caption{Example of commands to split verse (using the \texttt{\bbackslash{}phantom} command)}
-% \label{fig:splitverse-phantom}
-% \end{figure}
-%
-% \danger
-% Warning: this is still experimental. I present several recipes to achieve this, but they all have their pros and cons.
-%
-% \DescribeMacro{\pauseverse}
-% \DescribeMacro{\resumeverse}
-% The recipes presented below all implement macros \lstinline|\pauseverse| and \lstinline|\resumeverse|.
-% Command \lstinline|\pauseverse| is used at the end of the verse to be continued, while command \lstinline|\resumeverse| is used at the beginning of the continuing verse. See figure \ref{fig:splitverse} (page \pageref{fig:splitverse}) for an example.
-%
-% When writing a play in verse, one can use a lot of those commands, which can
-% be tedious because of their long names. So, defining ``shortcuts'' of those
-% commands can be handy, as in the following example.
-%
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\newcommand{\pv}{\pauseverse}
-\newcommand{\rv}{\resumeverse}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% This is not done by default, because short command names are a scarce ressource
-% in \LaTeX, so, defining these commands by default might conflict with other
-% packages, while most of |thalie| users will not use them.
-%
-% \subsubsection{Which recipe should I use?}
-%
-% As I have already stated, there are several ways to achieve this, but none of them is perfect.
-%
-% \begin{itemize}
-% \item Do try the first recipe (section \ref{split-latex}). If it works, stick to it. Otherwise…
-% \item If you do not mind loading the \texttt{TikZ} package, use it (section \ref{split-tikz}). As far as I know, from a user point of view, it is the easiest recipe to use, with the less bugs. Otherwise…
-% \item You can try building you own commands (section \ref{split-hanging}). Otherwise…
-% \item The last recipe (section \ref{split-phantom}) always works. It is far less user-friendly, but it does the job.
-% \end{itemize}
-%
-% \subsubsection{Recipe 1 : Pure \LaTeX}
-% \label{split-latex}
-
-% \danger
-% Warning: I do not understand the code behind this feature. I copied-pasted code by David Carlisle\footnote{Originally written as an answer to a StackExchange question: see \url{https://tex.stackexchange.com/a/107727}.} without understanding it. There are \sout{probably} bugs\footnote{One on them lead to the next recipe.}, but I won't be able to solve them.
-%
-% The implemented macros \lstinline|\pauseverse| and \lstinline|\resumeverse| are written in pure \LaTeX (without any external package). For backward compatibility reasons, this will remain the default implementation for some time…
-%
-% \DescribeMacro{\adjustverse}
-% If the character names are displayed on the same line as the verse, the lines
-% are not aligned the way one would expect them to. To correct this, command
-% \lstinline|\adjustverse|\marg{length} can be used to add an extra (possibly negative)
-% space when calling \lstinline|\resumeverse|, to get a correct alignment.
-% See figure \ref{fig:splitverse-adjusted}, page \pageref{fig:splitverse-adjusted}, for an
-% example of those three commands.
-%
-% The young inexperienced fool\footnote{Me…} who originally wrote those commands had not noticed that \lstinline|\adjustverse| is needed because \lstinline|\resumeverse| does not take into account the length of the character names, in styles where it appears on the same line as the verse. This (probably) won't be fixed, because some people might be using this, and fixing this might break their document.
-%
-% If you encounter the same issue, you might prefer one of the other recipes.
-%
-% \subsubsection{Recipe 2 : With package \texttt{hanging}}
-% \label{split-hanging}
-%
-% \danger
-% Warning: This is a do-it-yourself recipe.
-%
-% The bug announced at the end of the previous recipe, has been spotted and partially corrected by egreg on StackExchange\footnote{\url{https://tex.stackexchange.com/a/545326}}. He proposes the following code to fix this.
-%
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\usepackage{hanging}
-
-\newlength{\brokenverse}
-\renewcommand*{\speakswithoutdirection}[1]{%
- \settowidth{\brokenverse}{\textsc{#1}.}%
- \hangpara{2\parindent}{1}\noindent\textsc{#1}.%
-}
-\makeatletter
-\renewcommand{\resumeverse}{%
- \hspace{\@verseadjust}\hspace{\dimexpr\dimen\@ne-\brokenverse-2em}
-}
-\makeatother
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% This code ignores the choosen style (it actually redesigns it), and it only works with lines without character directions. If needed, you should also define a \lstinline|\speakswithdirection| command to implement the same feature.
-%
-% \subsubsection{Recipe 3 : With package \texttt{TikZ}}
-% \label{split-tikz}
-%
-% % As far as I know, this recipe is the best one, from a user point of view. But it loads the \texttt{TikZ} package, which is a huge package to implement such a tiny feature\footnote{In French, we would say : \enquote{\foreignlanguage{french}{Un marteau-pilon pour écraser une mouche}} (a far too heavy solution for a tiny problem).}.
-%
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\usepackage{tikz}
-\usetikzlibrary{tikzmark}
-\usetikzlibrary{math}
-\newcounter{thalieverse}
-\tikzset{tikzmark suffix=-\thethalieverse}%
-\renewcommand{\pauseverse}{%
- \stepcounter{thalieverse}
- \tikzmark{thaliepauseverse}
-}
-\renewcommand{\resumeverse}{%
- \tikzmark{thalieresumeverse}%
- \iftikzmark{thaliepauseverse}{%
- \begin{tikzpicture}[remember picture]%
- % Uncomment to see "pause" and "resume" tikz marks.
- %\draw[overlay,green, ultra thick] (pic cs:thaliepauseverse) -- (pic cs:thalieresumeverse);%
- \tikzmath{
- coordinate \c;
- \c1 = (pic cs:thaliepauseverse);
- \c2 = (pic cs:thalieresumeverse);
- \width = max(0, \cx1 - \cx2);
- }
- % Set opacity to 1 to see the space
- \draw[opacity=0, black, line width=1ex] (0, 0) -- (\width pt, 0);
- \end{tikzpicture}%
- }{}%
-}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% This recipe is implemented in the \href{https://framagit.org/spalax/thalie/-/blob/main/examples/henry.tex}{\texttt{examples/henry.tex}} file in the repository of this project.
-%
-% \subsubsection{Recipe 4 : With \texttt{\textbackslash{}phantom\{\}}}
-% \label{split-phantom}
-%
-% At last, if nothing else workd, this feature can also be implemented using the \lstinline|\phantom| command (see figure \ref{fig:splitverse-phantom} for an example, page \pageref{fig:splitverse-phantom}).
-% It is far less user-friendly, but it is also less error prone. Choose wisely…
-%
-% \section{Localization and Internationalization}
-% \label{sec:i18n}
-%
-% \subsection{Localization}
-% \label{sec:l10n}
-%
-% \changes{v0.09a}{2017/04/22}{Use package |translations| for localization.}
-%
-% Language cannot be defined directly in this package. Instead, the language
-% currently used by |babel| or |polyglossia| is used to translate the following
-% words (with or without capital letter, singular or plural): \emph{play},
-% \emph{act}, \emph{scene}, \emph{interlude}, \emph{pause}, \emph{curtain}.
-%
-% If the option for your language does not exist\footnote{You can also send me
-% the translation for your language, to improve this package.}, or if you want
-% to change the default words used here, you can set your own translation
-% using command \lstinline|\DeclareTranslation| (see the |translations| package for more
-% information). For instance use
-% \lstinline|\DeclareTranslation{Spanish}{Curtain}{Tel\`on}| for Spanish\footnote{I may
-% be wrong: I cannot speak Spanish.}.
-%
-% See section \ref{sec:languages} for the list of supported languages.
-%
-% \subsubsection{Common translations}
-% \DescribeMacro{\playname}
-% \DescribeMacro{\actname}
-% \DescribeMacro{\scenename}
-% \DescribeMacro{\interludename}
-% \DescribeMacro{\pausename}
-% \DescribeMacro{\curtainname}
-%
-% Commands defined here are shorter versions of strings commonly translated.
-%
-% For instance, \lstinline|\playname| is a shortcut for \lstinline|\GetTranslation{Play}|,
-% \lstinline|\actname| is a shortcut for \lstinline|\GetTranslation{Act}|, and so on.
-%
-% \subsection{Non-latin alphabets}
-%
-% This package should work with languages using non-latin alphabets (greek,
-% hindi, etc.). However, here are a few remarks.
-%
-% \begin{itemize}
-% \item The |bold| character style (see section \ref{sec:lines}) can only be used if a sans serif font has been defined. For instance, for hindi, you might write in the preamble: \lstinline|\newfontfamily\hindifontsf{Noto Sans Devanagari}|.
-% \end{itemize}
-%
-% \subsection{Language specific comments}
-% \label{sec:languages}
-%
-% \changes{v0.10a}{2019/02/24}{New translation: German (thanks Ekkart Kleinod).}
-% \changes{v0.11a}{2022/06/15}{New translation: Italian (thanks Giuseppe Palma).}
-%
-% The following languages are available:
-%
-% \begin{itemize}
-% \item English,
-% \item French,
-% \item German,
-% \item Italian.
-% \end{itemize}
-%
-% \subsubsection{English}
-%
-% \begin{itemize}
-% \item The |arden| character style tries to mimick the typestting of the Arden Shakespeare series.
-% \end{itemize}
-%
-% \subsubsection{French}
-%
-% \begin{itemize}
-% \item The |imprimerie-verse| and |imprimerie-prose| character styles implements the French \emph{de facto} standards for typesetting drama plays, respectively in verse and in prose, as defined by the \emph{Imprimerie nationale} \cite{imprimerienationale}.
-% \item The same book (\cite{imprimerienationale}) states that act numbers should be typeset in capital roman numerals (which is done by default with |thalie|), and that scene numbers should be typeset in small capital roman numerals, which is \emph{not} the default, but can be achieved by adding the following line in the preamble: \lstinline|\renewcommand{\thescene}{\textsc{\roman{scene}}}|.
-% \end{itemize}
-%
-% \subsubsection{Other languages}
-%
-% I do not know anything related to other languages. If you have interesting advice for those languages that you would like to share (preferably with a reference to a reliable source), I would be happy to add them to this list!
-%
-% \section{Examples}
-% \label{sec:examples}
-% \changes{v0.09a}{2017/04/22}{Add section \emph{Examples}.}
-%
-% \subsection{Characters' lines}
-% \label{sec:examples:characterslines}
-%
-% \subsubsection{Introduce lines of several characters at the same time.}
-%
-% Since \lstinline|\disposablecharacter| can display arbitrary text using the style of
-% character names, it can be used to render a custom text when two characters
-% are speaking together.
-%
-% \iffalse
-%<*example>
-% \fi
-% \begin{LTXexample}[pos=b, preset={
-\begin{dramatis}[hidden]
- \character[cmd=alice]{Alice}
- \character[cmd=bob]{Bob}
- \character[cmd=eve]{Eve}
-\end{dramatis}
-}]
-\bob
-Let's open it.
-
-\disposablecharacter{\alicename and \evename}
-No!
-% \end{LTXexample}
-% \iffalse
-%</example>
-% \fi
-%
-% \subsubsection{Add a footnote on a character name}
-%
-% Adding a footnote on the character name introducing its line cannot be done on the character command defined by the dramatis person\ae. Instead, the \lstinline|\disposablecharacter| command can be used instead.
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\disposablecharacter{\alicename\footnote{An interesting note.}}
-Hello, world!
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% \subsubsection{Add a footnote in a stage direction}
-%
-% Footnote must be protected to be included in stage directions.
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\cyrano[clapping his hands\protect\footnote{An interesting footnote.}]
-One!
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% \subsection{Headers and footers}
-% \label{sec:examples:headers}
-%
-% By default, with the |article| class, the header of the left page contains
-% the play name, and the header of the right page contains the act number.
-%
-% \subsubsection{Act number on left, scene number on right}
-%
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\renewcommand{\actmark}[1]{%
- {\markboth{\MakeUppercase{\GetTranslation{Act}}\ \theact\ #1}{}}%
-}
-\renewcommand{\scenemark}[1]{%
- {\markright{\MakeUppercase{\GetTranslation{Scene}}\ \thescene\ #1}}%
-}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% \subsubsection{Play name of left, act and scene name on right}
-%
-% \iffalse
-%<*example>
-% \fi
-% \begin{lstlisting}
-\usepackage{fancyhdr}
-\pagestyle{fancy}
-\fancyhf{}
-\fancyhead[RO]{%
- \textit{\MakeUppercase{%
- \GetTranslation{Act} \theact{}, %
- \GetTranslation{Scene} \thescene%
- }}%
-}
-\fancyhead[LE]{\leftmark}
-\end{lstlisting}
-% \iffalse
-%</example>
-% \fi
-%
-% \section{Implementation}
-% \label{sec:implementation}
-%
-% \subsection{Required packages}
-% Loading some packages.
-% \begin{macrocode}
-% Options
-\RequirePackage{pgfkeys}
-% Chapters, sections, etc
-\RequirePackage{etoolbox}
-\RequirePackage{suffix}
-% Dramatis person\ae{} is written using a table.
-\RequirePackage{tabularx}
-% Handling spaces after having introduced characters' lines.
-\RequirePackage{xspace}
-% \end{macrocode}
-%
-% \subsection{Localization}
-%
-% Use |translations|. Translations are defined in the |dicts/thalie-<LANGUAGE>.trsl| files.
-% \begin{macrocode}
-\RequirePackage{translations}
-\LoadDictionary{thalie}
-\LoadDictionaryFor{fallback}{thalie}
-% \end{macrocode}
-%
-% \subsection{Obsolete localization commands}
-%
-% \begin{macro}{\playname}
-% \begin{macro}{\actname}
-% \begin{macro}{\scenename}
-% \begin{macro}{\interludename}
-% \begin{macro}{\curtainname}
-% \begin{macro}{\pausename}
-% Shorter versions of commonly translated strings.
-% \begin{macrocode}
-\newcommand{\playname}{\GetTranslation{Play}}
-\newcommand{\actname}{\GetTranslation{Act}}
-\newcommand{\scenename}{\GetTranslation{Scene}}
-\newcommand{\interludename}{\GetTranslation{Interlude}}
-\newcommand{\curtainname}{\GetTranslation{Curtain}}
-\newcommand{\pausename}{\GetTranslation{Pause}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Sectioning}
-% \subsubsection{Headears, footers, counters, etc.}
-% \begin{macro}{playmark}
-% \begin{macro}{actmark}
-% \begin{macro}{scenemark}
-% Define commands \lstinline|\playmark|, \lstinline|\actmark| and \lstinline|\scenemark|, which are involved
-% in headers and footers definition.
-% \begin{macrocode}
-\newcommand{\playmark}[1]{%
- \markboth{\MakeUppercase{#1}}{}%
-}
-\newcommand{\actmark}[1]{%
- \markright{\MakeUppercase{%
- \GetTranslation{Act}\ \theact%
- \ifdefempty{#1}{}{: #1}%
- }}%
-}
-\newcommand{\scenemark}[1]{%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{theplay}
-% \begin{macro}{theact}
-% \begin{macro}{thescene}
-% Defines counters for plays, acts and scenes, and the associated labels
-% (\lstinline|\theplay|, \lstinline|\theact|, \lstinline|\thescene|).
-% \begin{macrocode}
-\newcounter{play}
-\renewcommand{\theplay}{\arabic{play}}
-\newcounter{act}[play]
-\renewcommand{\theact}{\Roman{act}}
-\newcounter{scene}[act]
-\renewcommand{\thescene}{\arabic{scene}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \subsubsection{Styles}
-% Style difinition. Command \lstinline|\@displaytitle| is later used by commands
-% \lstinline|\play|, \lstinline|\act| and \lstinline|\scene| (and their starred version) to typeset the
-% title.
-% \begin{macrocode}
-\newcommand{\@displaytitle}[3]{
- % Arguments:
- % - Style
- % - Label (none = not in toc)
- % - Title
- \ifdefstring{#1}{center}{
- \begin{center}
- \textsc{#2}
-
- #3
- \end{center}
- }{\ifdefstring{#1}{bigcenter}{
- \begin{center}
- \Large
- \textsc{#2}
-
- #3
- \end{center}
- }{\ifdefstring{#1}{box}{
- \begin{center}
- \framebox{\begin{minipage}{0.7\textwidth}
- \begin{center}
- \Large \bfseries
- \vspace{0.5em}
-
- #2
- \ifboolexpr{test{\ifstrempty{#3}} or test{\ifstrempty{#2}}}{}{---}
- #3
-
- \vspace{0.5em}
- \end{center}
- \end{minipage}}
- \end{center}
- \vspace{1em}
- }{}}}
-}
-% \end{macrocode}
-%
-% \subsubsection{Sectioning commands}
-%
-% Some general commands to handle clearing pages, and table of contents.
-% \begin{macrocode}
-\newcommand\@clearpage[1]{%
- % Clear page if necessary
- \ifboolexpr{test{\ifdefstring{#1}{part}} or test{\ifdefstring{#1}{chapter}}}{
- \cleardoublepage
- \thispagestyle{empty}
- }{}
-}
-
-% \end{macrocode}
-%
-% \begin{macro}{\play}
-% \begin{macro}{\play*}
-% Define sectioning commands to introduce plays. As for \lstinline|\section| (and
-% other) sectioning command, the starred version does the same, excepted that
-% nothing is written in the table of content.
-% \begin{macrocode}
-\newcommand{\play}[2][]{%
- \refstepcounter{play}
- \ifstrempty{#1}{
- \def\@short{#2}
- }{
- \def\@short{#1}
- }
- \@clearpage{\@playlevel}
- \playmark{\@short}
- \addcontentsline{toc}{\@playlevel}{\@short}
- \ifdefstring{\@playstyle}{custom}{
- \customplay{\theplay}{#2}
- }{
- \@displaytitle{\@playstyle}{}{#2}
- }
-}
-\WithSuffix\newcommand\play*[1]{%
- \@clearpage{\@playlevel}
- \ifdefstring{\@playstyle}{custom}{
- \customplay*{#1}
- }{
- \@displaytitle{\@playstyle}{}{#1}
- }
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\act}
-% \begin{macro}{\act*}
-% Define commands to introduce acts.
-% \begin{macrocode}
-\newcommand{\act}[2][]{%
- \refstepcounter{act}
- \ifstrempty{#1}{
- \def\@short{#2}
- }{
- \def\@short{#1}
- }
- \ifdefempty{\@short}{
- \def\@label{\GetTranslation{Act} \theact{}}
- }{
- \def\@label{\GetTranslation{Act} \theact{}\xspace: }
- }
- \@clearpage{\@actlevel}
- \actmark{\@short}
- \addcontentsline{toc}{\@actlevel}{\@label\@short}
- \ifdefstring{\@actstyle}{custom}{
- \customact{\theact}{#2}
- }{
- \@displaytitle{\@actstyle}{\GetTranslation{Act} \theact}{#2}
- }
-}
-\WithSuffix\newcommand\act*[1]{%
- \@clearpage{\@actlevel}
- \ifdefstring{\@actstyle}{custom}{
- \customact*{#1}
- }{
- \@displaytitle{\@actstyle}{}{#1}
- }
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\scene}
-% \begin{macro}{\scene*}
-% Define commands to introduce scenes.
-% \begin{macrocode}
-\newcommand{\scene}[2][]{%
- \refstepcounter{scene}
- \ifstrempty{#1}{
- \def\@short{#2}
- }{
- \def\@short{#1}
- }
- \ifdefempty{\@short}{
- \def\@label{\GetTranslation{Scene} \thescene{}}
- }{
- \def\@label{\GetTranslation{Scene} \thescene{}\xspace: }
- }
- \@clearpage{\@scenelevel}
- \scenemark{\@short}
- \addcontentsline{toc}{\@scenelevel}{\@label\@short}
- \ifdefstring{\@scenestyle}{custom}{
- \customscene{\thescene}{#2}
- }{
- \@displaytitle{\@scenestyle}{\GetTranslation{Scene} \thescene}{#2}
- }
-}
-\WithSuffix\newcommand\scene*[1]{%
- \@clearpage{\@scenelevel}
- \ifdefstring{\@scenestyle}{custom}{
- \customscene*{#1}
- }{
- \@displaytitle{\@scenestyle}{}{#1}
- }
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\interlude}
-% \begin{macro}{\interlude*}
-% Define commands to introduce interludes.
-% \begin{macrocode}
-\newcommand{\interlude}[2][]{%
- \ifstrempty{#1}{
- \def\@short{#2}
- }{
- \def\@short{#1}
- }
- \ifdefempty{\@short}{
- \def\@label{\GetTranslation{Interlude}}
- }{
- \def\@label{\GetTranslation{Interlude}\xspace: }
- }
- \ifdefstring{\@interludelevel}{play}{
- \@clearpage{\@playlevel}
- \playmark{\@short}
- \addcontentsline{toc}{\@playlevel}{\@label\@short}
- \@displaytitle{\@playstyle}{\GetTranslation{Interlude}}{#2}
- }{\ifdefstring{\@interludelevel}{act}{
- \@clearpage{\@actlevel}
- \actmark{\@short}
- \addcontentsline{toc}{\@actlevel}{\@label\@short}
- \@displaytitle{\@actstyle}{\GetTranslation{Interlude}}{#2}
- }{% \@interludelevel is scene
- \@clearpage{\@scenelevel}
- \scenemark{\@short}
- \addcontentsline{toc}{\@scenelevel}{\@label\@short}
- \@displaytitle{\@scenestyle}{\GetTranslation{Interlude}}{#2}
- }}
-}
-\WithSuffix\newcommand\interlude*[1]{%
- \ifdefstring{\@interludelevel}{play}{
- \@clearpage{\@playlevel}
- \@displaytitle{\@playstyle}{\GetTranslation{Interlude}}{#1}
- }{\ifdefstring{\@interludelevel}{act}{
- \@clearpage{\@actlevel}
- \@displaytitle{\@actstyle}{\GetTranslation{Interlude}}{#1}
- }{% \@interludelevel is scene
- \@clearpage{\@scenelevel}
- \@displaytitle{\@scenestyle}{\GetTranslation{Interlude}}{#1}
- }}
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsubsection{Curtain}
-%
-% \begin{macro}{\curtain}
-% Used to mark the end of an act. Prints ``curtain'' centered in its own line.
-% \begin{macrocode}
-% Curtain
-\newcommand\curtain{
- \begin{center}
- \Large\textsc{\GetTranslation{Curtain}}
- \end{center}
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Characters}
-%
-% \subsubsection{Spacing}
-% Add (or not) an |$\backslash$xspace| command at the end of character names,
-% depending on the |xspace| package option.
-% \begin{macrocode}
-\newcommand{\@maybexspace}{%
- \if@xspace%
- \xspace%
- \fi%
-}
-% \end{macrocode}
-%
-% \subsubsection{Characters' line}
-% Define the command \lstinline|\@speaks|, wich introduce a character's line. It
-% is not meant to be used by user, but will be used by further commands. It
-% takes two arguments: the character's name, and optionally, a stage direction.
-% \begin{macrocode}
-\newcommand{\@speaks}[2][]{%
- \ifstrempty{#1}{%
- \speakswithoutdirection{#2}%
- }{%
- \speakswithdirection{#2}{#1}%
- }\@maybexspace%
-}
-% \end{macrocode}
-%
-% \begin{macro}{\speakswithdirection}
-% \begin{macro}{\speakswithoutdirection}
-% Definition of styles for introducing characters' lines. These
-% commands can be overloaded by user.
-% \begin{macrocode}
-\newenvironment{@smallcenter}
- {\par\smallskip\centering}
- {\par\nopagebreak\ignorespacesafterend}
-\providecommand{\speakswithdirection}{}
-\providecommand{\speakswithoutdirection}{}
-\newcommand{\@setcharacterstyle}[1]{
- \ifstrequal{#1}{bold}{%
- % Bold style
- \renewcommand\speakswithdirection[2]{%
- \noindent%
- {\bfseries\sffamily ##1} \emph{(##2)}\xspace:%
- }
- \renewcommand\speakswithoutdirection[1]{%
- \noindent%
- {\bfseries\sffamily ##1\xspace:}%
- }%
- }{}%
- \ifstrequal{#1}{center}{%
- % Center style
- \renewcommand\speakswithdirection[2]{%
- \begin{center}%
- \textsc{##1},\\\emph{##2}%
- \end{center}%
- \par\ignorespacesafterend%
- }%
- \renewcommand\speakswithoutdirection[1]{%
- \begin{center}%
- \textsc{##1}%
- \end{center}%
- \par\ignorespacesafterend%
- }%
- }{}%
- \ifstrequal{#1}{imprimerie-verse}{%
- % Style for verse plays defined by the French Imprimerie nationale
- \renewcommand\speakswithdirection[2]{%
- \begin{@smallcenter}%
- \textsc{##1}, \emph{##2}%
- \end{@smallcenter}%
- }%
- \renewcommand\speakswithoutdirection[1]{%
- \begin{@smallcenter}%
- \textsc{##1}%
- \end{@smallcenter}%
- }%
- }{}%
- \ifstrequal{#1}{imprimerie-prose}{%
- % Style for prose plays defined by the French Imprimerie nationale
- \renewcommand\speakswithdirection[2]{%
- \noindent\hspace*{-\parindent}\textsc{##1}, \emph{##2}\xspace:%
- }%
- \renewcommand\speakswithoutdirection[1]{%
- \noindent\hspace*{-\parindent}\textsc{##1}\xspace:%
- }%
- }{}%
- \ifstrequal{#1}{arden}{%
- \renewcommand\speakswithdirection[2]{%
- \noindent\hspace*{-\parindent}\textsc{\MakeLowercase{##1}} [\emph{##2}]\quad%
- }%
- \renewcommand\speakswithoutdirection[1]{%
- \noindent\hspace*{-\parindent}\textsc{\MakeLowercase{##1}}\quad%
- }%
- }{}%
- \ifstrequal{#1}{simple}{%
- % Simple style
- \renewcommand\speakswithdirection[2]{%
- \indent\textsc{##1}, \emph{##2}\xspace:%
- }%
- \renewcommand\speakswithoutdirection[1]{%
- \indent\textsc{##1}\xspace:%
- }%
- }{}%
- \ifstrequal{#1}{margin}{%
- % Margin style
- \setlength{\leftskip}{3cm}
- \renewcommand\speakswithdirection[2]{%
- \hspace{-3cm} ##1 ##2
- }
- \renewcommand\speakswithoutdirection[1]{%
- \hspace{-3cm} ##1
- }%
- }{}%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsubsection{Dramatis person\ae{}}
-% \begin{environment}{dramatis}
-% In this environment are defined characters.
-% \begin{macrocode}
-\newcommand{\@dramatis@clear}{}
-\newcommand{\@empty@}{}
-\providebool{@dramatis@hidden}
-\newenvironment{dramatis}[1][]{
- \@dramatis@clear{}
- \undef{\@dramatis@clear}
- \ifstrequal{#1}{hidden}{
- \booltrue{@dramatis@hidden}
- }{\ifstrempty{#1}{
- \boolfalse{@dramatis@hidden}
- \dramatisenv
- }{
- \ClassError{thalie}{%
- Environment dramatis does not accept option #1.%
- }{
- }
- }
- }
-}{%
- \notbool{@dramatis@hidden}{%
- \enddramatisenv
- }{}%
-}
-% \end{macrocode}
-% \end{environment}
-%
-% \begin{environment}{dramatisenv}
-% \changes{v0.09a}{2017/04/22}{It is now possible to customize style of dramatis person\ae.}
-% \begin{macro}{\dramatischaracter}
-% \begin{macro}{\dramatischaractername}
-% \begin{macro}{\dramatischaracterdescription}
-% \begin{macro}{\characterspace}
-% \begin{environment}{charactergroup}
-% \changes{v0.06}{2013/11/02}{Groups of characters are now aligned with other caracters.}
-% Customizable commands to build dramatis person\ae.
-% \begin{macrocode}
-% Environment used to *display* dramatis personae.
-\newenvironment{dramatisenv}{%
- \list{}{\rightmargin1cm\leftmargin2cm}\item[]
-}{%
- \endlist%
-}
-
-% Display character name
-\newcommand{\dramatischaractername}[1]{\textbf{#1}}
-
-% Display character description
-\newcommand{\dramatischaracterdescription}[1]{#1}
-
-% Adds a vertical space
-\newcommand{\characterspace}{ %
- \notbool{@dramatis@hidden}{%
- \smallskip\newline %
- }{} %
-}
-
-% Display dramatis personae name and description
-\newcommand{\dramatischaracter}[2]{ %
- \hspace*{-1cm} %
- \ifboolexpr{(not test {\ifdefempty{#1}}) and test {\ifdefempty{#2}}}{%
- \dramatischaractername{#1} %
- }{}%
- \ifboolexpr{ test{\ifdefempty{#1}} and not test{\ifdefempty{#2}}}{%
- \dramatischaracterdescription{#2} %
- }{}%
- \ifboolexpr{ (not test{\ifdefempty{#1}}) and (not test{\ifdefempty{#2}})}{%
- \dramatischaractername{#1}, \dramatischaracterdescription{#2} %
- }{}%
- \newline %
-}
-
-% Environment to manage groups of characters
- \newlength{\@spaceaftergroup}
-\newenvironment{charactergroup}[2][5cm]{%
- \notbool{@dramatis@hidden}{%
- \gdef\@groupname{#2} %
- \gdef\@grouplength{#1} %
- \hspace*{-1.3pt}\math\left. %
- \minipage[c]{#1} %
- \vspace*{2pt} %
- }{}%
-}{%
- \notbool{@dramatis@hidden}{%
- \vspace*{-8pt} %
- \endminipage %
- \right\} \endmath %
- %
- \setlength{\@spaceaftergroup}{\linewidth}
- \addtolength\@spaceaftergroup{-\@grouplength}
- \addtolength\@spaceaftergroup{-20pt}
- \begin{minipage}[c]{\@spaceaftergroup}
- \@groupname %
- \end{minipage}
- \newline %
- }{}%
-}
-% \end{macrocode}
-% \end{environment}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{environment}
-%
-% \subsubsection{Character definitions}
-% \begin{macro}{\setcharactername}
-% Set (or change) the name used to introduce the lines of a character.
-% \begin{macrocode}
-% The tough part of this code is to deal with optional argument.
-\newcommand{\setcharactername}[2]{%
- \expandafter\gdef\csname#1name\endcsname{%
- #2\@maybexspace%
- }%
- \expandafter\gdef\csname#1\endcsname{%
- \@ifnextchar[{%
- \defcharcommand@with{#2}%
- }{%
- \defcharcommand@without{#2}%
- }%
- }%
- \xappto{\@dramatis@clear}{%
- \global\noexpand\csundef{#1}%
- \global\noexpand\csundef{#1name}%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% Define the command used to introduce a character's line. It takes two
-% arguments: the first one is the name of the command to define, and the second
-% one is the name of the character corresponding to this command.
-% \begin{macrocode}
-\newcommand{\@definecharactercommand}[2]{%
- \ifcsdef{#1}{%
- \ClassError{thalie}{%
- A command named \@backslashchar#1 already exists. We cannot define a new
- one.%
- }{%
- Choose another command name to introduce character #2's lines.%
- }%
- }{%
- }%
- \ifcsdef{#1name}{%
- \ClassError{thalie}{%
- A command named \@backslashchar#1name already exists. We cannot define a
- new one.%
- }{%
- Choose another command name to introduce character #2's lines, such that
- when a new command is defined by adding "name" to it, it does not
- conflict with an existing one.
- }%
- }{%
- }%
- \setcharactername{#1}{#2}%
-}
-\def\defcharcommand@with#1[#2]{\@speaks[#2]{#1}}
-\def\defcharcommand@without#1{\@speaks{#1}}
-% \end{macrocode}
-%
-% \begin{macro}{\character}
-% Define a character: put it in the dramatis person\ae{}, and define
-% corresponding commands.
-% \begin{macrocode}
-\pgfkeys{
- % Character definition
- /THALIE/CHARACTER/.is family,
- /THALIE/CHARACTER,
- cmd/.value required,
- cmd/.store in=\@cmd,
- drama/.value required,
- drama/.store in=\@drama,
- desc/.value required,
- desc/.store in=\@desc,
-}
-\newcommand{\character}[2][]{
- \undef{\@drama}
- \undef{\@cmd}
- \undef{\@desc}
- \pgfkeys{/THALIE/CHARACTER, #1}%
- % Forbidden combinations
- \ifboolexpr{
- ( test{\ifdef{\@cmd}} and test{\ifstrempty{#2}} ) or
- ( test{\ifstrempty{#2}} and test{\ifundef{\@cmd}} and test{\ifundef{\@desc}} and test{\ifundef{\@drama}} ) or
- ( test{\ifundef{\@cmd}} and (not test{\ifstrempty{#2}}) and test{\ifdef{\@drama}} )
- }{
- \ClassError{thalie}{Invalid character definition.}{All combination of omitted arguments are not allowed. See the documentation for more information}
- }{}
- % Defining character command
- \ifboolexpr{ test{\ifdef{\@cmd}} and (not test{\ifstrempty{#2}}) }{%
- \@definecharactercommand{\@cmd}{#2}
- }{}%
- \notbool{@dramatis@hidden}{%
- \ifboolexpr{ (not test{\ifstrempty{#2}}) and test{\ifdef{\@cmd}} and test{\ifdef{\@drama}} and test{\ifundef{\@desc}}}{%
- \ifdefempty{\@drama}{%
- % Hidden character. Nothing added to dramatis personae
- }{%
- % Populating dramatis personae
- \dramatischaracter{\@drama}{\@empty@}
- }%
- }{%
- % Populating dramatis personae
- \ifcsundef{@desc}{\gdef\@desc{}}{}%
- \ifcsundef{@drama}{\gdef\@drama{#2}}{}%
- \dramatischaracter{\@drama}{\@desc}
- }%
- }{}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\disposablecharacter}
-% Disposable character (character used only a few times, defined on-the-fly,
-% that does not appear in the dramatis person\ae{}).
-% \begin{macrocode}
-\newcommand{\disposablecharacter}[2][]{%
- \@speaks[#1]{#2}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Stage directions}
-% \begin{macro}{\onstage}
-% Centered stage direction.
-% \begin{macrocode}
-\newcommand{\onstage}[1]{{\centering \emph{#1}\par\medskip}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\did}
-% Inline stage directions.
-% \changes{v0.12a}{2022/10/09}{The \texttt{xspace} option also affects \texttt{\bbackslash{}did}.}
-% \begin{macrocode}
-\newcommand{\did}[1]{\emph{(#1)}\@maybexspace}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{environment}{dida}
-% Bigger stage directions, in its own paragraph.
-% \begin{macrocode}
-\newenvironment{dida}{%
- \begin{quote}
- \begin{em}
- }{%
- \end{em}
- \end{quote}
-}
-% \end{macrocode}
-% \end{environment}
-%
-% \begin{macro}{\pause}
-% Shortcut for \lstinline|\did{\GetTranslation{Pause}}|.
-% \begin{macrocode}
-\newcommand\pause{\did{\GetTranslation{Pause}}}
-% \end{macrocode}
-% \end{macro}
-
-% \subsection{Splitting verses}
-% \begin{macro}{\pauseverse}
-% \changes{v0.07}{2015/12/28}{New commands \texttt{\bbackslash{}pauseverse}, \texttt{\bbackslash{}resumeverse}, \texttt{\bbackslash{}adjustverse}.}
-% \changes{v0.10c}{2021/09/26}{Document other implementations of \texttt{\bbackslash{}pauseverse} and \texttt{\bbackslash{}resumeverse}}
-% \begin{macro}{\resumeverse}
-% \begin{macro}{\adjustverse}
-% Commands to split a verse between several characters.
-% \begin{macrocode}
-% Thanks to Timothy Li for his question, and David Carlisle for his answer:
-% https://tex.stackexchange.com/questions/107726/107727#107727
-
-\newlength{\@verseadjust}
-\setlength{\@verseadjust}{0pt}
-
-\newcommand{\adjustverse}[1]{\setlength{\@verseadjust}{#1}}
-
-\newcommand{\pauseverse}{{\abovedisplayshortskip\z@\abovedisplayskip\z@
- \belowdisplayshortskip\z@\belowdisplayskip\z@
- $$\global\dimen\@ne\predisplaysize
- \xdef\tmp{%
- \predisplaysize\the\predisplaysize
- \prevgraf\the\prevgraf\relax}%
- $$\vskip\dimexpr-\parskip-\baselineskip\relax}\tmp
-}
-
-\newcommand{\resumeverse}{%
- \hspace{\@verseadjust}\hspace{\the\dimen\@ne}
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Package options}
-% Manage package options.
-% \begin{macrocode}
-\RequirePackage{pgfopts}
-
-\pgfkeys{
- % Character style
- /THALIE/.cd,
- characterstyle/.value required,
- characterstyle/.default=simple,
- characterstyle/.is choice,
- characterstyle/bold/.code=\@setcharacterstyle{bold},
- characterstyle/center/.code=\@setcharacterstyle{center},
- characterstyle/margin/.code=\@setcharacterstyle{margin},
- characterstyle/simple/.code=\@setcharacterstyle{simple},
- characterstyle/arden/.code=\@setcharacterstyle{arden},
- characterstyle/imprimerie-verse/.code=\@setcharacterstyle{imprimerie-verse},
- characterstyle/imprimerie-prose/.code=\@setcharacterstyle{imprimerie-prose},
- characterstyle,
-}
-
-\pgfkeys{
- % play style
- /THALIE/.cd,
- playstyle/.value required,
- playstyle/.default=box,
- playstyle/.is choice,
- playstyle/center/.code=\def\@playstyle{center},
- playstyle/bigcenter/.code=\def\@playstyle{bigcenter},
- playstyle/box/.code=\def\@playstyle{box},
- playstyle/custom/.code=\def\@playstyle{custom},
- playstyle,
-}
-\pgfkeys{
- % act style
- /THALIE/.cd,
- actstyle/.value required,
- actstyle/.default=bigcenter,
- actstyle/.is choice,
- actstyle/center/.code=\def\@actstyle{center},
- actstyle/bigcenter/.code=\def\@actstyle{bigcenter},
- actstyle/box/.code=\def\@actstyle{box},
- actstyle/custom/.code=\def\@actstyle{custom},
- actstyle,
-}
-\pgfkeys{
- % scene style
- /THALIE/.cd,
- scenestyle/.value required,
- scenestyle/.default=center,
- scenestyle/.is choice,
- scenestyle/center/.code=\def\@scenestyle{center},
- scenestyle/bigcenter/.code=\def\@scenestyle{bigcenter},
- scenestyle/box/.code=\def\@scenestyle{box},
- scenestyle/custom/.code=\def\@scenestyle{custom},
- scenestyle,
-}
-
-\pgfkeys{
- % play level
- /THALIE/.cd,
- playlevel/.value required,
- playlevel/.default=chapter,
- playlevel/.store in=\@playlevel,
- playlevel,
-}
-\pgfkeys{
- % act level
- /THALIE/.cd,
- actlevel/.value required,
- actlevel/.default=section,
- actlevel/.store in=\@actlevel,
- actlevel,
-}
-\pgfkeys{
- % scene level
- /THALIE/.cd,
- scenelevel/.value required,
- scenelevel/.default=subsection,
- scenelevel/.store in=\@scenelevel,
- scenelevel,
-}
-\pgfkeys{
- % interlude level
- /THALIE/.cd,
- interludelevel/.value required,
- interludelevel/.default=act,
- interludelevel/.is choice,
- interludelevel/play/.code=\def\@interludelevel{play},
- interludelevel/act/.code=\def\@interludelevel{act},
- interludelevel/scene/.code=\def\@interludelevel{scene},
- interludelevel,
-}
-\newif\if@xspace
-\pgfkeys{
- % xspace option
- /THALIE/.cd,
- xspace/.value required,
- xspace/.is if=@xspace,
- xspace/.default=true,
- xspace,
-}
-
-\ProcessPgfPackageOptions{/THALIE}
-% \end{macrocode}
-%
-% \begin{macro}{\setthalieoptions}
-% \changes{v0.09a}{2017/04/22}{Add command \texttt{\bbackslash{}setthalieoptions}.}
-% Redefine package options.
-% \begin{macrocode}
-\newcommand{\setthalieoptions}[1]{%
- \pgfkeys{/THALIE/.cd, #1}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \changes{v0.05}{2013/06/08}{First published version.}
-%
-% \addcontentsline{toc}{section}{Change History}
-% \PrintChanges
-%
-% \begin{thebibliography}{9}
-% \addcontentsline{toc}{section}{References}
-% \bibitem{imprimerienationale}
-% {Imprimerie nationale},
-% \emph{Lexique des r\`egles typographiques en usage \`a l'Imprimerie nationale},
-% 2002,
-% ISBN : 978-2-7433-0482-9
-% \bibitem{cyrano}
-% {Edmond Rostand},
-% \emph{Cyrano de Bergerac},
-% 1897
-% \bibitem{midsummer}
-% {William Shakespeare},
-% \emph{A Midsummer Night's Dream},
-% 1600
-% \bibitem{dtxtut}
-% {Scott Pakin},
-% \emph{How to Package Your \LaTeX{} Package --- Tutorial on writing .dtx and .ins files},
-% 2004,
-% \url{http://www.ctan.org/pkg/dtxtut/}
-% \bibitem{clsguide}
-% {The \LaTeX{} Team},
-% \emph{\LaTeXe{} for class and package writers},
-% 2006,
-% \url{http://www.ctan.org/pkg/clsguide}
-% \bibitem{drama}
-% {Matt Swift},
-% \emph{drama --- Production-style stage script in LaTeX},
-% 2001,
-% \url{http://www.ctan.org/pkg/drama}
-% \bibitem{dramatist}
-% {Massimiliano Dominici},
-% \emph{dramatist --- Typeset dramas, both in verse and in prose},
-% 2005,
-% \url{http://www.ctan.org/pkg/dramatist}
-% \bibitem{play}
-% {James Kilfiger},
-% \emph{play --- Typeset drama using \LaTeX{}},
-% 2001,
-% \url{http://www.ctan.org/pkg/play}
-% \bibitem{screenplay}
-% {John Pate},
-% \emph{screenplay --- A class file to typeset screen­plays},
-% 2012,
-% \url{http://www.ctan.org/pkg/screenplay}
-% \bibitem{sides}
-% {Wing L Mui},
-% \emph{sides --- A LaTeX class for typesetting stage plays},
-% 2005,
-% \url{http://www.ctan.org/pkg/sides}
-% \end{thebibliography}
-%
-% \StopEventually{%
-% \addcontentsline{toc}{section}{Index}
-% \PrintIndex
-% }
-% \Finale
-\endinput
diff --git a/macros/latex/contrib/thalie/thalie.ins b/macros/latex/contrib/thalie/thalie.ins
deleted file mode 100644
index 6366c6e995..0000000000
--- a/macros/latex/contrib/thalie/thalie.ins
+++ /dev/null
@@ -1,59 +0,0 @@
-%% Copyright 2010-2022 Louis Paternault
-%%
-%% This work 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.
-%%
-%% This work has the LPPL maintenance status `maintained'.
-%%
-%% The Current Maintainer of this work is Louis Paternault
-%%
-%% This work consists of the files thalie.dtx and thalie.ins
-%% and the derived file thalie.sty.
-
-\input{docstrip}
-
-\keepsilent
-\usedir{tex/latex/thalie}
-
-\preamble
-Copyright 2010-2022 Louis Paternault
-
-This work 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.
-
-This work has the LPPL maintenance status `maintained'.
-
-The Current Maintainer of this work is Louis Paternault
-
-This work consists of the files thalie.dtx and thalie.ins
-and the derived file thalie.sty.
-\endpreamble
-
-\generate{\file{thalie.sty}{\from{thalie.dtx}{package}}}
-
-\obeyspaces
-\Msg{****************************************************}
-\Msg{* *}
-\Msg{* To finish the installation you have to move the *}
-\Msg{* following file into a directory searched by TeX: *}
-\Msg{* *}
-\Msg{* thalie.sty *}
-\Msg{* *}
-\Msg{* To produce the documentation run the file *}
-\Msg{* thalie.dtx through LaTeX. *}
-\Msg{* *}
-\Msg{* Happy TeXing! *}
-\Msg{* *}
-\Msg{****************************************************}
-
-\endbatchfile
diff --git a/macros/latex/contrib/thalie/thalie.pdf b/macros/latex/contrib/thalie/thalie.pdf
index 5cb97d8e2f..280500df20 100644
--- a/macros/latex/contrib/thalie/thalie.pdf
+++ b/macros/latex/contrib/thalie/thalie.pdf
Binary files differ
diff --git a/macros/latex/contrib/thalie/thalie.sty b/macros/latex/contrib/thalie/thalie.sty
new file mode 100644
index 0000000000..9007b0eede
--- /dev/null
+++ b/macros/latex/contrib/thalie/thalie.sty
@@ -0,0 +1,693 @@
+% Copyright 2010-2022 Louis Paternault
+%
+% This work 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.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Louis Paternault
+%
+% This work consists of the files thalie.tex and thalie.sty.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{thalie}
+ [2022/12/11 v0.13a A package to typeset drama plays]
+
+
+\RequirePackage{pgfkeys}
+\RequirePackage{etoolbox}
+\RequirePackage{suffix}
+\RequirePackage{tabularx}
+\RequirePackage{xspace}
+\RequirePackage{translations}
+\LoadDictionary{thalie}
+\LoadDictionaryFor{fallback}{thalie}
+\newcommand{\playname}{\GetTranslation{Play}}
+\newcommand{\actname}{\GetTranslation{Act}}
+\newcommand{\scenename}{\GetTranslation{Scene}}
+\newcommand{\interludename}{\GetTranslation{Interlude}}
+\newcommand{\curtainname}{\GetTranslation{Curtain}}
+\newcommand{\pausename}{\GetTranslation{Pause}}
+\newcommand{\playmark}[1]{%
+ \markboth{\MakeUppercase{#1}}{}%
+}
+\newcommand{\actmark}[1]{%
+ \markright{\MakeUppercase{%
+ \GetTranslation{Act}\ \theact%
+ \ifdefempty{#1}{}{: #1}%
+ }}%
+}
+\newcommand{\scenemark}[1]{%
+}
+\newcounter{play}
+\renewcommand{\theplay}{\arabic{play}}
+\newcounter{act}[play]
+\renewcommand{\theact}{\Roman{act}}
+\newcounter{scene}[act]
+\renewcommand{\thescene}{\arabic{scene}}
+\newcommand{\@displaytitle}[3]{
+ % Arguments:
+ % - Style
+ % - Label (none = not in toc)
+ % - Title
+ \ifdefstring{#1}{center}{
+ \begin{center}
+ \textsc{#2}
+
+ #3
+ \end{center}
+ }{\ifdefstring{#1}{bigcenter}{
+ \begin{center}
+ \Large
+ \textsc{#2}
+
+ #3
+ \end{center}
+ }{\ifdefstring{#1}{box}{
+ \begin{center}
+ \framebox{\begin{minipage}{0.7\textwidth}
+ \begin{center}
+ \Large \bfseries
+ \vspace{0.5em}
+
+ #2
+ \ifboolexpr{test{\ifstrempty{#3}} or test{\ifstrempty{#2}}}{}{---}
+ #3
+
+ \vspace{0.5em}
+ \end{center}
+ \end{minipage}}
+ \end{center}
+ \vspace{1em}
+ }{}}}%
+}
+\newcommand\@clearpage[1]{%
+ % Clear page if necessary
+ \ifboolexpr{test{\ifdefstring{#1}{part}} or test{\ifdefstring{#1}{chapter}}}{
+ \cleardoublepage
+ \thispagestyle{empty}
+ }{}%
+}
+
+\newcommand{\play}[2][]{%
+ \refstepcounter{play}
+ \ifstrempty{#1}{
+ \def\@short{#2}
+ }{
+ \def\@short{#1}
+ }
+ \@clearpage{\@playlevel}
+ \playmark{\@short}
+ \addcontentsline{toc}{\@playlevel}{\@short}
+ \ifdefstring{\@playstyle}{custom}{
+ \customplay{\theplay}{#2}
+ }{
+ \@displaytitle{\@playstyle}{}{#2}
+ }
+}
+\WithSuffix\newcommand\play*[1]{%
+ \@clearpage{\@playlevel}
+ \ifdefstring{\@playstyle}{custom}{
+ \customplay*{#1}
+ }{
+ \@displaytitle{\@playstyle}{}{#1}
+ }
+}
+\newcommand{\act}[2][]{%
+ \refstepcounter{act}
+ \ifstrempty{#1}{
+ \def\@short{#2}
+ }{
+ \def\@short{#1}
+ }
+ \ifdefempty{\@short}{
+ \def\@label{\GetTranslation{Act} \theact{}}
+ }{
+ \def\@label{\GetTranslation{Act} \theact{}\xspace: }
+ }
+ \@clearpage{\@actlevel}
+ \actmark{\@short}
+ \addcontentsline{toc}{\@actlevel}{\@label\@short}
+ \ifdefstring{\@actstyle}{custom}{
+ \customact{\theact}{#2}
+ }{
+ \@displaytitle{\@actstyle}{\GetTranslation{Act} \theact}{#2}
+ }
+}
+\WithSuffix\newcommand\act*[1]{%
+ \@clearpage{\@actlevel}
+ \ifdefstring{\@actstyle}{custom}{
+ \customact*{#1}
+ }{
+ \@displaytitle{\@actstyle}{}{#1}
+ }
+}
+\newcommand{\scene}[2][]{%
+ \refstepcounter{scene}
+ \ifstrempty{#1}{
+ \def\@short{#2}
+ }{
+ \def\@short{#1}
+ }
+ \ifdefempty{\@short}{
+ \def\@label{\GetTranslation{Scene} \thescene{}}
+ }{
+ \def\@label{\GetTranslation{Scene} \thescene{}\xspace: }
+ }
+ \@clearpage{\@scenelevel}
+ \scenemark{\@short}
+ \addcontentsline{toc}{\@scenelevel}{\@label\@short}
+ \ifdefstring{\@scenestyle}{custom}{
+ \customscene{\thescene}{#2}
+ }{
+ \@displaytitle{\@scenestyle}{\GetTranslation{Scene} \thescene}{#2}
+ }
+}
+\WithSuffix\newcommand\scene*[1]{%
+ \@clearpage{\@scenelevel}
+ \ifdefstring{\@scenestyle}{custom}{
+ \customscene*{#1}
+ }{
+ \@displaytitle{\@scenestyle}{}{#1}
+ }
+}
+\newcommand{\interlude}[2][]{%
+ \ifstrempty{#1}{
+ \def\@short{#2}
+ }{
+ \def\@short{#1}
+ }
+ \ifdefempty{\@short}{
+ \def\@label{\GetTranslation{Interlude}}
+ }{
+ \def\@label{\GetTranslation{Interlude}\xspace: }
+ }
+ \ifdefstring{\@interludelevel}{play}{
+ \@clearpage{\@playlevel}
+ \playmark{\@short}
+ \addcontentsline{toc}{\@playlevel}{\@label\@short}
+ \@displaytitle{\@playstyle}{\GetTranslation{Interlude}}{#2}
+ }{\ifdefstring{\@interludelevel}{act}{
+ \@clearpage{\@actlevel}
+ \actmark{\@short}
+ \addcontentsline{toc}{\@actlevel}{\@label\@short}
+ \@displaytitle{\@actstyle}{\GetTranslation{Interlude}}{#2}
+ }{% \@interludelevel is scene
+ \@clearpage{\@scenelevel}
+ \scenemark{\@short}
+ \addcontentsline{toc}{\@scenelevel}{\@label\@short}
+ \@displaytitle{\@scenestyle}{\GetTranslation{Interlude}}{#2}
+ }}
+}
+\WithSuffix\newcommand\interlude*[1]{%
+ \ifdefstring{\@interludelevel}{play}{
+ \@clearpage{\@playlevel}
+ \@displaytitle{\@playstyle}{\GetTranslation{Interlude}}{#1}
+ }{\ifdefstring{\@interludelevel}{act}{
+ \@clearpage{\@actlevel}
+ \@displaytitle{\@actstyle}{\GetTranslation{Interlude}}{#1}
+ }{% \@interludelevel is scene
+ \@clearpage{\@scenelevel}
+ \@displaytitle{\@scenestyle}{\GetTranslation{Interlude}}{#1}
+ }}
+}
+\newcommand\curtain{
+ \begin{center}
+ \Large\textsc{\GetTranslation{Curtain}}
+ \end{center}
+}
+\newcommand{\@maybexspace}{%
+ \if@xspace%
+ \xspace%
+ \fi%
+}
+\newcommand{\@speaks}[2][]{%
+ \ifstrempty{#1}{%
+ \speakswithoutdirection{#2}%
+ }{%
+ \speakswithdirection{#2}{#1}%
+ }\@maybexspace%
+}
+\newenvironment{@smallcenter}
+ {\par\smallskip\centering}
+ {\par\nopagebreak\ignorespacesafterend}
+\providecommand{\speakswithdirection}{}
+\providecommand{\speakswithoutdirection}{}
+\newcommand{\@setcharacterstyle}[1]{
+ \ifstrequal{#1}{bold}{%
+ % Bold style
+ \renewcommand\speakswithdirection[2]{%
+ \noindent%
+ {\bfseries\sffamily ##1} \emph{(##2)}\xspace:%
+ }
+ \renewcommand\speakswithoutdirection[1]{%
+ \noindent%
+ {\bfseries\sffamily ##1\xspace:}%
+ }%
+ }{}%
+ \ifstrequal{#1}{center}{%
+ % Center style
+ \renewcommand\speakswithdirection[2]{%
+ \begin{center}%
+ \textsc{##1},\\\emph{##2}%
+ \end{center}%
+ \par\ignorespacesafterend%
+ }%
+ \renewcommand\speakswithoutdirection[1]{%
+ \begin{center}%
+ \textsc{##1}%
+ \end{center}%
+ \par\ignorespacesafterend%
+ }%
+ }{}%
+ \ifstrequal{#1}{imprimerie-verse}{%
+ % Style for verse plays defined by the French Imprimerie nationale
+ \renewcommand\speakswithdirection[2]{%
+ \begin{@smallcenter}%
+ \textsc{##1}, \emph{##2}%
+ \end{@smallcenter}%
+ }%
+ \renewcommand\speakswithoutdirection[1]{%
+ \begin{@smallcenter}%
+ \textsc{##1}%
+ \end{@smallcenter}%
+ }%
+ }{}%
+ \ifstrequal{#1}{imprimerie-prose}{%
+ % Style for prose plays defined by the French Imprimerie nationale
+ \renewcommand\speakswithdirection[2]{%
+ \noindent\hspace*{-\parindent}\textsc{##1}, \emph{##2}\xspace:%
+ }%
+ \renewcommand\speakswithoutdirection[1]{%
+ \noindent\hspace*{-\parindent}\textsc{##1}\xspace:%
+ }%
+ }{}%
+ \ifstrequal{#1}{arden}{%
+ \renewcommand\speakswithdirection[2]{%
+ \noindent\hspace*{-\parindent}\textsc{\MakeLowercase{##1}} [\emph{##2}]\quad%
+ }%
+ \renewcommand\speakswithoutdirection[1]{%
+ \noindent\hspace*{-\parindent}\textsc{\MakeLowercase{##1}}\quad%
+ }%
+ }{}%
+ \ifstrequal{#1}{simple}{%
+ % Simple style
+ \renewcommand\speakswithdirection[2]{%
+ \indent\textsc{##1}, \emph{##2}\xspace:%
+ }%
+ \renewcommand\speakswithoutdirection[1]{%
+ \indent\textsc{##1}\xspace:%
+ }%
+ }{}%
+ \ifstrequal{#1}{margin}{%
+ % Margin style
+ \setlength{\leftskip}{3cm}
+ \renewcommand\speakswithdirection[2]{%
+ \hspace{-3cm} ##1 ##2
+ }
+ \renewcommand\speakswithoutdirection[1]{%
+ \hspace{-3cm} ##1
+ }%
+ }{}%
+}
+\providebool{@dramatis@hidden}
+\pgfkeys{
+ % Character definition
+ /THALIE/DRAMATIS/.is family,
+ /THALIE/DRAMATIS,
+ hidden/.default=true,
+ hidden/.is choice,
+ hidden/true/.code=\booltrue{@dramatis@hidden},
+ hidden/false/.code=\boolfalse{@dramatis@hidden},
+ defaultcast/.default={},
+ defaultcast/.value required,
+ defaultcast/.store in=\@defaultcast,
+}
+\newcommand{\@dramatis@clear}{}
+\newcommand{\@empty@}{}
+\newenvironment{dramatis}[1][]{
+ \@dramatis@clear{}
+ \undef{\@dramatis@clear}
+ \pgfkeys{/THALIE/DRAMATIS/.cd, #1}
+ \ifbool{@dramatis@hidden}{%
+ % Nothing
+ }{%
+ \dramatisenv%
+ }%
+}{%
+ \notbool{@dramatis@hidden}{%
+ \enddramatisenv
+ }{}%
+}
+\newenvironment{dramatisenv}{%
+ \list{}{\rightmargin1cm\leftmargin2cm}\item[]
+}{%
+ \endlist%
+}
+
+\newcommand{\dramatischaractername}[1]{\textbf{#1}}
+
+\newcommand{\dramatischaracterdescription}[1]{#1}
+
+\newcommand{\dramatischaractercast}[1]{#1}
+
+\newcommand{\characterspace}{ %
+ \notbool{@dramatis@hidden}{%
+ \smallskip\newline %
+ }{}%
+}
+
+\newcommand{\dramatischaracter}[3]{ %
+ \hspace*{-1cm} %
+ \ifboolexpr{(not test {\ifdefempty{#1}}) and test {\ifdefempty{#2}}}{%
+ \dramatischaractername{#1} %
+ }{}%
+ \ifboolexpr{ test{\ifdefempty{#1}} and not test{\ifdefempty{#2}}}{%
+ \dramatischaracterdescription{#2} %
+ }{}%
+ \ifboolexpr{ (not test{\ifdefempty{#1}}) and (not test{\ifdefempty{#2}})}{%
+ \dramatischaractername{#1}, \dramatischaracterdescription{#2} %
+ }{}%
+ \ifdefempty{#3}{}{\dotfill\dramatischaractercast{#3}}%
+ \newline %
+}
+
+\newlength{\@spaceaftergroup}
+\newenvironment{dramatischaractergroup}[2]{
+ \gdef\@groupname{#2} %
+ \gdef\@grouplength{#1} %
+ \hspace*{-1.3pt}\math\left. %
+ \minipage[c]{#1} %
+ \vspace*{2pt} %
+}{%
+ \vspace*{-8pt} %
+ \endminipage %
+ \right\} \endmath %
+ %
+ \setlength{\@spaceaftergroup}{\linewidth}
+ \addtolength\@spaceaftergroup{-\@grouplength}
+ \addtolength\@spaceaftergroup{-20pt}
+ \begin{minipage}[c]{\@spaceaftergroup}
+ \@groupname %
+ \end{minipage}
+ \newline %
+}
+\newenvironment{charactergroup}[2][5cm]{%
+ \notbool{@dramatis@hidden}{%
+ \dramatischaractergroup{#1}{#2}
+ }{}%
+}{%
+ \notbool{@dramatis@hidden}{%
+ \enddramatischaractergroup
+ }{}%
+}
+
+\newenvironment{dramatischaractercastgroup}[3]{%
+ \ifdefempty{#3}{
+ \hspace*{-1cm} %
+ \ifboolexpr{(not test {\ifdefempty{#1}}) and test {\ifdefempty{#2}}}{%
+ \dramatischaractername{#1} %
+ }{}%
+ \ifboolexpr{ test{\ifdefempty{#1}} and not test{\ifdefempty{#2}}}{%
+ \dramatischaracterdescription{#2} %
+ }{}%
+ \ifboolexpr{ (not test{\ifdefempty{#1}}) and (not test{\ifdefempty{#2}})}{%
+ \dramatischaractername{#1}, \dramatischaracterdescription{#2} %
+ }{}%
+ \hfill%
+ }{
+ \ClassError{thalie}{%
+ Environment "castgroup" cannot have a non-empty "cast" argument.%
+ }{}%
+ }%
+}{}
+
+\newenvironment{castgroup}[2][]{%
+ \@thalie@parsecharacter{#1}{#2}{dramatischaractercastgroup}%
+ \notbool{@dramatis@hidden}{%
+ \math\left\{%
+ \array{r}%
+ }{}%
+}{%
+ \notbool{@dramatis@hidden}{%
+ \endarray%
+ \right.\endmath%
+ \newline%
+ }{}%
+ \enddramatischaractercastgroup
+}
+\newcommand{\dramatiscast}[1]{%
+ % Command used to display cast inside a castgroup.
+ % Can be redefined by user.
+ \notbool{@dramatis@hidden}{%
+ \hbox{\dramatischaractercast{#1}\hspace*{-6pt}}\tabularnewline%
+ }{}%
+}
+\newcommand{\cast}[1]{%
+ % "Public" command, used by author in the dramatis personae.
+ % Does nothing fancy right now, but how knows?
+ \dramatiscast{#1}%
+}
+
+\newcommand{\setcharactername}[2]{%
+ \expandafter\gdef\csname#1name\endcsname{%
+ #2\@maybexspace%
+ }%
+ \expandafter\gdef\csname#1\endcsname{%
+ \@ifnextchar[{%
+ \defcharcommand@with{#2}%
+ }{%
+ \defcharcommand@without{#2}%
+ }%
+ }%
+ \xappto{\@dramatis@clear}{%
+ \global\noexpand\csundef{#1}%
+ \global\noexpand\csundef{#1name}%
+ }%
+}
+\newcommand{\@definecharactercommand}[2]{%
+ \ifcsdef{#1}{%
+ \ClassError{thalie}{%
+ A command named \@backslashchar#1 already exists. We cannot define a new
+ one.%
+ }{%
+ Choose another command name to introduce character #2's lines.%
+ }%
+ }{%
+ }%
+ \ifcsdef{#1name}{%
+ \ClassError{thalie}{%
+ A command named \@backslashchar#1name already exists. We cannot define a
+ new one.%
+ }{%
+ Choose another command name to introduce character #2's lines, such that
+ when a new command is defined by adding "name" to it, it does not
+ conflict with an existing one.
+ }%
+ }{%
+ }%
+ \setcharactername{#1}{#2}%
+}
+\def\defcharcommand@with#1[#2]{\@speaks[#2]{#1}}
+\def\defcharcommand@without#1{\@speaks{#1}}
+\pgfkeys{
+ % Character definition
+ /THALIE/CHARACTER/.is family,
+ /THALIE/CHARACTER,
+ cmd/.value required,
+ cmd/.store in=\@cmd,
+ cast/.value required,
+ cast/.store in=\@cast,
+ drama/.value required,
+ drama/.store in=\@drama,
+ desc/.value required,
+ desc/.store in=\@desc,
+}
+\newcommand{\@thalie@parsecharacter}[3]{%
+ % Parse a character definition. Arguments are:
+ % #1: Optional arguments of \character: [drama={foo}, cast={bar}]
+ % #2: Mandatory argument of \character (character name)
+ % #3: Name of the command to call to display this character definition.
+ \undef{\@drama}
+ \undef{\@cmd}
+ \undef{\@cast}
+ \undef{\@desc}
+ \pgfkeys{/THALIE/CHARACTER, #1}%
+ \ifcsundef{@cast}{%
+ \ifcsdef{@defaultcast}{%
+ \gdef\@cast{\@defaultcast}%
+ }{%
+ \gdef\@cast{}%
+ }%
+ }{}%
+ % Forbidden combinations
+ \ifboolexpr{
+ ( ( test{\ifdef{\@cmd}} and not test{\ifdefempty{\@cmd}} ) and test{\ifstrempty{#2}} ) or
+ ( ( test{\ifundef{\@cmd}} or test{\ifdefempty{\@cmd}} ) and not test{\ifstrempty{#2}} ) or
+ ( test{\ifdefempty{\@drama}} and ( test{\ifdef{\@desc}} and not test{\ifdefempty{\@desc}} ) ) or
+ ( test{\ifundef{\@cmd}} and test{\ifundef{\@desc}} and test{\ifundef{\@drama}} and test{\ifstrempty{#2}} ) or
+ %( ( test{\ifundef{\@cmd}} or test{\ifdefempty{\@cmd}} ) and test{\ifstrempty{#2}} and ( test{\ifdefempty{\@drama}} or test{\ifundef{\@drama}} ))
+ ( ( test{\ifundef{\@desc}} or test{\ifdefempty{\@desc}} ) and test{\ifstrempty{#2}} and ( test{\ifdefempty{\@drama}} or test{\ifundef{\@drama}} ))
+ }{
+ \ClassError{thalie}{Invalid character definition.}{All combination of omitted arguments are not allowed. See the documentation for more information}
+ }{}%
+ % Defining character command
+ \ifboolexpr{ test{\ifdef{\@cmd}} and (not test{\ifstrempty{#2}}) }{%
+ \@definecharactercommand{\@cmd}{#2}
+ }{}%
+ \ifboolexpr{ bool{@dramatis@hidden} or test{\ifdefempty{\@drama}} }{%
+ % Hidden character. Nothing added to dramatis personae
+ }{%
+ \ifcsundef{@desc}{\gdef\@desc{}}{}%
+ \ifcsundef{@drama}{\gdef\@drama{#2}}{}%
+ \csuse{#3}{\@drama}{\@desc}{\@cast}%
+ }%
+}
+\newcommand{\character}[2][]{%
+ \@thalie@parsecharacter{#1}{#2}{dramatischaracter}%
+}
+
+\newcommand{\disposablecharacter}[2][]{%
+ \@speaks[#1]{#2}%
+}
+\newcommand{\onstage}[1]{{\centering \emph{#1}\par\medskip}}
+\newcommand{\did}[1]{\emph{(#1)}\@maybexspace}
+\newenvironment{dida}{%
+ \begin{quote}
+ \begin{em}
+ }{%
+ \end{em}
+ \end{quote}
+}
+\newcommand\pause{\did{\GetTranslation{Pause}}}
+
+
+\newlength{\@verseadjust}
+\setlength{\@verseadjust}{0pt}
+
+\newcommand{\adjustverse}[1]{\setlength{\@verseadjust}{#1}}
+
+\newcommand{\pauseverse}{{\abovedisplayshortskip\z@\abovedisplayskip\z@
+ \belowdisplayshortskip\z@\belowdisplayskip\z@
+ $$\global\dimen\@ne\predisplaysize
+ \xdef\tmp{%
+ \predisplaysize\the\predisplaysize
+ \prevgraf\the\prevgraf\relax}%
+ $$\vskip\dimexpr-\parskip-\baselineskip\relax}\tmp
+}
+
+\newcommand{\resumeverse}{%
+ \hspace{\@verseadjust}\hspace{\the\dimen\@ne}
+}
+\RequirePackage{pgfopts}
+
+\pgfkeys{
+ % Character style
+ /THALIE/.cd,
+ characterstyle/.value required,
+ characterstyle/.default=simple,
+ characterstyle/.is choice,
+ characterstyle/bold/.code=\@setcharacterstyle{bold},
+ characterstyle/center/.code=\@setcharacterstyle{center},
+ characterstyle/margin/.code=\@setcharacterstyle{margin},
+ characterstyle/simple/.code=\@setcharacterstyle{simple},
+ characterstyle/arden/.code=\@setcharacterstyle{arden},
+ characterstyle/imprimerie-verse/.code=\@setcharacterstyle{imprimerie-verse},
+ characterstyle/imprimerie-prose/.code=\@setcharacterstyle{imprimerie-prose},
+ characterstyle,
+}
+
+\pgfkeys{
+ % play style
+ /THALIE/.cd,
+ playstyle/.value required,
+ playstyle/.default=box,
+ playstyle/.is choice,
+ playstyle/center/.code=\def\@playstyle{center},
+ playstyle/bigcenter/.code=\def\@playstyle{bigcenter},
+ playstyle/box/.code=\def\@playstyle{box},
+ playstyle/custom/.code=\def\@playstyle{custom},
+ playstyle,
+}
+\pgfkeys{
+ % act style
+ /THALIE/.cd,
+ actstyle/.value required,
+ actstyle/.default=bigcenter,
+ actstyle/.is choice,
+ actstyle/center/.code=\def\@actstyle{center},
+ actstyle/bigcenter/.code=\def\@actstyle{bigcenter},
+ actstyle/box/.code=\def\@actstyle{box},
+ actstyle/custom/.code=\def\@actstyle{custom},
+ actstyle,
+}
+\pgfkeys{
+ % scene style
+ /THALIE/.cd,
+ scenestyle/.value required,
+ scenestyle/.default=center,
+ scenestyle/.is choice,
+ scenestyle/center/.code=\def\@scenestyle{center},
+ scenestyle/bigcenter/.code=\def\@scenestyle{bigcenter},
+ scenestyle/box/.code=\def\@scenestyle{box},
+ scenestyle/custom/.code=\def\@scenestyle{custom},
+ scenestyle,
+}
+
+\pgfkeys{
+ % play level
+ /THALIE/.cd,
+ playlevel/.value required,
+ playlevel/.default=chapter,
+ playlevel/.store in=\@playlevel,
+ playlevel,
+}
+\pgfkeys{
+ % act level
+ /THALIE/.cd,
+ actlevel/.value required,
+ actlevel/.default=section,
+ actlevel/.store in=\@actlevel,
+ actlevel,
+}
+\pgfkeys{
+ % scene level
+ /THALIE/.cd,
+ scenelevel/.value required,
+ scenelevel/.default=subsection,
+ scenelevel/.store in=\@scenelevel,
+ scenelevel,
+}
+\pgfkeys{
+ % interlude level
+ /THALIE/.cd,
+ interludelevel/.value required,
+ interludelevel/.default=act,
+ interludelevel/.is choice,
+ interludelevel/play/.code=\def\@interludelevel{play},
+ interludelevel/act/.code=\def\@interludelevel{act},
+ interludelevel/scene/.code=\def\@interludelevel{scene},
+ interludelevel,
+}
+\newif\if@xspace
+\pgfkeys{
+ % xspace option
+ /THALIE/.cd,
+ xspace/.value required,
+ xspace/.is if=@xspace,
+ xspace/.default=true,
+ xspace,
+}
+
+\ProcessPgfPackageOptions{/THALIE}
+\newcommand{\setthalieoptions}[1]{%
+ \pgfkeys{/THALIE/.cd, #1}%
+}
+\endinput
+%%
+%% End of file `thalie.sty'.
diff --git a/macros/latex/contrib/thalie/thalie.tex b/macros/latex/contrib/thalie/thalie.tex
new file mode 100644
index 0000000000..e2c824b235
--- /dev/null
+++ b/macros/latex/contrib/thalie/thalie.tex
@@ -0,0 +1,1325 @@
+\documentclass[
+ load-preamble-,
+ babel-options=english,
+ add-index=true,
+]{cnltx-doc}
+
+\usepackage{thalie}
+
+\usepackage{emoji}
+\setcnltx{
+ name = thalie,
+ title = {\emoji{performing-arts} Thalie},
+ version = v0.13a,
+ date = 2022-12-11,
+ info = A \LaTeX{} package to typeset drama plays,
+ authors = Louis Paternault ,
+ email = spalax(at)gresille(dot)org ,
+ url = https://framagit.org/spalax/thalie ,
+ abstract = {%
+ This package is meant to typeset drama plays using \LaTeX{}. It provides commands to introduce characters' lines, to render stage direction, to divide a play into acts and scenes, to automatically build the dramatis person\ae{}, etc.
+ } ,
+ add-cmds = {
+ act,
+ actname,
+ adjustverse,
+ character,
+ characterspace,
+ customact,
+ customplay,
+ customscene,
+ did,
+ disposablecharacter,
+ dramatiscast
+ dramatischaracter,
+ dramatischaractercast,
+ dramatischaracterdescription,
+ dramatischaractername,
+ pauseverse,
+ play,
+ playname,
+ resumeverse,
+ scene,
+ scenename,
+ setcharactername,
+ setthalieoptions,
+ speakswithdirection,
+ speakswithoutdirection,
+ theact,
+ theplay,
+ thescene,
+ },
+ add-envs = {
+ castgroup,
+ charactergroup,
+ dida,
+ dramatis,
+ dramatischaractercastgroup,
+ dramatischaractergroup,
+ dramatisenv,
+ },
+ add-silent-cmds = {
+ enquote,
+ },
+ add-sourcecode-options = {
+ numbers = none,
+ },
+}
+
+\usepackage{tabularray}
+\UseTblrLibrary{booktabs}
+\usepackage{booktabs}
+\usepackage[nospace]{varioref}
+\usepackage[autostyle=true]{csquotes}
+\usepackage{graphicx}
+\usepackage{markdown}
+
+\usepackage{polyglossia}
+\setmainlanguage{english}
+\setotherlanguages{french,greek}
+\newfontfamily\greekfont[Script=Greek]{Linux Libertine O}
+
+\newcommand{\bbackslash}{\symbol{92}}
+\usepackage{manfnt}
+\newcommand{\danger}{\marginpar[\hfill\dbend]{\dbend\hfill}}
+
+\setcounter{tocdepth}{2}
+
+\begin{document}
+
+This document introduces the \textsf{thalie} package, used to typeset drama plays.
+
+\part{Introduction}
+
+\section{About \pkg*{thalie}}
+
+\subsection{Why Thalie?}
+
+\enquote{\textfrench{Thalie}} is the French translation of \enquote{Thalia} (\enquote{\textgreek{Θάλεια}} in Greek), the Muse of comedy and idyllic poetry\footnote{More information : \url{https://fr.wikipedia.org/wiki/Thalie_(Muse)}.}. It seems an appropriate name for a tool dedicated to help writing drama.
+
+\subsection{Other classes and packages}
+This package is far from being the only one that can be used to render drama
+plays. If you do not like my work, you can use one of the following ones (and
+I guess there exists others):
+\pkg{drama} \cite{drama},
+\pkg{dramatist} \cite{dramatist},
+\pkg{play} \cite{play},
+\pkg{screenplay} \cite{screenplay},
+\pkg{sides} \cite{sides}.
+
+I began to write this package in 2010, and now, at the end of 2012, I must admit that I wonder why I started this…
+ There are already several such packages in \ctan\footnote{\url{http://www.ctan.org/topic/drama-script}}, and the \pkg{dramatist} package seems really nice (I borrowed some ideas and copied some code from it).
+There are actually a few improvements in my package compared to \pkg{dramatist}:
+in my package, plays, acts and scenes appear in the table of contents;
+it is possible to include several plays in a single document;
+there are more options when building the dramatis person\ae{};
+headers and footers are taken into account, etc.
+But these improvements are small; it might have been smarter to contribute to \pkg{dramatist} instead of starting my own package.
+The good part is that I have a package that fits my needs, and I learned how to write a \LaTeX{} package.
+
+Oh, yes! I know why I started this: I am a geek…
+
+\subsection{License}
+This work may be distributed and/or modified under the conditions of the \LPPL,
+either version 1.3 of this license or (at your option) any later version.
+
+Further information can be found in the \texttt{.dtx} file used to build this document.
+
+In short (but this paragraph has no legal value), you can use this package freely to render your drama plays, and modify it almost freely.
+Nevertheless, if you like my work, you can invite me to the performance of the play you typeset using my package\footnote{You will not take a big risk, since there is little chance I travel half the world to see a play. But if by chance I can attend it, it would make me really happy.}.
+
+\subsection{Acknowledgements}
+I borrowed ideas and lines of code from the \LaTeX{} packages \pkg{drama}\cite{drama} and \pkg{dramatist}\cite{dramatist}.
+
+I used the following guides to package my package: \emph{How to Package Your \LaTeX{} Package} \cite{dtxtut}, and \emph{\LaTeXe{} for class and package writers} \cite{clsguide}.
+
+\section{About this documentation}
+
+\subsection{Examples}
+
+Most of the examples are taken from
+Edmond Rostand's \textfrench{\emph{Cyrano de Bergerac}} \cite{cyrano},
+Jean Giraudoux's \textfrench{\emph{Électre}} \cite{electre},
+or William Shakespeare's \emph{A Midsummer Night's Dream} \cite{midsummer}.
+
+\subsection{Overview}
+Installation instruction are given in section \ref{sec:install}.
+Documentation about how to use this package is given in section
+\ref{sec:usage}. In particular, section \ref{sec:sectioning} explains how to
+use acts and scenes, sections \ref{sec:dramatis} and \ref{sec:characters} explains how to define
+characters, and use these definitions to introduce characters' lines, and
+section \ref{sec:directions} describes commands used to render stage
+directions. At last, specific instruction about how to use this package with
+a language other than English (or a non-latin alphabet) are given in section
+\ref{sec:i18n}. Examples are given in section \ref{sec:examples}.
+
+\section{Download and Install}
+\label{sec:install}
+
+
+\subsection{\textsc{Gnu}/Linux Distribution}
+
+If applicable, the easiest way to get \pkg{thalie} working is by installing it by your distribution package. With Debian (and Ubuntu, and surely other distributions that inherit from Debian), simply run:
+
+\begin{sourcecode}[add-sourcecode-options={language=bash}]
+ sudo apt-get install texlive-humanities
+\end{sourcecode}
+
+\subsection{\LaTeX{} distribution}
+
+This package is included both in \TeX{}Live and MiK\TeX{}. It can be installed by their respective package managers.
+
+\subsection{Manual installation}
+
+\begin{itemize}
+\item Download the lastest archive :
+\begin{description}
+\item[Stable version] \url{http://mirrors.ctan.org/install/macros/latex/contrib/thalie.tds.zip}
+\item[Development version] \url{https://framagit.org/spalax/thalie/repository/archive.zip?ref=main}
+\end{description}
+\item Unzip the archive.
+\item Move file \texttt{tex/latex/thalie/thalie.sty} (or simply \texttt{thalie.sty} if you got the development version) in a \LaTeX{} path.
+\end{itemize}
+
+\part{Usage}
+\label{sec:usage}
+
+\section{Package options}
+\label{sec:options}
+
+Note that any package option can be redefined anywhere in the document: the options given to \cs*{usepackage}\oarg{options}\marg{thalie} as passed as-is to command \cs*{setthalieoptions} (see section \vref{sec:redefine}).
+This makes it possible to have several plays collected in a single document, while applying different styles or options to each play.
+
+\subsection{Space following character commands and stage directions}
+\begin{options}
+ \keybool{xspace}
+ \label{option:xspace}
+ \sinceversion{v0.7} % Add package option \code{xspace}.
+ As commands introducing characters' lines and displaying characters' names may be frequently used, it might be tempting to omit the following \code{\{\}}. For instance, one might prefer to write:
+
+ \begin{sourcecode}[add-silent-cmds={lebret,cyranoname}]
+ \lebret \cyranoname n'est pas là.
+ \end{sourcecode}
+
+ instead of:
+
+ \begin{sourcecode}[add-silent-cmds={lebret,cyranoname}]
+ \lebret \cyranoname{} n'est pas là.
+ \end{sourcecode}
+
+ If package option \option{xspace} is set (e.g. \keyis{xspace}{true}), space is automatically added after those commands if necessary\footnote{This is done with the \cs*{xspace} command (from the \pkg{xspace} package), hence the name.};
+ otherwise, it is not.
+ The same rule applies after a \cs{did} command.
+
+ For historical reasons, the option \option{xspace} default is \keyis{xspace}{true}, but this might change in some later non-backward compatible version.
+\end{options}
+
+\subsection{Style}
+
+The way characters' lines are displayed, as well as play, act and scene titles, can be set when loading the options.
+
+\begin{options}
+ \keychoice{characterstyle}{bold,margin,center,\default{simple},arden,imprimerie-verse,imprimerie-prose}
+ Set character style. Available styles, and indication to use a custom one, are described in section \vref{sec:lines}.
+
+ \keychoice{playstyle}{center,bigcenter,\default{box},custom}
+ Set play style. Available styles, and indication to use a custom one, are described in section \vref{sec:sectionstyles}.
+
+ \keychoice{actstyle}{center,\default{bigcenter},box,custom}
+ Set act style. Available styles, and indication to use a custom one, are described in section \ref{sec:sectionstyles}.
+
+ \keychoice{scenestyle}{\default{center},bigcenter,box,custom}
+ Set scene style. Available styles, and indication to use a custom one, are described in section \ref{sec:sectionstyles}.
+\end{options}
+
+
+\subsection{Sectioning levels}
+
+If you use a table of contents, or if you also use \enquote{usual} sectioning commands (\cs{chapter}, \cs{section} and so on), the relative importance of plays, acts and scenes is important.
+
+\begin{options}
+ \keychoice{playlevel}{part,\default{chapter},section,subsection,subsubsection,paragraph,subparagraph}
+ Set play level in the table of contents.
+
+ \keychoice{actlevel}{part,chapter,\default{section},subsection,subsubsection,paragraph,subparagraph}
+ Set act level in the table of contents.
+
+ \keychoice{scenelevel}{part,chapter,section,\default{subsection},subsubsection,paragraph,subparagraph}
+ Set scene level in the table of contents.
+
+ \keychoice{interludelevel}{play,\default{act},scene}
+ Setting the interlude level is slightly different. When setting it using \key{interludelevel}{level}, instead of choosing one of \LaTeX{} vanilla sectioning levels as the level, you may choose one of \choices{play,\default{act},scene}. It defines if an interlude is at the same level as a play, an act or a scene.
+\end{options}
+
+\subsection{Redefining options}
+\label{sec:redefine}
+\sinceversion{v0.9a} % New command \cs{setthalieoptions}.
+
+\begin{commands}
+ \command{setthalieoptions}[\marg{package options}]
+ Packages options can be reset in the document body using this command.
+ Its only argument has the same syntax as the package options (see section \vref{sec:options}).
+
+ For instance, if you are writing a collections of plays, some in prose, some in verses, you might want to write something like the following.
+
+ \begin{sourcecode}
+ \documentclass{book}
+ \usepackage{thalie}
+ \begin{document}
+
+ \play{First play}
+ \setthalieoptions{characterstyle=imprimerie-verse}
+ ...
+
+ \play{Second play}
+ \setthalieoptions{characterstyle=impriemie-prose}
+ ...
+
+ \end{document}
+ \end{sourcecode}
+\end{commands}
+
+\section{Commands and Environments}
+
+\subsection{Sectioning}
+\label{sec:sectioning}
+Here begin the parts explicitly relating to drama.
+
+\subsubsection{Levels}
+
+To introduce a new play, act or scene, use commands \cs{play}, \cs{act} and \cs{scene}.
+Their behaviour is as close as the \enquote{usual} sectioning commands (\cs{chapter}, \cs{section} and so on) as possible, i.e.:
+
+\begin{itemize}
+ \item Their signature is \cs{play}\oarg{short title}\marg{longtitle} (the optional short title is the one used in the table of content, and in headers and footers).
+ \item A starred version (\cs{play}\sarg, \cs{act}\sarg{} and \cs{scene}\sarg) is provided, which inserts a play (or act, or scene) which is not numbered, and does not insert any line in the table of content.
+ \item Headers and footers are changed (more information in section \vref{sec:header}).
+\end{itemize}
+
+Both commands \cs{act} and \cs{scene} (and their starred versions) are designed to
+deal with empty titles. Indeed, it is common not to give any name to acts and
+scenes.
+
+By default, a play is as deep (regarding to the table of contents) as a
+chapter, an act as a section, and a scene as a subsection. But this can be
+set using package options \option{playlevel}, \option{actlevel} and \option{scenelevel} (see
+packages options, page \pageref{sec:options}). That way, you can use in your
+document plays, acts and scenes as well as chapters, sections and so on. It
+can be useful if you want a foreword, and appendix, etc.
+
+It is not compulsory to use all three commands \cs{play}, \cs{act} and \cs{scene}.
+The rule of thumb is: if only one element exists, skip the corresponding
+command: if your document has a single play, you should ignore \cs{play}; if
+your document has several single act plays, set
+\keyis{playlevel}{section}, \keyis{scenelevel}{subsection}, and ignore \cs{act}; etc.
+
+\begin{commands}
+ \command{play}[\oarg{short title}\marg{long title}]
+ Start a new play (see above).
+
+ \command{act}[\oarg{short title}\marg{long title}]
+ Start a new act (see above).
+
+ \command{scene}[\oarg{short title}\marg{long title}]
+ Start a new scene (see above).
+
+ \command{interlude}[\sarg\oarg{short title}\marg{long title}]
+ Insert an interlude, which is an act or a scene which is not numbered, but which should appear in the table of content (unless the starred version is used).
+
+ You may choose the sectioning level an interlude is equivalent to in the package options.
+ If your interludes are acts, use \keyis{interludelevel}{act};
+ if they are scenes, use \keyis{interludelevel}{scene}.
+
+ \command{curtain}
+ At last, to mark the end of an act or of the play, you can use command \cs{curtain}, which prints the word \cs{GetTranslation}\Marg{Curtain} in the middle of its own line.
+\end{commands}
+
+\subsubsection{Title styles}
+\label{sec:sectionstyles}
+
+Several styles are available to render play, act and scene titles. Choose them using package options \option{playstyle}, \option{actstyle}, and \option{scenestyle}.
+Default is \keyis{playstyle}{box}, \keyis{actstyle}{bigcenter}, \keyis{scenestyle}{center}.
+
+\paragraph{Custom titles}
+Unfortunately, as play, act and scene titles are not considered (by \LaTeX{}) as usual sections, package \pkg{titlesec}\footnote{\url{http://www.ctan.org/pkg/titlesec}} cannot be used to use alternative section titles.
+Here is the way to set your own one.
+
+When loading the package, use \keyis{actstyle}{custom} as the style of the title you want to customize.
+Then, commands \cs{customact}\marg{counter}\marg{title} and \cs{customact}\sarg\marg{title} will be called by this package to render titles.
+You \emph{must} define them.
+Example \vref{ex:custom} gives the example of the definition of the \code{center} style.
+
+The first argument of \cs{customact} is the label of the act being printed
+(that is, \cs{theact} for an act, \cs{theplay} for a play, etc.),
+its second argument is its title.
+Command \cs{customact}\sarg{} only has one argument, which is the act title.
+
+\subsubsection{Labels and counters}
+
+Using the same tools as \cs{chapter}, \cs{section} and so on, it is possible to
+define the way counters of plays, acts and scenes are displayed. You can do
+this by redefining \cs{theplay}, \cs{theact} and \cs{thescene}. For example, to
+have acts numbered using letters, use: \verbcode|\renewcommand{\theact}{\Alph{act}}|.
+
+\subsubsection{Headers and footers}
+\label{sec:header}
+
+Once again, similar tools as those used by \cs{section} are provided to deal with headers and footers. When introducing, a new play, act or scene, respectively, commands \cs{playmark}\marg{label}, \cs{actmark}\marg{label} and \cs{scenemark}\marg{label} are called, so that titles can be used in headers and footers.
+If the default behaviour does not suit you (which should be the case if you did not choose the default option for \option{playlevel}, \option{actlevel} or \option{scenelevel}), you can redefine them.
+
+Examples are given in section \vref{sec:examples:headers}.
+
+\subsection{Dramatis person\ae}
+\label{sec:dramatis}
+This part explains how to build and display the dramatis person\ae{}.
+
+Definition of characters is done in document body.
+As it is possible to have several plays in a single documents (for a
+collection of plays or sketches), it is possible to define several
+dramatis person\ae{}. A new one disables the character commands
+defined by the previous one.
+
+\begin{environments}
+ \environment{dramatis}[\Oarg{\choicekey{hidden}{yes,\default{no}}, \key{defaultcast}{}}]
+ Definition of characters is done inside the \env{dramatis} environment.
+
+The following options can be set.
+
+ \begin{options}
+ \keychoice{hidden}{true,\default{false}}
+ If the \option{hidden} option is set to \code{true} (or given without any argument), the dramatis person\ae{} is not printed (its only purpose is then to define the character commands). Default value is \code{false} (that is: dramatis person\ae{} is not hidden).
+
+ \meta{defaultcast}{default}\Default
+ \sinceversion{v0.13a} % New option \option{defaultcast}.
+ Default value of the \option{cast} option of command \cs{character} (see section \vref{sec:cast}).
+ \end{options}
+\end{environments}
+
+
+Then, several commands are available to define characters, and organize
+character definitions.
+
+\subsubsection{Character definition}
+\paragraph{Basic definition}
+\label{sec:basiccharacter}
+
+To define a character, use command \cs{character}.
+
+\begin{commands}
+ \command{character}[\Oarg{\key{cmd}{command}, \key{drama}{dramatis}, \key{desc}{description}, \key{cast}{cast}}\marg{name}]
+
+ \begin{options}
+ \opt{name}
+ The mandatory argument is the name of the character, as it will appear to introduce each of their line. It is later possible to redefine it using command \cs{setcharactername} (see part \vref{setcharactername}). Optional arguments are:
+ \keyval{desc}{description}
+ Description of the character, displayed in the dramatis person\ae{}.
+ \keyval{cmd}{command}
+ Name of the control sequence that will be used to introduce this character's lines in the remaining part of your play.
+ \keyval{drama}{dramatis}
+ Name of the character, as it will appear in the dramatis person\ae{}. The name of the character (mandatory argument) is used as a default value.
+ \keyval{cast}{cast}
+ Name of the actor or actress playing this character, displayed in the dramatis person\ae{}. More information in section \vref{sec:cast}.
+ \end{options}
+\end{commands}
+
+If \option{cmd} is defined, this command creates two new commands: \cs*{\meta{cmd}} and \cs*{\meta{cmd}name}.
+The first one is used to introduce a character's line.
+The second one prints the character's name.
+An error is raised if a command with any of these two names already exists.
+
+An example of the use of this command is given in section \vref{sec:character_example}.
+
+\paragraph{Special character definition}
+
+Although optional arguments are not mandatory, not defining them, or leaving the mandatory argument blank, have special meaning. The combination are summed up in the following table, where a cross \(\times\) means that the corresponding combination is forbidden. The superscript number refers to the list of special character definitions (right after the table).
+
+\begin{center}
+\begin{tblr}{rr*{4}{X[co=1,c,m]}}
+ \toprule
+ && \SetCell[c=2]{c} empty \option{name} && \SetCell[c=2]{c} \option{name} \\
+ && no \option{cmd} & \option{cmd} & no \option{cmd} & \option{cmd} \\
+ \midrule
+ \SetCell[r=2]{r} no \option{drama} & no \option{desc} & \(\times\) & \(\times\) &\(\times\) & default\textsuperscript{\ref{character:default}} \\
+ \cmidrule{2-6}
+ & \option{desc} & {description\\ only\textsuperscript{\ref{character:description}}} & \(\times\) & \(\times\)& default\textsuperscript{\ref{character:default}} \\
+ \midrule
+ \SetCell[r=2]{r} \key{drama}{drama} & no \option{desc} & silent\textsuperscript{\ref{character:silent}} & \(\times\) & \(\times\)& default\textsuperscript{\ref{character:default}} \\
+ \cmidrule{2-6}
+ & \option{desc} & silent\textsuperscript{\ref{character:silent}} & \(\times\) & \(\times\)& default\textsuperscript{\ref{character:default}} \\
+ \midrule
+ \SetCell[r=2]{r} \keyis{drama}{} & no \option{desc} &\(\times\) & \(\times\) & \(\times\)& hidden\textsuperscript{\ref{character:hidden}}\\
+ \cmidrule{2-6}
+ & \option{desc} & \(\times\)& \(\times\) & \(\times\)& \(\times\)& \\
+ \bottomrule
+ \SetCell[c=6]{c} Table: \enquote{To define or not to define} options of \cs{character}
+\end{tblr}
+\end{center}
+
+\label{specialcharaclist}
+\begin{enumerate}[(i)]
+\item \label{character:default} \textbf{Default definition (\option{name} and \option{cmd} are given; \option{desc} and \option{drama} may be omitted):} The character is defined as described in section \vref{sec:basiccharacter}. If \option{desc} is omitted, no description appear in the dramatis person\ae{}; if no \option{drama} is given, character in the dramatis person\ae{} has the same name as it will have in the document.
+Example:
+
+\begin{sourcecode}
+ \character[
+ drama={A ghost},
+ desc={the king's ghost},
+ cmd={ghost},
+ ]{The ghost}
+\end{sourcecode}
+
+\item \label{character:description} \textbf{Description only (everything omitted but \option{desc}):} A description is inserted in the dramatis person\ae{}. Useful to add characters such as \emph{The kings' armies}.
+Example:
+
+\begin{sourcecode}
+ \character[desc={The kings' armies}]{}
+\end{sourcecode}
+
+\item \label{character:hidden} \textbf{Hidden character (\option{drama} is empty (defined, but empty), \option{cmd} and \option{name} are defined, \option{desc} is omitted)} Definition of a character that does not appear in the dramatis person\ae{}. In this case, even if defined, the \option{cast} argument is ignored.
+Example:
+
+\begin{sourcecode}
+ \character[drama={}, cmd={postman}]{The postman}
+\end{sourcecode}
+
+\item \label{character:silent} \textbf{Silent character (\option{name} is empty; \option{drama} is defined; \option{desc} may be omitted; \option{cmd} is omitted):} The character only appear in the dramatis person\ae{}. It will not be used elsewhere in the document. An optional description may also appear in the dramatis person\ae{}.
+Example:
+
+\begin{sourcecode}
+ \character[drama={A priest}]{}
+\end{sourcecode}
+
+\end{enumerate}
+
+\paragraph{Group of characters}
+\label{sec:charactergroup}
+\changedversion{v0.6} % Improve alignment of groups of characters.
+
+\begin{environments}
+ \environment{charactergroup}[\oarg{width}\marg{description}]
+ It is possible to group several characters' definition if they have the same description.
+ The optional argument sets the group width (on the left of the brace).
+ See an example on section \vref{sec:charactergroupexample}.
+
+ The effect of this code will be, in the dramatis person\ae{}, to have a nice brace mapping the three characters to their common description.
+
+ The behaviour of nested \env{charactergroup} environments is undefined%
+ \footnote{It might work; it might not. It might work now, but stop working in the future; it might not work now, but work by accident in the future. Etc.}.
+\end{environments}
+
+\subsubsection{Cast names}
+\label{sec:cast}
+\sinceversion{0.13a} % New option \option{cast}.
+
+The name of the actor or actress playing a character can be displayed next to their name in the dramatis person\ae{}, using the \option{cast} option of the \cs{character} command. Special values are described here; see section \vref{sec:defaultcast} for an example.
+
+\begin{description}
+ \item[\key{cast}{name}] The name given in argument is displayed next to the character definition.
+ \item[\keyis{cast}{}] No cast is displayed.
+ \item[\keyis{cast}{\cs{underline}\Marg{\cs{phantom}\Marg{XXXXXXXXXX}}}] Display a line instead of the cast name: the name of the actor or actress may be added by hand later, when the play has been printed.
+\end{description}
+
+Default value is \keyis{cast}{}, unless something else has been set using option \option{defaultcast} of environment \env{dramatis} (see \vref{sec:dramatis}).
+
+\paragraph{Cast group}
+\sinceversion{v0.13a}
+
+Some characters (or group of characters), like the chorus in Greek tragedy, can be played by several actors and actresses.
+
+See an example in section \ref{sec:castgroupexample}.
+
+\begin{environments}
+ \environment{castgroup}[\Oarg{\key{cmd}{command}, \key{drama}{dramatis}, \key{desc}{description}}\marg{name}]
+ Declare a character, that is played by several cast members. The arguments are the same as the arguments of the \cs{character} command (see section \ref{sec:basiccharacter}), excepted that the \option{cast} option is missing.
+\end{environments}
+
+\begin{commands}
+ \command{cast}[\oarg{cast}]
+ This command is the only one allowed inside a \env{castgroup} environment. It declares a new cast member (its only argument) for this group.
+\end{commands}
+
+\subsubsection{Vertical space}
+
+\begin{commands}
+ \command{characterspace}
+ Command \cs{characterspace} put some vertical space into the dramatis person\ae{}.
+\end{commands}
+
+\subsubsection{Customize style of dramatis person\ae}
+\sinceversion{v0.9a} % Style of the dramatis personae can be customized using environment \env{dramatisenv} and commands \cs{dramatischaracter}, and so on.
+
+A default style is used to display the dramatis person\ae, but it is made to be customized.
+The following commands can be redefined to make dramatis person\ae{} look different.
+They do nothing apart from displaying text (no internal definition, etc.).
+You can redefine them to change the look of the dramatis person\ae{}.
+
+\begin{environments}
+ \environment{dramatisenv}
+ This environment wraps the dramatis person\ae.
+
+ \environment{dramatischaractergroup}[\marg{width}\marg{description}]
+ Renders a group of characters.
+
+ \environment{dramatischaractercastgroup}[\marg{name}\marg{description}\marg{cast}]
+ Renders a group of cast members.
+
+\end{environments}
+
+\begin{commands}
+ \command{dramatischaracter}[\marg{name}\marg{description}\marg{cast}]
+ Renders the character name, description, and cast. It should take care of cases where name or description (but not both) is missing, or cast is empty.
+
+ \command{dramatischaractername}[\marg{name}]
+ Renders the character name.
+
+ \command{dramatischaracterdescription}[\marg{description}]
+ Renders the character description.
+
+ \command{dramatischaractercast}[\marg{cast}]
+ Renders the cast name.
+
+ \command{dramatiscast}[\marg{cast}]
+ Renders the cast name, inside a \env{dramatischaractercastgroup}.
+
+ \command{characterspace} Adds a vertical character space.
+\end{commands}
+
+Section \vref{sec:customdramatis} illustrates how those commands are used.
+
+For example, to render character names in small caps, one would define :
+
+\begin{sourcecode}
+ \renewcommand{\dramatischaractername}[1]{\textsc{#1}}
+\end{sourcecode}
+
+Or to make dramatis person\ae{} include a title, one can define :
+
+\begin{sourcecode}[add-silent-cmds={list}]
+ \renewenvironment{dramatisenv}{%
+ \act*{Dramatis person\ae}%
+ \list{}{\rightmargin1cm\leftmargin2cm}\item[]
+ }{%
+ \endlist%
+ }
+\end{sourcecode}
+
+\subsection{Characters}
+\label{sec:characters}
+This part explains how to define characters, and introduce character's lines.
+
+It has been explained that definition of a character in the dramatis person\ae{} (see \vref{sec:dramatis}) also creates commands used to introduce lines of characters.
+For instance, defining a character using \cs{character}\Oarg{\keyis{cmd}{cyrano}}\Marg{Cyrano} means than Cyrano's lines can now be
+introduced using the following code.
+
+\begin{sourcecode}
+ \cyrano
+ Ah ! non ! c'est un peu court, jeune homme !
+\end{sourcecode}
+
+This would display the name \emph{Cyrano} using the current character style, then his line.
+
+\subsubsection{\enquote{Disposable} characters}
+
+One can need to define characters that are used only once (or a few times).
+
+\begin{commands}
+ \command{disposablecharacter}[\oarg{directions}\marg{name}]
+ This command, used in the body, introduces a line for character \marg{name},
+ with optional stage directions.
+ It is rendered the same way regular characters are rendered,
+ but nothing is added to the dramatis person\ae{}.
+ It is used in section \vref{sec:setcharactername}.
+\end{commands}
+
+This command is also useful to introduce lines of characters in non standard ways, for instance if several characters speak at once.
+See examples in section \vref{ex:severalcharacters}.
+
+\subsubsection{Changing character's name}
+\label{setcharactername}
+
+It is possible to change the name that appears to introduce character's lines
+within the text. This can be used, for example, when a character is first
+refered to as \emph{A voice}, until we learn his real identity, which is
+\emph{Cyrano}. An example is given in section \vref{sec:setcharactername}.
+
+\begin{commands}
+ \command{setcharactername}[\marg{command}\marg{name}]
+ \begin{options}
+ \opt{command}
+ Control sequence used to introduce this character's line.
+ \opt{name}
+ Name to display for this character.
+ \end{options}
+\end{commands}
+
+\subsubsection{Lines}
+\label{sec:lines}
+To introduce characters' lines, use the commands defined in the character
+definition (see the \cs{character} command, or the example in section
+\vref{sec:character_example}).
+
+\paragraph{Choose style}
+Several styles are available, to typeset character's name and lines in
+different ways. Change the style by loading package using option
+\key{characterstyle}{style} (available styles are
+ \code{bold},
+ \code{center},
+\code{margin},
+\code{simple},
+\code{imprimerie-verse},
+\code{imprimerie-prose}).
+A few notes:
+\begin{itemize}
+ \item \code{simple} Default style.
+ \item\sinceversion{v0.6} % Add styles \code{imprimerie-verse} and \code{imprimerie-prose}.
+ \code{imprimerie-verse} and \code{imprimerie-prose} French \emph{de facto} standards for typesetting drama plays, respectively in verse and in prose, as defined by the \emph{Imprimerie nationale} \cite{imprimerienationale}.
+ \item\sinceversion{v0.6} % Add styles \code{arden}.
+ \code{arden} Mimick typesetting of the Arden Shakespeare series.
+ \item \code{bold} Needs a sans serif font to be defined (it should be done by default with latin alphabets, but must be done by hand with languages using non latin characters (greek, hindi, etc.)).
+\end{itemize}
+
+\paragraph{Customize style}
+If available styles does not fit your need, you can also define your own one.
+To do so, you can redefine the following commands.
+
+\begin{commands}
+ \command{speakswithoutdirection}[\marg{name}]
+ Invoked to display a character's name to introduce their line. It takes one argument, which is the character's name.
+
+ \command{speakswithdirection}[\marg{name}\marg{direction}]
+ Also invoked to display a character's name to introduce their line, but it takes a second argument, which is stage directions to be printed together with character's name.
+\end{commands}
+
+See also section \vref{sec:directions} to see other ways to print stage directions.
+
+\subsection{Stage directions}
+\label{sec:directions}
+\changedversion{0.12a} % The \option{xspace} option also affects \cs{did}.
+
+Let us begin with a warning: since we could not figure out a nice command
+name made from \enquote{stage directions}, we used the French word
+\emph{(\textfrench{didascalie})} to build up command names.
+
+We define two ways to render stage directions: a short one, that is printed
+inline, and a long one, printed in its own paragraph\footnote{For people writing math:
+They act a bit like \texttt{\bbackslash(1+1=2\bbackslash)} and \texttt{\bbackslash[1+1=2\bbackslash]} for formulas.}.
+
+\begin{commands}
+ \command{did}[\marg{directions}]
+ Display a stage direction inline.
+\end{commands}
+
+\begin{environments}
+ \environment{dida}
+ Display a stage direction in its own paragraph.
+\end{environments}
+
+Note that option \option{xspace} may be used to automatically add a space,
+if necessary, after a \cs{did} command (see section \vref{option:xspace}, page \pageref{option:xspace}).
+
+\begin{commands}
+ \command{onstage}[\marg{directions}]
+Some stage directions are displayed centered under the scene or act
+definition (I often see it in classical drama, where the list of characters
+appearing in each scene is displayed that way).
+This command can be used to display such information.
+
+\command{pause}
+As we often need to mark pauses in theater, we created the command \cs{pause},
+which is a shortcut for \verbcode|\did{\GetTranslation{Pause}}|.
+\end{commands}
+
+\subsection{Splitting verses}
+\sinceversion{v0.7} % New commands \cs{pauseverse}, \cs{resumeverse}, and \cs{adjustverse}.
+\changedversion{v0.10c} % Document different implementations of \cs{pauseverse} and \cs{resumeverse}.
+
+When writing verses, it is sometimes useful to split a verse between two
+characters: the first character starts it in their line, and the second one
+finishes it in a second line. Visually, the start of the second line is
+vertically aligned to the end of the first line.
+
+\danger
+Warning: this is still experimental. I present several recipes to achieve this, but they all have their pros and cons.
+
+The recipes presented below all implement macros \cs{pauseverse} and \cs{resumeverse}.
+See section \vref{sec:splitverse} for an example.
+
+\begin{commands}
+\command{pauseverse}
+Used at the end of the verse to be continued.
+\command{resumeverse}
+Used at the beginning of the continuing verse.
+\end{commands}
+
+When writing a play in verse, one can use a lot of those commands, which can
+be tedious because of their long names. So, defining \enquote{shortcuts} of those
+commands can be handy, as in the following example.
+
+
+\begin{sourcecode}
+ \newcommand{\pv}{\pauseverse}
+ \newcommand{\rv}{\resumeverse}
+\end{sourcecode}
+
+
+This is not done by default, because short command names are a scarce ressource
+in \LaTeX, so, defining these commands by default might conflict with other
+packages, while most of \pkg*{thalie} users will not use them.
+
+\subsubsection{Which recipe should I use?}
+
+As I have already stated, there are several ways to achieve this, but none of them is perfect.
+
+\begin{itemize}
+\item Do try the first recipe (section \ref{split-latex}). If it works, stick to it. Otherwise…
+\item If you do not mind loading the \texttt{TikZ} package, use it (section \ref{split-tikz}). As far as I know, from a user point of view, it is the easiest recipe to use, with the less bugs. Otherwise…
+\item You can try building you own commands (section \ref{split-hanging}). Otherwise…
+\item The last recipe (section \ref{split-phantom}) always works. It is far less user-friendly, but it does the job.
+\end{itemize}
+
+\subsubsection{Recipe 1 : Pure \LaTeX}
+\label{split-latex}
+
+\danger
+Warning: I do not understand the code behind this feature. I copied-pasted code by David Carlisle\footnote{Originally written as an answer to a StackExchange question: see \url{https://tex.stackexchange.com/a/107727}.} without understanding it. There are \sout{probably} bugs\footnote{One on them lead to the next recipe.}, but I won't be able to solve them.
+
+The implemented macros \cs{pauseverse} and \cs{resumeverse} are written in pure \LaTeX (without any external package). For backward compatibility reasons, this will remain the default implementation for some time…
+
+If the character names are displayed on the same line as the verse, the lines
+are not aligned the way one would expect them to. To correct this, command
+\cs{adjustverse}\marg{length} can be used to add an extra (possibly negative)
+space when calling \cs{resumeverse}, to get a correct alignment.
+See section \vref{sec:splitverse-adjusted}, for an example of those three commands.
+
+The young inexperienced fool\footnote{Me…} who originally wrote those commands had not noticed that \cs{adjustverse} is needed because \cs{resumeverse} does not take into account the length of the character names, in styles where it appears on the same line as the verse. This (probably) won't be fixed, because some people might be using this, and fixing this might break their document.
+
+If you encounter the same issue, you might prefer one of the other recipes.
+
+\subsubsection{Recipe 2 : With package \texttt{hanging}}
+\label{split-hanging}
+
+\danger
+Warning: This is a do-it-yourself recipe.
+
+The bug announced at the end of the previous recipe, has been spotted and partially corrected by egreg on StackExchange\footnote{\url{https://tex.stackexchange.com/a/545326}}. He proposes the following code to fix this.
+
+
+\begin{sourcecode}[add-silent-cmds={brokenverse,hangpara}]
+ \usepackage{hanging}
+
+ \newlength{\brokenverse}
+ \renewcommand*{\speakswithoutdirection}[1]{%
+ \settowidth{\brokenverse}{\textsc{#1}.}%
+ \hangpara{2\parindent}{1}\noindent\textsc{#1}.%
+ }
+ \makeatletter
+ \renewcommand{\resumeverse}{%
+ \hspace{\@verseadjust}\hspace{\dimexpr\dimen\@ne-\brokenverse-2em}
+ }
+ \makeatother
+\end{sourcecode}
+
+
+This code ignores the choosen style (it actually redesigns it), and it only works with lines without character directions. If needed, you should also define a \cs{speakswithdirection} command to implement the same feature.
+
+\subsubsection{Recipe 3 : With package \texttt{TikZ}}
+\label{split-tikz}
+
+As far as I know, this recipe is the best one, from a user point of view. But it loads the \texttt{TikZ} package, which is a huge package to implement such a tiny feature\footnote{In French, we would say : \enquote{\foreignlanguage{french}{Un marteau-pilon pour écraser une mouche}} (a far too heavy solution for a tiny problem).}.
+
+\begin{sourcecode}[add-silent-cmds={usetikzlibrary,tikzset,draw,tikzmark,iftikzmark,tikzmath}]
+ \usepackage{tikz}
+ \usetikzlibrary{tikzmark}
+ \usetikzlibrary{math}
+ \newcounter{thalieverse}
+ \tikzset{tikzmark suffix=-\thethalieverse}%
+ \renewcommand{\pauseverse}{%
+ \stepcounter{thalieverse}
+ \tikzmark{thaliepauseverse}
+ }
+ \renewcommand{\resumeverse}{%
+ \tikzmark{thalieresumeverse}%
+ \iftikzmark{thaliepauseverse}{%
+ \begin{tikzpicture}[remember picture]%
+ % Uncomment to see "pause" and "resume" tikz marks.
+ %\draw[overlay,green, ultra thick] (pic cs:thaliepauseverse) -- (pic cs:thalieresumeverse);%
+ \tikzmath{
+ coordinate \c;
+ \c1 = (pic cs:thaliepauseverse);
+ \c2 = (pic cs:thalieresumeverse);
+ \width = max(0, \cx1 - \cx2);
+ }
+ % Set opacity to 1 to see the space
+ \draw[opacity=0, black, line width=1ex] (0, 0) -- (\width pt, 0);
+ \end{tikzpicture}%
+ }{}%
+ }
+\end{sourcecode}
+
+
+This recipe is implemented in the \href{https://framagit.org/spalax/thalie/-/blob/main/examples/henry.tex}{\texttt{examples/henry.tex}} file in the repository of this project.
+
+\subsubsection{Recipe 4 : With \texttt{\textbackslash{}phantom\{\}}}
+\label{split-phantom}
+
+At last, if nothing else workd, this feature can also be implemented using the \cs{phantom} command (see section \vref{sec:splitverse-phantom} for an example).
+It is far less user-friendly, but it is also less error prone. Choose wisely…
+
+\section{Localization and Internationalization}
+\label{sec:i18n}
+
+\subsection{Localization}
+\sinceversion{v0.9a} % Add section \emph{Localization} to the documentation.
+\label{sec:l10n}
+
+By default, commands \cs{act}, \cs{scene}, etc. use English words, but they are
+translated to the current language used by \pkg{babel} or
+\pkg{polyglossia}\footnote{Given that someone provided the translation. See
+section \vref{sec:languages} for the list of available languages.}.
+
+
+Language cannot be defined directly in this package. Instead, the language
+currently used by \pkg{babel} or \pkg{polyglossia} is used to translate the following
+words (with or without capital letter, singular or plural): \emph{play},
+\emph{act}, \emph{scene}, \emph{interlude}, \emph{pause}, \emph{curtain}.
+
+If the option for your language does not exist\footnote{You can also send me the translation for your language, to improve this package.},
+or if you want to change the default words used here, you can set your own translation using command \cs{DeclareTranslation}
+(see the \pkg{translations} package for more information).
+\changedversion{v0.9a} % Use package \pkg{translations} to handle translations.
+For instance use
+\verbcode|\DeclareTranslation{Spanish}{Curtain}{Telòn}| for Spanish\footnote{I may be wrong: I cannot speak Spanish.}.
+
+See section \vref{sec:languages} for the list of supported languages.
+
+\subsubsection{Common translations}
+
+Commands defined here are shorter versions of strings commonly translated.
+
+\begin{commands}
+ \command{playname}
+ Shortcut for \verbcode|\GetTranslation{Play}|.
+
+ \command{actname}
+ Shortcut for \verbcode|\GetTranslation{Act}|.
+
+ \command{scenename}
+ Shortcut for \verbcode|\GetTranslation{Scene}|.
+
+ \command{interludename}
+ Shortcut for \verbcode|\GetTranslation{Interlude}|.
+
+ \command{pausename}
+ Shortcut for \verbcode|\GetTranslation{Pause}|.
+
+ \command{curtainname}
+ Shortcut for \verbcode|\GetTranslation{Curtain}|.
+\end{commands}
+
+\subsection{Non-latin alphabets}
+
+This package should work with languages using non-latin alphabets (greek, hindi, etc.). However, here are a few remarks.
+
+\begin{itemize}
+\item The \code{bold} character style (see section \vref{sec:lines}) can only be used if a sans serif font has been defined. For instance, for hindi, you might write in the preamble: \verbcode|\newfontfamily\hindifontsf{Noto Sans Devanagari}|.
+\end{itemize}
+
+\subsection{Language specific comments}
+\label{sec:languages}
+
+The following languages are available:
+
+\begin{description}
+ \item[English]~
+ \begin{itemize}
+ \item The \code{arden} character style tries to mimick the typestting of the Arden Shakespeare series.
+ \end{itemize}
+ \item[French]~
+ \begin{itemize}
+ \item The \code{imprimerie-verse} and \code{imprimerie-prose} character styles implements the French \emph{de facto} standards for typesetting drama plays, respectively in verse and in prose, as defined by the \emph{Imprimerie nationale} \cite{imprimerienationale}.
+ \item The same book \cite{imprimerienationale} states that act numbers should be typeset in capital roman numerals (which is done by default with \pkg{thalie}), and that scene numbers should be typeset in small capital roman numerals, which is \emph{not} the default, but can be achieved by adding the following line in the preamble: \verbcode|\renewcommand{\thescene}{\textsc{\roman{scene}}}|.
+ \end{itemize}
+ \item[German]
+ \sinceversion{v0.10a} % New translation: German (thanks Ekkart Kleinod).
+ \item[Italian]
+ \sinceversion{v0.11a} % New translation: Italian (thanks Giuseppe Palma).
+\end{description}
+
+I am not a linguist or dramatist in any of those languages. If you have interesting advice for those languages that you would like to share (preferably with a reference to a reliable source), I would be happy to add them to this list!
+
+\appendix
+\part{Appendix}
+
+\section{Examples}
+\label{sec:examples}
+\sinceversion{v0.9a} % New section in the documentation: Examples.
+
+\subsection{Dramatis person\ae}
+
+\subsubsection{Character definition}
+\label{sec:character_example}
+
+\begin{lang}{french}
+ \begin{example}[add-silent-cmds={lebret,cyrano,cyranoname,bellerosename}]
+ \begin{dramatis}
+ \character[cmd={cyrano}, drama={Cyrano de Bergerac}]{Cyrano}
+ \character[cmd={lebret}]{Le Bret}
+ \character[cmd={bellerose}]{Bellerose}
+ \end{dramatis}
+
+ \bigskip
+
+ \lebret[à \cyranoname, lui prenant le bras]
+ Çà, causons !\ldots
+
+ \cyrano
+ Laisse un peu sortir cette cohue\ldots{}
+ \did{À \bellerosename.}
+ Je peux rester ?
+\end{example}
+\end{lang}
+
+\subsubsection{Define a group of characters}
+\label{sec:charactergroupexample}
+
+\begin{example}
+ \begin{dramatis}
+ \begin{charactergroup}[2.5cm]{Officers}
+ \character[desc={a soldier}, cmd=marcellus]{Marcellus}
+ \character[desc={a soldier}, cmd=bernardo]{Bernardo}
+ \end{charactergroup}
+ \end{dramatis}
+\end{example}
+
+\subsubsection{Define a cast group}
+\label{sec:castgroupexample}
+
+\begin{french}
+ \begin{example}
+ \begin{dramatis}
+ \character[cmd=narses, cast={Raymone}]{La femme Narsès}
+ \begin{castgroup}[drama={Les Euménides}]{}
+ \cast{Marthe Herlin}
+ \cast{Monique Mélinand}
+ \cast{Denise Pezzani}
+ \end{castgroup}
+ \begin{castgroup}[drama={Les petites Euménides}]{}
+ \cast{Véra Pharès}
+ \cast{Nicole Munié-Berny}
+ \cast{Clairette Fournier}
+ \end{castgroup}
+ \character[cmd=mendiant, cast={Louis Jouvet}]{Le Mendiant}
+ \end{dramatis}
+ \end{example}
+\end{french}
+
+\subsubsection{Example of \texttt{defaultcast}.}
+\label{sec:defaultcast}
+
+We already know that John Doe will play Astérix.
+Actors for Obélix and Cléopatre have not been found yet.
+Idéfix will be played by a puppet: no need to put a cast name.
+
+\begin{lang}{french}
+ \begin{example}
+ \begin{dramatis}[defaultcast={\underline{\phantom{XXXXXXX}}}]
+ % Explicit cast
+ \character[desc={guerrier gaulois}, cast={John Doe}, cmd=asterix]{Astérix}
+ % Default cast
+ \character[desc={sculpteur de menhir, ami du précédent}, cmd=obelix]{Obélix}
+ \character[desc={reine d'Égypte}, cmd=cleopatre]{Cléopatre}
+ % No cast
+ \character[desc={chien d'Obélix}, cast={}, drama={Idéfix}]{}
+ \end{dramatis}
+ \end{example}
+\end{lang}
+
+\subsubsection{Commands used to display the dramatis person\ae.}
+\label{sec:customdramatis}
+
+\begin{sourcecode}
+ \begin{dramatis}
+ \character[cmd=queen]{The queen}
+ \character[cmd=king, desc={the queen's husband.}]{The king}
+ \begin{charactergroup}{Lords and ladies}
+ \character[drama={Lord Foo}]{}
+ \character[desc={Lord Foo's sister.}, drama={Lady Bar}]{}
+ \character[desc={Lord and Lady Baz.}]{}
+ \end{charactergroup}
+ \characterspace
+ \character[desc={Several servants}]{}
+ \begin{castgroup}[drama={Chorus}]{}
+ \cast{Jane Doe}
+ \cast{John Doe}
+ \end{castgroup}
+ \end{dramatis}
+\end{sourcecode}
+
+To display the dramatis person\ae{} above, the commands below are called.
+
+\begin{sourcecode}
+ \begin{dramatisenv}
+ \dramatischaracter{The queen}{}{}
+ \dramatischaracter{The king}{the queen's husband.}{}
+ \begin{dramatischaractergroup}[5cm]{Lords and ladies}
+ \dramatischaracter{Lord Foo}{}{}
+ \dramatischaracter{Lady Bar}{Lord Foo's sister.}{}
+ \dramatischaracter{}{Lord and Lady Baz.}{}
+ \end{dramatischaractergroup}
+ \characterspace
+ \dramatischaracter{}{Several servants}{}
+ \begin{dramatischaractercastgroup}{}{Chorus}{}
+ \dramatiscast{Jane Doe}
+ \dramatiscast{John Doe}
+ \end{dramatischaractercastgroup}
+ \end{dramatisenv}
+\end{sourcecode}
+
+Command \cs{dramatischaracter}\marg{name}\marg{description}\marg{cast} is defined as something like the following code (excepted that parts taking care of cases where there is no character name or description is omitted here).
+
+\begin{sourcecode}
+ \newcommand{\dramatischaracter}[3]{ %
+ \dramatischaractername{#1}, \dramatischaracterdescription{#2}\dotfill\dramatischaractercast{#3}\\
+ }
+\end{sourcecode}
+
+\subsection{Custom definition of acts}
+\label{ex:custom}
+
+To redefine the definition of \cs{act}, one can use the following code.
+
+\begin{sourcecode}[add-silent-cmds={WithSuffix}]
+ \newcommand\customact[2]{
+ \begin{center}
+ \textsc{\GetTranslation{Act} #1}
+
+ #2
+ \end{center}
+ }
+ \WithSuffix\newcommand\customact*[1]{
+ \begin{center}
+ #1
+ \end{center}
+ }
+\end{sourcecode}
+
+\subsection{Charcters' lines}
+
+\subsubsection{Introduce lines of several characters at the same time.}
+\label{ex:severalcharacters}
+
+Since \cs{disposablecharacter} can display arbitrary text using the style of
+character names, it can be used to render a custom text when two characters
+are speaking together.
+
+
+\begin{dramatis}[hidden]
+ \character[cmd=alice]{Alice}
+ \character[cmd=bob]{Bob}
+ \character[cmd=eve]{Eve}
+\end{dramatis}
+\begin{example}[add-silent-cmds={eve,alicename,bobname}]
+ \eve
+ Let's open it.
+
+ \disposablecharacter{\alicename and \bobname}
+ No!
+\end{example}
+
+\subsubsection{Change the name of a character}
+\label{sec:setcharactername}
+
+On the first scenes of \emph{Cyrano de Bergerac}, the main character (Cyrano) is somewhere in a crowd, and only appears as \emph{The voice} (\emph{\textfrench{La voix}} in French).
+He appears as Cyrano in the following verses.
+
+\begin{lang}{french}
+ \begin{dramatis}[hidden]
+ \character[desc={Cyrano de Bergerac}, cmd=cyrano]{La voix}
+ \character[cmd=montfleury]{Montfleury}
+ \end{dramatis}
+
+ \begin{example}[add-silent-cmds={cyrano,montfleury}]
+ \cyrano Sortez !
+
+ \disposablecharacter{Le parterre} Oh !
+
+ \montfleury[s'étranglant] \enquote{Heureux qui loin des cours\ldots}
+
+ \setcharactername{cyrano}{Cyrano}
+ \cyrano[surgissant du parterre, debout sur une chaise, les bras croisés, le feutre en bataille, la moustache hérissée, le nez terrible] Ah ! je vais me fâcher !\ldots
+ \end{example}
+\end{lang}
+
+\subsection{Splitting verses}
+
+\subsubsection{Commands used to split verse}
+\label{sec:splitverse}
+\begin{dramatis}[hidden]
+ \character[cmd={hermia}]{Hermia}
+ \character[cmd={theseus}]{Theseus}
+\end{dramatis}
+\begin{example}[add-silent-cmds={hermia,theseus}]
+
+ \setthalieoptions{characterstyle=imprimerie-verse}
+
+ \hermia
+ So is Lysander.\pauseverse
+
+ \theseus
+ \resumeverse In himself he is.
+\end{example}
+
+\subsubsection{Commands used to adjust splitted verse}
+\label{sec:splitverse-adjusted}
+
+\begin{dramatis}[hidden]
+ \character[cmd={hermia}]{Hermia}
+ \character[cmd={theseus}]{Theseus}
+\end{dramatis}
+
+\begin{example}[add-silent-cmds={hermia,theseus}]
+ \setthalieoptions{characterstyle=simple}
+ \adjustverse{-7em}
+
+ \hermia
+ So is Lysander.\pauseverse
+
+ \theseus
+ \resumeverse In himself he is.
+\end{example}
+
+\subsubsection{Commands used to split verse (using the \texttt{\bbackslash{}phantom} command)}
+\label{sec:splitverse-phantom}
+
+\begin{dramatis}[hidden]
+ \character[cmd={hermia}]{Hermia}
+ \character[cmd={theseus}]{Theseus}
+\end{dramatis}
+\begin{example}[add-silent-cmds={hermia,theseus}]
+ \hermia
+ So is Lysander.
+
+ \theseus
+ \phantom{So is Lysander.} In himself he is.
+\end{example}
+
+\subsection{Footnotes}
+
+\paragraph{Add a footnote on a character name}
+
+Adding a footnote on the character name introducing its line cannot be done on the character command defined by the dramatis person\ae. Instead, the \cs{disposablecharacter} command can be used instead.
+
+\begin{sourcecode}[add-silent-cmds={alicename}]
+ \disposablecharacter{\alicename\footnote{An interesting note.}}
+ Hello, world!
+\end{sourcecode}
+
+
+\paragraph{Add a footnote in a stage direction}
+
+Footnote must be protected to be included in stage directions.
+
+\begin{sourcecode}[add-silent-cmds={cyrano}]
+ \cyrano[frappant dans ses mains \protect\footnote{An interesting footnote.}]
+ Une !
+\end{sourcecode}
+
+\subsection{Headers and footers}
+\label{sec:examples:headers}
+
+By default, with the \cls*{article} class, the header of the left page contains the play name, and the header of the right page contains the act number.
+
+\paragraph{Header: Act number on left, scene number on right}
+
+\begin{sourcecode}
+ \renewcommand{\actmark}[1]{%
+ {\markboth{\MakeUppercase{\GetTranslation{Act}}\ \theact\ #1}{}}%
+ }
+ \renewcommand{\scenemark}[1]{%
+ {\markright{\MakeUppercase{\GetTranslation{Scene}}\ \thescene\ #1}}%
+ }
+\end{sourcecode}
+
+\paragraph{Play name of left, act and scene name on right}
+
+\begin{sourcecode}[add-silent-cmds={fancyhf,fancyhead}]
+ \usepackage{fancyhdr}
+ \pagestyle{fancy}
+ \fancyhf{}
+ \fancyhead[RO]{%
+ \textit{\MakeUppercase{%
+ \GetTranslation{Act} \theact{}, %
+ \GetTranslation{Scene} \thescene%
+ }}%
+ }
+ \fancyhead[LE]{\leftmark}
+\end{sourcecode}
+
+\subsection{Line numbers}
+
+Some styles write character names in the left margin, which can overlap with line numbers displayed by package \pkg{lineno}.
+To avoid this, line numbers can be displayed on the right of the page using option \verbcode|[right]| of package \pkg{lineno}.
+
+\section{Change History}
+
+This is a raw copy of the \href{https://framagit.org/spalax/thalie/-/blob/main/CHANGELOG.md}{\textsl{CHANGELOG.md}} file that can be found in the git repository of \pkg*{thalie}.
+
+\markdownInput{CHANGELOG.md}
+
+\addcontentsline{toc}{section}{\refname}
+\begin{thebibliography}{99}
+ \bibitem{imprimerienationale}
+ {Imprimerie nationale},
+ \emph{Lexique des r\`egles typographiques en usage \`a l'Imprimerie nationale},
+ 2002,
+ ISBN : 978-2-7433-0482-9
+ \bibitem{cyrano}
+ {Edmond Rostand},
+ \emph{Cyrano de Bergerac},
+ 1897
+ \bibitem{midsummer}
+ {William Shakespeare},
+ \emph{A Midsummer Night's Dream},
+ 1600
+ \bibitem{electre}
+ {Jean Giraudoux},
+ \emph{Électre},
+ 1937
+ \bibitem{dtxtut}
+ {Scott Pakin},
+ \emph{How to Package Your \LaTeX{} Package --- Tutorial on writing .dtx and .ins files},
+ 2004,
+ \url{http://www.ctan.org/pkg/dtxtut/}
+ \bibitem{clsguide}
+ {The \LaTeX{} Team},
+ \emph{\LaTeXe{} for class and package writers},
+ 2006,
+ \url{http://www.ctan.org/pkg/clsguide}
+ \bibitem{drama}
+ {Matt Swift},
+ \emph{drama --- Production-style stage script in LaTeX},
+ 2001,
+ \url{http://www.ctan.org/pkg/drama}
+ \bibitem{dramatist}
+ {Massimiliano Dominici},
+ \emph{dramatist --- Typeset dramas, both in verse and in prose},
+ 2005,
+ \url{http://www.ctan.org/pkg/dramatist}
+ \bibitem{play}
+ {James Kilfiger},
+ \emph{play --- Typeset drama using \LaTeX{}},
+ 2001,
+ \url{http://www.ctan.org/pkg/play}
+ \bibitem{screenplay}
+ {John Pate},
+ \emph{screenplay --- A class file to typeset screenplays},
+ 2012,
+ \url{http://www.ctan.org/pkg/screenplay}
+ \bibitem{sides}
+ {Wing L Mui},
+ \emph{sides --- A LaTeX class for typesetting stage plays},
+ 2005,
+ \url{http://www.ctan.org/pkg/sides}
+\end{thebibliography}
+
+\end{document}