asciidoctor-revealjs 2.0.1 → 3.0.0.pre.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c859d03df98f52ebbcc3e1f379a41c6103e6140a94b253732a8cf5689e098e4
4
- data.tar.gz: 2558438a7589d665bd25aae3f49d9b99ca1241a2ff390508380a3a4abe38787a
3
+ metadata.gz: cfd55df0c713f375e7f6512d1390b06347a742d00eb35cbbc39298de6680cfe3
4
+ data.tar.gz: 397f8663b1586aa46990f18d21821722762aab12ffb688b1bfa81558c9a2c9e4
5
5
  SHA512:
6
- metadata.gz: ca517e99129e78868555c180e9464e4d4953a434499cde9c46a018ab17dfbba440bc619282e7e9e4e98270f61b4b93897910e8ca2fa060ab5ee2cdd380d2cef5
7
- data.tar.gz: c3f53bfe969e5774ab0947d8db41477d6af5e22217fce08d760bf5c0d70b366663c31cc1543cefd584cd73fbb5e7991f995d7b0237cfd23d835dfb68e502493c
6
+ metadata.gz: a7ab85893e595375c5ef70bccb4439c4ee159282ba2515931ed55948f92f1b2300a1f5fbe305cbc392531e11f991cb5fbd0a47ee8fcab8e0cb7c80081c1954a9
7
+ data.tar.gz: 3a034c9c4a4f4e08ac1e9958d417bd9fe6aa50b5ee50ff2334f86bfff85e0b7f1dad630c1c546bcb8f56573032e52554a4245e9995af97cdc744fdb9df8feb43
data/CHANGELOG.adoc CHANGED
@@ -6,6 +6,57 @@
6
6
  This document provides a high-level view of the changes introduced in {project-name} by release.
7
7
  For a detailed view of what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.
8
8
 
