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