texlive[54666] Master: musical (9apr20)

commits+karl at tug.org commits+karl at tug.org
Sun Apr 12 00:37:50 CEST 2020


Revision: 54666
          http://tug.org/svn/texlive?view=revision&revision=54666
Author:   karl
Date:     2020-04-12 00:37:50 +0200 (Sun, 12 Apr 2020)
Log Message:
-----------
musical (9apr20)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-music.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/musical/
    trunk/Master/texmf-dist/doc/latex/musical/README.md
    trunk/Master/texmf-dist/doc/latex/musical/musical.pdf
    trunk/Master/texmf-dist/doc/latex/musical/musical.tex
    trunk/Master/texmf-dist/tex/latex/musical/
    trunk/Master/texmf-dist/tex/latex/musical/musical.sty
    trunk/Master/tlpkg/tlpsrc/musical.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/musical/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/musical/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/musical/README.md	2020-04-11 22:37:50 UTC (rev 54666)
@@ -0,0 +1,5 @@
+The musical.sty package provides tools for typesetting musical theatre scripts, particularly ones that are still under development. It's designed to make it very easy to print and distribute scripts that comply with generally accepted script formatting standards while not getting in the way of frequent changes, as works under development tend to have. 
+
+Created by Dave Howell (dh.musical at howell.seattle.wa.us), 
+distributed under the usual LATEX Project Public License 1.3c.
+


Property changes on: trunk/Master/texmf-dist/doc/latex/musical/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/musical/musical.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/musical/musical.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/musical/musical.pdf	2020-04-11 22:37:12 UTC (rev 54665)
+++ trunk/Master/texmf-dist/doc/latex/musical/musical.pdf	2020-04-11 22:37:50 UTC (rev 54666)

