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}/;' $@
- perl -p -i -e '$$work=1 if /chapter.Arduino/; $$work=0 if /chapter.(Bibliography|Bibliografía)/; \
- next unless $$work; \
- s/(\\label\{[-\.\wáéíóúñ]+\}\\hyperlabel\{[-\.\wáéíóúñ]+\}%)/$$1\n\\begin{quote}/i; \
- s/(Profile written by.+|Perfil escrito por.+|Profilen skrevet av.+)/$$1\n\\end{quote}/' $@
XMLLINTOPTS = --nonet --noout --xinclude --postvalid
lint: $(SOURCE).xml
end
end
+log 0, 'Turn indented block after use cases into block quotes'
+inscope=false
+quote=false
+data.each_with_index do |lin, idx|
+ if quote
+ lin.sub!(/^/, "> ")
+ end
+ if lin =~ /^> Profile written by/
+ quote=false
+ end
+ # To this heading
+ if lin =~ /^## Bibliography/
+ inscope=false
+ end
+ # From this heading
+ if lin =~ /^## Arduino/
+ inscope=true
+ end
+ if inscope and lin =~ /^## /
+ quote=true
+ next
+ end
+end
+
log 0, 'Writing processed file'
File.open(dstfile, 'w') {|f| f.puts data.join("\n")}