X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/d7ba2c607dacf7a6136b83a1588b5adf2278ad46..3b978e07d8be0a912d167170a8bb13a78135775e:/librarian/pdf/wl.cls diff --git a/librarian/pdf/wl.cls b/librarian/pdf/wl.cls index 37d1d24..128a183 100644 --- a/librarian/pdf/wl.cls +++ b/librarian/pdf/wl.cls @@ -6,6 +6,7 @@ % % nofootnotes - disable generation of footnotes % nothemes - disable generation of themes +% defaultleading - default leading % onehalfleading - leading of 1.5 (interlinia) % doubleleading - double leading (interlinia) % a4paper,... - paper size as required by LaTeX @@ -13,6 +14,7 @@ \RequirePackage{setspace} \RequirePackage{type1cm} +\RequirePackage{wasysym} \DeclareOption{13pt}{% \AtEndOfClass{% % font size definitions, similar to ones in /usr/share/texmf-texlive/tex/latex/base/ @@ -39,6 +41,7 @@ %% \DeclareOption{14pt}{\renewcommand{\normalsize}{\AtEndOfClass{\fontsize{14}{17}\selectfont}}} +\DeclareOption{defaultleading}{} \DeclareOption{doubleleading}{\AtBeginDocument{\doublespacing}}%\setlength{\leading}{1em plus 0.5ex minus 0.2ex}} \DeclareOption{onehalfleading}{\AtBeginDocument{\onehalfspacing}}%\setlength{\leading}{1em plus 0.5ex minus 0.2ex}} @@ -64,8 +67,6 @@ \usepackage{trace} -\usepackage[MeX]{polski} - \usepackage[xetex]{graphicx} \usepackage{fontspec} \usepackage{xunicode} @@ -73,21 +74,23 @@ \usepackage[overload]{textcase} \usepackage{scalefnt} -\usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=black,xetex]{hyperref} +% TODO: link color is a style thing +\usepackage[hyphens]{url} +\usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=blue,xetex]{hyperref} \ifenablewlfont \setmainfont [ %ExternalLocation, -UprightFont = JunicodeWL-Regular, -ItalicFont = JunicodeWL-Italic, -BoldFont = JunicodeWL-Regular, -BoldItalicFont = JunicodeWL-Italic, -SmallCapsFont = JunicodeWL-Regular, +UprightFont = Dosis-Regular, +ItalicFont = Dosis-SemiBold, +BoldFont = Dosis-Bold, +BoldItalicFont = Dosis-Bold, +SmallCapsFont = Dosis-Regular, SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}}, Numbers=OldStyle, Scale=1.04, LetterSpace=-1.0 -] {JunicodeWL} +] {Dosis} \newfontfamily\alien[ SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}}, @@ -147,7 +150,7 @@ Letters={SmallCaps,UppercaseSmallCaps} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} -\lfoot{{\footnotesize \textsc{\@author} \emph{\@title}}} +\lfoot{{\footnotesize \@author{} \emph{\@title}}} \cfoot{} \rfoot{{\footnotesize \thepage}} @@ -166,92 +169,10 @@ Letters={SmallCaps,UppercaseSmallCaps} \usebox{\ximagebox}% \raisebox{0pt}[0pt][0pt]{\makebox[0pt][r]{\usebox{\xglyphbox}}}} -\newcommand{\makecover}[2]{ - \pdfpagewidth=#1 - \pdfpageheight=#2 - - \thispagestyle{empty} - \newlength{\PictHOffset} - \newlength{\PictVOffset} - \setlength{\PictHOffset}{1in} - \addtolength{\PictHOffset}{\hoffset} - \addtolength{\PictHOffset}{\oddsidemargin} - - \setlength{\PictVOffset}{1in} - \addtolength{\PictVOffset}{\voffset} - \addtolength{\PictVOffset}{\topmargin} - \addtolength{\PictVOffset}{\headheight} - \addtolength{\PictVOffset}{\headsep} - \addtolength{\PictVOffset}{\topskip} - \addtolength{\PictVOffset}{-\pdfpageheight} - - \noindent\hspace*{-\PictHOffset}% - \raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{% - \includegraphics[height=\pdfpageheight,width=\pdfpagewidth]{cover.png}}} - \clearpage - - \setlength{\pdfpagewidth}{210mm} - \setlength{\pdfpageheight}{297mm} -} - - -\renewcommand{\maketitle}{ - { - \thispagestyle{empty} - \footnotesize - \color{theme} - - \noindent \begin{minipage}[t]{.35\textwidth}\vspace{0pt} - \href{http://www.wolnelektury.pl}{\xbox{\includegraphics[width=\textwidth]{wl-logo.png}}} - \end{minipage} - \begin{minipage}[t]{.65\textwidth}\vspace{0pt} - - \ifflaglessadvertising - \else - \href{\bookurl}{Ta lektura}, podobnie jak tysiące innych, jest dostępna on-line na stronie - \href{http://www.wolnelektury.pl/}{wolnelektury.pl}. - \vspace{.5em} - \fi - - Utwór opracowany został w ramach projektu \href{http://www.wolnelektury.pl/}{Wolne Lektury} - przez \href{http://nowoczesnapolska.org.pl}{fundację Nowoczesna Polska}. - - \end{minipage} - \noindent \rule{\linewidth}{0.4pt} - - \vspace{.6em} - \color{black} - } -} - -\newcommand{\editorialsection}{ - \begin{figure}[b!] - { - \footnotesize - \color{theme} - \noindent \rule{\linewidth}{0.4pt} - - \rightsinfo - \vspace{.6em} - - Źródło: \href{\bookurl}{\bookurl} - - \vspace{.6em} - \sourceinfo - - \description - \vspace{.6em} - - \editors - - \color{black} - } - \end{figure} -} \newcommand{\typosubsubsection}[1]{% -{\textsc{#1}} +{#1} } \newcommand{\typosubsection}[1]{% @@ -290,7 +211,7 @@ Letters={Uppercase} } \newcommand{\nazwautworu}[1]{% -\section*{\typosection{#1}}% +\section*{\raggedright{\typosection{#1}}}% } \newcommand{\podtytul}[1]{% @@ -298,6 +219,7 @@ Letters={Uppercase} } \newcommand{\translator}[1]{% +% TODO: l10n is a style thing \subsection*{\typosubsubsection{tłum. #1}}% } @@ -373,7 +295,7 @@ Letters={Uppercase} \subsubsection*{\typosubsubsection{#1}}% } \newcommand{\naglowekrozdzial}[1]{% -\subsubsection*{\typosubsubsection{#1}}% +{\subsubsection*{\raggedright{\typosubsubsection{#1}}}}% } \newcommand{\naglowekosoba}[1]{% @@ -425,7 +347,7 @@ Letters={Uppercase} } \ifshowfootnotes - \newcommand{\pa}[1]{\NoCaseChange{\footnote{#1 [przypis autorski]}}} + \newcommand{\pa}[1]{\NoCaseChange{\footnote{#1}}} \newcommand{\pe}[1]{\NoCaseChange{\footnote{#1}}} \newcommand{\pr}[1]{\NoCaseChange{\footnote{#1}}} \newcommand{\pt}[1]{\NoCaseChange{\footnote{#1}}} @@ -484,4 +406,3 @@ Letters={Uppercase} }% \fi } -