897535ecfd83bed248b314e16305518404b4ac8b
[librarian.git] / librarian / pdf / wl.sty
1 % -*- coding: utf-8 -*-
2
3 \usepackage[MeX]{polski}
4
5 \usepackage[xetex]{graphicx}
6 \usepackage{fontspec}
7 \usepackage{xunicode}
8 \usepackage{xltxtra}
9
10 \usepackage[overload]{textcase}
11 \usepackage{scalefnt}
12 \usepackage[colorlinks=true,linkcolor=black,urlcolor=black]{hyperref}
13
14 \setmainfont [
15 %ExternalLocation,
16 UprightFont = JunicodeWL-Regular,
17 ItalicFont = JunicodeWL-Italic,
18 BoldFont = JunicodeWL-Regular,
19 BoldItalicFont = JunicodeWL-Italic,
20 SmallCapsFont = JunicodeWL-Regular,
21 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
22 Numbers=OldStyle,
23 Scale=1.04,
24 LetterSpace=-1.0
25 ] {JunicodeWL}
26
27 \newfontfamily\alien[
28 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
29 Numbers=OldStyle,
30 Scale=0.85,
31 LetterSpace=-1.0
32 ] {DejaVu Serif}
33
34
35 \defaultfontfeatures{
36 SizeFeatures={
37   {Size={-10}, FakeStretch=1.02, LetterSpace=2.0 },
38   {Size={10.5-12}, FakeStretch=2.00, LetterSpace=0.0 },
39   {Size={12-}, FakeStretch=0.98, LetterSpace=-2.0 }
40 }
41 }
42
43 \renewcommand{\textsc}[1]{%
44 {\addfontfeature{
45 SizeFeatures={
46   {Size={-10}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
47   {Size={10.5-12}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
48   {Size={12-}, FakeStretch=1.0, LetterSpace=8.0 }
49 },
50 Letters={SmallCaps,UppercaseSmallCaps}
51 }
52 #1}
53 }
54
55 %{\itshape JunicodeWL-Italic.ttf }
56 %{\bfseries Junicode-Bold.ttf }
57 %{\bfseries\itshape Junicode-BoldItalic.ttf }
58
59 \pagestyle{plain}
60 \usepackage{fancyhdr}
61
62 \makeatletter
63
64 % bottom figure below footnotes
65 \usepackage{fnpos}
66 \makeFNabove
67
68 \usepackage{color}
69 \definecolor{theme}{gray}{.3}
70
71 \setlength{\marginparsep}{2em}
72 \setlength{\marginparwidth}{8.5em}
73 \setlength{\oddsidemargin}{0pt}
74 \setlength{\voffset}{0pt}
75 \setlength{\topmargin}{0pt}
76 \setlength{\headheight}{0pt}
77 \setlength{\headsep}{0pt}
78 \setlength{\textheight}{24cm}
79
80 \pagestyle{fancy}
81 \fancyhf{}
82 \renewcommand{\headrulewidth}{0pt}
83 \renewcommand{\footrulewidth}{0pt}
84 \lfoot{{\footnotesize \textsc{\@author} \emph{\@title}}}
85 \cfoot{}
86 \rfoot{{\footnotesize \thepage}}
87
88 \clubpenalty=100000
89 \widowpenalty=100000
90
91
92 % see http://osdir.com/ml/tex.xetex/2005-10/msg00003.html
93 \newsavebox{\ximagebox}\newlength{\ximageheight}
94 \newsavebox{\xglyphbox}\newlength{\xglyphheight}
95 \newcommand{\xbox}[1]
96 {\savebox{\ximagebox}{#1}\settoheight{\ximageheight}{\usebox {\ximagebox}}%
97 \savebox{\xglyphbox}{\char32}\settoheight{\xglyphheight}{\usebox {\xglyphbox}}%
98 \raisebox{\ximageheight}[0pt][0pt]{%\raisebox{-\xglyphheight}[0pt] [0pt]{%
99 \makebox[0pt][l]{\usebox{\xglyphbox}}}%}%
100 \usebox{\ximagebox}%
101 \raisebox{0pt}[0pt][0pt]{\makebox[0pt][r]{\usebox{\xglyphbox}}}}
102
103
104 \renewcommand{\maketitle}{
105     {
106     \thispagestyle{empty}
107     \footnotesize
108     \color{theme}
109
110     \noindent \begin{minipage}[t]{.35\textwidth}\vspace{0pt}
111         \href{http://www.wolnelektury.pl}{\xbox{\includegraphics[width=\textwidth]{wl-logo.png}}}
112     \end{minipage}
113     \begin{minipage}[t]{.65\textwidth}\vspace{0pt}
114
115         \href{\bookurl}{Ta lektura}, podobnie jak tysiące innych, jest dostępna on-line na stronie
116         \href{http://www.wolnelektury.pl/}{wolnelektury.pl}.
117         \vspace{.5em}
118
119         Utwór opracowany został w ramach projektu \href{http://www.wolnelektury.pl/}{Wolne Lektury}
120         przez \href{http://nowoczesnapolska.org.pl}{fundację Nowoczesna Polska}.
121
122     \end{minipage}
123     \noindent \rule{\linewidth}{0.4pt}
124
125     \vspace{.6em}
126     \color{black}
127     }
128 }
129
130 \newcommand{\editorialsection}{
131   \begin{figure}[b!]
132   {
133     \footnotesize
134     \color{theme}
135     \noindent \rule{\linewidth}{0.4pt}
136
137     \rightsinfo
138     \vspace{.6em}
139
140     \sourceinfo
141
142     \description
143     \vspace{.6em}
144
145     \editors
146
147     \color{black}
148   }
149   \end{figure}
150 }
151
152
153 \newcommand{\typosubsubsection}[1]{%
154 {\textsc{#1}}
155 }
156
157 \newcommand{\typosubsection}[1]{%
158 {\addfontfeature{
159 SizeFeatures={
160   {Size={-10}, Scale=1.2, FakeStretch=1.00, LetterSpace=8.0 },
161   {Size={10.5-12}, Scale=1.2, FakeStretch=1.00, LetterSpace=8.0 },
162   {Size={12-}, FakeStretch=1.0, LetterSpace=8.0 }
163 },
164 Letters={Uppercase}
165 }
166 \MakeUppercase{#1}}
167 }
168
169 \newcommand{\typosection}[1]{%
170 {\addfontfeature{FakeStretch=0.96, LetterSpace=-4.0}\emph{\scalefont{2}#1}}
171 %{\addfontfeature{Scale=2.0, FakeStretch=0.98, LetterSpace=-2.0}\emph{#1}}
172 }
173
174
175 \newcommand{\tytul}[1]{%
176 #1%
177 \vspace{1em}%
178 }
179
180 \newcommand{\nazwapodutworu}[1]{%
181 \section*{\typosection{#1}}%
182 }
183
184 \newcommand{\autorutworu}[1]{%
185 \subsection*{\typosubsection{#1}}%
186 }
187
188 \newcommand{\dzielonadrzedne}[1]{%
189 \subsection*{\typosubsubsection{#1}}%
190 }
191
192 \newcommand{\nazwautworu}[1]{%
193 \section*{\typosection{#1}}%
194 }
195
196 \newcommand{\podtytul}[1]{%
197 \subsection*{\typosubsubsection{#1}}%
198 }
199
200 \newcommand{\translator}[1]{%
201 \subsection*{\typosubsubsection{tłum. #1}}%
202 }
203
204
205 \newcommand{\powiesc}[1]{#1}
206 \newcommand{\opowiadanie}[1]{#1}
207 \newcommand{\lirykal}[1]{#1}
208 \newcommand{\lirykalp}[1]{#1}
209 \newcommand{\dramatwierszowanyl}[1]{#1}
210 \newcommand{\dramatwierszowanylp}[1]{#1}
211 \newcommand{\dramatwspolczesny}[1]{#1}
212
213 \newcommand{\nota}[1]{%
214 \par{#1}%
215 }
216
217 \newcommand{\dedykacja}[1]{%
218 \begin{em}%
219 \begin{flushright}%
220 #1%
221 \end{flushright}%
222 \end{em}%
223 }
224
225 \newcommand{\dlugicytat}[1]{%
226 \begin{quotation}%
227 #1%
228 \end{quotation}%
229 }
230
231 \newcommand{\poezjacyt}[1]{%
232 \begin{verse}%
233 #1%
234 \end{verse}%
235 }
236 \newcommand{\motto}[1]{%
237 \begin{em}%
238 #1%
239 \end{em}%
240 }
241 \newcommand{\listaosob}[2]{%
242 \par{#1}%
243 \begin{itemize}%
244 #2%
245 \end{itemize}%
246 }
247
248 \newcommand{\nagloweklisty}[1]{%
249 \typosubsubsection{#1}%
250 }
251
252 \newcommand{\listaosoba}[1]{%
253 \item{#1}%
254 }
255
256 \newcommand{\kwestia}[1]{%
257 \par{#1}%
258 }
259
260 \newcommand{\naglowekakt}[1]{%
261 \pagebreak
262 \subsection*{\typosubsection{#1}}%
263 }
264 \newcommand{\naglowekczesc}[1]{%
265 \pagebreak
266 \subsection*{\typosubsection{#1}}%
267 }
268 \newcommand{\srodtytul}[1]{%
269 \subsection*{\typosubsection{#1}}%
270 }
271
272 \newcommand{\naglowekscena}[1]{%
273 \subsubsection*{\typosubsubsection{#1}}%
274 }
275 \newcommand{\naglowekrozdzial}[1]{%
276 \subsubsection*{\typosubsubsection{#1}}%
277 }
278
279 \newcommand{\naglowekosoba}[1]{%
280 \par{\textsc{#1}}\nopagebreak%
281 }
282 \newcommand{\naglowekpodrozdzial}[1]{%
283 \par{#1}\nopagebreak%
284 }
285
286 \newcommand{\miejsceczas}[1]{%
287 \par{\emph{#1}}%
288 }
289 \newcommand{\didaskalia}[1]{%
290 \par{\emph{#1}}%
291 }
292
293 \newcommand{\akap}[1]{%
294 \par{#1}%
295 }
296 \newcommand{\akapdialog}[1]{%
297 \par{#1}%
298 }
299 \newcommand{\akapcd}[1]{%
300 \par{#1}%
301 }
302
303 \newcommand{\mottopodpis}[1]{%
304 \begin{em}%
305 \begin{flushright}%
306 #1%
307 \end{flushright}%
308 \end{em}%
309 }
310
311 \newcommand{\strofa}[1]{%
312 \par{\noindent{\ignorespaces#1\vspace{1em}}}%
313 }
314
315 \newcommand{\wers}[1]{#1}
316
317 \newcommand{\wersakap}[1]{%
318 \hspace*{1em}#1%
319 }
320 \newcommand{\werscd}[1]{%
321 \hspace*{8em}#1%
322 }
323 \newcommand{\werswciety}[2][1em]{%
324 \hspace*{#1}#2%
325 }
326
327
328 \newcommand{\pa}[1]{\NoCaseChange{\footnote{#1}}}
329 \newcommand{\pe}[1]{\NoCaseChange{\footnote{#1}}}
330 \newcommand{\pr}[1]{\NoCaseChange{\footnote{#1}}}
331 \newcommand{\pt}[1]{\NoCaseChange{\footnote{#1}}}
332
333 \newcommand{\mat}[1]{$#1$}
334
335 \newcommand{\didasktekst}[1]{%
336 \emph{#1}%
337 }
338 \newcommand{\slowoobce}[1]{%
339 \emph{#1}%
340 }
341 \newcommand{\tytuldziela}[1]{%
342 \emph{#1}%
343 }
344 \newcommand{\wyroznienie}[1]{%
345 \emph{#1}%
346 }
347
348 \newcommand{\osoba}[1]{%
349 #1%
350 }
351
352 \newcommand{\sekcjaswiatlo}{%
353 \vspace{30pt}%
354 }
355
356 \newcommand{\sekcjaasterysk}{%
357 \vspace{10pt}%
358 \begin{center}%
359 \par{*}%
360 \end{center}%
361 }
362
363 \newcommand{\separatorlinia}{%
364 \vspace{10pt}%
365 \hrule{}%
366 \vspace{10pt}%
367 }
368
369 \newcommand{\motyw}[2][0]{%
370 \mbox{}%
371 \marginpar{%
372 \vspace{-8pt}%
373 \vspace{-#1\baselineskip}%
374 \raggedright{\hspace{0pt}%
375 \footnotesize{\color{theme}{#2}}}%
376 \vspace{\baselineskip}%
377 }%
378 }
379