asciidoctor-pdf 1.5.0.alpha.16 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +5 -5
  2. data/.yardopts +12 -0
  3. data/CHANGELOG.adoc +415 -1
  4. data/LICENSE.adoc +1 -1
  5. data/NOTICE.adoc +14 -11
  6. data/README.adoc +647 -222
  7. data/asciidoctor-pdf.gemspec +47 -44
  8. data/bin/asciidoctor-pdf +5 -9
  9. data/bin/asciidoctor-pdf-optimize +20 -0
  10. data/data/fonts/ABOUT-mplus1mn-subset +26 -0
  11. data/data/fonts/ABOUT-mplus1p-subset +26 -0
  12. data/data/fonts/ABOUT-notoemoji-subset +3 -0
  13. data/data/fonts/ABOUT-notoserif-subset +26 -0
  14. data/data/fonts/{LICENSE-mplus-testflight-58 → LICENSE-mplus} +2 -2
  15. data/data/fonts/{LICENSE-noto-2015-06-05 → LICENSE-notoserif} +0 -0
  16. data/data/fonts/mplus1mn-bold-ascii.ttf +0 -0
  17. data/data/fonts/mplus1mn-bold-subset.ttf +0 -0
  18. data/data/fonts/mplus1mn-bold_italic-ascii.ttf +0 -0
  19. data/data/fonts/mplus1mn-bold_italic-subset.ttf +0 -0
  20. data/data/fonts/mplus1mn-italic-ascii.ttf +0 -0
  21. data/data/fonts/mplus1mn-italic-subset.ttf +0 -0
  22. data/data/fonts/mplus1mn-regular-ascii-conums.ttf +0 -0
  23. data/data/fonts/mplus1mn-regular-subset.ttf +0 -0
  24. data/data/fonts/mplus1p-regular-fallback.ttf +0 -0
  25. data/data/fonts/notoemoji-subset.ttf +0 -0
  26. data/data/fonts/notoserif-bold-subset.ttf +0 -0
  27. data/data/fonts/notoserif-bold_italic-subset.ttf +0 -0
  28. data/data/fonts/notoserif-italic-subset.ttf +0 -0
  29. data/data/fonts/notoserif-regular-subset.ttf +0 -0
  30. data/data/themes/base-theme.yml +26 -4
  31. data/data/themes/default-theme.yml +76 -60
  32. data/data/themes/default-with-fallback-font-theme.yml +9 -0
  33. data/docs/theming-guide.adoc +2731 -922
  34. data/lib/asciidoctor/pdf/converter.rb +4489 -0
  35. data/lib/asciidoctor/pdf/ext/asciidoctor/abstract_block.rb +7 -0
  36. data/lib/asciidoctor/pdf/ext/asciidoctor/abstract_node.rb +7 -0
  37. data/lib/asciidoctor/pdf/ext/asciidoctor/document.rb +5 -0
  38. data/lib/asciidoctor/pdf/ext/asciidoctor/image.rb +35 -0
  39. data/lib/{asciidoctor-pdf/asciidoctor_ext → asciidoctor/pdf/ext/asciidoctor}/list.rb +4 -2
  40. data/lib/{asciidoctor-pdf/asciidoctor_ext → asciidoctor/pdf/ext/asciidoctor}/list_item.rb +3 -1
  41. data/lib/asciidoctor/pdf/ext/asciidoctor/logging_shim.rb +33 -0
  42. data/lib/asciidoctor/pdf/ext/asciidoctor/section.rb +45 -0
  43. data/lib/asciidoctor/pdf/ext/asciidoctor.rb +11 -0
  44. data/lib/{asciidoctor-pdf/core_ext → asciidoctor/pdf/ext/core}/array.rb +6 -6
  45. data/lib/asciidoctor/pdf/ext/core/file.rb +9 -0
  46. data/lib/asciidoctor/pdf/ext/core/hash.rb +7 -0
  47. data/lib/asciidoctor/pdf/ext/core/numeric.rb +26 -0
  48. data/lib/{asciidoctor-pdf/core_ext → asciidoctor/pdf/ext/core}/object.rb +3 -1
  49. data/lib/{asciidoctor-pdf/core_ext → asciidoctor/pdf/ext/core}/quantifiable_stdout.rb +9 -1
  50. data/lib/asciidoctor/pdf/ext/core/regexp.rb +5 -0
  51. data/lib/{asciidoctor-pdf/core_ext → asciidoctor/pdf/ext/core}/string.rb +9 -13
  52. data/lib/asciidoctor/pdf/ext/core.rb +10 -0
  53. data/lib/asciidoctor/pdf/ext/pdf-core/page.rb +54 -0
  54. data/lib/asciidoctor/pdf/ext/pdf-core/pdf_object.rb +8 -0
  55. data/lib/asciidoctor/pdf/ext/pdf-core.rb +4 -0
  56. data/lib/asciidoctor/pdf/ext/prawn/coderay_encoder.rb +117 -0
  57. data/lib/asciidoctor/pdf/ext/prawn/extensions.rb +922 -0
  58. data/lib/{asciidoctor-pdf/prawn_ext → asciidoctor/pdf/ext/prawn}/font/afm.rb +14 -10
  59. data/lib/asciidoctor/pdf/ext/prawn/font_metric_cache.rb +9 -0
  60. data/lib/asciidoctor/pdf/ext/prawn/formatted_text/box.rb +66 -0
  61. data/lib/{asciidoctor-pdf/prawn_ext → asciidoctor/pdf/ext/prawn}/formatted_text/fragment.rb +21 -18
  62. data/lib/asciidoctor/pdf/ext/prawn/images.rb +54 -0
  63. data/lib/asciidoctor/pdf/ext/prawn-svg/interface.rb +14 -0
  64. data/lib/asciidoctor/pdf/ext/prawn-svg.rb +6 -0
  65. data/lib/asciidoctor/pdf/ext/prawn-table/cell/asciidoc.rb +76 -0
  66. data/lib/{asciidoctor-pdf/prawn-table_ext → asciidoctor/pdf/ext/prawn-table}/cell/text.rb +6 -3
  67. data/lib/asciidoctor/pdf/ext/prawn-table/cell.rb +60 -0
  68. data/lib/asciidoctor/pdf/ext/prawn-table.rb +6 -0
  69. data/lib/{asciidoctor-pdf/prawn-templates_ext.rb → asciidoctor/pdf/ext/prawn-templates.rb} +2 -0
  70. data/lib/asciidoctor/pdf/ext/prawn.rb +9 -0
  71. data/lib/asciidoctor/pdf/ext/pygments.rb +34 -0
  72. data/lib/asciidoctor/pdf/ext/rouge/formatters/prawn.rb +208 -0
  73. data/lib/{asciidoctor-pdf/rouge_ext/themes/pastie.rb → asciidoctor/pdf/ext/rouge/themes/asciidoctor_pdf_default.rb} +7 -5
  74. data/lib/asciidoctor/pdf/ext/rouge.rb +5 -0
  75. data/lib/asciidoctor/pdf/ext.rb +9 -0
  76. data/lib/asciidoctor/pdf/formatted_text/formatter.rb +43 -0
  77. data/lib/asciidoctor/pdf/formatted_text/fragment_position_renderer.rb +14 -0
  78. data/lib/asciidoctor/pdf/formatted_text/inline_destination_marker.rb +21 -0
  79. data/lib/asciidoctor/pdf/formatted_text/inline_image_arranger.rb +134 -0
  80. data/lib/asciidoctor/pdf/formatted_text/inline_image_renderer.rb +51 -0
  81. data/lib/asciidoctor/pdf/formatted_text/inline_text_aligner.rb +22 -0
  82. data/lib/{asciidoctor-pdf → asciidoctor/pdf}/formatted_text/parser.rb +175 -53
  83. data/lib/{asciidoctor-pdf → asciidoctor/pdf}/formatted_text/parser.treetop +20 -14
  84. data/lib/asciidoctor/pdf/formatted_text/source_wrap.rb +43 -0
  85. data/lib/asciidoctor/pdf/formatted_text/text_background_and_border_renderer.rb +55 -0
  86. data/lib/asciidoctor/pdf/formatted_text/transform.rb +394 -0
  87. data/lib/{asciidoctor-pdf → asciidoctor/pdf}/formatted_text.rb +6 -0
  88. data/lib/asciidoctor/pdf/index_catalog.rb +133 -0
  89. data/lib/asciidoctor/pdf/measurements.rb +62 -0
  90. data/lib/asciidoctor/pdf/optimizer.rb +44 -0
  91. data/lib/asciidoctor/pdf/pdfmark.rb +41 -0
  92. data/lib/asciidoctor/pdf/roman_numeral.rb +128 -0
  93. data/lib/asciidoctor/pdf/sanitizer.rb +45 -0
  94. data/lib/asciidoctor/pdf/text_transformer.rb +116 -0
  95. data/lib/asciidoctor/pdf/theme_loader.rb +305 -0
  96. data/lib/asciidoctor/pdf/version.rb +8 -0
  97. data/lib/asciidoctor/pdf.rb +15 -0
  98. data/lib/asciidoctor-pdf/converter.rb +2 -3343
  99. data/lib/asciidoctor-pdf/version.rb +3 -5
  100. data/lib/asciidoctor-pdf.rb +3 -3
  101. metadata +242 -128
  102. data/Gemfile +0 -22
  103. data/Rakefile +0 -81
  104. data/lib/asciidoctor-pdf/asciidoctor_ext/image.rb +0 -24
  105. data/lib/asciidoctor-pdf/asciidoctor_ext/section.rb +0 -34
  106. data/lib/asciidoctor-pdf/asciidoctor_ext.rb +0 -5
  107. data/lib/asciidoctor-pdf/core_ext/numeric.rb +0 -15
  108. data/lib/asciidoctor-pdf/core_ext/ostruct.rb +0 -17
  109. data/lib/asciidoctor-pdf/core_ext.rb +0 -4
  110. data/lib/asciidoctor-pdf/formatted_text/formatter.rb +0 -27
  111. data/lib/asciidoctor-pdf/formatted_text/inline_destination_marker.rb +0 -21
  112. data/lib/asciidoctor-pdf/formatted_text/inline_image_arranger.rb +0 -172
  113. data/lib/asciidoctor-pdf/formatted_text/inline_image_renderer.rb +0 -46
  114. data/lib/asciidoctor-pdf/formatted_text/transform.rb +0 -261
  115. data/lib/asciidoctor-pdf/implicit_header_processor.rb +0 -63
  116. data/lib/asciidoctor-pdf/index_catalog.rb +0 -119
  117. data/lib/asciidoctor-pdf/measurements.rb +0 -58
  118. data/lib/asciidoctor-pdf/pdf-core_ext/page.rb +0 -25
  119. data/lib/asciidoctor-pdf/pdf-core_ext/pdf_object.rb +0 -6
  120. data/lib/asciidoctor-pdf/pdf-core_ext.rb +0 -2
  121. data/lib/asciidoctor-pdf/pdfmark.rb +0 -33
  122. data/lib/asciidoctor-pdf/prawn-svg_ext/interface.rb +0 -10
  123. data/lib/asciidoctor-pdf/prawn-svg_ext.rb +0 -4
  124. data/lib/asciidoctor-pdf/prawn-table_ext/cell/asciidoc.rb +0 -69
  125. data/lib/asciidoctor-pdf/prawn-table_ext.rb +0 -3
  126. data/lib/asciidoctor-pdf/prawn_ext/coderay_encoder.rb +0 -115
  127. data/lib/asciidoctor-pdf/prawn_ext/extensions.rb +0 -863
  128. data/lib/asciidoctor-pdf/prawn_ext/images.rb +0 -40
  129. data/lib/asciidoctor-pdf/prawn_ext.rb +0 -5
  130. data/lib/asciidoctor-pdf/roman_numeral.rb +0 -114
  131. data/lib/asciidoctor-pdf/rouge_ext/css_theme.rb +0 -15
  132. data/lib/asciidoctor-pdf/rouge_ext/formatters/prawn.rb +0 -164
  133. data/lib/asciidoctor-pdf/rouge_ext.rb +0 -4
  134. data/lib/asciidoctor-pdf/sanitizer.rb +0 -88
  135. data/lib/asciidoctor-pdf/temporary_path.rb +0 -13
  136. data/lib/asciidoctor-pdf/theme_loader.rb +0 -247
  137. data/lib/asciidoctor-pdf/ttfunk_ext.rb +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f8bc83ea1a53067222edc4efed9a4e23d7b98824
