asciidoctor-pdf 1.5.0.alpha.11 → 1.5.0.alpha.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +10 -0
- data/README.adoc +66 -5
- data/asciidoctor-pdf.gemspec +52 -0
- data/data/themes/default-theme.yml +3 -2
- data/docs/theming-guide.adoc +1402 -654
- data/lib/asciidoctor-pdf/converter.rb +139 -97
- data/lib/asciidoctor-pdf/formatted_text/formatter.rb +2 -2
- data/lib/asciidoctor-pdf/formatted_text/parser.rb +1 -1
- data/lib/asciidoctor-pdf/formatted_text/parser.treetop +2 -1
- data/lib/asciidoctor-pdf/formatted_text/transform.rb +12 -11
- data/lib/asciidoctor-pdf/prawn_ext/extensions.rb +17 -3
- data/lib/asciidoctor-pdf/rouge_ext/css_theme.rb +3 -2
- data/lib/asciidoctor-pdf/sanitizer.rb +1 -1
- data/lib/asciidoctor-pdf/theme_loader.rb +22 -19
- data/lib/asciidoctor-pdf/version.rb +1 -1
- metadata +24 -19
- data/bin/optimize-pdf +0 -64
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5b988f6863043a9a22bf55cdbbef3a12a9c9a16
|
4
|
+
data.tar.gz: a623fe7f63d9311404fadca17ff1f17f97b13add
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1311807ce5e4b061faddbb7dd2cce3bc8f563c4a004849f082de2a8e625e90b1d097524e26e1bc97a21b3f363f5de262c649f6888c009e2cd6a6234135d95b21
|
7
|
+
data.tar.gz: b296d8fbc882739a27b033032c0be761fb0cc9ad0b03a245865e2869be49d8608d9f6b64fc43af061c369c99b217c6846a5da66a14a8dafb3751942e8a1eef66
|
data/Gemfile
ADDED
data/README.adoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= Asciidoctor PDF: A native PDF converter for AsciiDoc
|
2
2
|
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
|
3
|
-
v1.5.0.alpha.
|
3
|
+
v1.5.0.alpha.12, 2016-08-05
|
4
4
|
// Settings:
|
5
5
|
:compat-mode!:
|
6
6
|
:experimental:
|
@@ -94,6 +94,10 @@ See <<WORKLOG.adoc#,WORKLOG>>.
|
|
94
94
|
|
95
95
|
All that's needed is Ruby (1.9.3 or above; 2.2.x recommended) and a few Ruby gems, which we explain how to install in the next section.
|
96
96
|
|
97
|
+
To check if you have Ruby available, use the `ruby` command to query the version installed:
|
98
|
+
|
99
|
+
$ ruby --version
|
100
|
+
|
97
101
|
[WARNING]
|
98
102
|
====
|
99
103
|
Prawn 2.0.0 and above requires Ruby >= 2.0.0 at installation (though it still works with Ruby 1.9.3 once you get beyond installation).
|
@@ -104,9 +108,18 @@ If you need to use Asciidoctor PDF with Ruby 1.9.3, you must first install Prawn
|
|
104
108
|
You can then proceed with installation of Asciidoctor PDF.
|
105
109
|
====
|
106
110
|
|
107
|
-
|
111
|
+
=== System encoding
|
108
112
|
|
109
|
-
|
113
|
+
Asciidoctor assumes you're using UTF-8 encoding.
|
114
|
+
To minimize encoding problems, make sure the default encoding of your system is set to UTF-8.
|
115
|
+
|
116
|
+
If you're using a non-English Windows environment, the default encoding of your system may not be UTF-8.
|
117
|
+
As a result, you may get an `Encoding::UndefinedConversionError` or other encoding issues when invoking Asciidoctor.
|
118
|
+
To solve these problems, we recommend at least changing the active code page in your console to UTF-8.
|
119
|
+
|
120
|
+
chcp 65001
|
121
|
+
|
122
|
+
Once you make this change, all your Unicode headaches will be behind you.
|
110
123
|
|
111
124
|
== Getting started
|
112
125
|
|
@@ -165,7 +178,7 @@ It's time to convert the AsciiDoc document directly to PDF.
|
|
165
178
|
|
166
179
|
=== Convert AsciiDoc to PDF
|
167
180
|
|
168
|
-
IMPORTANT: You'll need the `
|
181
|
+
IMPORTANT: You'll need the `rouge` gem installed to run this example since it uses the `source-highlighter` attribute with the value of `rouge`.
|
169
182
|
|
170
183
|
Converting to PDF is a simple as running the `asciidoctor-pdf` script using Ruby and passing our AsciiDoc document as the first argument.
|
171
184
|
|
@@ -194,7 +207,7 @@ The layout and styling of the PDF is driven by a YAML configuration file.
|
|
194
207
|
To learn how the theming system works and how to create and apply custom themes, refer to the <<docs/theming-guide.adoc#,Asciidoctor PDF Theme Guide>>.
|
195
208
|
You can use the built-in theme files, which you can find in the [file]_data/themes_ directory, as examples.
|
196
209
|
|
197
|
-
== Font-based
|
210
|
+
== Font-based icons
|
198
211
|
|
199
212
|
You can use icons in your PDF document using any of the following icon sets:
|
200
213
|
|
@@ -246,6 +259,54 @@ You can enable use of fonts during PDF generation (instead of in the document he
|
|
246
259
|
Icon-based fonts are handled by the `prawn-icon` gem.
|
247
260
|
To find a complete list of available icons, consult the https://github.com/jessedoyle/prawn-icon/tree/master/data/fonts[prawn-icon] repository.
|
248
261
|
|
262
|
+
== Image scaling
|
263
|
+
|
264
|
+
Since PDF is a fixed-width canvas, you almost always need to specify an image width to get the image to fit properly on the page.
|
265
|
+
There are four ways to specify the width of the image, listed here in order of precedence:
|
266
|
+
|
267
|
+
[cols="1s,3d"]
|
268
|
+
|===
|
269
|
+
|Attribute{nbsp}Name | Description
|
270
|
+
|
271
|
+
|pdfwidth
|
272
|
+
|The display width of the image as an absolute size (e.g., 2in), percentage of the content width (e.g., 75%), or percentage of the page width (e.g., 100vw).
|
273
|
+
_Intended to be used for the PDF converter only._
|
274
|
+
|
275
|
+
|scaledwidth
|
276
|
+
|The display width of the image as a percentage of the content width (e.g., 75%).
|
277
|
+
_Intended to be used for print output such as PDF._
|
278
|
+
|
279
|
+
|width
|
280
|
+
|The unitless display width of the image (assumed to be pixels), typically matching the intrinsic width of the image.
|
281
|
+
If the width exceeds the content width, the image is scaled down to the content width.
|
282
|
+
|
283
|
+
|_unspecified_
|
284
|
+
|If you don't specify one of the width attributes, the intrinsic width of the image is used (the px value is multiplied by 75% to convert to pt) unless the width exceeds the content width, in which case the image is scaled down to the content width.
|
285
|
+
|===
|
286
|
+
|
287
|
+
The sizing is always controlled by the width (explicit or intrinsic) and the size of the image is scaled proporationally.
|
288
|
+
The height of the image is ignored by the PDF converter, with one exception.
|
289
|
+
If the height of the image exceeds the height of the page, the image is scaled down to fit on a single page.
|
290
|
+
|
291
|
+
=== pdfwidth attribute
|
292
|
+
|
293
|
+
The pdfwidth attribute is the recommended way to set the image size for the PDF output.
|
294
|
+
This attribute is provided for two reasons.
|
295
|
+
First, the fixed-width canvas often calls for a width that is distinct from other output formats, such as HTML.
|
296
|
+
Second, this attribute allows the width to be expressed using a variety of units.
|
297
|
+
|
298
|
+
The pdfwidth attribute supports the following units:
|
299
|
+
|
300
|
+
* pt (default)
|
301
|
+
* in
|
302
|
+
* mm
|
303
|
+
* cm
|
304
|
+
* px
|
305
|
+
* % (percentage of content width)
|
306
|
+
* vw (percentage of page width)
|
307
|
+
|
308
|
+
In all cases, the width is converted to pt.
|
309
|
+
|
249
310
|
== Optional scripts
|
250
311
|
|
251
312
|
{project-name} also provides a shell script that invokes GhostScript (`gs`) to optimize and compress the generated PDF with minimal impact on quality.
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('lib/asciidoctor-pdf/version', File.dirname(__FILE__))
|
3
|
+
require 'open3' unless defined? Open3
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'asciidoctor-pdf'
|
7
|
+
s.version = Asciidoctor::Pdf::VERSION
|
8
|
+
|
9
|
+
s.summary = 'Converts AsciiDoc documents to PDF using Prawn'
|
10
|
+
s.description = <<-EOS
|
11
|
+
An extension for Asciidoctor that converts AsciiDoc documents to PDF using the Prawn PDF library.
|
12
|
+
EOS
|
13
|
+
|
14
|
+
s.authors = ['Dan Allen', 'Sarah White']
|
15
|
+
s.email = 'dan@opendevise.io'
|
16
|
+
s.homepage = 'https://github.com/asciidoctor/asciidoctor-pdf'
|
17
|
+
s.license = 'MIT'
|
18
|
+
|
19
|
+
s.required_ruby_version = '>= 1.9.3'
|
20
|
+
|
21
|
+
files = begin
|
22
|
+
(result = Open3.popen3('git ls-files -z') {|_, out| out.read }.split %(\0)).empty? ? Dir['**/*'] : result
|
23
|
+
rescue
|
24
|
+
Dir['**/*']
|
25
|
+
end
|
26
|
+
s.files = files.grep /^(?:(?:data|docs|lib)\/.+|Gemfile|Rakefile|(?:LICENSE|NOTICE|README)\.adoc|#{s.name}\.gemspec)$/
|
27
|
+
# FIXME optimize-pdf is currently a shell script, so listing it here won't work
|
28
|
+
#s.executables = ['asciidoctor-pdf', 'optimize-pdf']
|
29
|
+
s.executables = ['asciidoctor-pdf']
|
30
|
+
s.test_files = files.grep /^(?:test|spec|feature)\/.*$/
|
31
|
+
|
32
|
+
s.require_paths = ['lib']
|
33
|
+
|
34
|
+
s.has_rdoc = true
|
35
|
+
s.rdoc_options = ['--charset=UTF-8', '--title="Asciidoctor PDF"', '--main=README.adoc', '-ri']
|
36
|
+
s.extra_rdoc_files = ['README.adoc', 'LICENSE.adoc', 'NOTICE.adoc']
|
37
|
+
|
38
|
+
s.add_development_dependency 'rake'
|
39
|
+
#s.add_development_dependency 'rdoc', '~> 4.1.0'
|
40
|
+
|
41
|
+
s.add_runtime_dependency 'asciidoctor', '>= 1.5.0'
|
42
|
+
# Prawn 2.x requires Ruby 2.x, so cast a wider net
|
43
|
+
s.add_runtime_dependency 'prawn', '>= 1.3.0', '< 3.0.0'
|
44
|
+
s.add_runtime_dependency 'prawn-table', '0.2.2'
|
45
|
+
s.add_runtime_dependency 'prawn-templates', '0.0.3'
|
46
|
+
s.add_runtime_dependency 'prawn-svg', '0.25.1'
|
47
|
+
s.add_runtime_dependency 'prawn-icon', '1.1.0'
|
48
|
+
s.add_runtime_dependency 'safe_yaml', '~> 1.0.4'
|
49
|
+
s.add_runtime_dependency 'thread_safe', '~> 0.3.5'
|
50
|
+
# For our usage, treetop 1.6.2 is slower than 1.5.3
|
51
|
+
s.add_runtime_dependency 'treetop', '1.5.3'
|
52
|
+
end
|
@@ -70,14 +70,15 @@ link:
|
|
70
70
|
literal:
|
71
71
|
font_color: b12146
|
72
72
|
font_family: M+ 1mn
|
73
|
+
menu_caret_content: " <font size=\"1.15em\"><color rgb=\"b12146\">\u203a</color></font> "
|
73
74
|
heading:
|
74
75
|
#font_color: 181818
|
75
76
|
font_color: $base_font_color
|
76
77
|
font_family: $base_font_family
|
77
78
|
font_style: bold
|
78
|
-
# h1 is used for part titles
|
79
|
+
# h1 is used for part titles (book doctype only)
|
79
80
|
h1_font_size: floor($base_font_size * 2.6)
|
80
|
-
# h2 is used for chapter titles
|
81
|
+
# h2 is used for chapter titles (book doctype only)
|
81
82
|
h2_font_size: floor($base_font_size * 2.15)
|
82
83
|
h3_font_size: round($base_font_size * 1.7)
|
83
84
|
h4_font_size: $base_font_size_large
|
data/docs/theming-guide.adoc
CHANGED
@@ -1,26 +1,42 @@
|
|
1
1
|
= Asciidoctor PDF Theming Guide
|
2
|
-
Dan Allen <https://github.com/mojavelinux>
|
3
|
-
:
|
4
|
-
:icons: font
|
2
|
+
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>
|
3
|
+
// Settings:
|
5
4
|
:idprefix:
|
6
5
|
:idseparator: -
|
6
|
+
:toc: preamble
|
7
|
+
ifndef::env-github[:icons: font]
|
8
|
+
ifdef::env-github[]
|
9
|
+
:outfilesuffix: .adoc
|
10
|
+
:!toc-title:
|
11
|
+
:caution-caption: :fire:
|
12
|
+
:important-caption: :exclamation:
|
13
|
+
:note-caption: :paperclip:
|
14
|
+
:tip-caption: :bulb:
|
15
|
+
:warning-caption: :warning:
|
16
|
+
endif::[]
|
7
17
|
:window: _blank
|
18
|
+
// Aliases:
|
19
|
+
:conum-guard-yaml: #
|
20
|
+
ifndef::icons[:conum-guard-yaml: # #]
|
8
21
|
|
9
22
|
////
|
10
23
|
Topics remaining to document:
|
11
|
-
* document which attributes can be set in document (pdf-page-size, front-cover-image, back-cover-image, etc)
|
24
|
+
* document which attributes can be set in document (pdf-page-size, front-cover-image, back-cover-image, etc) (issue #428)
|
12
25
|
* line height and line height length (and what that all means)
|
13
26
|
* title page layout / title page images (logo & background)
|
14
27
|
* document that unicode escape sequences can be used inside double-quoted strings
|
15
28
|
////
|
16
29
|
|
17
|
-
|
18
|
-
The
|
19
|
-
This document
|
30
|
+
[.lead]
|
31
|
+
The theming system in Asciidoctor PDF is used to control the layout and styling of the PDF file Asciidoctor PDF generates from AsciiDoc.
|
32
|
+
This document describes how the theming system works, how to define a custom theme in YAML and how to activate the theme when running Asciidoctor PDF.
|
33
|
+
|
34
|
+
IMPORTANT: If you're using a custom theme, you're expected to override some of keys described in the sections below, in particular fonts.
|
35
|
+
If you don't define your own fonts, the built-in PDF fonts will be used.
|
20
36
|
|
21
37
|
toc::[]
|
22
38
|
|
23
|
-
== Language
|
39
|
+
== Language Overview
|
24
40
|
|
25
41
|
The theme language in Asciidoctor PDF is based on the http://en.wikipedia.org/wiki/YAML[YAML] data format and incorporates many concepts from CSS and SASS.
|
26
42
|
Therefore, if you have a background in web design, the theme language should be immediately familiar to you.
|
@@ -63,13 +79,13 @@ base:
|
|
63
79
|
font_size: 12
|
64
80
|
line_height_length: 17
|
65
81
|
line_height: $base_line_height_length / $base_font_size
|
66
|
-
|
82
|
+
vertical_spacing: $base_line_height_length
|
67
83
|
heading:
|
68
84
|
font_color: #262626
|
69
85
|
font_size: 17
|
70
86
|
font_style: bold
|
71
87
|
line_height: 1.2
|
72
|
-
margin_bottom: $
|
88
|
+
margin_bottom: $vertical_spacing
|
73
89
|
link:
|
74
90
|
font_color: #002FA7
|
75
91
|
outline_list:
|
@@ -132,6 +148,10 @@ The value of a key may be one of the following types:
|
|
132
148
|
- Alignment (left, center, right, justify)
|
133
149
|
- Color as hex string (e.g., #ffffff)
|
134
150
|
- Image path
|
151
|
+
* Null (clears any previously assigned value)
|
152
|
+
- _empty_ (i.e., no value specified)
|
153
|
+
- null
|
154
|
+
- ~
|
135
155
|
* Number (integer or float) with optional units (default unit is points)
|
136
156
|
* Array
|
137
157
|
- Color as RGB array (e.g., [51, 51, 51])
|
@@ -157,11 +177,12 @@ The following keys are inherited:
|
|
157
177
|
* font_style
|
158
178
|
* line_height (currently some exceptions)
|
159
179
|
* text_transform (only for headings)
|
160
|
-
* margin_bottom (falls back to $
|
180
|
+
* margin_bottom (falls back to $vertical_spacing)
|
161
181
|
|
162
182
|
.Heading Inheritance
|
163
183
|
****
|
164
|
-
Headings
|
184
|
+
Headings inherit starting from a specific heading level (e.g., `heading_h2_font_size`), then to the heading category (e.g., `heading_font_size`), then directly to the base value (e.g., `base_font_size`).
|
185
|
+
Any setting from an enclosing context, such as a sidebar, is skipped.
|
165
186
|
****
|
166
187
|
|
167
188
|
=== Variables
|
@@ -207,7 +228,7 @@ base:
|
|
207
228
|
|
208
229
|
We'll cover more about math expressions later.
|
209
230
|
|
210
|
-
==== Custom
|
231
|
+
==== Custom Variables
|
211
232
|
|
212
233
|
You can define arbitrary key names to make custom variables.
|
213
234
|
This is one way to group reusable values at the top of your theme file.
|
@@ -215,12 +236,12 @@ If you are going to do this, it's recommended that you organize the keys under a
|
|
215
236
|
|
216
237
|
For instance, here's how you can define your brand colors:
|
217
238
|
|
218
|
-
[source,yaml]
|
239
|
+
[source,yaml,subs=attributes+]
|
219
240
|
----
|
220
241
|
brand:
|
221
|
-
primary: #E0162B
|
222
|
-
secondary: '#FFFFFF'
|
223
|
-
alert: '0052A5'
|
242
|
+
primary: #E0162B {conum-guard-yaml} <1>
|
243
|
+
secondary: '#FFFFFF' {conum-guard-yaml} <2>
|
244
|
+
alert: '0052A5' {conum-guard-yaml} <3>
|
224
245
|
----
|
225
246
|
<1> To align with CSS, you may add a `+#+` in front of the hex color value.
|
226
247
|
A YAML preprocessor is used to ensure the value is not treated as a comment as it would normally be the case in YAML.
|
@@ -236,9 +257,11 @@ base:
|
|
236
257
|
font_color: $brand_primary
|
237
258
|
----
|
238
259
|
|
239
|
-
=== Math
|
260
|
+
=== Math Expressions & Functions
|
240
261
|
|
241
262
|
The theme language supports basic math operations to support calculated values.
|
263
|
+
Like programming languages, multiple and divide take precedence over add and subtract.
|
264
|
+
|
242
265
|
The following table lists the supported operations and the corresponding operator for each.
|
243
266
|
|
244
267
|
[%header%autowidth]
|
@@ -258,9 +281,8 @@ The following table lists the supported operations and the corresponding operato
|
|
258
281
|
|-
|
259
282
|
|===
|
260
283
|
|
261
|
-
|
284
|
+
IMPORTANT: The operator must always be surrounded by a space on either side (e.g., 2 + 2 and not 2+2).
|
262
285
|
|
263
|
-
The operator must always be surrounded by a space on either side.
|
264
286
|
Here's an example of a math expression with fixed values.
|
265
287
|
|
266
288
|
[source,yaml]
|
@@ -299,7 +321,7 @@ base:
|
|
299
321
|
font_size_large: ceil($base_font_size * 1.25)
|
300
322
|
----
|
301
323
|
|
302
|
-
=== Measurement
|
324
|
+
=== Measurement Units
|
303
325
|
|
304
326
|
Several of the keys require a value in points (pt), the unit of measure for the PDF canvas.
|
305
327
|
A point is defined as 1/72 of an inch.
|
@@ -477,7 +499,12 @@ title_page:
|
|
477
499
|
You can select from <<built-in-afm-fonts,built-in PDF fonts>>, <<bundled-fonts,fonts bundled with Asciidoctor PDF>> or <<custom-fonts,custom fonts>> loaded from TrueType font (TTF) files.
|
478
500
|
If you want to use custom fonts, you must first declare them in your theme file.
|
479
501
|
|
480
|
-
|
502
|
+
IMPORTANT: Asciidoctor has no challenge working with Unicode.
|
503
|
+
In fact, it prefers Unicode and considers the whole range.
|
504
|
+
However, once you convert to PDF, you have to meet the font requirements of PDF in order to preserve Unicode characters.
|
505
|
+
There's nothing Asciidoctor can do to convince PDF to work without the right fonts in play.
|
506
|
+
|
507
|
+
=== Built-In (AFM) Fonts
|
481
508
|
|
482
509
|
The names of the built-in fonts (for general-purpose text) are as follows:
|
483
510
|
|
@@ -512,7 +539,7 @@ For anything outside of that, PDF is BYOF (Bring Your Own Font).
|
|
512
539
|
Even though the built-in fonts require the content to be encoded in WINANSI, _you still type your AsciiDoc document in UTF-8_.
|
513
540
|
Asciidoctor PDF encodes the content into WINANSI when building the PDF.
|
514
541
|
|
515
|
-
.WINANSI
|
542
|
+
.WINANSI Encoding Behavior
|
516
543
|
****
|
517
544
|
If you're using Prawn 1.3.0 with one of the built-in fonts, any characters in your AsciiDoc document that cannot be encoded to WINANSI will be replaced with an underscore glyph (`_`).
|
518
545
|
If you're using Prawn 2.0.0 or above with one of the built-in fonts, if your AsciiDoc document contains a character that cannot be encoded to WINANSI, a warning will be issued and conversion will halt.
|
@@ -520,7 +547,7 @@ If you're using Prawn 2.0.0 or above with one of the built-in fonts, if your Asc
|
|
520
547
|
For more information about how Prawn handles character encodings for built-in fonts, see https://github.com/prawnpdf/prawn/blob/master/CHANGELOG.md#vastly-improved-handling-of-encodings-for-pdf-built-in-afm-fonts[this note in the Prawn CHANGELOG].
|
521
548
|
****
|
522
549
|
|
523
|
-
=== Bundled
|
550
|
+
=== Bundled Fonts
|
524
551
|
|
525
552
|
Asciidoctor PDF bundles several fonts that are used in the default theme.
|
526
553
|
You can also use these fonts in your custom theme.
|
@@ -543,7 +570,7 @@ Useful as a fallback font.
|
|
543
570
|
CAUTION: At the time of this writing, you cannot use the bundled fonts if you define your own custom fonts.
|
544
571
|
This limitation may be lifted in the future.
|
545
572
|
|
546
|
-
=== Custom
|
573
|
+
=== Custom Fonts
|
547
574
|
|
548
575
|
The limited character set of WINANSI, or the bland look of the built-in fonts, may motivate you to load your own font.
|
549
576
|
Custom fonts can enhance the look of your PDF theme substantially.
|
@@ -621,7 +648,7 @@ TIP: Text in SVGs will use the font catalog from your theme.
|
|
621
648
|
We recommend that you match the font key to the name of the font seen by the operating system.
|
622
649
|
This will allow you to use the same font names (aka families) in both your graphics program and Asciidoctor PDF.
|
623
650
|
|
624
|
-
=== Fallback
|
651
|
+
=== Fallback Fonts
|
625
652
|
|
626
653
|
If one of your fonts is missing a character that is used in a document, such as special symbols, you can tell Asciidoctor PDF to retrieve the character from a fallback font.
|
627
654
|
You only need to specify one fallback font...typically one that has a full set of symbols.
|
@@ -677,321 +704,596 @@ It's best to select fonts that have all the characters you need.
|
|
677
704
|
|
678
705
|
== Keys
|
679
706
|
|
680
|
-
|
707
|
+
This section lists all the keys that are available when creating a custom theme.
|
708
|
+
The converter uses the values of these keys to control how most elements are arranged and styled in the PDF.
|
709
|
+
|
710
|
+
NOTE: When creating a theme, all keys are optional.
|
711
|
+
You only have to assign values to keys you want to customize.
|
712
|
+
Any required keys are assigned by the base theme.
|
713
|
+
|
714
|
+
The keys in this section are organized by category.
|
715
|
+
Each category represents a common prefix under which the keys are typically nested.
|
716
|
+
The default values are those assigned by the base theme (not the default theme).
|
717
|
+
|
718
|
+
TIP: Keys can be partioned and nested wherever an underscore (`_`) appears in the name.
|
719
|
+
This nested structure is flatted when the theme is loaded.
|
681
720
|
|
682
721
|
=== Page
|
683
722
|
|
684
|
-
|
723
|
+
The keys in this category control the size, margins and background of each page (i.e., canvas).
|
724
|
+
|
725
|
+
NOTE: The background of the title page can be styled independently.
|
726
|
+
See <<Title Page>> for details.
|
727
|
+
|
728
|
+
[cols="3,4,5l"]
|
685
729
|
|===
|
686
730
|
|Key |Value Type |Example
|
687
731
|
|
688
|
-
|
689
|
-
|<<colors,color>>
|
690
|
-
|background_color: #ffffff
|
732
|
+
3+|*Key Prefix:* page
|
691
733
|
|
692
|
-
|
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|portrait, landscape +
|
698
|
-
(default: portrait)
|
699
|
-
|layout: portrait
|
734
|
+
|background_color^[1]^
|
735
|
+
|<<colors,Color>> +
|
736
|
+
(default: #ffffff)
|
737
|
+
|page:
|
738
|
+
background_color: #fefefe
|
700
739
|
|
701
|
-
|
|
702
|
-
|
703
|
-
|
740
|
+
|background_image^[1]^
|
741
|
+
|Inline image macro^[2]^ +
|
742
|
+
(default: none)
|
743
|
+
|page:
|
744
|
+
background_image: +image:page-bg.png[]+
|
704
745
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
746
|
+
|layout
|
747
|
+
|portrait {vbar} landscape +
|
748
|
+
(default: portrait)
|
749
|
+
|page:
|
750
|
+
layout: landscape
|
751
|
+
|
752
|
+
|margin
|
753
|
+
|<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>> +
|
754
|
+
(default: 36)
|
755
|
+
|page:
|
756
|
+
margin: [0.5in, 0.67in, 1in, 0.67in]
|
757
|
+
|
758
|
+
|size
|
759
|
+
|https://github.com/prawnpdf/pdf-core/blob/0.6.0/lib/pdf/core/page_geometry.rb#L16-L68[Named size^] {vbar} <<measurement-units,Measurement[width,height]>> +
|
760
|
+
(default: A4)
|
761
|
+
|page:
|
762
|
+
size: Letter
|
708
763
|
|===
|
709
764
|
|
710
|
-
|
765
|
+
. Page backgrounds do not currently work when using AsciidoctorJ PDF.
|
711
766
|
This limitation is due to a bug in Prawn 1.3.1.
|
712
767
|
The limitation will remain until AsciidoctorJ PDF upgrades to Prawn 2.x (an upgrade that is waiting on AsciidoctorJ to migrate to JRuby 9000).
|
713
768
|
For more details, see http://discuss.asciidoctor.org/Asciidoctor-YAML-style-file-for-PDF-and-maven-td3849.html[this thread].
|
769
|
+
. Target may be an absolute path or a path relative to the value of the `pdf-stylesdir` attribute.
|
714
770
|
|
715
771
|
=== Base
|
716
772
|
|
717
|
-
|
773
|
+
The keys in this category provide generic theme settings and are often referenced throughout the theme file as variables.
|
774
|
+
It's common to define additional keys in this category (e.g., `base_border_radius`) that serve as custom variables to help keep your theme DRY.
|
775
|
+
|
776
|
+
[cols="3,4,5l"]
|
718
777
|
|===
|
719
778
|
|Key |Value Type |Example
|
720
779
|
|
721
|
-
|
722
|
-
|<<colors,color>>
|
723
|
-
|font_color: #333333
|
724
|
-
|
725
|
-
|base_font_family
|
726
|
-
|<<fonts,font family name>>
|
727
|
-
|font_family: Noto Serif
|
728
|
-
|
729
|
-
|base_font_size
|
730
|
-
|<<values,number>>
|
731
|
-
|font_size: 10.5
|
732
|
-
|
733
|
-
|base_line_height_length^[1]^
|
734
|
-
|<<values,number>>
|
735
|
-
|line_height_length: 12
|
736
|
-
|
737
|
-
|base_line_height^[1]^
|
738
|
-
|<<values,number>>
|
739
|
-
|line_height: 1.14
|
740
|
-
|
741
|
-
|base_font_size_large
|
742
|
-
|<<values,number>>
|
743
|
-
|font_size_large: 13
|
744
|
-
|
745
|
-
|base_font_size_small
|
746
|
-
|<<values,number>>
|
747
|
-
|font_size_small: 9
|
748
|
-
|
749
|
-
|base_font_size_min
|
750
|
-
|<<values,number>>
|
751
|
-
|font_size_small: 6
|
780
|
+
3+|*Key Prefix:* base
|
752
781
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
782
|
+
|align
|
783
|
+
|left {vbar} center {vbar} right {vbar} justify +
|
784
|
+
(default: left)
|
785
|
+
|base:
|
786
|
+
align: justify
|
756
787
|
|
757
|
-
|
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|<<values,number>>
|
763
|
-
|border_radius: 4
|
764
|
-
|
765
|
-
|base_border_width
|
766
|
-
|<<values,number>>
|
767
|
-
|border_width: 0.5
|
788
|
+
|font_color
|
789
|
+
|<<colors,Color>> +
|
790
|
+
(default: #000000)
|
791
|
+
|base:
|
792
|
+
font_color: #333333
|
768
793
|
|
769
|
-
|
|
770
|
-
|<<
|
771
|
-
|
794
|
+
|font_family
|
795
|
+
|<<fonts,Font family name>> +
|
796
|
+
(default: Helvetica)
|
797
|
+
|base:
|
798
|
+
font_family: Noto Serif
|
799
|
+
|
800
|
+
|font_size
|
801
|
+
|<<values,Number>> +
|
802
|
+
(default: 12)
|
803
|
+
|base:
|
804
|
+
font_size: 10.5
|
805
|
+
|
806
|
+
// font_size_large and font_size_small aren't official keys
|
807
|
+
//|font_size_large
|
808
|
+
//|<<values,Number>>
|
809
|
+
//|base:
|
810
|
+
// font_size_large: 13
|
811
|
+
//
|
812
|
+
//|font_size_small
|
813
|
+
//|<<values,Number>>
|
814
|
+
//|base:
|
815
|
+
// font_size_small: 9
|
816
|
+
|
817
|
+
|font_size_min
|
818
|
+
|<<values,Number>> +
|
819
|
+
(default: 9)
|
820
|
+
|base:
|
821
|
+
font_size_min: 6
|
822
|
+
|
823
|
+
|font_style
|
824
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic +
|
825
|
+
(default: normal)
|
826
|
+
|base:
|
827
|
+
font_style: normal
|
828
|
+
|
829
|
+
|line_height_length^[1]^
|
830
|
+
|<<values,Number>> +
|
831
|
+
(default: 13.8)
|
832
|
+
|base:
|
833
|
+
line_height_length: 12
|
834
|
+
|
835
|
+
|line_height^[1]^
|
836
|
+
|<<values,Number>> +
|
837
|
+
(default: 1.15)
|
838
|
+
|base:
|
839
|
+
line_height: >
|
840
|
+
$base_line_height_length /
|
841
|
+
$base_font_size
|
842
|
+
|
843
|
+
// border_radius is not an official key
|
844
|
+
//|border_radius
|
845
|
+
//|<<values,Number>>
|
846
|
+
//|base:
|
847
|
+
// border_radius: 4
|
848
|
+
|
849
|
+
|border_width
|
850
|
+
|<<values,Number>> +
|
851
|
+
(default: 0.5)
|
852
|
+
|base:
|
853
|
+
border_width: 0.5
|
854
|
+
|
855
|
+
|border_color
|
856
|
+
|<<colors,Color>> +
|
857
|
+
(default: #eeeeee)
|
858
|
+
|base:
|
859
|
+
border_color: #eeeeee
|
772
860
|
|===
|
773
861
|
|
774
|
-
|
775
|
-
For instance, if you set `line_height_length`, then use
|
862
|
+
. You should set one of `line_height` or `line_height_length`, then derive the value of the other using a calculation as these are correlated values.
|
863
|
+
For instance, if you set `line_height_length`, then use `$base_line_height_length / $base_font_size` as the value of `line_height`.
|
776
864
|
|
777
|
-
=== Vertical
|
865
|
+
=== Vertical Spacing
|
778
866
|
|
779
|
-
|
867
|
+
The keys in this category control the general spacing between elements where a more specific setting is not designated.
|
868
|
+
|
869
|
+
[cols="3,4,5l"]
|
780
870
|
|===
|
781
871
|
|Key |Value Type |Example
|
782
872
|
|
783
|
-
|
|
784
|
-
|<<values,
|
785
|
-
|
786
|
-
|
787
|
-
|horizontal_rhythm
|
788
|
-
|<<values,number>>
|
789
|
-
|horizontal_rhythm: 12
|
873
|
+
|vertical_spacing
|
874
|
+
|<<values,Number>> +
|
875
|
+
(default: 12)
|
876
|
+
|vertical_spacing: 10
|
790
877
|
|===
|
791
878
|
|
792
|
-
NOTE: Vertical and horizontal rhythm are used for vertical and horizontal spacing, respectively, when there a specific theme key is not defined for a certain purpose.
|
793
|
-
These keys predated the CSS-style theme system and are planned to be phased out.
|
794
|
-
|
795
879
|
=== Link
|
796
880
|
|
797
|
-
|
881
|
+
The keys in this category are used to style hyperlink text.
|
882
|
+
|
883
|
+
[cols="3,4,5l"]
|
798
884
|
|===
|
799
885
|
|Key |Value Type |Example
|
800
886
|
|
801
|
-
|
802
|
-
|
803
|
-
|font_color
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
887
|
+
3+|*Key Prefix:* link
|
888
|
+
|
889
|
+
|font_color
|
890
|
+
|<<colors,Color>> +
|
891
|
+
(default: #0000ee)
|
892
|
+
|link:
|
893
|
+
font_color: #428bca
|
894
|
+
|
895
|
+
// font_family, font_size and font_style not yet implemented
|
896
|
+
//|font_family
|
897
|
+
//|<<fonts,Font family name>>
|
898
|
+
//|link:
|
899
|
+
// font_family: Roboto
|
900
|
+
//
|
901
|
+
//|font_size
|
902
|
+
//|<<values,Number>>
|
903
|
+
//|link:
|
904
|
+
// font_size: 9
|
905
|
+
//
|
906
|
+
//|font_style
|
907
|
+
//|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
908
|
+
//|link:
|
909
|
+
// font_style: normal
|
816
910
|
|===
|
817
911
|
|
818
|
-
=== Literal
|
912
|
+
=== Literal (Inline)
|
819
913
|
|
820
|
-
The
|
914
|
+
The keys in this category are used for inline monospaced text in prose and table cells.
|
821
915
|
|
822
|
-
[cols="3,
|
916
|
+
[cols="3,4,5l"]
|
823
917
|
|===
|
824
918
|
|Key |Value Type |Example
|
825
919
|
|
826
|
-
|
827
|
-
|<<colors,color>>
|
828
|
-
|font_color: #b12146
|
920
|
+
3+|*Key Prefix:* literal
|
829
921
|
|
830
|
-
|
|
831
|
-
|<<
|
832
|
-
|
|
922
|
+
|font_color
|
923
|
+
|<<colors,Color>>
|
924
|
+
|literal:
|
925
|
+
font_color: #b12146
|
833
926
|
|
834
|
-
|
|
835
|
-
|<<
|
836
|
-
|
927
|
+
|font_family
|
928
|
+
|<<fonts,Font family name>> +
|
929
|
+
(default: Courier)
|
930
|
+
|literal:
|
931
|
+
font_family: M+ 1mn
|
837
932
|
|
838
|
-
|
|
839
|
-
|
840
|
-
|
|
933
|
+
|font_size
|
934
|
+
|<<values,Number>>
|
935
|
+
|literal:
|
936
|
+
font_size: 12
|
937
|
+
|
938
|
+
|font_style
|
939
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
940
|
+
|literal:
|
941
|
+
font_style: bold
|
841
942
|
|===
|
842
943
|
|
843
944
|
=== Heading
|
844
945
|
|
845
|
-
|
946
|
+
The keys in this category control the style of most headings, including part titles, chapter titles, sections titles, the table of contents title and discrete headings.
|
947
|
+
|
948
|
+
[cols="3,4,5l"]
|
846
949
|
|===
|
847
950
|
|Key |Value Type |Example
|
848
951
|
|
849
|
-
|
850
|
-
|
851
|
-
|
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
|
858
|
-
|<<
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
|
952
|
+
3+|*Key Prefix:* heading
|
953
|
+
|
954
|
+
|align
|
955
|
+
|left {vbar} center {vbar} right {vbar} justify +
|
956
|
+
(default: left)
|
957
|
+
|heading:
|
958
|
+
align: center
|
959
|
+
|
960
|
+
|font_color
|
961
|
+
|<<colors,Color>> +
|
962
|
+
(default: $base_font_color)
|
963
|
+
|heading:
|
964
|
+
font_color: #222222
|
965
|
+
|
966
|
+
|font_family
|
967
|
+
|<<fonts,Font family name>> +
|
968
|
+
(default: $base_font_family)
|
969
|
+
|heading:
|
970
|
+
font_family: Noto Serif
|
971
|
+
|
972
|
+
|font_size
|
973
|
+
|<<values,Number>> +
|
974
|
+
(default: $base_font_size)
|
975
|
+
|heading:
|
976
|
+
font_size: 18
|
977
|
+
|
978
|
+
|font_style
|
979
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic +
|
980
|
+
(default: bold)
|
981
|
+
|heading:
|
982
|
+
font_style: bold
|
864
983
|
|
865
|
-
|
|
866
|
-
|<<
|
867
|
-
|
984
|
+
|line_height
|
985
|
+
|<<values,Number>> +
|
986
|
+
(default: 1.15)
|
987
|
+
|heading:
|
988
|
+
line_height: 1.2
|
868
989
|
|
869
|
-
|
|
870
|
-
|<<
|
871
|
-
|
990
|
+
|margin_top
|
991
|
+
|<<measurement-units,Measurement>> +
|
992
|
+
(default: 4)
|
993
|
+
|heading:
|
994
|
+
margin_top: $vertical_spacing * 0.2
|
995
|
+
|
996
|
+
|margin_bottom
|
997
|
+
|<<measurement-units,Measurement>> +
|
998
|
+
(default: 12)
|
999
|
+
|heading:
|
1000
|
+
margin_bottom: 9.6
|
1001
|
+
|
1002
|
+
|text_transform
|
1003
|
+
|none {vbar} uppercase {vbar} lowercase +
|
1004
|
+
(default: none)
|
1005
|
+
|heading:
|
1006
|
+
text_transform: uppercase
|
1007
|
+
|
1008
|
+
3+|*Key Prefix:* heading_h<n>^[1]^
|
1009
|
+
|
1010
|
+
|align
|
1011
|
+
|left {vbar} center {vbar} right {vbar} justify +
|
1012
|
+
(default: $heading_align)
|
1013
|
+
|heading:
|
1014
|
+
h2_align: center
|
1015
|
+
|
1016
|
+
|font_color
|
1017
|
+
|<<colors,Color>> +
|
1018
|
+
(default: $heading_font_color)
|
1019
|
+
|heading:
|
1020
|
+
h2_font_color: [0, 99%, 100%, 0]
|
1021
|
+
|
1022
|
+
|font_family
|
1023
|
+
|<<fonts,Font family name>> +
|
1024
|
+
(default: $heading_font_family)
|
1025
|
+
|heading:
|
1026
|
+
h4_font_family: Roboto
|
1027
|
+
|
1028
|
+
|font_size^[1]^
|
1029
|
+
|<<values,Number>> +
|
1030
|
+
(default: h1=24; h2=18; h3=16; h4=14; h5=12; h6=10)
|
1031
|
+
|heading:
|
1032
|
+
h6_font_size: $base_font_size * 1.7
|
1033
|
+
|
1034
|
+
|font_style
|
1035
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic +
|
1036
|
+
(default: $heading_font_style)
|
1037
|
+
|heading:
|
1038
|
+
h3_font_style: bold_italic
|
1039
|
+
|
1040
|
+
|text_transform
|
1041
|
+
|none {vbar} uppercase {vbar} lowercase +
|
1042
|
+
(default: $heading_text_transform)
|
1043
|
+
|heading:
|
1044
|
+
text_transform: lowercase
|
1045
|
+
|===
|
872
1046
|
|
873
|
-
|
874
|
-
|
875
|
-
|
1047
|
+
. `<n>` is a number ranging from 1 to 6, representing each of the six heading levels.
|
1048
|
+
. A font size is assigned to each heading level by the base theme.
|
1049
|
+
If you want the font size of a specific level to be inherited, you must assign the value `null` (or `~` for short).
|
876
1050
|
|
877
|
-
|
878
|
-
|normal, italic, bold, bold_italic
|
879
|
-
|h3_font_style: bold_italic
|
1051
|
+
=== Title Page
|
880
1052
|
|
881
|
-
|
882
|
-
|<<values,number>>
|
883
|
-
|line_height: 1.2
|
1053
|
+
The keys in this category control the style of the title page as well as the arrangement and style of the elements on it.
|
884
1054
|
|
885
|
-
|
886
|
-
|<<measurement-units,measurement>>
|
887
|
-
|margin_top: $vertical_rhythm * 0.2
|
1055
|
+
TIP: The title page can be disabled from the document by setting the `notitle` attribute in the document header.
|
888
1056
|
|
889
|
-
|
890
|
-
|<<measurement-units,measurement>>
|
891
|
-
|margin_bottom: 9.600
|
1057
|
+
[cols="3,4,5l"]
|
892
1058
|
|===
|
1059
|
+
|Key |Value Type |Example
|
893
1060
|
|
894
|
-
|
1061
|
+
3+|*Key Prefix:* title_page
|
895
1062
|
|
896
|
-
|
1063
|
+
|align
|
1064
|
+
|left {vbar} center {vbar} right {vbar} justify +
|
1065
|
+
(default: center)
|
1066
|
+
|title_page:
|
1067
|
+
align: right
|
897
1068
|
|
898
|
-
[
|
899
|
-
|
900
|
-
|
|
1069
|
+
|background_color^[1]^
|
1070
|
+
|<<colors,Color>>
|
1071
|
+
|title_page:
|
1072
|
+
background_color: #eaeaea
|
901
1073
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
1074
|
+
|background_image^[1]^
|
1075
|
+
|Inline image macro^[2]^
|
1076
|
+
|title_page:
|
1077
|
+
+background_image: image:title.png[]+
|
905
1078
|
|
906
|
-
|
|
907
|
-
|<<colors,
|
908
|
-
|
|
1079
|
+
|font_color
|
1080
|
+
|<<colors,Color>>
|
1081
|
+
|title_page:
|
1082
|
+
font_color: #333333
|
909
1083
|
|
910
|
-
|
|
911
|
-
|
912
|
-
|
1084
|
+
|font_family
|
1085
|
+
|<<fonts,Font family name>>
|
1086
|
+
|title_page:
|
1087
|
+
font_family: Noto Serif
|
913
1088
|
|
914
|
-
|
|
915
|
-
|
916
|
-
|
|
1089
|
+
|font_size
|
1090
|
+
|<<values,Number>>
|
1091
|
+
|title_page:
|
1092
|
+
font_size: $base_font_size_large
|
917
1093
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
1094
|
+
|font_style
|
1095
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
1096
|
+
|title_page:
|
1097
|
+
font_style: bold
|
921
1098
|
|
922
|
-
|
|
923
|
-
|
924
|
-
|
1099
|
+
|line_height
|
1100
|
+
|<<values,Number>> +
|
1101
|
+
(default: 1.15)
|
1102
|
+
|title_page:
|
1103
|
+
line_height: 1
|
925
1104
|
|
926
|
-
|
927
|
-
|percentage
|
928
|
-
|title_top: 55%
|
1105
|
+
3+|*Key Prefix:* title_page_logo
|
929
1106
|
|
930
|
-
|
|
931
|
-
|
932
|
-
|
|
1107
|
+
|align
|
1108
|
+
|left {vbar} center {vbar} right
|
1109
|
+
|title_page:
|
1110
|
+
logo:
|
1111
|
+
align: right
|
933
1112
|
|
934
|
-
|
|
935
|
-
|
936
|
-
|
|
1113
|
+
|image
|
1114
|
+
|Inline image macro^[2]^
|
1115
|
+
|title_page:
|
1116
|
+
logo:
|
1117
|
+
+image: image:logo.png[pdfwidth=25%]+
|
937
1118
|
|
938
|
-
|
|
939
|
-
|
940
|
-
|
1119
|
+
|top
|
1120
|
+
|Percentage +
|
1121
|
+
(default: 10%)
|
1122
|
+
|title_page:
|
1123
|
+
logo:
|
1124
|
+
top: 25%
|
941
1125
|
|
942
|
-
|
943
|
-
|<<values,number>>
|
944
|
-
|subtitle_font_size: 18
|
1126
|
+
3+|*Key Prefix:* title_page_title
|
945
1127
|
|
946
|
-
|
|
947
|
-
|
948
|
-
|
|
1128
|
+
|font_color
|
1129
|
+
|<<colors,Color>>
|
1130
|
+
|title_page:
|
1131
|
+
title:
|
1132
|
+
font_color: #999999
|
949
1133
|
|
950
|
-
|
|
951
|
-
|<<
|
952
|
-
|
|
1134
|
+
|font_family
|
1135
|
+
|<<fonts,Font family name>>
|
1136
|
+
|title_page:
|
1137
|
+
title:
|
1138
|
+
font_family: Noto Serif
|
953
1139
|
|
954
|
-
|
|
955
|
-
|<<
|
956
|
-
|
1140
|
+
|font_size
|
1141
|
+
|<<values,Number>> +
|
1142
|
+
(default: 18)
|
1143
|
+
|title_page:
|
1144
|
+
title:
|
1145
|
+
font_size: $heading_h1_font_size
|
957
1146
|
|
958
|
-
|
|
959
|
-
|
960
|
-
|
|
1147
|
+
|font_style
|
1148
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
1149
|
+
|title_page:
|
1150
|
+
title:
|
1151
|
+
font_style: bold
|
961
1152
|
|
962
|
-
|
|
963
|
-
|<<
|
964
|
-
|
|
1153
|
+
|line_height
|
1154
|
+
|<<values,Number>>
|
1155
|
+
|title_page:
|
1156
|
+
title:
|
1157
|
+
line_height: 0.9
|
965
1158
|
|
966
|
-
|
|
967
|
-
|
968
|
-
|
1159
|
+
|top
|
1160
|
+
|Percentage +
|
1161
|
+
(default: 40%)
|
1162
|
+
|title_page:
|
1163
|
+
title:
|
1164
|
+
top: 55%
|
1165
|
+
|
1166
|
+
3+|*Key Prefix:* title_page_subtitle
|
1167
|
+
|
1168
|
+
|font_color
|
1169
|
+
|<<colors,Color>>
|
1170
|
+
|title_page:
|
1171
|
+
subtitle:
|
1172
|
+
font_color: #181818
|
1173
|
+
|
1174
|
+
|font_family
|
1175
|
+
|<<fonts,Font family name>>
|
1176
|
+
|title_page:
|
1177
|
+
subtitle:
|
1178
|
+
font_family: Noto Serif
|
1179
|
+
|
1180
|
+
|font_size
|
1181
|
+
|<<values,Number>> +
|
1182
|
+
(default: 14)
|
1183
|
+
|title_page:
|
1184
|
+
subtitle:
|
1185
|
+
font_size: $heading_h3_font_size
|
1186
|
+
|
1187
|
+
|font_style
|
1188
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
1189
|
+
|title_page:
|
1190
|
+
subtitle:
|
1191
|
+
font_style: bold_italic
|
1192
|
+
|
1193
|
+
|line_height
|
1194
|
+
|<<values,Number>>
|
1195
|
+
|title_page:
|
1196
|
+
subtitle:
|
1197
|
+
line_height: 1
|
1198
|
+
|
1199
|
+
3+|*Key Prefix:* title_page_authors
|
1200
|
+
|
1201
|
+
|font_color
|
1202
|
+
|<<colors,Color>>
|
1203
|
+
|title_page:
|
1204
|
+
authors:
|
1205
|
+
font_color: #181818
|
1206
|
+
|
1207
|
+
|font_family
|
1208
|
+
|<<fonts,Font family name>>
|
1209
|
+
|title_page:
|
1210
|
+
authors:
|
1211
|
+
font_family: Noto Serif
|
1212
|
+
|
1213
|
+
|font_size
|
1214
|
+
|<<values,Number>>
|
1215
|
+
|title_page:
|
1216
|
+
authors:
|
1217
|
+
font_size: $base_font_size_large
|
1218
|
+
|
1219
|
+
|font_style
|
1220
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
1221
|
+
|title_page:
|
1222
|
+
authors:
|
1223
|
+
font_style: bold_italic
|
1224
|
+
|
1225
|
+
|margin_top
|
1226
|
+
|<<measurement-units,Measurement>> +
|
1227
|
+
(default: 12)
|
1228
|
+
|title_page:
|
1229
|
+
authors:
|
1230
|
+
margin_top: 13.125
|
1231
|
+
|
1232
|
+
3+|*Key Prefix:* title_page_revision
|
1233
|
+
|
1234
|
+
|font_color
|
1235
|
+
|<<colors,Color>>
|
1236
|
+
|title_page:
|
1237
|
+
revision:
|
1238
|
+
font_color: #181818
|
1239
|
+
|
1240
|
+
|font_family
|
1241
|
+
|<<fonts,Font family name>>
|
1242
|
+
|title_page:
|
1243
|
+
revision:
|
1244
|
+
font_family: Noto Serif
|
1245
|
+
|
1246
|
+
|font_size
|
1247
|
+
|<<values,Number>>
|
1248
|
+
|title_page:
|
1249
|
+
revision:
|
1250
|
+
font_size: $base_font_size_small
|
1251
|
+
|
1252
|
+
|font_style
|
1253
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
1254
|
+
|title_page:
|
1255
|
+
revision:
|
1256
|
+
font_style: bold
|
1257
|
+
|
1258
|
+
|margin_top
|
1259
|
+
|<<measurement-units,Measurement>>
|
1260
|
+
|title_page:
|
1261
|
+
revision:
|
1262
|
+
margin_top: 13.125
|
969
1263
|
|===
|
970
1264
|
|
971
|
-
|
972
|
-
|
973
|
-
^[1]^ Background colors and images do not currently work when using AsciidoctorJ PDF.
|
1265
|
+
. Page backgrounds do not currently work when using AsciidoctorJ PDF.
|
974
1266
|
This limitation is due to a bug in Prawn 1.3.1.
|
975
1267
|
The limitation will remain until AsciidoctorJ PDF upgrades to Prawn 2.x (an upgrade that is waiting on AsciidoctorJ to migrate to JRuby 9000).
|
976
1268
|
For more details, see http://discuss.asciidoctor.org/Asciidoctor-YAML-style-file-for-PDF-and-maven-td3849.html[this thread].
|
1269
|
+
. Target may be an absolute path or a path relative to the value of the `pdf-stylesdir` attribute.
|
977
1270
|
|
978
1271
|
=== Block
|
979
1272
|
|
980
|
-
|
1273
|
+
The keys in this category control the spacing around block elements when a more specific setting is not designated.
|
1274
|
+
|
1275
|
+
[cols="3,4,5l"]
|
981
1276
|
|===
|
982
1277
|
|Key |Value Type |Example
|
983
1278
|
|
984
|
-
|
985
|
-
|
986
|
-
|
1279
|
+
3+|*Key Prefix:* block
|
1280
|
+
|
1281
|
+
//|padding
|
1282
|
+
//|<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>>
|
1283
|
+
//|block:
|
1284
|
+
// padding: [12, 15, 12, 15]
|
987
1285
|
|
988
|
-
|
|
989
|
-
|<<measurement-units,
|
990
|
-
|
1286
|
+
|margin_top
|
1287
|
+
|<<measurement-units,Measurement>> +
|
1288
|
+
(default: 0)
|
1289
|
+
|block:
|
1290
|
+
margin_top: 6
|
991
1291
|
|
992
|
-
|
|
993
|
-
|<<measurement-units,
|
994
|
-
|
1292
|
+
|margin_bottom
|
1293
|
+
|<<measurement-units,Measurement>> +
|
1294
|
+
(default: 12)
|
1295
|
+
|block:
|
1296
|
+
margin_bottom: 6
|
995
1297
|
|===
|
996
1298
|
|
997
1299
|
Block styles are applied to the following block types:
|
@@ -1014,587 +1316,979 @@ Block styles are applied to the following block types:
|
|
1014
1316
|
|
1015
1317
|
=== Caption
|
1016
1318
|
|
1017
|
-
|
1319
|
+
The keys in this category control the arrangement and style of block captions.
|
1320
|
+
|
1321
|
+
[cols="3,4,5l"]
|
1018
1322
|
|===
|
1019
1323
|
|Key |Value Type |Example
|
1020
1324
|
|
1021
|
-
|
1022
|
-
|<<colors,color>>
|
1023
|
-
|font_color: #333333
|
1024
|
-
|
1025
|
-
|caption_font_family
|
1026
|
-
|<<fonts,font family name>>
|
1027
|
-
|font_family: M+ 1mn
|
1028
|
-
|
1029
|
-
|caption_font_size
|
1030
|
-
|<<values,number>>
|
1031
|
-
|font_size: 11
|
1325
|
+
3+|*Key Prefix:* caption
|
1032
1326
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
1327
|
+
|align
|
1328
|
+
|left {vbar} center {vbar} right {vbar} justify +
|
1329
|
+
(default: left)
|
1330
|
+
|caption:
|
1331
|
+
align: left
|
1036
1332
|
|
1037
|
-
|
|
1038
|
-
|
1039
|
-
|
|
1040
|
-
|
1041
|
-
|caption_margin_inside
|
1042
|
-
|<<measurement-units,measurement>>
|
1043
|
-
|margin_inside: 3
|
1333
|
+
|font_color
|
1334
|
+
|<<colors,Color>>
|
1335
|
+
|caption:
|
1336
|
+
font_color: #333333
|
1044
1337
|
|
1045
|
-
|
|
1046
|
-
|<<
|
1047
|
-
|
|
1338
|
+
|font_family
|
1339
|
+
|<<fonts,Font family name>>
|
1340
|
+
|caption:
|
1341
|
+
font_family: M+ 1mn
|
1342
|
+
|
1343
|
+
|font_size
|
1344
|
+
|<<values,Number>>
|
1345
|
+
|caption:
|
1346
|
+
font_size: 11
|
1347
|
+
|
1348
|
+
|font_style
|
1349
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic +
|
1350
|
+
(default: italic)
|
1351
|
+
|caption:
|
1352
|
+
font_style: italic
|
1353
|
+
|
1354
|
+
|margin_inside
|
1355
|
+
|<<measurement-units,Measurement>> +
|
1356
|
+
(default: 4)
|
1357
|
+
|caption:
|
1358
|
+
margin_inside: 3
|
1359
|
+
|
1360
|
+
|margin_outside
|
1361
|
+
|<<measurement-units,Measurement>> +
|
1362
|
+
(default: 0)
|
1363
|
+
|caption:
|
1364
|
+
margin_outside: 0
|
1048
1365
|
|===
|
1049
1366
|
|
1050
1367
|
=== Code
|
1051
1368
|
|
1052
|
-
|
1369
|
+
The keys in this category are used to control the style of literal, listing and source blocks.
|
1370
|
+
|
1371
|
+
[cols="3,4,5l"]
|
1053
1372
|
|===
|
1054
1373
|
|Key |Value Type |Example
|
1055
1374
|
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
|
1059
|
-
|
1060
|
-
|
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|<<colors,color>>
|
1086
|
-
|border_color: #cccccc
|
1087
|
-
|
1088
|
-
|code_border_radius
|
1089
|
-
|<<values,number>>
|
1090
|
-
|border_radius: 4
|
1375
|
+
3+|*Key Prefix:* code
|
1376
|
+
|
1377
|
+
|background_color
|
1378
|
+
|<<colors,Color>>
|
1379
|
+
|code:
|
1380
|
+
background_color: #f5f5f5
|
1381
|
+
|
1382
|
+
|border_color
|
1383
|
+
|<<colors,Color>> +
|
1384
|
+
(default: #eeeeee)
|
1385
|
+
|code:
|
1386
|
+
border_color: #cccccc
|
1387
|
+
|
1388
|
+
|border_radius
|
1389
|
+
|<<values,Number>> +
|
1390
|
+
(default: 0)
|
1391
|
+
|code:
|
1392
|
+
border_radius: 4
|
1393
|
+
|
1394
|
+
|border_width
|
1395
|
+
|<<values,Number>> +
|
1396
|
+
(default: 0.5)
|
1397
|
+
|code:
|
1398
|
+
border_width: 0.75
|
1399
|
+
|
1400
|
+
|font_color
|
1401
|
+
|<<colors,Color>>
|
1402
|
+
|code:
|
1403
|
+
font_color: #333333
|
1091
1404
|
|
1092
|
-
|
|
1093
|
-
|<<
|
1094
|
-
|
1405
|
+
|font_family
|
1406
|
+
|<<fonts,Font family name>> +
|
1407
|
+
(default: Courier)
|
1408
|
+
|code:
|
1409
|
+
font_family: M+ 1mn
|
1410
|
+
|
1411
|
+
|font_size
|
1412
|
+
|<<values,Number>> +
|
1413
|
+
(default: 10.5)
|
1414
|
+
|code:
|
1415
|
+
font_size: 11
|
1416
|
+
|
1417
|
+
|font_style
|
1418
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
1419
|
+
|code:
|
1420
|
+
font_style: italic
|
1421
|
+
|
1422
|
+
|line_height
|
1423
|
+
|<<values,Number>> +
|
1424
|
+
(default: 1.2)
|
1425
|
+
|code:
|
1426
|
+
line_height: 1.25
|
1427
|
+
|
1428
|
+
|padding
|
1429
|
+
|<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>> +
|
1430
|
+
(default: 9)
|
1431
|
+
|code:
|
1432
|
+
padding: 11
|
1095
1433
|
|===
|
1096
1434
|
|
1097
1435
|
=== Blockquote
|
1098
1436
|
|
1099
|
-
|
1437
|
+
The keys in this category control the arrangement and style of quote blocks.
|
1438
|
+
|
1439
|
+
[cols="3,4,5l"]
|
1100
1440
|
|===
|
1101
1441
|
|Key |Value Type |Example
|
1102
1442
|
|
1103
|
-
|
1104
|
-
|<<colors,color>>
|
1105
|
-
|font_color: #333333
|
1106
|
-
|
1107
|
-
|blockquote_font_family
|
1108
|
-
|<<fonts,font family name>>
|
1109
|
-
|font_family: Noto Serif
|
1110
|
-
|
1111
|
-
|blockquote_font_size
|
1112
|
-
|<<values,number>>
|
1113
|
-
|font_size: 13
|
1443
|
+
3+|*Key Prefix:* blockquote
|
1114
1444
|
|
1115
|
-
|
|
1116
|
-
|
1117
|
-
|
1445
|
+
|border_width
|
1446
|
+
|<<values,Number>> +
|
1447
|
+
(default: 4)
|
1448
|
+
|blockquote:
|
1449
|
+
border_width: 5
|
1118
1450
|
|
1119
|
-
|
|
1120
|
-
|<<
|
1121
|
-
|
1451
|
+
|border_color
|
1452
|
+
|<<colors,Color>> +
|
1453
|
+
(default: #eeeeee)
|
1454
|
+
|blockquote:
|
1455
|
+
border_color: #eeeeee
|
1122
1456
|
|
1123
|
-
|
|
1124
|
-
|<<colors,
|
1125
|
-
|
|
1126
|
-
|
1127
|
-
|blockquote_cite_font_size
|
1128
|
-
|<<values,number>>
|
1129
|
-
|cite_font_size: 9
|
1457
|
+
|font_color
|
1458
|
+
|<<colors,Color>>
|
1459
|
+
|blockquote:
|
1460
|
+
font_color: #333333
|
1130
1461
|
|
1131
|
-
|
|
1132
|
-
|<<
|
1133
|
-
|
|
1462
|
+
|font_family
|
1463
|
+
|<<fonts,Font family name>>
|
1464
|
+
|blockquote:
|
1465
|
+
font_family: Noto Serif
|
1134
1466
|
|
1135
|
-
|
|
1136
|
-
|<<
|
1137
|
-
|
|
1467
|
+
|font_size
|
1468
|
+
|<<values,Number>>
|
1469
|
+
|blockquote:
|
1470
|
+
font_size: 13
|
1138
1471
|
|
1139
|
-
|
|
1140
|
-
|normal
|
1141
|
-
|
|
1472
|
+
|font_style
|
1473
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
1474
|
+
|blockquote:
|
1475
|
+
font_style: bold
|
1142
1476
|
|
1477
|
+
|padding
|
1478
|
+
|<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>> +
|
1479
|
+
(default: [6, 12, -6, 14])
|
1480
|
+
|blockquote:
|
1481
|
+
padding: [5, 10, -5, 12]
|
1482
|
+
|
1483
|
+
3+|*Key Prefix:* blockquote_cite
|
1484
|
+
|
1485
|
+
|font_size
|
1486
|
+
|<<values,Number>>
|
1487
|
+
|blockquote:
|
1488
|
+
cite:
|
1489
|
+
font_size: 9
|
1490
|
+
|
1491
|
+
|font_color
|
1492
|
+
|<<colors,Color>>
|
1493
|
+
|blockquote:
|
1494
|
+
cite:
|
1495
|
+
font_color: #999999
|
1496
|
+
|
1497
|
+
|font_family
|
1498
|
+
|<<fonts,Font family name>>
|
1499
|
+
|blockquote:
|
1500
|
+
cite:
|
1501
|
+
font_family: Noto Serif
|
1502
|
+
|
1503
|
+
|font_style
|
1504
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
1505
|
+
|blockquote:
|
1506
|
+
cite:
|
1507
|
+
font_style: bold
|
1143
1508
|
|===
|
1144
1509
|
|
1145
1510
|
=== Sidebar
|
1146
1511
|
|
1147
|
-
|
1512
|
+
The keys in this category control the arrangement and style of sidebar blocks.
|
1513
|
+
|
1514
|
+
[cols="3,4,5l"]
|
1148
1515
|
|===
|
1149
1516
|
|Key |Value Type |Example
|
1150
1517
|
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
|
1160
|
-
|<<
|
1161
|
-
|
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
|
1170
|
-
|
1171
|
-
|
|
1172
|
-
|
1173
|
-
|
1518
|
+
3+|*Key Prefix:* sidebar
|
1519
|
+
|
1520
|
+
|background_color
|
1521
|
+
|<<colors,Color>> +
|
1522
|
+
(default: #eeeeee)
|
1523
|
+
|sidebar:
|
1524
|
+
background_color: #eeeeee
|
1525
|
+
|
1526
|
+
|border_color
|
1527
|
+
|<<colors,Color>>
|
1528
|
+
|sidebar:
|
1529
|
+
border_color: #ffffff
|
1530
|
+
|
1531
|
+
|border_radius
|
1532
|
+
|<<values,Number>>
|
1533
|
+
|sidebar:
|
1534
|
+
border_radius: 4
|
1535
|
+
|
1536
|
+
|border_width
|
1537
|
+
|<<values,Number>>
|
1538
|
+
|sidebar:
|
1539
|
+
border_width: 0.5
|
1540
|
+
|
1541
|
+
|padding
|
1542
|
+
|<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>> +
|
1543
|
+
(default: [12, 12, 0, 12])
|
1544
|
+
|sidebar:
|
1545
|
+
padding: [12, 15, 0, 15]
|
1546
|
+
|
1547
|
+
3+|*Key Prefix:* sidebar_title
|
1548
|
+
|
1549
|
+
|align
|
1550
|
+
|left {vbar} center {vbar} right {vbar} justify +
|
1551
|
+
(default: center)
|
1552
|
+
|sidebar:
|
1553
|
+
title:
|
1554
|
+
align: center
|
1174
1555
|
|
1175
|
-
|
|
1176
|
-
|<<colors,
|
1177
|
-
|
|
1556
|
+
|font_color
|
1557
|
+
|<<colors,Color>>
|
1558
|
+
|sidebar:
|
1559
|
+
title:
|
1560
|
+
font_color: #333333
|
1178
1561
|
|
1179
|
-
|
|
1180
|
-
|<<fonts,
|
1181
|
-
|
|
1562
|
+
|font_family
|
1563
|
+
|<<fonts,Font family name>>
|
1564
|
+
|sidebar:
|
1565
|
+
title:
|
1566
|
+
font_family: Noto Serif
|
1182
1567
|
|
1183
|
-
|
|
1184
|
-
|<<values,
|
1185
|
-
|
|
1568
|
+
|font_size
|
1569
|
+
|<<values,Number>>
|
1570
|
+
|sidebar:
|
1571
|
+
title:
|
1572
|
+
font_size: 13
|
1186
1573
|
|
1187
|
-
|
|
1188
|
-
|normal
|
1189
|
-
|
1574
|
+
|font_style
|
1575
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic +
|
1576
|
+
(default: bold)
|
1577
|
+
|sidebar:
|
1578
|
+
title:
|
1579
|
+
font_style: bold
|
1190
1580
|
|===
|
1191
1581
|
|
1192
1582
|
=== Example
|
1193
1583
|
|
1194
|
-
|
1584
|
+
The keys in this category control the arrangement and style of example blocks.
|
1585
|
+
|
1586
|
+
[cols="3,4,5l"]
|
1195
1587
|
|===
|
1196
1588
|
|Key |Value Type |Example
|
1197
1589
|
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
|
1201
|
-
|
1202
|
-
|
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1590
|
+
3+|*Key Prefix:* example
|
1591
|
+
|
1592
|
+
|background_color
|
1593
|
+
|<<colors,Color>>
|
1594
|
+
|example:
|
1595
|
+
background_color: #fffef7
|
1596
|
+
|
1597
|
+
|border_color
|
1598
|
+
|<<colors,Color>> +
|
1599
|
+
(default: #eeeeee)
|
1600
|
+
|example:
|
1601
|
+
border_color: #eeeeee
|
1602
|
+
|
1603
|
+
|border_radius
|
1604
|
+
|<<values,Number>> +
|
1605
|
+
(default: 0)
|
1606
|
+
|example:
|
1607
|
+
border_radius: 4
|
1608
|
+
|
1609
|
+
|border_width
|
1610
|
+
|<<values,Number>> +
|
1611
|
+
(default: 0.5)
|
1612
|
+
|example:
|
1613
|
+
border_width: 0.75
|
1213
1614
|
|===
|
1214
1615
|
|
1215
1616
|
=== Admonition
|
1216
1617
|
|
1217
|
-
|
1618
|
+
The keys in this category control the arrangement and style of admonition blocks and the icon used for each admonition type.
|
1619
|
+
|
1620
|
+
[cols="3,4,5l"]
|
1218
1621
|
|===
|
1219
1622
|
|Key |Value Type |Example
|
1220
1623
|
|
1221
|
-
|
1222
|
-
|
1223
|
-
|border_color
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1624
|
+
3+|*Key Prefix:* admonition
|
1625
|
+
|
1626
|
+
|border_color
|
1627
|
+
|<<colors,Color>> +
|
1628
|
+
(default: #eeeeee)
|
1629
|
+
|admonition:
|
1630
|
+
border_color: #eeeeee
|
1631
|
+
|
1632
|
+
|border_width
|
1633
|
+
|<<values,Number>> +
|
1634
|
+
(default: 0.5)
|
1635
|
+
|admonition:
|
1636
|
+
border_width: 0.5
|
1637
|
+
|
1638
|
+
|padding
|
1639
|
+
|<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>> +
|
1640
|
+
(default: [0, 12, 0, 12])
|
1641
|
+
|admonition:
|
1642
|
+
padding: [0, 12, 0, 12]
|
1643
|
+
|
1644
|
+
3+|*Key Prefix:* admonition_icon
|
1645
|
+
|
1646
|
+
|<name>_name^[1]^
|
1647
|
+
|String^[2]^
|
1648
|
+
|admonition:
|
1649
|
+
icon:
|
1650
|
+
tip:
|
1651
|
+
name: fa-fire
|
1652
|
+
|
1653
|
+
|<name>_stroke_color^[1]^
|
1654
|
+
|<<colors,Color>>
|
1655
|
+
|admonition:
|
1656
|
+
icon:
|
1657
|
+
tip:
|
1658
|
+
stroke_color: ff0000
|
1659
|
+
|
1660
|
+
|<name>_size^[1]^
|
1661
|
+
|<<values,Number>> +
|
1239
1662
|
(default: 24)
|
1240
|
-
|
|
1663
|
+
|admonition:
|
1664
|
+
icon:
|
1665
|
+
tip:size: 24
|
1241
1666
|
|===
|
1242
1667
|
|
1243
|
-
|
1244
|
-
|
1668
|
+
. `<name>` can be `note`, `tip`, `warning`, `important` or `caution`. +
|
1669
|
+
. See the `.yml` files in the https://github.com/jessedoyle/prawn-icon/tree/master/data/fonts[prawn-icon repository] for a list of valid names.
|
1245
1670
|
The prefix (e.g., `fa-`) determines which font set to use.
|
1246
1671
|
|
1247
1672
|
=== Image
|
1248
1673
|
|
1249
|
-
|
1674
|
+
The keys in this category control the arrangement of block images.
|
1675
|
+
|
1676
|
+
[cols="3,4,5l"]
|
1250
1677
|
|===
|
1251
1678
|
|Key |Value Type |Example
|
1252
1679
|
|
1253
|
-
|
1254
|
-
|
1255
|
-
|align
|
1680
|
+
3+|*Key Prefix:* image
|
1681
|
+
|
1682
|
+
|align
|
1683
|
+
|left {vbar} center {vbar} right +
|
1684
|
+
(default: left)
|
1685
|
+
|image:
|
1686
|
+
align: left
|
1256
1687
|
|===
|
1257
1688
|
|
1258
1689
|
=== Lead
|
1259
1690
|
|
1260
|
-
|
1691
|
+
The keys in this category control the styling of lead paragraphs.
|
1692
|
+
|
1693
|
+
[cols="3,4,5l"]
|
1261
1694
|
|===
|
1262
1695
|
|Key |Value Type |Example
|
1263
1696
|
|
1264
|
-
|
1265
|
-
|
1266
|
-
|font_size
|
1697
|
+
3+|*Key Prefix:* lead
|
1698
|
+
|
1699
|
+
|font_size
|
1700
|
+
|<<values,Number>> +
|
1701
|
+
(default: 13.5)
|
1702
|
+
|lead:
|
1703
|
+
font_size: 13
|
1267
1704
|
|
1268
|
-
|
|
1269
|
-
|<<values,
|
1270
|
-
|
1705
|
+
|line_height
|
1706
|
+
|<<values,Number>> +
|
1707
|
+
(default: 1.4)
|
1708
|
+
|lead:
|
1709
|
+
line_height: 1.4
|
1271
1710
|
|===
|
1272
1711
|
|
1273
1712
|
=== Abstract
|
1274
1713
|
|
1275
|
-
|
1714
|
+
The keys in this category control the arrangement and style of the abstract.
|
1715
|
+
|
1716
|
+
[cols="3,4,5l"]
|
1276
1717
|
|===
|
1277
1718
|
|Key |Value Type |Example
|
1278
1719
|
|
1279
|
-
|
1280
|
-
|
1281
|
-
|font_color
|
1282
|
-
|
1283
|
-
|
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
|
1293
|
-
|
|
1720
|
+
3+|*Key Prefix:* abstract
|
1721
|
+
|
1722
|
+
|font_color
|
1723
|
+
|<<colors,Color>>
|
1724
|
+
|abstract:
|
1725
|
+
font_color: #5c6266
|
1726
|
+
|
1727
|
+
|font_size
|
1728
|
+
|<<values,Number>> +
|
1729
|
+
(default: 13.5)
|
1730
|
+
|abstract:
|
1731
|
+
font_size: 13
|
1732
|
+
|
1733
|
+
|font_style
|
1734
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
1735
|
+
|abstract:
|
1736
|
+
font_style: italic
|
1737
|
+
|
1738
|
+
|line_height
|
1739
|
+
|<<values,Number>> +
|
1740
|
+
(default: 1.4)
|
1741
|
+
|abstract:
|
1742
|
+
line_height: 1.4
|
1743
|
+
|
1744
|
+
|padding
|
1745
|
+
|<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>> +
|
1746
|
+
(default: 0)
|
1747
|
+
|abstract:
|
1748
|
+
padding: [0, 12, 0, 12]
|
1294
1749
|
|===
|
1295
1750
|
|
1296
|
-
=== Thematic
|
1751
|
+
=== Thematic Break
|
1752
|
+
|
1753
|
+
The keys in this category control the style of thematic breaks (aka horizontal rules).
|
1297
1754
|
|
1298
|
-
[cols="3,
|
1755
|
+
[cols="3,4,5l"]
|
1299
1756
|
|===
|
1300
1757
|
|Key |Value Type |Example
|
1301
1758
|
|
1302
|
-
|
1303
|
-
|
1304
|
-
|border_color
|
1759
|
+
3+|*Key Prefix:* thematic_break
|
1760
|
+
|
1761
|
+
|border_color
|
1762
|
+
|<<colors,Color>> +
|
1763
|
+
(default: #eeeeee)
|
1764
|
+
|thematic_break:
|
1765
|
+
border_color: #eeeeee
|
1305
1766
|
|
1306
|
-
|
|
1307
|
-
|solid
|
1767
|
+
|border_style
|
1768
|
+
|solid {vbar} double {vbar} dashed {vbar} dotted +
|
1308
1769
|
(default: solid)
|
1309
|
-
|
|
1770
|
+
|thematic_break:
|
1771
|
+
border_style: dashed
|
1772
|
+
|
1773
|
+
|border_width
|
1774
|
+
|<<measurement-units,Measurement>> +
|
1775
|
+
(default: 0.5)
|
1776
|
+
|thematic_break:
|
1777
|
+
border_width: 0.5
|
1778
|
+
|
1779
|
+
|margin_top
|
1780
|
+
|<<measurement-units,Measurement>>
|
1781
|
+
|thematic_break:
|
1782
|
+
margin_top: 6
|
1783
|
+
|
1784
|
+
|margin_bottom
|
1785
|
+
|<<measurement-units,Measurement>>
|
1786
|
+
|thematic_break:
|
1787
|
+
margin_bottom: 18
|
1788
|
+
|===
|
1310
1789
|
|
1311
|
-
|
1312
|
-
|<<measurement-units,measurement>>
|
1313
|
-
|border_width: 0.5
|
1790
|
+
=== Description List
|
1314
1791
|
|
1315
|
-
|
1316
|
-
|<<measurement-units,measurement>>
|
1317
|
-
|margin_top: 6
|
1792
|
+
The keys in this category control the arrangement and style of definition list items (terms and descriptions).
|
1318
1793
|
|
1319
|
-
|
1320
|
-
|<<measurement-units,measurement>>
|
1321
|
-
|margin_bottom: 18
|
1794
|
+
[cols="3,4,5l"]
|
1322
1795
|
|===
|
1796
|
+
|Key |Value Type |Example
|
1323
1797
|
|
1324
|
-
|
1798
|
+
3+|*Key Prefix:* description_list
|
1325
1799
|
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
|
1800
|
+
|term_font_style
|
1801
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
1802
|
+
|description_list:
|
1803
|
+
term_font_style: italic
|
1329
1804
|
|
1330
|
-
|
|
1331
|
-
|
1332
|
-
|
1805
|
+
|term_spacing
|
1806
|
+
|<<measurement-units,Measurement>> +
|
1807
|
+
(default: 4)
|
1808
|
+
|description_list:
|
1809
|
+
term_spacing: 5
|
1333
1810
|
|
1334
|
-
|
|
1335
|
-
|<<values,
|
1336
|
-
|
1811
|
+
|description_indent
|
1812
|
+
|<<values,Number>> +
|
1813
|
+
(default: 30)
|
1814
|
+
|description_list:
|
1815
|
+
description_indent: 15
|
1337
1816
|
|===
|
1338
1817
|
|
1818
|
+
=== Outline List
|
1339
1819
|
|
1340
|
-
|
1820
|
+
The keys in this category control the arrangement and style of outline list items.
|
1341
1821
|
|
1342
|
-
[cols="3,
|
1822
|
+
[cols="3,4,5l"]
|
1343
1823
|
|===
|
1344
1824
|
|Key |Value Type |Example
|
1345
1825
|
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
|
1826
|
+
3+|*Key Prefix:* outline_list
|
1827
|
+
|
1828
|
+
|indent
|
1829
|
+
|<<measurement-units,Measurement>> +
|
1830
|
+
(default: 30)
|
1831
|
+
|outline_list:
|
1832
|
+
indent: 40
|
1349
1833
|
|
1350
|
-
|
|
1351
|
-
|<<measurement-units,
|
1352
|
-
|
1834
|
+
|item_spacing
|
1835
|
+
|<<measurement-units,Measurement>> +
|
1836
|
+
(default: 6)
|
1837
|
+
|outline_list:
|
1838
|
+
item_spacing: 4
|
1353
1839
|
|===
|
1354
1840
|
|
1355
1841
|
=== Table
|
1356
1842
|
|
1357
|
-
|
1843
|
+
The keys in this category control the arrangement and style of tables and table cells.
|
1844
|
+
|
1845
|
+
[cols="3,4,5l"]
|
1358
1846
|
|===
|
1359
1847
|
|Key |Value Type |Example
|
1360
1848
|
|
1361
|
-
|
1362
|
-
|
1363
|
-
|background_color
|
1364
|
-
|
1365
|
-
|
|
1366
|
-
|
1367
|
-
|
1849
|
+
3+|*Key Prefix:* table
|
1850
|
+
|
1851
|
+
|background_color
|
1852
|
+
|<<colors,Color>>
|
1853
|
+
|table:
|
1854
|
+
background_color: #ffffff
|
1855
|
+
|
1856
|
+
|border_color
|
1857
|
+
|<<colors,Color>> +
|
1858
|
+
(default: #000000)
|
1859
|
+
|table:
|
1860
|
+
border_color: #dddddd
|
1861
|
+
|
1862
|
+
|border_width
|
1863
|
+
|<<values,Number>> +
|
1864
|
+
(default: 0.5)
|
1865
|
+
|table:
|
1866
|
+
border_width: 0.5
|
1867
|
+
|
1868
|
+
|font_color
|
1869
|
+
|<<colors,Color>> +
|
1870
|
+
(default: $base_font_color)
|
1871
|
+
|table:
|
1872
|
+
font_color: #333333
|
1368
1873
|
|
1369
|
-
|
|
1370
|
-
|<<
|
1371
|
-
|
|
1874
|
+
|font_family
|
1875
|
+
|<<fonts,Font family name>>
|
1876
|
+
|table:
|
1877
|
+
font_family: Helvetica
|
1878
|
+
|
1879
|
+
|font_size
|
1880
|
+
|<<values,Number>>
|
1881
|
+
|table:
|
1882
|
+
font_size: 9.5
|
1883
|
+
|
1884
|
+
|grid_color
|
1885
|
+
|<<colors,Color>> +
|
1886
|
+
(default: $table_border_color)
|
1887
|
+
|table:
|
1888
|
+
grid_color: #eeeeee
|
1889
|
+
|
1890
|
+
|grid_width
|
1891
|
+
|<<values,Number>> +
|
1892
|
+
(default: $table_border_width)
|
1893
|
+
|table:
|
1894
|
+
grid_width: 0.5
|
1895
|
+
|
1896
|
+
3+|*Key Prefix:* table_head
|
1897
|
+
|
1898
|
+
|background_color
|
1899
|
+
|<<colors,Color>> +
|
1900
|
+
(default: $table_background_color)
|
1901
|
+
|table:
|
1902
|
+
head:
|
1903
|
+
background_color: #f0f0f0
|
1904
|
+
|
1905
|
+
|font_color
|
1906
|
+
|<<colors,Color>> +
|
1907
|
+
(default: $table_font_color)
|
1908
|
+
|table:
|
1909
|
+
head:
|
1910
|
+
font_color: #333333
|
1911
|
+
|
1912
|
+
|font_family
|
1913
|
+
|<<fonts,Font family name>> +
|
1914
|
+
(default: $table_font_family)
|
1915
|
+
|table:
|
1916
|
+
head:
|
1917
|
+
font_family: Noto Serif
|
1918
|
+
|
1919
|
+
|font_size
|
1920
|
+
|<<values,Number>> +
|
1921
|
+
(default: $table_font_size)
|
1922
|
+
|table:
|
1923
|
+
head:
|
1924
|
+
font_size: 10
|
1925
|
+
|
1926
|
+
|font_style
|
1927
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic +
|
1928
|
+
(default: bold)
|
1929
|
+
|table:
|
1930
|
+
head:
|
1931
|
+
font_style: normal
|
1932
|
+
|
1933
|
+
|text_transform
|
1934
|
+
|none {vbar} uppercase {vbar} lowercase +
|
1935
|
+
(default: none)
|
1936
|
+
|table:
|
1937
|
+
head:
|
1938
|
+
text_transform: uppercase
|
1939
|
+
|
1940
|
+
3+|*Key Prefix:* table_foot
|
1941
|
+
|
1942
|
+
|background_color
|
1943
|
+
|<<colors,Color>> +
|
1944
|
+
(default: $table_background_color)
|
1945
|
+
|table:
|
1946
|
+
foot:
|
1947
|
+
background_color: #f0f0f0
|
1948
|
+
|
1949
|
+
|font_color
|
1950
|
+
|<<colors,Color>> +
|
1951
|
+
(default: $table_font_color)
|
1952
|
+
|table:
|
1953
|
+
foot:
|
1954
|
+
font_color: #333333
|
1955
|
+
|
1956
|
+
|font_family
|
1957
|
+
|<<fonts,Font family name>> +
|
1958
|
+
(default: $table_font_family)
|
1959
|
+
|table:
|
1960
|
+
foot:
|
1961
|
+
font_family: Noto Serif
|
1962
|
+
|
1963
|
+
|font_size
|
1964
|
+
|<<values,Number>> +
|
1965
|
+
(default: $table_font_size)
|
1966
|
+
|table:
|
1967
|
+
foot:
|
1968
|
+
font_size: 10
|
1969
|
+
|
1970
|
+
|font_style
|
1971
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic +
|
1972
|
+
(default: normal)
|
1973
|
+
|table:
|
1974
|
+
foot:
|
1975
|
+
font_style: italic
|
1976
|
+
|
1977
|
+
3+|*Key Prefix:* table_<parity>_row^[1]^
|
1978
|
+
|
1979
|
+
|background_color
|
1980
|
+
|<<colors,Color>>
|
1981
|
+
|table:
|
1982
|
+
even_row:
|
1983
|
+
background_color: #f9f9f9
|
1984
|
+
|
1985
|
+
3+|*Key Prefix:* table_cell
|
1986
|
+
|
1987
|
+
|padding
|
1988
|
+
|<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>> +
|
1989
|
+
(default: 2)
|
1990
|
+
|table:
|
1991
|
+
cell:
|
1992
|
+
padding: [3, 3, 6, 3]
|
1993
|
+
|
1994
|
+
3+|*Key Prefix:* table_header_cell
|
1995
|
+
|
1996
|
+
|align
|
1997
|
+
|left {vbar} center {vbar} right
|
1998
|
+
|table:
|
1999
|
+
header_cell:
|
2000
|
+
align: center
|
2001
|
+
|
2002
|
+
|background_color
|
2003
|
+
|<<colors,Color>>
|
2004
|
+
|table:
|
2005
|
+
header_cell:
|
2006
|
+
background_color: #f0f0f0
|
2007
|
+
|
2008
|
+
|font_color
|
2009
|
+
|<<colors,Color>>
|
2010
|
+
|table:
|
2011
|
+
header_cell:
|
2012
|
+
font_color: #1a1a1a
|
2013
|
+
|
2014
|
+
|font_family
|
2015
|
+
|<<fonts,Font family name>>
|
2016
|
+
|table:
|
2017
|
+
header_cell:
|
2018
|
+
font_family: Noto Sans
|
2019
|
+
|
2020
|
+
|font_size
|
2021
|
+
|<<values,Number>>
|
2022
|
+
|table:
|
2023
|
+
header_cell:
|
2024
|
+
font_size: 12
|
2025
|
+
|
2026
|
+
|font_style
|
2027
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
2028
|
+
|table:
|
2029
|
+
header_cell:
|
2030
|
+
font_style: italic
|
2031
|
+
|===
|
1372
2032
|
|
1373
|
-
|
1374
|
-
|<<colors,color>>
|
1375
|
-
|foot_background_color: #f0f0f0
|
2033
|
+
. `<parity>` can be `odd` (odd rows) or `even` (even rows).
|
1376
2034
|
|
1377
|
-
|
1378
|
-
|
1379
|
-
|align: center
|
2035
|
+
[[key-toc]]
|
2036
|
+
=== Table of Contents
|
1380
2037
|
|
1381
|
-
|
1382
|
-
|<<colors,color>>
|
1383
|
-
|background_color: #f0f0f0
|
2038
|
+
The keys in this category control the arrangement and style of the table of contents.
|
1384
2039
|
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
|
2040
|
+
[cols="3,4,5l"]
|
2041
|
+
|===
|
2042
|
+
|Key |Value Type |Example
|
1388
2043
|
|
1389
|
-
|
1390
|
-
|<<fonts,font family name>>
|
1391
|
-
|font_family: Noto Sans
|
2044
|
+
3+|*Key Prefix:* toc
|
1392
2045
|
|
1393
|
-
|
|
1394
|
-
|<<
|
1395
|
-
|
|
2046
|
+
|font_color
|
2047
|
+
|<<colors,Color>>
|
2048
|
+
|toc:
|
2049
|
+
font_color: #333333
|
1396
2050
|
|
1397
|
-
|
|
1398
|
-
|
1399
|
-
|
|
2051
|
+
|font_family
|
2052
|
+
|<<fonts,Font family name>>
|
2053
|
+
|toc:
|
2054
|
+
font_family: Noto Serif
|
1400
2055
|
|
1401
|
-
|
|
1402
|
-
|<<
|
1403
|
-
|
|
2056
|
+
|font_size
|
2057
|
+
|<<values,Number>>
|
2058
|
+
|toc:
|
2059
|
+
font_size: 9
|
1404
2060
|
|
1405
|
-
|
|
1406
|
-
|
1407
|
-
|
|
2061
|
+
|font_style
|
2062
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
2063
|
+
|toc:
|
2064
|
+
font_style: bold
|
1408
2065
|
|
1409
|
-
|
|
1410
|
-
|<<
|
1411
|
-
|
1412
|
-
|
2066
|
+
|line_height
|
2067
|
+
|<<values,Number>> +
|
2068
|
+
(default: 1.4)
|
2069
|
+
|toc:
|
2070
|
+
line_height: 1.5
|
1413
2071
|
|
1414
|
-
|
1415
|
-
|
2072
|
+
|indent
|
2073
|
+
|<<measurement-units,Measurement>> +
|
2074
|
+
(default: 15)
|
2075
|
+
|toc:
|
2076
|
+
indent: 20
|
1416
2077
|
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
|
2078
|
+
|margin_top
|
2079
|
+
|<<measurement-units,Measurement>>
|
2080
|
+
|toc:
|
2081
|
+
margin_top: 0
|
1420
2082
|
|
1421
|
-
|
1422
|
-
|double-quoted string
|
1423
|
-
|dot_leader_content: ". "
|
2083
|
+
3+|*Key Prefix:* toc_h<n>^[1]^
|
1424
2084
|
|
1425
|
-
|
|
1426
|
-
|<<colors,
|
1427
|
-
|
|
2085
|
+
|font_color
|
2086
|
+
|<<colors,Color>>
|
2087
|
+
|toc:
|
2088
|
+
h3_font_color: #999999
|
1428
2089
|
|
1429
|
-
|
1430
|
-
|<<colors,color>>
|
1431
|
-
|font_color: #333333
|
2090
|
+
3+|*Key Prefix:* toc_title^[2]^
|
1432
2091
|
|
1433
|
-
|
|
1434
|
-
|
1435
|
-
|
2092
|
+
|align
|
2093
|
+
|left {vbar} center {vbar} right {vbar} justify +
|
2094
|
+
(default: left)
|
2095
|
+
|toc:
|
2096
|
+
title:
|
2097
|
+
align: center
|
1436
2098
|
|
1437
|
-
|
1438
|
-
|<<fonts,font family name>>
|
1439
|
-
|font_family: Noto Serif
|
2099
|
+
3+|*Key Prefix:* toc_dot_leader
|
1440
2100
|
|
1441
|
-
|
|
1442
|
-
|
1443
|
-
|
|
2101
|
+
|content
|
2102
|
+
|Quoted string
|
2103
|
+
|toc:
|
2104
|
+
dot_leader:
|
2105
|
+
content: ". "
|
1444
2106
|
|
1445
|
-
|
|
1446
|
-
|
1447
|
-
|
|
2107
|
+
|color
|
2108
|
+
|<<colors,Color>>
|
2109
|
+
|toc:
|
2110
|
+
dot_leader:
|
2111
|
+
color: #999999
|
2112
|
+
|===
|
1448
2113
|
|
1449
|
-
|
1450
|
-
|
1451
|
-
|line_height: 1.5
|
2114
|
+
. `<n>` is a number ranging from 1 to 6, representing each of the six heading levels.
|
2115
|
+
. The `toc_title` keys inherit from level-2 heading styles, except where noted.
|
1452
2116
|
|
1453
|
-
|
1454
|
-
|
1455
|
-
|indent: 20
|
2117
|
+
[#running-content]
|
2118
|
+
=== Running Header & Footer
|
1456
2119
|
|
1457
|
-
|
1458
|
-
|<<measurement-units,measurement>>
|
1459
|
-
|indent: 20
|
1460
|
-
|===
|
2120
|
+
The keys in this category control the arrangement and style of running header and footer content.
|
1461
2121
|
|
1462
|
-
|
2122
|
+
TIP: If you defined running header and footer content in your theme, you can still disable this content per document by setting the `noheader` and `nofooter` document attributes, respectively.
|
1463
2123
|
|
1464
|
-
[cols="3,
|
2124
|
+
[cols="3,4,5l"]
|
1465
2125
|
|===
|
1466
2126
|
|Key |Value Type |Example
|
1467
2127
|
|
1468
|
-
|
1469
|
-
|
1470
|
-
|background_color
|
2128
|
+
3+|*Key Prefix:* header
|
2129
|
+
|
2130
|
+
|background_color
|
2131
|
+
|<<colors,Color>>
|
2132
|
+
|header:
|
2133
|
+
background_color: #eeeeee
|
1471
2134
|
|
1472
|
-
|
|
1473
|
-
|<<colors,
|
1474
|
-
|
|
2135
|
+
|border_color
|
2136
|
+
|<<colors,Color>>
|
2137
|
+
|header:
|
2138
|
+
border_color: #dddddd
|
1475
2139
|
|
1476
|
-
|
|
1477
|
-
|solid
|
2140
|
+
|border_style
|
2141
|
+
|solid {vbar} double {vbar} dashed {vbar} dotted +
|
1478
2142
|
(default: solid)
|
1479
|
-
|
|
2143
|
+
|header:
|
2144
|
+
border_style: dashed
|
1480
2145
|
|
1481
|
-
|
|
1482
|
-
|<<measurement-units,
|
1483
|
-
|
|
2146
|
+
|border_width
|
2147
|
+
|<<measurement-units,Measurement>>
|
2148
|
+
|header:
|
2149
|
+
border_width: 0.25
|
1484
2150
|
|
1485
|
-
|
|
1486
|
-
|<<colors,
|
1487
|
-
|
|
2151
|
+
|font_color
|
2152
|
+
|<<colors,Color>>
|
2153
|
+
|header:
|
2154
|
+
font_color: #333333
|
1488
2155
|
|
1489
|
-
|
|
1490
|
-
|<<fonts,
|
1491
|
-
|
|
2156
|
+
|font_family
|
2157
|
+
|<<fonts,Font family name>>
|
2158
|
+
|header:
|
2159
|
+
font_family: Noto Serif
|
1492
2160
|
|
1493
|
-
|
|
1494
|
-
|<<values,
|
1495
|
-
|
|
2161
|
+
|font_size
|
2162
|
+
|<<values,Number>>
|
2163
|
+
|header:
|
2164
|
+
font_size: 9
|
1496
2165
|
|
1497
|
-
|
|
1498
|
-
|normal
|
1499
|
-
|
|
2166
|
+
|font_style
|
2167
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
2168
|
+
|header:
|
2169
|
+
font_style: italic
|
1500
2170
|
|
1501
|
-
|
|
1502
|
-
|<<measurement-units,
|
1503
|
-
|
|
2171
|
+
|height
|
2172
|
+
|<<measurement-units,Measurement>>
|
2173
|
+
|header:
|
2174
|
+
height: 0.75in
|
1504
2175
|
|
1505
|
-
|
|
1506
|
-
|<<values,
|
2176
|
+
|line_height
|
2177
|
+
|<<values,Number>> +
|
1507
2178
|
(default: $base_line_height)
|
1508
|
-
|
|
2179
|
+
|header:
|
2180
|
+
line_height: 1.2
|
1509
2181
|
|
1510
|
-
|
|
1511
|
-
|<<measurement-units,
|
1512
|
-
|
|
2182
|
+
|padding
|
2183
|
+
|<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>>
|
2184
|
+
|header:
|
2185
|
+
padding: [0, 3, 0, 3]
|
1513
2186
|
|
1514
|
-
|
|
1515
|
-
|top
|
1516
|
-
|
|
2187
|
+
|image_vertical_align
|
2188
|
+
|top {vbar} middle {vbar} bottom {vbar} <<measurement-units,Measurement>>
|
2189
|
+
|header:
|
2190
|
+
image_vertical_align: 4
|
1517
2191
|
|
1518
|
-
|
|
1519
|
-
|top
|
1520
|
-
|
|
2192
|
+
|vertical_align
|
2193
|
+
|top {vbar} middle {vbar} bottom
|
2194
|
+
|header:
|
2195
|
+
vertical_align: center
|
2196
|
+
|
2197
|
+
|<face>_content_<position>^[1]^
|
2198
|
+
|Quoted string
|
2199
|
+
|header:
|
2200
|
+
recto_content:
|
2201
|
+
left: '\{page-number}'
|
1521
2202
|
|
1522
|
-
|
1523
|
-
|quoted string
|
1524
|
-
|right: '\{page-number}'
|
2203
|
+
3+|*Key Prefix:* footer
|
1525
2204
|
|
1526
|
-
|
|
1527
|
-
|<<colors,
|
1528
|
-
|
|
2205
|
+
|background_color
|
2206
|
+
|<<colors,Color>>
|
2207
|
+
|footer:
|
2208
|
+
background_color: #eeeeee
|
1529
2209
|
|
1530
|
-
|
|
1531
|
-
|<<colors,
|
1532
|
-
|
|
2210
|
+
|border_color
|
2211
|
+
|<<colors,Color>>
|
2212
|
+
|footer:
|
2213
|
+
border_color: #dddddd
|
1533
2214
|
|
1534
|
-
|
|
1535
|
-
|solid
|
2215
|
+
|border_style
|
2216
|
+
|solid {vbar} double {vbar} dashed {vbar} dotted +
|
1536
2217
|
(default: solid)
|
1537
|
-
|
|
2218
|
+
|footer:
|
2219
|
+
border_style: dashed
|
1538
2220
|
|
1539
|
-
|
|
1540
|
-
|<<measurement-units,
|
1541
|
-
|
|
2221
|
+
|border_width
|
2222
|
+
|<<measurement-units,Measurement>>
|
2223
|
+
|footer:
|
2224
|
+
border_width: 0.25
|
1542
2225
|
|
1543
|
-
|
|
1544
|
-
|<<colors,
|
1545
|
-
|
|
2226
|
+
|font_color
|
2227
|
+
|<<colors,Color>>
|
2228
|
+
|footer:
|
2229
|
+
font_color: #333333
|
1546
2230
|
|
1547
|
-
|
|
1548
|
-
|<<fonts,
|
1549
|
-
|
|
2231
|
+
|font_family
|
2232
|
+
|<<fonts,Font family name>>
|
2233
|
+
|footer:
|
2234
|
+
font_family: Noto Serif
|
1550
2235
|
|
1551
|
-
|
|
1552
|
-
|<<values,
|
1553
|
-
|
|
2236
|
+
|font_size
|
2237
|
+
|<<values,Number>>
|
2238
|
+
|footer:
|
2239
|
+
font_size: 9
|
1554
2240
|
|
1555
|
-
|
|
1556
|
-
|normal
|
1557
|
-
|
|
2241
|
+
|font_style
|
2242
|
+
|normal {vbar} italic {vbar} bold {vbar} bold_italic
|
2243
|
+
|footer:
|
2244
|
+
font_style: italic
|
1558
2245
|
|
1559
|
-
|
|
1560
|
-
|<<measurement-units,
|
1561
|
-
|
|
2246
|
+
|height
|
2247
|
+
|<<measurement-units,Measurement>>
|
2248
|
+
|footer:
|
2249
|
+
height: 0.75in
|
1562
2250
|
|
1563
|
-
|
|
1564
|
-
|<<values,
|
2251
|
+
|line_height
|
2252
|
+
|<<values,Number>> +
|
1565
2253
|
(default: $base_line_height)
|
1566
|
-
|
|
2254
|
+
|footer:
|
2255
|
+
line_height: 1.2
|
1567
2256
|
|
1568
|
-
|
|
1569
|
-
|<<measurement-units,
|
1570
|
-
|
|
2257
|
+
|padding
|
2258
|
+
|<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>>
|
2259
|
+
|footer:
|
2260
|
+
padding: [0, 3, 0, 3]
|
1571
2261
|
|
1572
|
-
|
|
1573
|
-
|top
|
1574
|
-
|
|
2262
|
+
|image_vertical_align
|
2263
|
+
|top {vbar} middle {vbar} bottom {vbar} <<measurement-units,Measurement>>
|
2264
|
+
|footer:
|
2265
|
+
image_vertical_align: 4
|
1575
2266
|
|
1576
|
-
|
|
1577
|
-
|top
|
1578
|
-
|
|
2267
|
+
|vertical_align
|
2268
|
+
|top {vbar} middle {vbar} bottom
|
2269
|
+
|footer:
|
2270
|
+
vertical_align: top
|
1579
2271
|
|
1580
|
-
|
1581
|
-
|
|
1582
|
-
|
|
2272
|
+
|<face>_content_<position>^[1]^
|
2273
|
+
|Quoted string
|
2274
|
+
|footer:
|
2275
|
+
verso_content:
|
2276
|
+
center: '\{page-number}'
|
1583
2277
|
|===
|
1584
2278
|
|
1585
|
-
|
1586
|
-
`<
|
2279
|
+
. `<face>` can be `recto` (odd pages) or `verso` (even pages).
|
2280
|
+
`<position>` can be `left`, `center` or `right`.
|
1587
2281
|
|
1588
2282
|
IMPORTANT: You must define a height for the running header or footer, respectively, or it will not be shown.
|
1589
2283
|
|
1590
2284
|
TIP: The running header and footer can be disabled from the document by setting the `noheader` and the `nofooter` attributes, respectively, in the document header.
|
1591
2285
|
|
1592
|
-
NOTE: If content is not specified for the running footer, the page number (i.e.,
|
2286
|
+
NOTE: If content is not specified for the running footer, the page number (i.e., `\{page-number}`) will be shown on the left side on verso pages and the right side on recto pages.
|
1593
2287
|
|
1594
2288
|
NOTE: The background color spans the width of the page.
|
1595
2289
|
When a background color is specified, the border also spans the width of the page.
|
1596
2290
|
|
1597
|
-
==== Attribute
|
2291
|
+
==== Attribute References
|
1598
2292
|
|
1599
2293
|
You can use _any_ attribute defined in your AsciiDoc document in the content of the running header and footer.
|
1600
2294
|
In addition, the following attributes are also available when defining the content keys in the footer:
|
@@ -1607,7 +2301,7 @@ In addition, the following attributes are also available when defining the conte
|
|
1607
2301
|
* section-title
|
1608
2302
|
* section-or-chapter-title
|
1609
2303
|
|
1610
|
-
You can also built-in AsciiDoc text replacements like `+(C)
|
2304
|
+
You can also built-in AsciiDoc text replacements like `+(C)+`, numeric character references like `+©+` and inline formatting (e.g., bold, italic, monospace).
|
1611
2305
|
|
1612
2306
|
Here's an example that shows how attributes and replacements can be used in the running footer:
|
1613
2307
|
|
@@ -1619,7 +2313,7 @@ header:
|
|
1619
2313
|
recto_content:
|
1620
2314
|
center: '(C) ACME -- v{revnumber}, {docdate}'
|
1621
2315
|
verso_content:
|
1622
|
-
center: $
|
2316
|
+
center: $header_recto_content_center
|
1623
2317
|
footer:
|
1624
2318
|
height: 0.75in
|
1625
2319
|
line_height: 1
|
@@ -1631,7 +2325,7 @@ footer:
|
|
1631
2325
|
|
1632
2326
|
You can split the content value across multiple lines using YAML's multiline string syntax.
|
1633
2327
|
In this case, the single quotes around the string are not necessary.
|
1634
|
-
To force a hard line break in the output, add
|
2328
|
+
To force a hard line break in the output, add `{sp}+` to the end of the line in normal AsciiDoc fashion.
|
1635
2329
|
|
1636
2330
|
[source,yaml]
|
1637
2331
|
----
|
@@ -1660,11 +2354,11 @@ It cannot be combined with text.
|
|
1660
2354
|
|
1661
2355
|
Here's an example of how to use an image in the running header (which also applies for the footer).
|
1662
2356
|
|
1663
|
-
[source,yaml]
|
2357
|
+
[source,yaml,subs=attributes+]
|
1664
2358
|
----
|
1665
2359
|
header:
|
1666
2360
|
height: 0.75in
|
1667
|
-
image_vertical_align: 2
|
2361
|
+
image_vertical_align: 2 {conum-guard-yaml} <1>
|
1668
2362
|
recto_content:
|
1669
2363
|
center: image:footer-logo.png[width=80]
|
1670
2364
|
verso_content:
|
@@ -1676,7 +2370,7 @@ CAUTION: The image must fit in the allotted space for the running header or foot
|
|
1676
2370
|
Otherwise, you will run into layout issues.
|
1677
2371
|
Adjust the width attribute accordingly.
|
1678
2372
|
|
1679
|
-
== Applying
|
2373
|
+
== Applying Your Theme
|
1680
2374
|
|
1681
2375
|
After creating a theme, you'll need to tell Asciidoctor PDF where to find it.
|
1682
2376
|
This is done using AsciiDoc attributes.
|
@@ -1728,3 +2422,57 @@ However, in the future, this may change so that paths are resolved relative to t
|
|
1728
2422
|
Therefore, it's recommend that you specify absolute paths for now to future-proof your configuration.
|
1729
2423
|
|
1730
2424
|
$ asciidoctor-pdf -a pdf-stylesdir=/path/to/resources/themes -a pdf-style=basic -a pdf-fontsdir=/path/to/resources/fonts
|
2425
|
+
|
2426
|
+
As usual, you can also use build tools like Maven and Gradle to build a themed PDF.
|
2427
|
+
The only thing you need to add to an existing build is the attributes mentioned above.
|
2428
|
+
|
2429
|
+
* https://github.com/asciidoctor/asciidoctor-maven-examples/tree/master/asciidoctor-pdf-with-theme-example[Maven Example]
|
2430
|
+
* https://github.com/asciidoctor/asciidoctor-gradle-examples/tree/master/asciidoc-to-pdf-with-theme-example[Gradle Example]
|
2431
|
+
|
2432
|
+
== Theme-Related Document Attributes
|
2433
|
+
|
2434
|
+
There are various settings in the theme you control using document attributes.
|
2435
|
+
These settings override equivalent keys defined in the theme file, where applicable.
|
2436
|
+
|
2437
|
+
[cols="2,3,6m"]
|
2438
|
+
|===
|
2439
|
+
|Attribute |Value Type |Example
|
2440
|
+
|
2441
|
+
|autofit-option
|
2442
|
+
|flag (default: _not set_)
|
2443
|
+
|:autofit-option:
|
2444
|
+
|
2445
|
+
|chapter-label
|
2446
|
+
|string (default: Chapter)
|
2447
|
+
|:chapter-label: Chapter
|
2448
|
+
|
2449
|
+
|<face>-cover-image
|
2450
|
+
|inline image macro (target is relative to `imagesdir`; can be image or PDF file)
|
2451
|
+
|+:front-cover-image: image:front-cover.pdf[]+
|
2452
|
+
|
2453
|
+
|pagenums^[2]^
|
2454
|
+
|flag (default: _set_)
|
2455
|
+
|:pagenums:
|
2456
|
+
|
2457
|
+
//|pdf-page-layout
|
2458
|
+
//|portrait, landscape
|
2459
|
+
//|:pdf-page-layout: landscape
|
2460
|
+
|
2461
|
+
|pdf-page-size
|
2462
|
+
|https://github.com/prawnpdf/pdf-core/blob/0.6.0/lib/pdf/core/page_geometry.rb#L16-L68[named size^], <<measurement-units,measurement dimensions>> (width x height)
|
2463
|
+
|:pdf-page-size: 6in x 9in
|
2464
|
+
|
2465
|
+
|title-logo-image
|
2466
|
+
|inline image macro (path is relative to `imagesdir`; can be image or PDF file)
|
2467
|
+
|+:title-logo-image: image:logo.png[top=25%, align=center, pdfwidth=0.5in]+
|
2468
|
+
|===
|
2469
|
+
|
2470
|
+
. `<face>` can be `front` or `back`.
|
2471
|
+
. Controls whether the `page-number` attribute is accessible to the running header and footer content specified in the theme file.
|
2472
|
+
Use the `noheader` and `nofooter` attributes to disable the running header and footer, respectively, from the document.
|
2473
|
+
|
2474
|
+
////
|
2475
|
+
== Resources for Extending Asciidoctor PDF
|
2476
|
+
|
2477
|
+
* http://www.sitepoint.com/hackable-pdf-typesetting-in-ruby-with-prawn[Hackable PDF typesetting in Ruby with Prawn]
|
2478
|
+
////
|