asciidoctor-pdf 1.5.0.alpha.6 → 1.5.0.alpha.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +62 -42
- data/bin/asciidoctor-pdf +3 -2
- data/data/fonts/{LICENSE-noto-fonts-2014-01-30 → LICENSE-noto-fonts-2014-11-17} +0 -0
- data/data/fonts/mplus1mn-bold-ascii.ttf +0 -0
- data/data/fonts/mplus1mn-bolditalic-ascii.ttf +0 -0
- data/data/fonts/mplus1mn-italic-ascii.ttf +0 -0
- data/data/fonts/mplus1mn-regular-ascii-conums.ttf +0 -0
- data/data/fonts/notoserif-bold-latin.ttf +0 -0
- data/data/fonts/notoserif-bolditalic-latin.ttf +0 -0
- data/data/fonts/notoserif-italic-latin.ttf +0 -0
- data/data/fonts/notoserif-regular-latin.ttf +0 -0
- data/data/themes/default-theme.yml +95 -43
- data/docs/theming-guide.adoc +1344 -0
- data/lib/asciidoctor-pdf/asciidoctor_ext.rb +2 -0
- data/lib/asciidoctor-pdf/asciidoctor_ext/list.rb +9 -0
- data/lib/asciidoctor-pdf/asciidoctor_ext/list_item.rb +16 -0
- data/lib/asciidoctor-pdf/converter.rb +982 -294
- data/lib/asciidoctor-pdf/core_ext/array.rb +1 -1
- data/lib/asciidoctor-pdf/core_ext/ostruct.rb +2 -2
- data/lib/asciidoctor-pdf/pdf_core_ext.rb +2 -0
- data/lib/asciidoctor-pdf/pdf_core_ext/pdf_object.rb +25 -0
- data/lib/asciidoctor-pdf/pdfmarks.rb +9 -5
- data/lib/asciidoctor-pdf/prawn_ext.rb +1 -0
- data/lib/asciidoctor-pdf/prawn_ext/coderay_encoder.rb +8 -8
- data/lib/asciidoctor-pdf/prawn_ext/extensions.rb +56 -14
- data/lib/asciidoctor-pdf/prawn_ext/formatted_text/transform.rb +52 -10
- data/lib/asciidoctor-pdf/prawn_ext/images.rb +22 -0
- data/lib/asciidoctor-pdf/sanitizer.rb +37 -0
- data/lib/asciidoctor-pdf/theme_loader.rb +130 -30
- data/lib/asciidoctor-pdf/version.rb +1 -1
- metadata +41 -23
- data/data/fonts/LICENSE-liberation-fonts-2.00.1 +0 -102
- data/data/fonts/liberationmono-bold-latin.ttf +0 -0
- data/data/fonts/liberationmono-bolditalic-latin.ttf +0 -0
- data/data/fonts/liberationmono-italic-latin.ttf +0 -0
- data/data/fonts/liberationmono-regular-latin.ttf +0 -0
- data/data/fonts/mplus1p-bold-latin.ttf +0 -0
- data/data/fonts/mplus1p-light-latin.ttf +0 -0
- data/data/fonts/mplus1p-regular-latin.ttf +0 -0
- data/data/themes/asciidoctor-theme.yml +0 -174
- data/examples/chronicles.adoc +0 -429
- data/examples/chronicles.pdf +0 -0
- data/examples/edge-cases.adoc +0 -60
- data/examples/example-pdf-screenshot.png +0 -0
- data/examples/example.adoc +0 -27
- data/examples/example.pdf +0 -0
- data/examples/sample-title-logo.jpg +0 -0
- data/examples/wolpertinger.jpg +0 -0
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-pdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.0.alpha.
|
4
|
+
version: 1.5.0.alpha.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Allen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-05-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -87,14 +87,42 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - '='
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 0.
|
90
|
+
version: 0.18.0
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - '='
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 0.
|
97
|
+
version: 0.18.0
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: prawn-icon
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - '='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 0.6.4
|
105
|
+
type: :runtime
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - '='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 0.6.4
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: safe_yaml
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - '='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 1.0.4
|
119
|
+
type: :runtime
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - '='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 1.0.4
|
98
126
|
- !ruby/object:Gem::Dependency
|
99
127
|
name: thread_safe
|
100
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,42 +168,30 @@ files:
|
|
140
168
|
- Rakefile
|
141
169
|
- bin/asciidoctor-pdf
|
142
170
|
- bin/optimize-pdf
|
143
|
-
- data/fonts/LICENSE-liberation-fonts-2.00.1
|
144
171
|
- data/fonts/LICENSE-mplus-testflight-58
|
145
|
-
- data/fonts/LICENSE-noto-fonts-2014-
|
146
|
-
- data/fonts/liberationmono-bold-latin.ttf
|
147
|
-
- data/fonts/liberationmono-bolditalic-latin.ttf
|
148
|
-
- data/fonts/liberationmono-italic-latin.ttf
|
149
|
-
- data/fonts/liberationmono-regular-latin.ttf
|
172
|
+
- data/fonts/LICENSE-noto-fonts-2014-11-17
|
150
173
|
- data/fonts/mplus1mn-bold-ascii.ttf
|
151
174
|
- data/fonts/mplus1mn-bolditalic-ascii.ttf
|
152
175
|
- data/fonts/mplus1mn-italic-ascii.ttf
|
153
176
|
- data/fonts/mplus1mn-regular-ascii-conums.ttf
|
154
|
-
- data/fonts/mplus1p-bold-latin.ttf
|
155
|
-
- data/fonts/mplus1p-light-latin.ttf
|
156
|
-
- data/fonts/mplus1p-regular-latin.ttf
|
157
177
|
- data/fonts/mplus1p-regular-multilingual.ttf
|
158
178
|
- data/fonts/notoserif-bold-latin.ttf
|
159
179
|
- data/fonts/notoserif-bolditalic-latin.ttf
|
160
180
|
- data/fonts/notoserif-italic-latin.ttf
|
161
181
|
- data/fonts/notoserif-regular-latin.ttf
|
162
|
-
- data/themes/asciidoctor-theme.yml
|
163
182
|
- data/themes/default-theme.yml
|
164
|
-
-
|
165
|
-
- examples/chronicles.pdf
|
166
|
-
- examples/edge-cases.adoc
|
167
|
-
- examples/example-pdf-screenshot.png
|
168
|
-
- examples/example.adoc
|
169
|
-
- examples/example.pdf
|
170
|
-
- examples/sample-title-logo.jpg
|
171
|
-
- examples/wolpertinger.jpg
|
183
|
+
- docs/theming-guide.adoc
|
172
184
|
- lib/asciidoctor-pdf.rb
|
173
185
|
- lib/asciidoctor-pdf/asciidoctor_ext.rb
|
186
|
+
- lib/asciidoctor-pdf/asciidoctor_ext/list.rb
|
187
|
+
- lib/asciidoctor-pdf/asciidoctor_ext/list_item.rb
|
174
188
|
- lib/asciidoctor-pdf/asciidoctor_ext/section.rb
|
175
189
|
- lib/asciidoctor-pdf/converter.rb
|
176
190
|
- lib/asciidoctor-pdf/core_ext/array.rb
|
177
191
|
- lib/asciidoctor-pdf/core_ext/ostruct.rb
|
178
192
|
- lib/asciidoctor-pdf/implicit_header_processor.rb
|
193
|
+
- lib/asciidoctor-pdf/pdf_core_ext.rb
|
194
|
+
- lib/asciidoctor-pdf/pdf_core_ext/pdf_object.rb
|
179
195
|
- lib/asciidoctor-pdf/pdfmarks.rb
|
180
196
|
- lib/asciidoctor-pdf/prawn_ext.rb
|
181
197
|
- lib/asciidoctor-pdf/prawn_ext/coderay_encoder.rb
|
@@ -184,7 +200,9 @@ files:
|
|
184
200
|
- lib/asciidoctor-pdf/prawn_ext/formatted_text/parser.rb
|
185
201
|
- lib/asciidoctor-pdf/prawn_ext/formatted_text/parser.treetop
|
186
202
|
- lib/asciidoctor-pdf/prawn_ext/formatted_text/transform.rb
|
203
|
+
- lib/asciidoctor-pdf/prawn_ext/images.rb
|
187
204
|
- lib/asciidoctor-pdf/roman_numeral.rb
|
205
|
+
- lib/asciidoctor-pdf/sanitizer.rb
|
188
206
|
- lib/asciidoctor-pdf/theme_loader.rb
|
189
207
|
- lib/asciidoctor-pdf/version.rb
|
190
208
|
homepage: https://github.com/asciidoctor/asciidoctor-pdf
|
@@ -208,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
226
|
version: 1.3.1
|
209
227
|
requirements: []
|
210
228
|
rubyforge_project:
|
211
|
-
rubygems_version: 2.4.
|
229
|
+
rubygems_version: 2.4.6
|
212
230
|
signing_key:
|
213
231
|
specification_version: 4
|
214
232
|
summary: Converts AsciiDoc documents to PDF using Prawn
|
@@ -1,102 +0,0 @@
|
|
1
|
-
Digitized data copyright (c) 2010 Google Corporation
|
2
|
-
with Reserved Font Arimo, Tinos and Cousine.
|
3
|
-
Copyright (c) 2012 Red Hat, Inc.
|
4
|
-
with Reserved Font Name Liberation.
|
5
|
-
|
6
|
-
This Font Software is licensed under the SIL Open Font License,
|
7
|
-
Version 1.1.
|
8
|
-
|
9
|
-
This license is copied below, and is also available with a FAQ at:
|
10
|
-
http://scripts.sil.org/OFL
|
11
|
-
|
12
|
-
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
13
|
-
|
14
|
-
PREAMBLE The goals of the Open Font License (OFL) are to stimulate
|
15
|
-
worldwide development of collaborative font projects, to support the font
|
16
|
-
creation efforts of academic and linguistic communities, and to provide
|
17
|
-
a free and open framework in which fonts may be shared and improved in
|
18
|
-
partnership with others.
|
19
|
-
|
20
|
-
The OFL allows the licensed fonts to be used, studied, modified and
|
21
|
-
redistributed freely as long as they are not sold by themselves.
|
22
|
-
The fonts, including any derivative works, can be bundled, embedded,
|
23
|
-
redistributed and/or sold with any software provided that any reserved
|
24
|
-
names are not used by derivative works. The fonts and derivatives,
|
25
|
-
however, cannot be released under any other type of license. The
|
26
|
-
requirement for fonts to remain under this license does not apply to
|
27
|
-
any document created using the fonts or their derivatives.
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
DEFINITIONS
|
32
|
-
"Font Software" refers to the set of files released by the Copyright
|
33
|
-
Holder(s) under this license and clearly marked as such.
|
34
|
-
This may include source files, build scripts and documentation.
|
35
|
-
|
36
|
-
"Reserved Font Name" refers to any names specified as such after the
|
37
|
-
copyright statement(s).
|
38
|
-
|
39
|
-
"Original Version" refers to the collection of Font Software components
|
40
|
-
as distributed by the Copyright Holder(s).
|
41
|
-
|
42
|
-
"Modified Version" refers to any derivative made by adding to, deleting,
|
43
|
-
or substituting ? in part or in whole ?
|
44
|
-
any of the components of the Original Version, by changing formats or
|
45
|
-
by porting the Font Software to a new environment.
|
46
|
-
|
47
|
-
"Author" refers to any designer, engineer, programmer, technical writer
|
48
|
-
or other person who contributed to the Font Software.
|
49
|
-
|
50
|
-
|
51
|
-
PERMISSION & CONDITIONS
|
52
|
-
|
53
|
-
Permission is hereby granted, free of charge, to any person obtaining a
|
54
|
-
copy of the Font Software, to use, study, copy, merge, embed, modify,
|
55
|
-
redistribute, and sell modified and unmodified copies of the Font
|
56
|
-
Software, subject to the following conditions:
|
57
|
-
|
58
|
-
1) Neither the Font Software nor any of its individual components,in
|
59
|
-
Original or Modified Versions, may be sold by itself.
|
60
|
-
|
61
|
-
2) Original or Modified Versions of the Font Software may be bundled,
|
62
|
-
redistributed and/or sold with any software, provided that each copy
|
63
|
-
contains the above copyright notice and this license. These can be
|
64
|
-
included either as stand-alone text files, human-readable headers or
|
65
|
-
in the appropriate machine-readable metadata fields within text or
|
66
|
-
binary files as long as those fields can be easily viewed by the user.
|
67
|
-
|
68
|
-
3) No Modified Version of the Font Software may use the Reserved Font
|
69
|
-
Name(s) unless explicit written permission is granted by the
|
70
|
-
corresponding Copyright Holder. This restriction only applies to the
|
71
|
-
primary font name as presented to the users.
|
72
|
-
|
73
|
-
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
74
|
-
Software shall not be used to promote, endorse or advertise any
|
75
|
-
Modified Version, except to acknowledge the contribution(s) of the
|
76
|
-
Copyright Holder(s) and the Author(s) or with their explicit written
|
77
|
-
permission.
|
78
|
-
|
79
|
-
5) The Font Software, modified or unmodified, in part or in whole, must
|
80
|
-
be distributed entirely under this license, and must not be distributed
|
81
|
-
under any other license. The requirement for fonts to remain under
|
82
|
-
this license does not apply to any document created using the Font
|
83
|
-
Software.
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
TERMINATION
|
88
|
-
This license becomes null and void if any of the above conditions are not met.
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
DISCLAIMER
|
93
|
-
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
94
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
95
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
96
|
-
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
97
|
-
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
98
|
-
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
99
|
-
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
100
|
-
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
|
101
|
-
DEALINGS IN THE FONT SOFTWARE.
|
102
|
-
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,174 +0,0 @@
|
|
1
|
-
font:
|
2
|
-
catalog:
|
3
|
-
NotoSerif:
|
4
|
-
normal: notoserif-regular-latin.ttf
|
5
|
-
bold: notoserif-bold-latin.ttf
|
6
|
-
italic: notoserif-italic-latin.ttf
|
7
|
-
bold_italic: notoserif-bolditalic-latin.ttf
|
8
|
-
# NOTE currently, callout numbers don't work with LiberationMono
|
9
|
-
LiberationMono:
|
10
|
-
normal: liberationmono-regular-latin.ttf
|
11
|
-
bold: liberationmono-bold-latin.ttf
|
12
|
-
italic: liberationmono-italic-latin.ttf
|
13
|
-
bold_italic: liberationmono-bolditalic-latin.ttf
|
14
|
-
Mplus1mn:
|
15
|
-
normal: mplus1mn-regular-ascii-conums.ttf
|
16
|
-
bold: mplus1mn-bold-ascii.ttf
|
17
|
-
italic: mplus1mn-italic-ascii.ttf
|
18
|
-
bold_italic: mplus1mn-bolditalic-ascii.ttf
|
19
|
-
#Mplus1pMultilingual:
|
20
|
-
# normal: mplus1p-regular-multilingual.ttf
|
21
|
-
#FontAwesome:
|
22
|
-
# normal: fontawesome-regular.ttf
|
23
|
-
# FIXME using fallbacks breaks use of custom font styles (fixed in Prawn 1.2.1!)
|
24
|
-
#fallbacks:
|
25
|
-
# - Mplus1pMultilingual
|
26
|
-
brand:
|
27
|
-
primary_color: 005498
|
28
|
-
page:
|
29
|
-
background_color: FFFFFF
|
30
|
-
layout: portrait
|
31
|
-
# multiply inches by 72 to get pt values
|
32
|
-
margin: [0.5 * 72, 0.67 * 72, 0.67 * 72, 0.67 * 72]
|
33
|
-
size: Letter
|
34
|
-
base:
|
35
|
-
font_color: 222222
|
36
|
-
font_family: NotoSerif
|
37
|
-
# choose one of these font_size/line_height_length combinations
|
38
|
-
#font_size: 14
|
39
|
-
#line_height_length: 20
|
40
|
-
#font_size: 11.25
|
41
|
-
#line_height_length: 18
|
42
|
-
#font_size: 11.2
|
43
|
-
#line_height_length: 16
|
44
|
-
font_size: 10.5
|
45
|
-
#line_height_length: 15
|
46
|
-
# correct line height for NotoSerif metrics
|
47
|
-
line_height_length: 12
|
48
|
-
#font_size: 11.25
|
49
|
-
#line_height_length: 18
|
50
|
-
line_height: $base_line_height_length / $base_font_size
|
51
|
-
font_size_large: round($base_font_size * 1.25)
|
52
|
-
font_size_small: round($base_font_size * 0.85)
|
53
|
-
font_style: normal
|
54
|
-
align: justify
|
55
|
-
border_radius: 4
|
56
|
-
border_width: 0.5
|
57
|
-
border_color: DDDDDD
|
58
|
-
# FIXME vertical_rhythm is weird; we should think in terms of ems
|
59
|
-
#vertical_rhythm: $base_line_height_length * 2 / 3
|
60
|
-
# correct line height for NotoSerif metrics
|
61
|
-
vertical_rhythm: $base_line_height_length
|
62
|
-
horizontal_rhythm: $base_line_height_length
|
63
|
-
link_font_color: $brand_primary_color
|
64
|
-
heading:
|
65
|
-
font_color: BA3925
|
66
|
-
font_family: $base_font_family
|
67
|
-
font_size_h1: floor($base_font_size * 2.6)
|
68
|
-
font_size_h2: floor($base_font_size * 2.15)
|
69
|
-
font_size_h3: round($base_font_size * 1.7)
|
70
|
-
font_size_h4: $base_font_size_large
|
71
|
-
font_size_h5: $base_font_size
|
72
|
-
font_size_h6: $base_font_size_small
|
73
|
-
font_style: bold
|
74
|
-
#line_height: 1.4
|
75
|
-
# correct line height for NotoSerif metrics
|
76
|
-
line_height: 1.2
|
77
|
-
margin_top: $vertical_rhythm * 0.2
|
78
|
-
margin_bottom: $vertical_rhythm * 0.8
|
79
|
-
#prose:
|
80
|
-
# margin_top: 0
|
81
|
-
# margin_bottom: $vertical_rhythm
|
82
|
-
block:
|
83
|
-
#margin_top: 0
|
84
|
-
#margin_bottom: $vertical_rhythm
|
85
|
-
padding: [$vertical_rhythm, $vertical_rhythm * 1.25, $vertical_rhythm, $vertical_rhythm * 1.25]
|
86
|
-
# code is used for source blocks (perhaps change to source or listing?)
|
87
|
-
code:
|
88
|
-
font_color: $base_font_color
|
89
|
-
#font_family: LiberationMono
|
90
|
-
#font_size: floor($base_font_size * 0.9)
|
91
|
-
font_family: Mplus1mn
|
92
|
-
font_size: ceil($base_font_size)
|
93
|
-
#padding: [$base_font_size, $code_font_size, $base_font_size, $code_font_size]
|
94
|
-
padding: $code_font_size
|
95
|
-
line_height: 1.25
|
96
|
-
background_color: F7F7F8
|
97
|
-
border_color: FFFFFF
|
98
|
-
border_radius: $base_border_radius
|
99
|
-
border_width: 0
|
100
|
-
# literal is currently used for inline monospaced in prose and table cells
|
101
|
-
literal:
|
102
|
-
#font_family: $code_font_family
|
103
|
-
font_family: LiberationMono
|
104
|
-
font_color: 6D180B
|
105
|
-
blockquote:
|
106
|
-
font_color: 6F6F6F
|
107
|
-
font_size: $base_font_size_large
|
108
|
-
border_width: 3
|
109
|
-
border_color: $base_border_color
|
110
|
-
cite_font_size: $base_font_size_small
|
111
|
-
cite_font_color: 555555
|
112
|
-
sidebar:
|
113
|
-
border_color: D9D9D9
|
114
|
-
border_radius: $base_border_radius
|
115
|
-
border_width: $base_border_width
|
116
|
-
background_color: F2F2F2
|
117
|
-
title_font_color: 7A2518
|
118
|
-
title_font_family: $heading_font_family
|
119
|
-
title_font_size: $heading_font_size_h4
|
120
|
-
title_font_style: normal
|
121
|
-
title_align: left
|
122
|
-
example:
|
123
|
-
border_color: E6E6E6
|
124
|
-
border_radius: $base_border_radius
|
125
|
-
border_width: 0.75
|
126
|
-
background_color: transparent
|
127
|
-
admonition:
|
128
|
-
border_color: $base_border_color
|
129
|
-
border_width: $base_border_width
|
130
|
-
caption:
|
131
|
-
font_color: 7A2518
|
132
|
-
font_style: bold
|
133
|
-
align: left
|
134
|
-
margin_inside: $vertical_rhythm * 0.25
|
135
|
-
margin_outside: 0
|
136
|
-
conum:
|
137
|
-
font_family: Mplus1mn
|
138
|
-
font_color: $literal_font_color
|
139
|
-
font_size: $code_font_size
|
140
|
-
image:
|
141
|
-
align_default: left
|
142
|
-
scaled_width_default: 0.5
|
143
|
-
lead:
|
144
|
-
# QUESTION what about $base_font_size_large?
|
145
|
-
#font_size: floor($base_line_height_length * 0.8)
|
146
|
-
font_size: $base_font_size_large
|
147
|
-
line_height: 1.4
|
148
|
-
abstract:
|
149
|
-
font_size: $lead_font_size
|
150
|
-
font_color: 999999
|
151
|
-
#line_height: $lead_line_height
|
152
|
-
# HACK set line_height to 1 to workaround spacing problem after first line
|
153
|
-
line_height: 1
|
154
|
-
font_style: italic
|
155
|
-
thematic_break:
|
156
|
-
border_color: $base_border_color
|
157
|
-
margin_top: $vertical_rhythm * 0.5
|
158
|
-
margin_bottom: $vertical_rhythm * 1.5
|
159
|
-
description_list:
|
160
|
-
term_font_style: bold
|
161
|
-
description_indent: $horizontal_rhythm * 1.25
|
162
|
-
outline_list:
|
163
|
-
indent: $horizontal_rhythm * 1.25
|
164
|
-
table:
|
165
|
-
background_color: transparent
|
166
|
-
background_color_alt: F9F9F9
|
167
|
-
border_color: DDDDDD
|
168
|
-
border_width: $base_border_width
|
169
|
-
# HACK accounting for line-height
|
170
|
-
cell_padding: [3, 3, 6, 3]
|
171
|
-
footer:
|
172
|
-
font_size: $base_font_size_small
|
173
|
-
font_color: $base_font_color
|
174
|
-
border_color: DDDDDD
|
data/examples/chronicles.adoc
DELETED
@@ -1,429 +0,0 @@
|
|
1
|
-
= The Dangerous and Thrilling Documentation Chronicles
|
2
|
-
Kismet Chameleon; Lazarus het_Draeke
|
3
|
-
v1.0, 2014-01-01: The first incarnation of {doctitle}
|
4
|
-
:description: This story chronicles the inexplicable hazards and vicious beasts a +
|
5
|
-
team must surmount and vanquish on the journey to finding their open source +
|
6
|
-
project's true power.
|
7
|
-
:doctype: book
|
8
|
-
:title-logo: sample-title-logo.jpg
|
9
|
-
// Settings:
|
10
|
-
:compat-mode:
|
11
|
-
:experimental:
|
12
|
-
:icons: font
|
13
|
-
:listing-caption: Listing
|
14
|
-
:sectnums:
|
15
|
-
:toc:
|
16
|
-
:toclevels: 3
|
17
|
-
ifdef::backend-pdf[]
|
18
|
-
:pagenums:
|
19
|
-
:pygments-style: bw
|
20
|
-
:source-highlighter: pygments
|
21
|
-
endif::[]
|
22
|
-
// URIs:
|
23
|
-
:wolper-uri: http://en.wikipedia.org/wiki/Wolpertinger
|
24
|
-
|
25
|
-
[abstract]
|
26
|
-
{description}
|
27
|
-
|
28
|
-
== It's a City Under Siege
|
29
|
-
|
30
|
-
This journey begins one late Monday afternoon at http://www.devoxx.be/#/[Devoxx].
|
31
|
-
Our team needs coffee, _desperately_, but none of us dare open the theater doors...
|
32
|
-
|
33
|
-
During the first workshop, a script-happy warlock inadvertently released a legion of Wolpertingers!
|
34
|
-
To leave now would mean *code dismemberment and certain death*.
|
35
|
-
|
36
|
-
Behold, the horror!
|
37
|
-
|
38
|
-
.Wolpertinger, stuffed
|
39
|
-
[.left.thumb]
|
40
|
-
image::wolpertinger.jpg[Wolpertinger,width=100%,scaledwidth=55%,link=http://en.wikipedia.org/wiki/Wolpertinger]
|
41
|
-
|
42
|
-
You may not be familiar with these {wolper-uri}[ravenous beasts].
|
43
|
-
Trust us, they'll eat your shorts and suck loops from your code.
|
44
|
-
In light of this danger, we've searched high and wide for the security crew's defensive operations manual.
|
45
|
-
We can't find it and the DefOps{empty}footnote:[a portmanteau of “defensive” and “operations”] werewolves haven't returned from their rendezvous at Bier Central.
|
46
|
-
They've either eaten each other or fallen victim to the Wolpertingers roaming the streets of Antwerp.
|
47
|
-
Quick, hit kbd:[Ctrl,Alt,Backspace] or select menu:File[Quit] and let's bail out of here!
|
48
|
-
|
49
|
-
WARNING: Working with werewolves leads to howling and trying to train aggressive regular expressions with Pavlovian reinforcement.
|
50
|
-
|
51
|
-
_Weak light from the hallway trickled across the theater, chased by a distant scream._
|
52
|
-
|
53
|
-
=== Rendezvous Point
|
54
|
-
|
55
|
-
Come on, _Bier Central_.
|
56
|
-
Did you have to ask?
|
57
|
-
If you beat me there, I'll take a http://www.sintbernardus.be/stbernardusabt12.php?l=en[St. Bernardus Abt 12].
|
58
|
-
|
59
|
-
[[ravages]]
|
60
|
-
== The Ravages of Writing
|
61
|
-
|
62
|
-
Crystalline XML tags relentlessly bombarded the theater.
|
63
|
-
|
64
|
-
.XML tags
|
65
|
-
[source,xml]
|
66
|
-
----
|
67
|
-
<author id="1">
|
68
|
-
<personname>
|
69
|
-
<firstname>Lazarus</firstname>
|
70
|
-
<surname>het Draeke</surname>
|
71
|
-
</personname>
|
72
|
-
</author>
|
73
|
-
----
|
74
|
-
|
75
|
-
Despite the assault, we were still attempting to draft an example of a defensive operation.
|
76
|
-
|
77
|
-
.DefOps Plan
|
78
|
-
====
|
79
|
-
Click btn:[Download Zip] to download the defensive operation plan bundle.
|
80
|
-
|
81
|
-
OMG!
|
82
|
-
Somebody please save us now!
|
83
|
-
I want my mum...and an extra-large double macchiato, please.
|
84
|
-
====
|
85
|
-
|
86
|
-
Unfortunaly, Lazarus and I had both come to the conclusion that we weren't going to get out of this without corrupted hardrives if we didn't locate caffeine within the next few hours.
|
87
|
-
|
88
|
-
=== A Recipe for Potion
|
89
|
-
|
90
|
-
This potion for a sample document contains the following ingredients, which are listed in a very random, chaotically nested order.
|
91
|
-
|
92
|
-
* all the headings
|
93
|
-
** syntax highlighted source code
|
94
|
-
*** non-syntax highlighted source code or just a listing block
|
95
|
-
* quote block
|
96
|
-
** verse block
|
97
|
-
*** table with some cell formatting
|
98
|
-
**** sequential paragraphs
|
99
|
-
***** admonition (at least one)
|
100
|
-
*** bullet list with nesting
|
101
|
-
** numbered list with nesting
|
102
|
-
** definition list
|
103
|
-
*** sidebar
|
104
|
-
* example block
|
105
|
-
** block image (no inline images)
|
106
|
-
*** inline formatting in a paragraph
|
107
|
-
**** two fresh Burdockian leaves
|
108
|
-
***** They must be harvested by the light of the teal moons.
|
109
|
-
|
110
|
-
Got square?
|
111
|
-
|
112
|
-
[square]
|
113
|
-
* one
|
114
|
-
* two
|
115
|
-
* three
|
116
|
-
|
117
|
-
==== Searching for Burdockian
|
118
|
-
|
119
|
-
.Steps for finding and preparing Burdockian leaves
|
120
|
-
. Locate dusty botany
|
121
|
-
.. Sneeze
|
122
|
-
... Sneeze some more
|
123
|
-
. Find section on Burdockian
|
124
|
-
.. Review its characteristics
|
125
|
-
... Take a picture of the diagram of its leaves
|
126
|
-
.... Don't rip out the picture like a troglodyte
|
127
|
-
..... Don't do it, I'm watching you
|
128
|
-
. Put on your hiking boots
|
129
|
-
. Freeze your butt off on the side of a mountain at midnight
|
130
|
-
.. By the way, you can't see toes by the light of the teal moons.
|
131
|
-
|
132
|
-
Let's start counting from 10.
|
133
|
-
|
134
|
-
[start=10]
|
135
|
-
. arabic (2)
|
136
|
-
.. loweralpha (a)
|
137
|
-
... lowerroman (i)
|
138
|
-
... lowerroman (ii)
|
139
|
-
... lowerroman (iii)
|
140
|
-
... lowerroman (iv)
|
141
|
-
.... upperalpha (A)
|
142
|
-
. arabic (2)
|
143
|
-
|
144
|
-
===== Are You Still Here?
|
145
|
-
|
146
|
-
.Move, move, move!
|
147
|
-
[CAUTION]
|
148
|
-
====
|
149
|
-
The Wolpertingers can smell your procrastination.
|
150
|
-
It's not their fault you can't find your boots.
|
151
|
-
====
|
152
|
-
|
153
|
-
====== Sigh...
|
154
|
-
|
155
|
-
TIP: Your boots are in your closet.
|
156
|
-
|
157
|
-
== Dawn on the Plateau
|
158
|
-
|
159
|
-
Lazarus was hanging from the bottom limb of a Burdockian tree, licking the bark.
|
160
|
-
|
161
|
-
[quote, Mark Tobey]
|
162
|
-
On pavements and the bark of trees I have found whole worlds.
|
163
|
-
|
164
|
-
``If there are whole worlds on that bark, he just swallowed them.'' Kizmet replied.
|
165
|
-
|
166
|
-
[verse,The documentation attorneys]
|
167
|
-
____
|
168
|
-
No bark was harmed in the making of this potion.
|
169
|
-
We're not so sure about a couple ants though.
|
170
|
-
|
171
|
-
Nor those worlds...
|
172
|
-
|
173
|
-
Crap, I smell an injunction.
|
174
|
-
____
|
175
|
-
|
176
|
-
We'd retrieved the leaves, but we'd obviously lost our minds in the process.
|
177
|
-
|
178
|
-
[verse]
|
179
|
-
Roses are +++<span style="color: #FF0000">red</span>+++.
|
180
|
-
Violets are +++<span style="color: #0000FF">blue</span>+++__-ish__.
|
181
|
-
|
182
|
-
== Words Seasoned with Power
|
183
|
-
|
184
|
-
_To tame_ the wild wolpertingers we needed to build a *charm*.
|
185
|
-
But **u**ltimate victory could only be won if we divined the *_true name_* of the __war__lock.
|
186
|
-
|
187
|
-
``What kind of charm?'' Lazarus asked. ``An odoriferous one or a mineral one?''
|
188
|
-
Kizmet shrugged. ``The note from Olaf's desk says `wormwood and licorice,' but these could be normal groceries for werewolves.''
|
189
|
-
|
190
|
-
``Well the H~2~O written on the security whiteboard could be part of a shopping list, but I don't think the local bodega also sells e = mc^2^.'' Lazarus replied.
|
191
|
-
|
192
|
-
``Wait!'' Indigo plucked a small vial from her desk's top drawer and held it toward us.
|
193
|
-
The vial's label read `+e = mc^2^+ +*_the scent of science_*+ +_smells like a genius_+'.
|
194
|
-
|
195
|
-
=== Can I Get Some +Code+?
|
196
|
-
|
197
|
-
[%hardbreaks]
|
198
|
-
Sure.
|
199
|
-
Have a listing block.
|
200
|
-
|
201
|
-
----
|
202
|
-
This is an example of a listing block.
|
203
|
-
The content inside is rendered as <pre> text.
|
204
|
-
----
|
205
|
-
|
206
|
-
But I'm not giving you any highlighting shazam just yet.
|
207
|
-
|
208
|
-
.What is a listing block?
|
209
|
-
****
|
210
|
-
Like literal blocks, the content in listing blocks is displayed exactly as you entered it.
|
211
|
-
Listing block content is rendered as +<pre>+ text.
|
212
|
-
|
213
|
-
The +listing+ style is applied to an element, such as a paragraph, by setting the +listing+ attribute on that element.
|
214
|
-
****
|
215
|
-
|
216
|
-
Let's get our highlighting on!
|
217
|
-
|
218
|
-
<<<
|
219
|
-
|
220
|
-
Install Prawn:
|
221
|
-
|
222
|
-
$ gem install prawn
|
223
|
-
|
224
|
-
Then create your first PDF document in Ruby!
|
225
|
-
|
226
|
-
.Generates a basic PDF document using Prawn
|
227
|
-
```ruby
|
228
|
-
require 'prawn' # <1>
|
229
|
-
|
230
|
-
Prawn::Document.generate 'output.pdf' do # <3>
|
231
|
-
text 'Hello, World!' # <2>
|
232
|
-
end
|
233
|
-
```
|
234
|
-
<1> Imports Prawn library
|
235
|
-
<2> Adds text “Hello, World!” to first page
|
236
|
-
<3> Writes PDF to [file]_output.pdf_ after executing all statements
|
237
|
-
|
238
|
-
How about some source code that styles code? So meta!
|
239
|
-
|
240
|
-
```css
|
241
|
-
code {
|
242
|
-
padding: 2px 4px;
|
243
|
-
font-size: 90%;
|
244
|
-
color: #c7254e;
|
245
|
-
white-space: nowrap !important;
|
246
|
-
background-color: #f9f2f4;
|
247
|
-
border-radius: 4px;
|
248
|
-
}
|
249
|
-
```
|
250
|
-
|
251
|
-
Where could we go without some Java?
|
252
|
-
|
253
|
-
```java
|
254
|
-
package org.javaee7.cdi.events;
|
255
|
-
|
256
|
-
import javax.enterprise.context.SessionScoped;
|
257
|
-
import javax.enterprise.event.Observes;
|
258
|
-
import java.io.Serializable;
|
259
|
-
|
260
|
-
/**
|
261
|
-
* @author The Duke
|
262
|
-
*/
|
263
|
-
@SessionScoped
|
264
|
-
public class GreetingReceiver implements EventReceiver, Serializable {
|
265
|
-
private String greet = "Willkommen";
|
266
|
-
|
267
|
-
void receive(@Observes String greet) {
|
268
|
-
this.greet = greet;
|
269
|
-
}
|
270
|
-
|
271
|
-
@Override
|
272
|
-
public String getGreet() {
|
273
|
-
return greet;
|
274
|
-
}
|
275
|
-
}
|
276
|
-
```
|
277
|
-
|
278
|
-
We already showed you an XML example in <<ravages>>.
|
279
|
-
|
280
|
-
I'll trade you a little table for some of that bark.
|
281
|
-
|
282
|
-
[cols=3,frame=topbot,grid=rows]
|
283
|
-
|===
|
284
|
-
|Name of Column 1 |Name of Column 2 |Name of Column 3
|
285
|
-
|
286
|
-
^m|Prefix the +{vbar}+ with +{caret}+ to center content horizontally
|
287
|
-
.<|Prefix the +{vbar}+ with a +.+ and +<+ to align the content to the top of the cell
|
288
|
-
>|Prefix the +{vbar}+ with +>+ to align the content to the right horizontally
|
289
|
-
|
290
|
-
3+^.^e|This content spans three columns (+3{plus}+) and is centered horizontally (+{caret}+) and vertically (+.{caret}+) within the cell.
|
291
|
-
|===
|
292
|
-
|
293
|
-
Wait.
|
294
|
-
What?
|
295
|
-
Where is this story going?
|
296
|
-
|
297
|
-
+<span>+:: an html tag that makes me crazy
|
298
|
-
|
299
|
-
align:: something I never get going in the right direction.
|
300
|
-
Also has to do with my poor verbal communication skills
|
301
|
-
|
302
|
-
float::
|
303
|
-
style::
|
304
|
-
don't make me laugh
|
305
|
-
|
306
|
-
Does anyone have the time?
|
307
|
-
|
308
|
-
Tg lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
309
|
-
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
310
|
-
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
311
|
-
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborumj.
|
312
|
-
|
313
|
-
== Keeping It Together
|
314
|
-
|
315
|
-
On this page we have nested ``keep together'' logic.
|
316
|
-
The combined block will be shifted to the next page if there isn't room available on this one.
|
317
|
-
|
318
|
-
[verse]
|
319
|
-
First,
|
320
|
-
we
|
321
|
-
need
|
322
|
-
to
|
323
|
-
waste
|
324
|
-
several
|
325
|
-
lines
|
326
|
-
using
|
327
|
-
a
|
328
|
-
verse
|
329
|
-
to
|
330
|
-
push
|
331
|
-
it
|
332
|
-
to
|
333
|
-
the
|
334
|
-
breaking
|
335
|
-
point.
|
336
|
-
|
337
|
-
[NOTE]
|
338
|
-
.What happens if there is both a field and a method with the same name?
|
339
|
-
====
|
340
|
-
Back to the previous example, suppose that we have both a field and a method with the same name, as in:
|
341
|
-
|
342
|
-
.Java class with a field and method that share the same name
|
343
|
-
[source,java]
|
344
|
-
----
|
345
|
-
public class Foo {
|
346
|
-
public String bar;
|
347
|
-
|
348
|
-
public String bar() {
|
349
|
-
return bar;
|
350
|
-
}
|
351
|
-
}
|
352
|
-
----
|
353
|
-
|
354
|
-
*Golo resolves methods first, fields last.*
|
355
|
-
Hence, the following Golo code will resolve the +bar()+ method, not the +bar+ field:
|
356
|
-
|
357
|
-
.Golo picks the method over the field with the same name
|
358
|
-
----
|
359
|
-
let foo = Foo()
|
360
|
-
|
361
|
-
# Write the field
|
362
|
-
foo: bar("baz")
|
363
|
-
|
364
|
-
# Calls the bar() method
|
365
|
-
println(foo: bar())
|
366
|
-
----
|
367
|
-
====
|
368
|
-
|
369
|
-
<<<
|
370
|
-
|
371
|
-
Here's a preview of how each heading level is rendered.
|
372
|
-
|
373
|
-
[discrete]
|
374
|
-
= Heading 1 (Level 0)
|
375
|
-
|
376
|
-
filler content
|
377
|
-
|
378
|
-
[discrete]
|
379
|
-
== Heading 2 (Level 1)
|
380
|
-
|
381
|
-
filler content
|
382
|
-
|
383
|
-
[discrete]
|
384
|
-
=== Heading 3 (Level 2)
|
385
|
-
|
386
|
-
filler content
|
387
|
-
|
388
|
-
[discrete]
|
389
|
-
==== Heading 4 (Level 3)
|
390
|
-
|
391
|
-
filler content
|
392
|
-
|
393
|
-
[discrete]
|
394
|
-
===== Heading 5 (Level 4)
|
395
|
-
|
396
|
-
filler content
|
397
|
-
|
398
|
-
[discrete]
|
399
|
-
====== Heading 6 (Level 5)
|
400
|
-
|
401
|
-
filler content
|
402
|
-
|
403
|
-
---
|
404
|
-
|
405
|
-
--
|
406
|
-
Here's some content inside an open block.
|
407
|
-
--
|
408
|
-
|
409
|
-
<<<
|
410
|
-
|
411
|
-
== Credits
|
412
|
-
|
413
|
-
.Brought to you by OpenDevise
|
414
|
-
[%header,cols="1,1s,1",grid=rows,frame=topbot]
|
415
|
-
|===
|
416
|
-
|Name
|
417
|
-
|Title
|
418
|
-
|Alias
|
419
|
-
|
420
|
-
|Sarah White
|
421
|
-
|President
|
422
|
-
|http://twitter.com/carbonfray[@carbonfray]
|
423
|
-
|
424
|
-
|Dan Allen
|
425
|
-
|Vice President
|
426
|
-
|http://twitter.com/mojavelinux[@mojavelinux]
|
427
|
-
|
428
|
-
3+^.e|Powered by Open Source
|
429
|
-
|===
|