6bdc2ffed7a2f164e168f9c0a63eb45d4d775c08
[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 \setmainfont [
11 ExternalLocation,
12 UprightFont = JunicodeWL-Regular.ttf,
13 ItalicFont = JunicodeWL-Italic.ttf,
14 BoldFont = JunicodeWL-Regular.ttf,
15 BoldItalicFont = JunicodeWL-Italic.ttf,
16 SmallCapsFont = JunicodeWL-Regular.ttf,
17 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
18 Numbers=OldStyle,
19 Scale=1.04,
20 LetterSpace=-1.0
21 ] {JunicodeWL}
22
23 \defaultfontfeatures{
24 SizeFeatures={
25   {Size={-10}, FakeStretch=1.02, LetterSpace=2.0 },
26   {Size={10.5-12}, FakeStretch=2.00, LetterSpace=0.0 },
27   {Size={12-}, FakeStretch=0.98, LetterSpace=-2.0 }
28 }
29 }
30
31 \renewcommand{\textsc}[1]{
32 {\addfontfeature{
33 SizeFeatures={
34   {Size={-10}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
35   {Size={10.5-12}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
36   {Size={12-}, FakeStretch=1.0, LetterSpace=8.0 }
37 },
38 Letters={SmallCaps,UppercaseSmallCaps}
39 }
40 #1}
41 }
42
43 %{\itshape JunicodeWL-Italic.ttf }
44 %{\bfseries Junicode-Bold.ttf }
45 %{\bfseries\itshape Junicode-BoldItalic.ttf }
46
47 \pagestyle{plain}
48 \usepackage{fancyhdr}
49
50 \makeatletter
51
52 % bottom figure below footnotes
53 \usepackage{fnpos}
54 \makeFNabove
55
56 \usepackage{color}
57 \definecolor{theme}{gray}{.3}
58
59 \setlength{\marginparsep}{2em}
60 \setlength{\marginparwidth}{8.5em}
61 \setlength{\oddsidemargin}{0pt}
62 \setlength{\voffset}{0pt}
63 \setlength{\topmargin}{0pt}
64 \setlength{\headheight}{0pt}
65 \setlength{\headsep}{0pt}
66 \setlength{\textheight}{24cm}
67
68 \pagestyle{fancy}
69 \fancyhf{}
70 \renewcommand{\headrulewidth}{0pt}
71 \renewcommand{\footrulewidth}{0pt}
72 \lfoot{{\footnotesize \textsc{\@author} \emph{\@title}}}
73 \cfoot{}
74 \rfoot{{\footnotesize \thepage}}
75
76 \clubpenalty=100000
77 \widowpenalty=100000
78
79 \renewcommand{\maketitle}{
80     {
81     \thispagestyle{empty}
82     \footnotesize
83     \color{theme}
84
85     \noindent \begin{minipage}[t]{.35\textwidth}\vspace{0pt}
86         \includegraphics[width=\textwidth]{wl-logo.png}
87     \end{minipage}
88     \begin{minipage}[t]{.65\textwidth}\vspace{0pt}
89         \sourceinfo
90
91         \vspace{.5em}
92
93         Wejdź na stronę http://wolnelektury.pl/ i~zobacz, jak wiele możliwości daje interaktywna wersja szkolnej biblioteki
94         internetowej Wolne Lektury.
95         \vspace{.5em}
96
97         Ten utwór nie jest chroniony prawem autorskim i~znajduje się w~domenie publicznej, co oznacza, że możesz go swobodnie wykorzystywać, publikować i~rozpowszechniać.
98
99         \vspace{.6em}
100
101     \end{minipage}
102     \noindent \rule{\linewidth}{0.4pt}
103
104     \vspace{.6em}
105     \color{black}
106
107 %    \begin{figure}[b!]
108 %        \footnotesize
109 %        \color{theme}
110 %        \noindent \rule{\linewidth}{0.4pt}
111
112 %        Szkolna biblioteka internetowa Wolne Lektury tworzona jest dzięki pracy Wolontariuszy, ale to osoby
113 %        zatrudnione w~FNP będą musiały wymyślić, co powinno zostać napisane w~tym miejscu. Można zupełnie usunąć
114 %        tę sekcję, ale autor konwertera chciał się popisać, że umie coś takiego zrobić.
115 %        \color{black}
116 %    \end{figure}
117     }
118 }
119
120 \newcommand{\typosubsubsection}[1]{
121 {\textsc{#1}}
122 }
123
124 \newcommand{\typosubsection}[1]{
125 {\addfontfeature{
126 SizeFeatures={
127   {Size={-10}, Scale=1.2, FakeStretch=1.00, LetterSpace=8.0 },
128   {Size={10.5-12}, Scale=1.2, FakeStretch=1.00, LetterSpace=8.0 },
129   {Size={12-}, FakeStretch=1.0, LetterSpace=8.0 }
130 },
131 Letters={Uppercase}
132 }
133 \MakeUppercase{#1}}
134 }
135
136 \newcommand{\typosection}[1]{
137 {\addfontfeature{Scale=2.0, FakeStretch=0.98, LetterSpace=-2.0}\emph{#1}}
138 }
139
140 \newcommand{\nazwapodutworu}[1]{%
141 \section*{\typosection{#1}}%
142 }
143
144 \newcommand{\autorutworu}[1]{%
145 \subsection*{\typosubsection{#1}}%
146 }
147
148 \newcommand{\nazwautworu}[1]{%
149 \section*{\typosection{#1}}%
150 }
151
152 \newcommand{\powiesc}[1]{#1}
153 \newcommand{\opowiadanie}[1]{#1}
154 \newcommand{\lirykal}[1]{#1}
155 \newcommand{\lirykalp}[1]{#1}
156 \newcommand{\dramatwierszowanyl}[1]{#1}
157 \newcommand{\dramatwierszowanylp}[1]{#1}
158 \newcommand{\dramatwspolczesny}[1]{#1}
159
160 \newcommand{\nota}[1]{%
161 \par{#1}%
162 }
163
164 \newcommand{\dedykacja}[1]{%
165 \begin{em}%
166 \begin{flushright}%
167 #1%
168 \end{flushright}%
169 \end{em}%
170 }
171
172 \newcommand{\dlugicytat}[1]{%
173 \begin{quotation}%
174 #1%
175 \end{quotation}%
176 }
177
178 \newcommand{\poezjacyt}[1]{%
179 \begin{verse}%
180 #1%
181 \end{verse}%
182 }
183 \newcommand{\motto}[1]{%
184 \begin{em}%
185 #1%
186 \end{em}%
187 }
188 \newcommand{\listaosob}[2]{%
189 \par{#1}%
190 \begin{itemize}%
191 #2%
192 \end{itemize}%
193 }
194
195 \newcommand{\nagloweklisty}[1]{%
196 \typosubsubsection{#1}%
197 }
198
199 \newcommand{\listaosoba}[1]{%
200 \item{#1}%
201 }
202
203 \newcommand{\kwestia}[1]{%
204 \par{#1}%
205 }
206
207 \newcommand{\naglowekakt}[1]{%
208 \pagebreak
209 \subsection*{\typosubsection{#1}}%
210 }
211 \newcommand{\naglowekczesc}[1]{%
212 \pagebreak
213 \subsection*{\typosubsection{#1}}%
214 }
215 \newcommand{\srodtytul}[1]{%
216 \subsection*{\typosubsection{#1}}%
217 }
218
219 \newcommand{\naglowekscena}[1]{%
220 \subsubsection*{\typosubsubsection{#1}}%
221 }
222 \newcommand{\naglowekrozdzial}[1]{%
223 \subsubsection*{\typosubsubsection{#1}}%
224 }
225
226 \newcommand{\naglowekosoba}[1]{%
227 \par{\textsc{#1}}\nopagebreak%
228 }
229 \newcommand{\naglowekpodrozdzial}[1]{%
230 \par{#1}\nopagebreak%
231 }
232
233 \newcommand{\miejsceczas}[1]{%
234 \par{\emph{#1}}%
235 }
236 \newcommand{\didaskalia}[1]{%
237 \par{\emph{#1}}%
238 }
239
240 \newcommand{\akap}[1]{%
241 \par{#1}%
242 }
243 \newcommand{\akapdialog}[1]{%
244 \par{#1}%
245 }
246 \newcommand{\akapcd}[1]{%
247 \par{#1}%
248 }
249
250 \newcommand{\mottopodpis}[1]{%
251 \begin{em}%
252 \begin{flushright}%
253 #1%
254 \end{flushright}%
255 \end{em}%
256 }
257
258 \newcommand{\strofa}[1]{%
259 \par{\noindent{\ignorespaces#1\vspace{1em}}}%
260 }
261
262 \newcommand{\wers}[1]{#1}
263
264 \newcommand{\wersakap}[1]{%
265 \hspace*{1em}#1%
266 }
267 \newcommand{\werscd}[1]{%
268 \hspace*{8em}#1%
269 }
270 \newcommand{\werswciety}[2][1em]{%
271 \hspace*{#1}#2%
272 }
273
274
275 \newcommand{\pa}[1]{\footnote{#1}}
276 \newcommand{\pe}[1]{\footnote{#1}}
277 \newcommand{\pr}[1]{\footnote{#1}}
278 \newcommand{\pt}[1]{\footnote{#1}}
279
280 \newcommand{\mat}[1]{$#1$}
281
282 \newcommand{\didasktekst}[1]{%
283 \emph{#1}%
284 }
285 \newcommand{\slowoobce}[1]{%
286 \emph{#1}%
287 }
288 \newcommand{\tytuldziela}[1]{%
289 \emph{#1}%
290 }
291 \newcommand{\wyroznienie}[1]{%
292 \emph{#1}%
293 }
294
295 \newcommand{\osoba}[1]{%
296 #1%
297 }
298
299 \newcommand{\sekcjaswiatlo}{%
300 \hspace{30pt}%
301 }
302
303 \newcommand{\sekcjaasterysk}{%
304 \par{*}%
305 }
306
307 \newcommand{\separatorlinia}{%
308 \hrule{}%
309 }
310
311 \newcommand{\motyw}[2][0]{%
312 \mbox{}%
313 \marginpar{%
314 \vspace{-8pt}%
315 \vspace{-#1\baselineskip}%
316 \raggedright{\hspace{0pt}%
317 \footnotesize{\color{theme}{#2}}}%
318 \vspace{\baselineskip}%
319 }%
320 }
321