j1-template 2021.1.29 → 2021.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/layouts/content_generator_news_panel_posts.html +6 -6
  3. data/_includes/themes/j1/layouts/content_generator_post.html +3 -0
  4. data/_includes/themes/j1/procedures/posts/collate_timeline.proc +5 -5
  5. data/_includes/themes/j1/procedures/posts/create_series_header.proc +6 -6
  6. data/_layouts/default.html +36 -26
  7. data/assets/data/mdil_icons.json +2417 -0
  8. data/assets/data/panel.html +10 -10
  9. data/assets/data/quicklinks.html +1 -2
  10. data/assets/themes/j1/adapter/js/fam.js +1 -1
  11. data/assets/themes/j1/adapter/js/j1.js +139 -139
  12. data/assets/themes/j1/adapter/js/navigator.js +11 -4
  13. data/assets/themes/j1/adapter/js/rtable.js +77 -24
  14. data/assets/themes/j1/core/css/icon-fonts/materialdesign-light.css +1222 -0
  15. data/assets/themes/j1/core/css/icon-fonts/materialdesign-light.min.css +1 -0
  16. data/assets/themes/j1/core/css/icon-fonts/materialdesign.css +1 -1
  17. data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.css +58 -109
  18. data/assets/themes/j1/core/css/themes/uno-dark/bootstrap.min.css +1 -1
  19. data/assets/themes/j1/core/css/themes/uno-light/bootstrap.css +28 -18
  20. data/assets/themes/j1/core/css/themes/uno-light/bootstrap.min.css +1 -1
  21. data/assets/themes/j1/core/css/vendor.css +7 -20
  22. data/assets/themes/j1/core/css/vendor.min.css +1 -1
  23. data/assets/themes/j1/core/fonts/material_design_icons_light/fonts/eot/materialdesignicons-light-webfont.eot +0 -0
  24. data/assets/themes/j1/core/fonts/material_design_icons_light/fonts/materialdesignicons-light-webfont.woff +0 -0
  25. data/assets/themes/j1/core/fonts/material_design_icons_light/fonts/materialdesignicons-light-webfont.woff2 +0 -0
  26. data/assets/themes/j1/core/fonts/material_design_icons_light/fonts/svg/materialdesignicons-light-webfont.svg +801 -0
  27. data/assets/themes/j1/core/fonts/material_design_icons_light/fonts/ttf/materialdesignicons-light-webfont.ttf +0 -0
  28. data/assets/themes/j1/core/js/template.js +16 -7
  29. data/assets/themes/j1/core/js/template.js.map +1 -1
  30. data/assets/themes/j1/core/js/template.min.js +16 -7
  31. data/assets/themes/j1/core/js/template.min.js.map +1 -1
  32. data/assets/themes/j1/modules/carousel/css/theme/uno.css +1 -1
  33. data/assets/themes/j1/modules/carousel/css/theme/uno.min.css +1 -1
  34. data/assets/themes/j1/modules/j1Deepl/js/j1deepl.js +385 -0
  35. data/assets/themes/j1/modules/j1Deepl/js/j1deepl.min.js +18 -0
  36. data/assets/themes/j1/modules/j1Scroll/js/j1scroll.js +3 -0
  37. data/assets/themes/j1/modules/justifiedGallery/css/theme/uno.css +1 -1
  38. data/assets/themes/j1/modules/justifiedGallery/css/theme/uno.min.css +1 -1
  39. data/assets/themes/j1/modules/mdiPreviewer/css/previewer.css +1 -1
  40. data/assets/themes/j1/modules/mdiPreviewer/css/previewer.min.css +1 -1
  41. data/assets/themes/j1/modules/mdiPreviewer/js/previewer.js +5 -15
  42. data/assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js +1 -1
  43. data/assets/themes/j1/modules/mdilPreviewer/css/previewer.css +97 -0
  44. data/assets/themes/j1/modules/mdilPreviewer/css/previewer.min.css +15 -0
  45. data/assets/themes/j1/modules/mdilPreviewer/js/previewer.js +125 -0
  46. data/assets/themes/j1/modules/mdilPreviewer/js/previewer.min.js +15 -0
  47. data/assets/themes/j1/modules/rtable/css/theme/uno/rtable.css +3 -3
  48. data/assets/themes/j1/modules/rtable/css/theme/uno/rtable.min.css +2 -174
  49. data/assets/themes/j1/modules/rtable/js/rtable.js +59 -25
  50. data/assets/themes/j1/modules/rtable/js/rtable.min.js +12 -683
  51. data/assets/themes/j1/modules/showOnScroll/js/showOnScroll.js +73 -73
  52. data/assets/themes/j1/modules/showOnScroll/js/showOnScroll.min.js +15 -15
  53. data/lib/j1/commands/generate.rb +5 -8
  54. data/lib/j1/version.rb +3 -3
  55. data/lib/starter_web/Gemfile +1 -1
  56. data/lib/starter_web/_config.yml +15 -51
  57. data/lib/starter_web/_data/blocks/banner.yml +4 -5
  58. data/lib/starter_web/_data/modules/defaults/rtable.yml +34 -0
  59. data/lib/starter_web/_data/modules/j1scroll.yml +2 -2
  60. data/lib/starter_web/_data/modules/navigator_menu.yml +3 -3
  61. data/lib/starter_web/_data/modules/rtable.yml +34 -0
  62. data/lib/starter_web/_data/resources.yml +45 -1
  63. data/lib/starter_web/_includes/attributes.asciidoc +6 -1
  64. data/lib/starter_web/_plugins/lunr_index.rb +1 -1
  65. data/lib/starter_web/assets/images/modules/attics/annie-spratt-1920x1280.jpg +0 -0
  66. data/lib/starter_web/assets/images/modules/attics/antonino-visalli-1920x1280.jpg +0 -0
  67. data/lib/starter_web/assets/images/modules/attics/humble-lamb-1920x1280.jpg +0 -0
  68. data/lib/starter_web/assets/images/modules/attics/library-1920x1280.jpg +0 -0
  69. data/lib/starter_web/assets/images/modules/attics/romain-vignes-1920x1280.jpg +0 -0
  70. data/lib/starter_web/assets/images/modules/attics/sigmund-1920x1280.jpg +0 -0
  71. data/lib/starter_web/assets/images/{pages/videos → modules/attics}/szabo-viktor-1920x1280.jpg +0 -0
  72. data/lib/starter_web/assets/images/pages/asciidoc_skeletons/example-pdf-screenshot.png +0 -0
  73. data/lib/starter_web/collections/posts/public/featured/_posts/{2020-01-01-about-cookies.adoc → 2021-01-01-about-cookies.adoc} +0 -0
  74. data/lib/starter_web/collections/posts/public/featured/_posts/{2021-03-01-site-generators.adoc → 2021-02-01-site-generators.adoc} +0 -0
  75. data/lib/starter_web/collections/posts/public/{wikipedia/_posts/2016-11-20-minneapolis.adoc → series/_posts/2020-01-01-post-wiki-series.adoc} +11 -10
  76. data/lib/starter_web/collections/posts/public/{wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc → series/_posts/2020-01-02-post-wiki-series.adoc} +15 -13
  77. data/lib/starter_web/collections/posts/public/{wikipedia/_posts/2016-11-26-columbia-river.adoc → series/_posts/2020-01-03-post-wiki-series.adoc} +28 -11
  78. data/lib/starter_web/collections/posts/public/{wikipedia → series}/_posts/_includes/attributes.asciidoc +0 -0
  79. data/lib/starter_web/collections/posts/public/{wikipedia → series}/_posts/_includes/documents/readme +0 -0
  80. data/lib/starter_web/collections/posts/public/{wikipedia → series}/_posts/_includes/tables/readme +0 -0
  81. data/lib/starter_web/index.html +2 -2
  82. data/lib/starter_web/package.json +2 -2
  83. data/lib/starter_web/pages/public/asciidoc_skeletons/{book → documentation}/000_intro.adoc +5 -7
  84. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/100_converter.adoc +43 -0
  85. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/200_themes.adoc +61 -0
  86. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/attributes.asciidoc +95 -0
  87. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/000_intro.asciidoc +54 -0
  88. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/000_basic_example.asciidoc +31 -0
  89. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/111_about_the_converter.asciidoc +111 -0
  90. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/112_getting_started.asciidoc +95 -0
  91. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/113_themes.asciidoc +39 -0
  92. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter.asciidoc +8 -0
  93. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes/211_language_overview.asciidoc +122 -0
  94. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes/212_values.asciidoc +502 -0
  95. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes/213_fonts.asciidoc +261 -0
  96. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes.asciidoc +8 -0
  97. data/lib/starter_web/pages/public/asciidoc_skeletons/{book → documentation}/a2p.bat +1 -1
  98. data/lib/starter_web/pages/public/asciidoc_skeletons/{book → documentation}/a2p.sh +2 -2
  99. data/lib/starter_web/pages/public/asciidoc_skeletons/{book/book.a2p → documentation/documentation.a2p} +2 -8
  100. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +86 -0
  101. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/100_chapter.asciidoc +848 -40
  102. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/200_chapter.asciidoc +149 -38
  103. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +2 -7
  104. data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +312 -119
  105. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +4 -27
  106. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +5 -27
  107. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +0 -20
  108. data/lib/starter_web/pages/public/blog/navigator/archive.html +5 -27
  109. data/lib/starter_web/pages/public/previewer/bootstrap_theme.adoc +1 -1
  110. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  111. data/lib/starter_web/utilsrv/package.json +1 -1
  112. metadata +53 -83
  113. data/assets/themes/j1/modules/rtable/js/tablesaw-init.js +0 -18
  114. data/assets/themes/j1/modules/rtable/js/tablesaw.stackonly.js +0 -2371
  115. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-01-post-test-series.adoc +0 -128
  116. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +0 -131
  117. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +0 -131
  118. data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +0 -132
  119. data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/blindtext.asciidoc +0 -11
  120. data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/font_icons.asciidoc +0 -23
  121. data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/gallery.asciidoc +0 -5
  122. data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/lightbox.asciidoc +0 -7
  123. data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/documents/chapter_document.asciidoc +0 -9
  124. data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/documents/entry_document.asciidoc +0 -3
  125. data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/images/image.asciidoc +0 -6
  126. data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_2_column.asciidoc +0 -12
  127. data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_2_column_options.asciidoc +0 -30
  128. data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_3_column.asciidoc +0 -16
  129. data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/tables/table_4_column.asciidoc +0 -25
  130. data/lib/starter_web/pages/public/asciidoc_skeletons/book/100_chapter.adoc +0 -62
  131. data/lib/starter_web/pages/public/asciidoc_skeletons/book/200_chapter.adoc +0 -64
  132. data/lib/starter_web/pages/public/asciidoc_skeletons/book/900_references.adoc +0 -73
  133. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/attributes.asciidoc +0 -74
  134. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/000_intro.asciidoc +0 -33
  135. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/100_chapter/100_chapter_document.asciidoc +0 -21
  136. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/100_chapter/110_chapter_document.asciidoc +0 -36
  137. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/100_chapter.asciidoc +0 -7
  138. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/200_chapter/200_chapter_document.asciidoc +0 -53
  139. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/200_chapter.asciidoc +0 -5
  140. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/000_intro.asciidoc +0 -23
  141. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/100_chapter_document.asciidoc +0 -33
  142. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/200_chapter_document.asciidoc +0 -26
  143. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references/900_sources.asciidoc +0 -81
  144. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/900_references.asciidoc +0 -23
  145. data/lib/starter_web/pages/public/asciidoc_skeletons/book/_includes/documents/tables/110_material_design_icons.asciidoc +0 -102
  146. data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.adoc +0 -136
  147. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/100_chapter.asciidoc +0 -60
  148. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/200_chapter.asciidoc +0 -59
  149. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/tables/110_material_design_icons.asciidoc +0 -102
  150. data/lib/starter_web/pages/public/features/modules.adoc +0 -104
  151. data/lib/starter_web/pages/public/features/platform.adoc +0 -104
  152. data/lib/starter_web/pages/public/previewer/_includes/attributes.asciidoc +0 -60
  153. data/lib/starter_web/pages/public/previewer/_includes/documents/licenses/mit.asciidoc +0 -19
  154. data/lib/starter_web/pages/public/previewer/_includes/documents/readme +0 -0
  155. data/lib/starter_web/pages/public/previewer/_includes/documents/rouge/100_language_examples.asciidoc +0 -119
  156. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/100_absolute_sizes.asciidoc +0 -39
  157. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/110_bs_grid_sizes.asciidoc +0 -47
  158. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/120_relative_sizes.asciidoc +0 -47
  159. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/200_rotate.asciidoc +0 -71
  160. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/300_flip.asciidoc +0 -31
  161. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/400_spin_pulsed.asciidoc +0 -39
  162. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/500_bw_color_palette.asciidoc +0 -61
  163. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/510_bs_color_palette.asciidoc +0 -55
  164. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/600_md_color_palette.asciidoc +0 -95
  165. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/601_md_color_palette_indigo.asciidoc +0 -95
  166. data/lib/starter_web/pages/public/previewer/_includes/tables/mdi_icons/602_md_color_palette_pink.asciidoc +0 -95
  167. data/lib/starter_web/pages/public/previewer/_includes/tables/rouge/200_rouge_attributes.asciidoc +0 -41
  168. data/lib/starter_web/pages/public/previewer/_includes/tables/rouge/300_supported_languages.asciidoc +0 -857
  169. data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/100_bs_sizes.asciidoc +0 -47
  170. data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/100_relative_sizes.asciidoc +0 -47
  171. data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/200_rotate.asciidoc +0 -71
  172. data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/300_flip.asciidoc +0 -30
  173. data/lib/starter_web/pages/public/previewer/_includes/tables/twitter_emoji/400_spin_pulsed.asciidoc +0 -31
  174. data/lib/starter_web/pages/public/previewer/iframer.adoc +0 -93
  175. data/lib/starter_web/pages/public/previewer/justified_gallery.html +0 -41
  176. data/lib/starter_web/pages/public/previewer/md_color_palette.adoc +0 -574
  177. data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +0 -220
  178. data/lib/starter_web/pages/public/previewer/rouge.adoc +0 -133
  179. data/lib/starter_web/pages/public/previewer/twitter_emoji_preview.adoc +0 -191
