j1-template 2022.5.1 → 2022.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/layouts/layout_metadata_generator.html +22 -7
  3. data/_includes/themes/j1/procedures/layouts/module_writer.proc +1 -1
  4. data/_layouts/default.html +12 -21
  5. data/assets/data/banner.html +2 -2
  6. data/assets/data/panel.html +4 -4
  7. data/assets/themes/j1/adapter/js/attic.js +19 -2
  8. data/assets/themes/j1/adapter/js/rtable.js +68 -5
  9. data/assets/themes/j1/adapter/js/scroller.js +7 -0
  10. data/assets/themes/j1/core/css/icon-fonts/fontawesome.min.css +1 -1
  11. data/assets/themes/j1/core/css/icon-fonts/mdi.min.css +1 -1
  12. data/assets/themes/j1/core/css/icon-fonts/mdil.min.css +1 -1
  13. data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.css +86 -73
  14. data/assets/themes/j1/core/css/themes/bootstrap/bootstrap.min.css +5 -3
  15. data/assets/themes/j1/core/css/themes/theme_vapor/bootstrap.css +86 -73
  16. data/assets/themes/j1/core/css/themes/theme_vapor/bootstrap.min.css +5 -3
  17. data/assets/themes/j1/core/css/themes/unodark/bootstrap.css +86 -73
  18. data/assets/themes/j1/core/css/themes/unodark/bootstrap.min.css +5 -3
  19. data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +138 -137
  20. data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +25 -14
  21. data/assets/themes/j1/core/css/vendor.css +5 -6
  22. data/assets/themes/j1/core/css/vendor.min.css +1 -1
  23. data/assets/themes/j1/core/js/template.js +2 -1
  24. data/assets/themes/j1/core/js/template.min.js.map +1 -1
  25. data/assets/themes/j1/modules/jquery/js/extensions/hasClass.js +20 -0
  26. data/assets/themes/j1/modules/jquery/js/extensions/removeClass.js +24 -0
  27. data/assets/themes/j1/modules/rtable/js/rtable.js +22 -16
  28. data/assets/themes/j1/modules/rtable/js/rtable.min.js +1 -1
  29. data/assets/themes/j1/modules/themeSwitcher/LICENSE +21 -21
  30. data/assets/themes/j1/modules/themeSwitcher/README.md +166 -166
  31. data/lib/j1/commands/app.rb +36 -0
  32. data/lib/j1/commands/generate.rb +1 -1
  33. data/lib/j1/commands/patch.rb +1 -1
  34. data/lib/j1/commands/rebuild.rb +1 -1
  35. data/lib/j1/commands/reset.rb +1 -1
  36. data/lib/j1/commands/setup.rb +1 -1
  37. data/lib/j1/commands/site.rb +1 -1
  38. data/lib/j1/version.rb +1 -1
  39. data/lib/j1_app.rb +1 -1
  40. data/lib/starter_web/Gemfile +13 -12
  41. data/lib/starter_web/README.md +5 -5
  42. data/lib/starter_web/_config.yml +32 -59
  43. data/lib/starter_web/_data/asciidoc2pdf/images/cover/readme +39 -0
  44. data/lib/starter_web/_data/asciidoc2pdf/themes/base-theme.yml +113 -117
  45. data/lib/starter_web/_data/asciidoc2pdf/themes/default-for-print-theme.yml +25 -24
  46. data/lib/starter_web/_data/asciidoc2pdf/themes/default-for-print-with-fallback-font-theme.yml +1 -0
  47. data/lib/starter_web/_data/asciidoc2pdf/themes/default-theme.yml +215 -212
  48. data/lib/starter_web/_data/asciidoc2pdf/themes/default-with-fallback-font-theme.yml +9 -5
  49. data/lib/starter_web/_data/asciidoc2pdf/themes/j1-theme.yml +24 -5
  50. data/lib/starter_web/_data/blocks/banner.yml +1 -1
  51. data/lib/starter_web/_data/modules/defaults/rtable.yml +12 -1
  52. data/lib/starter_web/_data/puma/config.rb +3 -0
  53. data/lib/starter_web/_data/resources.yml +4 -2
  54. data/lib/starter_web/_plugins/lunr_index.rb +11 -8
  55. data/lib/starter_web/assets/images/banner/1280x600/lunr.jpg +0 -0
  56. data/lib/starter_web/assets/images/{modules/attics/banner/library-1920x800-bw.jpg → banner/1920x800/library.jpg} +0 -0
  57. data/lib/starter_web/assets/images/banner/scalable/readme +0 -0
  58. data/lib/starter_web/assets/images/modules/attics/1920x1280/{ev.jpg → _ev.jpg} +0 -0
  59. data/lib/starter_web/assets/images/modules/attics/1920x1280/_guillaume-bolduc.jpg +0 -0
  60. data/lib/starter_web/assets/images/modules/attics/1920x1280/_nasa.jpg +0 -0
  61. data/lib/starter_web/assets/images/modules/attics/1920x1280/crawford-jolly.jpg +0 -0
  62. data/lib/starter_web/assets/images/modules/attics/1920x1280/josh-liu.jpg +0 -0
  63. data/lib/starter_web/assets/images/modules/attics/1920x1280/kristopher-roller.jpg +0 -0
  64. data/lib/starter_web/assets/images/modules/attics/1920x1280/moritz-kindler.jpg +0 -0
  65. data/lib/starter_web/assets/images/modules/attics/1920x1280/spacex.jpg +0 -0
  66. data/lib/starter_web/assets/images/modules/attics/{alexander-redl.jpg → _alexander-redl.jpg} +0 -0
  67. data/lib/starter_web/assets/images/modules/attics/{alexander-shatov-1920x1280.jpg → _alexander-shatov-1920x1280.jpg} +0 -0
  68. data/lib/starter_web/assets/images/modules/attics/{annie-spratt-1920x1280.jpg → _annie-spratt-1920x1280.jpg} +0 -0
  69. data/lib/starter_web/assets/images/modules/attics/{antonino-visalli-1920x1280.jpg → _antonino-visalli-1920x1280.jpg} +0 -0
  70. data/lib/starter_web/assets/images/modules/attics/{christa-dodoo-1920x1280.jpg → _christa-dodoo-1920x1280.jpg} +0 -0
  71. data/lib/starter_web/assets/images/modules/attics/{guillaume-bolduc-1920x1280.jpg → _guillaume-bolduc-1920x1280.jpg} +0 -0
  72. data/lib/starter_web/assets/images/modules/attics/{harpal-singh.jpg → _harpal-singh.jpg} +0 -0
  73. data/lib/starter_web/assets/images/modules/attics/{humble-lamb-1920x1280.jpg → _humble-lamb-1920x1280.jpg} +0 -0
  74. data/lib/starter_web/assets/images/modules/attics/{john-schnobrich-2-1920x1280.jpg → _john-schnobrich-2-1920x1280.jpg} +0 -0
  75. data/lib/starter_web/assets/images/modules/attics/{kirklai-1920x1280.jpg → _kirklai-1920x1280.jpg} +0 -0
  76. data/lib/starter_web/assets/images/modules/attics/{romain-vignes-1920x1280.jpg → _romain-vignes-1920x1280.jpg} +0 -0
  77. data/lib/starter_web/assets/images/modules/attics/{runner-1920x1200.jpg → _runner-1920x1200.jpg} +0 -0
  78. data/lib/starter_web/assets/images/modules/attics/{spacex-1920x1280.jpg → _spacex-1920x1280.jpg} +0 -0
  79. data/lib/starter_web/assets/images/modules/attics/_vladislav-klapin-1920x1280.jpg +0 -0
  80. data/lib/starter_web/assets/images/modules/attics/{wrongtog-1920x1280.jpg → _wrongtog-1920x1280.jpg} +0 -0
  81. data/lib/starter_web/assets/images/modules/attics/{building-blocks-1920x1280-bw.jpg → building-blocks-1920x1280.jpg} +0 -0
  82. data/lib/starter_web/assets/images/modules/attics/{shutterstock_sponsor-1920x1280.jpg → gift-from-hand-1920x1280.jpg} +0 -0
  83. data/lib/starter_web/assets/images/modules/attics/lunr-1280x800.jpg +0 -0
  84. data/lib/starter_web/assets/images/modules/attics/{shubham-dhage-2-1920x1280.jpg → shubham-dhage-1920x1280.jpg} +0 -0
  85. data/lib/starter_web/assets/images/modules/attics/vladislav-klapin-1920x1280.jpg +0 -0
  86. data/lib/starter_web/collections/posts/public/featured/_posts/2022-02-01-about-j1.adoc +2 -2
  87. data/lib/starter_web/index.html +28 -43
  88. data/lib/starter_web/package.json +5 -4
  89. data/lib/starter_web/pages/public/about/features.adoc +31 -21
  90. data/lib/starter_web/pages/public/about/reporting_issues.adoc +15 -5
  91. data/lib/starter_web/pages/public/about/site.adoc +8 -2
  92. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/000_intro.adoc +17 -6
  93. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/100_converter.adoc +16 -1
  94. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/200_themes.adoc +15 -1
  95. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/attributes.asciidoc +2 -1
  96. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/{100_converter/000_basic_example.asciidoc → 000_examples/basic_example.asciidoc} +1 -0
  97. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/111_about_the_converter.asciidoc +35 -21
  98. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/112_getting_started.asciidoc +76 -24
  99. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes/211_language_overview.asciidoc +33 -29
  100. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes/212_values.asciidoc +67 -88
  101. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes/213_fonts.asciidoc +40 -39
  102. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/images/readme +1 -0
  103. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/tables/math_expressions.asciidoc +19 -0
  104. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/tables/measurement_units.asciidoc +22 -0
  105. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +20 -5
  106. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/100_chapter.asciidoc +5 -325
  107. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/documents/200_chapter.asciidoc +3 -134
  108. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/images/readme +1 -0
  109. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/tables/build_command_options.asciidoc +72 -0
  110. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/tables/files_and_folders.asciidoc +66 -0
  111. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/tables/global_configuration_options.asciidoc +63 -0
  112. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/tables/global_variables.asciidoc +26 -0
  113. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/tables/page_variables.asciidoc +54 -0
  114. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/tables/serve_command_options.asciidoc +45 -0
  115. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/_includes/tables/site_variables.asciidoc +59 -0
  116. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +27 -7
  117. data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +130 -122
  118. data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +3 -3
  119. data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +3 -3
  120. data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +3 -3
  121. data/lib/starter_web/pages/public/blog/navigator/archive.html +3 -3
  122. data/lib/starter_web/pages/public/blog/navigator/index.html +4 -4
  123. data/lib/starter_web/pages/public/features/general.adoc +4 -4
  124. data/lib/starter_web/pages/public/features/template.adoc +1 -2
  125. data/lib/starter_web/pages/public/learn/quickstart.adoc +2 -2
  126. data/lib/starter_web/pages/public/learn/roundtrip/{400_asciidoc_extensions.adoc → asciidoc_extensions.adoc} +2 -2
  127. data/lib/starter_web/pages/public/learn/roundtrip/{410_bs_modals_extentions.adoc → bs_modals_extentions.adoc} +2 -2
  128. data/lib/starter_web/pages/public/learn/roundtrip/{300_icon_fonts.adoc → icon_fonts.adoc} +1 -2
  129. data/lib/starter_web/pages/public/learn/roundtrip/{100_present_images.adoc → present_images.adoc} +10 -10
  130. data/lib/starter_web/pages/public/learn/roundtrip/{100_present_videos.adoc → present_videos.adoc} +0 -0
  131. data/lib/starter_web/pages/public/learn/roundtrip/{600_quicksearch.adoc → quicksearch.adoc} +6 -7
  132. data/lib/starter_web/pages/public/learn/roundtrip/{420_responsive_tables_extensions.adoc → responsive_tables_extensions.adoc} +86 -73
  133. data/lib/starter_web/pages/public/learn/roundtrip/{500_themes.adoc → themes.adoc} +2 -2
  134. data/lib/starter_web/pages/public/learn/roundtrip/{200_typography.adoc → typography.adoc} +6 -6
  135. data/lib/starter_web/pages/public/learn/where_to_go.adoc +2 -2
  136. data/lib/starter_web/pages/public/legal/de/100_copyright.adoc +3 -2
  137. data/lib/starter_web/pages/public/legal/de/100_impress.adoc +3 -2
  138. data/lib/starter_web/pages/public/legal/de/300_privacy.adoc +3 -2
  139. data/lib/starter_web/pages/public/legal/de/400_comment_policy.adoc +3 -2
  140. data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +3 -2
  141. data/lib/starter_web/pages/public/legal/en/200_impress.adoc +3 -2
  142. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +3 -2
  143. data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +3 -2
  144. data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +2 -2
  145. data/lib/starter_web/pages/public/plans/plans.adoc +3 -3
  146. data/lib/starter_web/pages/public/previewer/preview_bootstrap_theme.adoc +5 -5
  147. data/lib/starter_web/pages/public/se/se-fake.adoc +2 -2
  148. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  149. data/lib/starter_web/utilsrv/package.json +1 -1
  150. metadata +58 -36
  151. data/lib/starter_web/assets/images/modules/attics/1920x1280/max-harlynking.jpg +0 -0
  152. data/lib/starter_web/assets/images/modules/attics/banner/admin-dashboard-bootstrap-1280x800-bw.jpg +0 -0
  153. data/lib/starter_web/assets/images/modules/attics/banner/lunr-banner-1280x800.jpg +0 -0
  154. data/lib/starter_web/assets/images/modules/attics/franck-1920x12800.jpg +0 -0
  155. data/lib/starter_web/assets/images/modules/attics/vladislav-klapin-2-1920x1280.jpg +0 -0
