summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/cnbwp/doc/cnbwp-manual.sty
blob: 283751eda120c0a03789bb2d487c46b0b22276af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
\ProvidesPackage{cnbwp-manual}[2013/12/18 Package for CNB WP Manual]
\scrollmode
\renewcommand*\l@section{\@dottedtocline{1}{\z@}{1.5em}}
\RequirePackage{url}\let\zwurl\url
\RequirePackage{makeidx,multicol,graphicx,color,verbatim,moreverb,dcolumn}
\RequirePackage[figuresright]{rotating} % for sideways tables
\RequirePackage{fontspec,polyglossia}
\RequirePackage[a4,leftmargin=25mm,textheight=25cm,footskip=40pt,
  title=\CNBtitle,author={Zdeněk Wagner}]{zwpagelayout}
\RequireXeTeX
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{TeX Gyre Pagella}
\setsansfont[Scale=MatchLowercase]{DejaVu Sans Condensed}
\let\fntype\sffamily
\DeclareRobustCommand\fn[1]{{\fntype#1}}

\clubpenalty 10000
\widowpenalty 10000

\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
\def\@listi{\leftmargin\leftmargini
            \itemsep \z@}
\let\@listI\@listi
\@listi
\def\@listii {\leftmargin\leftmarginii
              \labelwidth\leftmarginii
              \advance\labelwidth-\labelsep
              \parsep \z@
              \topsep \z@
              \itemsep \z@}
\def\@listiii{\leftmargin\leftmarginiii
              \labelwidth\leftmarginiii
              \advance\labelwidth-\labelsep
              \parsep \z@
              \topsep \z@
              \itemsep \z@}
\def\@listiv {\leftmargin\leftmarginiv
              \labelwidth\leftmarginiv
              \advance\labelwidth-\labelsep}
\def\@listv  {\leftmargin\leftmarginv
              \labelwidth\leftmarginv
              \advance\labelwidth-\labelsep}
\def\@listvi {\leftmargin\leftmarginvi
              \labelwidth\leftmarginvi
              \advance\labelwidth-\labelsep}

\newcolumntype{R}{>{\bfseries}r}

\DeclareRobustCommand\xx[2]{#1{#2}\index{#2@#1{#2}}}
\def\xitem[#1]{\item[#1\index{#1}]}
\makeindex

% \tolerance macro

\def\Tolerance{\@ifstar{\s@Tolerance}{\n@Tolerance}}
\def\zw@Tolerance #1{\tolerance #1
  \ifnum\tolerance<9999 \hbadness \tolerance \else \hbadness 200 \fi}
\newcommand\s@Tolerance[1][9999]{\zw@Tolerance{#1}\advance\hbadness-1\relax}
\newcommand\n@Tolerance[1][9999]{\zw@Tolerance{#1}\relax}

\let\OrigIndex\theindex
\renewcommand\twocolumn[1][\relax]{\relax}
\renewenvironment{theindex}{\OrigIndex \let\OrigPar\par \def\par{\looseness -1 \OrigPar}\Tolerance
\divide\columnsep 2
\begin{multicols}{3}[\section{\indexname}\label{index}][7\baselineskip]\Tolerance[9999]\small}{\end{multicols}}

\def\efill{\hfill\nopagebreak}
\def\dotfill{\leaders\hbox to.6em{\hss .\hss}\hskip\z@ plus  1fill}
\def\dotfil{\leaders\hbox to.6em{\hss .\hss}\hfil}
\def\pfill{\unskip~\dotfill\penalty500\strut\nobreak
               \dotfil~\ignorespaces}
\let\indexspace\vb

\DeclareRobustCommand\BibTeX{Bib\TeX}
\DeclareRobustCommand\MikTeX{Mik\TeX}
\DeclareRobustCommand\teTeX{te\TeX}
\DeclareRobustCommand\TeXLive{\TeX\penalty9999 \space Live}
\DeclareRobustCommand\emTeX{em\TeX}
\DeclareRobustCommand\cmd[1]{\texttt{\char`\\#1}}
\DeclareRobustCommand\bibi{\cmd{{\normalfont\itshape typ}Item}\index
   {typItem@\cmd{{\normalfont\itshape typ}Item}}}
\def\;#1 {\texttt{#1}}
\DeclareRobustCommand\ps{Post\-Script}
\DeclareRobustCommand\gs{Ghost\-Script}
\DeclareRobustCommand\gv{Ghost\-View}
\DeclareRobustCommand\pdftex{pdf\TeX}
\DeclareRobustCommand\xps{\ps\index{PostScript@\ps}}
\DeclareRobustCommand\xgs{\gs\index{GhostScript@\gs}}
\DeclareRobustCommand\xgv{\gv\index{GhostView@\gv}}
\DeclareRobustCommand\xpdftex{\pdftex\index{pdfTeX@\pdftex}}
\DeclareRobustCommand\uv[1]{„#1“}

\DeclareRobustCommand\XeTeX{X\kern-.125em\lower.5ex\hbox{\csname
              reflectbox\endcsname{E}}\kern-.1667em\TeX}
\DeclareRobustCommand\XeLaTeX{X\kern-.125em\lower.5ex\hbox{\csname
              reflectbox\endcsname{E}}\LaTeX}

\let\centeredcaption\caption

\newfontfamily\CNB@pozor{TeX Gyre Bonum}
\def\pozor{\noindent \hangindent \parindent \hangafter -2
\llap{\raisebox{-15pt}[0mm][0mm]{\CNB@pozor
      \fontsize{36}{36}\selectfont\bfseries\textcolor{red}{!}\kern7.2dd}}\ignorespaces}

\RequirePackage[bookmarks,bookmarksopenlevel=2,bookmarksopen]{hyperref}\let\url\zwurl
\RequirePackage{xevlna}

\emergencystretch 1em

\errorcontextlines 999