~ubuntu-branches/ubuntu/wily/dblatex/wily

« back to all changes in this revision

Viewing changes to latex/contrib/db2latex/db2latex.sty

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Hoenen
  • Date: 2008-08-11 20:28:56 UTC
  • mfrom: (4.1.7 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080811202856-d2qjg24ut53mgufx
Tags: 0.2.9-3
* Improve CJK (Chinese/Japanese/Korean) support:
  + Let XSL configuration parameter cjk.font default to gkai (instead of the
    cyberbit font not included in Debian).
  + Add Suggests dependency on latex-cjk-all for the gkai fonts.
  + Fix the db2latex style not to collide with the CJKutf8.sty file.
  Thanks to W. Martin Borgert for reporting and hints.
  Closes: #482857, #492350
* Fix a name clash with TeXLive for spanish documents in native style.
  Thanks to W. Martin Borgert for reporting.  Closes: #492304
* Support underscore characters in xreflabel attributes.  Thanks to
  Sébastien Villemot for reporting.  Closes: #492959

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
% The defined options
8
8
\DeclareOption{hyperlink}{ \def\DBKhyperlink{yes} }
9
9
\DeclareOption{nohyperlink}{ \def\DBKhyperlink{no} }
10
 
\DeclareOption{article}{ \def\DBKisarticle{yes} }
11
 
\DeclareOption{report}{ \def\DBKisarticle{no} }
12
10
 
13
11
% Default values
14
 
\ExecuteOptions{nohyperlink,report}
 
12
\ExecuteOptions{nohyperlink}
15
13
 
16
14
% If defined, process the options
17
15
\ProcessOptions\relax
19
17
% Needed packages
20
18
\usepackage{ifthen}
21
19
\usepackage{float}       
 
20
\usepackage{footmisc} 
22
21
 
23
22
\newcommand{\DBKreleaseinfo}{Working Paper}
24
23
 
31
30
\usepackage{dbk_verbatim}
32
31
\usepackage{dbk_callout}
33
32
\usepackage{dbk_locale}
 
33
\usepackage{dbk_annot}
34
34
 
35
35
% LaTeX <othercredit> commands to define
36
36
%
76
76
\newcommand{\DBKlegaltitle}{}
77
77
\newcommand{\DBKcopyright}{}
78
78
 
 
79
% Display ``DRAFT'' as a water mark:
 
80
\usepackage{ifpdf}
 
81
\ifpdf
 
82
\usepackage{pdfpages}
 
83
\usepackage{color}
 
84
\def\showwatermark#1{%
 
85
  \AddToShipoutPicture{
 
86
  \AtTextCenter{%
 
87
  \makebox(0,0)[c]{\resizebox{\textwidth}{!}{%
 
88
  \rotatebox{45}{\textsf{\textbf{\color[gray]{0.8}#1}}}}}%
 
89
  }}
 
90
}
 
91
\else
 
92
\def\showwatermark#1{}%
 
93
\fi
79
94
 
80
95
% --------------------------
81
96
% Title and Bookinfo display
90
105
\let\stdauthor=\author
91
106
\def\author#1{
92
107
  \def\DBKauthor{#1}
93
 
  \stdauthor{#1}%
 
108
  \stdauthor{\begin{minipage}{10cm}\centering #1\end{minipage}}%
94
109
}
95
110
 
96
111
\let\stdmaketitle=\maketitle
98
113
  \stdmaketitle
99
114
  \noindent
100
115
  \textbf{\DBKtitle \\}
101
 
  \ifthenelse{\equal{\DBKauthor}{}}{}{by \DBKauthor \\}
 
116
  \ifx\DBKauthor\empty\else{by \DBKauthor \\}\fi
102
117
  \hspace{0pt}\\
103
118
  \ifthenelse{\equal{\DBKedition}{}}{}{Edition \DBKedition \\}
104
119
  \ifthenelse{\equal{\DBKpubdate}{}}{}{Published \DBKpubdate \\}
124
139
% --------------------------------------------
125
140
% Check for PDFLaTeX/LaTeX 
126
141
% --------------------------------------------
127
 
\usepackage{ifpdf}
128
142
\usepackage{anysize}
129
143
\marginsize{3cm}{2cm}{1.25cm}{1.25cm}
130
144
 
157
171
}{\typeout{WARNING: truncate.sty wasn't available and functionality was skipped.}}
158
172
\pagestyle{fancy}
159
173
 
 
174
% Define front/main/back matter if not available
 
175
\makeatletter
 
176
\@ifundefined{frontmatter}{
 
177
  \def\frontmatter{\cleardoublepage\pagenumbering{roman}}
 
178
}{}
 
179
\@ifundefined{mainmatter}{
 
180
  \def\mainmatter{\cleardoublepage\pagenumbering{arabic}}
 
181
}{}
 
182
\@ifundefined{backmatter}{
 
183
  \def\backmatter{\if@openright\cleardoublepage\else\clearpage\fi}
 
184
}{}
 
185
\makeatother
 
186
 
160
187
% ---------------------- 
161
188
% Most Common Packages   
162
189
% ---------------------- 
182
209
% --------------------------------------------
183
210
% Math support                                
184
211
% --------------------------------------------
185
 
\usepackage{amsmath,amsthm,amsfonts,amssymb,amsxtra,amsopn}
186
 
 \newcommand{\bysame}{\mbox{\rule{3em}{.4pt}}\,}
187
 
 \newcommand{\A}{\mathcal{A}}
188
 
 \newcommand{\B}{\mathcal{B}}
189
 
 \newcommand{\XcY}{{(X,Y)}}
190
 
 \newcommand{\SX}{{S_X}}
191
 
 \newcommand{\SY}{{S_Y}}
192
 
 \newcommand{\SXY}{{S_{X,Y}}}
193
 
 \newcommand{\SXgYy}{{S_{X|Y}(y)}}
194
 
 \newcommand{\Cw}[1]{{\hat C_#1(X|Y)}}
195
 
 \newcommand{\G}{{G(X|Y)}}
196
 
 \newcommand{\PY}{{P_{\mathcal{Y}}}}
197
 
 \newcommand{\X}{\mathcal{X}}
198
 
 \newcommand{\wt}{\widetilde}
199
 
 \newcommand{\wh}{\widehat}
200
 
 % --------------------------------------------
201
 
 %\DeclareMathOperator{\per}{per}
202
 
 \DeclareMathOperator{\cov}{cov}
203
 
 \DeclareMathOperator{\non}{non}
204
 
 \DeclareMathOperator{\cf}{cf}
205
 
 \DeclareMathOperator{\add}{add}
206
 
 \DeclareMathOperator{\Cham}{Cham}
207
 
 \DeclareMathOperator{\IM}{Im}
208
 
 \DeclareMathOperator{\esssup}{ess\,sup}
209
 
 \DeclareMathOperator{\meas}{meas}
210
 
 \DeclareMathOperator{\seg}{seg}
 
212
%\usepackage{amsmath,amsthm,amsfonts,amssymb,amsxtra,amsopn}
 
213
\usepackage{amsmath,amsthm,amsfonts,amsxtra,amsopn}
 
214
 
 
215
% --------------------------------------------
 
216
\DeclareMathOperator{\per}{per}
 
217
\DeclareMathOperator{\cov}{cov}
 
218
\DeclareMathOperator{\non}{non}
 
219
\DeclareMathOperator{\cf}{cf}
 
220
\DeclareMathOperator{\add}{add}
 
221
\DeclareMathOperator{\Cham}{Cham}
 
222
\DeclareMathOperator{\IM}{Im}
 
223
\DeclareMathOperator{\esssup}{ess\,sup}
211
224
 
212
225
% ---------------
213
226
% Document Font  
214
227
% ---------------
 
228
\ifxetex\else
215
229
\usepackage{palatino}
 
230
\fi
216
231
 
217
232
% ----------------------------------------------
218
233
% Define a new LaTeX environment (adminipage)
316
331
  \floatname{algorithm}{Algorithm}
317
332
}
318
333
\makeatother
319
 
\ifpdf
320
 
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
321
 
\else
322
 
\DeclareGraphicsExtensions{.eps}
323
 
\fi
324
334
 
325
335
% --------------------------------------------
326
336
% $latex.caption.swapskip enabled for $formal.title.placement support