From 68ccb07650b719473f8d17db0f5ad067966be93e Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Fri, 9 Feb 2018 07:47:55 +0000 Subject: [PATCH] Move foreword/introduction editing from LaTeX to DocBook XML step. --- Makefile | 1 - extra/pdf.xsl | 2 ++ fixup-docbook.rb | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2b831f5..683c4d7 100644 --- 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*{}/; \ - 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}/;' $@ diff --git a/extra/pdf.xsl b/extra/pdf.xsl index 1192e51..a65f22c 100644 --- a/extra/pdf.xsl +++ b/extra/pdf.xsl @@ -17,6 +17,8 @@ utf8 + 1 + example diff --git a/fixup-docbook.rb b/fixup-docbook.rb index e26abe5..771df4b 100755 --- a/fixup-docbook.rb +++ b/fixup-docbook.rb @@ -51,8 +51,8 @@ end 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') -- 2.47.2