@@ -0,0 +1,111 @@
1
+ == About the PDF-Generator Prawn
2
+
3
+ {uri-asciidoctor-pdf}[Asciidoctor PDF, {browser-window--new}] is made possible by an amazing
4
+ Ruby gem named _Prawn_. And what a gem it is! {uri-prawn-home}[Prawn, {browser-window--new}] is a
5
+ nimble PDF writer for _Ruby_. More important, it's a hackable platform that offers
6
+ both high level APIs for the most common needs and low level APIs for bending
7
+ the document model to accommodate special circumstances.
8
+
9
+ [caption=Status]
10
+ CAUTION: _Asciidoctor PDF_ is currently _alpha_ software. While the converter
11
+ handles most AsciiDoc content, there's still work needed to fill in gaps
12
+ where conversion is incomplete, incorrect or not implemented. See the
13
+ milestone v1.5.0 in the {uri-asciidoctor-pdf-issues}[Issue tracker, {browser-window--new}]
14
+ for details.
15
+
16
+ With _Prawn_, you can write text, draw lines and shapes and place images
17
+ _anywhere_ on the page and add as much color as you like. In addition, it
18
+ brings a fluent API and aggressive code re-use to the printable document space.
19
+
20
+ Here's an example that demonstrates how to use _Prawn_ to create a basic PDF
21
+ document.
22
+
23
+ .Create a basic PDF document using _Prawn_
24
+ [source,ruby]
25
+ ----
26
+ require 'prawn'
27
+
28
+ Prawn::Document.generate 'output.pdf' do
29
+ text 'Hello, PDF creation!'
30
+ end
31
+ ----
32
+
33
+ It's that easy.
34
+ And that's just the beginning.
35
+
36
+ _Prawn_ is the _killer library_ for PDF generation we've needed to close this
37
+ critical gap in _Asciidoctor_. It absolutely takes the pain out of creating
38
+ printable documents. Picking up from there, _Asciidoctor PDF_ takes the pain out
39
+ of creating PDF documents _from AsciiDoc_.
40
+
41
+ === Highlights
42
+
43
+ * Direct AsciiDoc to PDF conversion
44
+ * SVG support
45
+ * PDF document outline (i.e., bookmarks)
46
+ * Table of contents page(s)
47
+ * Document metadata (title, authors, subject, keywords, etc)
48
+ * Internal cross reference links
49
+ * Syntax highlighting with Rouge, Pygments, or CodeRay
50
+ * Page numbering
51
+ * Customizable running content (header and footer)
52
+ * “Keep together” blocks (i.e., page breaks avoided in certain block content)
53
+ * Orphaned section titles avoided
54
+ * Autofit verbatim blocks (as permitted by base_font_size_min setting)
55
+ * Table border settings honored
56
+ * Font-based icons
57
+ * Custom (TTF) fonts
58
+ * Double-sided printing mode (margins alternate on recto and verso pages)
59
+
60
+ === Prerequisites
61
+
62
+ All that's needed is _Ruby_ (1.9.3 or above; 2.3.x recommended) and a few _Ruby_
63
+ gems, which we explain how to install in the next section.
64
+
65
+ To check if you have _Ruby_ available, use the `ruby` command to query the
66
+ version installed:
67
+
68
+ $ ruby --version
69
+
70
+ [WARNING]
71
+ ====
72
+ By default, _Asciidoctor PDF_ automatically installs the latest version of _Prawn_
73
+ if you don't already have _Prawn_ installed. This will fail on older versions of
74
+ _Ruby_. To workaround, you need to install certain dependencies first.
75
+
76
+ Starting with _Prawn_ 2.0.0, _Prawn_ requires Ruby >= 2.0.0 during installation.
77
+ Therefore, to use _Asciidoctor PDF_ with Ruby 1.9.3, you must first explicitly
78
+ install the following dependencies to lock the versions:
79
+
80
+ $ gem install prawn --version 1.3.0
81
+ gem install addressable --version 2.4.0
82
+ gem install prawn-svg --version 0.21.0
83
+ gem install prawn-templates --version 0.0.3
84
+
85
+ You can then proceed with installation of _Asciidoctor PDF_ on Ruby 1.9.3.
86
+
87
+ Starting with _Prawn_ 2.2.0, _Prawn_ requires Ruby >= 2.1.0 during installation.
88
+ Therefore, to use _Asciidoctor PDF_ with Ruby 2.0.0, you must first explicitly
89
+ install the following dependencies to lock the versions:
90
+
91
+ $ gem install prawn --version 2.1.0
92
+ gem install prawn-svg --version 0.26.0
93
+ gem install prawn-templates --version 0.0.4
94
+
95
+ For all other versions of _Ruby_, you can simply install the _Asciidoctor PDF_ gem.
96
+ It will transitively install the required dependencies.
97
+ ====
98
+
99
+ ==== System Encoding
100
+
101
+ _Asciidoctor_ assumes you're using UTF-8 encoding. To minimize encoding problems,
102
+ make sure the default encoding of your system is set to UTF-8.
103
+
104
+ If you're using a non-English Windows environment, the default encoding of your
105
+ system may not be UTF-8. As a result, you may get an `Encoding::UndefinedConversionError`
106
+ or other encoding issues when invoking _Asciidoctor_. To solve these problems, we
107
+ recommend at least changing the active code page in your console to UTF-8.
108
+
109
+ chcp 65001
110
+
111
+ Once you make this change, all your Unicode headaches will be behind you.
@@ -0,0 +1,95 @@
1
+ == Getting Started
2
+
3
+ You can get _Asciidoctor PDF_ by installing the published gem or running th
4
+ code from source.
5
+
6
+ === Install the Published Gem
7
+
8
+ _Asciidoctor PDF_ is published as a pre-release on RubyGems.org.
9
+ First, make sure you have satisfied the prerequisites.
10
+ Then, you can install the published gem using the following command:
11
+
12
+ $ gem install asciidoctor-pdf --pre
13
+
14
+ If you want to syntax highlight source listings, you'll also want to install
15
+ Rouge, Pygments, or CodeRay. Choose one (or more) of the following:
16
+
17
+ .Rouge (preferred)
18
+ $ gem install rouge
19
+
20
+ .Pygments
21
+ $ gem install pygments.rb
22
+
23
+ .CodeRay
24
+ $ gem install coderay
25
+
26
+ You then activate syntax highlighting for a given document by adding the
27
+ `source-highlighter` attribute to the document header (Rouge shown):
28
+
29
+ [source,asciidoc]
30
+ ----
31
+ :source-highlighter: rouge
32
+ ----
33
+
34
+ Assuming all the required gems install properly, verify you can run the
35
+ `asciidoctor-pdf` script:
36
+
37
+ $ asciidoctor-pdf -v
38
+
39
+ If you see the version of _Asciidoctor PDF_ printed, you're ready to use
40
+ _Asciidoctor PDF_.
41
+
42
+ Let's grab an AsciiDoc document to distill and start putting _Asciidoctor PDF_
43
+ to use!
44
+
45
+ === An Example AsciiDoc Document
46
+
47
+ If you don't already have an AsciiDoc document, you can use the
48
+ *basic_example.adoc* file found in the examples directory of this
49
+ project.
50
+
51
+ ifeval::[{safe-mode-level} < 20]
52
+ .000_basic_example.adoc
53
+ [source,asciidoc]
54
+ ....
55
+ include::000_basic_example.asciidoc[]
56
+ ....
57
+ endif::[]
58
+
59
+ It's time to convert the AsciiDoc document directly to PDF.
60
+
61
+ === Convert AsciiDoc to PDF
62
+
63
+ IMPORTANT: You'll need the `rouge` gem installed to run this example since
64
+ it uses the `source-highlighter` attribute with the value of `rouge`.
65
+
66
+ Converting to PDF is a simple as running the `asciidoctor-pdf` script using
67
+ _Ruby_ and passing our AsciiDoc document as the first argument.
68
+
69
+ $ asciidoctor-pdf 000_basic_example.adoc
70
+
71
+ This command is just a shorthand way of running:
72
+
73
+ $ asciidoctor -r asciidoctor-pdf -b pdf 000_basic_example.adoc
74
+
75
+ The `asciidoctor-pdf` command just saves you from having to remember all those
76
+ flags. That's why we created it.
77
+
78
+ When the script completes, you should see the file *000_basic_example.pdf*
79
+ in the same directory. Open the *000_basic_example.pdf* file with a PDF
80
+ viewer to see the result.
81
+
82
+ ifdef::backend-html5[]
83
+ .Example PDF document rendered in a PDF viewer
84
+ image::/assets/images/pages/asciidoc_skeletons/example-pdf-screenshot.png[Screenshot of PDF document,width=800,scaledwidth=100%]
85
+ endif::[]
86
+
87
+ ifdef::backend-pdf[]
88
+ .Example PDF document rendered in a PDF viewer
89
+ image::/assets/images/pages/asciidoc_skeletons/example-pdf-screenshot.png[Screenshot of PDF document,width=800,scaledwidth=100%]
90
+ endif::[]
91
+
92
+ You're also encouraged to try converting the documents in the examples
93
+ directory to see more of what _Asciidoctor PDF_ can do.
94
+
95
+ The pain of the DocBook toolchain should be melting away about now.
@@ -0,0 +1,39 @@
1
+ == Themes
2
+
3
+ The layout and styling of the PDF is driven by a YAML configuration file. To
4
+ learn how the theming system works and how to create and apply custom themes,
5
+ refer to the _Asciidoctor PDF_ Theme Guide. You can use
6
+ the built-in theme files, which you can find in the *data/themes* directory,
7
+ as examples.
8
+
9
+ === Support for Non-Latin Languages
10
+
11
+ _Asciidoctor_ can process the full range of characters in the UTF-8 character
12
+ set. That means you can write your document in any language, save the file
13
+ with UTF-8 encoding, and expect _Asciidoctor_ to convert the text properly.
14
+ However, you may notice that certain characters for certain languages, such
15
+ as Chinese, are missing in the PDF. Read on to find out why and how to
16
+ address it.
17
+
18
+ If you're writing in a non-Latin language, you need to use a dedicated theme
19
+ that provides the necessary fonts. For example, to produce a PDF from a
20
+ document written in a CJK language such as Chinese, you need to use a CJK
21
+ theme. You can get such a theme by installing the `asciidoctor-pdf-cjk-kai_gen_gothic`
22
+ gem. See the {uri-asciidoctor-pdf-cjk-kai_gen_gothic}[asciidoctor-pdf-cjk-kai_gen_gothic, {browser-window--new}]
23
+ project for detailed instructions.
24
+
25
+ Using a dedicated theme is necessary because PDF is a "`bring your own font`"
26
+ kind of system. In other words, the font you provide must provide glyphs for
27
+ all the characters. There's no one font that supports all the worlds languages
28
+ (though some, like Noto Serif, certainly come close). Even if there were such
29
+ a font, bundling that font with the main gem would make the package enormous.
30
+ It would also severely limit the style choices in the default theme, which
31
+ targets Latin-based languages.
32
+
33
+ Therefore, we're taking the strategy of creating separate dedicated theme
34
+ gems that target each language family, such as CJK. The base theme for CJK
35
+ languages is provided by the {uri-asciidoctor-pdf-cjk}[asciidoctro-pdf-cjk, {browser-window--new}]
36
+ project and a concrete implementation provided by the
37
+ {uri-asciidoctor-pdf-cjk-kai_gen_gothic}[asciidoctor-pdf-cjk-kai_gen_gothic, {browser-window--new}]
38
+ project that's based on the kai_gen_gothic font. Of course, you're free to
39
+ follow this model and create your own theme gem that uses fonts of your choice.
@@ -0,0 +1,8 @@
1
+ // Include documents
2
+ // -------------------------------------------------------------------
3
+
4
+ include::100_converter/111_about_the_converter.asciidoc[]
5
+
6
+ include::100_converter/112_getting_started.asciidoc[]
7
+
8
+ include::100_converter/113_themes.asciidoc[]
@@ -0,0 +1,122 @@
1
+ == Language Overview
2
+
3
+ The theme language in *Asciidoctor PDF* is based on the {uri-wikipedia-yaml}[YAML, {browser-window--new}]
4
+ data format and incorporates many concepts from CSS and SASS. Therefore, if you
5
+ have a background in web design, the theme language should be immediately
6
+ familiar to you.
7
+
8
+ Like CSS, themes have both selectors and properties. Selectors are the component
9
+ you want to style. The properties are the style elements of that component that
10
+ can be styled. All selector names are implicit (e.g., `heading`), so you
11
+ customize the theme primarily by manipulating pre-defined property values
12
+ (e.g., `font_size`).
13
+
14
+ [NOTE]
15
+ ====
16
+ The theme language in *Asciidoctor PDF* supports a limited subset of the
17
+ properties from CSS. Some of these properties have different names from
18
+ those found in CSS.
19
+
20
+ * Underscores (`_`) can be used in place of hyphens (`-`) for all property names in the theme language.
21
+ * Instead of separate properties for font weight and font style, the theme language combines these settings in the `font_style` property (allowed values: `normal`, `bold`, `italic` and `bold_italic`).
22
+ * The `text_align` property from CSS is the `align` property in the theme language.
23
+ * The `color` property from CSS is the `font_color` property in the theme language.
24
+ ====
25
+
26
+ A theme (or style) is described in a YAML-based data format and stored in a
27
+ dedicated theme file. YAML is a human-friendly data format that resembles CSS
28
+ and helps to describe the theme. The theme language adds some extra features
29
+ to YAML, such as variables, basic math, measurements and color values. These
30
+ enhancements will be explained in detail in later sections.
31
+
32
+ The theme file must be named _<name>-theme.yml_, where `<name>` is the name
33
+ of the theme. Here's an example of a basic theme file:
34
+
35
+ .basic-theme.yml
36
+ [source,yaml]
37
+ ----
38
+ page:
39
+ layout: portrait
40
+ margin: [0.75in, 1in, 0.75in, 1in]
41
+ size: Letter
42
+ base:
43
+ font_color: #333333
44
+ font_family: Times-Roman
45
+ font_size: 12
46
+ line_height_length: 17
47
+ line_height: $base_line_height_length / $base_font_size
48
+ vertical_spacing: $base_line_height_length
49
+ heading:
50
+ font_color: #262626
51
+ font_size: 17
52
+ font_style: bold
53
+ line_height: 1.2
54
+ margin_bottom: $vertical_spacing
55
+ link:
56
+ font_color: #002FA7
57
+ outline_list:
58
+ indent: $base_font_size * 1.5
59
+ ----
60
+
61
+ When creating a new theme, you only have to define the keys you want to
62
+ override from the base theme, which is loaded prior to loading your custom
63
+ theme. All the available keys are documented in section *Keys*. The converter
64
+ uses the information from the theme map to help construct the PDF.
65
+
66
+ [TIP]
67
+ ====
68
+ Instead of creating a theme from scratch, another option is to download the
69
+ {uri-asciidoctor-pdf-default-theme}[default-theme.yml, {browser-window--new}] file from the source
70
+ repository. Save the file using a unique name (e.g. _custom-theme.yml_) and
71
+ start hacking on it.
72
+
73
+ Alternatively, you can snag the file from your local installation using the
74
+ following command:
75
+
76
+ $ ASCIIDOCTOR_PDF_DIR=`gem contents asciidoctor-pdf --show-install-dir`;\
77
+ cp "$ASCIIDOCTOR_PDF_DIR/data/themes/default-theme.yml" custom-theme.yml
78
+ ====
79
+
80
+ Keys may be nested to an arbitrary depth to eliminate redundant prefixes (an
81
+ approach inspired by SASS). Once the theme is loaded, all keys are flattened
82
+ into a single map of qualified keys. Nesting is simply a shorthand way of
83
+ organizing the keys. In the end, a theme is just a map of key/value pairs.
84
+
85
+ Nested keys are adjoined to their parent key with an underscore (`_`).
86
+ This means the selector part (e.g., `link`) is combined with the property
87
+ name (e.g., `font_color`) into a single, qualified key (e.g., `link_font_color`).
88
+
89
+ For example, let's assume we want to set the base (i.e., global) font size
90
+ and color. These keys may be written longhand:
91
+
92
+ [source,yaml]
93
+ ----
94
+ base_font_color: #333333
95
+ base_font_family: Times-Roman
96
+ base_font_size: 12
97
+ ----
98
+
99
+ Or, to avoid having to type the prefix `base_` multiple times, the keys may
100
+ be written hierarchically:
101
+
102
+ [source,yaml]
103
+ ----
104
+ base:
105
+ font_color: #333333
106
+ font_family: Times-Roman
107
+ font_size: 12
108
+ ----
109
+
110
+ Or even:
111
+
112
+ [source,yaml]
113
+ ----
114
+ base:
115
+ font:
116
+ color: #333333
117
+ family: Times-Roman
118
+ size: 12
119
+ ----
120
+
121
+ Each level of nesting must be indented by two more spaces of indentation than
122
+ the parent level. Also note the presence of the colon after each key name.