Property changes on: trunk/Master/texmf-dist/doc/latex/musical/musical.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/musical/musical.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/musical/musical.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/musical/musical.tex	2020-04-11 22:37:50 UTC (rev 54666)
@@ -0,0 +1,250 @@
+\documentclass{article}
+\providecommand*{\url}{\texttt}
+
+\usepackage[symbol,perpage,para,ragged,flushmargin]{footmisc}
+\DefineFNsymbols{dave}[text]{*†‡¤{**}{††}{‡‡}{¤¤}}
+\setfnsymbol{dave}
+
+
+\RequirePackage{xltxtra}
+\setmainfont[Numbers=OldStyle, Mapping=tex-text]{Garamond Premier Pro}
+%\setsansfont[Mapping=tex-text, BoldFont={GillSansMTPro-Bold}, Numbers=OldStyle]{GillSansMTPro-Medium}
+\setmonofont[Mapping=tex-text,Scale = MatchLowercase]{Menlo}
+
+\usepackage{fancyvrb}
+
+\DefineShortVerb[commandchars=+()]{\|}
+\DefineVerbatimEnvironment%
+     {example}{Verbatim}
+     {commandchars=+()}
+\let\ital\textit
+\def\lyricsymbol{{\textsf ♪}}
+
+\newbox\musicalbox
+\newcommand{\spacer}[1]{
+    \setbox\musicalbox\hbox{#1}%
+    \noindent\hbox to \wd\musicalbox{\strut\hfil}%
+}
+
+\begin{document}
+\title{The \textsf{musical} package}
+\author{Dave Howell \\ \url{dh.musical at howell.seattle.wa.us}}
+\date{v. 3.1, April 2020}
+
+\maketitle
+
+\section{Introduction}
+
+Writing a musical is hard. Writing a musical and handing actors a well-formatted script is also hard. Maintaining a well-formatted script while you’re constantly making changes to it is even harder, and doing it without a word processor specifically programmed for scripts is even harder yet. 
+
+|musical.sty| exists because I didn’t want to spend a couple hundred dollars on commercial script-writing software. It is specifically engineered for writing musical musical scripts. As such, it should also work just fine for recreating existing scripts, and for writing not-musical scripts.
+
+In general, as much as possible has been left for standard \LaTeX\ to handle: title page, copyright page, table of contents, and so forth. Acts and Scenes are chapters and sections, so packages that control the appearance of those should (fingers crossed) allow control of the appearance of the script. 
+
+\section{Usage}
+
+ Start with the obvious |\RequirePackage{musical}| in the preamble or in your master style file for the work, along with the usual \TeX-y stuff.  The fun starts when you’re ready to have the cast of characters, aka “Dramatis Personae” appear, traditionally right before the actual script. The script itself is contained in a |\begin{script}...\end{script}| environment. I usually put the environment in my main .tex file, and include the cast list and individual scenes using |\include|.
+
+\subsection{Cast/Character List}
+
+You’ll normally have a list of characters in front of the script. As mentioned, I’m trying to minimize the number of special commands and keeping it as much as possible in familiar territory, so start the cast list with \verb-\chapter{Dramatis Personae}- or \verb-\chapter{Cast}- or whatever you prefer. You can also do \verb-\section{Leads}- and \verb-\section{Ensemble}- if you like, and so forth. 
+
+The key |musical| command in this section is 
+	\begin{example}
+	\addcharacter[+ital(Nickname)]{+ital(Name)}{+ital(Description)}
+	\end{example}
+	
+For example (assuming a musical version of \ital{Romeo and Juliet})
+	\begin{example}
+	\addcharacter[Romeo]{Romeo}{A young man of about sixteen. A Montague.}
+	\addcharacter[Mercutio]{Mercutio}{A friend of Romeo’s}
+	\addcharacter[Dad]{Montague}{Romeo’s father}
+	\addcharacter[Mom]{Lady Montague}{Romeo’s mother}
+	\end{example}
+	
+The nickname is optional, but so very handy, as you’ll see shortly. The result is
+
+	\medskip\begin{tabular}{ll}
+	\textsc{Romeo}&A young man of about sixteen. A Montague.\strut\\
+	\textsc{Mercutio}&A friend of Romeo’s\strut\\
+	\textsc{Montague}&Romeo’s father\strut\\
+	\textsc{Lady Montague}&Romeo’s mother\strut\\
+	\end{tabular}
+	\medskip
+	
+The descriptions will line up across pages, spaced to accomodate the longest name. Note that this is not done with tables. Page breaks will happen wherever they would normally fall. It will usually take two passes before the column widths settle into position. 
+
+\subsection{The Script Proper}
+
+\subsubsection{Acts and Scenes}
+
+As mentioned above, enclose the actual script in a |script| environment. Acts are super-easy: |\act|. This will start a new page and put “Act \ital N” at the top of the page. 
+
+Scenes are similar: |\scene[+ital(Title)]{+ital(Setting)}|. “Setting” is the set or location for the scene. “Title” (if provided) is used both after the “Scene \ital N” section head and in the running heads. Acts are numbered with roman numerals, scenes with arabic ones. “Act III, Scene 4”. Each new |\scene| command increments the scene number, and the |\act| command resets the scene counter to 1. If the |\scene| command does \ital{not} follow an |\act| command (more specifically, if the scene is not scene \#1), then it will start a new page. 
+
+\begin{example}
+	\act
+	\scene{Verona. A public place.}
+\end{example}
+	
+The \ital{formatting} of the act and scene heads is set by invoking |\scripttitles|, in order to include the act and scene counters. If you want to change the formatting, use |\renewcommand{scripttitles}|. Here’s the default, using commands from the |titlesec| package:
+
+\begin{example}
+  \renewcommand{\scripttitles}{%
+    \titlespacing*{\chapter}{0pt}{0cm}{0cm}%
+    \titleformat{\chapter}[block]{\center}{\LARGE\sc Act \Roman{actcounter}}{0pt}{}%
+    \titlespacing*{\section}{0pt}{0pt plus 1\baselineskip}{0pt}%
+    \titleformat{\section}[display]{\center}{\Large\sc Scene \arabic{scenecounter}}{4pt}{\sc}%
+  }
+\end{example}
+	
+\subsubsection{Page Numbers, and Running Heads}
+
+The page number doesn’t reset when the script starts. Depending on how much material you have before Act I, the first page of the script might be page 17. However, within the |\script| environment, page numbers are \ital{Act\#}-\ital{Scene\#}-\ital{Page\#}, so the first page of this hypothetical script might be “I-1-17”. The running head also includes “Act N, Scene n” and, if the scene has an optional title, that’s included as well. The pagestyle is named |scriptheader|, and can also be redefined with the |\fancypagestyle| command from the |fancyhdr| package. 
+
+\subsubsection{Dialog and Stage Directions}
+
+The most commonly used command, of course, is |\dialog{+ital(CharacterName)}{+ital(Spoken Words)}|, or, if you prefer, |\dialogue|. Generally, the spoken words should be one paragraph, but you can put multiple paragraphs in a dialog command if you really want to. The character name will be set Caps/SmallCaps centered above the spoken text, the text will be inset from the margins by |\speechmargin| (default 2em), with a bit of space between it and the previous text. If the text crosses a page boundary, it will start on the next page with “Character Name (cont.)”. 
+
+\begin{example}
+	\dialog{Montague}{Thou villain Capulet, Hold me not, let me go!}
+	\dialog{Lady Montague}{Thou shalt not stir a foot to seek a foe.}
+\end{example}
+
+Remember the nicknames assigned to characters back on the character list pages? They’ve been defined as commands you can use to insert the full character name. 
+\begin{example}
+	\dialog{\Dad}{Thou villain Capulet, Hold me not, let me go!}
+	\dialog{\Mom}{Thou shalt not stir a foot to seek a foe.}
+\end{example}
+
+But an even shorter shortcut is to replace the |\dialog| command with the nickname:
+\begin{example}
+	\Dad{Thou villain Capulet, hold me not, let me go!}
+	\Mom{Thou shalt not stir a foot to seek a foe.}
+\end{example}
+
+Stage directions are created with the |\stdir| command. General stage directions are created outside of |\dialog| commands, while character-specific ones are placed inside |\dialog| commands. In both cases, stage directions are in italics. Character specific ones are also put inside parentheses. You can also use the character nickname shortcuts inside stage directions; they’ll be set using caps and small caps. 
+
+\begin{example}
+	\stdir{Enter \Dad and \Mom}
+	\Dad{Thou villain Capulet, hold me not, let me go!}
+	\Mom{Thou shalt not stir a foot to seek a foe. \stdir{wags finger at \Dad}}
+\end{example}
+
+\noindent\ital{Enter \textsc{Montague} and \textsc{Lady Montague}}
+
+\medskip\centerline{\textsc{Montague}}
+\hspace{2em}Thou villain Capulet, hold me not, let me go!
+
+\medskip\centerline{\textsc{Lady Montague}}
+\hspace{2em}Thou shalt not stir a foot to seek a foe. (\ital{wags finger at \textsc{Montague}})
+
+\medskip
+You can denote a transition (lighting cue, shift in focus, or such) with the |\transition| command. It inserts a row of three asterisks. If it's a musical transition, you can combine a transition mark with a rehearsal mark (described later) by providing the rehearsal mark's name/letter as an optional parameter to the transition: |\transition[G]|. There’s also a |\pause| command to insert that as a stage direction. If you want to include a character in a stage direction for whom there isn’t a defined shortcut, use the |\character| command:
+ 
+\begin{example}
+	\transition[D]
+	\stdir{\character{Rabble} enters, muttering.}
+\end{example}
+\par
+\noindent\hbox to \textwidth{\hfil*\hspace{2em}*\hspace{2em}*\hfil\hbox to 0pt{\hss{(\textit{Rehearsal Mark} \fbox{D})}}}\par
+\noindent\ital{\textsc{Rabble} enters, muttering.}
+\medskip
+
+Note that it’s up to you to use a good-quality font that has actual small caps (not fake ones), and the even rarer italicized small caps, if you care about such things. I hope you do.\footnote{I'm using Garamond Premier Pro for this document. The Minion and Arno font families, for example, also have true italic small caps. If you're not accessing your system fonts through XeTeX, there are packages that provide italic small caps for Computer Modern and Times.}
+
+Finally, it should be possible to include footnotes in dialog and stage directions with the usual |\footnote{+ital(note)}| command. The footnote will drop to the bottom of the page. However, I won't swear that there aren't still some bugs in the footnoting system. 
+
+\subsubsection{Music, Dance, and Lyrics}
+
+Musicals have songs, which means singing, which means lyrics. Mark musical cues with the |\music{+ital(Title)}| command, dance numbers with the equivalent |\dance{+ital(Title)}| command, and lyrics with the |\lyrics{+ital(Character Name)}{+ital(Lyrics)}| command. 
+
+Traditionally, which is to say, since the invention of the typewriter, lyrics were presented in all caps to distinguish them from dialog. This is because typewriters are an abomination against quality typography; “all caps” is an abominable and appalling “solution.” If you \ital{really} want your lyrics capitalized, you can switch them to small caps with |\toggletrue{scaplyrics}|, although I hope you don't.   
+
+Capped or not, lyrics are inset twice as far as dialog on the left side. In order to cut down on the number of wrapped lines, the right margin is the same width as the text block. Unlike dialog, line breaks in lyrics are preserved. Use a |~| to create blank lines between stanzas. Also, the character name is bracketed by a symbol (specifically |\lyricsymbol|), to make it even easier to identify lyrics. You can include stage directions in lyrics as well.
+
+\begin{example}
+	\music{Behold!}
+	\lyrics{\Romeo}{Behold my Juliet! \stdir{points}
+	Upon the parapet.
+	We’re not together yet
+	‘Cause she’s a Capulet.
+	~
+	But soon enough, you’ll see
+	We’ll be in ecstasy. 
+	After from here we flee,
+	And joined eternally.}
+\end{example} 
+\medskip
+
+{\flushright\ital{Music Cue: “Behold!”}
+
+}\centerline{\lyricsymbol~\textsc{Romeo} \lyricsymbol }
+
+\hspace{4em}Behold my Juliet! (\ital{points})\strut
+
+\hspace{4em}Upon the parapet.\strut
+
+\newpage\centerline{\lyricsymbol~\textsc{Romeo} (cont.)\lyricsymbol }
+\hspace{4em}We’re not together yet\strut
+
+\hspace{4em}’Cause she’s a Capulet.\strut
+
+\hspace{4em}~\strut
+
+\hspace{4em}But soon enough, you’ll see\strut
+
+\hspace{4em}We’ll be in ecstasy. \strut
+
+\hspace{4em}After from here we flee,\strut
+
+\hspace{4em}And joined eternally.\strut
+\medskip
+
+If the song is particularly long and/or complicated, you can connect specific spots in the script to specific spots in the score by referencing the score's rehearsal marks with the |\rehearsalmark{+ital(mark)}| command.  For more complicated lyrics, which move between characters mid-line, there’s the |\spacer| command to keep things lined up:
+
+\begin{example}
+	\lyrics{Montagues}{How now?}
+	\lyrics{Capulets}{\spacer{How now?} What’s this?}
+	\lyrics{Montagues}{\spacer{How now? What’s this?} Romeo is missing!}
+	\lyrics{Capulets}{\spacer{How now? What’s this? Romeo is missing!} Juliet has fled?}
+	\rehearsalmark{A}
+	\lyrics{Montagues, Capulets}{How can such a thing have happened?}
+	\lyrics{Montagues}{He’s in a lot of trouble!}
+	\lyrics{Capulets}{\spacer{He’s in a lot of trouble!} She might even be dead!}
+\end{example} 
+
+\centerline{\lyricsymbol~\textsc{Montagues} \lyricsymbol}
+\hspace{4em}\strut How now?
+
+\medskip\centerline{\lyricsymbol~\textsc{Capulets} \lyricsymbol}
+\hspace{4em}\strut\spacer{How now?} What’s this?
+
+\medskip\centerline{\lyricsymbol~\textsc{Montagues} \lyricsymbol}
+\hspace{4em}\strut\spacer{How now? What’s this?} Romeo is missing!
+
+\medskip\centerline{\lyricsymbol~\textsc{Capulets} \lyricsymbol}
+\hspace{4em}\strut\spacer{How now? What’s this? Romeo is missing!} Juliet has fled!
+
+\medskip{\raggedleft\small
+		\vspace{1ex}%
+		{(\textit{Rehearsal Mark} \fbox{A})}\par
+		\vspace{-1ex}}
+\centerline{\lyricsymbol~\textsc{Montagues, Capulets} \lyricsymbol}
+\hspace{4em}How can such a thing have happened?
+
+\medskip\centerline{\lyricsymbol~\textsc{Montagues} \lyricsymbol}
+\hspace{4em}\strut He’s in a lot of trouble!
+
+\medskip\centerline{\lyricsymbol~\textsc{Capulets} \lyricsymbol}
+\hspace{4em}\strut\spacer{He’s in a lot of trouble!} She might even be dead!
+
+\bigskip
+
+You can include table-of-contents-like lists of all the musical cues and dance numbers in your script with |\listofsongs| and |\listofdances|. 
+
+\section{Wrapping Up}
+
+That's pretty much it. If you find this style library useful, please drop me a line. It'd be nice to know I didn't take all this time creating the documentation for no good reason. If you have problems with it, or find a bug, definitely drop me a line. 
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/musical/musical.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/musical/musical.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/musical/musical.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/musical/musical.sty	2020-04-11 22:37:50 UTC (rev 54666)
@@ -0,0 +1,372 @@
+%% musical.sty   version 3.1 (April 2020)
+%% Created by and copyright Dave Howell, February 2018
+%% Email: dh.musical at howell.seattle.wa.us
+%% This is a "maintained" package.
+%% Inspired primarily by stage.cls from Robert Jahrling
+
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, version 1.3
+% 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 consists of the files musical.sty and musical.pdf
+% Version 1.x: 2018/03/20 
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{musical}[2020/04/06 Manuscript Format for stage plays]
+
+% We provide a friendly warning when an option is specified;
+% since musical provides no options, all options return an error.
+\DeclareOption*{%
+	\ClassWarning{stage}{Unknown option `\CurrentOption'}%
+}
+
+% Required to process options, or not process them, I suppose. 
+\ProcessOptions\relax
+
+\RequirePackage{ifthen}
+\RequirePackage{fancyhdr}
+\RequirePackage{etoolbox}
+\RequirePackage{xspace}
+
+\newtoggle{stagedir} % true when we're inside a stage direction
+\newtoggle{dialog} % true when we're inside dialog
+\newtoggle{scaplyrics}
+\togglefalse{scaplyrics} % use \toggletrue{scaplyrics} to set lyrics in Cap/small cap style. 
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%	PAGE FORMATTING
+% use fancy pagestyle
+\pagestyle{fancy}
+
+% Redefining \chapter and \section for acts and scenes.
+\RequirePackage{titlesec}
+\newcommand{\scripttitles}{% redefine  \scripttitles to change how chapters/acts and sections/scenes' headers look. 
+	\titlespacing*{\chapter}{0pt}{0cm}{0cm}%
+	\titleformat{\chapter}[block]{\center}{\LARGE\sc Act \Roman{actcounter}}{0pt}{}%
+	\titlespacing*{\section}{0pt}{0pt plus 1\baselineskip}{0pt}%
+    \titleformat{\section}[display]{\center}{\Large\sc Scene \arabic{scenecounter}}{4pt}{\sc}%
+	\setcounter{tocdepth}{1} % include acts and scenes in the Table of Contents
+}
+
+% If titlecontents for sections is 
+\titlecontents{chapter}[2em]{\pagebreak[2]\addvspace{1ex plus 2ex}}{}{}{\hfill}[\nopagebreak]%
+
+% page numbers are {act}--{scene}--{pagenumber}
+\newcommand{\themusicalpage}{\Roman{actcounter}--\arabic{scenecounter}--\arabic{page}}
+
+%%% Running heads
+\fancypagestyle{scriptheader}{%
+    \fancyhf{}% Reset headers and footers to blank to start
+    \fancyhead[LE,RO]{\themusicalpage}%
+    \fancyhead[RE,LO]{\it Act \Roman{actcounter}, Scene \arabic{scenecounter}%
+    	\ifx\sectionname\undefined\else
+    	    : \sectionname
+    	\fi%
+		}%
+}
+
+% empties center foot; otherwise, the page number would display here.
+\cfoot{}
+
+% Wrapped around the actual play's text. Prob. should 
+% include Dramatis Personae, but currently doesn't.  Hmm. 
+\newenvironment{script}{%
+    \begingroup
+	\setcounter{actcounter}{0}
+	\let\thepage=\themusicalpage
+	\scripttitles
+    \pagestyle{scriptheader}%
+	}{\endgroup
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%	ACTS AND SCENES (CHAPTERS AND SECTIONS)
+
+% Counts acts
+\newcounter{actcounter}
+% We need to initialize actcounter for page numbering.
+\setcounter{actcounter}{0}
+% Counts scenes per act
+\newcounter{scenecounter}[actcounter]
+
+% \act creates an act header with roman numerals, and redefines
+% the running heads to use theatrical-style page numbers 
+\newcommand{\act}{%
+	\stepcounter{actcounter}%
+	\newpage
+	\chapter[Act \Roman{actcounter}]{}
+}
+
+% \scene creates a scene header with arabic numerals
+% There's an optional title for the scene, and a required set description, so
+% \scene{George's Office}
+% \scene[Mad Hatter's Tea Party]{Mad Hatter's House, exterior}
+% if the required parameter is empty, (i.e. \scene{} ) then the Set:#2 won't appear. 
+% Start a new page for each scene except the first
+\newcommand{\scene}[2][\relax]{%
+	\gdef\sectionname{#1}
+	\stepcounter{scenecounter}%
+	\ifthenelse{\value{scenecounter} > 1}{\newpage}{}%
+	\noindent
+    \section{#1}%
+    \def\setdescription{#2}% this holds the setting for the scene
+    \ifdefempty{\setdescription}{}{\stdir{Set: #2}\par}%
+}
+
+\newcommand{\rehe at rsalmark}[1]{%
+    {(\textit{Rehearsal Mark} \fbox{#1})}%
+}
+
+% In sheet music, rehearsal marks are usually boxed letters, so we box it here to match.
+% An alternative would be to use \marginpar to float the rehearsal marks in the margin. 
+\newcommand{\rehearsalmark}[1]{%
+	{\raggedleft\small
+		\vspace{1ex}%
+		\rehe at rsalmark{#1}\par
+		\vspace{1ex}%
+	}
+}
+
+% To denote a transition of some kind. The optional parameter invokes \rehearsalmark on the same line.
+\newcommand{\transition}[1][\relax]{%
+    \noindent\hbox to \textwidth{\hfil*\hspace{2em}*\hspace{2em}*\hfil
+        \if#1\relax
+        \else
+            \hbox to 0pt{\hss\rehe at rsalmark{#1}}%
+        \fi
+    }\par
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%% PARAGRAPH-LEVEL COMMANDS
+
+% How far to inset dialog.
+% Lyrics are inset twice the speech margin. 
+\newlength{\speechmargin}
+\setlength{\speechmargin}{2em}
+
+% tcolorbox is probably overkill, but it made for such an easy solution to the problem.
+% It provides a 
+%   Character Name, continued
+% header for dialog that crosses a page break.
+\usepackage{tcolorbox}
+\tcbuselibrary{breakable,skins}
+% standard dialog is inset by \speechmargin on both sides
+\newtcolorbox{spokentext}{breakable,frame hidden,interior hidden,boxrule=0pt,
+	boxsep=0pt,top=0pt,bottom=0pt,center title,
+    title={\charactername\strut },title after break={\center\charactername~(cont.)\strut },
+	colback=white,left={\speechmargin},right={\speechmargin},colbacktitle=white,coltitle=black,colframe=white
+}
+
+% lyrics ares inset by twice the \speechmargin on the left,
+% but in order to reduce awkward breaks mid-lyric, the right margin
+% goes to the page margin. Because the actual box is now offset to the right,
+% the title (aka the name of the character speaking) has to be offset the other way to 
+% keep it centered on the page.
+\newtcolorbox{lyrictext}{breakable,frame hidden,interior hidden,boxrule=0pt,
+	boxsep=0pt,top=0pt,bottom=0pt,center title,
+    title={\charactername\hspace{2\speechmargin}\strut},title after break={\center\charactername~(cont.)\hspace{2\speechmargin}\strut},
+	colback=white,left={2\speechmargin},right={0pt},colbacktitle=white,coltitle=black,colframe=white
+}
+
+
+% jiggery-pokery to try to make footnotes work reasonably close to usefully. 
+\usepackage[symbol,perpage,para,ragged,flushmargin]{footmisc}
+\DefineFNsymbols{dave}[text]{*†‡¤{**}{††}{‡‡}{¤¤}}
+\setfnsymbol{dave}
+\renewcommand{\thempfootnote}{\fnsymbol{mpfootnote}}
+
+% I've tried a couple of different things to get footnotes to come out right. 
+% Currently, I'm letting everything operate 'normally.'
+% If you want footnotes at the bottom of the dialog box, rather than the bottom of the page,
+% uncomment the \let command in the \dialog command.
+\let\di at logfootnotetext=\relax
+\newcommand{\dialogfootnote}[1]{%
+    \gdef\di at logfootnotetext{#1}%
+    \footnotemark
+}
+
+% \dialog sets the character's name above their speech.
+% the text is inset \speechmargin from the text margins.
+\newcommand{\dialog}[2]{%
+    %\let\footnote=\dialogfootnote
+	\toggletrue{dialog}%
+	\def\charactername{\textsc{#1}}% used by the spokentext environment
+	\vspace{1ex}%
+	\if\di at logfootnotetext\relax\else
+	    \footnotetext{\di at logfootnotetext}%
+	    \let\di at logfootnotetext=\relax
+	\fi
+	\begin{spokentext}
+		\raggedright
+		 #2
+	\end{spokentext}%
+	\togglefalse{dialog}%
+}
+
+% getting \obeylines to work on the input to \lyrics is tricky.
+% It has to be done *before* the command picks up the input.
+% so I pick up the first parameter (the speaker's id) and set
+% it aside, then invoke \obeylines, and have \@lyrics work on 
+% what's left.
+
+\newcommand{\@lyrics}[1]{%
+	\toggletrue{dialog}% change behavior of \stdir
+	\def\@lyricontents{{#1\par}}% pick up the lyrics
+	\vspace{1ex}%
+	\begin{lyrictext}
+	    \raggedright
+	    \iftoggle{scaplyrics}{\scshape}{}
+		\@lyricontents% put the lyrics down inside the lyrictext  box
+	\end{lyrictext}%
+	\togglefalse{dialog}%
+\egroup
+}
+
+\newcommand{\lyrics}[1]{\bgroup
+	\def\charactername{{\textsf\lyricsymbol} \textsc{#1} {\textsf\lyricsymbol}}%
+	\obeylines\@lyrics
+}
+
+% \spacer is intended to use inside \lyrics commands to maintain the structure of stanzas
+% across different speakers. Put whatever was spoken by a previous speaker inside the \spacer 
+% parameter, and the current text will be offset by that distance.
+
+\newbox\music at lbox
+
+\newcommand{\spacer}[1]{
+    \setbox\music at lbox\hbox{#1}%
+    \noindent\hbox to \wd\music at lbox{\strut\hfil}%
+}
+
+\newcommand{\stdir}[1]{%
+	\begingroup
+		\toggletrue{stagedir}%
+		\iftoggle{dialog}{% we're inside a dialog or lyric.
+			(\textit{#1})%
+		}{% or we're NOT inside a dialog or lyric.
+		    \vspace{1ex}%
+		    \raggedright
+			\noindent\textit{#1}\par%
+		}%
+	\endgroup\xspace
+}
+
+% Musical cue
+\newcommand{\music}[1]{%
+	{\raggedleft\small
+		\vspace{1ex}%
+		\addcontentsline{los}{section}{#1}%
+		\textit{Music Cue: “#1”}\par
+		\vspace{1ex}%
+	}
+}
+
+%Dance cue
+\newcommand{\dance}[1]{% a dance cue
+	{\raggedleft\small
+		\vspace{1ex}%
+		\addcontentsline{lod}{section}{#1}%
+		\textit{Dance Cue: “#1”}\par
+		\vspace{1ex}%
+	}
+}
+
+% \pause is just convenient.
+\newcommand{\pause}{\stdir{pause}}
+
+% \dialogue, for people who like that spelling better
+\newcommand{\dialogue}[1]{\dialog{#1}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%% 	TABLES OF CONTENTS, CAST LIST, AND OTHER LISTS
+
+\newcommand{\listofsongs}{% generates a list of musicial cues
+    \section*{List of Songs}%
+    \@starttoc{los}%
+    }
+    
+\newcommand{\listofdances}{% generates a list of dance cues
+    \section*{List of Dances}%
+    \@starttoc{lod}%
+}
+
+% Yes, the following commands internally use "cast" when they're actually referring to 
+% the characters that cast members are playing. But "cast" is way shorter than "character," 
+% and "character" is much more likely to run into namespace collisions.
+
+\newsavebox{\c at stbox}
+\newlength{\c at stboxwidth} % how wide do the character name boxes need to be?
+\newlength{\c at stdescwidth} % the width of the box for the character's descriptive text.
+\setlength{\c at stboxwidth}{0pt} % default value to start
+\gdef\s at vedcastboxwidth{0pt} % the max width from the previous run
+
+
+% \@recallcastboxwidth is called from the .aux files as they're read back in.
+% When they're all processed, \s at vedcastboxwidth will contain the largest value 
+% passed to any of the \@recallcastboxwidth commands..
+\def\@recallcastboxwidth#1{%
+	\ifdim#1>\s at vedcastboxwidth
+	\setlength\c at stboxwidth{#1}%
+	\gdef\s at vedcastboxwidth{#1}
+	\fi}
+
+\newcommand{\addcharacter}[3][\relax]{%
+    % If the optional parameter is present, we need to define a command with that name.
+    % Normally, that command is equivalent to \dialog{Character Name}.
+    % If it appears in the body of a \dialog or \lyrics command, then it's just
+    % the character name (the 1st required parameter). If it's inside \stdir, then
+    % it's the character name in small caps. 
+	\if#1\relax\else% do we need to define the \charactername because the nickname parameter is present?
+		\expandafter\gdef\csname #1\endcsname{%
+			\iftoggle{stagedir}{% inside a stdir command
+				\textsc{#2\strut}\xspace% it's in small caps
+			}{\iftoggle{dialog}{% inside a dialog or lyrics command
+    			    #2\xspace% we leave the formatting to the environment it's in.
+    			}{% if it's in none of these, then it's being used AS a \dialog shortcut.
+	    			\dialog{#2}%
+    			}%
+			}%
+		}%
+	\fi 
+
+    % The \addcharacter command also typesets the Dramatis Personae list where it's used.
+    % Name on left, comments/explanations on right. To make page breaks simple, tables and tabs are
+    % avoided. Instead, names are measured in the first pass, and that width info is used on the
+    % second pass to make the alignment consistent.
+    
+    % put the final form of the character's name in a box for measuring
+	\sbox\c at stbox{\hspace{\parindent}\textsc{#2}\emspace\strut}%
+
+	% save the measured minimum width to determine \s at vedcastboxwidth for the next run
+	\protected at write\@auxout{}{\string\@recallcastboxwidth{\the\wd\c at stbox}}%
+
+	% check if this character's required box width is greater 
+	% than the width of the box we used for the previous character
+	\ifdim\wd\c at stbox>\c at stboxwidth \setlength{\c at stboxwidth}{\wd\c at stbox}\fi
+	
+	% check if the max box width from the last run is bigger than the current one
+	% (If the .aux files are read before this .sty file is loaded, this could be done just
+	% once. Are they?)
+	\ifdim\s at vedcastboxwidth>\c at stboxwidth \setlength{\c at stboxwidth}{\s at vedcastboxwidth}\fi
+
+	\setlength{\c at stdescwidth}{\textwidth}%
+	\addtolength{\c at stdescwidth}{-\c at stboxwidth}%
+	\medskip
+	\noindent\hbox to \c at stboxwidth{\usebox\c at stbox\hfill}%
+		\parbox[t]{\c at stdescwidth}{\raggedright #3}%
+}
+
+% used to add an all-caps/small-caps character name to stage directions
+\newcommand{\character}[1]{\textsc{#1}}
+
+% For adding comments into the script. Useful when some of the people working on the script
+% don't know TeX very well. The \comment{} command works like all the other TeX commands, instead
+% of having to remember to start EVERY line of a comment with a % sign. 
+\def\comment#1{}
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/musical/musical.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2020-04-11 22:37:12 UTC (rev 54665)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2020-04-11 22:37:50 UTC (rev 54666)
@@ -502,7 +502,7 @@
     multiaudience multibbl multibib multibibliography
     multicap multicolrule multidef multido multienv multiexpand
     multilang multiobjective multirow munich
-    musicography musikui musixguit
+    musical musicography musikui musixguit
     musixtex musixtex-fonts musixtnt musuos muthesis
     mversion mwcls mwe mweights mxedruli
     mycv mylatexformat mynsfc

Modified: trunk/Master/tlpkg/tlpsrc/collection-music.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-music.tlpsrc	2020-04-11 22:37:12 UTC (rev 54665)
+++ trunk/Master/tlpkg/tlpsrc/collection-music.tlpsrc	2020-04-11 22:37:50 UTC (rev 54666)
@@ -23,6 +23,7 @@
 depend lilyglyphs
 depend lyluatex
 depend m-tx
+depend musical
 depend musicography
 depend musixguit
 depend musixtex

Added: trunk/Master/tlpkg/tlpsrc/musical.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.