X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/5626e50abc1e43c61501ea377420aa83953414b6..f4cbb15b0bcd2b876872983238a1656fbd990700:/librarian/pdf/fnprep.cls

diff --git a/librarian/pdf/fnprep.cls b/librarian/pdf/fnprep.cls
index 1a312b6..c413272 100644
--- a/librarian/pdf/fnprep.cls
+++ b/librarian/pdf/fnprep.cls
@@ -13,19 +13,23 @@
 \RequirePackage{xifthen}
 \RequirePackage{environ} % environments with \BODY, for wyimek
 
-
+\PassOptionsToClass{landscape,twoside}{report}
 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
+
 \ProcessOptions\relax
 \LoadClass{report}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \usepackage{multicol}
-\usepackage[landscape]{geometry}
 \usepackage[explicit]{titlesec}
 \usepackage{titletoc}
 \usepackage{fancyhdr}
 \usepackage[MeX]{polski}
 
+\usepackage{longtable}
+\usepackage{booktabs}
+\usepackage{colortbl}
+
 \usepackage{trace}
 \usepackage{caption}
 \usepackage{tabularx}
@@ -41,6 +45,20 @@
 \usepackage[colorlinks=false,linkcolor=white,pdfborder={0,0,0},setpagesize=false,urlcolor=black,xetex,linktocpage]{hyperref}
 %\usepackage{hyperref}
 \usepackage{endnotes}
+\let\footnote=\endnote
+\newcommand{\printfootnotes}{%
+  \outmulticols
+  \markboth{\MakeTextUppercase{Przypisy}}{}
+  \renewcommand{\enoteheading}{}
+  \begingroup
+  \cleardoublepage
+  \parindent 0pt
+  \parskip 2ex
+  \def\enotesize{\normalsize}
+  \theendnotes
+  \endgroup
+}
+
 %\usepackage{fnpos}
 \usepackage{printlen}
 \usepackage{calc}
@@ -62,27 +80,19 @@
 
 
 %%%%%%%%%%%%%%%%%%%%%%% Paper size
-%\setlength\baselineskip{7.14pt}
-%% \ifcutafivepaper
-%%   \usepackage[%
-%%     paperwidth=160mm,%
-%%     paperheight=225mm,%
-%%     text={117mm,162mm},%
-%%     top=30mm,%
-%%     headsep=8mm,%
-%%     left=23mm,%
-%%     right=30mm]{geometry}%
-%% \else
-%%   \usepackage[%
-%%     top=\dimexpr14.5mm+\baselineskip-16pt\relax, % margin will be smaller to accomodate for bigger header (16pt)
-%%     headsep=3\baselineskip,
-%%     headheight=16pt,
-%%     bottom=26.3mm,%
-%%     inner=14.5mm,%
-%%     outer=22.5mm,%
-%%     textheight=\dimexpr7.14pt*(32*2+1)\relax,%
-%%     includehead]{geometry}
-%% \fi
+
+\usepackage[%
+  paperwidth=297mm,%
+  paperheight=210mm,%
+  top=\dimexpr22.578mm+28pt\relax,%
+  left=15mm,%
+  right=20mm,%
+  bottom=24.439mm,%
+  headsep=47pt,% 2x grid(14) - 9 (text font size) + 28pt
+]{geometry}%
+\setlength\columnsep{10mm}
+\newlength\szpaltawidth
+\setlength\szpaltawidth{80mm}
 
 %%%%%%%%%%%%%%%%%%%%%%%% Fonts
 
@@ -95,8 +105,9 @@ SmallCapsFont = Lato-Regular,
 SmallCapsFeatures={Letters=SmallCaps},
 Mapping=tex-text
 ]{Lato-Regular}
+\newfontface\latoblack{Lato-Black}
 \newfontface\headfont{LeagueGothic-Regular}
-
+%% Lato Light 
 
 \setlength{\parindent}{3mm}
 \setlength{\parskip}{0mm}
@@ -107,6 +118,56 @@ Mapping=tex-text
 % \huge - pagina tytuÅ rozdziaÅu
 % \Huge - naglowek na szarym tle
 
