asciidoctor-pdf 1.5.0.alpha.16 → 1.5.0.alpha.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.yardopts +12 -0
- data/CHANGELOG.adoc +66 -0
- data/LICENSE.adoc +1 -1
- data/README.adoc +221 -68
- data/asciidoctor-pdf.gemspec +41 -42
- data/bin/asciidoctor-pdf +3 -3
- data/data/fonts/mplus1p-regular-fallback.ttf +0 -0
- data/data/fonts/notoserif-bold-subset.ttf +0 -0
- data/data/fonts/notoserif-bold_italic-subset.ttf +0 -0
- data/data/fonts/notoserif-italic-subset.ttf +0 -0
- data/data/fonts/notoserif-regular-subset.ttf +0 -0
- data/data/themes/default-theme.yml +6 -3
- data/docs/theming-guide.adoc +162 -23
- data/lib/asciidoctor-pdf.rb +2 -1
- data/lib/asciidoctor-pdf/asciidoctor_ext.rb +1 -0
- data/lib/asciidoctor-pdf/asciidoctor_ext/logging_shim.rb +19 -0
- data/lib/asciidoctor-pdf/converter.rb +408 -186
- data/lib/asciidoctor-pdf/core_ext/array.rb +0 -6
- data/lib/asciidoctor-pdf/core_ext/numeric.rb +21 -12
- data/lib/asciidoctor-pdf/core_ext/ostruct.rb +3 -12
- data/lib/asciidoctor-pdf/core_ext/string.rb +1 -1
- data/lib/asciidoctor-pdf/formatted_text.rb +1 -0
- data/lib/asciidoctor-pdf/formatted_text/formatter.rb +8 -2
- data/lib/asciidoctor-pdf/formatted_text/inline_destination_marker.rb +1 -1
- data/lib/asciidoctor-pdf/formatted_text/inline_image_arranger.rb +18 -32
- data/lib/asciidoctor-pdf/formatted_text/inline_image_renderer.rb +3 -3
- data/lib/asciidoctor-pdf/formatted_text/inline_text_aligner.rb +20 -0
- data/lib/asciidoctor-pdf/formatted_text/parser.rb +124 -38
- data/lib/asciidoctor-pdf/formatted_text/parser.treetop +17 -10
- data/lib/asciidoctor-pdf/formatted_text/transform.rb +30 -20
- data/lib/asciidoctor-pdf/implicit_header_processor.rb +2 -2
- data/lib/asciidoctor-pdf/index_catalog.rb +25 -23
- data/lib/asciidoctor-pdf/measurements.rb +1 -1
- data/lib/asciidoctor-pdf/pdf-core_ext/pdf_object.rb +1 -1
- data/lib/asciidoctor-pdf/pdfmark.rb +13 -13
- data/lib/asciidoctor-pdf/prawn-svg_ext.rb +2 -2
- data/lib/asciidoctor-pdf/prawn-svg_ext/interface.rb +2 -2
- data/lib/asciidoctor-pdf/prawn-table_ext.rb +1 -0
- data/lib/asciidoctor-pdf/prawn-table_ext/cell.rb +60 -0
- data/lib/asciidoctor-pdf/prawn-table_ext/cell/text.rb +3 -3
- data/lib/asciidoctor-pdf/prawn_ext/coderay_encoder.rb +3 -3
- data/lib/asciidoctor-pdf/prawn_ext/extensions.rb +39 -14
- data/lib/asciidoctor-pdf/prawn_ext/formatted_text/fragment.rb +9 -10
- data/lib/asciidoctor-pdf/prawn_ext/images.rb +2 -2
- data/lib/asciidoctor-pdf/roman_numeral.rb +7 -7
- data/lib/asciidoctor-pdf/rouge_ext.rb +2 -2
- data/lib/asciidoctor-pdf/rouge_ext/formatters/prawn.rb +20 -9
- data/lib/asciidoctor-pdf/rouge_ext/themes/{pastie.rb → asciidoctor_pdf_default.rb} +5 -5
- data/lib/asciidoctor-pdf/rouge_ext/themes/bw.rb +38 -0
- data/lib/asciidoctor-pdf/sanitizer.rb +36 -23
- data/lib/asciidoctor-pdf/temporary_path.rb +1 -1
- data/lib/asciidoctor-pdf/theme_loader.rb +17 -14
- data/lib/asciidoctor-pdf/version.rb +3 -2
- data/lib/asciidoctor/pdf.rb +1 -0
- data/lib/asciidoctor/pdf/version.rb +1 -0
- metadata +113 -84
- data/Gemfile +0 -22
- data/Rakefile +0 -81
- data/lib/asciidoctor-pdf/rouge_ext/css_theme.rb +0 -15
data/asciidoctor-pdf.gemspec
CHANGED
@@ -1,54 +1,53 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
begin
|
2
|
+
require_relative 'lib/asciidoctor/pdf/version'
|
3
|
+
rescue LoadError
|
4
|
+
require 'asciidoctor/pdf/version'
|
5
|
+
end
|
4
6
|
|
5
7
|
Gem::Specification.new do |s|
|
6
8
|
s.name = 'asciidoctor-pdf'
|
7
|
-
s.version = Asciidoctor::
|
8
|
-
|
9
|
-
s.
|
10
|
-
s.description = <<-EOS
|
11
|
-
An extension for Asciidoctor that converts AsciiDoc documents to PDF using the Prawn PDF library.
|
12
|
-
EOS
|
13
|
-
|
9
|
+
s.version = Asciidoctor::PDF::VERSION
|
10
|
+
s.summary = 'Converts AsciiDoc documents to PDF using Asciidoctor and Prawn'
|
11
|
+
s.description = 'An extension for Asciidoctor that converts AsciiDoc documents to PDF using the Prawn PDF library.'
|
14
12
|
s.authors = ['Dan Allen', 'Sarah White']
|
15
13
|
s.email = 'dan@opendevise.com'
|
16
|
-
s.homepage = 'https://
|
14
|
+
s.homepage = 'https://asciidoctor.org/docs/asciidoctor-pdf'
|
17
15
|
s.license = 'MIT'
|
18
|
-
|
19
|
-
s.required_ruby_version = '>=
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
# NOTE required ruby version is informational only; it's not enforced since it can't be overridden and can cause builds to break
|
17
|
+
#s.required_ruby_version = '>= 2.3.0'
|
18
|
+
s.metadata = {
|
19
|
+
'bug_tracker_uri' => 'https://github.com/asciidoctor/asciidoctor-pdf/issues',
|
20
|
+
'changelog_uri' => 'https://github.com/asciidoctor/asciidoctor-pdf/blob/master/CHANGELOG.adoc',
|
21
|
+
'mailing_list_uri' => 'http://discuss.asciidoctor.org',
|
22
|
+
'source_code_uri' => 'https://github.com/asciidoctor/asciidoctor-pdf'
|
23
|
+
}
|
24
|
+
|
25
|
+
# NOTE the logic to build the list of files is designed to produce a usable package even when the git command is not available
|
26
|
+
begin
|
27
|
+
files = (result = `git ls-files -z`.split ?\0).empty? ? Dir['**/*'] : result
|
23
28
|
rescue
|
24
|
-
Dir['**/*']
|
29
|
+
files = Dir['**/*']
|
25
30
|
end
|
26
|
-
s.files = files.grep %r/^(?:(?:data|lib)\/.+|docs\/theming-guide\.adoc|
|
31
|
+
s.files = files.grep %r/^(?:(?:data|lib)\/.+|docs\/theming-guide\.adoc|(?:CHANGELOG|LICENSE|NOTICE|README)\.adoc|\.yardopts|#{s.name}\.gemspec)$/
|
27
32
|
# FIXME optimize-pdf is currently a shell script, so listing it here won't work
|
28
|
-
#s.executables =
|
33
|
+
#s.executables = (files.grep %r/^bin\//).map {|f| File.basename f }
|
29
34
|
s.executables = ['asciidoctor-pdf']
|
30
|
-
s.test_files = files.grep %r/^(?:test|spec|feature)\/.*$/
|
31
|
-
|
32
35
|
s.require_paths = ['lib']
|
33
|
-
|
34
|
-
|
35
|
-
s.
|
36
|
-
s.
|
37
|
-
|
38
|
-
s.
|
39
|
-
|
40
|
-
|
41
|
-
s.add_runtime_dependency '
|
42
|
-
|
43
|
-
s.add_runtime_dependency '
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
s.
|
49
|
-
s.
|
50
|
-
s.add_runtime_dependency 'safe_yaml', '~> 1.0.4'
|
51
|
-
s.add_runtime_dependency 'thread_safe', '~> 0.3.6'
|
52
|
-
# For our usage, treetop 1.6.2 is slower than 1.5.3
|
53
|
-
s.add_runtime_dependency 'treetop', '1.5.3'
|
36
|
+
#s.test_files = files.grep %r/^(?:test|spec|feature)\/.*$/
|
37
|
+
|
38
|
+
s.add_runtime_dependency 'asciidoctor', '>= 1.5.0', '< 3.0.0'
|
39
|
+
s.add_runtime_dependency 'prawn', '~> 2.2.0'
|
40
|
+
s.add_runtime_dependency 'prawn-table', '~> 0.2.0'
|
41
|
+
s.add_runtime_dependency 'prawn-templates', '~> 0.1.0'
|
42
|
+
s.add_runtime_dependency 'prawn-svg', '~> 0.29.0'
|
43
|
+
s.add_runtime_dependency 'prawn-icon', '~> 2.3.0'
|
44
|
+
s.add_runtime_dependency 'safe_yaml', '~> 1.0.0'
|
45
|
+
s.add_runtime_dependency 'thread_safe', '~> 0.3.0'
|
46
|
+
s.add_runtime_dependency 'concurrent-ruby', '~> 1.1.0'
|
47
|
+
# For our usage, treetop 1.6 is slower than treetop 1.5
|
48
|
+
s.add_runtime_dependency 'treetop', '~> 1.5.0'
|
49
|
+
|
50
|
+
s.add_development_dependency 'rake', '~> 12.3.0'
|
51
|
+
s.add_development_dependency 'rspec', '~> 3.8.0'
|
52
|
+
s.add_development_dependency 'pdf-inspector', '~> 1.3.0'
|
54
53
|
end
|
data/bin/asciidoctor-pdf
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
if File.
|
3
|
+
if File.file?(asciidoctor_pdf = (File.expand_path '../../lib/asciidoctor/pdf.rb', __FILE__))
|
4
4
|
require asciidoctor_pdf
|
5
5
|
else
|
6
|
-
require 'asciidoctor
|
6
|
+
require 'asciidoctor/pdf'
|
7
7
|
end
|
8
8
|
require 'asciidoctor/cli'
|
9
9
|
|
@@ -11,7 +11,7 @@ options = Asciidoctor::Cli::Options.new backend: 'pdf', header_footer: true
|
|
11
11
|
|
12
12
|
# FIXME provide an API in Asciidoctor for sub-components to print version information
|
13
13
|
unless ARGV != ['-v'] && (ARGV & ['-V', '--version']).empty?
|
14
|
-
$stdout.write %(Asciidoctor PDF #{Asciidoctor::
|
14
|
+
$stdout.write %(Asciidoctor PDF #{Asciidoctor::PDF::VERSION} using )
|
15
15
|
# NOTE the print_version method was added in Asciidoctor 1.5.2
|
16
16
|
if options.respond_to? :print_version
|
17
17
|
options.print_version
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -20,7 +20,7 @@ font:
|
|
20
20
|
italic: mplus1p-regular-fallback.ttf
|
21
21
|
bold_italic: mplus1p-regular-fallback.ttf
|
22
22
|
fallbacks:
|
23
|
-
|
23
|
+
- M+ 1p Fallback
|
24
24
|
page:
|
25
25
|
background_color: ffffff
|
26
26
|
layout: portrait
|
@@ -80,7 +80,7 @@ heading:
|
|
80
80
|
font_color: $base_font_color
|
81
81
|
font_family: $base_font_family
|
82
82
|
font_style: bold
|
83
|
-
# h1 is used for part titles (book doctype
|
83
|
+
# h1 is used for part titles (book doctype) or the doctitle (article doctype)
|
84
84
|
h1_font_size: floor($base_font_size * 2.6)
|
85
85
|
# h2 is used for chapter titles (book doctype only)
|
86
86
|
h2_font_size: floor($base_font_size * 2.15)
|
@@ -144,7 +144,7 @@ admonition:
|
|
144
144
|
padding: [0, $horizontal_rhythm, 0, $horizontal_rhythm]
|
145
145
|
#icon:
|
146
146
|
# tip:
|
147
|
-
# name:
|
147
|
+
# name: far-lightbulb
|
148
148
|
# stroke_color: 111111
|
149
149
|
# size: 24
|
150
150
|
label:
|
@@ -235,6 +235,9 @@ toc:
|
|
235
235
|
#content: ". "
|
236
236
|
font_color: a9a9a9
|
237
237
|
#levels: 2 3
|
238
|
+
footnotes:
|
239
|
+
font_size: round($base_font_size * 0.75)
|
240
|
+
item_spacing: $outline_list_item_spacing / 2
|
238
241
|
# NOTE in addition to footer, header is also supported
|
239
242
|
footer:
|
240
243
|
font_size: $base_font_size_small
|
data/docs/theming-guide.adoc
CHANGED
@@ -31,8 +31,14 @@ Topics remaining to document:
|
|
31
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
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
33
|
|
34
|
-
IMPORTANT: If you're
|
35
|
-
|
34
|
+
IMPORTANT: If you're creating a custom theme, you're expected to supply your own fonts.
|
35
|
+
We recognize this can be a major obstacle when you're starting out.
|
36
|
+
Therefore, your other option is to simply redeclare the fonts from the https://github.com/asciidoctor/asciidoctor-pdf/blob/master/data/themes/default-theme.yml[default theme] in the <<Custom Fonts,font catalog>>.
|
37
|
+
Asciidoctor PDF will then resolve the fonts that are bundled with the gem.
|
38
|
+
|
39
|
+
WARNING: If you don't declare your own fonts, the built-in (AFM) fonts declared in https://github.com/asciidoctor/asciidoctor-pdf/blob/master/data/themes/base-theme.yml[base theme] will be used instead.
|
40
|
+
Using AFM fonts can result in missing functionality and warnings.
|
41
|
+
See the <<Built-In (AFM) Fonts>> section to learn more about these limitations.
|
36
42
|
|
37
43
|
toc::[]
|
38
44
|
|
@@ -96,6 +102,9 @@ When creating a new theme, you only have to define the keys you want to override
|
|
96
102
|
All the available keys are documented in <<Keys>>.
|
97
103
|
The converter uses the information from the theme map to help construct the PDF.
|
98
104
|
|
105
|
+
WARNING: If you start a new theme from scratch, we strongly recommend defining TrueType fonts and specifying them in the `base` and `literal` categories.
|
106
|
+
Otherwise, Asciidoctor PDF will use built-in AFM fonts, which can result in missing functionality and warnings.
|
107
|
+
|
99
108
|
[TIP]
|
100
109
|
====
|
101
110
|
Instead of creating a theme from scratch, another option is to download the https://github.com/asciidoctor/asciidoctor-pdf/blob/master/data/themes/default-theme.yml[default-theme.yml] file from the source repository.
|
@@ -563,6 +572,8 @@ title_page:
|
|
563
572
|
background_image: title-cover.png
|
564
573
|
----
|
565
574
|
|
575
|
+
In this case, the image is resolved relative to theme directory.
|
576
|
+
|
566
577
|
Here's how the image is specified using the inline image macro:
|
567
578
|
|
568
579
|
[source,yaml]
|
@@ -571,12 +582,15 @@ title_page:
|
|
571
582
|
background_image: image:title-cover.png[]
|
572
583
|
----
|
573
584
|
|
585
|
+
In this case, the image is resolved relative to the value of the `imagesdir` attribute.
|
586
|
+
Wrapping the value in the image macro sends a hint to the converter to resolve it just like other images.
|
587
|
+
|
574
588
|
Like in the AsciiDoc syntax, the inline image macro allows you to supply set the width of the image and the alignment:
|
575
589
|
|
576
590
|
[source,yaml]
|
577
591
|
----
|
578
592
|
title_page:
|
579
|
-
logo_image: image:logo.png[width=250,align=center]
|
593
|
+
logo_image: image:logo.png[width=250,align=center]
|
580
594
|
----
|
581
595
|
|
582
596
|
=== Quoted String
|
@@ -649,6 +663,9 @@ For anything outside of that, PDF is BYOF (Bring Your Own Font).
|
|
649
663
|
Even though the built-in fonts require the content to be encoded in WINANSI, _you still type your AsciiDoc document in UTF-8_.
|
650
664
|
Asciidoctor PDF encodes the content into WINANSI when building the PDF.
|
651
665
|
|
666
|
+
CAUTION: Built-in fonts do not use the <<fallback-fonts,fallback fonts>>.
|
667
|
+
In order for the fallback font to kick in, you must be using a TrueType font.
|
668
|
+
|
652
669
|
.WINANSI Encoding Behavior
|
653
670
|
****
|
654
671
|
When using the built-in PDF (AFM) fonts on a block of content in your AsciiDoc document, any character that cannot be encoded to WINANSI is replaced with a logic "`not`" glyph (`¬`) and you'll see the following warning in your console:
|
@@ -658,6 +675,9 @@ When using the built-in PDF (AFM) fonts on a block of content in your AsciiDoc d
|
|
658
675
|
|
659
676
|
This behavior differs from the default behavior in Prawn, which simply crashes.
|
660
677
|
|
678
|
+
You'll often see this warning if you're using callouts in your document and you haven't specified a TrueType font in your theme.
|
679
|
+
To prevent this warning, you need to specify a TrueType font.
|
680
|
+
|
661
681
|
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].
|
662
682
|
****
|
663
683
|
|
@@ -689,7 +709,7 @@ This limitation may be lifted in the future.
|
|
689
709
|
The limited character set of WINANSI, or the bland look of the built-in fonts, may motivate you to load your own font.
|
690
710
|
Custom fonts can enhance the look of your PDF theme substantially.
|
691
711
|
|
692
|
-
To start, you need to find a
|
712
|
+
To start, you need to find a TTF file collection for the font you want to use.
|
693
713
|
A collection typically consists of all four styles of a font:
|
694
714
|
|
695
715
|
* normal
|
@@ -881,7 +901,7 @@ See <<Title Page>> for details.
|
|
881
901
|
|Inline image macro^[2]^ +
|
882
902
|
(default: _not set_)
|
883
903
|
|page:
|
884
|
-
background_image:
|
904
|
+
background_image: image:page-bg.png[]
|
885
905
|
|
886
906
|
|layout
|
887
907
|
|portrait {vbar} landscape +
|
@@ -1262,7 +1282,7 @@ TIP: The title page can be disabled from the document by setting the `notitle` a
|
|
1262
1282
|
|Inline image macro^[2]^ +
|
1263
1283
|
(default: _not set_)
|
1264
1284
|
|title_page:
|
1265
|
-
|
1285
|
+
background_image: image:title.png[]
|
1266
1286
|
|
1267
1287
|
|font_color
|
1268
1288
|
|<<colors,Color>> +
|
@@ -1314,7 +1334,7 @@ TIP: The title page can be disabled from the document by setting the `notitle` a
|
|
1314
1334
|
(default: _not set_)
|
1315
1335
|
|title_page:
|
1316
1336
|
logo:
|
1317
|
-
|
1337
|
+
image: image:logo.png[pdfwidth=25%]
|
1318
1338
|
|
1319
1339
|
|top
|
1320
1340
|
|Percentage^[3]^ +
|
@@ -1452,7 +1472,7 @@ TIP: The title page can be disabled from the document by setting the `notitle` a
|
|
1452
1472
|
|<<quoted-string,Quoted string>> +
|
1453
1473
|
(default: ', ')
|
1454
1474
|
|title_page:
|
1455
|
-
|
1475
|
+
authors:
|
1456
1476
|
delimiter: '; '
|
1457
1477
|
|
1458
1478
|
|font_color
|
@@ -1780,8 +1800,18 @@ The keys in this category are used to control the style of literal, listing and
|
|
1780
1800
|
(default: 9)
|
1781
1801
|
|code:
|
1782
1802
|
padding: 11
|
1803
|
+
|
1804
|
+
3+|[#key-prefix-table-cell]*Key Prefix:* <<key-prefix-code-linenum,code_linenum>>^[2]^
|
1805
|
+
|
1806
|
+
|font_color
|
1807
|
+
|<<colors,Color>> +
|
1808
|
+
(default: #999999)
|
1809
|
+
|code:
|
1810
|
+
linenum_font_color: #ccc
|
1783
1811
|
|===
|
1784
1812
|
. The line_gap is used to tune the height of the background color applied to a span of block text highlighted using Rouge.
|
1813
|
+
. The code_linenum category only applies when using Pygments as the source highlighter.
|
1814
|
+
Otherwise, the style is controlled by the source highlighter theme.
|
1785
1815
|
|
1786
1816
|
[#keys-callout-numbers]
|
1787
1817
|
=== Callout Numbers
|
@@ -2273,7 +2303,7 @@ The keys in this category control the arrangement and style of admonition blocks
|
|
2273
2303
|
|admonition:
|
2274
2304
|
icon:
|
2275
2305
|
tip:
|
2276
|
-
name:
|
2306
|
+
name: fas-fire
|
2277
2307
|
|
2278
2308
|
|stroke_color
|
2279
2309
|
|<<colors,Color>> +
|
@@ -2294,10 +2324,10 @@ The keys in this category control the arrangement and style of admonition blocks
|
|
2294
2324
|
|
2295
2325
|
. The top and bottom padding values are ignored on admonition_label_padding.
|
2296
2326
|
. `<name>` can be `note`, `tip`, `warning`, `important`, or `caution`.
|
2297
|
-
The subkeys in the icon category cannot be flattened (e.g., `tip_name:
|
2327
|
+
The subkeys in the icon category cannot be flattened (e.g., `tip_name: far-lightbulb` is not valid syntax).
|
2298
2328
|
. Required.
|
2299
2329
|
See the `.yml` files in the https://github.com/jessedoyle/prawn-icon/tree/master/data/fonts[prawn-icon repository] for a list of valid icon names.
|
2300
|
-
The prefix (e.g., `
|
2330
|
+
The prefix (e.g., `fas-`) determines which font set to use.
|
2301
2331
|
|
2302
2332
|
[#keys-image]
|
2303
2333
|
=== Image
|
@@ -2565,10 +2595,105 @@ The keys in this category control the arrangement and style of outline list item
|
|
2565
2595
|
|<<colors,Color>> +
|
2566
2596
|
(default: _inherit_)
|
2567
2597
|
|outline_list:
|
2568
|
-
marker_font_color: #3c763d
|
2598
|
+
marker_font_color: #3c763d
|
2599
|
+
|
2600
|
+
|text_align^[2]^
|
2601
|
+
|<<text-alignments,Text alignment>> +
|
2602
|
+
(default: $base_align)
|
2603
|
+
|outline_list:
|
2604
|
+
text_align: left
|
2569
2605
|
|===
|
2570
2606
|
|
2571
2607
|
. Controls the color of the bullet glyph that marks items in unordered lists and the number for items in ordered lists.
|
2608
|
+
. Controls the alignment of the list text only, not nested content (blocks or lists).
|
2609
|
+
|
2610
|
+
[#keys-ulist]
|
2611
|
+
=== Unordered List
|
2612
|
+
|
2613
|
+
The keys in this category control the arrangement and style of unordered list items.
|
2614
|
+
|
2615
|
+
[cols="3,4,5l"]
|
2616
|
+
|===
|
2617
|
+
|Key |Value Type |Example
|
2618
|
+
|
2619
|
+
3+|[#key-prefix-ulist-marker]*Key Prefix:* <<key-prefix-ulist-marker,ulist_marker>>
|
2620
|
+
|
2621
|
+
|font_family
|
2622
|
+
|<<fonts,Font family name>> +
|
2623
|
+
(default: _inherit_)
|
2624
|
+
|ulist:
|
2625
|
+
marker:
|
2626
|
+
font_family: Noto Serif
|
2627
|
+
|
2628
|
+
|font_size
|
2629
|
+
|<<values,Number>> +
|
2630
|
+
(default: _inherit_)
|
2631
|
+
|ulist:
|
2632
|
+
marker:
|
2633
|
+
font_size: 9
|
2634
|
+
|
2635
|
+
|font_color
|
2636
|
+
|<<colors,Color>> +
|
2637
|
+
(default: $outline_list_marker_font_color)
|
2638
|
+
|ulist:
|
2639
|
+
marker:
|
2640
|
+
font_color: #cccccc
|
2641
|
+
|
2642
|
+
|line_height
|
2643
|
+
|<<values,Number>> +
|
2644
|
+
(default: $base_line_height)
|
2645
|
+
|ulist:
|
2646
|
+
marker:
|
2647
|
+
line_height: 1.5
|
2648
|
+
|===
|
2649
|
+
|
2650
|
+
[cols="3,4,5l"]
|
2651
|
+
|===
|
2652
|
+
|Key |Value Type |Example
|
2653
|
+
|
2654
|
+
3+|*Key Prefix:* ulist_marker_<type>^[1]^
|
2655
|
+
|
2656
|
+
|content
|
2657
|
+
|<<quoted-string,Quoted string>>
|
2658
|
+
|ulist:
|
2659
|
+
marker:
|
2660
|
+
disc:
|
2661
|
+
content: "\uf140"
|
2662
|
+
|
2663
|
+
|font_family
|
2664
|
+
|<<fonts,Font family name>> +
|
2665
|
+
(default: _inherit_)
|
2666
|
+
|ulist:
|
2667
|
+
marker:
|
2668
|
+
disc:
|
2669
|
+
font_family: fas
|
2670
|
+
|
2671
|
+
|font_size
|
2672
|
+
|<<values,Number>> +
|
2673
|
+
(default: _inherit_)
|
2674
|
+
|ulist:
|
2675
|
+
marker:
|
2676
|
+
disc:
|
2677
|
+
font_size: 9
|
2678
|
+
|
2679
|
+
|font_color
|
2680
|
+
|<<colors,Color>> +
|
2681
|
+
(default: _inherit_)
|
2682
|
+
|ulist:
|
2683
|
+
marker:
|
2684
|
+
disc:
|
2685
|
+
font_color: #ff0000
|
2686
|
+
|
2687
|
+
|line_height
|
2688
|
+
|<<values,Number>> +
|
2689
|
+
(default: _inherit_)
|
2690
|
+
|ulist:
|
2691
|
+
marker:
|
2692
|
+
disc:
|
2693
|
+
line_height: 2
|
2694
|
+
|===
|
2695
|
+
|
2696
|
+
. <type> is one of disc, square, circle, checked, unchecked
|
2572
2697
|
|
2573
2698
|
[#keys-table]
|
2574
2699
|
=== Table
|
@@ -2803,7 +2928,7 @@ The keys in this category control the arrangement and style of tables and table
|
|
2803
2928
|
|<<fonts,Font family name>> +
|
2804
2929
|
(default: $table_head_font_family)
|
2805
2930
|
|table:
|
2806
|
-
header_cell:
|
2931
|
+
header_cell:
|
2807
2932
|
font_family: Noto Sans
|
2808
2933
|
|
2809
2934
|
|font_size
|
@@ -3024,6 +3149,13 @@ The keys in this category control the arrangement and style of running header an
|
|
3024
3149
|
|===
|
3025
3150
|
|Key |Value Type |Example
|
3026
3151
|
|
3152
|
+
3+|[#key-prefix-running_content]*Key Prefix:* <<key-prefix-running_content,running_content>>
|
3153
|
+
|start_at
|
3154
|
+
|title {vbar} toc {vbar} body +
|
3155
|
+
(default: body)
|
3156
|
+
|running_content:
|
3157
|
+
start_at: toc
|
3158
|
+
|
3027
3159
|
3+|[#key-prefix-header]*Key Prefix:* <<key-prefix-header,header>>
|
3028
3160
|
|
3029
3161
|
|background_color^[1]^
|
@@ -3086,7 +3218,7 @@ The keys in this category control the arrangement and style of running header an
|
|
3086
3218
|
|header:
|
3087
3219
|
line_height: 1.2
|
3088
3220
|
|
3089
|
-
|padding
|
3221
|
+
|padding^[3]^
|
3090
3222
|
|<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>> +
|
3091
3223
|
(default: 0)
|
3092
3224
|
|header:
|
@@ -3104,14 +3236,14 @@ The keys in this category control the arrangement and style of running header an
|
|
3104
3236
|
|header:
|
3105
3237
|
vertical_align: center
|
3106
3238
|
|
3107
|
-
|<side>_columns^[
|
3239
|
+
|<side>_columns^[4]^
|
3108
3240
|
|Column specs triple +
|
3109
3241
|
(default: _not set_)
|
3110
3242
|
|header:
|
3111
3243
|
recto:
|
3112
3244
|
columns: <25% =50% >25%
|
3113
3245
|
|
3114
|
-
|<side>_<position>_content^[
|
3246
|
+
|<side>_<position>_content^[4,5]^
|
3115
3247
|
|<<quoted-string,Quoted string>> +
|
3116
3248
|
(default: '\{page-number}')
|
3117
3249
|
|header:
|
@@ -3181,7 +3313,7 @@ The keys in this category control the arrangement and style of running header an
|
|
3181
3313
|
|footer:
|
3182
3314
|
line_height: 1.2
|
3183
3315
|
|
3184
|
-
|padding
|
3316
|
+
|padding^[3]^
|
3185
3317
|
|<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>> +
|
3186
3318
|
(default: 0)
|
3187
3319
|
|footer:
|
@@ -3199,14 +3331,14 @@ The keys in this category control the arrangement and style of running header an
|
|
3199
3331
|
|footer:
|
3200
3332
|
vertical_align: top
|
3201
3333
|
|
3202
|
-
|<side>_columns^[
|
3334
|
+
|<side>_columns^[4]^
|
3203
3335
|
|Column specs triple +
|
3204
3336
|
(default: _not set_)
|
3205
3337
|
|footer:
|
3206
3338
|
verso:
|
3207
3339
|
columns: <50% =0% <50%
|
3208
3340
|
|
3209
|
-
|<side>_<position>_content^[
|
3341
|
+
|<side>_<position>_content^[4,5]^
|
3210
3342
|
|<<quoted-string,Quoted string>> +
|
3211
3343
|
(default: '\{page-number}')
|
3212
3344
|
|footer:
|
@@ -3216,6 +3348,7 @@ The keys in this category control the arrangement and style of running header an
|
|
3216
3348
|
|===
|
3217
3349
|
. The background color spans the width of the page, as does the border when a background color is specified.
|
3218
3350
|
. If the height is not set, the running content at this periphery is disabled.
|
3351
|
+
. If the side padding is negative, the content will bleed into the margin of the page.
|
3219
3352
|
. `<side>` can be `recto` (right-hand, odd-numbered pages) or `verso` (left-hand, even-numbered pages).
|
3220
3353
|
Where the page sides fall in relation to the physical or printed page number is controlled using the `pdf-folio-placement` attribute (except when `media=prepress`, which implies `physical`).
|
3221
3354
|
. `<position>` can be `left`, `center` or `right`.
|
@@ -3401,7 +3534,7 @@ These settings override equivalent keys defined in the theme file, where applica
|
|
3401
3534
|
|<face>-cover-image^[1]^
|
3402
3535
|
|path^[2]^ {vbar} image macro^[3]^ +
|
3403
3536
|
(format can be image or PDF)
|
3404
|
-
|
3537
|
+
|:front-cover-image: image:front-cover.pdf[]
|
3405
3538
|
|
3406
3539
|
|media
|
3407
3540
|
|screen {vbar} print {vbar} prepress
|
@@ -3409,7 +3542,7 @@ These settings override equivalent keys defined in the theme file, where applica
|
|
3409
3542
|
|
3410
3543
|
|page-background-image^[4]^
|
3411
3544
|
|path^[2]^ {vbar} image macro^[3]^
|
3412
|
-
|
3545
|
+
|:page-background-image: image:bg.jpg[]
|
3413
3546
|
|
3414
3547
|
|pagenums^[5]^
|
3415
3548
|
|flag (default: _set_)
|
@@ -3441,16 +3574,21 @@ These settings override equivalent keys defined in the theme file, where applica
|
|
3441
3574
|
|
3442
3575
|
|title-logo-image
|
3443
3576
|
|path^[2]^ {vbar} image macro^[3]^
|
3444
|
-
|
3577
|
+
|:title-logo-image: image:logo.png[top=25%, align=center, pdfwidth=0.5in]
|
3578
|
+
|
3579
|
+
|title-page^[8]^
|
3580
|
+
|flag (default: _not set_)
|
3581
|
+
|:title-page:
|
3445
3582
|
|
3446
3583
|
|title-page-background-image
|
3447
3584
|
|path^[2]^ {vbar} image macro^[3]^
|
3448
|
-
|
3585
|
+
|:title-page-background-image: image:title-bg.jpg[]
|
3449
3586
|
|===
|
3450
3587
|
|
3451
3588
|
. `<face>` can be `front` or `back`.
|
3452
3589
|
. The path is resolved relative to base_dir.
|
3453
3590
|
. The target of the image macro is resolved relative to `imagesdir`.
|
3591
|
+
If the image macro syntax is not used, the value is resolved relative to the base directory, which defaults to the document directory.
|
3454
3592
|
. Page background images are automatically scaled to fit within the bounds of the page.
|
3455
3593
|
+
|
3456
3594
|
NOTE: Page backgrounds do not currently work when using AsciidoctorJ PDF.
|
@@ -3463,6 +3601,7 @@ Use the `noheader` and `nofooter` attributes to disable the running header and f
|
|
3463
3601
|
. _(Experimental)_ The `text-alignment` document attribute is intended as a simple way to toggle text justification.
|
3464
3602
|
The value of this attribute overrides the `base_align` key set by the theme.
|
3465
3603
|
For more fine-grained control, you should customize using the theme.
|
3604
|
+
. Force a title page to be added even when the doctype is not book.
|
3466
3605
|
|
3467
3606
|
== Publishing Mode
|
3468
3607
|
|