@@ -3,7 +3,18 @@ title: Asciidoctor PDF Themes
3
3
  tagline: Theming Guide for the Asciidoctor PDF Converter
4
4
  date: 2022-01-01 00:00:00
5
5
  description: >
6
- Asciidoctor PDF Theming Guide
6
+ Asciidoctor PDF is a native PDF converter for AsciiDoc that plugs
7
+ into the pdf backend. It bypasses the requirement to generate an
8
+ intermediary format such as DocBook, Apache FO, or LaTeX. Instead,
9
+ you can use Asciidoctor PDF to convert your documents directly
10
+ from AsciiDoc to PDF. The aim of this library is to take the pain
11
+ out of creating PDF documents from AsciiDoc.
12
+ Top features: javascript, css, scss, html, jamstack, provider, service,
13
+ internet, support, google, analytics, advertising, search, console,
14
+ silverlight, score, netlify, 1-Click, deployment, responsive, design,
15
+ themes, desktop, mobile, web, site, blog, post, navigation, royalty,
16
+ free, images, carousel, slider, gallery, video, player, clipboard,
17
+ cookie, consent, full-text, search, engine, infinite scroll.
7
18
 
8
19
  categories: [ Knowledge ]
9
20
  tags: [ Asciidoctor, PDF, Converter ]
