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