From e09bb5e46a14d670464ede5ad39d348bd89c053f Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Sat, 12 Oct 2024 11:11:26 +0300 Subject: [PATCH 01/19] Add part TOC generation --- src/generator/com/elovirta/pdf/basic-settings.xsl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/generator/com/elovirta/pdf/basic-settings.xsl b/src/generator/com/elovirta/pdf/basic-settings.xsl index b56d2ba..6f2e78f 100644 --- a/src/generator/com/elovirta/pdf/basic-settings.xsl +++ b/src/generator/com/elovirta/pdf/basic-settings.xsl @@ -68,6 +68,9 @@ + + + From 548712b0ea99ab810fabb1d5ce26b3b89ac9d9bc Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Sat, 12 Oct 2024 13:02:24 +0300 Subject: [PATCH 02/19] Add custom part TOC --- src/generator/com/elovirta/pdf/commons.xsl | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/generator/com/elovirta/pdf/commons.xsl b/src/generator/com/elovirta/pdf/commons.xsl index a647444..8e29daf 100644 --- a/src/generator/com/elovirta/pdf/commons.xsl +++ b/src/generator/com/elovirta/pdf/commons.xsl @@ -151,6 +151,41 @@ + + + + + + + + + + + + + + + + + + From 72cb409267545ae9f031b7bc7c29a84e528bda8a Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Sat, 12 Oct 2024 21:21:26 +0300 Subject: [PATCH 03/19] Add part TOC --- src/generator/com/elovirta/pdf/commons.xsl | 2 +- src/generator/com/elovirta/pdf/toc.xsl | 109 +++++++++++++++++++++ src/generator/com/elovirta/pdf/utils.xsl | 4 +- 3 files changed, 113 insertions(+), 2 deletions(-) diff --git a/src/generator/com/elovirta/pdf/commons.xsl b/src/generator/com/elovirta/pdf/commons.xsl index 8e29daf..d78bb32 100644 --- a/src/generator/com/elovirta/pdf/commons.xsl +++ b/src/generator/com/elovirta/pdf/commons.xsl @@ -170,7 +170,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -175,6 +251,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/generator/com/elovirta/pdf/utils.xsl b/src/generator/com/elovirta/pdf/utils.xsl index 3fb625e..38eb1d4 100644 --- a/src/generator/com/elovirta/pdf/utils.xsl +++ b/src/generator/com/elovirta/pdf/utils.xsl @@ -337,6 +337,7 @@ + xs e dita-ot ditaarch opentopic opentopic-func From 77de20bc80d7fad693a8e26a600291bcd3a2f1ce Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Sun, 13 Oct 2024 11:54:57 +0300 Subject: [PATCH 04/19] Adjust TOC part indentation --- src/generator/com/elovirta/pdf/toc.xsl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/generator/com/elovirta/pdf/toc.xsl b/src/generator/com/elovirta/pdf/toc.xsl index c450a3e..853203f 100644 --- a/src/generator/com/elovirta/pdf/toc.xsl +++ b/src/generator/com/elovirta/pdf/toc.xsl @@ -220,8 +220,15 @@ - + + + + + + + + @@ -290,6 +297,13 @@ + + + + + + + From c7522faa2f5369161894ad4b3d9fb55d5eec59c2 Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Sun, 13 Oct 2024 16:37:41 +0300 Subject: [PATCH 05/19] Add prefix to Part numbering --- src/generator/com/elovirta/pdf/topic.xsl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/generator/com/elovirta/pdf/topic.xsl b/src/generator/com/elovirta/pdf/topic.xsl index 4367496..586cd1c 100644 --- a/src/generator/com/elovirta/pdf/topic.xsl +++ b/src/generator/com/elovirta/pdf/topic.xsl @@ -63,6 +63,26 @@ level="multiple" format="A.1.1"/> + + + + + + + + + + + + + + + + + + Date: Tue, 15 Oct 2024 21:40:12 +0300 Subject: [PATCH 06/19] Add support for styling part title --- src/generator/com/elovirta/pdf/commons.xsl | 58 ++++++++++++++++++++++ src/generator/com/elovirta/pdf/toc.xsl | 2 +- src/generator/com/elovirta/pdf/topic.xsl | 5 ++ 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/src/generator/com/elovirta/pdf/commons.xsl b/src/generator/com/elovirta/pdf/commons.xsl index d78bb32..0333636 100644 --- a/src/generator/com/elovirta/pdf/commons.xsl +++ b/src/generator/com/elovirta/pdf/commons.xsl @@ -186,6 +186,64 @@ --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/generator/com/elovirta/pdf/toc.xsl b/src/generator/com/elovirta/pdf/toc.xsl index 853203f..c678ee3 100644 --- a/src/generator/com/elovirta/pdf/toc.xsl +++ b/src/generator/com/elovirta/pdf/toc.xsl @@ -225,7 +225,7 @@ - + diff --git a/src/generator/com/elovirta/pdf/topic.xsl b/src/generator/com/elovirta/pdf/topic.xsl index 586cd1c..ddda1aa 100644 --- a/src/generator/com/elovirta/pdf/topic.xsl +++ b/src/generator/com/elovirta/pdf/topic.xsl @@ -323,6 +323,11 @@ + + + + + From f04a39677b80a16df1a252cec07a1446ef2a817b Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Fri, 18 Oct 2024 10:28:36 +0300 Subject: [PATCH 07/19] Add chapter TOC --- src/generator/com/elovirta/pdf/commons.xsl | 120 ++++++++++++++--- src/generator/com/elovirta/pdf/toc.xsl | 147 +++++++++++++++++++-- 2 files changed, 232 insertions(+), 35 deletions(-) diff --git a/src/generator/com/elovirta/pdf/commons.xsl b/src/generator/com/elovirta/pdf/commons.xsl index 0333636..fe9da43 100644 --- a/src/generator/com/elovirta/pdf/commons.xsl +++ b/src/generator/com/elovirta/pdf/commons.xsl @@ -152,7 +152,66 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + select="key('map-id', ancestor-or-self::*[contains(@class, ' topic/topic ')][1]/@id)[1]" + as="element()?"/> @@ -208,10 +271,10 @@ - + - + @@ -221,29 +284,42 @@ - - - + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/src/generator/com/elovirta/pdf/toc.xsl b/src/generator/com/elovirta/pdf/toc.xsl index c678ee3..d1a52e0 100644 --- a/src/generator/com/elovirta/pdf/toc.xsl +++ b/src/generator/com/elovirta/pdf/toc.xsl @@ -124,6 +124,8 @@ + + @@ -200,6 +202,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -224,27 +305,32 @@ - + - + + + + + + - + - + - + @@ -262,24 +348,59 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 6df4c04efb70c0cb1fe150e637a6e54e6fea753c Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Fri, 18 Oct 2024 16:28:35 +0300 Subject: [PATCH 08/19] Add function to get title number --- src/generator/com/elovirta/pdf/links.xsl | 5 +---- src/generator/com/elovirta/pdf/topic.xsl | 16 ++++++++-------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/generator/com/elovirta/pdf/links.xsl b/src/generator/com/elovirta/pdf/links.xsl index 5755fd6..97eedad 100644 --- a/src/generator/com/elovirta/pdf/links.xsl +++ b/src/generator/com/elovirta/pdf/links.xsl @@ -138,10 +138,7 @@ - - - - + diff --git a/src/generator/com/elovirta/pdf/topic.xsl b/src/generator/com/elovirta/pdf/topic.xsl index ddda1aa..8f40c43 100644 --- a/src/generator/com/elovirta/pdf/topic.xsl +++ b/src/generator/com/elovirta/pdf/topic.xsl @@ -35,11 +35,7 @@ - - - - - + @@ -50,6 +46,12 @@ + + + + + + @@ -119,9 +121,7 @@ - - - + From 2a966d6fccbb06410e9d4e580c7e6e7ee8454027 Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Sat, 19 Oct 2024 19:00:58 +0300 Subject: [PATCH 09/19] Fix numbering chapters inside parts --- src/generator/com/elovirta/pdf/commons.xsl | 75 +++++++++++++--------- src/generator/com/elovirta/pdf/toc.xsl | 11 ++++ src/generator/com/elovirta/pdf/topic.xsl | 38 ++++++++++- 3 files changed, 92 insertions(+), 32 deletions(-) diff --git a/src/generator/com/elovirta/pdf/commons.xsl b/src/generator/com/elovirta/pdf/commons.xsl index fe9da43..679ab75 100644 --- a/src/generator/com/elovirta/pdf/commons.xsl +++ b/src/generator/com/elovirta/pdf/commons.xsl @@ -187,18 +187,23 @@ - - - + + + - + + + + + @@ -211,8 +216,10 @@ - + + - + - + @@ -285,40 +294,46 @@ - - + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/src/generator/com/elovirta/pdf/toc.xsl b/src/generator/com/elovirta/pdf/toc.xsl index d1a52e0..34cd4a5 100644 --- a/src/generator/com/elovirta/pdf/toc.xsl +++ b/src/generator/com/elovirta/pdf/toc.xsl @@ -495,6 +495,17 @@ + + + + + + + + + + + diff --git a/src/generator/com/elovirta/pdf/topic.xsl b/src/generator/com/elovirta/pdf/topic.xsl index 8f40c43..eed6943 100644 --- a/src/generator/com/elovirta/pdf/topic.xsl +++ b/src/generator/com/elovirta/pdf/topic.xsl @@ -5,6 +5,7 @@ xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:map="http://www.w3.org/2005/xpath-functions/map" xmlns:array="http://www.w3.org/2005/xpath-functions/array" + xmlns:opentopic="http://www.idiominc.com/opentopic" exclude-result-prefixes="xs axsl map array"> @@ -46,10 +47,43 @@ + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + From 90d8a48c5de2092d4997ed87e835a5cc84ab80f9 Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Sun, 20 Oct 2024 11:46:05 +0300 Subject: [PATCH 10/19] Add part and chapter TOC max depth --- src/generator/com/elovirta/pdf/toc.xsl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/generator/com/elovirta/pdf/toc.xsl b/src/generator/com/elovirta/pdf/toc.xsl index 34cd4a5..6547f20 100644 --- a/src/generator/com/elovirta/pdf/toc.xsl +++ b/src/generator/com/elovirta/pdf/toc.xsl @@ -126,6 +126,8 @@ + + @@ -138,7 +140,7 @@ - + @@ -217,7 +221,7 @@ - + - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - + + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -107,9 +118,18 @@ - + + + + + + + + From ae4fee08fb1a61f314bea5d8029eea4bfdce5b71 Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Mon, 21 Oct 2024 21:18:01 +0300 Subject: [PATCH 12/19] Fix shortdesc, abstract, and body in part and chapter --- src/generator/com/elovirta/pdf/commons.xsl | 38 ++++++++++++++-------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/src/generator/com/elovirta/pdf/commons.xsl b/src/generator/com/elovirta/pdf/commons.xsl index 679ab75..4e43b4f 100644 --- a/src/generator/com/elovirta/pdf/commons.xsl +++ b/src/generator/com/elovirta/pdf/commons.xsl @@ -187,21 +187,29 @@ - + + + + + + + + + + - + - + - + @@ -296,18 +304,22 @@ - + - + - + + + + + + From 2fa4185c0e400034f0dcbce0342994ff44e8aaed Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Mon, 21 Oct 2024 21:45:29 +0300 Subject: [PATCH 13/19] Add support for task labels --- src/generator/com/elovirta/pdf/shell.xsl | 1 + src/generator/com/elovirta/pdf/task-elements.xsl | 3 +++ .../java/com/elovirta/pdf/ant/StylesheetGeneratorTask.java | 1 + 3 files changed, 5 insertions(+) diff --git a/src/generator/com/elovirta/pdf/shell.xsl b/src/generator/com/elovirta/pdf/shell.xsl index c4655c8..dba3c5b 100644 --- a/src/generator/com/elovirta/pdf/shell.xsl +++ b/src/generator/com/elovirta/pdf/shell.xsl @@ -166,6 +166,7 @@ + diff --git a/src/generator/com/elovirta/pdf/task-elements.xsl b/src/generator/com/elovirta/pdf/task-elements.xsl index 2be48d9..ad8cd89 100644 --- a/src/generator/com/elovirta/pdf/task-elements.xsl +++ b/src/generator/com/elovirta/pdf/task-elements.xsl @@ -14,6 +14,9 @@ + + + diff --git a/src/main/java/com/elovirta/pdf/ant/StylesheetGeneratorTask.java b/src/main/java/com/elovirta/pdf/ant/StylesheetGeneratorTask.java index fd11977..609f343 100644 --- a/src/main/java/com/elovirta/pdf/ant/StylesheetGeneratorTask.java +++ b/src/main/java/com/elovirta/pdf/ant/StylesheetGeneratorTask.java @@ -80,6 +80,7 @@ public void execute() throws BuildException { generate(xdmItem, "static-content.xsl", "xsl/fo/static-content.xsl", null); // generate(xdmItem, "task-elements.xsl", "xsl/fo/task-elements.xsl", null); generate(xdmItem, "topic.xsl", "xsl/fo/topic.xsl", null); + generate(xdmItem, "task-elements.xsl", "xsl/fo/task-elements.xsl", null); generate(xdmItem, "layout-masters.xsl", "cfg/fo/layout-masters.xsl", null); generate(xdmItem, "front-matter.xsl", "cfg/fo/attrs/front-matter-attr.xsl", ATTR); generate(xdmItem, "commons.xsl", "cfg/fo/attrs/commons-attr.xsl", ATTR); From 45234c1f0472ce1bad723993c355717b2d95d14b Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Tue, 22 Oct 2024 16:10:48 +0300 Subject: [PATCH 14/19] Add related links to chapter and part pages --- src/generator/com/elovirta/pdf/commons.xsl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/generator/com/elovirta/pdf/commons.xsl b/src/generator/com/elovirta/pdf/commons.xsl index 4e43b4f..9648d99 100644 --- a/src/generator/com/elovirta/pdf/commons.xsl +++ b/src/generator/com/elovirta/pdf/commons.xsl @@ -199,7 +199,12 @@ - + + + + @@ -320,7 +325,12 @@ - + + + + From 11359123d116ecd0045d51eaac63b5f9020604d6 Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Sun, 27 Oct 2024 09:41:14 +0200 Subject: [PATCH 15/19] Fix part and chapter title --- src/generator/com/elovirta/pdf/commons.xsl | 196 ++++++++++++--------- src/generator/com/elovirta/pdf/toc.xsl | 28 +-- src/generator/com/elovirta/pdf/topic.xsl | 63 ++++--- 3 files changed, 174 insertions(+), 113 deletions(-) diff --git a/src/generator/com/elovirta/pdf/commons.xsl b/src/generator/com/elovirta/pdf/commons.xsl index 9648d99..6506262 100644 --- a/src/generator/com/elovirta/pdf/commons.xsl +++ b/src/generator/com/elovirta/pdf/commons.xsl @@ -39,85 +39,86 @@ - - - - - - - + + + + + + + - - - - - - - - - - + + + + + + + + + + - - + + - - - - - - - - - - + + + + + + + + + + - - + + - - - - - - - - - - + + + + + +   + + + + - - + + - - - - - - - - - - + + + + + + + + + + - - + + - - - + + + - - + + - - - + + + - - - + + + + @@ -174,17 +175,33 @@ - - - + + + - + + + + - - - + + + + + + + + + + + + + + + + @@ -292,17 +309,30 @@ - - - + + + - + + + + - - - + + + + + + + + + + + + + @@ -356,6 +386,12 @@ + + + + + + diff --git a/src/generator/com/elovirta/pdf/toc.xsl b/src/generator/com/elovirta/pdf/toc.xsl index 6547f20..9714f2e 100644 --- a/src/generator/com/elovirta/pdf/toc.xsl +++ b/src/generator/com/elovirta/pdf/toc.xsl @@ -110,19 +110,21 @@ - - - - - - - - - - - - - + diff --git a/src/generator/com/elovirta/pdf/topic.xsl b/src/generator/com/elovirta/pdf/topic.xsl index 576c6ae..435b6c5 100644 --- a/src/generator/com/elovirta/pdf/topic.xsl +++ b/src/generator/com/elovirta/pdf/topic.xsl @@ -34,18 +34,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -113,11 +113,11 @@ - - - - - + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + From 6a9af1f49c64505a2061c1c76a2362fa35400844 Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Sun, 27 Oct 2024 10:04:55 +0200 Subject: [PATCH 16/19] Fix chapter and part toc prefix --- src/generator/com/elovirta/pdf/toc.xsl | 38 ++++++++++++++++++++---- src/generator/com/elovirta/pdf/topic.xsl | 16 +++++----- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/src/generator/com/elovirta/pdf/toc.xsl b/src/generator/com/elovirta/pdf/toc.xsl index 9714f2e..1e71024 100644 --- a/src/generator/com/elovirta/pdf/toc.xsl +++ b/src/generator/com/elovirta/pdf/toc.xsl @@ -108,23 +108,51 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + mode="tocPrefix" priority="10"> - + + - --> diff --git a/src/generator/com/elovirta/pdf/topic.xsl b/src/generator/com/elovirta/pdf/topic.xsl index 435b6c5..c2a3dbd 100644 --- a/src/generator/com/elovirta/pdf/topic.xsl +++ b/src/generator/com/elovirta/pdf/topic.xsl @@ -198,14 +198,14 @@ - - - - - - - - + + + + + + + + From 7160f074967c4be6816a97feb2f259c531eff08d Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Sun, 27 Oct 2024 20:52:39 +0200 Subject: [PATCH 17/19] Fix chapter and part layout --- src/generator/com/elovirta/pdf/toc.xsl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/generator/com/elovirta/pdf/toc.xsl b/src/generator/com/elovirta/pdf/toc.xsl index 1e71024..76e7098 100644 --- a/src/generator/com/elovirta/pdf/toc.xsl +++ b/src/generator/com/elovirta/pdf/toc.xsl @@ -69,6 +69,13 @@ + + + + + + + @@ -76,6 +83,13 @@ + + + + + + + @@ -457,6 +471,17 @@ + + inherit + + + + + + + + + inherit From 9ec24e3d9728ec6884bc3385c17245f37584982f Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Wed, 30 Oct 2024 14:32:56 +0200 Subject: [PATCH 18/19] Fix toc styling --- src/generator/com/elovirta/pdf/toc.xsl | 80 ++++++++++++++++---------- 1 file changed, 49 insertions(+), 31 deletions(-) diff --git a/src/generator/com/elovirta/pdf/toc.xsl b/src/generator/com/elovirta/pdf/toc.xsl index 76e7098..af4735a 100644 --- a/src/generator/com/elovirta/pdf/toc.xsl +++ b/src/generator/com/elovirta/pdf/toc.xsl @@ -466,20 +466,59 @@ - - - - - + + + + + + + + + + + + + + + inherit - - - - - + + + + + + + + + + + + + + + + + inherit + + + + + + + + + + + + + + + + + inherit @@ -513,27 +552,6 @@ - - - - - - - - - - - - - - - - - - - - - From 7f46ab16067e2537ab1bb20a12532f43d44256a6 Mon Sep 17 00:00:00 2001 From: Jarno Elovirta Date: Wed, 30 Oct 2024 15:30:57 +0200 Subject: [PATCH 19/19] Add support for appendix toc entry --- src/generator/com/elovirta/pdf/commons.xsl | 84 ++++++++++++++++++++++ src/generator/com/elovirta/pdf/toc.xsl | 10 ++- 2 files changed, 92 insertions(+), 2 deletions(-) diff --git a/src/generator/com/elovirta/pdf/commons.xsl b/src/generator/com/elovirta/pdf/commons.xsl index 6506262..af893d4 100644 --- a/src/generator/com/elovirta/pdf/commons.xsl +++ b/src/generator/com/elovirta/pdf/commons.xsl @@ -246,6 +246,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +