prawie koniec
[librarian.git] / librarian / pdf / wlpub.cls
index fb9e7bd..37965a9 100644 (file)
@@ -85,7 +85,7 @@
 \usepackage[MeX]{polski}
 \usepackage{icomma}
 \usepackage[xetex]{graphicx}
 \usepackage[MeX]{polski}
 \usepackage{icomma}
 \usepackage[xetex]{graphicx}
-\usepackage{fontspec}
+\usepackage[silent]{fontspec} % silent - no warnings, quiet - warn only to log
 \usepackage{xunicode}
 \usepackage{xltxtra}
 %\usepackage{trimspaces} % imported by something else?
 \usepackage{xunicode}
 \usepackage{xltxtra}
 %\usepackage{trimspaces} % imported by something else?
@@ -93,6 +93,7 @@
 \usepackage[overload]{textcase}
 \usepackage{scalefnt}
 \usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=black,xetex,linktocpage]{hyperref}
 \usepackage[overload]{textcase}
 \usepackage{scalefnt}
 \usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=black,xetex,linktocpage]{hyperref}
+%\usepackage{hyperref}
 \usepackage{fancyhdr}
 
 %\usepackage{fnpos}
 \usepackage{fancyhdr}
 
 %\usepackage{fnpos}
 \counterwithout{footnote}{chapter}
 
 \usepackage[explicit]{titlesec}
 \counterwithout{footnote}{chapter}
 
 \usepackage[explicit]{titlesec}
+\usepackage{microtype}
 
 %% Wyimki - placing them on correct pages
 
 %% Wyimki - placing them on correct pages
-\usepackage{changepage}
+\usepackage[strict]{changepage}
 %\usepackage{fltpage}
 %\usepackage{float}
 
 %\usepackage{fltpage}
 %\usepackage{float}
 
 % bottom figure below footnotes
 %\makeFNabove
 
 % bottom figure below footnotes
 %\makeFNabove
 
+%%% Hyphenation opts:
+%\pretolerance=10000
+\tolerance=2600
+\emergencystretch=30pt
+
 
 %%%%%%%%%%%%%%%%%%%%%%% Paper size
 \setlength\baselineskip{7.14pt}
 
 %%%%%%%%%%%%%%%%%%%%%%% Paper size
 \setlength\baselineskip{7.14pt}
@@ -169,7 +176,7 @@ Mapping=tex-text
 \setlength{\parskip}{0mm}
 
 \renewcommand{\normalsize}{\fontsize{10.4}{14.28}\addfontfeature{LetterSpace=3.0}\selectfont}
 \setlength{\parskip}{0mm}
 
 \renewcommand{\normalsize}{\fontsize{10.4}{14.28}\addfontfeature{LetterSpace=3.0}\selectfont}
-\renewcommand{\large}{\fontsize{14}{14.28}\addfontfeature{LetterSpace=3.0}\selectfont} % srodtytul
+\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
 \renewcommand{\Large}{\fontsize{15}{21.42}\addfontfeature{LetterSpace=0.0}\selectfont} % tytuł rozdziału
 \renewcommand{\huge}{\fontsize{18}{28.56}\addfontfeature{LetterSpace=1.0}\selectfont} % wyimek
 \renewcommand{\small}{\fontsize{8}{14.28}\addfontfeature{LetterSpace=5.0}\selectfont} % paginy
 \renewcommand{\Large}{\fontsize{15}{21.42}\addfontfeature{LetterSpace=0.0}\selectfont} % tytuł rozdziału
 \renewcommand{\huge}{\fontsize{18}{28.56}\addfontfeature{LetterSpace=1.0}\selectfont} % wyimek
@@ -192,8 +199,8 @@ Mapping=tex-text
 %%%%%%%%%% Nagłówek normalny
 \cfoot{}
 % this will go to \leftmark
 %%%%%%%%%% Nagłówek normalny
 \cfoot{}
 % this will go to \leftmark