@@ -13,8 +24,11 @@ regenerate: false
13
24
 
14
25
  resources: [ animate, clipboard, lightbox, rouge ]
15
26
  resource_options:
27
+
16
28
  - attic:
29
+
17
30
  slides:
31
+
18
32
  - url: /assets/images/modules/attics/sigmund-1920x1280.jpg
19
33
  alt: Photo by Sigmund on Unsplash
20
34
  alignY: 0.3
@@ -67,13 +67,14 @@ end::footnotes[]
67
67
  // Tags - Asciidoc attributes used internally
68
68
  // -----------------------------------------------------------------------------
69
69
  tag::tags[]
70
- :images-dir: pages/manuals/asciidoctor_pdf
70
+ // :images-dir: pages/manuals/asciidoctor_pdf
71
71
  end::tags[]
72
72
 
73
73
 
74
74
  // Data - Data elements for Asciidoctor extensions
75
75
  // -----------------------------------------------------------------------------
76
76
  tag::data[]
77
+ :data-images-example--pdf-screenshot: "assets/images/pages/asciidoc_skeletons/example-pdf-screenshot.png, PDF document rendered in a PDF viewer"
77
78
  end::data[]
78
79
 
79
80
 
@@ -1,10 +1,15 @@
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.
1
+ Asciidoctor PDF is a native PDF converter for AsciiDoc that plugs into
2
+ the PDF backend. It bypasses the requirement to generate an intermediary
3
+ format such as DocBook, Apache FO, or LaTeX. Instead, you can use Asciidoctor
4
+ PDF to convert your documents directly from AsciiDoc to PDF. The aim of
5
+ this library is to take the pain out of creating PDF documents from AsciiDoc.
6
+
7
+ {uri-asciidoctor-pdf}[Asciidoctor PDF, {browser-window--new}] is made possible
8
+ by an amazing Ruby gem named _Prawn_. And what a gem it is!
9
+ {uri-prawn-home}[Prawn, {browser-window--new}] is a nimble PDF writer for
10
+ _Ruby_. More important, it's a hackable platform that offers both high level
11
+ APIs for the most common needs and low level APIs for bending the document
12
+ model to accommodate special circumstances.
8
13
 
