diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/thalie/CHANGELOG.md | 22 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/thalie/README.md | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/thalie/thalie.pdf | bin | 422776 -> 450577 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/thalie/thalie.dtx | 173 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/thalie/thalie.ins | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/thalie/thalie.sty | 5 |
6 files changed, 175 insertions, 40 deletions
diff --git a/Master/texmf-dist/doc/latex/thalie/CHANGELOG.md b/Master/texmf-dist/doc/latex/thalie/CHANGELOG.md index e95a5af9e5f..2eeac7dfab5 100644 --- a/Master/texmf-dist/doc/latex/thalie/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/thalie/CHANGELOG.md @@ -1,22 +1,28 @@ +* thalie 0.10c (2021-09-26) + + * Document different implementations of (sometimes buggy) \pauseverse and \resumeverse. + + -- Louis Paternault <spalax@gresille.org> + * thalie 0.10b (2019-07-31) * Minor fixes and updates of examples. - -- Louis Paternault <spalax+ctan@gresille.org> + -- Louis Paternault <spalax@gresille.org> * thalie 0.10a (2019-02-24) * New translation: German (thanks Ekkart Kleinod). * Minor documentation updates. - -- Louis Paternault <spalax+ctan@gresille.org> + -- Louis Paternault <spalax@gresille.org> * thalie 0.9b (2017-04-24) * Remove blank page at the beginning of documentation. * Add missing dependency. - -- Louis Paternault <spalax+ctan@gresille.org> + -- Louis Paternault <spalax@gresille.org> * thalie 0.9a (2017-04-22) @@ -43,13 +49,13 @@ * Convert README from text to markdown. * Add examples. - -- Louis Paternault <spalax+ctan@gresille.org> + -- Louis Paternault <spalax@gresille.org> * thalie 0.8 (2015-12-30) * Fix release errors in previous release. - -- Louis Paternault <spalax+ctan@gresille.org> + -- Louis Paternault <spalax@gresille.org> * thalie 0.7 (2015-12-28) @@ -58,7 +64,7 @@ * Add package option `xspace`. * Minor documentation improvements. - -- Louis Paternault <spalax+ctan@gresille.org> + -- Louis Paternault <spalax@gresille.org> * thalie 0.6 (2014-06-26) @@ -68,10 +74,10 @@ * Improve spacing (thanks Caroline). * Several documentation and core improvements. - -- Louis Paternault <spalax+ctan@gresille.org> + -- Louis Paternault <spalax@gresille.org> * thalie 0.5 (2013-06-08) * Initial release. - -- Louis Paternault <spalax+ctan@gresille.org> + -- Louis Paternault <spalax@gresille.org> diff --git a/Master/texmf-dist/doc/latex/thalie/README.md b/Master/texmf-dist/doc/latex/thalie/README.md index a9a4bcec861..c8a50c5a3ef 100644 --- a/Master/texmf-dist/doc/latex/thalie/README.md +++ b/Master/texmf-dist/doc/latex/thalie/README.md @@ -5,17 +5,18 @@ 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.10b (2019-07-31) +- Version 0.10c (2021-09-26) - 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.10b/examples/cyrano.pdf) ([source](https://framagit.org/spalax/thalie/raw/v0.10b/examples/cyrano.tex)) - - [French play, in prose](https://framagit.org/spalax/thalie/raw/v0.10b/examples/domjuan.pdf) ([source](https://framagit.org/spalax/thalie/raw/v0.10b/examples/domjuan.tex)) - - [English play, in prose](https://framagit.org/spalax/thalie/raw/v0.10b/examples/hamlet.pdf) ([source](https://framagit.org/spalax/thalie/raw/v0.10b/examples/hamlet.tex)) + - [French play, in verse](https://framagit.org/spalax/thalie/raw/v0.10c/examples/cyrano.pdf) ([source](https://framagit.org/spalax/thalie/raw/v0.10c/examples/cyrano.tex)) + - [French play, in prose](https://framagit.org/spalax/thalie/raw/v0.10c/examples/domjuan.pdf) ([source](https://framagit.org/spalax/thalie/raw/v0.10c/examples/domjuan.tex)) + - [English play, in prose](https://framagit.org/spalax/thalie/raw/v0.10c/examples/hamlet.pdf) ([source](https://framagit.org/spalax/thalie/raw/v0.10c/examples/hamlet.tex)) + - [English play, in verse](https://framagit.org/spalax/thalie/raw/v0.10c/examples/henry.pdf) ([source](https://framagit.org/spalax/thalie/raw/v0.10c/examples/henry.tex)) License ------- -*Copyright 2010-2019 Louis Paternault* +*Copyright 2010-2021 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) diff --git a/Master/texmf-dist/doc/latex/thalie/thalie.pdf b/Master/texmf-dist/doc/latex/thalie/thalie.pdf Binary files differindex c7105caaecb..cb8be657dfd 100644 --- a/Master/texmf-dist/doc/latex/thalie/thalie.pdf +++ b/Master/texmf-dist/doc/latex/thalie/thalie.pdf diff --git a/Master/texmf-dist/source/latex/thalie/thalie.dtx b/Master/texmf-dist/source/latex/thalie/thalie.dtx index 53230be775d..ec071771689 100644 --- a/Master/texmf-dist/source/latex/thalie/thalie.dtx +++ b/Master/texmf-dist/source/latex/thalie/thalie.dtx @@ -1,5 +1,5 @@ % \iffalse meta-comment -% Copyright 2010-2019 Louis Paternault +% Copyright 2010-2021 Louis Paternault % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -25,7 +25,7 @@ %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{thalie} %<*package> - [2019/07/31 v0.10b A package to typeset drama plays] + [2021/09/26 v0.10c A package to typeset drama plays] %</package> % %<*driver> @@ -34,6 +34,7 @@ \CodelineIndex \RecordChanges \usepackage{array} +\usepackage{csquotes} \usepackage{enumerate} \usepackage{multirow} \usepackage{hyperref} @@ -42,6 +43,7 @@ \usepackage{listings} \usepackage{xcolor} \usepackage{manfnt} +\usepackage[normalem]{ulem} \lstset{ language=[LaTeX]TeX, numbers=left, @@ -137,7 +139,7 @@ % 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+ctan(at)gresille(dot)org}} +% \author{Louis Paternault\\ \texttt{spalax(at)gresille(dot)org}} % % \maketitle % @@ -247,7 +249,7 @@ % \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=master} +% \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. @@ -998,15 +1000,15 @@ No! It's a bit short, young man\ldots % \character[cmd={hermia}]{Hermia} % \character[cmd={theseus}]{Theseus} % \end{dramatis} +% \setthalieoptions{characterstyle=imprimerie-verse} % \begin{LTXexample}[pos=b] -\adjustverse{-7em} - \hermia So is Lysander.\pauseverse \theseus \resumeverse In himself he is. % \end{LTXexample} +% \setthalieoptions{characterstyle=simple} % \iffalse %</example> % \fi @@ -1024,6 +1026,31 @@ So is Lysander.\pauseverse % \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. @@ -1038,23 +1065,12 @@ So is Lysander. % \end{figure} % % \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 probably bugs, but I won't be able to solve them. -% 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 also less error prone. Choose wisely… +% Warning: this is still experimental. I present several recipes to achieve this, but they all have their pros and cons. % % \DescribeMacro{\pauseverse} % \DescribeMacro{\resumeverse} -% \DescribeMacro{\adjustverse} -% -% 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. -% Let us face it: these commands are kind of a hack, and sometimes, 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}, page \pageref{fig:splitverse}, for an -% example of those three commands. +% 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 @@ -1071,10 +1087,120 @@ So is Lysander. %</example> % \fi % -% This is not done by default, because short command names are a scare ressource +% 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} % @@ -1173,10 +1299,10 @@ So is Lysander. \character[cmd=eve]{Eve} \end{dramatis} }] -\alice +\bob Let's open it. -\disposablecharacter{\bobname and \evename} +\disposablecharacter{\alicename and \evename} No! % \end{LTXexample} % \iffalse @@ -1953,6 +2079,7 @@ One! % \subsection{Splitting verses} % \begin{macro}{\pauseverse} % \changes{v0.7}{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. diff --git a/Master/texmf-dist/source/latex/thalie/thalie.ins b/Master/texmf-dist/source/latex/thalie/thalie.ins index d8fc52f6158..f3f7354ba05 100644 --- a/Master/texmf-dist/source/latex/thalie/thalie.ins +++ b/Master/texmf-dist/source/latex/thalie/thalie.ins @@ -1,4 +1,4 @@ -%% Copyright 2010-2019 Louis Paternault +%% Copyright 2010-2021 Louis Paternault %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -21,7 +21,7 @@ \usedir{tex/latex/thalie} \preamble -Copyright 2010-2019 Louis Paternault +Copyright 2010-2021 Louis Paternault This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/latex/thalie/thalie.sty b/Master/texmf-dist/tex/latex/thalie/thalie.sty index 831392a9952..5a84fb47cd6 100644 --- a/Master/texmf-dist/tex/latex/thalie/thalie.sty +++ b/Master/texmf-dist/tex/latex/thalie/thalie.sty @@ -5,7 +5,7 @@ %% The original source files were: %% %% thalie.dtx (with options: `package') -%% Copyright 2010-2019 Louis Paternault +%% Copyright 2010-2021 Louis Paternault %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -23,7 +23,8 @@ %% and the derived file thalie.sty. \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{thalie} - [2019/07/31 v0.10b A package to typeset drama plays] + [2021/09/26 v0.10c A package to typeset drama plays] + \RequirePackage{pgfkeys} \RequirePackage{etoolbox} |