1 % -*- coding: utf-8 -*-
 
   2 \NeedsTeXFormat{LaTeX2e}
 
   3 \ProvidesClass{wl}[2011/11/28 wolnelektury.pl book style]
 
   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
 
  15 \RequirePackage{setspace}
 
  16 \RequirePackage{type1cm}
 
  17 \DeclareOption{13pt}{%
 
  19 % font size definitions, similar to ones in /usr/share/texmf-texlive/tex/latex/base/
 
  20 \renewcommand\normalsize{%
 
  21    \@setfontsize\normalsize{13pt}{14.5pt}%
 
  22    \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
 
  23    \abovedisplayshortskip \z@ \@plus3\p@
 
  24    \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
 
  25    \belowdisplayskip \abovedisplayskip
 
  26    \let\@listi\@listI}\normalsize%
 
  27 \renewcommand\footnotesize{%
 
  28    \@setfontsize\footnotesize\@xpt\@xiipt
 
  29    \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
 
  30    \abovedisplayshortskip \z@ \@plus3\p@
 
  31    \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
 
  32    \def\@listi{\leftmargin\leftmargini
 
  33                \topsep 6\p@ \@plus2\p@ \@minus2\p@
 
  34                \parsep 3\p@ \@plus2\p@ \@minus\p@
 
  36    \belowdisplayskip \abovedisplayskip
 
  41 %% \DeclareOption{14pt}{\renewcommand{\normalsize}{\AtEndOfClass{\fontsize{14}{17}\selectfont}}}
 
  43 \DeclareOption{defaultleading}{}
 
  44 \DeclareOption{doubleleading}{\AtBeginDocument{\doublespacing}}%\setlength{\leading}{1em plus 0.5ex minus 0.2ex}}
 
  45 \DeclareOption{onehalfleading}{\AtBeginDocument{\onehalfspacing}}%\setlength{\leading}{1em plus 0.5ex minus 0.2ex}}
 
  47 %% 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.
 
  48 \DeclareOption{a5paper}{%
 
  49       \setlength{\paperheight}{210mm}%
 
  50       \setlength{\paperwidth}{148mm}}
 
  53 \newif\ifshowfootnotes \showfootnotestrue
 
  54 \DeclareOption{nofootnotes}{\showfootnotesfalse}
 
  56 \newif\ifshowthemes \showthemestrue
 
  57 \DeclareOption{nothemes}{\showthemesfalse}
 
  59 \newif\ifenablewlfont \enablewlfonttrue
 
  60 \DeclareOption{nowlfont}{\enablewlfontfalse}
 
  62 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
 
  64 \LoadClass[a4paper]{book}
 
  69 %\usepackage[MeX]{polski}
 
  71 \usepackage[xetex]{graphicx}
 
  76 \usepackage[overload]{textcase}
 
  78 \usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=black,xetex]{hyperref}
 
  83 UprightFont = JunicodeWL-Regular,
 
  84 ItalicFont = JunicodeWL-Italic,
 
  85 BoldFont = JunicodeWL-Regular,
 
  86 BoldItalicFont = JunicodeWL-Italic,
 
  87 SmallCapsFont = JunicodeWL-Regular,
 
  88 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
 
  95 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
 
 102 \defaultfontfeatures{
 
 104   {Size={-10.5}, FakeStretch=1.02, LetterSpace=2.0 },
 
 105   {Size={10.5-12}, FakeStretch=2.00, LetterSpace=0.0 },
 
 106   {Size={12-}, FakeStretch=0.98, LetterSpace=-2.0 }
 
 110 \renewcommand{\textsc}[1]{%
 
 113   {Size={-10.5}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
 
 114   {Size={10.5-12}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
 
 115   {Size={12-}, FakeStretch=1.0, LetterSpace=8.0 }
 
 117 Letters={SmallCaps,UppercaseSmallCaps}
 
 123 %{\Itshape JunicodeWL-Italic.ttf }
 
 124 %{\bfseries Junicode-Bold.ttf }
 
 125 %{\bfseries\itshape Junicode-BoldItalic.ttf }
 
 128 \usepackage{fancyhdr}
 
 132 % bottom figure below footnotes
 
 137 \definecolor{theme}{gray}{.3}
 
 139 \setlength{\marginparsep}{2em}
 
 140 \setlength{\marginparwidth}{8.5em}
 
 141 \setlength{\oddsidemargin}{36mm}
 
 142 \setlength{\evensidemargin}{0pt}
 
 143 \setlength{\voffset}{0pt}
 
 144 \setlength{\topmargin}{0pt}
 
 145 \setlength{\headheight}{0pt}
 
 146 \setlength{\headsep}{0pt}
 
 147 \setlength{\textheight}{24cm}
 
 151 \renewcommand{\headrulewidth}{0pt}
 
 152 \renewcommand{\footrulewidth}{0pt}
 
 153 %\lfoot{{\footnotesize \textsc{\@author} \emph{\@title}}}
 
 155 %\rfoot{{\footnotesize \thepage}}
 
 156 \fancyfoot[LO,RE]{{\footnotesize \textsc{\@author} \emph{\@title}}}
 
 157 \fancyfoot[LE,RO]{{\footnotesize \thepage}}
 
 163 % see http://osdir.com/ml/tex.xetex/2005-10/msg00003.html
 
 164 \newsavebox{\ximagebox}\newlength{\ximageheight}
 
 165 \newsavebox{\xglyphbox}\newlength{\xglyphheight}
 
 166 \newcommand{\xbox}[1]
 
 167 {\savebox{\ximagebox}{#1}\settoheight{\ximageheight}{\usebox {\ximagebox}}%
 
 168 \savebox{\xglyphbox}{\char32}\settoheight{\xglyphheight}{\usebox {\xglyphbox}}%
 
 169 \raisebox{\ximageheight}[0pt][0pt]{%\raisebox{-\xglyphheight}[0pt] [0pt]{%
 
 170 \makebox[0pt][l]{\usebox{\xglyphbox}}}%}%
 
 172 \raisebox{0pt}[0pt][0pt]{\makebox[0pt][r]{\usebox{\xglyphbox}}}}
 
 174 \newcommand{\makecover}[2]{
 
 179         \thispagestyle{empty}
 
 180         \newlength{\PictHOffset}
 
 181         \newlength{\PictVOffset}
 
 182         \setlength{\PictHOffset}{1in}
 
 183         \addtolength{\PictHOffset}{\hoffset}
 
 184         \addtolength{\PictHOffset}{\oddsidemargin}
 
 186         \setlength{\PictVOffset}{1in}
 
 187         \addtolength{\PictVOffset}{\voffset}
 
 188         \addtolength{\PictVOffset}{\topmargin}
 
 189         \addtolength{\PictVOffset}{\headheight}
 
 190         \addtolength{\PictVOffset}{\headsep}
 
 191         \addtolength{\PictVOffset}{\topskip}
 
 192         \addtolength{\PictVOffset}{-#2}
 
 194         \noindent\hspace*{-\PictHOffset}%
 
 195         \raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{%
 
 196             \includegraphics[height=#2,width=#1]{cover.jpg}}}
 
 200         \hspace{-36mm}\parbox{16cm}{
 
 201         {\addfontfeature{LetterSpace=-4.0}\emph{\scalefont{4}%
 
 202             \noindent Future of Copyright Anthology
 
 206         {\addfontfeature{LetterSpace=-4.0}{\scalefont{1.5}%
 
 207             A collection of texts from a crowd-funded contest.
 
 214 \indent\emph{You made this book possible.}
 
 218         %\setlength{\pdfpagewidth}{210mm}
 
 219         %\setlength{\pdfpageheight}{297mm}
 
 223 \renewcommand{\maketitle}{
 
 225     \thispagestyle{empty}
 
 229     \noindent \begin{minipage}[t]{.35\textwidth}\vspace{0pt}
 
 230         \href{http://www.wolnelektury.pl}{\xbox{\includegraphics[width=\textwidth]{wl-logo.png}}}
 
 232     \begin{minipage}[t]{.65\textwidth}\vspace{0pt}
 
 234     \ifflaglessadvertising
 
 236         \href{\bookurl}{Ta lektura}, podobnie jak tysiące innych, jest dostępna on-line na stronie
 
 237         \href{http://www.wolnelektury.pl/}{wolnelektury.pl}.
 
 241     Utwór opracowany został w ramach projektu \href{http://www.wolnelektury.pl/}{Wolne Lektury}
 
 242     przez \href{http://nowoczesnapolska.org.pl}{fundację Nowoczesna Polska}.
 
 245     \noindent \rule{\linewidth}{0.4pt}
 
 252 \usepackage{printlen}
 
 254 \newcommand{\editorialsection}{
 
 257 %\set\textwidth=450pt
 
 258 %\printlength\textwidth
 
 261 {\scalefont{1.5}Dear readers!}
 
 266 It is our great pleasure to present you the “Future of Copyright 
 
 267 Anthology”, a collection of 10 best short stories sent in for the “Future 
 
 268 of Copyright” contest organized by Modern Poland Foundation. These works 
 
 269 have been selected by our jury – Prof. Michael Geist, Piotr Czerski and 
 
 272 The main prize in this contest was founded by you, the readers, on the 
 
 273 Indiegogo crowdfunding platform. We are proud to announce that this 
 
 274 prize goes to Aymeric Mansoux, author of “Morphology of a copyright 
 
 275 tale”, in appreciation of the originality, power and the strong message 
 
 276 of this work. Moreover, the jury decided to grant an honorable mention 
 
 277 to Togi, author of the work “Give”.
 
 279 We would like to thank you for your crowdfunding support and a high
 
 280 standard of the submitted works. We were pleasantly surprised by the
 
 281 interest shown in the competition, and we have decided to hold
 
 282 its second edition next 
 
 283 year. We hope that with your help it will be even more successful and 
 
 284 the collected works will provide a strong voice in the debate on the future 
 
 285 of copyright law and system.
 
 288 Modern Poland Foundation Team
 
 291 \includegraphics[scale=.2]{logo.eps}
 
 294 \href{http://nowoczesnapolska.org.pl/}{http://nowoczesnapolska.org.pl/}
 
 297 %\box{\tableofcontents}
 
 303     \noindent \rule{\linewidth}{0.4pt}
 
 308     %Źródło: \href{\bookurl}{\bookurl}
 
 316     Published by \href{http://nowoczesnapolska.org.pl}{Modern Poland Foundation}, 2012.
 
 329 \newcommand{\typosubsubsection}[1]{%
 
 333 \newcommand{\typosubsection}[1]{%
 
 336   {Size={-10}, Scale=1.2, FakeStretch=1.00, LetterSpace=8.0 },
 
 337   {Size={10.5-12}, Scale=1.2, FakeStretch=1.00, LetterSpace=8.0 },
 
 338   {Size={12-}, FakeStretch=1.0, LetterSpace=8.0 }
 
 345 \newcommand{\typosection}[1]{%
 
 346 {\addfontfeature{FakeStretch=0.96, LetterSpace=-4.0}\emph{\scalefont{2}#1}}
 
 347 %{\addfontfeature{Scale=2.0, FakeStretch=0.98, LetterSpace=-2.0}\emph{#1}}
 
 350 \newcommand{\tytul}[1]{%
 
 355 \newcommand{\autorpodutworu}[1]{%
 
 356 \section*{\typosection{#1}}%
 
 359 \newcommand{\nazwapodutworu}[1]{%
 
 360 \section*{\typosection{#1}}%
 
 363 \newcommand{\autorutworu}[1]{%
 
 364 \addcontentsline{toc}{part}{???}
 
 365 \subsection*{\typosubsection{#1}}%
 
 368 \newcommand{\dzielonadrzedne}[1]{%
 
 369 \subsection*{\typosubsubsection{#1}}%
 
 372 \newcommand{\nazwautworu}[1]{%
 
 373 \section*{\typosection{#1}}%
 
 376 \newcommand{\podtytul}[1]{%
 
 377 \subsection*{\typosubsubsection{#1}}%
 
 380 \newcommand{\podtytulpodutworu}[1]{%
 
 381 \subsection*{\typosubsubsection{#1}}%
 
 384 \newcommand{\translator}[1]{%
 
 385 \subsection*{\typosubsubsection{tłum. #1}}%
 
 388 \newcommand{\powiesc}[1]{#1}
 
 389 \newcommand{\opowiadanie}[1]{#1}
 
 390 \newcommand{\lirykal}[1]{#1}
 
 391 \newcommand{\lirykalp}[1]{#1}
 
 392 \newcommand{\dramatwierszowanyl}[1]{#1}
 
 393 \newcommand{\dramatwierszowanylp}[1]{#1}
 
 394 \newcommand{\dramatwspolczesny}[1]{#1}
 
 396 \newcommand{\nota}[1]{%
 
 402 \newcommand{\dedykacja}[1]{%
 
 410 \newcommand{\dlugicytat}[1]{%
 
 416 \newcommand{\poezjacyt}[1]{%
 
 421 \newcommand{\motto}[1]{%
 
 426 \newcommand{\listaosob}[2]{%
 
 433 \newcommand{\nagloweklisty}[1]{%
 
 434 \typosubsubsection{#1}%
 
 437 \newcommand{\listaosoba}[1]{%
 
 441 \newcommand{\kwestia}[1]{%
 
 445 \newcommand{\naglowekakt}[1]{%
 
 447 \subsection*{\typosubsection{#1}}%
 
 449 \newcommand{\naglowekczesc}[1]{%
 
 451 \subsection*{\typosubsection{#1}}%
 
 453 \newcommand{\srodtytul}[1]{%
 
 454 \subsection*{\typosubsection{#1}}%
 
 457 \newcommand{\naglowekscena}[1]{%
 
 458 \subsubsection*{\typosubsubsection{#1}}%
 
 460 \newcommand{\naglowekrozdzial}[1]{%
 
 461 \subsubsection*{\typosubsubsection{#1}}%
 
 464 \newcommand{\naglowekosoba}[1]{%
 
 465 \par{\textsc{#1}}\nopagebreak%
 
 467 \newcommand{\naglowekpodrozdzial}[1]{%
 
 468 \par{#1}\nopagebreak%
 
 471 \newcommand{\miejsceczas}[1]{%
 
 474 \newcommand{\didaskalia}[1]{%
 
 478 \newcommand{\akap}[1]{%
 
 481 \newcommand{\akapdialog}[1]{%
 
 484 \newcommand{\akapcd}[1]{%
 
 488 \newcommand{\mottopodpis}[1]{%
 
 496 \newcommand{\strofa}[1]{%
 
 497 \par{\noindent{\ignorespaces#1\vspace{1em}}}%
 
 500 \newcommand{\wers}[1]{#1}
 
 502 \newcommand{\wersakap}[1]{%
 
 505 \newcommand{\werscd}[1]{%
 
 508 \newcommand{\werswciety}[2][1em]{%
 
 513   \newcommand{\pa}[1]{\NoCaseChange{\footnote{#1 [przypis autorski]}}}
 
 514   \newcommand{\pe}[1]{\NoCaseChange{\footnote{#1}}}
 
 515   \newcommand{\pr}[1]{\NoCaseChange{\footnote{#1}}}
 
 516   \newcommand{\pt}[1]{\NoCaseChange{\footnote{#1}}}
 
 518   \newcommand{\pa}[1]{}
 
 519   \newcommand{\pe}[1]{}
 
 520   \newcommand{\pr}[1]{}
 
 521   \newcommand{\pt}[1]{}
 
 524 \newcommand{\mat}[1]{$#1$}
 
 526 \newcommand{\didasktekst}[1]{%
 
 529 \newcommand{\slowoobce}[1]{%
 
 532 \newcommand{\tytuldziela}[1]{%
 
 535 \newcommand{\wyroznienie}[1]{%
 
 539 \newcommand{\osoba}[1]{%
 
 543 \newcommand{\sekcjaswiatlo}{%
 
 547 \newcommand{\sekcjaasterysk}{%
 
 555 \newcommand{\separatorlinia}{%
 
 561 \newcommand{\motyw}[2][0]{%
 
 566 \vspace{-#1\baselineskip}%
 
 567 \raggedright{\hspace{0pt}%
 
 568 \footnotesize{\color{theme}{#2}}}%
 
 569 \vspace{\baselineskip}%
 
 574 \newcommand{\ilustr}[2]{
 
 578 \par{\includegraphics[width=\textwidth]{#1}\\#2}%