| 1 |
%% |
| 2 |
%% This is a DocBook LaTeX style example |
| 3 |
%% |
| 4 |
\NeedsTeXFormat{LaTeX2e} |
| 5 |
\ProvidesPackage{dbsimple}[2003/04/11 Simple DocBook Style] |
| 6 |
|
| 7 |
% The defined options |
| 8 |
\DeclareOption{hyperlink}{ \def\DBKhyperlink{yes} } |
| 9 |
\DeclareOption{nohyperlink}{ \def\DBKhyperlink{no} } |
| 10 |
|
| 11 |
% Default values |
| 12 |
\ExecuteOptions{nohyperlink} |
| 13 |
|
| 14 |
% If defined, process the options |
| 15 |
\ProcessOptions\relax |
| 16 |
|
| 17 |
% Needed packages |
| 18 |
\usepackage{float} |
| 19 |
\usepackage{dbk_core} |
| 20 |
|
| 21 |
% LaTeX <othercredit> commands to define |
| 22 |
% |
| 23 |
% #1: mapped to <contrib> |
| 24 |
% #2: mapped to <firstname> <surname> |
| 25 |
% |
| 26 |
\def\DBKinditem#1#2{ |
| 27 |
#2 & #1 \tabularnewline |
| 28 |
\hline |
| 29 |
} |
| 30 |
|
| 31 |
\newenvironment{DBKindtable}{ |
| 32 |
\begin{tabular}{ |l|l| } |
| 33 |
\hline |
| 34 |
\emph{Collaborator} & \emph{Contribution} |
| 35 |
\hline |
| 36 |
}{ |
| 37 |
\end{tabular} |
| 38 |
} |
| 39 |
|
| 40 |
% |
| 41 |
% Latex <revhistory> table |
| 42 |
% |
| 43 |
\newenvironment{DBKrevtable}{ |
| 44 |
\begin{longtable}{ |l|l|l|l| } |
| 45 |
\hline |
| 46 |
Revision number & Date & Release Info & Author \tabularnewline |
| 47 |
\hline |
| 48 |
\endhead |
| 49 |
}{ |
| 50 |
\end{longtable} |
| 51 |
} |
| 52 |
|
| 53 |
% |
| 54 |
% <legalnotice> environment skip the information |
| 55 |
% |
| 56 |
\newenvironment{DBKlegalnotice}{ |
| 57 |
}{ |
| 58 |
} |
| 59 |
|
| 60 |
% |
| 61 |
% These floats must be defined to map <example> and <equation> |
| 62 |
% |
| 63 |
\usepackage{float} |
| 64 |
|
| 65 |
\floatstyle{ruled} |
| 66 |
\newfloat{example}{ht}{loe}[section] |
| 67 |
\floatname{example}{Example} |
| 68 |
|
| 69 |
\floatstyle{plain} |
| 70 |
\newfloat{dbequation}{ht}{loe}[section] |
| 71 |
\floatname{dbequation}{{\scshape Equation }} |
| 72 |
|
| 73 |
% |
| 74 |
% Nothing special for <note>, <caution>, <warning> |
| 75 |
% |
| 76 |
\newenvironment{DBKadmonition}[2] { |
| 77 |
}{ |
| 78 |
} |
| 79 |
|
| 80 |
% |
| 81 |
% <sidebar> environment |
| 82 |
% |
| 83 |
\newenvironment{sidebar}[1][]{ |
| 84 |
\hspace{0mm}\newline% |
| 85 |
\noindent\begin{Sbox}\begin{minipage}{\linewidth} |
| 86 |
}{ |
| 87 |
\end{minipage}\end{Sbox}\shadowbox{\TheSbox}% |
| 88 |
} |
| 89 |
|
| •90 |
% |
| 91 |
% Subtitle handling |
| 92 |
% |
| 93 |
\let\stdtitle=\title |
| 94 |
\def\title#1{ |
| 95 |
\def\DBKtitle{#1} |
| 96 |
\stdtitle{\bfseries #1% |
| 97 |
\ifthenelse{\equal{\DBKsubtitle}{}}{}{\\[12pt]\normalsize \DBKsubtitle}} |
| 98 |
} |