moglen do wydania
[librarian.git] / librarian / pdf / wlpub.cls
1 % -*- coding: utf-8 -*-
2 \NeedsTeXFormat{LaTeX2e}
3 \ProvidesClass{wlpub}[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{geometry}
16 \RequirePackage{setspace}
17 \RequirePackage{type1cm}
18 \RequirePackage{amssymb}
19 \RequirePackage{amsmath}
20 \RequirePackage{paralist}
21 \RequirePackage[normalem]{ulem}
22 \RequirePackage{xifthen}
23 \RequirePackage{environ} % environments with \BODY, for wyimek
24 %\RequirePackage{indentfirst}
25 %\DeclareOption{13pt}{%
26 %\AtEndOfClass{%
27 % font size definitions, similar to ones in /usr/share/texmf-texlive/tex/latex/base/
28 %% \renewcommand\normalsize{%
29 %%    \@setfontsize\normalsize{13pt}{14.5pt}%
30 %%    \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
31 %%    \abovedisplayshortskip \z@ \@plus3\p@
32 %%    \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
33 %%    \belowdisplayskip \abovedisplayskip
34 %%    \let\@listi\@listI}\normalsize%
35 %% \renewcommand\footnotesize{%
36 %%    \@setfontsize\footnotesize\@xpt\@xiipt
37 %%    \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
38 %%    \abovedisplayshortskip \z@ \@plus3\p@
39 %%    \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
40 %%    \def\@listi{\leftmargin\leftmargini
41 %%                \topsep 6\p@ \@plus2\p@ \@minus2\p@
42 %%                \parsep 3\p@ \@plus2\p@ \@minus\p@
43 %%                \itemsep \parsep}%
44 %%    \belowdisplayskip \abovedisplayskip
45 %}%
46 %}%
47 %}
48
49 %% \DeclareOption{14pt}{\renewcommand{\normalsize}{\AtEndOfClass{\fontsize{14}{17}\selectfont}}}
50
51 \DeclareOption{defaultleading}{}
52 \DeclareOption{doubleleading}{\AtBeginDocument{\doublespacing}}%\setlength{\leading}{1em plus 0.5ex minus 0.2ex}}
53 \DeclareOption{onehalfleading}{\AtBeginDocument{\onehalfspacing}}%\setlength{\leading}{1em plus 0.5ex minus 0.2ex}}
54
55 %% 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.
56 \DeclareOption{a5paper}{%
57       \setlength{\paperheight}{210mm}%
58       \setlength{\paperwidth}{148mm}}
59 % a5paper dropped down size
60 \newif\ifcutafivepaper \cutafivepaperfalse
61 \DeclareOption{a5paperdd}{%
62   \setlength{\paperheight}{225mm}%
63   \setlength{\paperwidth}{160mm}%
64   \cutafivepapertrue
65 }
66
67 \newif\ifshowfootnotes \showfootnotestrue
68 \DeclareOption{nofootnotes}{\showfootnotesfalse}
69
70 \newif\ifshowthemes \showthemestrue
71 \DeclareOption{nothemes}{\showthemesfalse}
72
73 \newif\ifenablewlfont \enablewlfonttrue
74 \DeclareOption{nowlfont}{\enablewlfontfalse}
75
76
77 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{extbook}}
78 \ProcessOptions\relax
79 \LoadClass{extbook}
80 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
81
82 \usepackage{trace}
83 \usepackage{caption}
84 \usepackage{tabularx}
85 \usepackage[MeX]{polski}
86 \usepackage{icomma}
87 \usepackage[xetex]{graphicx}
88 \usepackage[silent]{fontspec} % silent - no warnings, quiet - warn only to log
89 \usepackage{xunicode}
90 \usepackage{xltxtra}
91 %\usepackage{trimspaces} % imported by something else?
92 \usepackage{color}
93 \usepackage[overload]{textcase}
94 \usepackage{scalefnt}
95 \usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=black,xetex,linktocpage]{hyperref}
96 %\usepackage{hyperref}
97 \usepackage{fancyhdr}
98 \usepackage{endnotes}
99 %\usepackage{fnpos}
100 \usepackage{printlen}
101 \usepackage{calc}
102 \usepackage[stable]{footmisc}
103
104 \usepackage{chngcntr}
105 \counterwithout{footnote}{chapter}
106
107 \usepackage[explicit]{titlesec}
108 \usepackage{microtype}
109
110 %% Wyimki - placing them on correct pages
111 \usepackage{changepage}
112 %\usepackage{fltpage}
113 %\usepackage{float}
114
115 \pagestyle{plain}
116 % bottom figure below footnotes
117 %\makeFNabove
118
119 %%% Hyphenation opts:
120 %\pretolerance=10000
121 \tolerance=2600
122 \emergencystretch=30pt
123
124
125 %%%%%%%%%%%%%%%%%%%%%%% Paper size
126 \setlength\baselineskip{7.14pt}
127 \ifcutafivepaper
128   \usepackage[%
129     paperwidth=160mm,%
130     paperheight=225mm,%
131     text={117mm,162mm},%
132     top=30mm,%
133     headsep=8mm,%
134     left=23mm,%
135     right=30mm]{geometry}%
136 \else
137   \usepackage[%
138     top=\dimexpr14.5mm+\baselineskip-16pt\relax, % margin will be smaller to accomodate for bigger header (16pt)
139     headsep=3\baselineskip,
140     headheight=16pt,
141     bottom=26.3mm,%
142     inner=14.5mm,%
143     outer=22.5mm,%
144     textheight=\dimexpr7.14pt*(32*2+1)\relax,%
145     includehead]{geometry}
146 \fi
147
148 %%%%%%%%%%%%%%%%%%%%%%%% Fonts
149
150 \setmainfont[
151 ItalicFont = CrimsonText-Italic,
152 BoldFont = CrimsonText-Bold,
153 BoldItalicFont = CrimsonText-BoldItalic,
154 Ligatures={Common, Contextual},
155 SmallCapsFont = CrimsonText-Roman,
156 SmallCapsFeatures={Letters=SmallCaps},
157 Mapping=tex-text
158 ]{CrimsonText-Roman}
159 \newfontface\sb{CrimsonText-Semibold}
160 \newfontface\intro{Archivo-Black}
161
162 %% For faking small caps You burn in typographic hell.
163 \makeatletter
164 \newlength\fake@f
165 \newlength\fake@c
166 \def\fakesc#1{%
167   \begingroup%
168   \xdef\fake@name{\csname\curr@fontshape/\f@size\endcsname}%
169   \fontsize{\fontdimen8\fake@name}{\baselineskip}\selectfont%
170   \uppercase{#1}%
171   \endgroup%
172 }
173 \makeatother
174
175 \setlength{\parindent}{3mm}
176 \setlength{\parskip}{0mm}
177
178 \renewcommand{\normalsize}{\fontsize{10.4}{14.28}\addfontfeature{LetterSpace=3.0}\selectfont}
179 \renewcommand{\large}{\fontsize{14}{14.28}\addfontfeature{LetterSpace=3.0,Letters=Uppercase}\selectfont} % srodtytul
180 \renewcommand{\small}{\fontsize{8}{14.28}\addfontfeature{LetterSpace=5.0}\selectfont} % paginy
181 \renewcommand{\Large}{\fontsize{15}{21.42}\addfontfeature{LetterSpace=0.0}\selectfont} % tytuł rozdziału
182 \renewcommand{\huge}{\fontsize{18}{28.56}\addfontfeature{LetterSpace=1.0}\selectfont} % wyimek
183 \renewcommand{\Huge}{\fontsize{24}{40}\selectfont} % cover
184 \renewcommand{\footnotesize}{\addfontfeature{LetterSpace=1.0}\fontsize{9}{10.74}\selectfont}
185
186
187
188 \definecolor{stoK}{cmyk}{0,0,0,1}
189 \definecolor{theme}{gray}{.3}
190 %\color{stoK}
191
192
193 %%%%%%%%%%%%%%%%%%%%%% Headings.
194 \pagestyle{fancy}
195 \fancyhf{}
196 \renewcommand{\headrulewidth}{0pt}
197 \renewcommand{\footrulewidth}{0pt}
198 \makeatletter
199 %%%%%%%%%% Nagłówek normalny
200 \cfoot{}
201 % this will go to \leftmark
202 \renewcommand{\chaptermark}[1]{\markboth{\MakeTextUppercase{#1}}{}}
203 \fancyhead[CE]{{\small\MakeTextUppercase{\@author, \@title}}}
204 \fancyhead[CO]{{\small\leftmark}}
205 \fancyhead[LE,RO]{{\small\intro\thepage}}
206 %%%%%%%%%% Nagłówek pierwszej strony rozdziału
207 \fancypagestyle{plain}{%
208 \fancyhf{}
209 \fancyhead[LE,RO]{{\small\intro\thepage}}
210 \renewcommand{\headrulewidth}{0pt}
211 \renewcommand{\footrulewidth}{0pt}}
212 \makeatother
213
214 %%%%%%%%%%%%%%%%%%%%%% Section title styles.
215 %% Chapters
216
217 % No chapter numbers in TOC
218 \renewcommand{\thechapter}{}
219
220 \titleformat{\chapter}[block]%
221 {\Large\intro\addfontfeature{LetterSpace=0.5,Kerning={Uppercase}}}%
222 {}{0pt}{\parbox{80mm}{\raggedright#1}}
223 \newlength{\chapterposcorrection}\newlength{\chapterspaceafter}
224 \setlength{\chapterposcorrection}{-\headsep-2\baselineskip-2.352mm} % 2.352 is a measured correction:
225 \setlength{\chapterspaceafter}{14\baselineskip-14pt+2.352mm}%\f@size of large
226 \titlespacing*{\chapter}{0pt}{\chapterposcorrection}{\chapterspaceafter}
227
228 %% Sections
229 \titleformat{\section}%
230 {\addfontfeature{LetterSpace=0.3}\large}%
231 {\thesection{}.}{.5em}{\MakeTextUppercase{#1}}
232 \renewcommand{\thesection}{\Roman{section}}
233 \titlespacing*{\section}{0pt}{\baselineskip}{0em}
234
235 \titleformat{\subsection}[block]%
236 {}%
237 {\thesubsection{}.}{.5em}{\MakeTextUppercase{#1}.}[]
238
239 \renewcommand{\thesubsection}{\Alph{subsection}}
240 \titlespacing*{\subsection}{0pt}{\baselineskip}{0em}
241
242 \newcommand{\typosubsubsection}[1]{%
243 {\textsc{#1}}
244 }
245
246 %% XXX delete them
247 \newcommand{\typosubsection}[1]{%
248 {\MakeTextUppercase{#1}}
249 }
250
251 \newcommand{\typosection}[1]{%
252 {\addfontfeature{FakeStretch=0.96, LetterSpace=-4.0}\emph{\scalefont{2}#1}}
253 %{\addfontfeature{Scale=2.0, FakeStretch=0.98, LetterSpace=-2.0}\emph{#1}}
254 }
255 %%%%%%%%%%%%%%%%%% ^^
256
257 %%%%% Footnotes (works with footmisc) %%%%%%%%
258 \newlength{\footnoteindent}\newlength{\footnoteprespace}
259 \setlength{\footnoteindent}{8mm}%{3.5mm}
260 \setlength{\footnoteprespace}{0em}
261 \makeatletter
262
263 \renewcommand\@makefnmark{%
264 \hspace{\footnoteprespace}
265 \hbox{{\normalfont \@thefnmark}}%
266 }
267 \renewcommand\thefootnote{[\arabic{footnote}]}
268
269 \setlength{\footnotemargin}{-\footnoteindent-\footnoteprespace-.3em}
270 \renewcommand\footnotelayout[1]{%
271   \setlength{\leftskip}{\footnoteindent}#1}
272
273 %% \long\def\@makefntext#1{%
274 %% \setlength{\leftskip}{\footnoteindent}%
275 %% \setlength{\hskip}{-\footnoteindent-\footnoteprespace-.1em}%
276 %% \hb@xt@ \dimexpr\footnoteindent+\footnoteprespace%
277 %% {\@makefnmark}#1
278 %% %  \parindent 1em\noindent \hb@xt@ 1.8em{\hss \@makefnmark \enskip}#1
279 %% }
280
281 %%%%% Endnotes
282 \newlength{\myendnoteprespace}\setlength{\myendnoteprespace}{.5em}
283 \newlength{\myendnoteindent}\setlength{\myendnoteindent}{14mm+.5em}
284
285 \renewcommand\theendnote{[\roman{endnote}]}
286 \renewcommand\makeenmark{\hspace{\myendnoteprespace}\theenmark}
287 \renewcommand{\notesname}{}
288 \newcommand{\authornotes}{
289 %  \newpage
290     \cleardoublepage
291     \chapter{Przypisy autora}
292     \setlength{\parindent}{0pt}
293     \def\enotesize{\normalsize}
294     \theendnotes
295 }
296 %% \newcommand{\@makeentext}[1]{%
297 %% \noindent\theenmark\hspace{\footnoteindent}#1
298 %% }
299
300 %% \def\enoteformat{\rightskip\z@ \parindent=0em
301 %%  \makebox[\myendnoteindent][l]{\makeenmark}} % 12.4mm - measured biggest endnote marker (in Moglen text [xxxviii])
302 \def\enoteformat{\rightskip\z@ \setlength{\leftskip}{\myendnoteindent-\myendnoteprespace} \parindent=0em
303   \leavevmode\llap{\makebox[\myendnoteindent][l]{\makeenmark}}}
304
305
306 % make public
307 \def\trimspace#1{\trim@spaces{#1}}
308
309 \makeatother
310
311 %%%%%%%%%%%%%%%%%%%%%% Wyimki
312 %% \floatstyle{plain}
313 %% \newfloat{wyimekbox}{p}{wmk}
314 %% \floatname{wyimekbox}{Wyimek}
315
316 \NewEnviron{wyimek}{%
317   \checkoddpage
318   \ifoddpage
319     \PackageWarning{wlpub}{Wyimek on odd page, omitting it ( \BODY )}
320   \else
321     \begin{figure}[tp]
322       \begin{center}
323         \begin{minipage}[t][\textheight][c]{70mm}
324           \huge\it\BODY
325         \end{minipage}
326       \end{center}
327     \end{figure}
328   \fi
329   \BODY
330 }
331
332 %% wyimek that doesn't leave text in text flow
333 %% TODO: reduce code duplication
334 \NewEnviron{wyimekextra}{%
335   \checkoddpage
336   \ifoddpage
337     \PackageWarning{wlpub}{Wyimek on odd page, omitting it ( \BODY )}
338   \else
339     \begin{figure}[tp]
340       \begin{center}
341         \begin{minipage}[t][\textheight][c]{70mm}
342           \huge\it\BODY
343         \end{minipage}
344       \end{center}
345     \end{figure}
346   \fi
347 }
348
349
350
351
352 %%%%%%%%%%%%%%%%%%%%%%%%%%
353
354
355 \clubpenalty=700
356 \widowpenalty=700
357 \hyphenpenalty=3500
358 \doublehyphendemerits=9000
359 \finalhyphendemerits=6000
360
361
362 % see http://osdir.com/ml/tex.xetex/2005-10/msg00003.html
363 \newsavebox{\ximagebox}\newlength{\ximageheight}
364 \newsavebox{\xglyphbox}\newlength{\xglyphheight}
365 \newcommand{\xbox}[1]
366 {\savebox{\ximagebox}{#1}\settoheight{\ximageheight}{\usebox {\ximapgebox}}%
367 \savebox{\xglyphbox}{\char32}\settoheight{\xglyphheight}{\usebox {\xglyphbox}}%
368 \raisebox{\ximageheight}[0pt][0pt]{%\raisebox{-\xglyphheight}[0pt] [0pt]{%
369 \makebox[0pt][l]{\usebox{\xglyphbox}}}%}%
370 \usebox{\ximagebox}%
371 \raisebox{0pt}[0pt][0pt]{\makebox[0pt][r]{\usebox{\xglyphbox}}}}
372
373
374 \newcommand{\makecover}{
375   %% \paperwidth=297mm
376
377
378   %% \paperheight=210mm
379
380   \newgeometry{paperwidth=297mm,paperheight=210mm}
381   \pdfpageheight=210mm
382   \pdfpagewidth=297mm
383
384   \thispagestyle{empty}
385   \newlength{\PictHOffset}
386   \newlength{\PictVOffset}
387   \setlength{\PictHOffset}{1in}
388   \addtolength{\PictHOffset}{\hoffset}
389   \addtolength{\PictHOffset}{\oddsidemargin}
390
391   \setlength{\PictVOffset}{1in}
392   \addtolength{\PictVOffset}{\voffset}
393   \addtolength{\PictVOffset}{\topmargin}
394   \addtolength{\PictVOffset}{\headheight}
395   \addtolength{\PictVOffset}{\headsep}
396   \addtolength{\PictVOffset}{\topskip}
397
398   \addtolength{\PictVOffset}{-\paperheight}
399
400   \noindent\hspace*{-\PictHOffset}%
401   \raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{%
402       \includegraphics[height=\pdfpageheight,width=\pdfpagewidth]{cover.pdf}}}
403
404   \restoregeometry
405   \pdfpageheight=210mm
406   \pdfpagewidth=148mm
407
408   }
409
410 \renewcommand{\maketitle}{
411   %\vspace{\paperheight}
412   \thispagestyle{empty}
413   \cleardoublepage
414   \setcounter{page}{1}
415   \thispagestyle{empty}
416   \begin{center}
417   \intro
418   {
419     \begin{spacing}{1.4}
420     \Huge \noindent \thetitle
421     \end{spacing}
422   }
423   \end{center}
424
425   \vspace{\baselineskip}
426
427   \begin{center}
428     \intro
429     {
430       \huge \noindent
431       \theauthor
432
433     }
434   \end{center}
435                   %\emph{\thankyou}\\
436                   %\indent\emph{You made this book possible.}
437   \vspace{7\baselineskip}
438
439   \begin{center}
440     \includegraphics[scale=.2]{logo.eps}
441   \end{center}
442
443 }
444
445
446 \newcommand{\editorialsection}{
447   \clearpage
448   \thispagestyle{empty}
449   {
450     \setlength{\parindent}{0mm}
451     \small
452   \input{editorial}
453   }
454 }
455
456 \renewcommand*\contentsname{Spis treści}
457 \newcommand{\spistresci}{
458 {
459   \intro
460   \setcounter{tocdepth}{0}
461   \tableofcontents
462   \newpage
463 }
464 }
465
466
467
468
469 \newcommand{\tytul}[1]{%
470 #1%
471 \vspace{1em}%
472 }
473
474 \newcommand{\nazwapodutworu}[1]{%
475 \section*{#1}%
476 }
477
478 \newcommand{\autorutworu}[1]{%
479 #1
480 %\subsection*{\typosubsection{#1}}%
481 }
482
483 \newcommand{\dzielonadrzedne}[1]{%
484 \subsection*{#1}%
485 }
486
487 \newcommand{\nazwautworu}[1]{%
488 \section*{#1}%
489 }
490
491 \newcommand{\podtytul}[1]{%
492 \subsection*{\typosubsubsection{#1}}%
493 }
494
495 \newcommand{\podtytulpodutworu}[1]{%
496 \subsection*{\typosubsubsection{#1}}%
497 }
498
499 \newcommand{\translator}[1]{%
500 \subsection*{\typosubsubsection{tłum. #1}}%
501 }
502 \newcommand{\translatorsline}[1]{%
503 #1
504 }
505
506 \newcommand{\powiesc}[1]{#1}
507 \newcommand{\opowiadanie}[1]{#1}
508 \newcommand{\lirykal}[1]{#1}
509 \newcommand{\lirykalp}[1]{#1}
510 \newcommand{\dramatwierszowanyl}[1]{#1}
511 \newcommand{\dramatwierszowanylp}[1]{#1}
512 \newcommand{\dramatwspolczesny}[1]{#1}
513
514
515 \newcommand{\dedykacja}[1]{%
516 \begin{em}%
517 \begin{flushright}%
518 #1%
519 \end{flushright}%
520 \end{em}%
521 }
522
523 \newcommand{\dlugicytat}[1]{%
524 \begin{quotation}%
525 \noindent{}\ignorespaces#1%
526 \end{quotation}%
527 \hspace{\parindent}
528 }
529
530 \newcommand{\poezjacyt}[1]{%
531 \begin{verse}%
532 #1%
533 \end{verse}%
534 }
535 \newcommand{\motto}[1]{%
536 \begin{em}%
537 #1%
538 \end{em}%
539 }
540 \newcommand{\listaosob}[2]{%
541 \par{#1}%
542 \begin{itemize}%
543 #2%
544 \end{itemize}%
545 }
546
547 \newcommand{\nagloweklisty}[1]{%
548 \typosubsubsection{#1}%
549 }
550
551 \newcommand{\listaosoba}[1]{%
552 \item{#1}%
553 }
554
555 \newcommand{\kwestia}[1]{%
556 \par{#1}%
557 }
558
559 \newcommand{\naglowekakt}[1]{%
560 \pagebreak
561 \subsection*{\typosubsection{#1}}%
562 }
563 \newcommand{\naglowekczesc}[1]{%
564 \pagebreak
565 \part{#1}%
566 }
567 \newcommand{\srodtytul}[1]{%
568 \subsection{#1}%
569 }
570
571 \newcommand{\naglowekscena}[1]{%
572 \subsubsection*{\typosubsubsection{#1}}%
573 }
574
575 \newcommand{\theautorrozdzialu}{}
576
577 \newcommand{\autorrozdzialu}[1]{%
578 \renewcommand{\theautorrozdzialu}{{\normalfont\normalsize\newline{}\newline{}\parbox{\textwidth}{\normalsize\it #1}}}
579 }
580
581
582 \newcommand{\naglowekrozdzial}[1]{%
583 \chapter[#1]{\MakeUppercase{#1}\theautorrozdzialu{}}
584 \renewcommand{\theautorrozdzialu}{}%
585 }
586
587 \newcommand{\naglowekosoba}[1]{%
588 \par{\textsc{#1}}\nopagebreak%
589 }
590 \newcommand{\naglowekpodrozdzial}[1]{%
591 \section{#1}\nopagebreak%
592 }
593
594 \newcommand{\miejsceczas}[1]{%
595 \par{\emph{#1}}%
596 }
597 \newcommand{\didaskalia}[1]{%
598 \par{\emph{#1}}%
599 }
600
601 \newcommand{\akap}[1]{%
602 #1
603
604 % newline here needed, we don't use \par cause it ignores \noindent before
605 }
606 \newcommand{\akapdialog}[1]{%
607 \par{#1}%
608 }
609 \newcommand{\akapcd}[1]{%
610 \par{#1}%
611 }
612
613 \newcommand{\mottopodpis}[1]{%
614 \begin{em}%
615 \begin{flushright}%
616 #1%
617 \end{flushright}%
618 \end{em}%
619 }
620
621 \newcommand{\strofa}[1]{%
622 #1\vspace{\baselineskip}%
623 }
624
625 \newcommand{\wers}[1]{#1}
626
627 \newcommand{\wersakap}[1]{%
628 \hspace*{1em}#1%
629 }
630 \newcommand{\werscd}[1]{%
631 \hspace*{8em}#1%
632 }
633 \newcommand{\werswciety}[2][1em]{%
634 \hspace*{#1}#2%
635 }
636
637 \ifshowfootnotes
638   \newcommand{\pa}[1]{\NoCaseChange{\endnote{#1}}}
639   \newcommand{\pe}[1]{\NoCaseChange{\footnote{#1}}}
640   \newcommand{\pr}[1]{\NoCaseChange{\footnote{#1}}}
641   \newcommand{\pt}[1]{\NoCaseChange{\footnote{#1}}}
642 \else
643   \newcommand{\pa}[1]{}
644   \newcommand{\pe}[1]{}
645   \newcommand{\pr}[1]{}
646   \newcommand{\pt}[1]{}
647 \fi
648
649 \newcommand{\mat}[1]{$#1$}
650
651 \newcommand{\didasktekst}[1]{%
652 \emph{#1}%
653 }
654 \newcommand{\slowoobce}[1]{%
655 \emph{#1}%
656 }
657 \makeatletter
658
659 \newif\ifinnota \innotafalse
660
661 \newcommand{\tytuldziela}[1]{%
662   \ifinnota
663    #1%
664   \else
665    \emph{#1}%
666   \fi
667 }
668 \makeatother
669
670 \newcommand{\wyroznienie}[1]{%
671 \emph{#1}%
672 }
673
674 \newcommand{\nota}[1]{%
675 %\sekcjaasterysk{}
676 \begin{em}%
677   \innotatrue
678 %\begin{flushleft}%
679   \noindent{}\small{}#1%
680   \innotafalse
681 %\end{flushleft}%
682 \end{em}%
683 }
684
685
686 \newcommand{\osoba}[1]{%
687 #1%
688 }
689
690 \newcommand{\sekcjaswiatlo}{%
691 \vspace{\baselineskip}%
692 }
693
694 \newcommand{\sekcjaasterysk}{%
695 \vspace{\baselineskip}%
696 \begin{center}%
697 \par{*}%
698 \end{center}%
699 }
700
701 \newcommand{\separatorlinia}{%
702 \vspace{10pt}%
703 \hrule{}%
704 \vspace{10pt}%
705 }
706
707 \newcommand{\ilustrscale}[0]{1}
708 \newcommand{\setilustrscale}[1]{\renewcomand{\ilustrscale}{#1}}
709
710 \newcommand{\ilustr}[3][]{
711   \begin{center}%
712     \ifthenelse{\isempty{#1}}%
713     {\par{\includegraphics{\trimspace{#2}}\\#3}}%
714     {\par{\includegraphics[#1]{\trimspace{#2}}\\#3}}%
715   \end{center}%
716 }
717
718
719 \newcommand{\motyw}[2][0]{%
720 \ifshowthemes
721 \mbox{}%
722 \marginpar{%
723 \vspace{-8pt}%
724 \vspace{-#1\baselineskip}%
725 \raggedright{\hspace{0pt}%
726 \footnotesize{\color{theme}{#2}}}%
727 \vspace{\baselineskip}%
728 }%
729 \fi
730 }
731
732 \newcommand{\lista}[1]{%
733 \begin{compactenum}
734 %\setlength{\parskip}{\parindent}
735 #1
736 \end{compactenum}
737 }
738
739 \newcommand{\punkt}[1]{%
740 \item #1
741 }
742 \newcommand{\link}[2]{\href{#1}{\uline{#2}\footnote{#1}}}
743
744 \newcommand{\www}[1]{{\normalfont\href{#1}{#1}}}