X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/2ea20e32dd822ece8a2df9693da42cfdaffcbc72..034fc8488c66a6364ef617e70a5b661591226102:/librarian/pdf/wl.cls diff --git a/librarian/pdf/wl.cls b/librarian/pdf/wl.cls index 82098ec..153f1a6 100644 --- a/librarian/pdf/wl.cls +++ b/librarian/pdf/wl.cls @@ -12,6 +12,7 @@ % a4paper,... - paper size as required by LaTeX % nowlfont - don't use customized WL font +\RequirePackage{fixltx2e} \RequirePackage{setspace} \RequirePackage{type1cm} \DeclareOption{13pt}{% @@ -59,6 +60,9 @@ \newif\ifenablewlfont \enablewlfonttrue \DeclareOption{nowlfont}{\enablewlfontfalse} +\newif\ifshowtoc \showtoctrue +\DeclareOption{notoc}{\showtocfalse} + \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} \ProcessOptions\relax \LoadClass[a4paper,oneside]{book} @@ -276,6 +280,11 @@ Letters={SmallCaps,UppercaseSmallCaps} \coverby \fi + \ifdefined\isbn + \vspace{.6em} + \isbn + \fi + \vspace{.6em} \emph{Wesprzyj Wolne Lektury!} @@ -326,24 +335,42 @@ Letters={Uppercase} } +\DeclareRobustCommand\authortoctext[1]{% +{\addvspace{10pt}\nopagebreak\leftskip0em\relax +\rightskip \@tocrmarg\relax +\noindent\itshape#1\par}} + +\newcommand\authortoc[1]{% + \gdef\chapterauthor{#1}% + \addtocontents{toc}{\authortoctext{#1}}} + + \newcommand{\tytul}[1]{% #1% \vspace{1em}% } -\newcommand{\nazwapodutworu}[1]{% +\newcommand{\nazwapodutworu}[2]{% +\vspace{10ex}% \section*{\typosection{#1}}% +\addcontentsline{toc}{section}{#2}% } \newcommand{\autorutworu}[1]{% \subsection*{\typosubsection{#1}}% } +\newcommand{\autorpodutworu}[1]{% +\subsection*{\typosubsection{#1}}% +\authortoc{#1}% +} + \newcommand{\dzielonadrzedne}[1]{% \subsection*{\typosubsubsection{#1}}% } \newcommand{\nazwautworu}[1]{% +\vspace{10ex}% \section*{\typosection{#1}}% } @@ -365,7 +392,8 @@ Letters={Uppercase} \newcommand{\dramatwspolczesny}[1]{#1} \newcommand{\nota}[1]{% -\par{#1}% +\par{\raggedleft \emph{#1}}% +\vspace{10ex}% } \newcommand{\dedykacja}[1]{% @@ -376,6 +404,75 @@ Letters={Uppercase} \end{em}% } +\newlength{\fboxhsep} +\newlength{\fboxvsep} + +\newlength{\fboxtoprule} +\newlength{\fboxbottomrule} +\newlength{\fboxleftrule} +\newlength{\fboxrightrule} + +\setlength{\fboxhsep}{5\fboxsep} +\setlength{\fboxvsep}{20\fboxsep} + +\setlength{\fboxtoprule}{\fboxrule} +\setlength{\fboxleftrule}{\fboxrule} +\setlength{\fboxrightrule}{\fboxrule} +\setlength{\fboxbottomrule}{\fboxrule} + + + +\def\@frameb@xother#1{% + \@tempdima\fboxtoprule + \advance\@tempdima\fboxvsep + \advance\@tempdima\dp\@tempboxa + \hbox{% + \lower\@tempdima\hbox{% + \vbox{% + \hrule\@height\fboxtoprule + \hbox{% + \vrule\@width\fboxleftrule + #1% + \vbox{% + \vskip\fboxvsep + \box\@tempboxa + \vskip\fboxvsep}% + #1% + \vrule\@width\fboxrightrule}% + \hrule\@height\fboxbottomrule}% + }% + }% +} + + +\long\def\fboxother#1{% + \leavevmode + \setbox\@tempboxa\hbox{% + \color@begingroup + \kern\fboxhsep{#1}\kern\fboxhsep + \color@endgroup}% + \@frameb@xother\relax} + +\newcommand{\myfbox}[3]{% + \begingroup + \setlength{\fboxhsep}{#1} + \setlength{\fboxvsep}{#2} + \fboxother{#3} + + \endgroup +} + +\newcommand{\ramka}[1]{% +\par\vspace{1em}% +\edef\myindent{\the\parindent}% +\noindent\myfbox{1em}{1em}{% +\parbox{\dimexpr \textwidth - 2\fboxhsep - 2\fboxrule\relax}{% +\setlength{\parindent}{\myindent}% +#1% +}}% +\vspace{1em}% +} + \newcommand{\dlugicytat}[1]{% \begin{quotation}% #1% @@ -404,34 +501,43 @@ Letters={Uppercase} } \newcommand{\listaosoba}[1]{% -\item{#1}% +\item[]{#1}% } \newcommand{\kwestia}[1]{% \par{#1}% } -\newcommand{\naglowekakt}[1]{% +\newcommand{\naglowekakt}[2]{% \pagebreak -\subsection*{\typosubsection{#1}}% +\subsection*{\typosubsection{\huge #1}}% +\addcontentsline{toc}{subsection}{#2}% +\vspace{10ex}% } -\newcommand{\naglowekczesc}[1]{% +\newcommand{\naglowekczesc}[2]{% \pagebreak -\subsection*{\typosubsection{#1}}% +\subsection*{\typosubsection{\huge #1}}% +\addcontentsline{toc}{subsection}{#2}% +\vspace{10ex}% } \newcommand{\srodtytul}[1]{% \subsection*{\typosubsection{#1}}% } -\newcommand{\naglowekscena}[1]{% -\subsubsection*{\typosubsubsection{#1}}% +\newcommand{\naglowekscena}[2]{% +\subsubsection*{\typosubsubsection{\LARGE #1}}% +\addcontentsline{toc}{subsubsection}{#2}% +\vspace{5ex}% } -\newcommand{\naglowekrozdzial}[1]{% -\subsubsection*{\typosubsubsection{#1}}% +\newcommand{\naglowekrozdzial}[2]{% +\subsubsection*{\typosubsubsection{\LARGE #1}}% +\addcontentsline{toc}{subsubsection}{#2}% +\vspace{5ex}% } \newcommand{\naglowekosoba}[1]{% -\par{\textsc{#1}}\nopagebreak% +\medskip% +\par{\textsc{\MakeLowercase{#1}}}\nopagebreak% } \newcommand{\naglowekpodrozdzial}[1]{% \vspace{5ex}\par{#1}\nopagebreak% @@ -495,6 +601,9 @@ Letters={Uppercase} \newcommand{\werswciety}[2][1em]{% \Nw\hspace*{#1}#2% } +\newcommand{\wersdoprawej}[1]{% +\Nw\hspace*{\fill}#1% +} \ifshowfootnotes \newcommand{\pa}[1]{\NoCaseChange{\footnote{#1 [przypis autorski]}}} @@ -522,9 +631,17 @@ Letters={Uppercase} \newcommand{\wyroznienie}[1]{% \emph{#1}% } +\newcommand{\indeksdolny}[1]{% +\textsubscript{#1}% +} +\newcommand{\wiekszeodstepy}[1]{% +\spaceskip 3\fontdimen2\font plus 3\fontdimen3\font minus 3\fontdimen4\font \relax% +#1% +\spaceskip \fontdimen2\font plus \fontdimen3\font minus \fontdimen4\font \relax% +} \newcommand{\osoba}[1]{% -#1% +{\scshape \MakeLowercase{#1}}% } \newcommand{\sekcjaswiatlo}{%