diff --git a/examples/level-sectnums.adoc b/examples/level-sectnums.adoc new file mode 100644 index 00000000..b5d6b415 --- /dev/null +++ b/examples/level-sectnums.adoc @@ -0,0 +1,24 @@ +// .sections +// Demonstration of section numbers and their specific reveal.js integration. +// :include: //div[@class="slides"] +// :header_footer: += Sectnums +:backend: revealjs +:sectnums: +:sectnumlevels: 2 + +== First level + +First content + +== Vertical + +Vertical slides are using level 2 sections + +=== Level 2 + +==== Level 3 does not have sectnum, sectnumlevels is 2 + +== Horizontal slide + +=== Also supports levels diff --git a/templates/section.html.slim b/templates/section.html.slim index 65792fb4..f21e6316 100644 --- a/templates/section.html.slim +++ b/templates/section.html.slim @@ -56,7 +56,7 @@ data-state=(attr 'state')) - unless hide_title - h2=title + h2=section_title - (blocks - vertical_slides).each do |block| =block.convert - vertical_slides.each do |subsection| @@ -87,5 +87,5 @@ data-state=(attr 'state')) - unless hide_title - h2=title + h2=section_title =content.chomp diff --git a/test/doctest/level-sectnums.html b/test/doctest/level-sectnums.html new file mode 100644 index 00000000..0b959ca1 --- /dev/null +++ b/test/doctest/level-sectnums.html @@ -0,0 +1,32 @@ + +
+
+

Sectnums

+
+
+

1. First level

+
+

First content

+
+
+
+
+

2. Vertical

+
+

Vertical slides are using level 2 sections

+
+
+
+

2.1. Level 2

+

Level 3 does not have sectnum, sectnumlevels is 2

+
+
+
+
+

3. Horizontal slide

+
+
+

3.1. Also supports levels

+
+
+
diff --git a/test/doctest/outline.html b/test/doctest/outline.html index a9b829f3..095fe057 100644 --- a/test/doctest/outline.html +++ b/test/doctest/outline.html @@ -31,27 +31,27 @@

Section 2

-

Section 1

+

1. Section 1

Unnumbered Section

-

Section 2

+

2. Section 2

-

Section 2.1

+

2.1. Section 2.1

-

Section 3

+

3. Section 3

-

Section 1

+

1. Section 1

Section 1.1

@@ -59,5 +59,5 @@

Section 1.1.1

-

Section 2

+

2. Section 2

diff --git a/test/doctest/section.html b/test/doctest/section.html index ea693161..f9e182a8 100644 --- a/test/doctest/section.html +++ b/test/doctest/section.html @@ -60,32 +60,32 @@

Linked title with anchor

-

Introduction to Asciidoctor

+

1. Introduction to Asciidoctor

-

Quick Starts

+

2. Quick Starts

-

Usage

+

2.1. Usage

Using the Command Line Interface

Processing Your Content

-

Syntax

+

2.2. Syntax

-

Terms and Concepts

+

3. Terms and Concepts

-

Introduction to Asciidoctor

+

1. Introduction to Asciidoctor

-

Quick Starts

+

2. Quick Starts

Usage

@@ -96,7 +96,7 @@

Syntax

-

Terms and Concepts

+

3. Terms and Concepts