f8b773191392c9886bdc310e82a2cf25250bd8f8
[librarian.git] / 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\ifshowthemes \showthemestrue
115 \DeclareOption{nothemes}{\showthemesfalse}
116
117 \newif\ifenablewlfont \enablewlfonttrue
118 \DeclareOption{nowlfont}{\enablewlfontfalse}
119
120 \newif\ifshowtoc \showtoctrue
121 \DeclareOption{notoc}{\showtocfalse}
122
123 %\newif\ifsansfont \sansfontfalse
124 %\DeclareOption{sansfont}{\sansfonttrue}
125
126 \newif\ifmargins \marginstrue
127 \DeclareOption{nomargins}{\marginsfalse}
128
129 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
130 \ProcessOptions\relax
131 \LoadClass[a4paper,oneside]{book}
132
133
134 \usepackage{trace}
135
136 \usepackage[MeX]{polski}
137
138 \usepackage[xetex]{graphicx}
139 \usepackage{fontspec}
140 \usepackage{xunicode}
141 \usepackage{xltxtra}
142
143 \usepackage{longtable}
144 \usepackage{tabu}
145 \usepackage{unicode-math}
146 \setmathfont{Latin Modern Math}
147
148 \usepackage[overload]{textcase}
149 \usepackage{scalefnt}
150 \usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=black,xetex]{hyperref}
151
152 %\ifsansfont
153 %\renewcommand{\familydefault}{\sfdefault}
154 %\fi
155
156 \newfontfamily\alien[
157 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
158 Numbers=OldStyle,
159 Scale=0.85,
160 LetterSpace=-1.0
161 ] {DejaVu Serif}
162
163 \ifenablewlfont
164 \setmainfont [
165 %ExternalLocation,
166 UprightFont = JunicodeWL-Regular,
167 ItalicFont = JunicodeWL-Italic,
168 BoldFont = JunicodeWL-Regular,
169 BoldItalicFont = JunicodeWL-Italic,
170 SmallCapsFont = JunicodeWL-Regular,
171 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
172 Numbers=OldStyle,
173 Scale=1.04,
174 LetterSpace=-1.0
175 ] {JunicodeWL}
176
177 %\setmainfont [
178 %UprightFont = NotoSerif-Regular,
179 %ItalicFont = NotoSerif-Italic,
180 %BoldFont = NotoSerif-Regular,
181 %BoldItalicFont = NotoSerif-Italic,
182 %SmallCapsFont = NotoSerif-Regular,
183 %SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
184 %Scale=1.04,
185 %LetterSpace=-1.0
186 %] {NotoSerif}
187
188 %\setsansfont [
189 %UprightFont = NotoSansDisplay-Regular,
190 %ItalicFont = NotoSansDisplay-Italic,
191 %BoldFont = NotoSansDisplay-Regular,
192 %BoldItalicFont = NotoSansDisplay-Italic,
193 %SmallCapsFont = NotoSansDisplay-Regular,
194 %SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
195 %Scale=1.04,
196 %LetterSpace=-1.0
197 %] {NotoSansDisplay}
198
199 \defaultfontfeatures{
200 SizeFeatures={
201   {Size={-10.5}, FakeStretch=1.02, LetterSpace=2.0 },
202   {Size={10.5-12}, FakeStretch=2.00, LetterSpace=0.0 },
203   {Size={12-}, FakeStretch=0.98, LetterSpace=-2.0 }
204 }
205 }
206
207 \renewcommand{\textsc}[1]{%
208 {\addfontfeature{
209 SizeFeatures={
210   {Size={-10.5}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
211   {Size={10.5-12}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
212   {Size={12-}, FakeStretch=1.0, LetterSpace=8.0 }
213 },
214 Letters={SmallCaps,UppercaseSmallCaps}
215 }
216 #1}
217 }
218 \fi% enablewlfont
219
220 %{\Itshape JunicodeWL-Italic.ttf }
221 %{\bfseries Junicode-Bold.ttf }
222 %{\bfseries\itshape Junicode-BoldItalic.ttf }
223
224 \pagestyle{plain}
225 \usepackage{fancyhdr}
226 \usepackage{marginnote}
227
228
229 \makeatletter
230
231 % bottom figure below footnotes
232 \usepackage{fnpos}
233 \makeFNabove
234
235 \usepackage{color}
236 \definecolor{theme}{gray}{.3}
237
238 \ifmargins
239 \setlength{\marginparsep}{2em}
240 \setlength{\marginparwidth}{8.5em}
241 \setlength{\oddsidemargin}{0pt}
242 \setlength{\voffset}{0pt}
243 \setlength{\topmargin}{0pt}
244 \setlength{\headheight}{0pt}
245 \setlength{\headsep}{0pt}
246 \setlength{\textheight}{24cm}
247 \else
248 \addtolength{\oddsidemargin}{-.875in}
249 \addtolength{\evensidemargin}{-.875in}
250 \addtolength{\textwidth}{1.75in}
251
252 \addtolength{\topmargin}{-.875in}
253 \addtolength{\textheight}{1.5in}
254 \fi
255
256 \pagestyle{fancy}
257 \fancyhf{}
258 \renewcommand{\headrulewidth}{0pt}
259 \renewcommand{\footrulewidth}{0pt}
260 \lfoot{{\footnotesize \textsc{\@author} \emph{\@title}}}
261 \cfoot{}
262 \rfoot{{\footnotesize \thepage}}
263
264 \clubpenalty=100000
265 \widowpenalty=100000
266
267
268 % see http://osdir.com/ml/tex.xetex/2005-10/msg00003.html
269 \newsavebox{\ximagebox}\newlength{\ximageheight}
270 \newsavebox{\xglyphbox}\newlength{\xglyphheight}
271 \newcommand{\xbox}[1]
272 {\savebox{\ximagebox}{#1}\settoheight{\ximageheight}{\usebox {\ximagebox}}%
273 \savebox{\xglyphbox}{\char32}\settoheight{\xglyphheight}{\usebox {\xglyphbox}}%
274 \raisebox{\ximageheight}[0pt][0pt]{%\raisebox{-\xglyphheight}[0pt] [0pt]{%
275 \makebox[0pt][l]{\usebox{\xglyphbox}}}%}%
276 \usebox{\ximagebox}%
277 \raisebox{0pt}[0pt][0pt]{\makebox[0pt][r]{\usebox{\xglyphbox}}}}
278
279 \newcommand{\makecover}[2]{
280         \pdfpagewidth=#1
281         \pdfpageheight=#2
282
283         \thispagestyle{empty}
284         \newlength{\PictHOffset}
285         \newlength{\PictVOffset}
286         \setlength{\PictHOffset}{1in}
287         \addtolength{\PictHOffset}{\hoffset}
288         \addtolength{\PictHOffset}{\oddsidemargin}
289
290         \setlength{\PictVOffset}{1in}
291         \addtolength{\PictVOffset}{\voffset}
292         \addtolength{\PictVOffset}{\topmargin}
293         \addtolength{\PictVOffset}{\headheight}
294         \addtolength{\PictVOffset}{\headsep}
295         \addtolength{\PictVOffset}{\topskip}
296         \addtolength{\PictVOffset}{-\pdfpageheight}
297
298         \noindent\hspace*{-\PictHOffset}%
299         \raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{%
300             \includegraphics[height=\pdfpageheight,width=\pdfpagewidth]{cover.png}}}
301         \clearpage
302
303         \setlength{\pdfpagewidth}{210mm}
304         \setlength{\pdfpageheight}{297mm}
305 }
306
307
308 \renewcommand{\maketitle}{
309     {
310     \thispagestyle{empty}
311     \footnotesize
312     \color{theme}
313
314     \noindent \begin{minipage}[t]{.35\textwidth}\vspace{0pt}
315         \href{http://www.wolnelektury.pl}{\xbox{\includegraphics[width=\textwidth]{wl-logo.png}}}
316     \end{minipage}
317     \begin{minipage}[t]{.65\textwidth}\vspace{0pt}
318
319     \ifflaglessadvertising
320     \else
321         \href{\bookurl}{Ta lektura}, podobnie jak tysiące innych, jest dostępna on-line na stronie
322         \href{http://www.wolnelektury.pl/}{wolnelektury.pl}.
323         \vspace{.5em}
324     \fi
325
326     \ifdefined\thanknote
327         \thanknote
328         \vspace{.5em}
329     \fi
330
331     Utwór opracowany został w ramach projektu \href{http://www.wolnelektury.pl/}{Wolne Lektury}
332     przez \href{http://nowoczesnapolska.org.pl}{fundację Nowoczesna Polska}.
333
334     \end{minipage}
335     \noindent \rule{\linewidth}{0.4pt}
336
337     \vspace{.6em}
338     \color{black}
339     }
340 }
341
342 \newcommand{\editorialsection}{
343   \begin{figure}[b!]
344   {
345     \footnotesize
346     \color{theme}
347     \noindent \rule{\linewidth}{0.4pt}
348
349     \ifdefined\sponsors
350         \marginnote{%
351             \centering%
352             \sponsors%
353         }
354     \fi
355
356     \rightsinfo
357     \vspace{.6em}
358
359     Źródło: \href{\bookurl}{\bookurl}
360
361     \vspace{.6em}
362     \sourceinfo
363
364     \publisherinfo
365
366     \description
367     \vspace{.6em}
368
369     \editors
370
371     \ifdefined\funders
372         \vspace{.6em}
373         \funders
374     \fi
375
376     \ifdefined\coverby
377         \vspace{.6em}
378         \coverby
379     \fi
380
381     \ifdefined\isbn
382         \vspace{.6em}
383         \isbn
384     \fi
385
386     \vspace{.6em}
387     \emph{Wesprzyj Wolne Lektury!}
388
389     Wolne Lektury to projekt fundacji Nowoczesna Polska – organizacji
390     pożytku publicznego działającej na rzecz wolności korzystania
391     z dóbr kultury.
392
393     Co roku do domeny publicznej przechodzi twórczość kolejnych autorów.
394     Dzięki Twojemu wsparciu będziemy je mogli udostępnić wszystkim bezpłatnie.
395
396     \vspace{.6em}
397     \emph{Jak możesz pomóc?}
398
399     Przekaż 1\% podatku na rozwój Wolnych Lektur:
400     Fundacja Nowoczesna Polska, KRS 0000070056.
401
402     Dołącz do \href{https://wolnelektury.pl/towarzystwo/}{Towarzystwa Przyjaciół Wolnych Lektur} i pomóż nam rozwijać bibliotekę.
403
404     Przekaż darowiznę na konto:
405     \href{http://nowoczesnapolska.org.pl/pomoz-nam/wesprzyj-nas/}{szczegóły na stronie Fundacji}.
406
407     \color{black}
408   }
409   \end{figure}
410 }
411
412
413 \newcommand{\typosubsubsection}[1]{%
414 \iflargefont
415 {\textsc{\scalefont{2}#1}}
416 \else
417 {\textsc{#1}}
418 \fi
419 }
420
421 \newcommand{\typosubsection}[1]{%
422 {\addfontfeature{
423 SizeFeatures={
424   {Size={-10}, Scale=1.2, FakeStretch=1.00, LetterSpace=8.0 },
425   {Size={10.5-12}, Scale=1.2, FakeStretch=1.00, LetterSpace=8.0 },
426   {Size={12-}, FakeStretch=2.0, LetterSpace=8.0 }
427 },
428 Letters={Uppercase}
429 }
430 \iflargefont
431 \MakeUppercase{\scalefont{2}#1}
432 \else
433 \MakeUppercase{#1}
434 \fi}
435 }
436
437 \newcommand{\typosection}[1]{%
438 \iflargefont
439 {\addfontfeature{FakeStretch=0.96, LetterSpace=-4.0}\emph{\scalefont{4}#1}}
440 \else
441 {\addfontfeature{FakeStretch=0.96, LetterSpace=-4.0}\emph{\scalefont{2}#1}}
442 \fi
443 %{\addfontfeature{Scale=2.0, FakeStretch=0.98, LetterSpace=-2.0}\emph{#1}}
444 }
445
446
447 \DeclareRobustCommand\authortoctext[1]{%
448 {\addvspace{10pt}\nopagebreak\leftskip0em\relax
449 \rightskip \@tocrmarg\relax
450 \noindent\itshape#1\par}}
451
452 \newcommand\authortoc[1]{%
453   \gdef\chapterauthor{#1}%
454   \addtocontents{toc}{\authortoctext{#1}}}
455
456
457 \newcommand{\tytul}[1]{%
458 #1%
459 \vspace{1em}%
460 }
461
462 \newcommand{\nazwapodutworu}[2]{%
463 \vspace{5ex}%
464 \section*{\typosection{#1}}%
465 \addcontentsline{toc}{section}{#2}%
466 }
467
468 \newcommand{\nazwanadpodutworu}[2]{%
469 \authortoc{}%
470 \nazwapodutworu{#1}{#2}%
471 \authortoc{}%
472 }
473
474 \newcommand{\autorutworu}[1]{%
475 \subsection*{\typosubsection{#1}}%
476 }
477
478 \newcommand{\autorpodutworu}[1]{%
479 \vspace{5ex}%
480 \subsection*{\typosubsection{#1}}%
481 \authortoc{#1}%
482 }
483
484 \newcommand{\dzielonadrzedne}[1]{%
485 \subsection*{\typosubsubsection{#1}}%
486 }
487
488 \newcommand{\nazwautworu}[1]{%
489 \vspace{5ex}%
490 \section*{\typosection{#1}}%
491 }
492
493 \newcommand{\podtytul}[1]{%
494 \subsection*{\typosubsubsection{#1}}%
495 }
496
497 \newcommand{\translator}[1]{%
498 \subsection*{\typosubsubsection{tłum. #1}}%
499 }
500
501
502 \newcommand{\powiesc}[1]{#1}
503 \newcommand{\opowiadanie}[1]{#1}
504 \newcommand{\lirykal}[1]{#1}
505 \newcommand{\lirykalp}[1]{#1}
506 \newcommand{\dramatwierszowanyl}[1]{#1}
507 \newcommand{\dramatwierszowanylp}[1]{#1}
508 \newcommand{\dramatwspolczesny}[1]{#1}
509
510 \newcommand{\nota}[1]{%
511 \par{\raggedleft \emph{#1}}%
512 \vspace{5ex}%
513 }
514
515 \newcommand{\dedykacja}[1]{%
516 \begin{em}%
517 \begin{flushright}%
518 #1%
519 \end{flushright}%
520 \end{em}%
521 }
522
523 \newlength{\fboxhsep}
524 \newlength{\fboxvsep}
525
526 \newlength{\fboxtoprule}
527 \newlength{\fboxbottomrule}
528 \newlength{\fboxleftrule}
529 \newlength{\fboxrightrule}
530
531 \ifshowthemes
532 \setlength{\fboxhsep}{5\fboxsep}
533 \setlength{\fboxvsep}{20\fboxsep}
534 \fi
535
536 \setlength{\fboxtoprule}{\fboxrule}
537 \setlength{\fboxleftrule}{\fboxrule}
538 \setlength{\fboxrightrule}{\fboxrule}
539 \setlength{\fboxbottomrule}{\fboxrule}
540
541
542
543 \def\@frameb@xother#1{%
544   \@tempdima\fboxtoprule
545   \advance\@tempdima\fboxvsep
546   \advance\@tempdima\dp\@tempboxa
547   \hbox{%
548     \lower\@tempdima\hbox{%
549       \vbox{%
550         \hrule\@height\fboxtoprule
551         \hbox{%
552           \vrule\@width\fboxleftrule
553           #1%
554           \vbox{%
555             \vskip\fboxvsep
556             \box\@tempboxa
557             \vskip\fboxvsep}%
558           #1%
559           \vrule\@width\fboxrightrule}%
560         \hrule\@height\fboxbottomrule}%
561     }%
562   }%
563 }
564
565
566 \long\def\fboxother#1{%
567   \leavevmode
568   \setbox\@tempboxa\hbox{%
569     \color@begingroup
570     \kern\fboxhsep{#1}\kern\fboxhsep
571     \color@endgroup}%
572   \@frameb@xother\relax}
573
574 \newcommand{\myfbox}[3]{%
575   \begingroup
576   \setlength{\fboxhsep}{#1}
577   \setlength{\fboxvsep}{#2}
578   \fboxother{#3}
579
580   \endgroup
581 }
582
583 \newcommand{\ramka}[1]{%
584 \par\vspace{1em}%
585 \edef\myindent{\the\parindent}%
586 \noindent\myfbox{1em}{1em}{%
587 \parbox{\dimexpr \textwidth - 2\fboxhsep - 2\fboxrule\relax}{%
588 \setlength{\parindent}{\myindent}%
589 #1%
590 }}%
591 \vspace{1em}%
592 }
593
594 \newcommand{\dlugicytat}[1]{%
595 \begin{quotation}%
596 #1%
597 \end{quotation}%
598 }
599
600 \newcommand{\poezjacyt}[1]{%
601 \begin{verse}%
602 #1%
603 \end{verse}%
604 }
605 \newcommand{\motto}[1]{%
606 \begin{em}%
607 #1%
608 \end{em}%
609 }
610 \newcommand{\listaosob}[2]{%
611 \par{#1}%
612 \begin{itemize}%
613 #2%
614 \end{itemize}%
615 }
616
617 \newcommand{\nagloweklisty}[1]{%
618 \typosubsubsection{#1}%
619 }
620
621 \newcommand{\listaosoba}[1]{%
622 \item[]{#1}%
623 }
624
625 \newcommand{\kwestia}[1]{%
626 \par{#1}%
627 }
628
629 \newcommand{\naglowekakt}[2]{%
630 \pagebreak
631 \subsection*{\typosubsection{\huge #1}}%
632 \addcontentsline{toc}{subsection}{#2}%
633 \vspace{5ex}%
634 }
635
636 \newcommand{\podtytulakt}[1]{%
637 \par{\typosubsubsection{\LARGE #1}}%
638 \vspace{5ex}%
639 }
640
641 \newcommand{\naglowekczesc}[2]{%
642 \pagebreak
643 \subsection*{\typosubsection{\huge #1}}%
644 \addcontentsline{toc}{subsection}{#2}%
645 \vspace{5ex}%
646 }
647
648 \newcommand{\podtytulczesc}[1]{%
649 \par{\typosubsubsection{\LARGE #1}}%
650 \vspace{5ex}%
651 }
652
653 \newcommand{\srodtytul}[1]{%
654 \subsection*{\typosubsection{#1}}%
655 }
656
657 \newcommand{\naglowekscena}[2]{%
658 \subsubsection*{\typosubsubsection{\LARGE #1}}%
659 \addcontentsline{toc}{subsubsection}{#2}%
660 \vspace{5ex}%
661 }
662
663 \newcommand{\podtytulscena}[1]{%
664 \par{\large #1}%
665 \vspace{5ex}%
666 }
667
668 \newcommand{\naglowekrozdzial}[2]{%
669 \subsubsection*{\typosubsubsection{\LARGE #1}}%
670 \addcontentsline{toc}{subsubsection}{#2}%
671 \vspace{5ex}%
672 }
673
674 \newcommand{\podtytulrozdzial}[1]{%
675 \par{\large #1}%
676 \vspace{5ex}%
677 }
678
679 \newcommand{\naglowekosoba}[1]{%
680 \medskip%
681 \par{\textsc{\MakeLowercase{#1}}}\nopagebreak%
682 }
683 \newcommand{\naglowekpodrozdzial}[1]{%
684 \vspace{5ex}\par{#1}\nopagebreak%
685 }
686
687 \newcommand{\podtytulpodrozdzial}[1]{%
688 \par{#1}\nopagebreak%
689 }
690
691 \newcommand{\miejsceczas}[1]{%
692 \par{\emph{#1}}%
693 }
694 \newcommand{\didaskalia}[1]{%
695 \par{\emph{#1}}%
696 }
697
698 \usepackage{intcalc}
699 \usepackage{color}
700 \definecolor{gray}{RGB}{200,200,200}
701 %\newcounter{parnum}
702 \newlength{\parnumwidth}
703 \setlength{\parnumwidth}{3em}
704 \newcommand{\N}{%
705   \leavevmode\refstepcounter{parnum}\reversemarginpar%
706   \marginnote{\textcolor{gray}{\small{\theparnum}}}%
707   \reversemarginpar}
708 \newcommand{\Nw}{%
709   \leavevmode\refstepcounter{parnum}\reversemarginpar%
710   \ifnum\intcalcMod{\value{parnum}}{5}=0%
711   \marginnote{\textcolor{gray}{\small{\theparnum}}}%
712   \fi\reversemarginpar}
713 \renewcommand{\N}{}
714 \renewcommand{\Nw}{}
715
716 \newcommand{\akap}[1]{%
717 \par{\N#1}%
718 }
719 \newcommand{\akapdialog}[1]{%
720 \par{\N#1}%
721 }
722 \newcommand{\akapcd}[1]{%
723 \par{\N#1}%
724 }
725
726 \newcommand{\mottopodpis}[1]{%
727 \begin{em}%
728 \begin{flushright}%
729 #1%
730 \end{flushright}%
731 \end{em}%
732 }
733
734 \newcommand{\strofa}[1]{%
735 \par{\noindent{\ignorespaces#1\vspace{1em}}}%
736 }
737
738 \newcommand{\wers}[1]{\Nw#1}
739
740 \newcommand{\wersakap}[1]{%
741 \Nw\hspace*{1em}#1%
742 }
743 \newcommand{\werscd}[1]{%
744 \Nw\hspace*{8em}#1%
745 }
746 \newcommand{\werswciety}[2][1em]{%
747 \Nw\hspace*{#1}#2%
748 }
749 \newcommand{\wersdoprawej}[1]{%
750 \Nw\hspace*{\fill}#1%
751 }
752
753 \ifshowfootnotes
754   \newcommand{\pa}[1]{\NoCaseChange{\footnote{#1 [przypis autorski]}}}
755   \newcommand{\pe}[1]{\NoCaseChange{\footnote{#1 [przypis edytorski]}}}
756   \newcommand{\pr}[1]{\NoCaseChange{\footnote{#1 [przypis redakcyjny]}}}
757   \newcommand{\pt}[1]{\NoCaseChange{\footnote{#1 [przypis tłumacza]}}}
758 \else
759   \newcommand{\pa}[1]{}
760   \newcommand{\pe}[1]{}
761   \newcommand{\pr}[1]{}
762   \newcommand{\pt}[1]{}
763 \fi
764
765 \newcommand{\mat}[1]{$#1$}
766
767 \newcommand{\didasktekst}[1]{%
768 \emph{#1}%
769 }
770 \newcommand{\slowoobce}[1]{%
771 \emph{#1}%
772 }
773 \newcommand{\tytuldziela}[1]{%
774 \emph{#1}%
775 }
776 \newcommand{\wyroznienie}[1]{%
777 \emph{#1}%
778 }
779 \newcommand{\indeksdolny}[1]{%
780 \textsubscript{#1}%
781 }
782 \newcommand{\wiekszeodstepy}[1]{%
783 \spaceskip 3\fontdimen2\font plus 3\fontdimen3\font minus 3\fontdimen4\font \relax%
784 #1%
785 \spaceskip \fontdimen2\font plus \fontdimen3\font minus \fontdimen4\font \relax%
786 }
787
788 \newcommand{\osoba}[1]{%
789 {\scshape \MakeLowercase{#1}}%
790 }
791
792 \newcommand{\sekcjaswiatlo}{%
793 \vspace{30pt}%
794 }
795
796 \newcommand{\sekcjaasterysk}{%
797 \vspace{10pt}%
798 \begin{center}%
799 \par{*}%
800 \end{center}%
801 }
802
803 \newcommand{\separatorlinia}{%
804 \vspace{10pt}%
805 \hrule{}%
806 \vspace{10pt}%
807 }
808
809 \newcommand{\motyw}[2][0]{%
810 \ifshowthemes
811 \mbox{}%
812 \marginpar{%
813 \vspace{-8pt}%
814 \vspace{-#1\baselineskip}%
815 \raggedright{\hspace{0pt}%
816 \footnotesize{\color{theme}{#2}}}%
817 \vspace{\baselineskip}%
818 }%
819 \fi
820 }
821
822 \newcommand{\ilustr}[2]{%
823 \vspace{1em}%
824 \par{\noindent\includegraphics[width=\linewidth]{#1}}%
825 \vspace{1em}
826 }