From 02230bf44a1eb58e9497097f146c55469a4ff930 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 2 Nov 2024 09:43:50 +0000 Subject: [PATCH] Fix simplesect titles --- src/main/xslt/modules/templates.xml | 50 +++++++++++++++++++ src/test/resources/expected/section.005.html | 2 +- .../resources/expected/simplesect.001.html | 2 +- src/test/resources/expected/titles.001.html | 2 +- 4 files changed, 53 insertions(+), 3 deletions(-) diff --git a/src/main/xslt/modules/templates.xml b/src/main/xslt/modules/templates.xml index 5ec50f7aa..37ef0670b 100644 --- a/src/main/xslt/modules/templates.xml +++ b/src/main/xslt/modules/templates.xml @@ -451,6 +451,56 @@ + + +
+ +
+
+ +
+
+
+
+ + +
+ +

+
+ +
+
+
+
+ + +
+ +

+
+ +

+
+
+
+ + +
+ +

+
+ +

+
+
+
+
diff --git a/src/test/resources/expected/section.005.html b/src/test/resources/expected/section.005.html index afa14453b..7fefa4873 100644 --- a/src/test/resources/expected/section.005.html +++ b/src/test/resources/expected/section.005.html @@ -1 +1 @@ -Unit Test: section.005

Unit Test: section.005

Deeply nested sections with subtitles

Michael Smith

1Section 1

Subtitle

blah.

1.1Section 1.1

Subtitle

blah.

1.1.1Section 1.1.1

Subtitle

blah.

1.1.1.1Section 1.1.1.1
Subtitle

blah.

1.1.1.1.1Section 1.1.1.1.1
Subtitle

blah.

1.1.1.1.2Section 1.1.1.1.2
Subtitle

blah.

1.1.1.1.2.1Section 1.1.1.1.2.1
Subtitle

blah.

1.1.1.1.3Section 1.1.1.1.3
Subtitle

blah.

Section 1.1.1.1.3.1

blah.

1.1.1.2Section 1.1.1.2
Subtitle

blah.

1.1.1.3Section 1.1.1.3
Subtitle

blah.

1.1.2Section 1.1.2

Subtitle

blah.

1.1.3Section 1.1.3

Subtitle

blah.

1.2Section 1.2

Subtitle

blah.

1.3Section 1.3

Subtitle

blah.

\ No newline at end of file +Unit Test: section.005

Unit Test: section.005

Deeply nested sections with subtitles

Michael Smith

1Section 1

Subtitle

blah.

1.1Section 1.1

Subtitle

blah.

1.1.1Section 1.1.1

Subtitle

blah.

1.1.1.1Section 1.1.1.1
Subtitle

blah.

1.1.1.1.1Section 1.1.1.1.1
Subtitle

blah.

1.1.1.1.2Section 1.1.1.1.2
Subtitle

blah.

1.1.1.1.2.1Section 1.1.1.1.2.1
Subtitle

blah.

1.1.1.1.3Section 1.1.1.1.3
Subtitle

blah.

Section 1.1.1.1.3.1
Subtitle

blah.

1.1.1.2Section 1.1.1.2
Subtitle

blah.

1.1.1.3Section 1.1.1.3
Subtitle

blah.

1.1.2Section 1.1.2

Subtitle

blah.

1.1.3Section 1.1.3

Subtitle

blah.

1.2Section 1.2

Subtitle

blah.

1.3Section 1.3

Subtitle

blah.

\ No newline at end of file diff --git a/src/test/resources/expected/simplesect.001.html b/src/test/resources/expected/simplesect.001.html index 1680ba341..12cd19949 100644 --- a/src/test/resources/expected/simplesect.001.html +++ b/src/test/resources/expected/simplesect.001.html @@ -1 +1 @@ -Chapter 1. Chapter wrapper

Chapter 1Chapter wrapper

This test case is for simplesect.

1A Section Title

Some content here.

First Simplesect

Some content

2Another Section Title

Some content

2.1A Subsection Title

Some content

Second Simplesect

Some content

\ No newline at end of file +Chapter 1. Chapter wrapper

Chapter 1Chapter wrapper

This test case is for simplesect.

1A Section Title

Some content here.

First Simplesect

Some content

2Another Section Title

Some content

2.1A Subsection Title

Some content

Second Simplesect

Subtitle

Some content

\ No newline at end of file diff --git a/src/test/resources/expected/titles.001.html b/src/test/resources/expected/titles.001.html index e577e6fab..129fa85c2 100644 --- a/src/test/resources/expected/titles.001.html +++ b/src/test/resources/expected/titles.001.html @@ -1,4 +1,4 @@ -Unit Test: titles.001.xml

Unit Test: titles.001.xml

The Dedication

book: Unit Test: titles.001.xml

abstract: An abstract

dedication: The Dedication

preface: Preface

preface-section: the section called First Section

