diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/dramatist/dramatist.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/dramatist/dramatist.sty | 92 |
1 files changed, 23 insertions, 69 deletions
diff --git a/Master/texmf-dist/tex/latex/dramatist/dramatist.sty b/Master/texmf-dist/tex/latex/dramatist/dramatist.sty index 74d814fc64d..eee9a2f05cb 100644 --- a/Master/texmf-dist/tex/latex/dramatist/dramatist.sty +++ b/Master/texmf-dist/tex/latex/dramatist/dramatist.sty @@ -21,7 +21,7 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% dramatist.dtx -%% Copyright (C) 2003-2004 Massimiliano Dominici +%% Copyright (C) 2003-2005 Massimiliano Dominici %% \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 @@ -37,8 +37,9 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% -\ProvidesPackage{dramatist}[2004/05/10 v1.2 Package for typesetting drama -- Author: Massimiliano Dominici] +\ProvidesPackage{dramatist}[2005/12/01 v1.2d Package for typesetting drama -- Author: Massimiliano Dominici] \NeedsTeXFormat{LaTeX2e} +\RequirePackage{xspace} \@ifundefined{if@openright}{\newif\if@openright}{} \newif\if@drverse \newif\if@poemscol @@ -81,7 +82,7 @@ \@drversetrue \if@poemscol \begin{poem} - \setcounter{linenumber}{\value{storelineno}} + \setcounter{verselinenumber}{\value{storelineno}} \setcounter{printlineindex}{\value{storeprintlineindex}} \else \begin{verse} @@ -95,7 +96,7 @@ \fi \if@poemscol \end{poem} - \setcounter{storelineno}{\value{linenumber}} + \setcounter{storelineno}{\value{verselinenumber}} \setcounter{storeprintlineindex}{\value{printlineindex}} \else \end{verse} @@ -213,10 +214,10 @@ \def\@xcharacter[#1]#2#3{% \stepcounter{character} \@character{#2}{#3} - \n@me@ppend@nddef{persona}{\roman{character}}{\castfont #1} + \n@me@ppend@nddef{persona}{@\Roman{character}}{\castfont #1} } \def\@character#1#2{% - \@namedef{#2}{{\namefont #1}\intsp@ce{#1}\check@spr} + \@namedef{#2}{{\namefont #1}\xspace} \n@me@ppend@nddef{#2}{\@ppendname}{% \if@drverse {\speakstab\speaksfont{#1}\speaksdel\par\nobreak\addvspace{-\parskip}} @@ -229,14 +230,14 @@ \newcommand{\@ppendname}{speaks} \newenvironment{CharacterGroup}[1]{% \stepcounter{character} - \newcounter{g\roman{character}} + \newcounter{g\Roman{character}} \grouplist{#1} }{} \newsavebox{\tbox} \newcommand\grouplist[1]{% - \global\n@me@ppend@nddef{persona}{\roman{character}}{% + \global\n@me@ppend@nddef{persona}{@\Roman{character}}{% \begin{lrbox}{\tbox} - \begin{minipage}[c]{.65\textwidth}\raggedright + \begin{minipage}[c]{\CharWidth}\raggedright \leftmargini=0pt \begin{list}{}{\itemsep=0pt} \dogrouplist @@ -245,27 +246,27 @@ \end{lrbox} \parbox{\CharWidth}{\usebox{\tbox}}% \parbox{\ParenWidth}{$\left.\rule{0pt}{\ht\tbox}\right\}$} - \parbox{\CastWidth}{\castfont #1}} + \parbox{\CastWidth}{\castfont #1\strut}} } \newcommand{\dogrouplist}{% - \ifnum\value{g\roman{temp}}>\value{gtemp} + \ifnum\value{g\Roman{temp}}>\value{gtemp} \stepcounter{gtemp} - \item\@nameuse{gpersona\Roman{temp}\roman{gtemp}} + \item\@nameuse{gpersona@\Roman{temp}@\Roman{gtemp}}\strut \dogrouplist \fi \setcounter{gtemp}{0} } \newcommand\GCharacter[3]{ - \stepcounter{g\roman{character}} - \global\@namedef{#3}{{\namefont #2}\intsp@ce{#2}\check@spr} + \stepcounter{g\Roman{character}} + \global\@namedef{#3}{{\namefont #2}\xspace} \global\n@me@ppend@nddef{#3}{\@ppendname}{% \if@drverse - {\speakstab\speaksfont #2\par\nobreak\addvspace{-\parskip}} + {\speakstab\speaksfont #2\speaksdel\par\nobreak\addvspace{-\parskip}} \else - \item[#2] + \item[#2\speaksdel] \fi} - \global\n@me@ppend@nddef{gpersona\Roman{character}}{% - \roman{g\roman{character}}}{\castfont #1} + \global\n@me@ppend@nddef{gpersona@\Roman{character}}{% + @\Roman{g\Roman{character}}}{\castfont #1} } \newcommand\speaker[1]{% \if@drverse @@ -273,53 +274,6 @@ \else \item[#1\speaksdel] \fi} -\let \nospace \relax -\let \check@spr \@empty -\def \intsp@ce #1{% - \def \reserved@a {#1}% - \ifx \reserved@a \@empty - \let \check@spr \@empty - \else - \ifx \reserved@a \space - \let \check@spr \@empty - \else - \check@nospace@ #1\nospace\@nil - \fi - \fi -} -\def \check@nospace@ #1#2\nospace#3\@nil {% - \let \check@spr \maybe@sp - \def \reserved@a {\nospace}% - \def \reserved@b {#1}% - \def \reserved@c {#3}% - \ifx \reserved@a \reserved@b - \ifx \reserved@c \@empty - \else - \let \check@spr \@empty - \fi - \else - \ifx \reserved@c \@empty - \else - \let \check@spr \@empty - \fi - \fi -} -\def \maybe@sp {\futurelet\@let@token\maybe@sp@} -\def \maybe@sp@ {% - \@tempswatrue - \expandafter\@tfor\expandafter\reserved@a\expandafter:\expandafter=% - \nospacelist - \do \t@st@sp - \if@tempswa \space \fi -} -\def \t@st@sp {% - \expandafter\let\expandafter\reserved@b\expandafter=\reserved@a\relax - \ifx\reserved@b\@let@token - \@tempswafalse - \@break@tfor - \fi -} -\def \nospacelist {,.;:?!)} \newcommand{\DramPer}{% \@ifundefined{if@openright}{\clearpage}{% \if@openright\cleardoublepage\else\clearpage\fi} @@ -342,7 +296,7 @@ \newcommand{\dodramperlist}{% \ifnum\value{character}>\value{temp} \stepcounter{temp} - \item\@nameuse{persona\roman{temp}} + \item\@nameuse{persona@\Roman{temp}}\strut \dodramperlist \fi } @@ -351,15 +305,15 @@ \newcommand{\@direct}[1]{% \if@drverse \vskip2\normallineskip - \parbox[b]{\dirwidth}{\dirdelimiter{\emph{#1}}}\@centercr + \parbox[b]{\dirwidth}{\dirdelimiter{{\itshape #1}}}\@centercr \else - \dirdelimiter{\emph{#1}}\unskip + \dirdelimiter{{\itshape #1}}\unskip \fi } \newcommand{\@sdirect}[1]{% \if@drverse \vskip2\normallineskip - \parbox[b]{\dirwidth}{\dirdelimiter{\emph{#1}}}\\! + \parbox[b]{\dirwidth}{\dirdelimiter{\itshape #1}}\\! \else \starrederror \fi |