4
- data.tar.gz: 55b679cc587279f0491af7aec91878c6acca01c9
2
+ SHA256:
3
+ metadata.gz: b745a95bf56222abcbf7b3bb4d86f1b6fa1212db2f7647e80f5afd8b2a7aaf5f
4
+ data.tar.gz: f7c78b8f11502cea2922d97fe11f28bcf2d3e55f1597ba4f454d0c32e21e4f91
5
5
  SHA512:
6
- metadata.gz: 632d25962bc66acf9b8b015a1e76b85e69a4f7a7b516cc9ea24c411e4b4db6e5280f23145c9beae321cfcd7b835821e86f0d81f6b4fa1731847eb6fa27e90bf7
7
- data.tar.gz: 477e19845f08bba51aee292c662e2ec6cad47d814ba683959ec23c7eaf0615e7c32a6b1ebe4b565f036d47bc88b02971f7e83c6cfcb2083c26ef148ffe838ffc
6
+ metadata.gz: ccd5ed955367f8580e72583c28ea2754089326e79e80cb443499c41054d545b0bc88ff0225502058b6f5d856dbfd52120a6f52441eb9cd25f50ec5b2afabe83b
7
+ data.tar.gz: d3c062fca45030355a179b677794c5fc458872b3990d15f31056c6aef92800765b14bda103d999bfcfa100875f55338f7587779c44fa23ff8ef50ffb27c9fde5
data/.yardopts ADDED
@@ -0,0 +1,12 @@
1
+ --charset UTF-8
2
+ --readme README.adoc
3
+ --no-private
4
+ --hide-api private
5
+ --title "Asciidoctor PDF API Docs"
6
+ --output-dir apidoc
7
+ --exclude /(?:asciidoctor_ext|core_ext)(?:\.rb$|/)
8
+ lib/**/*.rb
9
+ -
10
+ CHANGELOG.adoc
11
+ LICENSE.adoc
12
+ NOTICE.adoc
data/CHANGELOG.adoc CHANGED
@@ -5,6 +5,416 @@
5
5
  This document provides a high-level view of the changes to the {project-name} by release.
