206d2365953c02bae2173305736cb4703bb6def9
[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 \XeTeXgenerateactualtext=1
97
98 %% \DeclareOption{14pt}{\renewcommand{\normalsize}{\AtEndOfClass{\fontsize{14}{17}\selectfont}}}
99
100 \DeclareOption{defaultleading}{}
101 \DeclareOption{doubleleading}{\AtBeginDocument{\doublespacing}}%\setlength{\leading}{1em plus 0.5ex minus 0.2ex}}
102 \DeclareOption{onehalfleading}{\AtBeginDocument{\onehalfspacing}}%\setlength{\leading}{1em plus 0.5ex minus 0.2ex}}
103
104 %% 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.
105 \DeclareOption{a5paper}{%
106       \setlength{\paperheight}{210mm}%
107       \setlength{\paperwidth}{148mm}}
108
109
110 \newif\ifshowfootnotes \showfootnotestrue
111 \DeclareOption{nofootnotes}{\showfootnotesfalse}
112
113 \newif\ifshowthemes \showthemestrue
114 \DeclareOption{nothemes}{\showthemesfalse}
115
116 \newif\ifenablewlfont \enablewlfonttrue
117 \DeclareOption{nowlfont}{\enablewlfontfalse}
118
119 \newif\ifshowtoc \showtoctrue
120 \DeclareOption{notoc}{\showtocfalse}
121
122 \newif\ifsansfont \sansfontfalse
123 \DeclareOption{sansfont}{\sansfonttrue}
124
125 \newif\ifmargins \marginstrue
126 \DeclareOption{nomargins}{\marginsfalse}
127
128 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
129 \ProcessOptions\relax
130 \LoadClass[a4paper,oneside]{book}
131
132
133 \usepackage{trace}
134
135 \usepackage[MeX]{polski}
136
137 \usepackage[xetex]{graphicx}
138 \usepackage{fontspec}
139 \usepackage{xunicode}
140 \usepackage{xltxtra}
141
142 \usepackage{longtable}
143 \usepackage{tabu}
144 \usepackage{unicode-math}
145 \setmathfont{Latin Modern Math}
146
147 \usepackage[overload]{textcase}
148 \usepackage{scalefnt}
149 \usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=black,xetex]{hyperref}
150
151 \ifsansfont
152 \renewcommand{\familydefault}{\sfdefault}
153 \fi
154
155 \newfontfamily\alien[
156 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
157 Numbers=OldStyle,
158 Scale=0.85,
159 LetterSpace=-1.0
160 ] {DejaVu Serif}
161
162 \ifenablewlfont
163 \setmainfont [
164 %ExternalLocation,
165 UprightFont = JunicodeWL-Regular,
166 ItalicFont = JunicodeWL-Italic,
167 BoldFont = JunicodeWL-Regular,
168 BoldItalicFont = JunicodeWL-Italic,
169 SmallCapsFont = JunicodeWL-Regular,
170 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
171 Numbers=OldStyle,
172 Scale=1.04,
173 LetterSpace=-1.0
174 ] {JunicodeWL}
175
176 %\setmainfont [
177 %UprightFont = NotoSerif-Regular,
178 %ItalicFont = NotoSerif-Italic,
179 %BoldFont = NotoSerif-Regular,
180 %BoldItalicFont = NotoSerif-Italic,
181 %SmallCapsFont = NotoSerif-Regular,
182 %SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
183 %Scale=1.04,
184 %LetterSpace=-1.0
185 %] {NotoSerif}
186
187 \setsansfont [
188 UprightFont = NotoSansDisplay-Regular,
189 ItalicFont = NotoSansDisplay-Italic,
190 BoldFont = NotoSansDisplay-Regular,
191 BoldItalicFont = NotoSansDisplay-Italic,
192 SmallCapsFont = NotoSansDisplay-Regular,
193 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
194 Scale=1.04,
195 LetterSpace=-1.0
196 ] {NotoSansDisplay}
197
198 \defaultfontfeatures{
199 SizeFeatures={
200   {Size={-10.5}, FakeStretch=1.02, LetterSpace=2.0 },
201   {Size={10.5-12}, FakeStretch=2.00, LetterSpace=0.0 },
202   {Size={12-}, FakeStretch=0.98, LetterSpace=-2.0 }
203 }
204 }
205
206 \renewcommand{\textsc}[1]{%
207 {\addfontfeature{
208 SizeFeatures={
209   {Size={-10.5}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
210   {Size={10.5-12}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
211   {Size={12-}, FakeStretch=1.0, LetterSpace=8.0 }
212 },
213 Letters={SmallCaps,UppercaseSmallCaps}
214 }
215 #1}
216 }
217 \fi% enablewlfont
218
219 %{\Itshape JunicodeWL-Italic.ttf }
220 %{\bfseries Junicode-Bold.ttf }
221 %{\bfseries\itshape Junicode-BoldItalic.ttf }
222
223 \pagestyle{plain}
224 \usepackage{fancyhdr}
225 \usepackage{marginnote}
226
227
228 \makeatletter
229
230 % bottom figure below footnotes
231 \usepackage{fnpos}
232 \makeFNabove
233
234 \usepackage{color}
235 \definecolor{theme}{gray}{.3}
236
237 \ifmargins
238 \setlength{\marginparsep}{2em}
239 \setlength{\marginparwidth}{8.5em}
240 \setlength{\oddsidemargin}{0pt}
241 \setlength{\voffset}{0pt}
242 \setlength{\topmargin}{0pt}
243 \setlength{\headheight}{0pt}
244 \setlength{\headsep}{0pt}
245 \setlength{\textheight}{24cm}
246 \else
247 \addtolength{\oddsidemargin}{-.875in}
248 \addtolength{\evensidemargin}{-.875in}
249 \addtolength{\textwidth}{1.75in}
250
251 \addtolength{\topmargin}{-.875in}
252 \addtolength{\textheight}{1.5in}
253 \fi
254
255 \pagestyle{fancy}
256 \fancyhf{}
257 \renewcommand{\headrulewidth}{0pt}
258 \renewcommand{\footrulewidth}{0pt}
259 \lfoot{{\footnotesize \textsc{\@author} \emph{\@title}}}
260 \cfoot{}
261 \rfoot{{\footnotesize \thepage}}
262
263 \clubpenalty=100000
264 \widowpenalty=100000
265
266
267 % see http://osdir.com/ml/tex.xetex/2005-10/msg00003.html
268 \newsavebox{\ximagebox}\newlength{\ximageheight}
269 \newsavebox{\xglyphbox}\newlength{\xglyphheight}
270 \newcommand{\xbox}[1]
271 {\savebox{\ximagebox}{#1}\settoheight{\ximageheight}{\usebox {\ximagebox}}%
272 \savebox{\xglyphbox}{\char32}\settoheight{\xglyphheight}{\usebox {\xglyphbox}}%
273 \raisebox{\ximageheight}[0pt][0pt]{%\raisebox{-\xglyphheight}[0pt] [0pt]{%
274 \makebox[0pt][l]{\usebox{\xglyphbox}}}%}%
275 \usebox{\ximagebox}%
276 \raisebox{0pt}[0pt][0pt]{\makebox[0pt][r]{\usebox{\xglyphbox}}}}
277
278 \newcommand{\makecover}[2]{
279         \pdfpagewidth=#1
280         \pdfpageheight=#2
281
282         \thispagestyle{empty}
283         \newlength{\PictHOffset}
284         \newlength{\PictVOffset}
285         \setlength{\PictHOffset}{1in}
286         \addtolength{\PictHOffset}{\hoffset}
287         \addtolength{\PictHOffset}{\oddsidemargin}
288
289         \setlength{\PictVOffset}{1in}
290         \addtolength{\PictVOffset}{\voffset}
291         \addtolength{\PictVOffset}{\topmargin}
292         \addtolength{\PictVOffset}{\headheight}
293         \addtolength{\PictVOffset}{\headsep}
294         \addtolength{\PictVOffset}{\topskip}
295         \addtolength{\PictVOffset}{-\pdfpageheight}
296
297         \noindent\hspace*{-\PictHOffset}%
298         \raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{%
299             \includegraphics[height=\pdfpageheight,width=\pdfpagewidth]{cover.png}}}
300         \clearpage
301
302         \setlength{\pdfpagewidth}{210mm}
303         \setlength{\pdfpageheight}{297mm}
304 }
305
306
307 \renewcommand{\maketitle}{
308     {
309     \thispagestyle{empty}
310     \footnotesize
311     \color{theme}
312
313     \noindent \begin{minipage}[t]{.35\textwidth}\vspace{0pt}
314         \href{http://www.wolnelektury.pl}{\xbox{\includegraphics[width=\textwidth]{wl-logo.png}}}
315     \end{minipage}
316     \begin{minipage}[t]{.65\textwidth}\vspace{0pt}
317
318     \ifflaglessadvertising
319     \else
320         \href{\bookurl}{Ta lektura}, podobnie jak tysiące innych, jest dostępna on-line na stronie
321         \href{http://www.wolnelektury.pl/}{wolnelektury.pl}.
322         \vspace{.5em}
323     \fi
324
325     \ifdefined\thanknote
326         \thanknote
327         \vspace{.5em}
328     \fi
329
330     Utwór opracowany został w ramach projektu \href{http://www.wolnelektury.pl/}{Wolne Lektury}
331     przez \href{http://nowoczesnapolska.org.pl}{fundację Nowoczesna Polska}.
332
333     \end{minipage}
334     \noindent \rule{\linewidth}{0.4pt}
335
336     \vspace{.6em}
337     \color{black}
338     }
339 }
340
341 \newcommand{\editorialsection}{
342   \begin{figure}[b!]
343   {
344     \footnotesize
345     \color{theme}
346     \noindent \rule{\linewidth}{0.4pt}
347
348     \ifdefined\sponsors
349         \marginnote{%
350             \centering%
351             \sponsors%
352         }
353     \fi
354
355     \rightsinfo
356     \vspace{.6em}
357
358     Źródło: \href{\bookurl}{\bookurl}
359
360     \vspace{.6em}
361     \sourceinfo
362
363     \publisherinfo
364
365     \description
366     \vspace{.6em}
367
368     \editors
369
370     \ifdefined\funders
371         \vspace{.6em}
372         \funders
373     \fi
374
375     \ifdefined\coverby
376         \vspace{.6em}
377         \coverby
378     \fi
379
380     \ifdefined\isbn
381         \vspace{.6em}
382         \isbn
383     \fi
384
385     \vspace{.6em}
386     \emph{Wesprzyj Wolne Lektury!}
387
388     Wolne Lektury to projekt fundacji Nowoczesna Polska – organizacji
389     pożytku publicznego działającej na rzecz wolności korzystania
390     z dóbr kultury.
391
392     Co roku do domeny publicznej przechodzi twórczość kolejnych autorów.
393     Dzięki Twojemu wsparciu będziemy je mogli udostępnić wszystkim bezpłatnie.
394
395     \vspace{.6em}
396     \emph{Jak możesz pomóc?}
397
398     Przekaż 1\% podatku na rozwój Wolnych Lektur:
399     Fundacja Nowoczesna Polska, KRS 0000070056.
400
401     Pomóż uwolnić konkretną książkę, wspierając
402     \href{http://www.wolnelektury.pl/wesprzyj/}{zbiórkę na stronie wolnelektury.pl}.
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 \newcommand{\naglowekczesc}[2]{%
636 \pagebreak
637 \subsection*{\typosubsection{\huge #1}}%
638 \addcontentsline{toc}{subsection}{#2}%
639 \vspace{5ex}%
640 }
641 \newcommand{\srodtytul}[1]{%
642 \subsection*{\typosubsection{#1}}%
643 }
644
645 \newcommand{\naglowekscena}[2]{%
646 \subsubsection*{\typosubsubsection{\LARGE #1}}%
647 \addcontentsline{toc}{subsubsection}{#2}%
648 \vspace{5ex}%
649 }
650 \newcommand{\naglowekrozdzial}[2]{%
651 \subsubsection*{\typosubsubsection{\LARGE #1}}%
652 \addcontentsline{toc}{subsubsection}{#2}%
653 \vspace{5ex}%
654 }
655
656 \newcommand{\naglowekosoba}[1]{%
657 \medskip%
658 \par{\textsc{\MakeLowercase{#1}}}\nopagebreak%
659 }
660 \newcommand{\naglowekpodrozdzial}[1]{%
661 \vspace{5ex}\par{#1}\nopagebreak%
662 }
663
664 \newcommand{\miejsceczas}[1]{%
665 \par{\emph{#1}}%
666 }
667 \newcommand{\didaskalia}[1]{%
668 \par{\emph{#1}}%
669 }
670
671 \usepackage{intcalc}
672 \usepackage{color}
673 \definecolor{gray}{RGB}{200,200,200}
674 %\newcounter{parnum}
675 \newlength{\parnumwidth}
676 \setlength{\parnumwidth}{3em}
677 \newcommand{\N}{%
678   \leavevmode\refstepcounter{parnum}\reversemarginpar%
679   \marginnote{\textcolor{gray}{\small{\theparnum}}}%
680   \reversemarginpar}
681 \newcommand{\Nw}{%
682   \leavevmode\refstepcounter{parnum}\reversemarginpar%
683   \ifnum\intcalcMod{\value{parnum}}{5}=0%
684   \marginnote{\textcolor{gray}{\small{\theparnum}}}%
685   \fi\reversemarginpar}
686 \renewcommand{\N}{}
687 \renewcommand{\Nw}{}
688
689 \newcommand{\akap}[1]{%
690 \par{\N#1}%
691 }
692 \newcommand{\akapdialog}[1]{%
693 \par{\N#1}%
694 }
695 \newcommand{\akapcd}[1]{%
696 \par{\N#1}%
697 }
698
699 \newcommand{\mottopodpis}[1]{%
700 \begin{em}%
701 \begin{flushright}%
702 #1%
703 \end{flushright}%
704 \end{em}%
705 }
706
707 \newcommand{\strofa}[1]{%
708 \par{\noindent{\ignorespaces#1\vspace{1em}}}%
709 }
710
711 \newcommand{\wers}[1]{\Nw#1}
712
713 \newcommand{\wersakap}[1]{%
714 \Nw\hspace*{1em}#1%
715 }
716 \newcommand{\werscd}[1]{%
717 \Nw\hspace*{8em}#1%
718 }
719 \newcommand{\werswciety}[2][1em]{%
720 \Nw\hspace*{#1}#2%
721 }
722 \newcommand{\wersdoprawej}[1]{%
723 \Nw\hspace*{\fill}#1%
724 }
725
726 \ifshowfootnotes
727   \newcommand{\pa}[1]{\NoCaseChange{\footnote{#1 [przypis autorski]}}}
728   \newcommand{\pe}[1]{\NoCaseChange{\footnote{#1 [przypis edytorski]}}}
729   \newcommand{\pr}[1]{\NoCaseChange{\footnote{#1 [przypis redakcyjny]}}}
730   \newcommand{\pt}[1]{\NoCaseChange{\footnote{#1 [przypis tłumacza]}}}
731 \else
732   \newcommand{\pa}[1]{}
733   \newcommand{\pe}[1]{}
734   \newcommand{\pr}[1]{}
735   \newcommand{\pt}[1]{}
736 \fi
737
738 \newcommand{\mat}[1]{$#1$}
739
740 \newcommand{\didasktekst}[1]{%
741 \emph{#1}%
742 }
743 \newcommand{\slowoobce}[1]{%
744 \emph{#1}%
745 }
746 \newcommand{\tytuldziela}[1]{%
747 \emph{#1}%
748 }
749 \newcommand{\wyroznienie}[1]{%
750 \emph{#1}%
751 }
752 \newcommand{\indeksdolny}[1]{%
753 \textsubscript{#1}%
754 }
755 \newcommand{\wiekszeodstepy}[1]{%
756 \spaceskip 3\fontdimen2\font plus 3\fontdimen3\font minus 3\fontdimen4\font \relax%
757 #1%
758 \spaceskip \fontdimen2\font plus \fontdimen3\font minus \fontdimen4\font \relax%
759 }
760
761 \newcommand{\osoba}[1]{%
762 {\scshape \MakeLowercase{#1}}%
763 }
764
765 \newcommand{\sekcjaswiatlo}{%
766 \vspace{30pt}%
767 }
768
769 \newcommand{\sekcjaasterysk}{%
770 \vspace{10pt}%
771 \begin{center}%
772 \par{*}%
773 \end{center}%
774 }
775
776 \newcommand{\separatorlinia}{%
777 \vspace{10pt}%
778 \hrule{}%
779 \vspace{10pt}%
780 }
781
782 \newcommand{\motyw}[2][0]{%
783 \ifshowthemes
784 \mbox{}%
785 \marginpar{%
786 \vspace{-8pt}%
787 \vspace{-#1\baselineskip}%
788 \raggedright{\hspace{0pt}%
789 \footnotesize{\color{theme}{#2}}}%
790 \vspace{\baselineskip}%
791 }%
792 \fi
793 }
794
795 \newcommand{\ilustr}[2]{%
796 \vspace{1em}%
797 \par{\noindent\includegraphics[width=\linewidth]{#1}}%
798 \vspace{1em}
799 }