blob: 2bf5a8d0e9121ce6b71e285223516427e9177938 (
plain) (
blame)
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
|
%%
%% This is a DocBook LaTeX style for Asio
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mybook}[2008/11/11 Asio DocBook Style]
% The defined options
\DeclareOption{hyperlink}{ \def\DBKhyperlink{yes} }
\DeclareOption{nohyperlink}{ \def\DBKhyperlink{no} }
% Default values
\ExecuteOptions{nohyperlink}
% If defined, process the options
\ProcessOptions\relax
% Needed packages
\usepackage[top=2cm,bottom=2cm,left=1.5cm,right=1.5cm]{geometry}
\usepackage{float}
\usepackage{dbk_core}
\usepackage{dbk_admonition}
\usepackage{fancyvrb}
% Text layout
\setlength\parskip{\medskipamount}
\setlength\parindent{0pt}
\raggedbottom
% Stuff we don't need
\def\DBKinditem#1#2{}
\newenvironment{DBKindtable}{}{}
\newenvironment{DBKrevtable}{}{}
\newenvironment{DBKlegalnotice}{}{}
% Admonitions
\floatstyle{boxed}
\newfloat{DBKadmonition}{h}{lop}
\newfloat{sidebar}{h}{lop}
% Page break before sections
\let\orig@section\section
\renewcommand\section{
\clearpage\orig@section
}
% Ensure line break after paragraph heading
\renewcommand\paragraph{%
\@startsection{paragraph}{4}{\z@}%
{-2.25ex\@plus -1ex \@minus -.2ex}%
{0.5ex \@plus .2ex}%
{\normalfont\normalsize\bfseries}%
}
% Add page numbers to hyperlinks
%\let\orig@hyperlink\hyperlink
%\renewcommand{\hyperlink}[2]{
% \orig@hyperlink{#1}{#2} (page \pageref{#1})
%}
% Extra indent on TOC section numbers
\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{3.3em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{4.2em}}
\renewcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{5.1em}}
% Title page
\renewcommand\maketitle{
\null
\thispagestyle{empty}
\begin{center}
\null\vskip 7cm
\begin{LARGE}
asio C++ library
\end{LARGE}
\null\vskip 1cm
\begin{large}
\DBKsubtitle{}
\end{large}
\null\vskip 1cm
\begin{Large}
Reference Manual
\end{Large}
\null\vskip 5cm
\begin{small}
\DBKcopyright{}
\end{small}
\end{center}
\vfill
\null
\cleardoublepage
}
|