9
14
  [caption=Status]
10
15
  CAUTION: _Asciidoctor PDF_ is currently _alpha_ software. While the converter
@@ -21,7 +26,7 @@ Here's an example that demonstrates how to use _Prawn_ to create a basic PDF
21
26
  document.
22
27
 
23
28
  .Create a basic PDF document using _Prawn_
24
- [source,ruby]
29
+ [source, ruby]
25
30
  ----
26
31
  require 'prawn'
27
32
 
@@ -38,7 +43,7 @@ critical gap in _Asciidoctor_. It absolutely takes the pain out of creating
38
43
  printable documents. Picking up from there, _Asciidoctor PDF_ takes the pain out
39
44
  of creating PDF documents _from AsciiDoc_.
40
45
 
41
- === Highlights
46
+ == Highlights
42
47
 
43
48
  * Direct AsciiDoc to PDF conversion
44
49
  * SVG support
@@ -57,7 +62,7 @@ printable documents. Picking up from there, _Asciidoctor PDF_ takes the pain out
57
62
  * Custom (TTF) fonts
58
63
  * Double-sided printing mode (margins alternate on recto and verso pages)
59
64
 
60
- === Prerequisites
65
+ == Prerequisites
61
66
 
62
67
  All that's needed is _Ruby_ (1.9.3 or above; 2.3.x recommended) and a few _Ruby_
