]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Move foreword/introduction editing from LaTeX to DocBook XML step.
authorPetter Reinholdtsen <pere@hungry.com>
Fri, 9 Feb 2018 07:47:55 +0000 (07:47 +0000)
committerPetter Reinholdtsen <pere@hungry.com>
Thu, 22 Feb 2018 18:12:09 +0000 (18:12 +0000)
Makefile
extra/pdf.xsl
fixup-docbook.rb

index 2b831f546c3294b2c4fdfe77ad2b0756da7df167..683c4d750730593d338fd1768f01a57ea9e07553 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -104,7 +104,6 @@ DBLATEX_OPTS = -T simple -t tex -b xetex -p extra/pdf.xsl
        perl -p -i -e 's/\\caption\\end/\\caption{} \\end/; \
                s/ / /g; \
                s/\\chapter\{(Colophon|Dedication)\}/\\chapter*{}/; \
        perl -p -i -e 's/\\caption\\end/\\caption{} \\end/; \
                s/ / /g; \
                s/\\chapter\{(Colophon|Dedication)\}/\\chapter*{}/; \
-               s/\\chapter\{(Foreword|Prefacio|Forord|Introduction|Introducción|Introduksjon)\}/\\chapter*{$$1} \\addcontentsline{toc}{chapter}{$$1}/; \
                s/\\section\{(Notes|Notas)\}/\\section*{$$1}/; \
                s/(Web links?|Vínculos Web)/\\section*{$$1}/;' $@
 
                s/\\section\{(Notes|Notas)\}/\\section*{$$1}/; \
                s/(Web links?|Vínculos Web)/\\section*{$$1}/;' $@
 
index 1192e51b9d183449922bc01a70825751db19f00f..a65f22cd0a0d38521b830cdbad8dc41f7ddb5e94 100644 (file)
@@ -17,6 +17,8 @@
 
   <xsl:param name="latex.encoding">utf8</xsl:param>
 
 
   <xsl:param name="latex.encoding">utf8</xsl:param>
 
+  <xsl:param name="preface.tocdepth">1</xsl:param>
+
   <!-- do not list figures -->
   <xsl:param name="doc.lot.show">example</xsl:param>
 
   <!-- do not list figures -->
   <xsl:param name="doc.lot.show">example</xsl:param>
 
index e26abe503279eedc9892cf02472f0766a0d3d8a5..771df4b8853c8f7022bbece5621eb350f9e12a3b 100755 (executable)
@@ -51,8 +51,8 @@ end
 log 0, 'change parts to colophon, dedication and chapter'
 partreplace(xml, 'colophon', 'colophon')
 partreplace(xml, 'dedication', 'dedication')
 log 0, 'change parts to colophon, dedication and chapter'
 partreplace(xml, 'colophon', 'colophon')
 partreplace(xml, 'dedication', 'dedication')
-partreplace(xml, 'foreword', 'chapter')
-partreplace(xml, 'introduction', 'chapter')
+partreplace(xml, 'foreword', 'preface')
+partreplace(xml, 'introduction', 'preface')
 partreplace(xml, 'bibliography', 'chapter')
 partreplace(xml, 'acknowledgments', 'chapter')
 
 partreplace(xml, 'bibliography', 'chapter')
 partreplace(xml, 'acknowledgments', 'chapter')