asciidoctor-pdf 1.5.0.alpha.14 → 1.5.0.alpha.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94832dc67ed7ce7dfc52ecd5245bcd47d1a13ad7
4
- data.tar.gz: fe2c218069cc009756e83c8e8aacaa3d15b48a88
3
+ metadata.gz: 33a408180f820e2def56daa216f2993e059faa37
4
+ data.tar.gz: a375982bb4846383206446e61b5151c0928f2f0a
5
5
  SHA512:
6
- metadata.gz: 881736c11065cddaf7cbef76d587016267605b6acb9c09a7f694f6a0c347e4aeec09e2ba151dd3528dbcd9198e8f4322c15956e7fa61c6e9c675756ec386aaa9
7
- data.tar.gz: f37f79944645d1139fbd347761d028f80595f3f0a827b8cd9b65d8ef177929336882f93f1f2ea66a15a79a4ad3998117f9d9c0f8c4f8f3ecb5e5220e62cd03ff
6
+ metadata.gz: 7fd089829761e7ba27f54cda90169aece0fa6e3f7bb564ad35ca9889b806e2685796cb26836e8ff8295bc4ec42d8aa1ea62a7fc81dad745c98dbd6d6e2dea3d4
7
+ data.tar.gz: cb2ffc4ae5b0d69538583e4a992787185b5bec827c64df6d7bf15cb619355e30740a929dfb91f7feea9231670bbe07c335557552e9f0658efea454f413b63981
data/CHANGELOG.adoc CHANGED
@@ -5,6 +5,37 @@
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.alpha.15 (2017-03-27) - @mojavelinux
9
+
10
+ * fix compatibility with Prawn 2.2.0 (#775)
11
+ * add workaround for TTFunk bug when font table has empty data
12
+ * take fallback font into account when calculating width of string (#651)
13
+ * fill and stroke bounds of sidebar across all pages (#259) (@TobiasHector)
14
+ * allow page margin to be set using pdf-page-margin attribute (#749)
15
+ * implement none, no-bullet and unstyled unordered list styles
16
+ * add dots to all levels in TOC if toc_dot_leader_levels is all
17
+ * use bold style for description list term by default (#776)
18
+ * always escape index term text (#761)
19
+ * don't crash if color value on text span is invalid
20
+ * implement start line number for source listing (Rouge) (#752)
21
+ * enable "start inline" option when highlighting PHP (#755)
22
+ * persuade CodeRay to handle html+ source languages
23
+ * introduce stripes attribute to table to control zebra-striping (#724)
24
+ * allow theme to set style of table border and grid (#766)
25
+ * allow theme to set text transform on header cell in table body (#750)
26
+ * set top border width of first body row to match bottom border width of header row
27
+ * don't add TOC if empty (#747)
28
+ * optimize code that generates outline level
29
+ * don't recalculate header_cell_data for each row
30
+ * use slightly more efficient way to find Pygments lexer
31
+ * upgrade rouge to 2.0.7
32
+ * upgrade prawn-templates to 0.0.5
33
+ * revise information in theming guide pertaining to custom fonts
34
+ * document in README how to get full support for CJK languages
35
+ * document in theming guide that Asciidoctor PDF subsets font when embedding
36
+ * document that background images are scaled to fit bounds of page
37
+ * add note in theming guide about using double quoted strings
38
+
8
39
  == 1.5.0.alpha.14 (2017-02-05) - @mojavelinux
9
40
 
10
41
  * add support for AsciiDoc table cells (including nested tables) (#6)
@@ -12,16 +43,16 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[
12
43
  * make header cell in body inherit styles from table head (#239)
13
44
  * don't crash if table is empty and cols are explicitly set (#610)
14
45
  * fix vertical centering for cells in table head row
15
- * implement converter for index (PR #386)
46
+ * implement converter for index (#386)
16
47
  * record page number for index term when writing anchor (#639)
17
48
  * support the underline and line-through roles on phrases (#339)
18
49
  * allow printed URI to break at break opportunities (#563)
19
50
  * don't drop subsequent images after inline image fails to load
20
- * show alt text when image fails to embed (#693)
21
51
  * don't crash if inline image is an unsupported format; issue warning instead (#587)
22
- * always show image caption even if image fails to embed
52
+ * show alt text when image fails to embed (#693)
53
+ * always show block image caption even if image fails to embed
23
54
  * delegate to method to handle missing image
24
- * permit use of gif image format if prawn-gmagick is available (#573)
55
+ * permit use of GIF image format if prawn-gmagick is available (#573)
25
56
  * add support for image macros that have a data URI target (#318)
26
57
  * don't crash if format of image in running content is unrecognized
27
58
  * only fit image within bounds of running content if contain option is set
data/Gemfile CHANGED
@@ -10,7 +10,7 @@ end
10
10
  gemspec
11
11
 
12
12
  group :examples do
13
- gem 'rouge', '2.0.6'
13
+ gem 'rouge', '2.0.7'
14
14
  # Add unicode (preferred) or activesupport to transform case of text containing multibyte chars on Ruby < 2.4
15
15
  #gem 'activesupport', '4.2.7.1' if (Gem::Version.new RUBY_VERSION) < (Gem::Version.new '2.4.0')
16
16
  #gem 'unicode' if (Gem::Version.new RUBY_VERSION) < (Gem::Version.new '2.4.0')
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.14, 2017-02-05
3
+ v1.5.0.alpha.15, 2017-03-27
4
4
  // Settings:
5
5
  :experimental:
6
6
  :idprefix:
@@ -123,13 +123,17 @@ To check if you have Ruby available, use the `ruby` command to query the version
123
123
  ====
124
124
  By default, Asciidoctor PDF selects the latest version of Prawn to install.
125
125
  Since version 2.0.0, Prawn requires Ruby >= 2.0.0 during installation (though it may still work with Ruby 1.9.3 if you get past installation).
126
- Therefore, to use Asciidoctor PDF with Ruby 1.9.3, you must first explicitly install Prawn 1.3.0 and Prawn SVG 0.21.0 using the following commands:
126
+ Therefore, to use Asciidoctor PDF with Ruby 1.9.3, you must first explicitly install the following dependencies, including Prawn 1.3.0:
127
127
 
128
128
  $ gem install prawn --version 1.3.0
129
129
  gem install addressable --version 2.4.0
130
130
  gem install prawn-svg --version 0.21.0
131
+ gem install prawn-templates --version 0.0.3
131
132
 
132
133
  You can then proceed with installation of Asciidoctor PDF on Ruby 1.9.3.
134
+
135
+ For all other versions of Ruby, you can simply install the Asciidoctor PDF gem.
136
+ It will transitively install all required dependencies.
133
137
  ====
134
138
 
135
139
  === System Encoding
@@ -152,7 +156,8 @@ You can get {project-name} by <<install-the-published-gem,installing the publish
152
156
  === Install the Published Gem
153
157
 
154
158
  {project-name} is published as a pre-release on RubyGems.org.
155
- You can install the published gem using the following command:
159
+ First, make sure you have satisfied the <<Prerequisites,prerequisites>>.
160
+ Then, you can install the published gem using the following command:
156
161
 
157
162
  $ gem install asciidoctor-pdf --pre
158
163
 
@@ -231,6 +236,28 @@ The layout and styling of the PDF is driven by a YAML configuration file.
231
236
  To learn how the theming system works and how to create and apply custom themes, refer to the <<docs/theming-guide#,Asciidoctor PDF Theme Guide>>.
232
237
  You can use the built-in theme files, which you can find in the [file]_data/themes_ directory, as examples.
233
238
 
239
+ === Support for Non-Latin Languages
240
+
241
+ Asciidoctor can process the full range of characters in the UTF-8 character set.
242
+ That means you can write your document in any language, save the file with UTF-8 encoding, and expect Asciidoctor to convert the text properly.
243
+ However, you may notice that certain characters for certain languages, such as Chinese, are missing in the PDF.
244
+ Read on to find out why and how to address it.
245
+
246
+ If you're writing in a non-Latin language, you need to use a dedicated theme that provides the necessary fonts.
247
+ For example, to produce a PDF from a document written in a CJK language such as Chinese, you need to use a CJK theme.
248
+ You can get such a theme by installing the `asciidoctor-pdf-cjk-kai_gen_gothic` gem.
249
+ See the https://github.com/chloerei/asciidoctor-pdf-cjk-kai_gen_gothic[asciidoctor-pdf-cjk-kai_gen_gothic] project for detailed instructions.
250
+
251
+ Using a dedicated theme is necessary because PDF is a "`bring your own font`" kind of system.
252
+ In other words, the font you provide must provide glyphs for all the characters.
253
+ There's no one font that supports all the worlds languages (though some, like Noto Serif, certainly come close).
254
+ Even if there were such a font, bundling that font with the main gem would make the package enormous.
255
+ It would also severely limit the style choices in the default theme, which targets Latin-based languages.
256
+
257
+ Therefore, we're taking the strategy of creating separate dedicated theme gems that target each language family, such as CJK.
258
+ The base theme for CJK languages is provided by the https://github.com/chloerei/asciidoctor-pdf-cjk[asciidoctro-pdf-cjk] project and a concrete implementation provided by the https://github.com/chloerei/asciidoctor-pdf-cjk-kai_gen_gothic[asciidoctor-pdf-cjk-kai_gen_gothic] project that's based on the kai_gen_gothic font.
259
+ Of course, you're free to follow this model and create your own theme gem that uses fonts of your choice.
260
+
234
261
  == Font-Based Icons
235
262
 
236
263
  You can use icons in your PDF document using any of the following icon sets:
@@ -333,6 +360,9 @@ Images in running content also support the `fit` attribute.
333
360
  If the value of this attribute is `contain`, the image size is increased or decreased to fill the available space while preserving its aspect ratio.
334
361
  If the value of this attribute is `scaled-down`, the image size is first resolved in the normal way, then scaled down further to fit within the available space, if necessary.
335
362
 
363
+ Page background images are automatically scaled to fit the bounds of the page.
364
+ Any explicit sizing is ignored for those images.
365
+
336
366
  === Using the pdfwidth Attribute
337
367
 
338
368
  The pdfwidth attribute is the recommended way to set the image size for the PDF output.
@@ -39,15 +39,16 @@ An extension for Asciidoctor that converts AsciiDoc documents to PDF using the P
39
39
  #s.add_development_dependency 'rdoc', '~> 4.1.0'
40
40
 
41
41
  s.add_runtime_dependency 'asciidoctor', '>= 1.5.0'
42
- # Prawn >= 2.0.0 requires Ruby >= 2.0.0, so we must cast a wider net to support Ruby 1.9.3
43
- s.add_runtime_dependency 'prawn', '>= 1.3.0', '< 3.0.0'
42
+ # prawn >= 2.0.0 requires Ruby >= 2.0.0, so we must cast a wider net to support Ruby 1.9.3
43
+ s.add_runtime_dependency 'prawn', '>= 1.3.0', '< 2.3.0'
44
44
  s.add_runtime_dependency 'prawn-table', '0.2.2'
45
- s.add_runtime_dependency 'prawn-templates', '0.0.3'
46
- # Prawn SVG >= 0.22.1 requires Ruby >= 2.0.0, so we must cast a wider net to support Ruby 1.9.3
45
+ # prawn-templates >= 0.0.5 requires prawn >= 2.2.0, so we must cast a wider net to support Ruby 1.9.3
46
+ s.add_runtime_dependency 'prawn-templates', '>= 0.0.3', '<= 0.0.5'
47
+ # prawn-svg >= 0.22.1 requires Ruby >= 2.0.0, so we must cast a wider net to support Ruby 1.9.3
47
48
  s.add_runtime_dependency 'prawn-svg', '>= 0.21.0', '< 0.27.0'
48
49
  s.add_runtime_dependency 'prawn-icon', '1.3.0'
49
50
  s.add_runtime_dependency 'safe_yaml', '~> 1.0.4'
50
- s.add_runtime_dependency 'thread_safe', '~> 0.3.5'
51
+ s.add_runtime_dependency 'thread_safe', '~> 0.3.6'
51
52
  # For our usage, treetop 1.6.2 is slower than 1.5.3
52
53
  s.add_runtime_dependency 'treetop', '1.5.3'
53
54
  end
@@ -43,7 +43,7 @@ title_page_authors_margin_top: 12
43
43
  outline_list_indent: 30
44
44
  outline_list_item_spacing: 6
45
45
  description_list_description_indent: 30
46
- description_list_term_font_style: normal
46
+ description_list_term_font_style: bold
47
47
  description_list_term_spacing: 4
48
48
  block_margin_top: 0
49
49
  block_margin_bottom: 12
@@ -87,9 +87,11 @@ sidebar_padding: [12, 12, 0, 12]
87
87
  sidebar_title_align: center
88
88
  sidebar_title_font_style: bold
89
89
  table_border_color: '000000'
90
+ table_border_style: solid
90
91
  table_border_width: 0.5
91
92
  table_cell_padding: 2
92
93
  table_head_font_style: bold
94
+ table_body_stripe_background_color: 'EEEEEE'
93
95
  thematic_break_border_color: 'EEEEEE'
94
96
  thematic_break_border_style: solid
95
97
  thematic_break_border_width: 0.5
@@ -190,10 +190,10 @@ prose:
190
190
  margin_top: $block_margin_top
191
191
  margin_bottom: $block_margin_bottom
192
192
  sidebar:
193
- border_color: $page_background_color
193
+ background_color: eeeeee
194
+ border_color: e1e1e1
194
195
  border_radius: $base_border_radius
195
196
  border_width: $base_border_width
196
- background_color: eeeeee
197
197
  # FIXME reenable padding bottom once margin collapsing is implemented
198
198
  padding: [$vertical_rhythm, $vertical_rhythm * 1.25, 0, $vertical_rhythm * 1.25]
199
199
  title:
@@ -209,7 +209,7 @@ thematic_break:
209
209
  margin_top: $vertical_rhythm * 0.5
210
210
  margin_bottom: $vertical_rhythm * 1.5
211
211
  description_list:
212
- term_font_style: italic
212
+ term_font_style: bold
213
213
  term_spacing: $vertical_rhythm / 4
214
214
  description_indent: $horizontal_rhythm * 1.25
215
215
  outline_list:
@@ -222,8 +222,8 @@ table:
222
222
  #head_background_color: <hex value>
223
223
  #head_font_color: $base_font_color
224
224
  head_font_style: bold
225
- even_row_background_color: f9f9f9
226
- #odd_row_background_color: <hex value>
225
+ #body_background_color: <hex value>
226
+ body_stripe_background_color: f9f9f9
227
227
  foot_background_color: f0f0f0
228
228
  border_color: dddddd
229
229
  border_width: $base_border_width
@@ -22,7 +22,6 @@ ifdef::backend-pdf[:conum-guard-yaml: # #]
22
22
 
23
23
  ////
24
24
  Topics remaining to document:
25
- * document which attributes can be set in document (pdf-page-size, front-cover-image, back-cover-image, etc) (issue #428)
26
25
  * line height and line height length (and what that all means)
27
26
  * title page layout / title page images (logo & background)
28
27
  * document that unicode escape sequences can be used inside double-quoted strings
@@ -32,8 +31,8 @@ Topics remaining to document:
32
31
  The theming system in Asciidoctor PDF is used to control the layout and styling of the PDF file Asciidoctor PDF generates from AsciiDoc.
33
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.
34
33
 
35
- IMPORTANT: If you're using a custom theme, you're expected to override some of keys described in the sections below, in particular fonts.
36
- If you don't define your own fonts, the built-in PDF fonts will be used.
34
+ IMPORTANT: If you're using a custom theme, you're expected to bring your own fonts or declare the fonts from the default theme.
35
+ If you don't declare your own fonts, the built-in PDF (afm) fonts will be used, which only support WINANSI characters (similar to Basic Latin).
37
36
 
38
37
  toc::[]
39
38
 
@@ -412,7 +411,7 @@ Images can be aligned as follows:
412
411
  === Font Styles
413
412
 
414
413
  In most cases, whereever you can specify a custom font family, you can also specify a font style.
415
- These two settings are combined to locate which font to select.
414
+ These two settings are combined to locate the font to use.
416
415
 
417
416
  The following font styles are recognized:
418
417
 
@@ -597,6 +596,8 @@ Here's an example of using formatting in the content of the menu caret:
597
596
  menu_caret_content: " <font size=\"1.15em\"><color rgb=\"#b12146\">\u203a</color></font> "
598
597
  ----
599
598
 
599
+ NOTE: The string must be double quoted in order to use a Unicode escape code like `\u203a`.
600
+
600
601
  Additionally, normal substitutions are applied to the value of content keys for <<Running Content (Header & Footer),running content>>, so you can use most AsciiDoc inline formatting (e.g., `+*strong*+` or `+{attribute-name}+`) in the values of those keys.
601
602
 
602
603
  == Fonts
@@ -605,9 +606,9 @@ You can select from <<built-in-afm-fonts,built-in PDF fonts>>, <<bundled-fonts,f
605
606
  If you want to use custom fonts, you must first declare them in your theme file.
606
607
 
607
608
  IMPORTANT: Asciidoctor has no challenge working with Unicode.
608
- In fact, it prefers Unicode and considers the whole range.
609
+ In fact, it prefers Unicode and considers the entire range.
609
610
  However, once you convert to PDF, you have to meet the font requirements of PDF in order to preserve Unicode characters.
610
- There's nothing Asciidoctor can do to convince PDF to work without the right fonts in play.
611
+ There's nothing Asciidoctor can do to convince PDF to work with extended characters without the right fonts in play.
611
612
 
612
613
  === Built-In (AFM) Fonts
613
614
 
@@ -658,9 +659,9 @@ For more information about how Prawn handles character encodings for built-in fo
658
659
 
659
660
  === Bundled Fonts
660
661
 
661
- Asciidoctor PDF bundles several fonts that are used in the default theme.
662
- You can also use these fonts in your custom theme.
663
- These fonts provide more characters than the built-in PDF fonts, but still only a subset of UTF-8.
662
+ Asciidoctor PDF bundles several fonts that are used by the default theme.
663
+ You can also use these fonts in your custom theme by simply declaring them.
664
+ These fonts provide more characters than the built-in PDF fonts, but still only a subset of UTF-8 (to reduce the size of the gem).
664
665
 
665
666
  The family name of the fonts bundled with Asciidoctor PDF are as follows:
666
667
 
@@ -674,9 +675,9 @@ Also provides the circuled numbers used in callouts.
674
675
  http://mplus-fonts.osdn.jp/mplus-outline-fonts/design/index-en.html#mplus_1p[M+ 1p Fallback]::
675
676
  A sans-serif font that provides a very complete set of Unicode glyphs.
676
677
  Cannot be styled as italic, bold or bold_italic.
677
- Useful as a fallback font.
678
+ Used as the fallback font.
678
679
 
679
- CAUTION: At the time of this writing, you cannot use the bundled fonts if you define your own custom fonts.
680
+ CAUTION: At the time of this writing, you cannot use the bundled fonts if you change the value of the `pdf-fontsdir` attribute (and thus define your own custom fonts).
680
681
  This limitation may be lifted in the future.
681
682
 
682
683
  === Custom Fonts
@@ -693,7 +694,7 @@ A collection typically consists of all four styles of a font:
693
694
  * bold_italic
694
695
 
695
696
  You'll need all four styles to support AsciiDoc content properly.
696
- _Asciidoctor PDF cannot italicize a font that is not italic like a browser can._
697
+ _Asciidoctor PDF cannot italicize a font dynamically like a browser can, so you need the italic style._
697
698
 
698
699
  Once you've obtained the TTF files, put them into a directory in your project where you want to store the fonts.
699
700
  It's recommended that you name them consistently so it's easier to type the names in the theme file.
@@ -719,7 +720,7 @@ font:
719
720
  bold_italic: roboto-bold_italic.ttf
720
721
  ----
721
722
 
722
- You can use the key you gave to the font in the font catalog anywhere a `font_family` property is accepted in the theme file.
723
+ You can use the key that you assign to the font in the font catalog anywhere the `font_family` property is accepted in the theme file.
723
724
  For instance, to use the Roboto font for all headings, you'd use:
724
725
 
725
726
  [source,yaml]
@@ -734,6 +735,11 @@ When you execute Asciidoctor PDF, you need to specify the directory where the fo
734
735
 
735
736
  WARNING: Currently, all fonts referenced by the theme need to be present in the directory specified by the `pdf-fontsdir` attribute.
736
737
 
738
+ When Asciidoctor PDF creates the PDF, it only embeds the glyphs from the font that are needed to render the characters present in the document.
739
+ In other words, Asciidoctor PDF automatically subsets the font.
740
+ However, if you're storing the fonts in a repository, you may want to subset the font (for instance, by using FontForge) to reduce the space the font occupies in that storage.
741
+ This is simply a personal preference.
742
+
737
743
  You can add any number of fonts to the catalog.
738
744
  Each font must be assigned a unique key, as shown here:
739
745
 
@@ -889,7 +895,9 @@ See <<Title Page>> for details.
889
895
  size: Letter
890
896
  |===
891
897
 
892
- . Page backgrounds do not currently work when using AsciidoctorJ PDF.
898
+ . Page background images are automatically scaled to fit within the bounds of the page.
899
+ +
900
+ NOTE: Page backgrounds do not currently work when using AsciidoctorJ PDF.
893
901
  This limitation is due to a bug in Prawn 1.3.1.
894
902
  The limitation will remain until AsciidoctorJ PDF upgrades to Prawn 2.x (an upgrade that is waiting on AsciidoctorJ to migrate to JRuby 9000).
895
903
  For more details, see http://discuss.asciidoctor.org/Asciidoctor-YAML-style-file-for-PDF-and-maven-td3849.html[this thread].
@@ -1534,7 +1542,9 @@ TIP: The title page can be disabled from the document by setting the `notitle` a
1534
1542
  margin_bottom: 5
1535
1543
  |===
1536
1544
 
1537
- . Page backgrounds do not currently work when using AsciidoctorJ PDF.
1545
+ . Page background images are automatically scaled to fit within the bounds of the page.
1546
+ +
1547
+ NOTE: Page backgrounds do not currently work when using AsciidoctorJ PDF.
1538
1548
  This limitation is due to a bug in Prawn 1.3.1.
1539
1549
  The limitation will remain until AsciidoctorJ PDF upgrades to Prawn 2.x (an upgrade that is waiting on AsciidoctorJ to migrate to JRuby 9000).
1540
1550
  For more details, see http://discuss.asciidoctor.org/Asciidoctor-YAML-style-file-for-PDF-and-maven-td3849.html[this thread].
@@ -1811,7 +1821,7 @@ The keys in this category apply to the menu label (generated from the inline men
1811
1821
 
1812
1822
  |caret_content
1813
1823
  |<<quoted-string,Quoted string>> +
1814
- (default: ' \u203a ')
1824
+ (default: " \u203a ")
1815
1825
  |menu:
1816
1826
  caret_content: ' > '
1817
1827
  |===
@@ -2490,7 +2500,7 @@ The keys in this category control the arrangement and style of definition list i
2490
2500
 
2491
2501
  |term_font_style
2492
2502
  |<<font-styles,Font style>> +
2493
- (default: normal)
2503
+ (default: bold)
2494
2504
  |description_list:
2495
2505
  term_font_style: italic
2496
2506
 
@@ -2562,6 +2572,12 @@ The keys in this category control the arrangement and style of tables and table
2562
2572
  |table:
2563
2573
  border_color: #dddddd
2564
2574
 
2575
+ |border_style
2576
+ |solid {vbar} dashed {vbar} dotted +
2577
+ (default: solid)
2578
+ |table:
2579
+ border_style: solid
2580
+
2565
2581
  |border_width
2566
2582
  |<<values,Number>> +
2567
2583
  (default: 0.5)
@@ -2604,6 +2620,12 @@ The keys in this category control the arrangement and style of tables and table
2604
2620
  |table:
2605
2621
  grid_color: #eeeeee
2606
2622
 
2623
+ |grid_style
2624
+ |solid {vbar} dashed {vbar} dotted +
2625
+ (default: solid)
2626
+ |table:
2627
+ grid_style: dashed
2628
+
2607
2629
  |grid_width
2608
2630
  |<<values,Number>> +
2609
2631
  (default: $table_border_width)
@@ -2661,6 +2683,22 @@ The keys in this category control the arrangement and style of tables and table
2661
2683
  head:
2662
2684
  text_transform: uppercase
2663
2685
 
2686
+ 3+|[#key-prefix-table-body]*Key Prefix:* <<key-prefix-table-body,table_body>>
2687
+
2688
+ |background_color
2689
+ |<<colors,Color>> +
2690
+ (default: $table_background_color)
2691
+ |table:
2692
+ body:
2693
+ background_color: #fdfdfd
2694
+
2695
+ |stripe_background_color^[1]^
2696
+ |<<colors,Color>> +
2697
+ (default: #eeeeee)
2698
+ |table:
2699
+ body:
2700
+ stripe_background_color: #efefef
2701
+
2664
2702
  3+|[#key-prefix-table-foot]*Key Prefix:* <<key-prefix-table-foot,table_foot>>
2665
2703
 
2666
2704
  |background_color
@@ -2698,14 +2736,15 @@ The keys in this category control the arrangement and style of tables and table
2698
2736
  foot:
2699
2737
  font_style: italic
2700
2738
 
2701
- 3+|[#key-prefix-table-row]*Key Prefix:* <<key-prefix-table-row,table_<parity>_row>>^[1]^
2702
-
2703
- |background_color
2704
- |<<colors,Color>> +
2705
- (default: $table_background_color)
2706
- |table:
2707
- even_row:
2708
- background_color: #f9f9f9
2739
+ //deprecated
2740
+ //3+|[#key-prefix-table-row]*Key Prefix:* <<key-prefix-table-row,table_<parity>_row>>^[1]^
2741
+ //
2742
+ //|background_color
2743
+ //|<<colors,Color>> +
2744
+ //(default: $table_background_color)
2745
+ //|table:
2746
+ // even_row:
2747
+ // background_color: #f9f9f9
2709
2748
 
2710
2749
  3+|[#key-prefix-table-cell]*Key Prefix:* <<key-prefix-table-cell,table_cell>>
2711
2750
 
@@ -2760,15 +2799,15 @@ The keys in this category control the arrangement and style of tables and table
2760
2799
  header_cell:
2761
2800
  font_style: italic
2762
2801
 
2763
- //|text_transform
2764
- //|<<text-transforms,Text transform>> +
2765
- //(default: $table_head_text_transform)
2766
- //|table:
2767
- // header_cell:
2768
- // text_transform: uppercase
2802
+ |text_transform
2803
+ |<<text-transforms,Text transform>> +
2804
+ (default: $table_head_text_transform)
2805
+ |table:
2806
+ header_cell:
2807
+ text_transform: uppercase
2769
2808
  |===
2770
-
2771
- . `<parity>` can be `odd` (odd rows) or `even` (even rows).
2809
+ . Applied to even rows by default; controlled using `stripes` attribute (even, odd, all, none) on table.
2810
+ //. `<parity>` can be `odd` (odd rows) or `even` (even rows).
2772
2811
 
2773
2812
  [#keys-table-of-contents]
2774
2813
  === Table of Contents (TOC)
@@ -3345,11 +3384,11 @@ These settings override equivalent keys defined in the theme file, where applica
3345
3384
  |screen {vbar} print {vbar} prepress
3346
3385
  |:media: prepress
3347
3386
 
3348
- |page-background-image
3387
+ |page-background-image^[4]^
3349
3388
  |path^[2]^ {vbar} image macro^[3]^
3350
3389
  |+:page-background-image: image:bg.jpg[]+
3351
3390
 
3352
- |pagenums^[4]^
3391
+ |pagenums^[5]^
3353
3392
  |flag (default: _set_)
3354
3393
  |:pagenums:
3355
3394
 
@@ -3357,15 +3396,19 @@ These settings override equivalent keys defined in the theme file, where applica
3357
3396
  |portrait {vbar} landscape
3358
3397
  |:pdf-page-layout: landscape
3359
3398
 
3399
+ |pdf-page-margin
3400
+ |<<measurement-units,Measurement>> {vbar} <<measurement-units,Measurement[top,right,bottom,left]>>
3401
+ |:pdf-page-margin: [1in, 0.5in]
3402
+
3360
3403
  |pdf-page-size
3361
3404
  |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]>>
3362
3405
  |:pdf-page-size: 6in x 9in
3363
3406
 
3364
- |pdfmark^[5]^
3407
+ |pdfmark^[6]^
3365
3408
  |flag (default: _not set_)
3366
3409
  |:pdfmark:
3367
3410
 
3368
- |text-alignment^[6]^
3411
+ |text-alignment^[7]^
3369
3412
  |<<text-alignments,Text alignment>>
3370
3413
  |:text-alignment: left
3371
3414
 
@@ -3381,6 +3424,12 @@ These settings override equivalent keys defined in the theme file, where applica
3381
3424
  . `<face>` can be `front` or `back`.
3382
3425
  . The path is resolved relative to base_dir.
3383
3426
  . The target of the image macro is resolved relative to `imagesdir`.
3427
+ . Page background images are automatically scaled to fit within the bounds of the page.
3428
+ +
3429
+ NOTE: Page backgrounds do not currently work when using AsciidoctorJ PDF.
3430
+ This limitation is due to a bug in Prawn 1.3.1.
3431
+ The limitation will remain until AsciidoctorJ PDF upgrades to Prawn 2.x (an upgrade that is waiting on AsciidoctorJ to migrate to JRuby 9000).
3432
+ For more details, see http://discuss.asciidoctor.org/Asciidoctor-YAML-style-file-for-PDF-and-maven-td3849.html[this thread].
3384
3433
  . Controls whether the `page-number` attribute is accessible to the running header and footer content specified in the theme file.
3385
3434
  Use the `noheader` and `nofooter` attributes to disable the running header and footer, respectively, from the document.
3386
3435
  . Enables generation of the http://milan.kupcevic.net/ghostscript-ps-pdf/#marks[pdfmark] file, which contains metadata that is fed to Ghostscript when optimizing the PDF file.