63
68
  gems, which we explain how to install in the next section.
@@ -65,7 +70,10 @@ gems, which we explain how to install in the next section.
65
70
  To check if you have _Ruby_ available, use the `ruby` command to query the
66
71
  version installed:
67
72
 
68
- $ ruby --version
73
+ [source, sh]
74
+ ----
75
+ ruby --version
76
+ ----
69
77
 
70
78
  [WARNING]
71
79
  ====
@@ -77,10 +85,13 @@ Starting with _Prawn_ 2.0.0, _Prawn_ requires Ruby >= 2.0.0 during installation.
77
85
  Therefore, to use _Asciidoctor PDF_ with Ruby 1.9.3, you must first explicitly
78
86
  install the following dependencies to lock the versions:
79
87
 
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
88
+ [source, sh]
89
+ ----
90
+ gem install prawn --version 1.3.0
91
+ gem install addressable --version 2.4.0
92
+ gem install prawn-svg --version 0.21.0
93
+ gem install prawn-templates --version 0.0.3
94
+ ----
84
95
 
85
96
  You can then proceed with installation of _Asciidoctor PDF_ on Ruby 1.9.3.
86
97
 
@@ -88,15 +99,18 @@ Starting with _Prawn_ 2.2.0, _Prawn_ requires Ruby >= 2.1.0 during installation.
88
99
  Therefore, to use _Asciidoctor PDF_ with Ruby 2.0.0, you must first explicitly