+% grid 14, normal 9/12, 
+% srÃ³dtytuÅy leage 10/8 14
+% XXXX pagina: (maÅa? nie uzywana!)league 8, kerning 60 -âº (30, 90), przy nowoczesna polska 100
+% pagina: 28pt od top: 10mm  CMY 0 75 100
+% kolumna-âºteskt base 2xgrid
+% tabela header 14pt, LEAGE GOT RE [pad: left:3mm, 1,41mm od gÃ³ry 
+% tabela  rynna 5mm
+% tabela kreska 0.7pt pomarancz, potem 0.5pt teÅ¼ pomaraÅcz
+% tabela tekst: 8.5/11pt lato regular (wtedy pomaranczem wyrÃ³Å¼nienia)
+% kern 5
+% (bez gridu) (abo 8.5/11pt reglar) , poza interliniÄ 1mm odpycha enter
+% 
+% footer: --||-- 
+% footer LATO BLACK 15 -- pagina(strona) TYLKO Z PRAWEJ
+% footer srodek. league gothic  10  k70 
+% toc:wstep leag gothic 38  kern 75
+% toc: 11pkt na grid 7 
+% marginesy: top: 22.578 mm bottom 24.439mm rynna 10; out 20mm, ins
+% 15mm
+% srÃ³d->text base 2xgrid
+% toc: wstep->text 3xgrid,
+% toc: left: 25mm  right: 25mm
+% toc dÅugoÅÄ tytuÅu (Åamanie) 10m od koÅca 
+% toc: od numeru enspace (indent)
+% footer 2xgrid od doÅu 9.7mm
+% master toc: margin left: -width - 10 / 2 ; 136mm [3x Åam]
+% footnotes SOURCE SANS PRO 8/11pt semibold na gridzie (ale nie musi) spacing
+% 100 
+% master toc: 11pt/21pt leage na pÃ³Å-grid (jak ejst mniejsze
+% --licencja to 10pt!)
+% master toc head 15pt, 
+% master toc wpisy: 11pt - (moÅ¼na 11pt + black)
+% TYtUL leag gothi  46pt
+% 
+% sponsorzy np 9pt
+\newcommand{\headingbig}{\fontsize{28}{28}\selectfont}
+\renewcommand{\Huge}{\fontsize{38}{42}\selectfont}
+\renewcommand{\huge}{\fontsize{15}{21}\selectfont}
+\renewcommand{\LARGE}{\fontsize{14}{14}\selectfont}
+\renewcommand{\large}{\fontsize{10}{14}\selectfont} % 21
+\renewcommand{\Large}{\fontsize{11}{14}\selectfont}
+\newcommand{\TOCtext}{\fontsize{11}{21}\selectfont}
+\renewcommand{\normalsize}{\fontsize{9}{14}\selectfont}
+\renewcommand{\footnotesize}{\fontsize{8}{10.5}\selectfont} % 
+\renewcommand{\scriptsize}{\fontsize{8.5}{11}\selectfont}
+\newcommand{\titlesize}{\fontsize{46}{46}\selectfont}
+\newcommand{\footerbig}{\fontsize{15}{15}\selectfont}
+\newcommand{\footernormal}{\fontsize{10}{10}\selectfont}
+
+
 %% \renewcommand{\normalsize}{\fontsize{10.4}{14.28}\addfontfeature{LetterSpace=3.0}\selectfont}
 %% \renewcommand{\large}{\fontsize{14}{14.28}\addfontfeature{LetterSpace=3.0,Letters=Uppercase}\selectfont} % srodtytul
 %% \renewcommand{\small}{\fontsize{8}{14.28}\addfontfeature{LetterSpace=5.0}\selectfont} % paginy
@@ -116,14 +177,21 @@ Mapping=tex-text
 %% \renewcommand{\footnotesize}{\addfontfeature{LetterSpace=1.0}\fontsize{9}{10.74}\selectfont}
 
 
+% â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ Multicols  â¢
+\newif\ifinmulticols \inmulticolsfalse
+
+\newcommand{\inmulticols}[0]{\ifinmulticols{}\else\begin{multicols*}{3}\inmulticolstrue\fi}
+\newcommand{\outmulticols}[0]{\ifinmulticols{}\end{multicols*}\clearpage\inmulticolsfalse\else\fi}
 
 % â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ COLORS â¢ â¢
 \definecolor{stoK}{cmyk}{0,0,0,1}
 \definecolor{theme}{gray}{.3}
 \definecolor{headcolor}{HTML}{EA5F21}
-\definecolor{graybg}{HTML}{737372}
+\definecolor{graybg}{cmyk}{0,0,0,0.55}
 %\color{stoK}
 
+\arrayrulecolor{headcolor}
+
 % â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ METADATA â¢ â¢
 
 \makeatletter
@@ -139,10 +207,10 @@ Mapping=tex-text
 \fancyhf{}
 \renewcommand{\chaptermark}[1]{\markboth{\MakeTextUppercase{#1}}{}}
 % on the odd right : chapter title
-\fancyhead[LE,RO]{{\color{headcolor}\headfont\huge\leftmark}}
-\fancyfoot[LE,RO]{{\headfont\Large\thepage}}
-\fancyfoot[LO]{{\headfont\normalfont\MakeTextUppercase{\@title}}}
-\fancyfoot[RE]{{\headfont\normalfont\MakeTextUppercase{\@address}}}
+\fancyhead[LE,RO]{{\color{headcolor}\headfont\headingbig\leftmark}}
+\fancyfoot[RO]{{\color{gray}\latoblack\footerbig\thepage}}
+\fancyfoot[RE]{{\color{gray}\headfont\footernormal\MakeTextUppercase{\@title}}}
+\fancyfoot[LO]{{\color{gray}\headfont\footernormal\MakeTextUppercase{\@address}}}
 
 \renewcommand{\headrulewidth}{0pt}
 \renewcommand{\footrulewidth}{0pt}
@@ -152,8 +220,8 @@ Mapping=tex-text
 \makeatletter
 \fancypagestyle{plain}{%
 \fancyhf{}
-\fancyfoot[LE,RO]{{\headfont\Large\thepage}}
-\fancyfoot[LO]{{\headfont\normalfont\MakeTextUppercase{\@title}}}
+\fancyfoot[RO]{{\color{gray}\latoblack\footerbig\thepage}}
+\fancyfoot[LO]{{\color{gray}\headfont\footernormal\MakeTextUppercase{\@address}}}
 }
 \makeatother
 
@@ -163,41 +231,58 @@ Mapping=tex-text
 %\renewcommand{\chaptername}{}
 
 % â¢ chapter â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢
-\makeatletter\newenvironment{chaptertitlebox}{   \begin{lrbox}{\@tempboxa}\begin{minipage}[t][\dimexpr\textheight-0.5cm\relax]{\dimexpr\linewidth-0.5\columnsep\relax}}{\end{minipage}\end{lrbox}%
-   \colorbox{graybg}{\raisebox{1cm}{\usebox{\@tempboxa}}}
-}
 
+
+%% \newsavebox{\chaptitlebox}
+%% \newenvironment{chaptertitlebox}%
+%% {\begin{lrbox}{\chaptitlebox}\begin{minipage}{\dimexpr\linewidth-0.5\columnsep\relax}}%
+%% {\vfill\end{minipage}\end{lrbox}%
+%% \vspace{-5mm}\colorbox{graybg}{\usebox{\chaptitlebox}}%
+%% } 
+
+%% \begin{lrbox}{\@tempboxa}\begin{minipage}[t][\dimexpr\textheight-0.5cm\relax]{\dimexpr\linewidth-0.5\columnsep\relax}}{\end{minipage}\end{lrbox}%
+%%    \colorbox{graybg}{\raisebox{1cm}{\usebox{\@tempboxa}}}
+%% }
+
+\makeatletter
 \newcommand{\nochapternumbers}{
   \renewcommand{\thesection}{\@arabic \c@section .}
 }
 \makeatother
 
 \nochapternumbers
-\startcontents[chapter]
-\titleformat{\chapter}[block]%
-{\begin{chaptertitlebox}}%
-{}{0pt}%
-{\Huge{}\headfont\color{white}#1%
-\newline\printcontents[chapter]{}{1}{}%
-}%
-[\end{chaptertitlebox}]
+%\startcontents[chapter] % ??? XXX
+
+\newcommand{\chapterblock}[1]{%
+\clearpage%
+\addcontentsline{toc}{chapter}{#1}%
+\setlength{\fboxsep}{0pt}%
+\noindent\colorbox{graybg}{%
+\rule{0pt}{28pt}%
+\hspace{2.5mm}%
+\begin{minipage}[t][\dimexpr\textheight-28pt\relax]{\dimexpr\szpaltawidth-5mm\relax}%
+\Huge{}\headfont\color{white}#1%
+\vspace{\dimexpr21mm-11mm\relax}%
+\par{\color{white}\printcontents[chapter]{}{1}{}}
+\end{minipage}%(testing)%\rule{0.1pt}{\baselineskip}%
+\hspace{2.5mm}}%
+\vspace{\dimexpr-\parskip-11pt\relax}%
+}
 
 \titlespacing*{\chapter}{0pt}{0pt}{0pt}
 
-
 % â¢ section â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ â¢ 
 \titleformat{\section}[runin]%
 {\large\headfont%\nochapternumbers
 }%
-{}{0pt}{\makebox[\linewidth][l]{\color{headcolor}\raggedright{}\thesection
-    #1}%
+{}{0pt}{\makebox[\linewidth][l]{\color{headcolor}\raggedright{}\thesection\enskip #1}%
 % this is just to make the spacing between section and following
 % text right (newlines produce strange amount of space
-\\\makebox[\linewidth][l]{~}}%
+\makebox[\linewidth][l]{~}}%
 
-\titlecontents{section}[0pt]{\headfont\large\color{white}}%
-{\thecontentslabel}{\contentsmargin{0pt}}%
-{\hfill\color{white}{\thecontentspage }}
+\titlecontents{section}[0pt]{\headfont\Large\color{white}}%
+{\thecontentslabel\enspace}{\contentsmargin{0pt}}%
+{\hfill\color{white}{\thecontentspage}}
 
 
 % \fboxsep=0pt % for framebox
@@ -355,33 +440,33 @@ Mapping=tex-text
 
   %% \paperheight=210mm
 
-  \newgeometry{paperwidth=297mm,paperheight=210mm}
-  \pdfpageheight=210mm
-  \pdfpagewidth=297mm
+  %% \newgeometry{paperwidth=297mm,paperheight=210mm}
+  %% \pdfpageheight=210mm
+  %% \pdfpagewidth=297mm
 
-  \thispagestyle{empty}
-  \newlength{\PictHOffset}
-  \newlength{\PictVOffset}
-  \setlength{\PictHOffset}{1in}
-  \addtolength{\PictHOffset}{\hoffset}
-  \addtolength{\PictHOffset}{\oddsidemargin}
+  %% \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}
+  %% \setlength{\PictVOffset}{1in}
+  %% \addtolength{\PictVOffset}{\voffset}
+  %% \addtolength{\PictVOffset}{\topmargin}
+  %% \addtolength{\PictVOffset}{\headheight}
+  %% \addtolength{\PictVOffset}{\headsep}
+  %% \addtolength{\PictVOffset}{\topskip}
 
-  \addtolength{\PictVOffset}{-\paperheight}
+  %% \addtolength{\PictVOffset}{-\paperheight}
 
-  \noindent\hspace*{-\PictHOffset}%
-  \raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{%
-      \includegraphics[height=\pdfpageheight,width=\pdfpagewidth]{cover.pdf}}}
+  %% \noindent\hspace*{-\PictHOffset}%
+  %% \raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{%
+  %%     \includegraphics[height=\pdfpageheight,width=\pdfpagewidth]{cover.pdf}}}
 
-  \restoregeometry
-  \pdfpageheight=210mm
-  \pdfpagewidth=148mm
+  %% \restoregeometry
+  %% \pdfpageheight=210mm
+  %% \pdfpagewidth=148mm
 
   }
 
@@ -389,53 +474,51 @@ Mapping=tex-text
   %\vspace{\paperheight}
   \thispagestyle{empty}
   \cleardoublepage
-  \setcounter{page}{1}
-  \thispagestyle{empty}
-  \begin{center}
-  \intro
-  {
-    \begin{spacing}{1.4}
-    \Huge \noindent \thetitle
-    \end{spacing}
-  }
-  \end{center}
+  %% \setcounter{page}{1}
+  %% \thispagestyle{empty}
+  %% \begin{center}
+  %% {
+  %%   \begin{spacing}{1.4}
+  %%   \Huge \noindent \thetitle
+  %%   \end{spacing}
+  %% }
+  %% \end{center}
 
-  \vspace{\baselineskip}
+  %% \vspace{\baselineskip}
 
-  \begin{center}
-    \intro
-    {
-      \huge \noindent
-      \theauthor
+  %% \begin{center}
+  %%   \intro
+  %%   {
+  %%     \huge \noindent
+  %%     \theauthor
 
-    }
-  \end{center}
-                  %\emph{\thankyou}\\
-                  %\indent\emph{You made this book possible.}
-  \vspace{7\baselineskip}
+  %%   }
+  %% \end{center}
+  %%                 %\emph{\thankyou}\\
+  %%                 %\indent\emph{You made this book possible.}
+  %% \vspace{7\baselineskip}
 
-  \begin{center}
-    \includegraphics[scale=.2]{logo.eps}
-  \end{center}
+  %% \begin{center}
+  %%   \includegraphics[scale=.2]{logo.eps}
+  %% \end{center}
 
 }
 
 
 \newcommand{\editorialsection}{
   \clearpage
-  \thispagestyle{empty}
-  {
-    \setlength{\parindent}{0mm}
-    \small
-  \input{editorial}
-  }
+  %% \thispagestyle{empty}
+  %% {
+  %%   \setlength{\parindent}{0mm}
+  %%   \small
+  %% \input{editorial}
+  %% }
 }
 
 \renewcommand*\contentsname{Spis treÅci}
 \newcommand{\spistresci}{
 {
-  \intro
-  \setcounter{tocdepth}{0}
+%  \setcounter{tocdepth}{0}
   \tableofcontents
   \newpage
 }
@@ -558,19 +641,20 @@ Mapping=tex-text
 
 
 \newcommand{\naglowekrozdzial}[1]{%
+\inmulticols%
 \startcontents[chapter]
+\markboth{#1}{}
 %
-\chapter[#1]{\MakeUppercase{#1}\theautorrozdzialu{}}%
-\renewcommand{\theautorrozdzialu}{}%
+\chapterblock{#1}
 }
 
 \newcommand{\naglowekosoba}[1]{%
 \par{\textsc{#1}}\nopagebreak%
 }
 \newcommand{\naglowekpodrozdzial}[1]{%
+\inmulticols%
 \section{#1}\nopagebreak%
 }
-
 \newcommand{\miejsceczas}[1]{%
 \par{\emph{#1}}%
 }
@@ -579,6 +663,7 @@ Mapping=tex-text
 }
 
 \newcommand{\akap}[1]{%
+\inmulticols%
 #1
 
 % newline here needed, we don't use \par cause it ignores \noindent before
@@ -614,6 +699,11 @@ Mapping=tex-text
 \hspace*{#1}#2%
 }
 
+\newcommand{\pa}[1]{\NoCaseChange{\endnote{#1}}}
+\newcommand{\pe}[1]{\NoCaseChange{\footnote{#1}}}
+\newcommand{\pr}[1]{\NoCaseChange{\footnote{#1}}}
+\newcommand{\pt}[1]{\NoCaseChange{\footnote{#1}}}
+
 
 \newcommand{\mat}[1]{$#1$}
 
@@ -686,8 +776,8 @@ Mapping=tex-text
 
 
 \newcommand{\lista}[1]{%
+\inmulticols%
 \begin{compactenum}
-%\setlength{\parskip}{\parindent}
 #1
 \end{compactenum}
 }
@@ -698,3 +788,37 @@ Mapping=tex-text
 \newcommand{\link}[2]{\href{#1}{\uline{#2}\footnote{#1}}}
 
 \newcommand{\www}[1]{{\normalfont\href{#1}{#1}}}
+
+
+
+% TABELA %
+
+\newenvironment{tabela}[0]%
+{\renewcommand{\inmulticols}{\relax}%
+\begin{longtable}{p{40mm}@{\hspace{5mm}}p{65mm}@{\hspace{5mm}}p{65mm}@{\hspace{5mm}}p{65mm}}}%
+{\end{longtable}}
+
+\newcommand{\formatkomnaglowek}[1]% reset format
+             {{\LARGE\headfont\color{headcolor}\MakeTextUppercase{#1}}}
+\newcommand{\formatkompierwsza}[1]% reset format
+             {{\LARGE\headfont\color{graybg}\MakeTextUppercase{#1}}}
+\newcommand{\formatkom}[1]{\scriptsize{}#1} % nop
+
+\newcommand{\tabelanaglowek}[1]{%
+    #1
+    \\[4mm]
+    \endhead
+}
+
+\newcommand{\tabelawiersz}[1]{
+    \cmidrule[0.7pt](r{5mm}){1-1}%
+    \cmidrule[0.7pt](r{5mm}){2-2}%
+    \cmidrule[0.7pt](r{5mm}){3-3}%
+    \cmidrule[0.7pt](r{5mm}){4-4} \\[1mm]
+#1
+    \\[4mm]
+}
+
+\newcommand{\tabelakomnaglowek}[1]{\formatkomnaglowek{#1}}
+\newcommand{\tabelakompierwsza}[1]{\formatkompierwsza{#1}}
+\newcommand{\tabelakom}[1]{\formatkom{#1}}
