2

Good morning. I take inspiration from this discussion. I changed the title because it no longer makes sense.

New Commands with text align

I want to refine this template for creating theatrical scripts. Problem: If I want to insert text after the \scene command, the font remains the same. It is possible that after each command, the font is reset as normal? Thank you.

\documentclass[a4paper,11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[italian]{babel}
\usepackage{textcase}
\usepackage{ragged2e}
\usepackage{alltt}

\usepackage[top=15mm, bottom=15mm, left=20mm, right=15mm]{geometry}

%spacing-definition
\newlength{\smllskip}\smllskip = 0.1\baselineskip %small
\newlength{\middskip}\middskip = 0.5\baselineskip %mid
\newlength{\biggskip}\biggskip = 1.5\baselineskip %big

%character
\newcommand\character[1]{\par\everypar{\hangindent=0.32\linewidth\hangafter=1}\vskip\middskip\parskip=0.5\baselineskip\fontsize{15pt}{16pt}\selectfont\makebox[0.32\linewidth][r]{\MakeTextUppercase{#1} \hskip0.1\linewidth}}

%description
\newcommand\did[1]{\everypar{\hangindent=0\linewidth\hangafter=0}\vskip\biggskip\parskip=0.5\baselineskip\fontsize{15pt}{16pt}\selectfont\raggedright\textup{#1}\vskip\biggskip}

%actions
\newcommand\azi[1]{\everypar{\hangindent=0.38\linewidth\hangafter=0}\vskip\smllskip\parskip=0.5\baselineskip\fontsize{15pt}{16pt}\selectfont\raggedright\textsl{#1}\vskip\smllskip}

%intro
\newcommand\intro[1]{\fontsize{15pt}{16pt}\selectfont\justify{#1}\vskip\biggskip}

%scene-header
\newcommand\scene[1]{\newpage\everypar{\hangindent=0\linewidth\hangafter=0}\parskip=0.5\baselineskip\fontsize{22pt}{24pt}\selectfont\raggedright{#1}\vskip\middskip}

%author-title-miscellaneus
\newcommand\aut[1]{\fontsize{15pt}{16pt}\selectfont\begin{center}#1\end{center}\vskip\biggskip}
\newcommand\tit[1]{\fontsize{28pt}{30pt}\selectfont\begin{center}#1\end{center}\vskip\biggskip}
\newcommand\sut[1]{\fontsize{15pt}{16pt}\selectfont\begin{center}#1\end{center}\vskip\smllskip}
\newcommand\ctr[1]{\fontsize{15pt}{16pt}\selectfont\begin{center}#1\end{center}}

\setlength\parindent {0pt}
\interlinepenalty=10000 \parskip0pt plus \baselineskip

\begin{document}

\aut{Author}
\tit{Title}
\sut{Sub-Title}
\newpage

\def\one{\character{One}}
\def\two{\character{Two}}

\scene{Story}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
\newpage

\scene{Scene 1 : Title scene.}

\did{Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.}

\one
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

\azi{first action}

\two
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

\did{Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.}

\ctr{E N D}

\end{document}
ginosap
  • 59
  • If you want to restrict font changes it's better use a group or an environment, i.e. \begin{scene}...\end{scene} –  Oct 06 '15 at 08:14
  • Ok. To do this, I have only to change \newcommand with \newenvironment? – ginosap Oct 06 '15 at 08:48
  • Almost. You should clearify where the font change should occur –  Oct 06 '15 at 08:53
  • Too difficult for me! I used the command \scene only because I didn't want to create a new one for the story (for example \story). I wish that after you close a command, font return to default. It's possible to define this default font? Sorry for my English. I am using a translator. – ginosap Oct 06 '15 at 09:15
  • 1
    Yes, but I understand that you want to change the scene title font only? –  Oct 06 '15 at 09:17
  • No, not the scene font, but the font of text below, after closed \scene command. I have solved put \did command after \scene command, but there is another solution? – ginosap Oct 06 '15 at 10:02
  • How about defining \scene this way: \newcommand\scene[1]{\newpage\everypar{\hangindent=0\linewidth\hangafter=0}\parskip=0.5\baselineskip\fontsize{22pt}{24pt}\selectfont\raggedright{#1}\vskip\middskip\fontsize{15pt}{16pt}\selectfont} That will eliminate the need to use \did to reset the font size. – Steven B. Segletes Oct 06 '15 at 10:30
  • Veri good Steven! Thanks. Another little question: instead of define \fontsize{15pt}{16pt}, there is a way to incorporate this in a variable? I change the variable and this change in all document... – ginosap Oct 06 '15 at 11:31
  • See also http://tex.stackexchange.com/questions/3399/what-are-good-packages-for-laying-out-a-play – John Kormylo Oct 06 '15 at 13:52
  • 1
    Also related: ctan topic: drama-script. Both screenplay and screenplay-pkg have seen relatively recent updates. – Mike Renfro Oct 06 '15 at 14:15
  • Thank you for the links. I have seen all the specific packages (dramatist, play, etc), but are not more customizable. – ginosap Oct 06 '15 at 14:51
  • Another question: If I wanted all the phrases in the \azi command they had at the beginning and at the end a parenthesis? How can I do? Thank you. – ginosap Oct 08 '15 at 15:26
  • If I change \azi command to \newcommand\azi[1]{\everypar{\hangindent=0.32\linewidth\hangafter=0}\vskip\unoskip\parskip=0.32\baselineskip\fontsize{13pt}{14pt}\selectfont\raggedright\textsl{#1})\vskip\unoskip} it makes a parenthesis on the end. And at the beginning? Thanks. – ginosap Oct 09 '15 at 06:42
  • 2
    It is really nice to see that crossposting is so popular and time and effort of the helpers seems to be pretty wortthless. :-( – Johannes_B Oct 11 '15 at 13:40
  • Excuse me. I was in a panic to finish a rush job and didn't know how to do it. – ginosap Oct 12 '15 at 04:08
  • @StevenB.Segletes Do you want to write an answer? – Johannes_B Oct 18 '15 at 15:27

2 Answers2

1

As I suggested in a comment, how about (re)defining \scene this way

\newcommand\scene[1]{\newpage\everypar{\hangindent=0\linewidth\hangafter=0}%
\parskip=0.5\baselineskip\fontsize{22pt}{24pt}\selectfont\raggedright{#1}\vskip%
\middskip\fontsize{15pt}{16pt}\selectfont}

Then, the fontsize is reset to the smaller size upon exit from the \scene. Text that follows need not be enclosed in a \did{} or any other artifice, but can just be entered directly, and will appear in the smaller size.

\documentclass[a4paper,11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[italian]{babel}
\usepackage{textcase}
\usepackage{ragged2e}
\usepackage{alltt}

\usepackage[top=15mm, bottom=15mm, left=20mm, right=15mm]{geometry}

%spacing-definition
\newlength{\smllskip}\smllskip = 0.1\baselineskip %small
\newlength{\middskip}\middskip = 0.5\baselineskip %mid
\newlength{\biggskip}\biggskip = 1.5\baselineskip %big

%character
\newcommand\character[1]{\par\everypar{\hangindent=0.32\linewidth\hangafter=1}\vskip\middskip\parskip=0.5\baselineskip\fontsize{15pt}{16pt}\selectfont\makebox[0.32\linewidth][r]{\MakeTextUppercase{#1} \hskip0.1\linewidth}}

%description
\newcommand\did[1]{\everypar{\hangindent=0\linewidth\hangafter=0}\vskip\biggskip\parskip=0.5\baselineskip\fontsize{15pt}{16pt}\selectfont\raggedright\textup{#1}\vskip\biggskip}

%actions
\newcommand\azi[1]{\everypar{\hangindent=0.38\linewidth\hangafter=0}\vskip\smllskip\parskip=0.5\baselineskip\fontsize{15pt}{16pt}\selectfont\raggedright\textsl{#1}\vskip\smllskip}

%intro
\newcommand\intro[1]{\fontsize{15pt}{16pt}\selectfont\justify{#1}\vskip\biggskip}

\newcommand\scene[1]{\newpage\everypar{\hangindent=0\linewidth\hangafter=0}%
\parskip=0.5\baselineskip\fontsize{22pt}{24pt}\selectfont\raggedright{#1}\vskip%
\middskip\fontsize{15pt}{16pt}\selectfont}

%author-title-miscellaneus
\newcommand\aut[1]{\fontsize{15pt}{16pt}\selectfont\begin{center}#1\end{center}\vskip\biggskip}
\newcommand\tit[1]{\fontsize{28pt}{30pt}\selectfont\begin{center}#1\end{center}\vskip\biggskip}
\newcommand\sut[1]{\fontsize{15pt}{16pt}\selectfont\begin{center}#1\end{center}\vskip\smllskip}
\newcommand\ctr[1]{\fontsize{15pt}{16pt}\selectfont\begin{center}#1\end{center}}

\setlength\parindent {0pt}
\interlinepenalty=10000 \parskip0pt plus \baselineskip

\begin{document}

\aut{Author}
\tit{Title}
\sut{Sub-Title}
\newpage

\def\one{\character{One}}
\def\two{\character{Two}}

\scene{Story}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
\newpage

\scene{Scene 1 : Title scene.}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

\one
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

\azi{first action}

\two
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

\did{Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.}

\ctr{E N D}

\end{document}

enter image description here

0

Good morning. I recovered this old source file. I tried to adapt my play, but mistakes came out. (Overfull \hbox) How can I fix it? Thank you.

\documentclass[a4paper,11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[italian]{babel}
\usepackage{textcase}
\usepackage{ragged2e}
\usepackage{verse}
\usepackage{alltt}
\usepackage{array}

% layout page \usepackage[top=15mm, bottom=20mm, left=20mm, right=15mm]{geometry} %\pagestyle{empty}

\usepackage{nimbusmono} \renewcommand*\familydefault{\ttdefault}

%def spaces \newlength{\unoskip}\unoskip = 2mm \newlength{\dueskip}\dueskip = 4mm \newlength{\treskip}\treskip = 6mm

%characters \newcommand\character[1]{\par\everypar{\hangindent=0.30\linewidth\hangafter=1}\vskip\dueskip\parskip=0.5\baselineskip\fontsize{13pt}{14pt}\selectfont\makebox[0.30\linewidth][r]{\MakeTextUppercase{#1} \hskip0.1\linewidth}}

%scenes \newcommand\sce[1]{\newpage\everypar{\hangindent=0\linewidth\hangafter=0}\parskip=0.5\baselineskip\fontsize{16pt}{17pt}\selectfont\raggedright{#1}\vskip\unoskip\fontsize{13pt}{14pt}\selectfont}

\setlength\parindent {0pt} \interlinepenalty=10000 \parskip0pt plus \baselineskip

\begin{document}

\def\John{\character{JOHN}} \John Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

\def\Kelly{\character{KELLY}} \Kelly Lorem Ipsum is simply dummy text of the printing and typesetting industry.

%script

\sce{1.1 : Number One}

\did{Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.}

\Kelly Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

\John Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.

\Kelly Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

\end{document}

Andy Toff
  • 105
  • Hi Andy, please don't ask questions in an answer, but make it a new post. Thanks! – user1729210 Jun 16 '20 at 13:38
  • Excuse me! How can I fix it? – Andy Toff Jun 16 '20 at 13:42
  • 2
    As already noted, this should be posted as a new question. If it's useful to refer to the present question, you can make a link by copying the information presented when you click on the "share" button at the bottom of the question. – barbara beeton Jun 16 '20 at 16:03