ebf39e2d270b84f3805c9df1a14242c84a544db4
[librarian.git] / librarian / pdf / fnprep.cls
1 % -*- coding: utf-8 -*-
2 \NeedsTeXFormat{LaTeX2e}
3 \ProvidesClass{fnprep}[2011/11/28 Modern Poland Foundation Report style]
4
5
6 %\RequirePackage{geometry}
7 \RequirePackage{setspace}
8 \RequirePackage{type1cm}
9 \RequirePackage{amssymb}
10 \RequirePackage{amsmath}
11 \RequirePackage{paralist}
12 \RequirePackage[normalem]{ulem}
13 \RequirePackage{xifthen}
14 \RequirePackage{environ} % environments with \BODY, for wyimek
15
16
17 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
18 \ProcessOptions\relax
19 \LoadClass{report}
20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21
22 \usepackage{multicol}
23 %\usepackage[landscape]{geometry}
24 \usepackage[explicit]{titlesec}
25 \usepackage{titletoc}
26 \usepackage{fancyhdr}
27 \usepackage[MeX]{polski}
28
29 \usepackage{trace}
30 \usepackage{caption}
31 \usepackage{tabularx}
32 \usepackage{icomma}
33 \usepackage[xetex]{graphicx}
34 \usepackage[silent]{fontspec} % silent - no warnings, quiet - warn only to log
35 \usepackage{xunicode}
36 \usepackage{xltxtra}
37 %\usepackage{trimspaces} % imported by something else?
38 \usepackage{xcolor}
39 \usepackage[overload]{textcase}
40 \usepackage{scalefnt}
41 \usepackage[colorlinks=false,linkcolor=white,pdfborder={0,0,0},setpagesize=false,urlcolor=black,xetex,linktocpage]{hyperref}
42 %\usepackage{hyperref}
43 \usepackage{endnotes}
44 %\usepackage{fnpos}
45 \usepackage{printlen}
46 \usepackage{calc}
47 \usepackage[stable]{footmisc}
48
49 %http://tex.stackexchange.com/questions/40510/set-first-paragraph-no-indentation-after-re-definition-of-section#40512
50
51 \usepackage{chngcntr}
52 \counterwithout{footnote}{chapter}
53 \usepackage{microtype}
54
55
56 %%% Hyphenation opts:
57 %\pretolerance=10000
58 \tolerance=2600
59 \emergencystretch=30pt
60
61
62
63
64 %%%%%%%%%%%%%%%%%%%%%%% Paper size
65 %\setlength\baselineskip{7.14pt}
66 %% \ifcutafivepaper
67 %%   \usepackage[%
68 %%     paperwidth=160mm,%
69 %%     paperheight=225mm,%
70 %%     text={117mm,162mm},%
71 %%     top=30mm,%
72 %%     headsep=8mm,%
73 %%     left=23mm,%
74 %%     right=30mm]{geometry}%
75 %% \else
76 %%   \usepackage[%
77 %%     top=\dimexpr14.5mm+\baselineskip-16pt\relax, % margin will be smaller to accomodate for bigger header (16pt)
78 %%     headsep=3\baselineskip,
79 %%     headheight=16pt,
80 %%     bottom=26.3mm,%
81 %%     inner=14.5mm,%
82 %%     outer=22.5mm,%
83 %%     textheight=\dimexpr7.14pt*(32*2+1)\relax,%
84 %%     includehead]{geometry}
85 %% \fi
86
87 \usepackage[%
88   paperwidth=297mm,%
89   paperheight=210mm,%
90   top=22.578mm,%
91   left=15mm,%
92   right=20mm,%
93   bottom=24.439mm,%
94   headsep=19pt,% 2x grid(14) - 9 (text font size)
95 ]{geometry}%
96 \setlength\columnsep{10mm}
97
98
99 %%%%%%%%%%%%%%%%%%%%%%%% Fonts
100
101 \setmainfont[
102 ItalicFont = Lato-Italic,
103 BoldFont = Lato-Bold,
104 BoldItalicFont = Lato-BoldItalic,
105 Ligatures={Common, Contextual},
106 SmallCapsFont = Lato-Regular,
107 SmallCapsFeatures={Letters=SmallCaps},
108 Mapping=tex-text
109 ]{Lato-Regular}
110 \newfontface\latoblack{Lato-Black}
111 \newfontface\headfont{LeagueGothic-Regular}
112 %% Lato Light 
113
114 \setlength{\parindent}{3mm}
115 \setlength{\parskip}{0mm}
116
117 % \normalsize – normalny tekst 
118 % \large - normalny tekst headingowy (nie wiem czy jest inny niz normalsize?)
119 % \Large - troche większy tekst headingowy (spis treści)
120 % \huge - pagina tytuł rozdziału
121 % \Huge - naglowek na szarym tle
122
123 % grid 14, normal 9/12, 
124 % sródtytuły leage 10/8 14
125 % XXXX pagina: (mała? nie uzywana!)league 8, kerning 60 -› (30, 90), przy nowoczesna polska 100
126 % pagina: 28pt od top: 10mm  CMY 0 75 100
127 % kolumna-›teskt base 2xgrid
128 % tabela header 14pt, LEAGE GOT RE [pad: left:3mm, 1,41mm od góry 
129 % tabela  rynna 5mm
130 % tabela kreska 0.7pt pomarancz, potem 0.5pt też pomarańcz
131 % tabela tekst: 8.5/11pt lato regular (wtedy pomaranczem wyróżnienia)
132 % kern 5
133 % (bez gridu) (abo 8.5/11pt reglar) , poza interlinią 1mm odpycha enter
134
135 % footer: --||-- 
136 % footer LATO BLACK 15 -- pagina(strona) TYLKO Z PRAWEJ
137 % footer srodek. league gothic  10  k70 
138 % toc:wstep leag gothic 38  kern 75
139 % toc: 11pkt na grid 7 
140 % marginesy: top: 22.578 mm bottom 24.439mm rynna 10; out 20mm, ins
141 % 15mm
142 % sród->text base 2xgrid
143 % toc: wstep->text 3xgrid,
144 % toc: left: 25mm  right: 25mm
145 % toc długość tytułu (łamanie) 10m od końca 
146 % toc: od numeru enspace (indent)
147 % footer 2xgrid od dołu 9.7mm
148 % master toc: margin left: -width - 10 / 2 ; 136mm [3x łam]
149 % footnotes SOURCE SANS PRO 8/11pt semibold na gridzie (ale nie musi) spacing
150 % 100 
151 % master toc: 11pt/21pt leage na pół-grid (jak ejst mniejsze
152 % --licencja to 10pt!)
153 % master toc head 15pt, 
154 % master toc wpisy: 11pt - (można 11pt + black)
155 % TYtUL leag gothi  46pt
156
157 % sponsorzy np 9pt
158 \newcommand{\headingbig}{\fontsize{28}{28}\selectfont}
159 \renewcommand{\Huge}{\fontsize{38}{42}\selectfont}
160 \renewcommand{\huge}{\fontsize{15}{21}\selectfont}
161 \renewcommand{\LARGE}{\fontsize{14}{14}\selectfont}
162 \renewcommand{\large}{\fontsize{10}{21}\selectfont}
163 \renewcommand{\Large}{\fontsize{11}{14}\selectfont}
164 \newcommand{\TOCtext}{\fontsize{11}{21}\selectfont}
165 \renewcommand{\normalsize}{\fontsize{9}{14}\selectfont}
166 \renewcommand{\footnotesize}{\fontsize{8}{10.5}\selectfont} % 
167 \renewcommand{\scriptsize}{\fontsize{8.5}{11}\selectfont}
168 \newcommand{\titlesize}{\fontsize{46}{46}\selectfont}
169 \newcommand{\footerbig}{\fontsize{15}{15}\selectfont}
170 \newcommand{\footernormal}{\fontsize{10}{10}\selectfont}
171
172
173 %% \renewcommand{\normalsize}{\fontsize{10.4}{14.28}\addfontfeature{LetterSpace=3.0}\selectfont}
174 %% \renewcommand{\large}{\fontsize{14}{14.28}\addfontfeature{LetterSpace=3.0,Letters=Uppercase}\selectfont} % srodtytul
175 %% \renewcommand{\small}{\fontsize{8}{14.28}\addfontfeature{LetterSpace=5.0}\selectfont} % paginy
176 %% \renewcommand{\Large}{\fontsize{15}{21.42}\addfontfeature{LetterSpace=0.0}\selectfont} % tytuł rozdziału
177 %% \renewcommand{\huge}{\fontsize{18}{28.56}\addfontfeature{LetterSpace=1.0}\selectfont} % wyimek
178 %% \renewcommand{\Huge}{\fontsize{24}{40}\selectfont} % cover
179 %% \renewcommand{\footnotesize}{\addfontfeature{LetterSpace=1.0}\fontsize{9}{10.74}\selectfont}
180
181
182
183 % • • • • • • • • • COLORS • •
184 \definecolor{stoK}{cmyk}{0,0,0,1}
185 \definecolor{theme}{gray}{.3}
186 \definecolor{headcolor}{HTML}{EA5F21}
187 \definecolor{graybg}{cmyk}{0,0,0,0.55}
188 %\color{stoK}
189
190 % • • • • • • • • METADATA • •
191
192 \makeatletter
193 \newcommand{\@address}{}
194 \newcommand{\address}[1]{\renewcommand{\@address}{#1}}
195 \makeatother
196
197 % • • • • • • • • HEADINGS • •
198 %% this will go to \leftmark
199
200 \makeatletter
201 \pagestyle{fancy}
202 \fancyhf{}
203 \renewcommand{\chaptermark}[1]{\markboth{\MakeTextUppercase{#1}}{}}
204 % on the odd right : chapter title
205 \fancyhead[LE,RO]{{\color{headcolor}\headfont\headingbig\leftmark}}
206 \fancyfoot[RO]{{\color{gray}\latoblack\footerbig\thepage}}
207 \fancyfoot[RE]{{\color{gray}\headfont\footernormal\MakeTextUppercase{\@title}}}
208 \fancyfoot[LO]{{\color{gray}\headfont\footernormal\MakeTextUppercase{\@address}}}
209
210 \renewcommand{\headrulewidth}{0pt}
211 \renewcommand{\footrulewidth}{0pt}
212 \makeatother
213
214 %%%%%%%%%% Nagłówek pierwszej strony rozdziału
215 \makeatletter
216 \fancypagestyle{plain}{%
217 \fancyhf{}
218 \fancyfoot[RO]{{\color{gray}\latoblack\footerbig\thepage}}
219 \fancyfoot[LO]{{\color{gray}\headfont\footernormal\MakeTextUppercase{\@address}}}
220 }
221 \makeatother
222
223 % • • • • • • • • TITLES • • •
224 % no chapter numbers and no ``Rozdział'' word
225 %\renewcommand{\thechapter}{}
226 %\renewcommand{\chaptername}{}
227
228 % • chapter • • • • • • • • • •
229 \makeatletter\newenvironment{chaptertitlebox}{   \begin{lrbox}{\@tempboxa}\begin{minipage}[t][\dimexpr\textheight-0.5cm\relax]{\dimexpr\linewidth-0.5\columnsep\relax}}{\end{minipage}\end{lrbox}%
230    \colorbox{graybg}{\raisebox{1cm}{\usebox{\@tempboxa}}}
231 }
232
233 \newcommand{\nochapternumbers}{
234   \renewcommand{\thesection}{\@arabic \c@section .}
235 }
236 \makeatother
237
238 \nochapternumbers
239 \startcontents[chapter]
240 \titleformat{\chapter}[block]%
241 {\begin{chaptertitlebox}}%
242 {}{0pt}%
243 {\Huge{}\headfont\color{white}#1%
244 \newline\printcontents[chapter]{}{1}{}%
245 }%
246 [\end{chaptertitlebox}]
247
248 \titlespacing*{\chapter}{0pt}{0pt}{0pt}
249
250
251 % • section • • • • • • • • • • • • • • • 
252 \titleformat{\section}[runin]%
253 {\large\headfont%\nochapternumbers
254 }%
255 {}{0pt}{\makebox[\linewidth][l]{\color{headcolor}\raggedright{}\thesection
256     #1}%
257 % this is just to make the spacing between section and following
258 % text right (newlines produce strange amount of space
259 \\\makebox[\linewidth][l]{~}}%
260
261 \titlecontents{section}[0pt]{\headfont\large\color{white}}%
262 {\thecontentslabel}{\contentsmargin{0pt}}%
263 {\hfill\color{white}{\thecontentspage }}
264
265
266 % \fboxsep=0pt % for framebox
267 % ramki wkokół elementów \fbox{}
268 %\titlespacing*{\section}{0pt}{0pt}{2\baselineskip}
269
270
271 %% \titleformat{\chapter}[block]%
272 %% {\Large\intro\addfontfeature{LetterSpace=0.5,Kerning={Uppercase}}}%
273 %% {}{0pt}{\parbox{80mm}{\raggedright#1}}
274 %% \newlength{\chapterposcorrection}\newlength{\chapterspaceafter}
275 %% \setlength{\chapterposcorrection}{-\headsep-2\baselineskip-2.352mm} % 2.352 is a measured correction:
276 %% \setlength{\chapterspaceafter}{14\baselineskip-14pt+2.352mm}%\f@size of large
277 %% \titlespacing*{\chapter}{0pt}{\chapterposcorrection}{\chapterspaceafter}
278
279 %% %% Sections
280 %% \titleformat{\section}%
281 %% {\addfontfeature{LetterSpace=0.3}\large}%
282 %% {\thesection{}.}{.5em}{\MakeTextUppercase{#1}}
283 %% \renewcommand{\thesection}{\Roman{section}}
284 %% \titlespacing*{\section}{0pt}{\baselineskip}{0em}
285
286 %% \titleformat{\subsection}[block]%
287 %% {}%
288 %% {\thesubsection{}.}{.5em}{\MakeTextUppercase{#1}.}[]
289
290 %% \renewcommand{\thesubsection}{\Alph{subsection}}
291 %% \titlespacing*{\subsection}{0pt}{\baselineskip}{0em}
292
293 %% \newcommand{\typosubsubsection}[1]{%
294 %% {\textsc{#1}}
295 %% }
296
297
298 %%%%% Footnotes (works with footmisc) %%%%%%%%
299 \newlength{\footnoteindent}\newlength{\footnoteprespace}
300 \setlength{\footnoteindent}{8mm}%{3.5mm}
301 \setlength{\footnoteprespace}{0em}
302 \makeatletter
303
304 \renewcommand\@makefnmark{%
305 \hspace{\footnoteprespace}
306 \hbox{{\normalfont \@thefnmark}}%
307 }
308 \renewcommand\thefootnote{[\arabic{footnote}]}
309
310 \setlength{\footnotemargin}{-\footnoteindent-\footnoteprespace-.3em}
311 \renewcommand\footnotelayout[1]{%
312   \setlength{\leftskip}{\footnoteindent}#1}
313
314 %% \long\def\@makefntext#1{%
315 %% \setlength{\leftskip}{\footnoteindent}%
316 %% \setlength{\hskip}{-\footnoteindent-\footnoteprespace-.1em}%
317 %% \hb@xt@ \dimexpr\footnoteindent+\footnoteprespace%
318 %% {\@makefnmark}#1
319 %% %  \parindent 1em\noindent \hb@xt@ 1.8em{\hss \@makefnmark \enskip}#1
320 %% }
321
322 %%%%% Endnotes
323 \newlength{\myendnoteprespace}\setlength{\myendnoteprespace}{.5em}
324 \newlength{\myendnoteindent}\setlength{\myendnoteindent}{14mm+.5em}
325
326 \renewcommand\theendnote{[\roman{endnote}]}
327 \renewcommand\makeenmark{\hspace{\myendnoteprespace}\theenmark}
328 \renewcommand{\notesname}{}
329 \newcommand{\authornotes}{
330 %  \newpage
331     \cleardoublepage
332     \chapter{Przypisy autora}
333     \setlength{\parindent}{0pt}
334     \def\enotesize{\normalsize}
335     \theendnotes
336 }
337 %% \newcommand{\@makeentext}[1]{%
338 %% \noindent\theenmark\hspace{\footnoteindent}#1
339 %% }
340
341 %% \def\enoteformat{\rightskip\z@ \parindent=0em
342 %%  \makebox[\myendnoteindent][l]{\makeenmark}} % 12.4mm - measured biggest endnote marker (in Moglen text [xxxviii])
343 \def\enoteformat{\rightskip\z@ \setlength{\leftskip}{\myendnoteindent-\myendnoteprespace} \parindent=0em
344   \leavevmode\llap{\makebox[\myendnoteindent][l]{\makeenmark}}}
345
346
347 % make public
348 \def\trimspace#1{\trim@spaces{#1}}
349
350 \makeatother
351
352 %%%%%%%%%%%%%%%%%%%%%% Wyimki
353 %% \floatstyle{plain}
354 %% \newfloat{wyimekbox}{p}{wmk}
355 %% \floatname{wyimekbox}{Wyimek}
356
357 \NewEnviron{wyimek}{%
358   \checkoddpage
359   \ifoddpage
360     \PackageWarning{wlpub}{Wyimek on odd page, omitting it ( \BODY )}
361   \else
362     \begin{figure}[tp]
363       \begin{center}
364         \begin{minipage}[t][\textheight][c]{70mm}
365           \huge\it\BODY
366         \end{minipage}
367       \end{center}
368     \end{figure}
369   \fi
370   \BODY
371 }
372
373 %% wyimek that doesn't leave text in text flow
374 %% TODO: reduce code duplication
375 \NewEnviron{wyimekextra}{%
376   \checkoddpage
377   \ifoddpage
378     \PackageWarning{wlpub}{Wyimek on odd page, omitting it ( \BODY )}
379   \else
380     \begin{figure}[tp]
381       \begin{center}
382         \begin{minipage}[t][\textheight][c]{70mm}
383           \huge\it\BODY
384         \end{minipage}
385       \end{center}
386     \end{figure}
387   \fi
388 }
389
390
391
392
393 %%%%%%%%%%%%%%%%%%%%%%%%%%
394
395
396 \clubpenalty=700
397 \widowpenalty=700
398 \hyphenpenalty=3500
399 \doublehyphendemerits=9000
400 \finalhyphendemerits=6000
401
402
403 % see http://osdir.com/ml/tex.xetex/2005-10/msg00003.html
404 \newsavebox{\ximagebox}\newlength{\ximageheight}
405 \newsavebox{\xglyphbox}\newlength{\xglyphheight}
406 \newcommand{\xbox}[1]
407 {\savebox{\ximagebox}{#1}\settoheight{\ximageheight}{\usebox {\ximapgebox}}%
408 \savebox{\xglyphbox}{\char32}\settoheight{\xglyphheight}{\usebox {\xglyphbox}}%
409 \raisebox{\ximageheight}[0pt][0pt]{%\raisebox{-\xglyphheight}[0pt] [0pt]{%
410 \makebox[0pt][l]{\usebox{\xglyphbox}}}%}%
411 \usebox{\ximagebox}%
412 \raisebox{0pt}[0pt][0pt]{\makebox[0pt][r]{\usebox{\xglyphbox}}}}
413
414
415 \newcommand{\makecover}{
416   %% \paperwidth=297mm
417
418
419   %% \paperheight=210mm
420
421   \newgeometry{paperwidth=297mm,paperheight=210mm}
422   \pdfpageheight=210mm
423   \pdfpagewidth=297mm
424
425   \thispagestyle{empty}
426   \newlength{\PictHOffset}
427   \newlength{\PictVOffset}
428   \setlength{\PictHOffset}{1in}
429   \addtolength{\PictHOffset}{\hoffset}
430   \addtolength{\PictHOffset}{\oddsidemargin}
431
432   \setlength{\PictVOffset}{1in}
433   \addtolength{\PictVOffset}{\voffset}
434   \addtolength{\PictVOffset}{\topmargin}
435   \addtolength{\PictVOffset}{\headheight}
436   \addtolength{\PictVOffset}{\headsep}
437   \addtolength{\PictVOffset}{\topskip}
438
439   \addtolength{\PictVOffset}{-\paperheight}
440
441   \noindent\hspace*{-\PictHOffset}%
442   \raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{%
443       \includegraphics[height=\pdfpageheight,width=\pdfpagewidth]{cover.pdf}}}
444
445   \restoregeometry
446   \pdfpageheight=210mm
447   \pdfpagewidth=148mm
448
449   }
450
451 \renewcommand{\maketitle}{
452   %\vspace{\paperheight}
453   \thispagestyle{empty}
454   \cleardoublepage
455   \setcounter{page}{1}
456   \thispagestyle{empty}
457   \begin{center}
458   \intro
459   {
460     \begin{spacing}{1.4}
461     \Huge \noindent \thetitle
462     \end{spacing}
463   }
464   \end{center}
465
466   \vspace{\baselineskip}
467
468   \begin{center}
469     \intro
470     {
471       \huge \noindent
472       \theauthor
473
474     }
475   \end{center}
476                   %\emph{\thankyou}\\
477                   %\indent\emph{You made this book possible.}
478   \vspace{7\baselineskip}
479
480   \begin{center}
481     \includegraphics[scale=.2]{logo.eps}
482   \end{center}
483
484 }
485
486
487 \newcommand{\editorialsection}{
488   \clearpage
489   \thispagestyle{empty}
490   {
491     \setlength{\parindent}{0mm}
492     \small
493   \input{editorial}
494   }
495 }
496
497 \renewcommand*\contentsname{Spis treści}
498 \newcommand{\spistresci}{
499 {
500   \intro
501   \setcounter{tocdepth}{0}
502   \tableofcontents
503   \newpage
504 }
505 }
506
507
508
509
510 \newcommand{\tytul}[1]{%
511 #1%
512 \vspace{1em}%
513 }
514
515 \newcommand{\nazwapodutworu}[1]{%
516 \section*{#1}%
517 }
518
519 \newcommand{\autorutworu}[1]{%
520 #1
521 %\subsection*{\typosubsection{#1}}%
522 }
523
524 \newcommand{\dzielonadrzedne}[1]{%
525 \subsection*{#1}%
526 }
527
528 \newcommand{\nazwautworu}[1]{%
529 \section*{#1}%
530 }
531
532 \newcommand{\podtytul}[1]{%
533 \subsection*{\typosubsubsection{#1}}%
534 }
535
536 \newcommand{\podtytulpodutworu}[1]{%
537 \subsection*{\typosubsubsection{#1}}%
538 }
539
540 \newcommand{\translator}[1]{%
541 \subsection*{\typosubsubsection{tłum. #1}}%
542 }
543 \newcommand{\translatorsline}[1]{%
544 #1
545 }
546
547 \newcommand{\powiesc}[1]{#1}
548 \newcommand{\opowiadanie}[1]{#1}
549 \newcommand{\lirykal}[1]{#1}
550 \newcommand{\lirykalp}[1]{#1}
551 \newcommand{\dramatwierszowanyl}[1]{#1}
552 \newcommand{\dramatwierszowanylp}[1]{#1}
553 \newcommand{\dramatwspolczesny}[1]{#1}
554
555
556 \newcommand{\dedykacja}[1]{%
557 \begin{em}%
558 \begin{flushright}%
559 #1%
560 \end{flushright}%
561 \end{em}%
562 }
563
564 \newcommand{\dlugicytat}[1]{%
565 \begin{quotation}%
566 \noindent{}\ignorespaces#1%
567 \end{quotation}%
568 \hspace{\parindent}
569 }
570
571 \newcommand{\poezjacyt}[1]{%
572 \begin{verse}%
573 #1%
574 \end{verse}%
575 }
576 \newcommand{\motto}[1]{%
577 \begin{em}%
578 #1%
579 \end{em}%
580 }
581 \newcommand{\listaosob}[2]{%
582 \par{#1}%
583 \begin{itemize}%
584 #2%
585 \end{itemize}%
586 }
587
588 \newcommand{\nagloweklisty}[1]{%
589 \typosubsubsection{#1}%
590 }
591
592 \newcommand{\listaosoba}[1]{%
593 \item{#1}%
594 }
595
596 \newcommand{\kwestia}[1]{%
597 \par{#1}%
598 }
599
600 \newcommand{\naglowekakt}[1]{%
601 \pagebreak
602 \subsection*{\typosubsection{#1}}%
603 }
604 \newcommand{\naglowekczesc}[1]{%
605 \pagebreak
606 \part{#1}%
607 }
608 \newcommand{\srodtytul}[1]{%
609 \subsection{#1}%
610 }
611
612 \newcommand{\naglowekscena}[1]{%
613 \subsubsection*{\typosubsubsection{#1}}%
614 }
615
616 \newcommand{\theautorrozdzialu}{}
617
618 \newcommand{\autorrozdzialu}[1]{%
619 \renewcommand{\theautorrozdzialu}{{\normalfont\normalsize\newline{}\newline{}\parbox{\textwidth}{\normalsize\it #1}}}
620 }
621
622
623 \newcommand{\naglowekrozdzial}[1]{%
624 \startcontents[chapter]
625 %
626 \chapter[#1]{\MakeUppercase{#1}\theautorrozdzialu{}}%
627 \renewcommand{\theautorrozdzialu}{}%
628 }
629
630 \newcommand{\naglowekosoba}[1]{%
631 \par{\textsc{#1}}\nopagebreak%
632 }
633 \newcommand{\naglowekpodrozdzial}[1]{%
634 \section{#1}\nopagebreak%
635 }
636
637 \newcommand{\miejsceczas}[1]{%
638 \par{\emph{#1}}%
639 }
640 \newcommand{\didaskalia}[1]{%
641 \par{\emph{#1}}%
642 }
643
644 \newcommand{\akap}[1]{%
645 #1
646
647 % newline here needed, we don't use \par cause it ignores \noindent before
648 }
649 \newcommand{\akapdialog}[1]{%
650 \par{#1}%
651 }
652 \newcommand{\akapcd}[1]{%
653 \par{#1}%
654 }
655
656 \newcommand{\mottopodpis}[1]{%
657 \begin{em}%
658 \begin{flushright}%
659 #1%
660 \end{flushright}%
661 \end{em}%
662 }
663
664 \newcommand{\strofa}[1]{%
665 #1\vspace{\baselineskip}%
666 }
667
668 \newcommand{\wers}[1]{#1}
669
670 \newcommand{\wersakap}[1]{%
671 \hspace*{1em}#1%
672 }
673 \newcommand{\werscd}[1]{%
674 \hspace*{8em}#1%
675 }
676 \newcommand{\werswciety}[2][1em]{%
677 \hspace*{#1}#2%
678 }
679
680
681 \newcommand{\mat}[1]{$#1$}
682
683 \newcommand{\didasktekst}[1]{%
684 \emph{#1}%
685 }
686 \newcommand{\slowoobce}[1]{%
687 \emph{#1}%
688 }
689 \makeatletter
690
691 \newif\ifinnota \innotafalse
692
693 \newcommand{\tytuldziela}[1]{%
694   \ifinnota
695    #1%
696   \else
697    \emph{#1}%
698   \fi
699 }
700 \makeatother
701
702 \newcommand{\wyroznienie}[1]{%
703 \emph{#1}%
704 }
705
706 \newcommand{\nota}[1]{%
707 %\sekcjaasterysk{}
708 \begin{em}%
709   \innotatrue
710 %\begin{flushleft}%
711   \noindent{}\small{}#1%
712   \innotafalse
713 %\end{flushleft}%
714 \end{em}%
715 }
716
717
718 \newcommand{\osoba}[1]{%
719 #1%
720 }
721
722 \newcommand{\sekcjaswiatlo}{%
723 \vspace{\baselineskip}%
724 }
725
726 \newcommand{\sekcjaasterysk}{%
727 \vspace{\baselineskip}%
728 \begin{center}%
729 \par{*}%
730 \end{center}%
731 }
732
733 \newcommand{\separatorlinia}{%
734 \vspace{10pt}%
735 \hrule{}%
736 \vspace{10pt}%
737 }
738
739 \newcommand{\ilustrscale}[0]{1}
740 \newcommand{\setilustrscale}[1]{\renewcomand{\ilustrscale}{#1}}
741
742 \newcommand{\ilustr}[3][]{
743   \begin{center}%
744     \ifthenelse{\isempty{#1}}%
745     {\par{\includegraphics{\trimspace{#2}}\\#3}}%
746     {\par{\includegraphics[#1]{\trimspace{#2}}\\#3}}%
747   \end{center}%
748 }
749
750
751 \newcommand{\lista}[1]{%
752 \begin{compactenum}
753 %\setlength{\parskip}{\parindent}
754 #1
755 \end{compactenum}
756 }
757
758 \newcommand{\punkt}[1]{%
759 \item #1
760 }
761 \newcommand{\link}[2]{\href{#1}{\uline{#2}\footnote{#1}}}
762
763 \newcommand{\www}[1]{{\normalfont\href{#1}{#1}}}