Support cover logo.
[librarian.git] / src / librarian / pdf / wl.cls
1 % -*- coding: utf-8 -*-
2 \NeedsTeXFormat{LaTeX2e}
3 \ProvidesClass{wl}[2011/11/28 wolnelektury.pl book style]
4
5 % PDF customizations
6 %
7 % nofootnotes - disable generation of footnotes
8 % nothemes - disable generation of themes
9 % defaultleading - default leading
10 % onehalfleading - leading of 1.5 (interlinia)
11 % doubleleading - double leading (interlinia)
12 % a4paper,... - paper size as required by LaTeX
13 % nowlfont - don't use customized WL font
14
15 \RequirePackage{fixltx2e}
16 \RequirePackage{setspace}
17 \RequirePackage{type1cm}
18 \DeclareOption{13pt}{%
19 \AtEndOfClass{%
20 % font size definitions, similar to ones in /usr/share/texmf-texlive/tex/latex/base/
21 \renewcommand\normalsize{%
22    \@setfontsize\normalsize{13pt}{14.5pt}%
23    \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
24    \abovedisplayshortskip \z@ \@plus3\p@
25    \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
26    \belowdisplayskip \abovedisplayskip
27    \let\@listi\@listI}\normalsize%
28 \renewcommand\footnotesize{%
29    \@setfontsize\footnotesize\@xpt\@xiipt
30    \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
31    \abovedisplayshortskip \z@ \@plus3\p@
32    \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
33    \def\@listi{\leftmargin\leftmargini
34                \topsep 6\p@ \@plus2\p@ \@minus2\p@
35                \parsep 3\p@ \@plus2\p@ \@minus\p@
36                \itemsep \parsep}%
37    \belowdisplayskip \abovedisplayskip
38 }%
39 }%
40 }
41 \DeclareOption{16pt}{%
42 \AtEndOfClass{%
43 % font size definitions, similar to ones in /usr/share/texmf-texlive/tex/latex/base/
44 \renewcommand\normalsize{%
45    \@setfontsize\normalsize{16pt}{18pt}%
46    \abovedisplayskip 15\p@ \@plus3\p@ \@minus7\p@
47    \abovedisplayshortskip \z@ \@plus3.5\p@
48    \belowdisplayshortskip 8\p@ \@plus4\p@ \@minus3\p@
49    \belowdisplayskip \abovedisplayskip
50    \let\@listi\@listI}\normalsize%
51 \renewcommand\footnotesize{%
52    \@setfontsize\footnotesize\@xpt\@xiipt
53    \abovedisplayskip 12\p@ \@plus2\p@ \@minus5\p@
54    \abovedisplayshortskip \z@ \@plus3.5\p@
55    \belowdisplayshortskip 7\p@ \@plus3.5\p@ \@minus3\p@
56    \def\@listi{\leftmargin\leftmargini
57                \topsep 7\p@ \@plus2.5\p@ \@minus2.5\p@
58                \parsep 3.5\p@ \@plus2.5\p@ \@minus\p@
59                \itemsep \parsep}%
60    \belowdisplayskip \abovedisplayskip
61 }%
62 }%
63 }
64
65 \newif\iflargefont
66 \largefontfalse
67
68 \DeclareOption{26pt}{%
69 \largefonttrue
70 \AtEndOfClass{%
71 % font size definitions, similar to ones in /usr/share/texmf-texlive/tex/latex/base/
72 \renewcommand\normalsize{%
73    \@setfontsize\normalsize{26pt}{31pt}%
74    \abovedisplayskip 14\p@ \@plus6\p@ \@minus14\p@
75    \abovedisplayshortskip \z@ \@plus6\p@
76    \belowdisplayshortskip 13\p@ \@plus7\p@ \@minus6\p@
77    \belowdisplayskip \abovedisplayskip
78    \let\@listi\@listI}\normalsize%
79    \setlength{\parindent}{1.5em}%
80 \renewcommand\footnotesize{%
81    \@setfontsize\footnotesize{15pt}{20pt}
82    \abovedisplayskip 20\p@ \@plus4\p@ \@minus10\p@
83    \abovedisplayshortskip \z@ \@plus6\p@
84    \belowdisplayshortskip 12\p@ \@plus6\p@ \@minus6\p@
85    \def\@listi{\leftmargin\leftmargini
86                \topsep 12\p@ \@plus4\p@ \@minus4\p@
87                \parsep 6\p@ \@plus4\p@ \@minus\p@
88                \itemsep \parsep}%
89    \belowdisplayskip \abovedisplayskip
90 }%
91 \renewcommand\LARGE{\@setfontsize\LARGE{41pt}{50pt}}%
92 \renewcommand\huge{\@setfontsize\huge{49pt}{60pt}}%
93 }%
94 }
95
96 %  not supported on texlive version on jessie, and has weird side effects in some readers
97 %% \XeTeXgenerateactualtext=1
98
99 %% \DeclareOption{14pt}{\renewcommand{\normalsize}{\AtEndOfClass{\fontsize{14}{17}\selectfont}}}
100
101 \DeclareOption{defaultleading}{}
102 \DeclareOption{doubleleading}{\AtBeginDocument{\doublespacing}}%\setlength{\leading}{1em plus 0.5ex minus 0.2ex}}
103 \DeclareOption{onehalfleading}{\AtBeginDocument{\onehalfspacing}}%\setlength{\leading}{1em plus 0.5ex minus 0.2ex}}
104
105 %% This does not really work, since dvipdfm(x) will use it's configuration in /etc/texmf/dvipdfm(x) and force a global paper size setting.
106 \DeclareOption{a5paper}{%
107       \setlength{\paperheight}{210mm}%
108       \setlength{\paperwidth}{148mm}}
109
110
111 \newif\ifshowfootnotes \showfootnotestrue
112 \DeclareOption{nofootnotes}{\showfootnotesfalse}
113
114 \newif\ifendnotes \endnotesfalse
115 \DeclareOption{endnotes}{\endnotestrue}
116
117 \newif\ifshowthemes \showthemestrue
118 \DeclareOption{nothemes}{\showthemesfalse}
119
120 \newif\ifenablewlfont \enablewlfonttrue
121 \DeclareOption{nowlfont}{\enablewlfontfalse}
122
123 \newif\ifshowtoc \showtoctrue
124 \DeclareOption{notoc}{\showtocfalse}
125
126 %\newif\ifsansfont \sansfontfalse
127 %\DeclareOption{sansfont}{\sansfonttrue}
128
129 \newif\ifmargins \marginstrue
130 \DeclareOption{nomargins}{\marginsfalse}
131
132 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
133 \ProcessOptions\relax
134 \LoadClass[a4paper,oneside]{book}
135
136
137 \usepackage{trace}
138
139 \usepackage[MeX]{polski}
140
141 \usepackage[xetex]{graphicx}
142 \usepackage{fontspec}
143 \usepackage{xunicode}
144 \usepackage{xltxtra}
145
146 \usepackage{longtable}
147 \usepackage{tabu}
148 \usepackage{unicode-math}
149 \setmathfont{Latin Modern Math}
150
151 \usepackage{wrapfig}
152
153
154 \ifendnotes
155   \usepackage{enotez}
156   \setenotez{list-name=Przypisy}
157   \setenotez{backref=true}
158 \fi
159
160
161 \usepackage[overload]{textcase}
162 \usepackage{scalefnt}
163 \usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=black,xetex]{hyperref}
164
165 %\ifsansfont
166 %\renewcommand{\familydefault}{\sfdefault}
167 %\fi
168
169 \newfontfamily\alien[
170 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
171 Numbers=OldStyle,
172 Scale=0.85,
173 LetterSpace=-1.0
174 ] {DejaVu Serif}
175
176 \ifenablewlfont
177 \setmainfont [
178 %ExternalLocation,
179 UprightFont = JunicodeWL-Regular,
180 ItalicFont = JunicodeWL-Italic,
181 BoldFont = JunicodeWL-Regular,
182 BoldItalicFont = JunicodeWL-Italic,
183 SmallCapsFont = JunicodeWL-Regular,
184 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
185 Numbers=OldStyle,
186 Scale=1.04,
187 LetterSpace=-1.0
188 ] {JunicodeWL}
189
190 %\setmainfont [
191 %UprightFont = NotoSerif-Regular,
192 %ItalicFont = NotoSerif-Italic,
193 %BoldFont = NotoSerif-Regular,
194 %BoldItalicFont = NotoSerif-Italic,
195 %SmallCapsFont = NotoSerif-Regular,
196 %SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
197 %Scale=1.04,
198 %LetterSpace=-1.0
199 %] {NotoSerif}
200
201 %\setsansfont [
202 %UprightFont = NotoSansDisplay-Regular,
203 %ItalicFont = NotoSansDisplay-Italic,
204 %BoldFont = NotoSansDisplay-Regular,
205 %BoldItalicFont = NotoSansDisplay-Italic,
206 %SmallCapsFont = NotoSansDisplay-Regular,
207 %SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
208 %Scale=1.04,
209 %LetterSpace=-1.0
210 %] {NotoSansDisplay}
211
212 \defaultfontfeatures{
213 SizeFeatures={
214   {Size={-10.5}, FakeStretch=1.02, LetterSpace=2.0 },
215   {Size={10.5-12}, FakeStretch=2.00, LetterSpace=0.0 },
216   {Size={12-}, FakeStretch=0.98, LetterSpace=-2.0 }
217 }
218 }
219
220 \renewcommand{\textsc}[1]{%
221 {\addfontfeature{
222 SizeFeatures={
223   {Size={-10.5}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
224   {Size={10.5-12}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
225   {Size={12-}, FakeStretch=1.0, LetterSpace=8.0 }
226 },
227 Letters={SmallCaps,UppercaseSmallCaps}
228 }
229 #1}
230 }
231 \fi% enablewlfont
232
233 %{\Itshape JunicodeWL-Italic.ttf }
234 %{\bfseries Junicode-Bold.ttf }
235 %{\bfseries\itshape Junicode-BoldItalic.ttf }
236
237 \pagestyle{plain}
238 \usepackage{fancyhdr}
239 \usepackage{marginnote}
240
241
242 \makeatletter
243
244 % bottom figure below footnotes
245 \usepackage{fnpos}
246 \makeFNabove
247
248 \usepackage{color}
249 \definecolor{theme}{gray}{.3}
250
251 \ifmargins
252 \setlength{\marginparsep}{2em}
253 \setlength{\marginparwidth}{8.5em}
254 \setlength{\oddsidemargin}{0pt}
255 \setlength{\voffset}{0pt}
256 \setlength{\topmargin}{0pt}
257 \setlength{\headheight}{0pt}
258 \setlength{\headsep}{0pt}
259 \setlength{\textheight}{24cm}
260 \else
261 \addtolength{\oddsidemargin}{-.875in}
262 \addtolength{\evensidemargin}{-.875in}
263 \addtolength{\textwidth}{1.75in}
264
265 \addtolength{\topmargin}{-.875in}
266 \addtolength{\textheight}{1.5in}
267 \fi
268
269 \pagestyle{fancy}
270 \fancyhf{}
271 \renewcommand{\headrulewidth}{0pt}
272 \renewcommand{\footrulewidth}{0pt}
273 \lfoot{{\footnotesize \textsc{\@author} \emph{\@title}}}
274 \cfoot{}
275 \rfoot{{\footnotesize \thepage}}
276
277 \clubpenalty=100000
278 \widowpenalty=100000
279
280
281 % see http://osdir.com/ml/tex.xetex/2005-10/msg00003.html
282 \newsavebox{\ximagebox}\newlength{\ximageheight}
283 \newsavebox{\xglyphbox}\newlength{\xglyphheight}
284 \newcommand{\xbox}[1]
285 {\savebox{\ximagebox}{#1}\settoheight{\ximageheight}{\usebox {\ximagebox}}%
286 \savebox{\xglyphbox}{\char32}\settoheight{\xglyphheight}{\usebox {\xglyphbox}}%
287 \raisebox{\ximageheight}[0pt][0pt]{%\raisebox{-\xglyphheight}[0pt] [0pt]{%
288 \makebox[0pt][l]{\usebox{\xglyphbox}}}%}%
289 \usebox{\ximagebox}%
290 \raisebox{0pt}[0pt][0pt]{\makebox[0pt][r]{\usebox{\xglyphbox}}}}
291
292 \newcommand{\makecover}[2]{
293         \pdfpagewidth=#1
294         \pdfpageheight=#2
295
296         \thispagestyle{empty}
297         \newlength{\PictHOffset}
298         \newlength{\PictVOffset}
299         \setlength{\PictHOffset}{1in}
300         \addtolength{\PictHOffset}{\hoffset}
301         \addtolength{\PictHOffset}{\oddsidemargin}
302
303         \setlength{\PictVOffset}{1in}
304         \addtolength{\PictVOffset}{\voffset}
305         \addtolength{\PictVOffset}{\topmargin}
306         \addtolength{\PictVOffset}{\headheight}
307         \addtolength{\PictVOffset}{\headsep}
308         \addtolength{\PictVOffset}{\topskip}
309         \addtolength{\PictVOffset}{-\pdfpageheight}
310
311         \noindent\hspace*{-\PictHOffset}%
312         \raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{%
313             \includegraphics[height=\pdfpageheight,width=\pdfpagewidth]{cover.png}}}
314         \clearpage
315
316         \setlength{\pdfpagewidth}{210mm}
317         \setlength{\pdfpageheight}{297mm}
318 }
319
320
321 \renewcommand{\maketitle}{
322     {
323     \thispagestyle{empty}
324     \footnotesize
325     \color{theme}
326
327     \noindent \begin{minipage}[t]{.35\textwidth}\vspace{0pt}
328         \href{http://www.wolnelektury.pl}{\xbox{\includegraphics[width=\textwidth]{wl-logo.png}}}
329     \end{minipage}
330     \begin{minipage}[t]{.65\textwidth}\vspace{0pt}
331
332     \ifflaglessadvertising
333     \else
334         \href{\bookurl}{Ta lektura}, podobnie jak tysiące innych, jest dostępna on-line na stronie
335         \href{https://wolnelektury.pl/}{wolnelektury.pl}.
336         \vspace{.5em}
337     \fi
338
339     \ifdefined\thanknote
340         \thanknote
341         \vspace{.5em}
342     \fi
343
344     Utwór opracowany został w ramach projektu \href{https://wolnelektury.pl/}{Wolne Lektury}
345     przez \href{https://fundacja.wolnelektury.pl}{fundację Wolne Lektury}.
346
347     \end{minipage}
348     \noindent \rule{\linewidth}{0.4pt}
349
350     \vspace{.6em}
351     \color{black}
352     }
353 }
354
355 \newcommand{\editorialsection}{
356   \begin{figure}[b!]
357   {
358     \footnotesize
359     \color{theme}
360     \noindent \rule{\linewidth}{0.4pt}
361
362     \ifdefined\sponsors
363         \marginnote{%
364             \centering%
365             \sponsors%
366         }
367     \fi
368
369     Wszystkie zasoby Wolnych Lektur możesz swobodnie wykorzystywać,
370     publikować i rozpowszechniać pod warunkiem zachowania warunków licencji i zgodnie
371     z~\href{https://wolnelektury.pl/info/zasady-wykorzystania/}{Zasadami wykorzystania Wolnych Lektur}.
372
373     \rightsinfo
374
375     Wszystkie materiały dodatkowe (przypisy, motywy literackie) są udostępnione na
376     \href{https://artlibre.org/licence/lal/pl/}{Licencji Wolnej Sztuki 1.3}.
377
378     Fundacja Wolne Lektury zastrzega sobie prawa do wydania
379     krytycznego zgodnie z art. Art.99(2) Ustawy o prawach autorskich
380     i prawach pokrewnych. Wykorzystując zasoby z Wolnych Lektur,
381     należy pamiętać o zapisach licencji oraz zasadach, które spisaliśmy
382     w~\href{https://wolnelektury.pl/info/zasady-wykorzystania/}{Zasadach wykorzystania Wolnych Lektur}.
383     Zapoznaj się z nimi, zanim udostępnisz dalej nasze książki.
384     \vspace{.6em}
385
386     E-book można pobrać ze strony: \href{\bookurl}{\bookurl}
387
388     \vspace{.6em}
389     \sourceinfo
390
391     \publisherinfo
392
393     \description
394     \vspace{.6em}
395
396     \editors
397
398     \ifdefined\funders
399         \vspace{.6em}
400         \funders
401     \fi
402
403     \ifdefined\coverby
404         \vspace{.6em}
405         \coverby
406     \fi
407
408     \ifdefined\isbn
409         \vspace{.6em}
410         \isbn
411     \fi
412
413     \vspace{.6em}
414     \emph{Wesprzyj Wolne Lektury!}
415
416     Wolne Lektury to projekt fundacji Wolne Lektury – organizacji
417     pożytku publicznego działającej na rzecz wolności korzystania
418     z dóbr kultury.
419
420     Co roku do domeny publicznej przechodzi twórczość kolejnych autorów.
421     Dzięki Twojemu wsparciu będziemy je mogli udostępnić wszystkim bezpłatnie.
422
423     \vspace{.6em}
424     \emph{Jak możesz pomóc?}
425
426     Przekaż 1,5\% podatku na rozwój Wolnych Lektur:
427     Fundacja Wolne Lektury, KRS 0000070056.
428
429     \href{https://wolnelektury.pl/pomagam/}{Wspieraj Wolne Lektury} i pomóż nam rozwijać bibliotekę.
430
431     Przekaż darowiznę na konto:
432     \href{https://fundacja.wolnelektury.pl/pomoz-nam/darowizna/}{szczegóły na stronie Fundacji}.
433
434     \color{black}
435   }
436   \end{figure}
437 }
438
439
440 \newcommand{\typosubsubsection}[1]{%
441 \iflargefont
442 {\textsc{\scalefont{2}#1}}
443 \else
444 {\textsc{#1}}
445 \fi
446 }
447
448 \newcommand{\typosubsection}[1]{%
449 {\addfontfeature{
450 SizeFeatures={
451   {Size={-10}, Scale=1.2, FakeStretch=1.00, LetterSpace=8.0 },
452   {Size={10.5-12}, Scale=1.2, FakeStretch=1.00, LetterSpace=8.0 },
453   {Size={12-}, FakeStretch=2.0, LetterSpace=8.0 }
454 },
455 Letters={Uppercase}
456 }
457 \iflargefont
458 \MakeUppercase{\scalefont{2}#1}
459 \else
460 \MakeUppercase{#1}
461 \fi}
462 }
463
464 \newcommand{\typosection}[1]{%
465 \iflargefont
466 {\addfontfeature{FakeStretch=0.96, LetterSpace=-4.0}\emph{\scalefont{4}#1}}
467 \else
468 {\addfontfeature{FakeStretch=0.96, LetterSpace=-4.0}\emph{\scalefont{2}#1}}
469 \fi
470 %{\addfontfeature{Scale=2.0, FakeStretch=0.98, LetterSpace=-2.0}\emph{#1}}
471 }
472
473
474 \DeclareRobustCommand\authortoctext[1]{%
475 {\addvspace{10pt}\nopagebreak\leftskip0em\relax
476 \rightskip \@tocrmarg\relax
477 \noindent\itshape#1\par}}
478
479 \newcommand\authortoc[1]{%
480   \gdef\chapterauthor{#1}%
481   \addtocontents{toc}{\authortoctext{#1}}}
482
483
484 \newcommand{\tytul}[1]{%
485 #1%
486 \vspace{1em}%
487 }
488
489 \newcommand{\nazwapodutworu}[2]{%
490 \vspace{5ex}%
491 \section*{\typosection{#1}}%
492 \addcontentsline{toc}{section}{#2}%
493 }
494
495 \newcommand{\nazwanadpodutworu}[2]{%
496 \authortoc{}%
497 \nazwapodutworu{#1}{#2}%
498 \authortoc{}%
499 }
500
501 \newcommand{\autorutworu}[1]{%
502 \subsection*{\typosubsection{#1}}%
503 }
504
505 \newcommand{\autorpodutworu}[1]{%
506 \vspace{5ex}%
507 \subsection*{\typosubsection{#1}}%
508 \authortoc{#1}%
509 }
510
511 \newcommand{\dzielonadrzedne}[1]{%
512 \subsection*{\typosubsubsection{#1}}%
513 }
514
515 \newcommand{\nazwautworu}[1]{%
516 \vspace{5ex}%
517 \section*{\typosection{#1}}%
518 }
519
520 \newcommand{\podtytul}[1]{%
521 \subsection*{\typosubsubsection{#1}}%
522 }
523
524 \newcommand{\translator}[1]{%
525 \subsection*{\typosubsubsection{tłum. #1}}%
526 }
527
528
529 \newcommand{\powiesc}[1]{#1}
530 \newcommand{\opowiadanie}[1]{#1}
531 \newcommand{\lirykal}[1]{#1}
532 \newcommand{\lirykalp}[1]{#1}
533 \newcommand{\dramatwierszowanyl}[1]{#1}
534 \newcommand{\dramatwierszowanylp}[1]{#1}
535 \newcommand{\dramatwspolczesny}[1]{#1}
536
537 \newcommand{\nota}[1]{%
538 \par{\raggedleft \emph{#1}}%
539 \vspace{5ex}%
540 }
541
542 \newcommand{\dedykacja}[1]{%
543 \begin{em}%
544 \begin{flushright}%
545 #1%
546 \end{flushright}%
547 \end{em}%
548 }
549
550 \newlength{\fboxhsep}
551 \newlength{\fboxvsep}
552
553 \newlength{\fboxtoprule}
554 \newlength{\fboxbottomrule}
555 \newlength{\fboxleftrule}
556 \newlength{\fboxrightrule}
557
558 \ifshowthemes
559 \setlength{\fboxhsep}{5\fboxsep}
560 \setlength{\fboxvsep}{20\fboxsep}
561 \fi
562
563 \setlength{\fboxtoprule}{\fboxrule}
564 \setlength{\fboxleftrule}{\fboxrule}
565 \setlength{\fboxrightrule}{\fboxrule}
566 \setlength{\fboxbottomrule}{\fboxrule}
567
568
569
570 \def\@frameb@xother#1{%
571   \@tempdima\fboxtoprule
572   \advance\@tempdima\fboxvsep
573   \advance\@tempdima\dp\@tempboxa
574   \hbox{%
575     \lower\@tempdima\hbox{%
576       \vbox{%
577         \hrule\@height\fboxtoprule
578         \hbox{%
579           \vrule\@width\fboxleftrule
580           #1%
581           \vbox{%
582             \vskip\fboxvsep
583             \box\@tempboxa
584             \vskip\fboxvsep}%
585           #1%
586           \vrule\@width\fboxrightrule}%
587         \hrule\@height\fboxbottomrule}%
588     }%
589   }%
590 }
591
592
593 \long\def\fboxother#1{%
594   \leavevmode
595   \setbox\@tempboxa\hbox{%
596     \color@begingroup
597     \kern\fboxhsep{#1}\kern\fboxhsep
598     \color@endgroup}%
599   \@frameb@xother\relax}
600
601 \newcommand{\myfbox}[3]{%
602   \begingroup
603   \setlength{\fboxhsep}{#1}
604   \setlength{\fboxvsep}{#2}
605   \fboxother{#3}
606
607   \endgroup
608 }
609
610 \newcommand{\ramka}[1]{%
611 \par\vspace{1em}%
612 \edef\myindent{\the\parindent}%
613 \noindent\myfbox{1em}{1em}{%
614 \parbox{\dimexpr \textwidth - 2\fboxhsep - 2\fboxrule\relax}{%
615 \setlength{\parindent}{\myindent}%
616 #1%
617 }}%
618 \vspace{1em}%
619 }
620
621 \newcommand{\dlugicytat}[1]{%
622 \begin{quotation}%
623 #1%
624 \end{quotation}%
625 }
626
627 \newcommand{\poezjacyt}[1]{%
628 \begin{verse}%
629 #1%
630 \end{verse}%
631 }
632 \newcommand{\motto}[1]{%
633 \begin{em}%
634 #1%
635 \end{em}%
636 }
637 \newcommand{\listaosob}[2]{%
638 \par{#1}%
639 \begin{itemize}%
640 #2%
641 \end{itemize}%
642 }
643
644 \newcommand{\nagloweklisty}[1]{%
645 \typosubsubsection{#1}%
646 }
647
648 \newcommand{\listaosoba}[1]{%
649 \item[]{#1}%
650 }
651
652 \newcommand{\kwestia}[1]{%
653 \par{#1}%
654 }
655
656 \newcommand{\naglowekakt}[2]{%
657 \pagebreak
658 \subsection*{\typosubsection{\huge #1}}%
659 \addcontentsline{toc}{subsection}{#2}%
660 \vspace{5ex}%
661 }
662
663 \newcommand{\podtytulakt}[1]{%
664 \par{\typosubsubsection{\LARGE #1}}%
665 \vspace{5ex}%
666 }
667
668 \newcommand{\naglowekczesc}[2]{%
669 \pagebreak
670 \subsection*{\typosubsection{\huge #1}}%
671 \addcontentsline{toc}{subsection}{#2}%
672 \vspace{5ex}%
673 }
674
675 \newcommand{\podtytulczesc}[1]{%
676 \par{\typosubsubsection{\LARGE #1}}%
677 \vspace{5ex}%
678 }
679
680 \newcommand{\srodtytul}[1]{%
681 \subsection*{\typosubsection{#1}}%
682 }
683
684 \newcommand{\naglowekscena}[2]{%
685 \subsubsection*{\typosubsubsection{\LARGE #1}}%
686 \addcontentsline{toc}{subsubsection}{#2}%
687 \vspace{5ex}%
688 }
689
690 \newcommand{\podtytulscena}[1]{%
691 \par{\large #1}%
692 \vspace{5ex}%
693 }
694
695 \newcommand{\naglowekrozdzial}[2]{%
696 \subsubsection*{\typosubsubsection{\LARGE #1}}%
697 \addcontentsline{toc}{subsubsection}{#2}%
698 \vspace{5ex}%
699 }
700
701 \newcommand{\podtytulrozdzial}[1]{%
702 \par{\large #1}%
703 \vspace{5ex}%
704 }
705
706 \newcommand{\naglowekosoba}[1]{%
707 \medskip%
708 \par{\textsc{\MakeLowercase{#1}}}\nopagebreak%
709 }
710 \newcommand{\naglowekpodrozdzial}[1]{%
711 \vspace{5ex}\par{#1}\nopagebreak%
712 }
713
714 \newcommand{\podtytulpodrozdzial}[1]{%
715 \par{#1}\nopagebreak%
716 }
717
718 \newcommand{\miejsceczas}[1]{%
719 \par{\emph{#1}}%
720 }
721 \newcommand{\didaskalia}[1]{%
722 \par{\emph{#1}}%
723 }
724
725 \usepackage{intcalc}
726 \usepackage{color}
727 \definecolor{gray}{RGB}{200,200,200}
728 %\newcounter{parnum}
729 \newlength{\parnumwidth}
730 \setlength{\parnumwidth}{3em}
731 \newcommand{\N}{%
732   \leavevmode\refstepcounter{parnum}\reversemarginpar%
733   \marginnote{\textcolor{gray}{\small{\theparnum}}}%
734   \reversemarginpar}
735 \newcommand{\Nw}{%
736   \leavevmode\refstepcounter{parnum}\reversemarginpar%
737   \ifnum\intcalcMod{\value{parnum}}{5}=0%
738   \marginnote{\textcolor{gray}{\small{\theparnum}}}%
739   \fi\reversemarginpar}
740 \renewcommand{\N}{}
741 \renewcommand{\Nw}{}
742
743 \newcommand{\akap}[1]{%
744 \par{\N#1}%
745 }
746 \newcommand{\akapdialog}[1]{%
747 \par{\N#1}%
748 }
749 \newcommand{\akapcd}[1]{%
750 \par{\N#1}%
751 }
752
753 \newcommand{\mottopodpis}[1]{%
754 \begin{em}%
755 \begin{flushright}%
756 #1%
757 \end{flushright}%
758 \end{em}%
759 }
760
761 \newcommand{\strofa}[1]{%
762 \par{\noindent{\ignorespaces#1\vspace{1em}}}%
763 }
764
765 \newcommand{\wers}[1]{\Nw#1}
766
767 \newcommand{\wersakap}[1]{%
768 \Nw\hspace*{1em}#1%
769 }
770 \newcommand{\werscd}[1]{%
771 \Nw\hspace*{8em}#1%
772 }
773 \newcommand{\werswciety}[2][1em]{%
774 \Nw\hspace*{#1}#2%
775 }
776 \newcommand{\wersdoprawej}[1]{%
777 \Nw\hspace*{\fill}#1%
778 }
779
780 \ifshowfootnotes
781   \ifendnotes
782     \newcommand{\pa}[1]{\NoCaseChange{\endnote{#1 [przypis autorski]}}}
783     \newcommand{\pe}[1]{\NoCaseChange{\endnote{#1 [przypis edytorski]}}}
784     \newcommand{\pr}[1]{\NoCaseChange{\endnote{#1 [przypis redakcyjny]}}}
785     \newcommand{\pt}[1]{\NoCaseChange{\endnote{#1 [przypis tłumacza]}}}
786   \else
787     \newcommand{\pa}[1]{\NoCaseChange{\footnote{#1 [przypis autorski]}}}
788     \newcommand{\pe}[1]{\NoCaseChange{\footnote{#1 [przypis edytorski]}}}
789     \newcommand{\pr}[1]{\NoCaseChange{\footnote{#1 [przypis redakcyjny]}}}
790     \newcommand{\pt}[1]{\NoCaseChange{\footnote{#1 [przypis tłumacza]}}}
791   \fi
792 \else
793   \newcommand{\pa}[1]{}
794   \newcommand{\pe}[1]{}
795   \newcommand{\pr}[1]{}
796   \newcommand{\pt}[1]{}
797 \fi
798
799 \newcommand{\mat}[1]{$#1$}
800
801 \newcommand{\didasktekst}[1]{%
802 \emph{#1}%
803 }
804 \newcommand{\slowoobce}[1]{%
805 \emph{#1}%
806 }
807 \newcommand{\tytuldziela}[1]{%
808 \emph{#1}%
809 }
810 \newcommand{\wyroznienie}[1]{%
811 \emph{#1}%
812 }
813 \newcommand{\indeksdolny}[1]{%
814 \textsubscript{#1}%
815 }
816 \newcommand{\wiekszeodstepy}[1]{%
817 \spaceskip 3\fontdimen2\font plus 3\fontdimen3\font minus 3\fontdimen4\font \relax%
818 #1%
819 \spaceskip \fontdimen2\font plus \fontdimen3\font minus \fontdimen4\font \relax%
820 }
821
822 \newcommand{\osoba}[1]{%
823 {\scshape \MakeLowercase{#1}}%
824 }
825
826 \newcommand{\sekcjaswiatlo}{%
827 \vspace{30pt}%
828 }
829
830 \newcommand{\sekcjaasterysk}{%
831 \vspace{10pt}%
832 \begin{center}%
833 \par{*}%
834 \end{center}%
835 }
836
837 \newcommand{\separatorlinia}{%
838 \vspace{10pt}%
839 \hrule{}%
840 \vspace{10pt}%
841 }
842
843 \newcommand{\motyw}[2][0]{%
844 \ifshowthemes
845 \mbox{}%
846 \marginpar{%
847 \vspace{-8pt}%
848 \vspace{-#1\baselineskip}%
849 \raggedright{\hspace{0pt}%
850 \footnotesize{\color{theme}{#2}}}%
851 \vspace{\baselineskip}%
852 }%
853 \fi
854 }
855
856 \newcommand{\ilustr}[2]{%
857 \vspace{1em}%
858 \par{\noindent\includegraphics[width=\linewidth]{#1}}%
859 \vspace{1em}
860 }