File: bdefinitions.sty

package info (click to toggle)
bacula-doc 15.0.3%2Bdebian1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 45,036 kB
  • sloc: perl: 908; makefile: 684; javascript: 182; sh: 67
file content (244 lines) | stat: -rw-r--r-- 8,517 bytes parent folder | download | duplicates (2)
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
\ProvidesPackage{bdefinitions}[2016/11/21]

\RequirePackage{minitoc}
\RequirePackage[left=4cm,right=3cm,bottom=2cm,top=2.5cm]{geometry}

\newlength\myTextWidth
\newlength\myXTextPosition
\newlength\myXBoxPosition
\newlength\myBoxWidth
\newlength\myTextSize
\setlength{\myBoxWidth}{2cm}
\setlength{\myTextSize}{\myBoxWidth*\ratio{6mm}{10mm}}

\def\bauthor{\@author}
\input{class-definitions}
%%
\input{color-definitions}
%%
%% The following color is used to emphasis the URL (in the most wide sense of the term) writing.
\colorlet{colorhref}{btextcolor}%%\definecolor{colorhref}{rgb}{0.451., 0., 0.}
%%

\def\bmacro#1#2#3#4{\texttt{$\backslash{}$#1}\{#2\}\{#3\}: #4}
\newcommand{\bcolorprotect}[1]{
  \def\text{#1}%
  \scancs{\result}{\text}%
  \StrDel[1]{\result}{ }[\result]%
  \textcolor{btextcolor}{\texttt{\result}}
}
\newcommand\bprotect[1]{%
\def\text{#1}%
\scancs{\result}{\text}%
\StrDel[1]{\result}{ }[\result]%
\texttt{\result}
}
\def\bdirectoryname#1{\textcolor{bdircolor}{\texttt{#1}}}
\def\bdirectory#1{\bdirectoryname{#1} directory}
\newcommand{\btool}[1]{\textcolor{btoolcolor}{\texttt{#1}}}
%
\newcommand{\bdirectivename}[1]{\textbf{#1}}
\newcommand{\bdirective}[1]{\bdirectivename{#1} directive}
\newcommand{\bresourcename}[1]{\texttt{#1}}
\newcommand{\bresource}[1]{\bresourcename{#1} resource}
\newcommand{\bresources}[1]{\bresourcename{#1} resources}
\newcommand{\bresourceq}[1]{\bresourcename{#1}'s resource}
\newcommand{\bcommandname}[1]{\textcolor{bcommandcolor}{\texttt{#1}}}
\newcommand{\bcommand}[1]{\bcommandname{#1} command}
\newcommand{\bbracket}[1]{\lt{}#1\gt{}}
\newcommand{\bvalue}[1]{\textcolor{bcommandcolor}{\dotuline{#1}}}
\newcommand{\bkeyword}[1]{\bvalue{#1}}
\newcommand{\bhighlight}[1]{\textcolor{btextcolor}{#1}}
\newcommand{\bheader}[1]{\textcolor{opposite}{\textbf{#1}}}
\newcommand{\bsubheader}[1]{\emph{#1}}
\newcommand{\bnextpage}{\small{\emph{Continues on the following page}}}
\newcommand{\bcontcaption}{\small{\emph{[]Cont.}}}
\newcommand{\babove}{$\geqslant$}
\newcommand{\bstar}{$\star$}
\newcommand{\byesorno}{\bbracket{yes\vb{}no}}
\newcommand{\bzeroone}{\bbracket{0\vb{}1}}
\newcommand{\btable}[1]{\texttt{#1}}
\newcommand{\bdefaultvalue}[1]{\textcolor{btextcolor}{#1}}
\newcommand{\bstructure}[1]{\texttt{#1} structure}
\newcommand{\bstructurename}[1]{\texttt{#1}}
\newcommand{\bfunction}[1]{\texttt{#1} function}
\newcommand{\bfunctionname}[1]{\texttt{#1}}
\newcommand{\bevent}[1]{\texttt{#1} event}
\newcommand{\beventname}[1]{\texttt{#1}}
\newcommand{\byear}{\the\year}
\newcommand{\bstatus}[1]{\emph{#1}}
\newcommand{\bpackage}[1]{\texttt{#1}}
\newcommand{\bvalueddirective}[2]{\bdirectivename{#1}=\bvalue{#2}}
\newcommand{\bjobtype}[1]{\bhighlight{#1}}
%%%
%%% Includes a graphic
%%% Parameters:
%%% #1: image filename, *without* *extension*
%%% #2: Caption
%%% #3: Label to use. Default is bimg-image_filename
%%%
%%% No orientation, just as it is provided.
\newcommand{\bimageN}[4][0.95\linewidth]{
  \begin{figure}[htpb]
    \begin{center}
      \includegraphics[width=#1]{#2}
      \caption{#3}\ifthenelse{\equal{#4}{}}{\label{bimg-#2}}{\label{#4}}
    \end{center}
  \end{figure}
}
%%%
%%% Horizontally, because the picture is in landscape by nature.
\newcommand{\bimageH}[4][0.95\linewidth]{
  \begin{figure}[htpb]
    \begin{center}
      \includegraphics[width=#1]{#2}
      \caption{#3}\ifthenelse{\equal{#4}{}}{\label{bimg-#2}}{\label{#4}}
    \end{center}
  \end{figure}
}
%%%
%%% Vertically, because the picture is in portrait by nature.
\newcommand{\bimageV}[4][0.95\linewidth]{
  \begin{figure}[htpb]
    \begin{center}
      \includegraphics[height=#1]{#2}
      \caption{#3}\ifthenelse{\equal{#4}{}}{\label{bimg-#2}}{\label{#4}}
    \end{center}
  \end{figure}
}
%%%
%%% Some definition to write always with the same layout:
%%%
%%% a filename
\def\bfilename#1{\textcolor{bfilecolor}{\path{#1}}}
%%% the name ``Bacula'' and others
\def\bacula{Bacula}
\def\bconsole{\bacula{} \textbf{Console}}
\def\bdirector{\bacula{} \textbf{Director}}
\newcommand{\bdate}{\the\year}
\newcommand{\btitlelogo}{\includegraphics[width=0.3\linewidth]{blogo}}

\input{edition}


%%% BAT has also an acronym
\def\bat{\acs{BAT}}
%%% The main manual name
\def\bmainman{\bacula{} \bedition{} Main manual}
%%% Console manual name
\def\bconsoleman{\bacula{} \bedition{} Console manual}
%%% Developers guide
\def\bdevelman{\bacula{} \bedition{} Developer's manual}
%%% Utility manual
\def\butilityman{\bacula{} \bedition{} Utility programs}
%%% Misc manual
\def\bmiscman{\bacula{} \bedition{} Miscellaneous Guide}
%%% Problems resolution guide
\def\bproblemman{\bacula{} \bedition{} Problems Resolution Guide}
%%
\def\bConsole{\bresourcename{Console}}
\def\bCatalog{\bresourcename{Catalog}}
\def\bJob{\bresourcename{Job}}
\def\bDirector{\bresourcename{Director}}
\def\bClient{\bresourcename{Client}}
\def\bPool{\bresourcename{Pool}}
\def\bconsolename{\bcommandname{bconsole}}
\def\bdirectorname{\texttt{Director}}
\def\bJobId{\bresourcename{JobId}}
\def\bVolume{\bresourcename{Volume}}
\def\bFileSet{\bresourcename{FileSet}}
\def\bStorage{\bresourcename{Storage}}
\def\bDevice{\bresourcename{Device}}
\newcommand{\bwebdoc}[1]{\label{#1}}
%%
%% Links
\newcommand*{\bvref}[1]{\vref{#1}}
\newcommand*{\bref}[2]{\href{#1}{\dotuline{#2}}}
\newcommand*{\bfootref}[2]{\href{#1}{\dotuline{#2}\footnote{\href{#1}{\dotuline{#1}}}}}
%% \newcommand*{\burl}[2]{\bref{#1}{\url{#2}}}%\href{#1}{\url{#2}}}
%%
%% Usage:
%%       - \bilink{text}{label}
%%       - \bulink{text}{URL}
\newcommand*{\bilink}[2]{\htmlref{\textcolor{colorhref}{\dotuline{#1}}}{#2}}
\def\bifootlink#1#2{\htmlref{\textcolor{colorhref}{\dotuline{#1}}\footnote{Cf. \vref{#2}}}{#2}}
\newcommand*{\bulink}[2]{\bref{#2}{#1}}
\newcommand*{\bufootlink}[2]{\bfootref{#2}{#1}}

%%
%% eXternal References macro: bxlink
%%% #1: Text to display
%%% #2: Label defined
%%% #3: manual: main, console, misc, developers
%%% #4: text as reference level. will be displayed ``as is''
%%%
%%% Example:
%%% \bxlink{Console Configuration}{ConsoleConfChapter}{main}{chapter}
%%% will display
%%% Console Configuration chapter (chapter 30 on page 269)
\newcommand*{\bxlink}[4]{\href{../#3/#3}{\textbf{#1}} #4 (#4 \ref{#3-#2} page \pageref{#3-#2})}
%%
%% Same for pointing to the document name only.
%% \bxdlink{Text}{label}{manual}{type-of-reference}
%% Will display
%% Text (chapter XX on page YY)
\newcommand*{\bxdlink}[4]{\href{../#3/#3}{\textbf{#1}} (#4 \ref{#3-#2} page \pageref{#3-#2})}


%%
%%
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcolumntype{R}{>{\raggedright\arraybackslash}X}
\newcolumntype{L}{>{\raggedleft\arraybackslash}X} %% This is probably the same then X

%% LaTeX GraphicPath directive is able to manage this.
%% manuals/_lang_/_manual_name/
\input{bgraphicpath}

\def\arraystretch{1.1}
\def\version{\input{version}}

\newcommand{\dq}{\verb+"+}
\newcommand{\vb}{$|$}
\newcommand{\lt}{$<$}
\newcommand{\gt}{$>$}
%%
%% Tools and names
\newcommand{\mysql}{\texttt{MySQL}}
\newcommand{\postgresql}{\texttt{PostgreSQL}}
\newcommand{\sqlite}[1][~]{\texttt{SQLite}#1}
\newcommand{\mtxchanger}{\btool{mtx-changer}}
\newcommand{\mtx}{\btool{mtx}}
\newcommand{\tar}{\btool{tar}}
\newcommand{\bru}{\btool{bru}}
\newcommand{\bdump}{\btool{dump}}
\newcommand{\mssql}{\texttt{MSSQL}}
\newcommand{\bweb}{BWeb}
\newcommand{\baculasystems}{Bacula Systems}
\newcommand{\oracle}{Oracle\texttrademark{}}

%% copied from /usr/share/texmf/tex/latex/base/book.cls, and
%%  modified to suit.  KEC 4-28-05
%% KEC: Removed the two-column arrangement, and added \newpage
\renewenvironment{theindex}
                 {\if@twocolumn
                   \@restonecolfalse
                   \else
                   \@restonecoltrue
                   \fi
                   %% KEC:  Switch to one column.
                   %%              \columnseprule \z@
                   %%              \columnsep 35\p@
                   %%              \twocolumn[\@makeschapterhead{\indexname}]%
                   \@mkboth{\MakeUppercase\indexname}%
                           {\MakeUppercase\indexname}%
                           \clearpage
                           \subsection*{\indexname}
                           \addcontentsline{toc}{subsection}{\indexname}
                           \thispagestyle{plain}\parindent\z@
                           \parskip\z@ \@plus .3\p@\relax
                           \let\item\@idxitem}
                 {\if@restonecol\onecolumn\else\clearpage\fi}   %% Is this needed???
%% 
\endinput
%%