latex_classes/oreolek-script.cls

168 lines
4.9 KiB
OpenEdge ABL
Raw Permalink Normal View History

2012-12-25 04:49:02 +02:00
%% Based on sides package Copyright (c) 2005 Wing L. Mui
%% This class package was based on the package ``plari'' written by
%% Antti-Juhani Kaijanaho in 1998.
%% This program is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by
%% the Free Software Foundation; either version 2 of the License, or
%% (at your option) any later version.
%%
%% This program is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%% GNU General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
%% along with this program; see the file COPYING. If not, write to
%% the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
%% Boston, MA 02111-1307, USA.
\def\filedate{2005/04/21}
\def\fileversion{20050421-CTAN}
\NeedsTeXFormat{LaTeX2e}
\typeout{plari_prime <\filedate:\fileversion> - typesetting stageplay scripts}
2014-06-01 10:06:17 +03:00
\newif\if@Fullpage
\@Fullpagetrue
\DeclareOption{nofullpage}{\global\@Fullpagefalse}
2012-12-25 04:49:02 +02:00
% We will be basing this class on the report class.
2017-11-11 20:29:21 +02:00
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{extreport}% or book or whatever
}
\ProcessOptions\relax
\LoadClass{extreport}
2012-12-25 04:49:02 +02:00
% Now we initialize the counters.
\newcounter{act}
\newcounter{scene}[act]
\renewcommand{\theact}{\Roman{act}}
\renewcommand{\thescene}{\Roman{act}:\arabic{scene}}
% The newact commands create new pages and a huge heading.
% Change the vspace parameters if you want to change the spacing after
% an act title.
\newcommand{\actdef}[1]{
\newpage{\centering \mdseries \Huge #1\par}
\vspace{1.5em plus .5em minus .5em}%
}
\newcommand{\newact}{
\refstepcounter{act}
\actdef{\MakeUppercase{Акт} \Roman{act}}
}
\newcommand{\newactnamed}[1]{
\actdef{#1}
}
% We are going to make each scene a section so scenes do not
% get orphaned from their tltles.
% To modify spacing before and after scene titles, modify this:
\newcommand{\scenedef}{\@startsection {scene}{1}{0pt}%
{3em} % space before title
{2em} % space after title
{\centering\mdseries\Large}}
% These are the new scene commands.
\newcommand{\newscene}{
\refstepcounter{scene}
{\scenedef*{\MakeUppercase{Сцена} \arabic{scene}}}
}
\newcommand{\newscenenamed}[1]{%
2014-04-28 17:12:36 +03:00
\refstepcounter{scene}
2012-12-25 04:49:02 +02:00
{\scenedef*{\MakeUppercase{#1}}}
}
2014-04-28 17:36:32 +03:00
\newcommand{\newscenenamednocnt}[1]{%
{\scenedef*{\MakeUppercase{#1}}}
}
2012-12-25 04:49:02 +02:00
% Similarly, we use sections for the dialogue to avoid orphans.
% Once again, if you wish to change the skip amounts, do so here.
\newcommand{\repldef}{
\@startsection {diag}{2}{0pt}{1em}{0.25pt}{\centering\normalsize\mdseries\scshape}
}
\newcommand{\repl}{\repldef*}
% Now for something simple...
\newcommand{\paren}[1]{(\textit{#1})}
\newcommand{\pause}{\paren{Пауза.} }
2012-12-25 04:49:02 +02:00
\newcommand{\chara}[1]{\textsc{#1}}
% And now some stage directions...
\newcommand{\stagedir}[1]{%
\begingroup%
\list{}{%
\listparindent=\parindent%
\parsep=\parskip%
\topsep=\z@%
\rightmargin=\leftmargin%
}%
\item%
\let\item\@undefined%
{\vspace{1em}\normalsize \scshape \mdseries#1\vspace{1ex}}%
\endlist%
\endgroup%
}
% Now comes the cast list and stage notes...
2014-04-28 17:36:32 +03:00
\newcommand{\castpage}{\newscenenamednocnt{\MakeUppercase{Действующие лица}}}
2012-12-25 04:49:02 +02:00
\newcommand{\notes}{
\newscenenamed{Примечания}
\setlength{\parindent}{2em}
}
\newcommand{\cast}[2]{
\textsc{#1}, #2. \par
}
\newcounter{note}
\newcommand{\newnote}[1]{
\refstepcounter{scene}
\@startsection {scene}{1}{0pt}{1em}{1em}{\centering\mdseries\normalsize}*{#1}
}
\newenvironment{authortext}{\setlength{\parindent}{2em}}{\setlength{\parindent}{0em}}
% We also want there to be no indents and a medskip between long paragraphs
% of text. If you do not want there to be a skip, comment out the second line.
\setlength{\parindent}{0in}
\parskip=\medskipamount\relax
% Now we make our formatting pretty. These options can be overrided easily.
\evensidemargin 0in
\topmargin 0in
\textheight 8.5in
\baselineskip 14pt
\oddsidemargin 0.25in
\textwidth 6in
2012-12-25 04:52:50 +02:00
% And we're done!
\RequirePackage{fontspec}
\RequirePackage{xunicode}
\RequirePackage{xltxtra}
\RequirePackage{polyglossia}
\setdefaultlanguage{russian}
2017-11-11 20:29:21 +02:00
\defaultfontfeatures{Mapping=tex-text, Scale=MatchLowercase, Ligatures=TeX}
\setmainfont{PT Serif}[BoldFont={* Bold}, BoldItalicFont={* Bold Italic}, SmallCapsFont = {* Caption}]
2012-12-25 04:52:50 +02:00
\setmonofont{PT Mono}
\setmathrm{PT Serif}
\newfontfamily{\cyrillicfont}{PT Serif}
\RequirePackage{hyperref}
\RequirePackage{indentfirst}
2014-06-01 10:06:17 +03:00
\if@Fullpage
\RequirePackage[cm]{fullpage}
\fi
2012-12-25 04:52:50 +02:00
\pagestyle{empty}
\setcounter{secnumdepth}{0}
\setcounter{tocdepth}{2}
\author{Александр Яковлев}
2014-04-28 17:12:36 +03:00
\endinput