89
100
  install the following dependencies to lock the versions:
90
101
 
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
102
+ [source, sh]
103
+ ----
104
+ gem install prawn --version 2.1.0
105
+ gem install prawn-svg --version 0.26.0
106
+ gem install prawn-templates --version 0.0.4
107
+ ----
94
108
 
95
- For all other versions of _Ruby_, you can simply install the _Asciidoctor PDF_ gem.
96
- It will transitively install the required dependencies.
109
+ For all other versions of _Ruby_, you can simply install the _Asciidoctor PDF_
110
+ gem. It will transitively install the required dependencies.
97
111
  ====
98
112
 
99
- ==== System Encoding
113
+ === System Encoding
100
114
 
101
115
  _Asciidoctor_ assumes you're using UTF-8 encoding. To minimize encoding problems,
102
116
  make sure the default encoding of your system is set to UTF-8.
@@ -1,32 +1,44 @@
1
1
  == Getting Started
2
2
 
3
- You can get _Asciidoctor PDF_ by installing the published gem or running th
4
- code from source.
3
+ You can get _Asciidoctor PDF_ by installing the published gem or running the
4
+ code from source.
5
5
 
6
6
  === Install the Published Gem
7
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:
8
+ _Asciidoctor PDF_ is published as a pre-release on RubyGems.org. First, make
9
+ sure you have satisfied the prerequisites. Then, you can install the published
10
+ gem using the following command:
11
11
 
12
- $ gem install asciidoctor-pdf --pre
12
+ [source, sh]
13
+ ----
14
+ gem install asciidoctor-pdf --pre
15
+ ----
13
16
 
14
17
  If you want to syntax highlight source listings, you'll also want to install
15
18
  Rouge, Pygments, or CodeRay. Choose one (or more) of the following:
16
19
 
17
20
  .Rouge (preferred)
18
- $ gem install rouge
21
+ [source, sh]
22
+ ----
23
+ gem install rouge
24
+ ----
19
25
 
20
26
  .Pygments
21
- $ gem install pygments.rb
27
+ [source, sh]
28
+ ----
29
+ gem install pygments.rb
30
+ ----
22
31
 
23
32
  .CodeRay
24
- $ gem install coderay
33
+ [source, sh]
34
+ ----
35
+ gem install coderay
36
+ ----
25
37
 
26
38
  You then activate syntax highlighting for a given document by adding the
27
39
  `source-highlighter` attribute to the document header (Rouge shown):
28
40
 
29
- [source,asciidoc]
41
+ [source, asciidoc]
30
42
  ----
31
43
  :source-highlighter: rouge
32
44
  ----
@@ -34,7 +46,10 @@ You then activate syntax highlighting for a given document by adding the
34
46
  Assuming all the required gems install properly, verify you can run the
35
47
  `asciidoctor-pdf` script:
36
48
 
37
- $ asciidoctor-pdf -v
49
+ [source, sh]
50
+ ----
51
+ asciidoctor-pdf -v
52
+ ----
38
53
 