simplesect: the section called “A simplesect”

part: Part I, “The Main Part”

partintro: The part intro

ch1: Chapter 1, One link

sidebar: A sidebar

blockquote: A Blockquote

fig: Figure 1.1, “Figure”

ex: Example 1.1, “Example”

table: Table 1.1, “Table”

eq: Equation 1.1, “Equation”

procedure: Procedure 1.1, “Procedure”

step2: step 2

step3: step 3

subsubstep: step 2.a.i

screenshot: screenshot

formal: 1.2Formal group

subfig2: Figure 1.2.2, “Second subfigure”

ch2: Chapter 2, Two1

ch2.1: Section 1, “One”

ch2.1.1: Section 1.1, “One Dot One”

ch2.1.2: Section 1.2, “One Dot Two”

ch3: Chapter 3, Three

chlists: Chapter 4, Lists chapter

itemizedlist: An itemized list

orderedlist: An ordered list

o1: 1

o1.1: 1.a

variablelist: A variable list

vli: Term

first:

note: Note

tip: Tip

important: Important

caution: Caution

warning: Warning

danger: Danger

set1: First production set

ebnf.mult: MultExpression

set2: Arithemetic Expressions

ebnf.expression: Expression

ebnf.arith: ArithExpression

ebnf.number: Number

div0: Division by Zero

qandaset: QandAset

qandadiv: QandAdiv

qandaentry: Q: 1.1

question: Q: 1.1

answer: A: 1.1

app: Appendix A, Appendix

app2: Appendix B, Appendix Two

bibliolist: bibliolist

bibliomixed: bibliomixed

glosslist: Gloss list

bibliography: Bibliography

bibliodiv: Bibliography division

bibliomixed2: bibliomixed2

glossary: Glossary

glossdiv: Glossary division

index: Index

acknowledgements: Acknowledgements

colophon: Colophon

Preface

First Section

See Figure 1.1, “Figure”.

See Example 1.1, “Example”.

See Table 1.1, “Table”.

See Equation 1.1, “Equation”.

A simplesect

Part IThe Main Part

The part intro

Chapter 1One link

A Blockquote

A Formal Paragraph

Figure 1.1Figure

Example 1.1Example
Table 1.1Table
13
24
xn +Unit Test: titles.001.xml

Unit Test: titles.001.xml

The Dedication

book: Unit Test: titles.001.xml

abstract: An abstract

dedication: The Dedication

preface: Preface

preface-section: the section called First Section

simplesect: the section called “A simplesect”

part: Part I, “The Main Part”

partintro: The part intro

ch1: Chapter 1, One link

sidebar: A sidebar

blockquote: A Blockquote

fig: Figure 1.1, “Figure”

ex: Example 1.1, “Example”

table: Table 1.1, “Table”

eq: Equation 1.1, “Equation”

procedure: Procedure 1.1, “Procedure”

step2: step 2

step3: step 3

subsubstep: step 2.a.i

screenshot: screenshot

formal: 1.2Formal group

subfig2: Figure 1.2.2, “Second subfigure”

ch2: Chapter 2, Two1

ch2.1: Section 1, “One”

ch2.1.1: Section 1.1, “One Dot One”

ch2.1.2: Section 1.2, “One Dot Two”

ch3: Chapter 3, Three

chlists: Chapter 4, Lists chapter

itemizedlist: An itemized list

orderedlist: An ordered list

o1: 1

o1.1: 1.a

variablelist: A variable list

vli: Term

first:

note: Note

tip: Tip

important: Important

caution: Caution

warning: Warning

danger: Danger

set1: First production set

ebnf.mult: MultExpression

set2: Arithemetic Expressions

ebnf.expression: Expression

ebnf.arith: ArithExpression

ebnf.number: Number

div0: Division by Zero

qandaset: QandAset

qandadiv: QandAdiv

qandaentry: Q: 1.1

question: Q: 1.1

answer: A: 1.1

app: Appendix A, Appendix

app2: Appendix B, Appendix Two

bibliolist: bibliolist

bibliomixed: bibliomixed

glosslist: Gloss list

bibliography: Bibliography

bibliodiv: Bibliography division

bibliomixed2: bibliomixed2

glossary: Glossary

glossdiv: Glossary division

index: Index

acknowledgements: Acknowledgements

colophon: Colophon

Preface

First Section

See Figure 1.1, “Figure”.

See Example 1.1, “Example”.

See Table 1.1, “Table”.

See Equation 1.1, “Equation”.

A simplesect

Part IThe Main Part

The part intro

Chapter 1One link

A Blockquote

A Formal Paragraph

Figure 1.1Figure

Example 1.1Example
Table 1.1Table
13
24
xn + yn ≠ zn ∀ n ≠ 2
Equation 1.1Equation
Procedure 1.1Procedure
  1. First

  2. Second

    1. Substep

      1. Sub-substep