From 1bc9c78f5c59a040a706ae02251edf7526f16747 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Thu, 1 Feb 2018 07:06:36 +0000 Subject: [PATCH] Move code to emphesize keywords from LaTeX to markdown. --- Makefile | 3 +-- fixup.rb | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b4ad427..eedec4b 100644 --- a/Makefile +++ b/Makefile @@ -95,8 +95,7 @@ epub: $(SOURCE).epub 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/^\s*(Revenue model|Interview date|Interviewees?|(Modelo de ingresos|Fecha de la entrevista|Entrevistad(?:o|a|os|as)))/\\textbf{$$1}/;' $@ + s/(Web links?|Vínculos Web)/\\section*{$$1}/;' $@ XMLLINTOPTS = --nonet --noout --xinclude --postvalid lint: $(SOURCE).xml diff --git a/fixup.rb b/fixup.rb index 211bd26..17bf82b 100644 --- a/fixup.rb +++ b/fixup.rb @@ -295,5 +295,8 @@ data.each_with_index do |lin, idx| end end +log 0, 'emphesize keywords' +data.map {|lin| lin.gsub!(/^(>\s*)(Revenue model|Interview date|Interviewees?):/, '\\1**\\2**:')} + log 0, 'Writing processed file' File.open(dstfile, 'w') {|f| f.puts data.join("\n")} -- 2.47.2