Debian Codegraph @

spec/src/main/doc/custom-asciidoc-dblatex.sty

raw
1 %%
2 %% This style is derived from the docbook one.
3 %%
4 \NeedsTeXFormat{LaTeX2e}
5 \ProvidesPackage{asciidoc}[2008/06/05 AsciiDoc DocBook Style]
6 %% Just use the original package and pass the options.
7 \RequirePackageWithOptions{docbook}
8
9 % Sidebar is a boxed minipage that can contain verbatim.
10 % Changed shadow box to double box.
11 \renewenvironment{sidebar}[1][0.95\textwidth]{
12 \hspace{0mm}\newline%
13 \noindent\begin{Sbox}\begin{minipage}{#1}%
14 \setlength\parskip{\medskipamount}%
15 }{
16 \end{minipage}\end{Sbox}\doublebox{\TheSbox}%
17 }
18
19 % For DocBook literallayout elements, see `./dblatex/dblatex-readme.txt`.
20 \usepackage{alltt}
21
22 % Numbered bookmarks
23 \usepackage{bookmark}
24 \bookmarksetup{
25 numbered,
26 }
27
28 % Set custom colors
29 \definecolor{code}{gray}{0}
30 \definecolor{canvas}{gray}{0.96}
31 \definecolor{comment}{rgb}{0, 0.456, 0}
32 \definecolor{keyword}{rgb}{0.5, 0, 0.5}
33
34 % JavaScript is not part of the listings package...
35 % but thankfully this page shows how to add it:
36 % http://lenaherrmann.net/2010/05/20/javascript-syntax-highlighting-in-the-latex-listings-package
37
38 \lstdefinelanguage{javascript}{
39 keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, for, in, while, do, else, case, break},
40 ndkeywords={class, export, boolean, throw, implements, import, this},
41 sensitive=false,
42 comment=[l]{//},
43 morecomment=[s][\color{blue}\ttfamily]{/*}{*/},
44 morestring=[b]',
45 morestring=[b]"
46 }
47
48 % Parameters for formatting code (affects all code listings)
49 \lstset{
50 backgroundcolor=\color{canvas},
51 basicstyle=\ttfamily\small\color{code},
52 commentstyle=\color{comment},
53 identifierstyle=\color{black},
54 keywordstyle=\color{keyword}\bfseries,
55 ndkeywordstyle=\color{keyword}\bfseries,
56 stringstyle=\color{blue}\ttfamily
57 }