X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/575bb0b1a73f2bbbca7b2c22bf1e272ca0437912..1f50595109c011a2639a3eccf91e40be80461af6:/librarian/pdf/fnprep.cls diff --git a/librarian/pdf/fnprep.cls b/librarian/pdf/fnprep.cls index ebf39e2..3cc56f5 100644 --- a/librarian/pdf/fnprep.cls +++ b/librarian/pdf/fnprep.cls @@ -20,7 +20,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{multicol} -%\usepackage[landscape]{geometry} \usepackage[explicit]{titlesec} \usepackage{titletoc} \usepackage{fancyhdr} @@ -41,6 +40,19 @@ \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}{% + \markboth{\MakeTextUppercase{Przypisy}}{} + \renewcommand{\enoteheading}{} + \begingroup + \cleardoublepage + \parindent 0pt + \parskip 2ex + \def\enotesize{\normalsize} + \theendnotes + \endgroup +} + %\usepackage{fnpos} \usepackage{printlen} \usepackage{calc} @@ -62,39 +74,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=22.578mm,% + top=\dimexpr22.578mm+28pt\relax,% left=15mm,% right=20mm,% bottom=24.439mm,% - headsep=19pt,% 2x grid(14) - 9 (text font size) + headsep=47pt,% 2x grid(14) - 9 (text font size) + 28pt ]{geometry}% \setlength\columnsep{10mm} - +\newlength\szpaltawidth +\setlength\szpaltawidth{80mm} %%%%%%%%%%%%%%%%%%%%%%%% Fonts @@ -159,7 +151,7 @@ Mapping=tex-text \renewcommand{\Huge}{\fontsize{38}{42}\selectfont} \renewcommand{\huge}{\fontsize{15}{21}\selectfont} \renewcommand{\LARGE}{\fontsize{14}{14}\selectfont} -\renewcommand{\large}{\fontsize{10}{21}\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} @@ -226,10 +218,20 @@ 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 .} } @@ -237,30 +239,37 @@ Mapping=tex-text \nochapternumbers \startcontents[chapter] -\titleformat{\chapter}[block]% -{\begin{chaptertitlebox}}% -{}{0pt}% -{\Huge{}\headfont\color{white}#1% -\newline\printcontents[chapter]{}{1}{}% -}% -[\end{chaptertitlebox}] -\titlespacing*{\chapter}{0pt}{0pt}{0pt} +\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{\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 @@ -622,9 +631,9 @@ Mapping=tex-text \newcommand{\naglowekrozdzial}[1]{% \startcontents[chapter] +\markboth{#1}{} % -\chapter[#1]{\MakeUppercase{#1}\theautorrozdzialu{}}% -\renewcommand{\theautorrozdzialu}{}% +\chapterblock{#1} } \newcommand{\naglowekosoba}[1]{% @@ -633,7 +642,6 @@ Mapping=tex-text \newcommand{\naglowekpodrozdzial}[1]{% \section{#1}\nopagebreak% } - \newcommand{\miejsceczas}[1]{% \par{\emph{#1}}% } @@ -761,3 +769,34 @@ Mapping=tex-text \newcommand{\link}[2]{\href{#1}{\uline{#2}\footnote{#1}}} \newcommand{\www}[1]{{\normalfont\href{#1}{#1}}} + +% TABELA % + +\newenvironment{tabela}[0]% +{\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} \\[3mm] + #1 + \\[4mm] +} + +\newcommand{\tabelakomnaglowek}[1]{\formatkomnaglowek{#1}} +\newcommand{\tabelakompierwsza}[1]{\formatkompierwsza{#1}} +\newcommand{\tabelakom}[1]{\formatkom{#1}}