Some more tweaks to the templates, create Single_Page template
[orchestrallily.git] / editionkainhofer.sty
blobc36c9f13468aa4b739e629705843ee5b183e664c
1 %%
2 %% This is file edition_kainhofer.sty',
3 \ProvidesPackage{editionkainhofer}[2009/04/07]
5 \usepackage{url}
6 \usepackage[pdftex]{hyperref}
7 \usepackage{amsmath}
8 \usepackage[naustrian]{babel}
9 \usepackage{geometry}
10 \usepackage[utf8]{inputenc}
11 \usepackage{multicol}
12 \usepackage{multibib}
13 \usepackage{ifmtarg}
14 \usepackage{supertabular}
15 \usepackage{textcomp}
16 \usepackage{cancel}
17 \usepackage[normalem]{ulem}
18 \usepackage{relsize}
20 \usepackage[usenames]{color}
21 \usepackage{lmodern}
23 \pagecolor{white}
24 \nopagecolor
25 \usepackage{pdfpages}
27 % \newcommand{\prefacesection}[1]{\ifvocalscore%
28 % \section*{#1}%
29 % \else%
30 % \chapter*{#1}%
31 % \fi}
32 \newcommand{\prefacesection}[1]{\chapter*{#1}}
33 \newif\ifvocalscore
35 \newcommand{\vocalscorelayout}{
36 \setlength{\paperheight}{270mm}%
37 \setlength{\paperwidth}{190mm}%
38 \geometry{papersize={190mm,270mm}}%
39 \vocalscoretrue
40 % \renewcommand{\prefacesection}[1]{\section*{#1}}%
41 \typeout{processing vocalscore}
44 \DeclareOption{vocalscore}{\vocalscorelayout}
45 \ProcessOptions
47 % \newenvironment{preface}{\ifvocalscore\relscale{0.83}\fi}{}
48 \newenvironment{preface}{\ifvocalscore\fontsize{8.5}{10.5}\selectfont\fi}{}
49 \newenvironment{lyricstext}{\ifvocalscore\else\begin{smaller}\fi}{\ifvocalscore\else\end{smaller}\fi}
52 \definecolor{cover}{rgb}{0.27,0.25,0.72} % {69,40,234}
54 \newcommand{\setfullscore}{
55 \definecolor{cover}{rgb}{0,0.25,0} % {0,64,0}
57 \newcommand{\setvocalscore}{
58 \definecolor{cover}{rgb}{0.27,0.25,0.72} % {69,40,234}
60 \newcommand{\setinstrumentalscore}{
61 \definecolor{cover}{rgb}{0.5,0,0} % {128, 0, 0 }
63 \newcommand{\olypagecommand}{\thispagestyle{empty}}
66 \setlength{\parindent}{0em}
67 \setlength{\columnsep}{20pt}
70 \sffamily
71 \fontsize{20pt}{25pt}\selectfont
72 \input "orchestrallily/oly_defs.tex"
75 \let\@composer\@empty
76 \newcommand{\composer}[1]{\gdef\@composer{#1}}
77 \let\@composerdate\@empty
78 \newcommand{\composerdate}[1]{\gdef\@composerdate{#1}}
79 \let\@composerII\@empty
80 \newcommand{\composerII}[1]{\gdef\@composerII{#1}}
81 \let\@composerdateII\@empty
82 \newcommand{\composerdateII}[1]{\gdef\@composerdateII{#1}}
83 \let\@poet\@empty
84 \newcommand{\poet}[1]{\gdef\@poet{#1}}
85 \let\@poetdate\@empty
86 \newcommand{\poetdate}[1]{\gdef\@poetdate{#1}}
87 \let\@subtitle\@empty
88 \newcommand{\subtitle}[1]{\gdef\@subtitle{#1}}
89 \let\@description\@empty
90 \renewcommand{\description}[1]{\gdef\@description{#1}}
91 \let\@instrumentation\@empty
92 \newcommand{\instrumentation}[1]{\gdef\@instrumentation{#1}}
93 \let\@scoretype\@empty
94 \newcommand{\scoretype}[1]{\gdef\@scoretype{#1}}
95 \let\@scoreinfo\@empty
96 \newcommand{\scoreinfo}[1]{\gdef\@scoreinfo{#1}}
97 \let\@editor\@empty
98 \newcommand{\editor}[1]{\gdef\@editor{#1}}
99 \let\@publisher\@empty
100 \newcommand{\publisher}[1]{\gdef\@publisher{#1}}
101 \let\@scorenumber\@empty
102 \newcommand{\scorenumber}[1]{\gdef\@scorenumber{#1}}
103 \let\@year\@empty
104 \renewcommand{\year}[1]{\gdef\@year{#1}}
105 \let\@todos\@empty
106 \newcommand{\todos}[1]{\gdef\@todos{#1}}
108 \let\oly@basename\@empty
109 \newcommand{\basename}[1]{\gdef\oly@basename{#1}}
111 \let\@software\@empty
112 \newcommand{\software}[1]{\gdef\@software{#1}}
113 \software{Lilypond 2.13, \href{http://www.lilypond.org/}{http://www.lilypond.org/}}
117 %% End of file `makeidx.sty'.
119 \newcommand\makefrontpage{\pagenumbering{alph}\begin{titlepage}%
120 \pagecolor{cover}\color{white}
121 \thispagestyle{empty}
123 \let\footnotesize\small
124 \let\footnoterule\relax
125 \let \footnote \thanks
127 \sffamily
128 \fontsize{20pt}{25pt}\selectfont
130 \begin{center}
132 \null\vfill
133 \ifx\@composer\@empty%
134 \else
135 {\fontsize{35pt}{35pt}\selectfont\textbf{\@composer}}%
136 \ifx\@composerII\@empty%
137 \else\\[0.25em]
138 {\fontsize{35pt}{35pt}\selectfont\textbf{\@composerII}}%
139 \fi%
140 \\[0.3em]%
143 \ifx\@poet\@empty%
144 \else
145 {%\fontsize{20pt}{20pt}\selectfont
146 \textbf{\@poet}}\\[0.3em]%
149 \vfill
152 \fontsize{40pt}{50pt}\selectfont%
153 \textbf{\@title}
156 {\vspace{0.5em}
157 \@subtitle
160 \vfill
161 \ifx\@scoreinfo\@empty%
162 \else
163 { \@scoreinfo }
165 \vfill
166 \vfill
167 \@scoretype
168 \vfill
169 \vfill
170 \vfill
171 {\fontsize{13pt}{13pt}\selectfont
172 \@publisher\ifx\@scorenumber\@empty%
173 \else, \@scorenumber\fi
175 % \vfill\null
176 \end{center}
177 \thispagestyle{empty} %\null
178 \end{titlepage}%
180 \pagebreak
181 \thispagestyle{empty} %\null
182 \nopagecolor\color{black}
183 \thispagestyle{empty} %\null
184 \ifx\@todos\@empty%
185 \else
186 { \@todos }
188 \thispagestyle{empty} %\null
189 \cleardoublepage
190 \setcounter{footnote}{0}%
193 \newcommand{\makebackpage}{
194 \pagebreak
195 \thispagestyle{empty}\null
196 \pagebreak
197 \thispagestyle{empty}\pagecolor{cover}
198 \null
203 \let\oldmaketitle\maketitle
205 \renewcommand\maketitle{\thispagestyle{empty}{\begin{titlepage}%
206 \fontfamily{pbk}\selectfont
209 \let\footnotesize\small
210 \let\footnoterule\relax
211 \let \footnote \thanks
213 \fontsize{16pt}{18pt}\selectfont
215 \begin{center}
217 \null\vfill
218 \ifx\@composer\@empty%
219 \else
220 {\fontsize{22pt}{25pt}\selectfont\textbf{\@composer}\ifx\@composerdate\empty\else{} \relax \@composerdate\fi}%
221 \ifx\@composerII\@empty%
222 \else\\[0.25em]
223 {\fontsize{22pt}{25pt}\selectfont\textbf{\@composerII}\ifx\@composerdateII\empty\else{} \relax \@composerdateII\fi}%
224 \fi%
225 \\[0.3em]
228 \ifx\@poet\@empty%
229 \else
230 {\fontsize{16pt}{20pt}\selectfont\textbf{\@poet}\ifx\@poetdate\empty\else{} \relax \@poetdate\fi}%
233 \vfill
236 \fontsize{40pt}{45pt}\selectfont
237 \textbf{\@title}%
240 {\vspace{0.5em}
241 \@subtitle%
244 \vfill
245 \vfill
247 \@description%
249 \ifx\@instrumentation\empty%
250 \else
252 \vspace{0.5em}
253 \fontsize{12pt}{14pt}\selectfont
254 \@instrumentation
257 \vfill
258 \vfill
259 \vfill
260 \fontsize{16pt}{18pt}\selectfont
261 \@scoretype%
262 \vfill
264 \fontsize{12pt}{14pt}\selectfont
265 \ifx\@editor\@empty%
266 \else
267 Herausgegeben von: / Edited by:\\[0.3em]%
268 \@editor%
272 \vfill
273 \@publisher\ifx\@year\@empty%
274 \else, \@year%
275 \fi\\
276 \@scorenumber%
277 % \vfill\null
279 \end{center}
281 \end{titlepage}%
283 \setcounter{footnote}{0}%
284 \global\let\maketitle\relax
285 \setcounter{page}{2}
292 \newcommand{\q}[1]{\glqq{}#1\grqq{}}
293 \newenvironment{vergleich}{
294 \setlength{\parindent}{-3em}
295 \setlength{\leftskip}{3em}
296 \indent
300 \setlength{\parindent}{0em}
301 \setlength{\leftskip}{0em}
304 \newcommand{\copyrightbox}[1]{
305 \fbox{
306 \begin{minipage}{0.95\textwidth}#1\end{minipage}
309 \newcommand{\scorelistbox}[1]{
310 \fbox{\begin{minipage}{0.8\textwidth}
311 \small
312 #1\end{minipage}
316 \newcommand\frontmatter{%
317 \cleardoublepage
318 \pagenumbering{roman}}
319 \newcommand\mainmatter{%
320 \cleardoublepage
321 \pagenumbering{arabic}}
322 \newcommand\backmatter{%
323 \cleardoublepage
326 % \newenvironment{lyricstable}{\begin{supertabular}{p{0.33\textwidth}p{0.33\textwidth}p{0.33\textwidth}}}{\end{supertabular}}
327 \newenvironment{lyricstable}{\begin{tabular}{@{}p{0.33\textwidth}p{0.33\textwidth}p{0.33\textwidth}@{}}}{\end{tabular}}
328 % \newcommand{\sbreak}{\textbar}
329 \newcommand{\sbreak}{\\}
330 \newenvironment{sourcetitle}{
332 \begin{center}\em}{\end{center}
334 \newcommand{\preisfrac}[2]{$\frac{\text{#1}}{\text{#2}}$}
335 \newenvironment{lilypond}{$}{$}
337 \newenvironment{hauptquellen}{\begin{itemize}\setlength{\itemsep}{0em}\setlength{\parskip}{0mm}}{\end{itemize}}
340 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
341 % \includescore{PossibleExtension}
342 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
344 % Read in the TOC entries for a PDF file from the corresponding .toc file.
345 % This requires some heave latex tweaking, since reading in things from a file
346 % and inserting it into the arguments of a macro is not (easily) possible
348 % Solution by Patrick Fimml on #latex on April 18, 2009:
349 % \readfile{filename}{\variable}
350 % reads in the contents of the file into \variable (undefined if file doesn't exist)
351 \newread\readfile@f
352 \def\readfile@line#1{%
353 {\catcode`\^^M=10\global\read\readfile@f to \readfile@tmp}%
354 \edef\do{\noexpand\g@addto@macro{\noexpand#1}{\readfile@tmp}}\do%
355 \ifeof\readfile@f\else%
356 \readfile@line{#1}%
357 \fi%
359 \def\readfile#1#2{%
360 \openin\readfile@f=#1 %
361 \ifeof\readfile@f%
362 % \typeout{No TOC file #1 available!}%
363 \else%
364 \typeout{Using TOC file #1}
365 \gdef#2{}%
366 \readfile@line{#2}%
368 \closein\readfile@f%
372 \newcommand{\includescore}[1]{
373 \def\oly@fname{\oly@basename\@ifmtarg{#1}{}{_#1}}
374 \let\oly@addtotoc\undefined
375 \readfile{\oly@fname.toc}{\oly@addtotoc}
376 \ifx\oly@addtotoc\undefined
377 \includepdf[pages=-,pagecommand={\olypagecommand}]{\oly@fname}
378 \else
379 \edef\includeit{\noexpand\includepdf[pages=-,addtotoc={\oly@addtotoc}]{\oly@fname}}\includeit
383 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
384 % Bibliography, TOC formatting
385 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
387 % \renewcommand*{\l@chapter}{\@dottedtocline{1}{1.5em}{2.3em}}
388 % \renewcommand*{\l@chapter}{\@dottedtocline{0}{0em}{0em}}
389 \renewcommand*{\l@section}{\@dottedtocline{1}{0em}{2.3em}}
390 \renewcommand{\numberline}[1]{}
392 \makeatletter
393 \renewenvironment{thebibliography}[1]
394 {%\chapter*{\bibname}%
395 \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
396 \list{\@biblabel{\@arabic\c@enumiv}}%
397 {\settowidth\labelwidth{\@biblabel{#1}}%
398 \leftmargin\labelwidth
399 \advance\leftmargin\labelsep
400 \@openbib@code
401 \usecounter{enumiv}%
402 \let\p@enumiv\@empty
403 \renewcommand\theenumiv{\@arabic\c@enumiv}}%
404 \sloppy
405 \clubpenalty4000
406 \@clubpenalty \clubpenalty
407 \widowpenalty4000%
408 \sfcode`\.\@m}
409 {\def\@noitemerr
410 {\@latex@warning{Empty `thebibliography' environment}}%
411 \endlist}
412 \makeatother
416 \newcommand{\wavyline}{$\sim\sim\sim\sim\sim$}
417 \newcommand{\longwavyline}{$\sim\sim\sim\sim\sim\sim\sim\sim\sim\sim$}
418 % figures for figured bass:
419 \newcommand{\bfig}[1]{\q{#1}}
422 \hypersetup{
423 colorlinks=false,
424 pdfborder={0 0 0},
426 \endinput