39
54
  If you see the version of _Asciidoctor PDF_ printed, you're ready to use
40
55
  _Asciidoctor PDF_.
@@ -42,19 +57,51 @@ _Asciidoctor PDF_.
42
57
  Let's grab an AsciiDoc document to distill and start putting _Asciidoctor PDF_
43
58
  to use!
44
59
 
45
- === An Example AsciiDoc Document
60
+ === An example AsciiDoc document
46
61
 
47
62
  If you don't already have an AsciiDoc document, you can use the
48
63
  *basic_example.adoc* file found in the examples directory of this
49
64
  project.
50
65
 
66
+ /////
51
67
  ifeval::[{safe-mode-level} < 20]
52
68
  .000_basic_example.adoc
53
- [source,asciidoc]
54
- ....
55
- include::000_basic_example.asciidoc[]
56
- ....
69
+ [source, asciidoc]
70
+ ----
71
+ = Document Title
72
+
73
+ Doc Writer <doc@example.com>
74
+ :doctype: book
75
+ :reproducible:
76
+ //:source-highlighter: coderay
77
+ :source-highlighter: rouge
78
+ :listing-caption: Listing
79
+ // Uncomment next line to set page size (default is A4)
80
+ //:pdf-page-size: Letter
81
+
82
+ A simple http://asciidoc.org[AsciiDoc] document.
83
+
84
+ == Introduction
85
+
86
+ A paragraph followed by a simple list with square bullets.
87
+
88
+ [square]
89
+ * item 1
90
+ * item 2
91
+
92
+ Here's how you say "`Hello, World!`" in Prawn:
93
+
94
+ .Create a basic PDF document using Prawn
95
+ [source,ruby]
96
+ ----
97
+ require 'prawn'
98
+
99
+ Prawn::Document.generate 'example.pdf' do
100
+ text 'Hello, World!'
101
+ end
102
+ ----
57
103
  endif::[]
104
+ /////
58
105
 
59
106
  It's time to convert the AsciiDoc document directly to PDF.
60
107
 
@@ -66,11 +113,17 @@ it uses the `source-highlighter` attribute with the value of `rouge`.
66
113
  Converting to PDF is a simple as running the `asciidoctor-pdf` script using
67
114
  _Ruby_ and passing our AsciiDoc document as the first argument.
68
115
 
69
- $ asciidoctor-pdf 000_basic_example.adoc
116
+ [source, sh]
117
+ ----
118
+ asciidoctor-pdf 000_basic_example.adoc
119
+ ----
70
120
 
71
- This command is just a shorthand way of running:
121
+ This command is just a *shorthand* way of running:
72
122
 
73
- $ asciidoctor -r asciidoctor-pdf -b pdf 000_basic_example.adoc
123
+ [source, sh]
124
+ ----
125
+ asciidoctor -r asciidoctor-pdf -b pdf 000_basic_example.adoc
126
+ ----
74
127
 
75
128
  The `asciidoctor-pdf` command just saves you from having to remember all those
76
129
  flags. That's why we created it.
@@ -81,15 +134,14 @@ viewer to see the result.
81
134
 
82
135
  ifdef::backend-html5[]
83
136
  .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%]
137
+ lightbox::images-example--pdf-screenshot[ 1024, {data-images-example--pdf-screenshot}, role="mb-4" ]
85
138
  endif::[]
86
139
 
87
140
  ifdef::backend-pdf[]
88
141
  .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%]
142
+ image::/assets/images/pages/asciidoc_skeletons/example-pdf-screenshot.png[PDF document rendered in a PDF viewer, width=800, scaledwidth=100%]
90
143
  endif::[]
91
144
 
92
145
  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.
146
+ directory to see more of what _Asciidoctor PDF_ can do. The pain of the
147
+ DocBook toolchain should be melting away from now.
@@ -33,29 +33,29 @@ The theme file must be named _<name>-theme.yml_, where `<name>` is the name
33
33
  of the theme. Here's an example of a basic theme file:
34
34
 
35
35
  .basic-theme.yml
36
- [source,yaml]
36
+ [source, yaml]
37
37
  ----
38
38
  page:
39
- layout: portrait
40
- margin: [0.75in, 1in, 0.75in, 1in]
41
- size: Letter
39
+ layout: portrait
40
+ margin: [0.75in, 1in, 0.75in, 1in]
41
+ size: Letter
42
42
  base:
43
- font_color: #333333
44
- font_family: Times-Roman
45
- font_size: 12
43
+ font_color: '#333333'
44
+ font_family: Times-Roman
45
+ font_size: 12
46
46
  line_height_length: 17
47
- line_height: $base_line_height_length / $base_font_size
48
- vertical_spacing: $base_line_height_length
47
+ line_height: $base_line_height_length / $base_font_size
48
+ vertical_spacing: $base_line_height_length
49
49
  heading:
50
- font_color: #262626
51
- font_size: 17
52
- font_style: bold
53
- line_height: 1.2
54
- margin_bottom: $vertical_spacing
50
+ font_color: '#262626'
51
+ font_size: 17
52
+ font_style: bold
53
+ line_height: 1.2
54
+ margin_bottom: $vertical_spacing
55
55
  link:
56
- font_color: #002FA7
56
+ font_color: '#002FA7'
57
57
  outline_list:
58
- indent: $base_font_size * 1.5
58
+ indent: $base_font_size * 1.5
59
59
  ----
60
60
 
61
61
  When creating a new theme, you only have to define the keys you want to
@@ -73,8 +73,12 @@ start hacking on it.
73
73
  Alternatively, you can snag the file from your local installation using the
74
74
  following command:
75
75
 
76
- $ ASCIIDOCTOR_PDF_DIR=`gem contents asciidoctor-pdf --show-install-dir`;\
76
+ [source, sh]
77
+ ----
78
+ ASCIIDOCTOR_PDF_DIR=`gem contents asciidoctor-pdf --show-install-dir`; \
77
79
  cp "$ASCIIDOCTOR_PDF_DIR/data/themes/default-theme.yml" custom-theme.yml
80
+ ----
81
+
78
82
  ====
79
83
 
80
84
  Keys may be nested to an arbitrary depth to eliminate redundant prefixes (an
@@ -89,33 +93,33 @@ name (e.g., `font_color`) into a single, qualified key (e.g., `link_font_color`)
89
93
  For example, let's assume we want to set the base (i.e., global) font size
90
94
  and color. These keys may be written longhand:
91
95
 
92
- [source,yaml]
96
+ [source, yaml]
93
97
  ----
94
- base_font_color: #333333
95
- base_font_family: Times-Roman
96
- base_font_size: 12
98
+ base_font_color: '#333333'
99
+ base_font_family: Times-Roman
100
+ base_font_size: 12
97
101
  ----
98
102
 
99
103
  Or, to avoid having to type the prefix `base_` multiple times, the keys may
100
104
  be written hierarchically:
101
105
 
102
- [source,yaml]
106
+ [source, yaml]
103
107
  ----
104
108
  base:
105
- font_color: #333333
106
- font_family: Times-Roman
107
- font_size: 12
109
+ font_color: '#333333'
110
+ font_family: Times-Roman
111
+ font_size: 12
108
112
  ----
109
113
 
110
114
  Or even:
111
115
 
112
- [source,yaml]
116
+ [source, yaml]
113
117
  ----
114
118
  base:
115
119
  font:
116
- color: #333333
117
- family: Times-Roman
118
- size: 12
120
+ color: '#333333'
121
+ family: Times-Roman
122
+ size: 12
119
123
  ----
120
124
 
121
125
  Each level of nesting must be indented by two more spaces of indentation than