6
6
  For a detailed view of what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.
7
7
 
8
+ == 1.5.0 (2020-02-11) - @mojavelinux
9
+
10
+ * support table with multiple head rows & decorate accordingly (#1539)
11
+ * draw background and border around entire delimited block with wrapped text that appears inside an AsciiDoc table cell (#820)
12
+ * fix crash when document has PDF cover page and SVG page background (#1546)
13
+ * allow page mode to be fully configured using pdf-page-mode attribute or page_mode theme key (#840)
14
+ * allow background image to be specified using a data URI
15
+ * allow running content image to be specified using a data URI
16
+ * support creating empty front or back cover by assigning empty value to front-cover-image or back-cover-image attribute
17
+ * only warn once per missing character (#1545)
18
+ * render pass block as listing block, using raw source as contents
19
+ * prevent image placeholder from altering character spacing in inline SVG (#1550)
20
+
21
+ == 1.5.0.rc.3 (2020-02-04) - @mojavelinux
22
+
23
+ * reserve space for inline image correctly so it doesn't mangle the character spacing in the line when the image wraps (#1516)
24
+ * allow custom theme to merge font catalog with theme being extended (#1505)
25
+ * allow font path to be declared once for all font styles (#1507)
26
+ * continue border, background, and column rule of admonition block on subsequent pages when block gets split (#1287)
27
+ * allow max-width on caption be specified as a percentage (of the container width) (#1484)
28
+ * add support for remote image in running content (if allow-uri-read attribute is set) (#1536)
29
+ * add support for remote background images specified by theme (if allow-uri-read attribute is set) (#1536)
30
+ * add support for remote title page logo image specified by theme (if allow-uri-read attribute is set) (#1536)
31
+ * place dots on correct page when section title in TOC wraps across a page boundary (#1533)
32
+ * add destination to top of imported PDF if ID is specified on image block
33
+ * log reason if theme file cannot be parsed or compiled (#1491)
34
+ * fix crash if background image in theme is not readable
35
+ * bundle emoji font and use as fallback in default-with-fallback-font theme (#1129)
36
+ * add dark theme for chronicles example
37
+ * allow vertical-align key for header and footer categories to accept numeric offset as second value (e.g., [top, 10]) (#1488)
38
+ * link font family for abstract and sidebar to heading font family if only latter is set
39
+ * if path of missing font is absolute, don't suggest that it was not found in the fontsdir
40
+ * allow use of style "regular" as alias for "normal" when defining font
41
+ * emit warning in verbose mode if glyph cannot be found in fallback font (#1529)
42
+ * don't crash if table is empty and emit warning (#607)
43
+ * only emit warning when non-WINANSI character is used with AFM font if verbose mode is enabled
44
+ * do not emit warning when non-WINANSI character is used with AFM font inside scratch document
45
+ * do not emit log messages from scratch document
46
+ * upgrade treetop to 1.6
47
+ * reenable tests on Windows (#1499) *@slonopotamus*
48
+
49
+ == 1.5.0.rc.2 (2020-01-09) - @mojavelinux
50
+
51
+ * patch Prawn to fix incompatibilty with Ruby 2.7 (to fix text wrapping)
52
+ * fix crash when assigning font style to header cell in table body (#1468)
53
+ * fix parsing of array value of pdf-page-margin attribute (#1475)
54
+ * fix warning when reading data from a remote URL when running with Ruby 2.7 (#1477)
55
+ * pass SVG warnings to logger (#1479)
56
+ * compress streams if the compress attribute is set on the document (#1471)
57
+ * don't set heading-font-family in default theme so it inherits from base
58
+
59
+ == 1.5.0.rc.1 (2020-01-06) - @mojavelinux
60
+
61
+ * support data URI for SVG image (#1423)
62
+ * account for border offset in width of fragment (#1264)
63
+ * ignore case when sorting index terms (#1405)
64
+ * partition section title (title and subtitle) if `title-separator` document attribute or `separator` block attribute is set (#623)
65
+ * allow page numbering to start after first page of body by assigning an integer to the page_numbering_start_at theme key (#560)
66
+ * allow running content to start after first page of body by assigning an integer to the running_content_start_at theme key (#1455)
67
+ * allow output file to be written to stdout (#1411)
68
+ * implement line highlighting for source blocks when using Rouge as source highlighter (#681)
69
+ * implement line highlighting for source blocks when using Pygments as source highlighter (#1444)
70
+ * indent wrapped lines in source block beyond linenum gutter (#504)
71
+ * don't mangle source block if linenums are enabled and language is not set
72
+ * don't print line number if source block is empty
73
+ * don't apply recto margin to title page if cover is absent unless value of front-cover-image attribute is `~` (#793)
74
+ * expose theme as property on converter
75
+ * add support for unbreakable option on open blocks (#1407) *@mogztter*
76
+ * don't add mailto: prefix to revealed mailto URI when hide-uri-scheme is set (#920)
77
+ * allow theme to set base text decoration width (#1414)
78
+ * allow theme to set font-kerning per category (#1431)
79
+ * allow theme to specify background image for running content (#356)
80
+ * allow theme to specify border for admonition block (#444)
81
+ * allow theme to specify background color for admonition block (#444)
82
+ * allow theme to specify background color and full border for quote and verse blocks (#1309)
83
+ * allow text alignment roles to be used to control alignment of discrete heading
84
+ * allow theme to configure image caption align(ment) to inherit from image align(ment) (#1459)
85
+ * allow theme to confine width of image caption to width of image (#1291)
86
+ * don't apply border to block if border width is not set (or nil)
87
+ * use font color from pygments style for unhighlighted text (#1441)
88
+ * render stem block as raw literal block
89
+ * render stem phrase as monospaced text
90
+ * honor percentage unit on width attribute value on image (#1402)
91
+ * fix crash when capitalizing text that does not contain markup
92
+ * allow custom inline role to control text transform (#1379)
93
+ * convert link macro enclosed in smart quotes
94
+ * allow inline image to be fit within line using fit=line (#711)
95
+ * fix fit=cover for background image when aspect ratio of image is taller than page (#1430)
96
+ * compute and apply line metrics for cells in table head row (#1436)
97
+ * compute and apply line metrics correctly for cells in table body and foot rows (#1436)
98
+ * allow section to override toclevels for self and children using toclevels attribute on section (#734)
99
+ * allocate space for pagenum in toc consistently (#1434)
100
+ * fall back to default theme instead of crashing if specified theme cannot be resolved
101
+ * allow font color to be set on nested span in passthrough content
102
+ * move width and align attributes from font tag to width and align style properties on span tag
103
+ * compute table cell padding correctly when specified as a 4 element array
104
+ * preserve isolated callout on final line of source block
105
+ * fix missing require in asciidoctor-pdf-optimize script (#1467)
106
+ * lock version of ttfunk to 1.5.x
107
+
108
+ == 1.5.0.beta.8 (2019-11-23) - @mojavelinux
109
+
110
+ * automatically hyphenate prose using the text-hyphen gem if the `hyphens` document attribute is set (#20)
111
+ * set hyphenation language using the `hyphens` attribute value, falling back to the `lang` attribute (#20)
112
+ * add support for capitalize text transform (#1382)
113
+ * fix AsciiDoc table cell from overflowing bounds of table and creating extra page (#1369)
114
+ * don't double escape XML special characters in literal table cell (#1370)
115
+ * allow theme to customize the width and color of text decoration (underline and line-through) (#812)
116
+ * use same line height throughout abstract
117
+ * don't mangle XML attribute values when applying lowercase text transform (#1391)
118
+ * place toc at same position in outline as it is in the document (#1361)
119
+ * log warning with error message if remote image cannot be retrieved
120
+ * allow initial page mode to be set to fullscreen using pdf-page-mode=fullscreen attribute or page_mode=fullscreen theme key (#1357)
121
+ * allow theme to configure content of entries in authors line on title page (#800)
122
+ * allow theme to override styles of caption on admonition blocks (#561)
123
+ * allow theme to configure hanging indent for titles in toc (#1153)
124
+ * apply hanging indent to wrapped entries in index (#645)
125
+ * allow theme to configure text decoration of headings (#811)
126
+ * define line-through and underline roles as built-in custom roles so they can be customized (#1393)
127
+ * allow top value of logo and title on title page to be specified in any measurement unit
128
+ * don't set a top value for the logo on the title page if not set in theme
129
+ * if value of scripts attribute is cjk, break lines between any two CJK characters except punctuation in table cells (#1359) (*gasol*)
130
+ * ignore invalid cellbgcolor value (#1396)
131
+ * recommend installing prawn-gmagick gem if image format is unsupported
132
+ * set cache_images option on SVG interface if cache-uri attribute is set on document (#223)
133
+ * upgrade prawn-svg to fix display of links in plantuml diagrams (#1105)
134
+ * allow icon set to be specified as prefix on target of icon macro (#1365)
135
+ * write Unix epoch dates to pdfmark file in UTC when reproducible is set
136
+ * don't include software versions in PDF info if reproducible attribute is set
137
+ * fix optimizer so it applies pdfmark after reading input file
138
+ * allow converter instance to be reused
139
+
140
+ == 1.5.0.beta.7 (2019-10-29) - @mojavelinux
141
+
142
+ * fix value of implicit page-count attribute when page numbering and running content don't start on same page (#1334)
143
+ * fix value of implicit chapter-title attribute on preface pages (#1340)
144
+ * show value of untitled-label attribute in outline if doctitle is not set (#1348)
145
+ * don't show entry for doctitle in outline if doctitle is not set and untitled-label attribute is unset (#1348)
146
+ * generate outline if document has doctitle but no body (#1349)
147
+ * allow elements on title page to be disabled from theme using display: none (#1346)
148
+ * set chapter-title attribute to value of toc-title attribute on toc pages in book (#1338)
149
+ * set section-title attribute to value of toc-title attribute on toc pages in article if page has no other sections (#1338)
150
+ * allow ranges of pages from PDF file to be imported using image macro as specified by pages attribute (#1300)
151
+ * set default footer content in base theme; remove logic to process `footer_<side>_content: none` key (#1320)
152
+ * include doctitle in outline for article when article is only a single page (#1322)
153
+ * allow custom (inline) role to control text decoration property (#1326)
154
+ * point doctitle entry in outline to first page of content when doctype is article and document has front cover
155
+ * fix asciidoctor-pdf-optimize script and register it as a bin script
156
+ * rename `-q` CLI option of asciidoctor-pdf-optimize script to `--quality`
157
+ * only promote first paragraph of preamble to lead paragraph (assuming it has no role) (#1332)
158
+ * don't promote first paragraph of preamble to lead paragraph if it already has a role (#1332)
159
+ * fix crash when document has no doctitle or sections and untitled-label attribute is unset
160
+ * ignore invalid align value for title logo image (#1352)
161
+
162
+ == 1.5.0.beta.6 (2019-10-11) - @mojavelinux
163
+
164
+ * reorganize source files under asciidoctor/pdf folder (instead of asciidoctor-pdf)
165
+ * reorganize monkeypatch files under asciidoctor/pdf/ext
166
+ * allow toc to be positioned using toc macro (#1030)
167
+ * extend dots leading up to page number from wrapped line in toc (#1152)
168
+ * set fit=contain by default on cover and page background images (#1275)
169
+ * implement fit=fill for cover, page background, and running content raster (non-SVG) images (#1276)
170
+ * allow foreground image (e.g., watermark) to be added to each page using page-foreground-image attribute or theme key (#727)
171
+ * allow section body to be indented using section_indent key in theme (#737)
172
+ * add glyphs for built-in characters to bundled monospace font (M+ 1mn) (#1274)
173
+ * look for "noborder" role on image even if other roles are defined
174
+ * remove deprecated table_odd_row_background_color and table_even_row_background_color keys from theme
175
+ * implement unordered and ordered description lists (#1280)
176
+ * recognize transparent as valid value for cellbgcolor attribute
177
+ * allow custom role to revert font style to normal (#1286)
178
+ * allow theme to control font properties (font size, font color, etc) of description list term (#1289)
179
+ * allow theme to override caption styles for specific block categories: blockquote, code, example, footnotes, image, listing, and table (#307)
180
+ * allow theme to control style of verse block independently of a quote block (#40)
181
+ * position list marker correctly when media=prepress and list item is advanced to next page or split across pages (#1303)
182
+ * layout horizontal dlist in two columns (#310)
183
+ * apply normal substitutions to content of manname section (#1294)
184
+ * optimize PDF using quality specified in value of optimize attribute if optimize attribute is set (#535)
185
+ * allow xref macro to override xrefstyle set on document
186
+ * assume admonition icon in theme is a legacy FontAwesome icon if the icon set prefix is absent
187
+ * rewrite optimize-pdf as a bin script named asciidoctor-pdf-optimize
188
+ * allow image alt text formatting and arrangement to be controlled by theme (#730)
189
+ * upgrade prawn-icon to 2.5.0 (which upgrades Font Awesome to 5.11.2)
190
+
191
+ == 1.5.0.beta.5 (2019-09-13) - @mojavelinux
192
+
193
+ * pass styles for inline elements downwards when parsing, allowing role to override default styles for element (#1219)
194
+ * document title in outline should point to second page if document has cover page (#1268)
195
+ * start at setting for running content and page numbering must account for disabled title page (book doctype) (#1263)
196
+ * start at setting for running content and page numbering must account for front cover (#1266)
197
+ * preserve indentation that uses tabs in verbatim blocks when tabsize is not set (#1258)
198
+ * use consistent line height for list items and toc entries if text is entirely monospace (#1204)
199
+ * fix spacing between items in qanda list
200
+ * expand home directory reference in theme name when value ends with .yml and no themedir is specified
201
+
202
+ == 1.5.0.beta.4 (2019-09-04) - @mojavelinux
203
+
204
+ * always use ; as delimiter to separate multiple font dirs to be compatible with JAR paths (#1250)
205
+ * preserve hyphens in role names in theme file (#1254)
206
+ * allow second arg of outlinelevels attribute to control expand depth of outline (#1224)
207
+ * allow font catalog and font fallbacks to be defined as flat keys in the theme file (#1243)
208
+ * don't crash when adding indentation guards to source highlighted with Pygments (#1246)
209
+ * don't override font color of formatted text in toc (#1247)
210
+ * prevent toc from overrunning first page of content by reserving more space for the page number (#1242)
211
+ * allow number of digits reserved for page number in the toc to be adjusted using toc-max-pagenum-digits attribute (#1242)
212
+
213
+ == 1.5.0.beta.3 (2019-08-30) - @mojavelinux
214
+
215
+ * allow multiple font dirs to be specified using the pdf-fontsdir attribute (#80)
216
+ * fill and stroke bounds of example across all pages (#362)
217
+ * allow page background color and background image to be used simultaneously (#1186)
218
+ * allow theme to specifiy initial zoom (#305)
219
+ * strip surrounding whitespace from text in normal table cells
220
+ * allow attribute references to be used in image paths in theme (#588)
221
+ * resolve variables in font catalog in theme file
222
+ * honor the cellbgcolor attribute defined in a table cell to set the cell background color (#234) (*mch*)
223
+ * add the .notdef glyph to the bundled fonts (a box which is used as the default glyph if the font is missing a character) (#1194)
224
+ * don't drop headings if base font family is not set in theme
225
+ * don't crash if heading margins are not set in theme
226
+ * don't rely on base_line_height_length theme key in converter (should be internal to theme)
227
+ * set fallback value for base (root) font size
228
+ * reduce min font size in base theme
229
+ * allow theme to configure the minimum height required after a section title for it to stay on same page (#1210)
230
+ * convert hyphen to underscore in theme key for admonition icon type (#1217)
231
+ * always resolve images in running content relative to themesdir (instead of document) (#1183)
232
+ * fix placement of toc in article when doctitle is not set (#1240)
233
+ * honor text alignment role on abstract paragraph(s)
234
+ * don't insert blank page at start of document if media=prepress and document does not have a cover (#1181)
235
+ * insert blank page after cover if media=prepress (#1181)
236
+ * add support for stretch role on table (as preferred alias for spread) (#1225)
237
+ * include revremark on title page if specified (#1198)
238
+ * allow theme to configure border around block image (#767)
239
+ * align first block of list item with marker if primary text is blank (#1196)
240
+ * apply correct margin to list item if primary text is blank (#1196)
241
+ * allow page break before and after part and before chapter to be configured by theme (#74)
242
+ * allow page number of PDF to import to be specified using `page` attribute on image macro (#1202)
243
+ * use value of theme key heading-margin-page-top as top margin for heading if cursor is at top of page (#576)
244
+ * resolve icon image relative to docdir instead of current working directory
245
+ * allow theme to style mark element; add default styles to built-in themes (#1226)
246
+ * if value of scripts attribute is cjk, break lines between any two CJK characters (except punctuation) (#1206)
247
+ * add support for role to font-based icon (to change font color) (#349)
248
+ * use fallback size for admonition icon
249
+ * allow attribute reference in running content to be escaped using a backslash
250
+ * allow theme to configure text background and border on a phrase with a custom role (#1223)
251
+ * fix crash if source-highlighter attribute is defined outside the header (#1231)
252
+ * fix crash when aligning line numbers of source highlighted with Pygments (#1233)
253
+
254
+ == 1.5.0.beta.2 (2019-07-30) - @mojavelinux
255
+
256
+ * only apply title page background image to the title page (#1144)
257
+ * make sure title page background or color (and only title page background or color) gets applied to title page even when page has already been created (#1144)
258
+ * fix crash when image_width is defined in theme (#995)
259
+ * fix crash when toc is enabled and toc-title attribute is unset
260
+ * correctly map legacy Font Awesome icon names when icon set is not specified (#1157)
261
+ * coerce color values in theme that contain uppercase letters (#1149)
262
+ * prevent table alignment from modifying margins of subsequent pages; only align table if width is less than bounds (#1170)
263
+ * ensure base font color is set
264
+ * use more robust mechanism to detect an empty page; tare content stream after adding page background color or image
265
+ * ignore pdf-themesdir unless pdf-theme is specified (#1167)
266
+ * allow theme to control glyphs used for conums (#133)
267
+ * allow theme to control background and border of inline kbd (#313, #1004)
268
+ * add support for link on image in running content (#1002)
269
+ * allow theme to disable font kerning
270
+ * add support for default theme alignment for tables (#1164)
271
+ * add theming support to (inline) roles on phrases (#368)
272
+ * allow theme to customize style of titles in running content (#1044)
273
+ * add support for the built-in big and small roles on phrases (#459)
274
+ * route AFM font warning through Asciidoctor logger
275
+ * upgrade code font (M+ 1mn) to TESTFLIGHT-63a
276
+ * include all alphanumeric characters in code font (mplus1mn) (#282)
277
+ * report clearer error message when theme can't be found or loaded
278
+ * document how to prepare a TTF font to work best with Asciidoctor PDF (#297)
279
+
280
+ == 1.5.0.beta.1 (2019-07-08) - @mojavelinux
281
+
282
+ * rename pdf-style and pdf-stylesdir attributes to pdf-theme and pdf-themesdir, respectively (while still honoring the old names for compatibility) (#1127)
283
+ * don't load fallback font by default; move fallback font to default-with-fallback-font theme
284
+ * apply cell padding to table cells in the head row (#1098)
285
+ * allow the theme to control the padding of table cells in the head row using the table_head_cell_padding key (#1098)
286
+ * fix position of table caption for reduced-width tables when caption align is center (#1138)
287
+ * adjust width of table caption to match width of table unless table_caption_max_width is none in theme (#1138)
288
+ * fix position of text in running header (#1087)
289
+ * ignore start attribute on ordered list if marker is disabled
290
+ * allow start value to be negative for ordered lists that use arabic or roman numbering (#498)
291
+ * don't convert values in theme which are not color keys to a string (#1089)
292
+ * apply page layout specified on page break even when break falls page boundary (#1091)
293
+ * scale SVG background image to fit page in the same way raster image is scaled (#765)
294
+ * allow page background size to be controlled using image macro attributes (#1117)
295
+ * allow page background image position to be controlled using position attribute on image macro (#1124)
296
+ * add support for fit=cover for cover, page background, and running content images (#1136)
297
+ * change default background image position to center (#1124)
298
+ * allow cover image position to be controlled using position attribute on image macro (#1134)
299
+ * change default cover image position to center (#1134)
300
+ * allow cover image size to be controlled using fit, pdfwidth, and width attributes; don't scale image by default (#1134)
301
+ * set enable_file_requests_with_root and enable_web_requests options for all SVGs (#683)
302
+ * automatically set pdf-stylesdir if pdf-style ends with .yml and pdf-stylesdir is not specified (#1126)
303
+ * replace hyphens with underscores in top-level theme keys
304
+ * allow hyphens to be used in variable references in theme (#1122)
305
+ * allow theme to control background and border of inline code (literal) (#306)
306
+ * allow theme to control background and border of inline button (#451)
307
+ * resolve null color value in theme to nil (aka not set)
308
+ * add support for cgi-style options on source language when syntax highlighting with Rouge (#1102)
309
+ * apply custom theme to chronicles example to customize running content and demonstrate how to extend default theme
310
+ * drop remapping of legacy running content keys in theme data
311
+ * resize running content to fit page layout (#1036)
312
+ * exclude border width from running content area (#1109)
313
+ * support text-transform property in running content (#702)
314
+ * make depth of section titles assigned to section-title attribute in running content configurable (#1141)
315
+ * support width attribute on image in running content if no other dimension attribute is specified
316
+ * apply correct scale-down logic to image in running content
317
+ * allow image format to be specified using format attribute (cover page image, page background image, running content image) (#1132)
318
+ * allow theme to set bottom border properties (color, style, and width) of table head row (#770)
319
+ * allow column rule and spacing to be specified for running content when multiple columns are specified (#1093)
320
+ * never load base theme when loading default theme; otherwise load base theme if extends isn't specified, but only if theme data hasn't been initialized
321
+ * shorten text-alignment attribute to text-align
322
+ * set PDF version to 1.4 by default (#302)
323
+ * allow PDF version to be set using pdf-version document attribute (#302)
324
+
325
+ == 1.5.0.alpha.18 (2019-06-01) - @mojavelinux
326
+
327
+ * restore compatibility with Asciidoctor back to 1.5.3 and add verification to test matrix (#1038)
328
+ * allow one theme to extend another theme using the top-level `extends` key (#367)
329
+ * allow theme to set text indent for paragraphs using prose_text_indent (#191)
330
+ * allow theme to set spacing between adjacent paragraphs using prose_margin_inner (#191)
331
+ * show parts in toc when toclevels=0 (#783)
332
+ * add support for autonumbered callouts in source blocks (#1076)
333
+ * fix duplication of footnotes in keep together regions (#1047)
334
+ * display standalone preamble in book normally (#1051)
335
+ * allow outline depth to be set using outlinelevels attribute independent of toclevels (#1054)
336
+ * fix compounding cell padding (#1053)
337
+ * add support for qanda list (#1013)
338
+ * fix parsing of bibref and link inside footnote text (#1061)
339
+ * restore square brackets around ID of bibliography entry with custom ID (#1065)
340
+ * add page_numbering_start_at key to theme to control start page for page numbering (#1041)
341
+ * don't allow running_content_start_at key to affect page numbering (#1041)
342
+ * substitute \{chapter-title} property on front matter pages (replace with doctitle and toc-title, respectively, when running content starts before first page of body) (#1040)
343
+ * allow side margins to be set on elements on title page (#824)
344
+ * don't promote preamble to preface if preface-title attribute is empty
345
+ * expand padding value for running content (header and footer) to array
346
+ * add support for unnumbered (and no-bullet) style on ordered list (#1073)
347
+ * add visual regression capability to test suite (@beatchristen)
348
+ * ensure index section doesn't get numbered when using Asciidoctor < 1.5.7
349
+ * add part signifier and part number to part title if partnums is set; allow signifier to be customized using part-signifier attribute (#597)
350
+ * add support for the chapter-signifier attribute as the prefered alternative to chapter-label
351
+ * warn if the image referenced in the running content cannot be found (#731)
352
+
353
+ == 1.5.0.alpha.17 (2019-04-23) - @mojavelinux
354
+
355
+ * drop support for Ruby < 2.3 (and installation will fail for Ruby < 2.1)
356
+ * add asciidoctor/pdf and asciidoctor/pdf/version require aliases (#262)
357
+ * rename module to Asciidoctor::PDF and define Asciidoctor::Pdf alias for backwards compatibility (#262)
358
+ * switch to tilde dependency versions (flexible patch number) instead of ranges
359
+ * upgrade prawn-svg to 0.29.1; resolves numerous SVG rendering issues (#886, #430)
360
+ * drop support for Rouge < 2
361
+ * add a test suite (#37)
362
+ * allow running content (header and footer) to be enabled on title and toc pages; controlled by running_content_start_at property in theme (#606)
363
+ * add support for nbsp named entity (i.e., `+&nbsp;`); replace occurances of nbsp named entity with a single space in outline
364
+ * upgrade to FontAwesome 5; introduce the fas, far, and fab icon sets, now preferred over fa; drop support for octicons (#891) (@jessedoyle)
365
+ * place footnotes at end of chapters in books or end of document otherwise (#85) (@bcourtine)
366
+ * fix rendering of footnotes directly adjacent to text in a normal table cell (#927)
367
+ * place toc directly after document title when doctype is not book (#233) (@ogmios-voice)
368
+ * add page layout control to page break (#490) (@resort-diaper)
369
+ * allow additional style properties to be set per heading level (#176) (@billybooth)
370
+ * add support for hexadecimal character references, including in link href (#486)
371
+ * force set data-uri attribute on document so Asciidoctor Diagram returns absolute image paths (#1033)
372
+ * set line spacing for non-AsciiDoc table cells (#296)
373
+ * consider all scripts when looking for leading alpha characters in index (#853)
374
+ * don't create title page for article doctype unless title-page attribute is set (#105)
375
+ * don't show article title if notitle attribute is set (#998)
376
+ * generate name section for manpage doctype automatically (#882)
377
+ * remove unprocessed passthroughs in literal cells
378
+ * apply font style from theme to formatted text description list term (#854)
379
+ * prevent tempfile for remote image from being deleted before it's used (#947)
380
+ * handle case when uri to make breakable is empty (#936)
381
+ * add support for frame=ends as alternative to frame=topbot on table
382
+ * allow table frame and grid to be set globally using the table-frame and table-grid attributes (#822)
383
+ * disable table stripes by default (#1049)
384
+ * allow table stripes to be enabled globally using table-stripes attribute (#1049)
385
+ * use new logging subsystem, if available; otherwise, use shim (#905)
386
+ * allow alignment of list text to be controlled using roles (#182)
387
+ * allow text alignment to be set for abstract (#893)
388
+ * prevent text from overlapping page number in TOC (#839)
389
+ * allow ulist marker to be controlled by theme (#798)
390
+ * add support for reftext for bibliography entry (#864)
391
+ * add support for fw (full-width) icons (#890)
392
+ * decouple vw units with alignment (#948)
393
+ * add align-to-page option for block images (#948)
394
+ * add support for SVG admonition icons (#828) (@keith-packard)
395
+ * rename pastie theme for Rouge to asciidoctor_pdf_default
396
+ * add bw theme for Rouge (#1018)
397
+ * reset top margin of index columns when overflowing to new page (#929)
398
+ * add support for line numbers in source listings (#224)
399
+ * add U+2060 (word joiner) character to built-in Noto Serif font and fallback font (#877)
400
+ * add U+202F (narrow no-break space) character to fallback font (#807)
401
+ * ensure callout number ends up on same page as item text (#914)
402
+ * guard against pygments returning nil (#884)
403
+ * encode quotes in alt text of inline image (#977)
404
+ * fix crash when menu macro is used in a section or block title (#934)
405
+ * remove duplicate message when syntax highlighter is unavailable; don't crash processor (#1078)
406
+ * only look for the start attribute on the code block itself when highlighting with rouge
407
+ * apply block styling to background for line-oriented tokens in rouge by default
408
+ * detect pagenum ranges in index when media is print or prepress (#906)
409
+ * ignore style when resolving icon font (#956, #874)
410
+ * remove correct width method when overloading Prawn::Text::Formatted::Fragment
411
+ * remove ZWSP from alt text of image to prevent fragment from being duplicated (#958)
412
+ * avoid call to super in prepended module to fix Ruby 1.9.3
413
+ * look for correct file to require in bin script
414
+ * upgrade prawn-icon from 1.3.0 to 1.4.0
415
+ * upgrade rouge to 2.2.1
416
+ * add concurrent-ruby to runtime dependencies for compatiblity w/ Asciidoctor 1.5.8
417
+
8
418
  == 1.5.0.alpha.16 (2017-07-30) - @mojavelinux
9
419
 
10
420
  * add support for xrefstyle attribute (#464)
@@ -47,7 +457,8 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[
47
457
  * implement start line number for source listing (Rouge) (#752)
48
458
  * enable "start inline" option when highlighting PHP (#755)
49
459
  * persuade CodeRay to handle html+ source languages
50
- * introduce stripes attribute to table to control zebra-striping (#724)
460
+ * introduce stripes attribute to table to control zebra striping (#724)
461
+ * use theme key table_body_stripe_background_color to control color of table stripes (#724)
51
462
  * allow theme to set style of table border and grid (#766)
52
463
  * allow theme to set text transform on header cell in table body (#750)
53
464
  * set top border width of first body row to match bottom border width of header row
@@ -117,6 +528,8 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[
117
528
  * map dynamic section-title attribute in running content to current section if page has no section (#709)
118
529
  * assign dynamic part-title attribute for use in running content (#596)
119
530
  * don't set dynamic chapter-title attribute in running content for preface unless doctype is book
531
+ * clear section and chapter title in running content when part changes (#910, #879)
532
+ * clear section title in running content when chapter changes (#910)
120
533
  * assign page number label to each page (#641)
121
534
  * don't set dynamic page-number attribute in running content of pagenums is disabled
122
535
  * allow toc title properties to be controlled by theme (#701)
@@ -130,6 +543,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[
130
543
  * don't crash if image in running content fails to embed (#728)
131
544
  * treat abstract section as abstract block (#703)
132
545
  * set example block background to white by default
546
+ * automatically wire unspecified code and conum font family to literal font family
133
547
  * add support for background colors when highlighting code with Rouge
134
548
  * add support underline style for token in Rouge theme (#665)
135
549
  * drop background colors on strings in rouge pastie theme
data/LICENSE.adoc CHANGED
@@ -1,6 +1,6 @@
1
1
  .The MIT License
2
2
  ....
3
- Copyright (C) 2014-2016 OpenDevise Inc. and the Asciidoctor Project
3
+ Copyright (C) 2014-2020 OpenDevise Inc. and the Asciidoctor Project
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/NOTICE.adoc CHANGED
@@ -1,7 +1,7 @@
1
1
  = Asciidoctor PDF
2
2
  OpenDevise Inc.; Asciidoctor Project
3
3
 
4
- Copyright (C) 2014-2016 OpenDevise Inc. and the Asciidoctor Project.
4
+ Copyright (C) 2014-2020 OpenDevise Inc. and the Asciidoctor Project.
5
5
 
6
6
  Please visit the Asciidoctor project site for more information:
7
7
 
@@ -26,7 +26,7 @@ M+ OUTLINE FONTS (M+ TESTFLIGHT 058)::
26
26
 
27
27
  - http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/index-en.html
28
28
 
29
- Noto Serif Font (v2014-01-30)::
29
+ Noto Serif Font (v2015-06-05)::
30
30
  Noto is font family developed by the Google Internationalization Team that aims to support all the world's languages.
31
31
  The Noto Serif font is used for headings and body copy and is bundled in the PDF file.
32
32
  The Noto fonts are licensed under the Apache 2.0 License.
@@ -36,7 +36,7 @@ Noto Serif Font (v2014-01-30)::
36
36
 
37
37
  - https://code.google.com/p/noto/
38
38
 
39
- Font Awesome Icon Font (v4.0.3)::
39
+ Font Awesome Icon Font (v5.4)::
40
40
  Font Awesome (@fontawesome), the iconic font designed for Bootstrap by David Gandy (@davegandy), is used for the admonition icons and other icons in author's content and bundled in the PDF file.
41
41
  Font Awesome is fully open source and GPL compatible.
42
42
  The font is licensed under the SIL Open Font 1.1 License (OFL).
@@ -46,14 +46,6 @@ Font Awesome Icon Font (v4.0.3)::
46
46
 
47
47
  - http://fontawesome.io
48
48
 
49
- Liberation Fonts (v2.00.1)::
50
- The Liberation(tm) Fonts 2.00.1, which are used by default, are licensed under the SIL Open Font License, Version 1.1.
51
- You may obtain a copy of the license at:
52
-
53
- http://scripts.sil.org/OFL
54
-
55
- - https://fedorahosted.org/liberation-fonts
56
-
57
49
  RomanNumeral class::
58
50
  The RomanNumeral class, which is used for numbering of ordered lists, is borrowed from the roman-numerals RubyGem and modified for the purpose of this application.
59
51
  The original RomanNumerals class was written by Andrew Vos and is licensed under the MIT License.
@@ -74,3 +66,14 @@ Bootstrap (v3.0.3)::
74
66
  The default theme is inspired by Bootstrap 3.0.3.
75
67
 
76
68
  - http://getbootstrap.com
69
+
70
+ spec/fixtures/cover.jpg::
71
+ Attribution: Dominicus Johannes Bergsma; License: Creative Commons Attribution-Share Alike 3.0 Unported
72
+ This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
73
+
74
+ - https://commons.wikimedia.org/wiki/File:Dahlia_%27Bishop_of_Auckland.JPG
75
+
76
+ spec/fixtures/tux.png::
77
+ Attribution: Larry Ewing, Simon Budig, Garrett LeSage; License: Creative Commons CC0 1.0 Universal Public Domain Dedication
78
+
79
+ - https://commons.wikimedia.org/wiki/File:Tux.svg