-\renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{#1}}{}}
-\fancyhead[CE]{{\small\MakeUppercase{\@title}}}
+\renewcommand{\chaptermark}[1]{\markboth{\MakeTextUppercase{#1}}{}}
+\fancyhead[CE]{{\small\MakeTextUppercase{\@author, \@title}}}
 \fancyhead[CO]{{\small\leftmark}}
 \fancyhead[LE,RO]{{\small\intro\thepage}}
 %%%%%%%%%% Nagłówek pierwszej strony rozdziału
 \fancyhead[CO]{{\small\leftmark}}
 \fancyhead[LE,RO]{{\small\intro\thepage}}
 %%%%%%%%%% Nagłówek pierwszej strony rozdziału
@@ -210,23 +217,23 @@ Mapping=tex-text
 {\Large\intro\addfontfeature{LetterSpace=0.5,Kerning={Uppercase}}}%
 {}{0pt}{\parbox{80mm}{\raggedright#1}}
 \newlength{\chapterposcorrection}\newlength{\chapterspaceafter}
 {\Large\intro\addfontfeature{LetterSpace=0.5,Kerning={Uppercase}}}%
 {}{0pt}{\parbox{80mm}{\raggedright#1}}
 \newlength{\chapterposcorrection}\newlength{\chapterspaceafter}
-\setlength{\chapterposcorrection}{-\headsep-2\baselineskip}
-\setlength{\chapterspaceafter}{14\baselineskip-14pt}%\f@size of large
+\setlength{\chapterposcorrection}{-\headsep-2\baselineskip-2.352mm} % 2.352 is a measured correction:
+\setlength{\chapterspaceafter}{14\baselineskip-14pt+2.352mm}%\f@size of large
 \titlespacing*{\chapter}{0pt}{\chapterposcorrection}{\chapterspaceafter}
 
 %% Sections
 \titleformat{\section}%
 {\addfontfeature{LetterSpace=0.3}\large}%
 \titlespacing*{\chapter}{0pt}{\chapterposcorrection}{\chapterspaceafter}
 
 %% Sections
 \titleformat{\section}%
 {\addfontfeature{LetterSpace=0.3}\large}%
-{\thesection{}.}{.5em}{\MakeUppercase{#1}}
+{\thesection{}.}{.5em}{\MakeTextUppercase{#1}}
 
 \renewcommand{\thesection}{\Roman{section}}
 
 \titleformat{\subsection}[runin]%
 {}%
 
 \renewcommand{\thesection}{\Roman{section}}
 
 \titleformat{\subsection}[runin]%
 {}%
-{\thesubsection{}.}{.5em}{\MakeUppercase{#1}.}[]
+{\thesubsection{}.}{.5em}{\MakeTextUppercase{#1}.}[]
 
 \renewcommand{\thesubsection}{\Alph{subsection}}
 
 \renewcommand{\thesubsection}{\Alph{subsection}}
-\titlespacing*{\subsection}{0pt}{0pt}{.5em}
+\titlespacing*{\subsection}{0pt}{\baselineskip}{.5em}
 
 \newcommand{\typosubsubsection}[1]{%
 {\textsc{#1}}
 
 \newcommand{\typosubsubsection}[1]{%
 {\textsc{#1}}
@@ -234,7 +241,7 @@ Mapping=tex-text
 
 %% XXX delete them
 \newcommand{\typosubsection}[1]{%
 
 %% XXX delete them
 \newcommand{\typosubsection}[1]{%
-{\MakeUppercase{#1}}
+{\MakeTextUppercase{#1}}
 }
 
 \newcommand{\typosection}[1]{%
 }
 
 \newcommand{\typosection}[1]{%
@@ -245,7 +252,7 @@ Mapping=tex-text
 
 %%%%% Footnotes (works with footmisc) %%%%%%%%
 \newlength{\footnoteindent}\newlength{\footnoteprespace}
 
 %%%%% Footnotes (works with footmisc) %%%%%%%%
 \newlength{\footnoteindent}\newlength{\footnoteprespace}
-\setlength{\footnoteindent}{6mm}%{3.5mm}
+\setlength{\footnoteindent}{8mm}%{3.5mm}
 \setlength{\footnoteprespace}{0em}
 \makeatletter
 
 \setlength{\footnoteprespace}{0em}
 \makeatletter
 
@@ -300,8 +307,8 @@ Mapping=tex-text
 %%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
-\clubpenalty=100000
-\widowpenalty=100000
+\clubpenalty=400
+\widowpenalty=400
 
 
 % see http://osdir.com/ml/tex.xetex/2005-10/msg00003.html
 
 
 % see http://osdir.com/ml/tex.xetex/2005-10/msg00003.html
@@ -473,7 +480,7 @@ Mapping=tex-text
 
 \newcommand{\dlugicytat}[1]{%
 \begin{quotation}%
 
 \newcommand{\dlugicytat}[1]{%
 \begin{quotation}%
-#1%
+\noindent{}\ignorespaces#1%
 \end{quotation}%
 }
 
 \end{quotation}%
 }
 
@@ -525,7 +532,7 @@ Mapping=tex-text
 \newcommand{\theautorrozdzialu}{}
 
 \newcommand{\autorrozdzialu}[1]{%
 \newcommand{\theautorrozdzialu}{}
 
 \newcommand{\autorrozdzialu}[1]{%
-\renewcommand{\theautorrozdzialu}{{\normalfont\normalsize\newline{}\newline{}\emph{#1}}}
+\renewcommand{\theautorrozdzialu}{{\normalfont\normalsize\newline{}\newline{}\parbox{\textwidth}{\normalsize\it #1}}}
 }
 
 
 }
 
 
@@ -549,7 +556,9 @@ Mapping=tex-text
 }
 
 \newcommand{\akap}[1]{%
 }
 
 \newcommand{\akap}[1]{%
-\par{#1}%
+#1
+
+% newline here needed, we don't use \par cause it ignores \noindent before
 }
 \newcommand{\akapdialog}[1]{%
 \par{#1}%
 }
 \newcommand{\akapdialog}[1]{%
 \par{#1}%