9
+ == master (unreleased)
10
+
11
+ Upgrade considerations::
12
+ * Node.js packaging changes!
13
+ With the arrival of Asciidoctor.js 2.0.0 you can now use a command line interface (CLI) just like with Asciidoctor Ruby:
14
+
15
+ $(npm bin)/asciidoctor -r @asciidoctor/reveal.js -b revealjs presentation.adoc
16
+ +
17
+ If you want to keep generating your reveal.js presentations using the Node.js API, you need to change the following code.
18
+ Instead of:
19
+
20
+ var asciidoctorRevealjs = require('asciidoctor-reveal.js');
21
+ asciidoctorRevealjs.register()
22
+ +
23
+ Use:
24
+
25
+ var asciidoctor = require('@asciidoctor/core')()
26
+ var asciidoctorRevealjs = require('@asciidoctor/reveal.js')
27
+ asciidoctorRevealjs.register()
28
+ +
29
+ * Node.js package name changed from `asciidoctor-reveal.js` to `@asciidoctor/reveal.js` ({uri-issue}252[#252], {uri-issue}291[#291])
30
+ * Custom CSS might require adjustments.
31
+ Source and listing block encapsulation changed due to our migration to Asciidoctor 2.0.0 Syntax Highlighter API.
32
+ See {uri-issue}287[#287].
33
+ * Upgraded to Font-Awesome 5.8.2 from 4.3.0 which contains some backward incompatible changes ({uri-issue}268[#268])
34
+ * {project-name} now requires Asciidoctor 2.0.0+ or Asciidoctor.js 2.0.0+ ({uri-issue}290[#290])
35
+ * Dropped support for end-of-life Ruby version 2.1 and 2.2 ({uri-issue}247[#247])
36
+
37
+ Compliance::
38
+ * Added support for table frame, grid, header and alignment options ({uri-issue}29[#29], {uri-issue}42[#42], {uri-issue}56[#56], {uri-issue}288[#288])
39
+ * Added support for Reveal.js data-background-opacity ({uri-issue}269[#269])
40
+ * Added support for Reveal.js data-background-position ({uri-issue}273[#273], {uri-issue}274[#274])
41
+
42
+ Enhancements::
43
+ * Support for Asciidoctor.js 2.0.0+ which brings a command line interface ({uri-issue}254[#254])
44
+ * Migrated to Asciidoctor 2.0.0 new https://github.com/asciidoctor/asciidoctor/releases/tag/v2.0.0[Syntax Highlighter API] ({uri-issue}261[#261], {uri-issue}287[#287])
45
+ * Added support for Reveal.js PDF export options ({uri-issue}277[#277])
46
+ * Upgraded to Font-Awesome 5.8.2 ({uri-issue}268[#268])
47
+ * We now accept `reveal.js` as converter/backend name in addition to `revealjs` ({uri-issue}253[#253], {uri-issue}297[#297])
48
+ * Babel integration example API updated to use {project-name} 2.x API ({uri-issue}285[#285])
49
+ * Node.js package clean-ups ({uri-issue}279[#279], {uri-issue}281[#281], {uri-issue}282[#282])
50
+ * Upgrade Opal to use a compatible version with Asciidoctor.js 2.0.3 ({uri-issue}289[#289])
51
+ * Documentation improvements ({uri-issue}292[#292])
52
+ * Improvements to tests ({uri-issue}294[#294])
53
+
54
+ Bug Fixes::
55
+ * Babel integration example updated for security ({uri-issue}285[#285])
56
+
57
+ Infrastructure::
58
+ * Updated Travis' JRuby to fix issues with bundler ({uri-issue}295[#295])
59
+
9
60
 
10
61
  == 2.0.1 (2019-12-04)
11
62
 
data/Gemfile CHANGED
@@ -2,5 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in asciidoctor-revealjs.gemspec
4
4
  gemspec
5
- # Asciidoctor.js 1.5.9 requires an unreleased Opal 0.11.99.dev (6703d8d)
6
- gem 'opal', :git => 'https://github.com/opal/opal.git', :ref => '6703d8d'
5
+ # Asciidoctor.js 2.0.0 requires an unreleased Opal 0.11.99.dev (d136ea8)
6
+ gem 'opal', :git => 'https://github.com/opal/opal.git', :ref => 'd136ea8'
data/README.adoc CHANGED
@@ -21,28 +21,30 @@ endif::[]
21
21
  :uri-revealjs-home: http://lab.hakim.se/reveal-js/
22
22
  :uri-revealjs-gh: https://github.com/hakimel/reveal.js
23
23
  :uri-nodejs-download: https://nodejs.org/en/download/
24
+ :showcasedir: showcase
24
25
 
25
26
  ifdef::env-github[]
26
27
  image:https://travis-ci.org/asciidoctor/asciidoctor-reveal.js.svg?branch=master[Build Status,link=https://travis-ci.org/asciidoctor/asciidoctor-reveal.js]
27
28
  image:http://img.shields.io/gem/v/asciidoctor-revealjs.svg[gem, link=https://rubygems.org/gems/asciidoctor-revealjs]
28
- image:http://img.shields.io/npm/v/asciidoctor-reveal.js.svg[npm, link=https://www.npmjs.org/package/asciidoctor-reveal.js]
29
+ image:http://img.shields.io/npm/v/@asciidoctor/reveal.js.svg[npm, link=https://www.npmjs.org/package/@asciidoctor/reveal.js]
29
30
  endif::[]
30
31
 
31
32
  // IMPORTANT: Changes made to this description should be sync'ed with the readme field in package.json.
32
33
  {uri-project-repo}[Asciidoctor reveal.js] is a converter for {uri-asciidoctor}[Asciidoctor] and {uri-asciidoctorjs}[Asciidoctor.js] that transforms an AsciiDoc document into an HTML5 presentation designed to be executed by the {uri-revealjs-home}[reveal.js] presentation framework.
33
34
 
35
+ TIP: Want to see some example presentations, see <<Showcase Presentations>>
34
36
 
35
37
  There are two main technology stacks that can transform AsciiDoc into HTML5 / reveal.js:
36
38
 
37
39
  * Asciidoctor / Ruby / Bundler (See <<Ruby Setup>>)
38
- * Asciidoctor.js / JavaScript (Node.js) / NPM (See <<Node / JavaScript Setup>>)
40
+ * Asciidoctor.js / JavaScript (Node.js) / npm (See <<Node / JavaScript Setup>>)
39
41
 
40
42
  Right now the Asciidoctor / Ruby stack is the better tested one but with the changes in v1.1.0 they have feature parity.
41
43
 
42
44
  ifeval::['{branch}' == 'master']
43
45
  NOTE: You're viewing the documentation for an upcoming release.
44
46
  If you're looking for the documentation for the current release or an older one, please click on the appropriate link below: +
45
- {uri-project-repo}/tree/v2.0.0#readme[2.0.0] (latest release)
47
+ {uri-project-repo}/tree/v2.0.1#readme[2.0.1] (latest release)
46
48
  &hybull;
47
49
  {uri-project-repo}/tree/v1.1.3#readme[1.1.3] (latest from 1.1 series)
48
50
  &hybull;
@@ -130,38 +132,43 @@ TIP: If you are using https://pages.github.com/[GitHub Pages], plan ahead by kee
130
132
 
131
133
  === Prerequisites
132
134
 
133
- First you must install and configure {uri-nodejs-download}[Node.js] on your machine.
135
+ First you must install and configure {uri-nodejs-download}[Node] on your machine.
134
136
 
135
137
  === Install
136
138
 
137
- Using npm:
139
+ We recommend to install the dependencies in a project directory, such as the directory where your AsciiDoc presentations are stored.
140
+ If you don't have a `package.json` file in your project directory, you can create one to eliminate warnings during the installation using:
138
141
 
139
- Create a directory to place slides. Initialize the directory to store npm packages within that directory.
142
+ $ npm init -y
140
143
 
141
- $ echo {} > package.json # eliminates warnings, use `npm init` if you prefer
142
- $ npm i --save asciidoctor-reveal.js
144
+ You can now install the dependencies:
143
145
 
144
- === Rendering the AsciiDoc into slides
146
+ $ npm i --save asciidoctor @asciidoctor/reveal.js
145
147
 
146
- Once the package is installed, you can convert AsciiDoc files using reveal.js converter.
147
- Here we are converting a file named `presentation.adoc` into a reveal.js presentation using Node.js:
148
+ === Convert AsciiDoc into slides
148
149
 
149
- .asciidoctor-revealjs.js
150
- [source, javascript]
151
- ----
152
- // Load asciidoctor.js and asciidoctor-reveal.js
153
- var asciidoctor = require('asciidoctor.js')();
154
- var asciidoctorRevealjs = require('asciidoctor-reveal.js');
155
- asciidoctorRevealjs.register()
150
+ Once the dependencies are installed, verify that the `asciidoctor` command is available.
151
+ On Linux and macOS, open a terminal and type:
156
152
 
157
- // Convert the document 'presentation.adoc' using the reveal.js converter
158
- var options = {safe: 'safe', backend: 'revealjs'};
159
- asciidoctor.convertFile('presentation.adoc', options); // <1>
153
+ $ $(npm bin)/asciidoctor --version
154
+
155
+ On Windows, open PowerShell and type:
156
+
157
+ $ .\node_modules\.bin\asciidoctor.cmd --version
158
+
159
+ The command should report the Asciidoctor CLI version in the terminal:
160
+
161
+ [source,console]
162
+ ----
163
+ Asciidoctor.js 2.0.3 (Asciidoctor 2.0.9) [https://asciidoctor.org]
164
+ Runtime Environment (node v10.15.1 on linux)
165
+ CLI version 2.0.1
160
166
  ----
161
- <1> Creates a file named `presentation.html` (in the directory where command is run)
167
+
168
+ If you don't have an existing presentation, you can create a sample presentation named [.path]_presentation.adoc_:
162
169
 
163
170
  .presentation.adoc
164
- [source, asciidoc]
171
+ [source,asciidoc]
165
172
  ----
166
173
  = Title Slide
167
174
 
@@ -173,12 +180,40 @@ asciidoctor.convertFile('presentation.adoc', options); // <1>
173
180
 
174
181
  ----
175
182
 
176
- To render the slides, run:
183
+ To convert the sample presentation into slides, open a terminal and type:
177
184
 
178
- node asciidoctor-revealjs.js
185
+ $ $(npm bin)/asciidoctor -r @asciidoctor/reveal.js -b revealjs presentation.adoc
179
186
 
180
- You can open the `presentation.html` file in your browser and enjoy!
187
+ On windows, open PowerShell and type:
188
+
189
+ $ .\node_modules\.bin\asciidoctor.cmd -r @asciidoctor/reveal.js -b revealjs presentation.adoc
190
+
191
+ The above command will generate a file named [.path]_presentation.html_.
192
+ You can open this file in a browser.
181
193
 
194
+ ==== Using the JavaScript API
195
+
196
+ Alternatively, you can use the JavaScript API to register the converter and convert a document:
197
+
198
+ .convert-slides.js
199
+ [source,javascript]
200
+ ----
201
+ // Load Asciidoctor.js and the reveal.js converter
202
+ var asciidoctor = require('@asciidoctor/core')()
203
+ var asciidoctorRevealjs = require('@asciidoctor/reveal.js')
204
+ asciidoctorRevealjs.register()
205
+
206
+ // Convert the document 'presentation.adoc' using the reveal.js converter
207
+ var options = { safe: 'safe', backend: 'revealjs' }
208
+ asciidoctor.convertFile('presentation.adoc', options) // <1>
209
+ ----
210
+ <1> Creates a file named `presentation.html` (in the directory where command is run)
211
+
212
+ To execute the script, open a terminal and type:
213
+
214
+ $ node convert-slides.js
215
+
216
+ You can open the `presentation.html` file in your browser and enjoy!
182
217
 
183
218
  == Syntax Examples
184
219
 
@@ -479,7 +514,7 @@ print "$0: hello world\n"
479
514
  ....
480
515
 
481
516
  [NOTE]
482
- Alternatively, you can use http://coderay.rubychan.de[Coderay] or http://pygments.org[Pygments] as syntax highlighters if you are using the Asciidoctor/Ruby/Bundler toolchain (not Asciidoctor.js/Javascript/NPM).
517
+ Alternatively, you can use http://coderay.rubychan.de[Coderay] or http://pygments.org[Pygments] as syntax highlighters if you are using the Asciidoctor/Ruby/Bundler toolchain (not Asciidoctor.js/JavaScript/npm).
483
518
  Check the `examples/` directory for examples and notes about what needs to be done for them to work.
484
519
  They are considered unsupported by the asciidoctor-reveal.js project.
485
520
 
@@ -639,7 +674,7 @@ In AsciiDoc the `data-state` can be applied to a slide by adding a state attribu
639
674
  == Epic Topic
640
675
  ----
641
676
 
642
- That state can be queried from Javascript or used in CSS to apply further customization to your slide deck.
677
+ That state can be queried from JavaScript or used in CSS to apply further customization to your slide deck.
643
678
  For example, by combining this feature with the <<CSS override>> one, you can alter fonts for specific pages with this CSS:
644
679
 
645
680
  [source, css]
@@ -893,6 +928,16 @@ Defaults to *block*
893
928
  |<percentage value>
894
929
  | Factor of the display size that should remain empty around the content. Defaults to *0.1*
895
930
 
931
+ |:revealjs_pdfseparatefragments:
932
+ |*true*, false
933
+ |In PDF export, put each fragment on a separate page.
934
+ Defaults to *true*
935
+
936
+ |:revealjs_pdfmaxpagesperslide:
937
+ |<integer>
938
+ |In PDF export, when a slide does not fit on a single page, maximum number of pages.
939
+ Defaults to *1*
940
+
896
941
  |===
897
942
 
898
943
  If you want to build a custom theme or customize an existing one you should
@@ -936,9 +981,9 @@ TIP: To work properly, this plugin requires a Chrome-based browser.
936
981
  Additional reveal.js plugins can be installed and activated using AsciiDoc attributes and external javascript files.
937
982
 
938
983
  . Extract the plugin files in a directory
939
- . Create a Javascript file that will contain the Javascript statements to load the plugin (only one required even if you are using several plugins)
940
- . Add a `:revealjs_plugins:` attribute to point to that Javascript file
941
- . (Optional) Add a `:revealjs_plugins_configuration:` attribute to point to a Javascript file that configures the plugins you use
984
+ . Create a JavaScript file that will contain the JavaScript statements to load the plugin (only one required even if you are using several plugins)
985
+ . Add a `:revealjs_plugins:` attribute to point to that JavaScript file
986
+ . (Optional) Add a `:revealjs_plugins_configuration:` attribute to point to a JavaScript file that configures the plugins you use
942
987
 
943
988
  Looking at the example provided in the repository will provide guidance: link:examples/revealjs-plugins.adoc[AsciiDoc source], link:examples/revealjs-plugins.js[Plugin Loader], link:examples/revealjs-plugins-conf.js[Plugin Configuration].
944
989
 
@@ -949,15 +994,31 @@ A {uri-revealjs-gh}/wiki/Plugins,-Tools-and-Hardware[list of existing reveal.js
949
994
  == Minimum Requirements
950
995
 
951
996
  Our requirements are expressed in our packages and by our dependencies.
952
- Basically, all you need is the package manager of the flavor of Asciidoctor-Reveal.js you are interested to run:
997
+ Basically, all you need is the package manager of the flavor of Asciidoctor reveal.js you are interested to run:
953
998
 
954
999
  * With Ruby / Bundler: A https://www.ruby-lang.org/en/downloads/[recent Ruby] and https://bundler.io/[Bundler]
955
- * With Javascript (Node.js) / NPM: a https://nodejs.org/en/download/[recent Node.js] environment
1000
+ * With JavaScript (Node.js) / npm: a https://nodejs.org/en/download/[recent Node.js] environment
956
1001
 
957
1002
  If you need more details about our dependencies check out Asciidoctor dependencies:
958
1003
 
959
- * With Ruby / Bundler: https://asciidoctor.org/#requirements[Asciidoctor] 1.5.6
960
- * With Javascript (Node.js) / NPM: https://github.com/asciidoctor/asciidoctor.js/blob/v1.5.6/package.json[Asciidoctor.js] 1.5.6
1004
+ * With Ruby / Bundler: https://github.com/asciidoctor/asciidoctor/tree/v2.0.10#requirements[Asciidoctor] 2.0.10
1005
+ * With JavaScript (Node.js) / NPM: https://github.com/asciidoctor/asciidoctor.js/blob/v2.0.3/packages/core/package.json[Asciidoctor.js] 2.0.3
1006
+
1007
+
1008
+ == Showcase Presentations
1009
+
1010
+ === Power Catchup -- Everything Practical and Important in Java 9 to 13
1011
+
1012
+ A smooth presentation, featuring video backgrounds, slide transitions, code and callout examples and the use of notes.
1013
+
1014
+ https://bentolor.github.io/java9to13/[Presentation] and https://github.com/bentolor/java9to13[source]
1015
+
1016
+ ==== Screenshots
1017
+
1018
+ image:{showcasedir}/java9to13_4.png[width=200,link=./{showcasedir}/java9to13_4.png] image:{showcasedir}/java9to13_1.jpg[width=200,link={showcasedir}/java9to13_1.jpg]
1019
+
1020
+ image:{showcasedir}/java9to13_2.jpg[width=200,link={showcasedir}/java9to13_2.jpg]
1021
+ image:{showcasedir}/java9to13_3.png[width=200,link={showcasedir}/java9to13_3.png]
961
1022
 
962
1023
 
963
1024
  == Contributing
data/Rakefile CHANGED
@@ -71,7 +71,7 @@ def build_converter(mode = :pretty)
71
71
  Asciidoctor::TemplatesCompiler::RevealjsSlim.compile_converter(
72
72
  templates_dir: TEMPLATES_DIR,
73
73
  class_name: 'Asciidoctor::Revealjs::Converter',
74
- register_for: ['revealjs'],
74
+ register_for: ['revealjs', 'reveal.js'],
75
75
  backend_info: {
76
76
  basebackend: 'html',
77
77
  outfilesuffix: '.html',
@@ -107,6 +107,7 @@ namespace :examples do
107
107
  # converted slides will be put in examples/ directory
108
108
  task :convert do
109
109
  require 'slim-htag'
110
+ require_relative 'lib/asciidoctor-revealjs'
110
111
  Dir.glob('examples/*.adoc') do |_file|
111
112
  print "Converting file #{_file}... "
112
113
  out = Asciidoctor.convert_file _file,
@@ -8,10 +8,11 @@ Gem::Specification.new do |s|
8
8
  s.authors = ['Olivier Bilodeau']
9
9
  s.email = ['olivier@bottomlesspit.org']
10
10
  s.homepage = 'https://github.com/asciidoctor/asciidoctor-reveal.js'
11
- s.summary = 'Converts AsciiDoc to HTML for a Reveal.js presentation'
12
- s.description = 'Reveal.JS back-end for Asciidoctor and Asciidoctor.js. Write slides in AsciiDoc!'
11
+ s.summary = 'A reveal.js converter for Asciidoctor. Write your slides in AsciiDoc!'
12
+ s.description = 'Converts AsciiDoc documents into HTML5 presentations designed to be executed by the reveal.js presentation framework.'
13
13
  s.license = 'MIT'
14
14
 
15
+
15
16
  files = begin
16
17
  if (result = Open3.popen3('git ls-files -z') {|_, out| out.read }.split %(\0)).empty?
17
18
  Dir['**/*']
@@ -29,7 +30,7 @@ Gem::Specification.new do |s|
29
30
  s.extra_rdoc_files = Dir['README.adoc', 'LICENSE.adoc', 'HACKING.adoc']
30
31
  s.require_paths = ['lib']
31
32
 
32
- s.add_runtime_dependency 'asciidoctor', ['>= 1.5.6', '< 3.0.0']
33
+ s.add_runtime_dependency 'asciidoctor', ['>= 2.0.0', '< 3.0.0']
33
34
  s.add_runtime_dependency 'thread_safe', '~> 0.3.5'
34
35
  s.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
35
36
 
@@ -38,11 +39,13 @@ Gem::Specification.new do |s|
38
39
  s.add_development_dependency 'pry', '~> 0.10.4'
39
40
  if RUBY_ENGINE != 'jruby'
40
41
  s.add_development_dependency 'pry-byebug'
42
+ s.add_development_dependency 'pygments.rb'
41
43
  end
42
44
  s.add_development_dependency 'colorize'
43
45
  s.add_development_dependency 'asciidoctor-templates-compiler', '~> 0.4.2'
44
46
  s.add_development_dependency 'slim', '~> 3.0.6'
45
47
  s.add_development_dependency 'slim-htag', '~> 0.1.0'
48
+ s.add_development_dependency 'rouge'
46
49
  # Overriden in Gemfile and Gemfile.upstream for now
47
50
  #s.add_development_dependency 'opal', '~> 0.11.1'
48
51
  end
@@ -0,0 +1,24 @@
1
+ // .font-awesome
2
+ // Testing font-awesome icons
3
+ // :include: //body/script | //div[@class="slides"]
4
+ // :header_footer:
5
+ = Font Awesome Tests
6
+ :icons: font
7
+
8
+ == !
9
+
10
+ icon:heart[2x]
11
+
12
+ == !
13
+
14
+ icon:heart[size=5x]
15
+
16
+ == !
17
+
18
+ // TODO
19
+ [red]
20
+ icon:heart[size=5x]
21
+
22
+ == !
23
+
24
+ icon:stackpath[size=5x]
@@ -50,6 +50,8 @@ Some overview
50
50
  ----
51
51
 
52
52
  ifdef::backend-revealjs[=== !]
53
+ // TODO one day would be nice to allow
54
+ //ifdef::backend-reveal.js[=== !]
53
55
 
54
56
  Detailed view
55
57
 
@@ -0,0 +1,41 @@
1
+ // .source-rouge
2
+ // Demonstration of source highlighting with Rouge
3
+ // :include: //div[@class="slides"]
4
+ // :header_footer:
5
+ = Source Code with Rouge
6
+ :icons: font
7
+ :source-highlighter: rouge
8
+ :rouge-style: monokai
9
+
10
+ == Requirements
11
+
12
+ WARNING: This will not work from Asciidoctor.js
13
+
14
+ [NOTE]
15
+ ====
16
+ For this to work. You need to add:
17
+
18
+ gem 'rouge'
19
+
20
+ to your `Gemfile` and re-run:
21
+
22
+ bundle install
23
+ ====
24
+
25
+ == Use the Source
26
+
27
+ [source, rust]
28
+ ----
29
+ fn main() {
30
+ println!("Hello World!");
31
+ }
32
+ ----
33
+
34
+ == Stretch the Source
35
+
36
+ [source, rust, role="stretch"]
37
+ ----
38
+ fn main() {
39
+ println!("Hello stretched World!");
40
+ }
41
+ ----
@@ -0,0 +1,141 @@
1
+ = Table styles
2
+
3
+ == Default table with header
4
+
5
+ [cols=2*,options=header]
6
+ |===
7
+ | Header 1
8
+ | Header 2
9
+
10
+ | Row 1, Col1
11
+ | Row 1, Col2
12
+
13
+ | Row 2, Col1
14
+ | Row 2, Col2
15
+
16
+ |===
17
+
18
+ == Frames
19
+
20
+ === Frame none
21
+
22
+ [cols=2*,frame=none,options=header]
23
+ |===
24
+ | Header 1
25
+ | Header 2
26
+
27
+ | Row 1, Col1
28
+ | Row 1, Col2
29
+
30
+ | Row 2, Col1
31
+ | Row 2, Col2
32
+
33
+ |===
34
+
35
+ === Frame sides
36
+
37
+ [cols=2*,frame=sides,options=header]
38
+ |===
39
+ | Header 1
40
+ | Header 2
41
+
42
+ | Row 1, Col1
43
+ | Row 1, Col2
44
+
45
+ | Row 2, Col1
46
+ | Row 2, Col2
47
+
48
+ |===
49
+
50
+ === Frame topbot
51
+
52
+ [cols=2*,frame=topbot,options=header]
53
+ |===
54
+ | Header 1
55
+ | Header 2
56
+
57
+ | Row 1, Col1
58
+ | Row 1, Col2
59
+
60
+ | Row 2, Col1
61
+ | Row 2, Col2
62
+
63
+ |===
64
+
65
+ == Grid
66
+
67
+ === Grid none
68
+
69
+ [cols=2*,grid=none,options=header]
70
+ |===
71
+ | Header 1
72
+ | Header 2
73
+
74
+ | Row 1, Col1
75
+ | Row 1, Col2
76
+
77
+ | Row 2, Col1
78
+ | Row 2, Col2
79
+
80
+ |===
81
+
82
+ === Grid cols
83
+
84
+ [cols=2*,grid=cols,options=header]
85
+ |===
86
+ | Header 1
87
+ | Header 2
88
+
89
+ | Row 1, Col1
90
+ | Row 1, Col2
91
+
92
+ | Row 2, Col1
93
+ | Row 2, Col2
94
+
95
+ |===
96
+
97
+ === Grid rows
98
+
99
+ [cols=2*,grid=rows,options=header]
100
+ |===
101
+ | Header 1
102
+ | Header 2
103
+
104
+ | Row 1, Col1
105
+ | Row 1, Col2
106
+
107
+ | Row 2, Col1
108
+ | Row 2, Col2
109
+
110
+ |===
111
+
112
+ == Combo
113
+
114
+ === Grid none, frame none
115
+
116
+ [cols=2*,grid=none,frame=none,options=header]
117
+ |===
118
+ | Header 1
119
+ | Header 2
120
+
121
+ | Row 1, Col1
122
+ | Row 1, Col2
123
+
124
+ | Row 2, Col1
125
+ | Row 2, Col2
126
+
127
+ |===
128
+
129
+ == Alignments
130
+
131
+ [cols="^,<,>", options="header"]
132
+ |===
133
+
134
+ | Name
135
+ | Description
136
+ | Version
137
+
138
+ | Asciidoctor
139
+ | Awesome way to write documentation
140
+ | 2.0.4
141
+ |===