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