From 533b56c9a39e6a21ca58bc26a250380c679c8b36 Mon Sep 17 00:00:00 2001 From: Kenshi Muto Date: Thu, 1 Sep 2016 09:43:28 +0900 Subject: [PATCH] check makeindex flag and introduce 2 hooks --- lib/review/pdfmaker.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/review/pdfmaker.rb b/lib/review/pdfmaker.rb index d862ad0f3..ae0edaae0 100644 --- a/lib/review/pdfmaker.rb +++ b/lib/review/pdfmaker.rb @@ -215,10 +215,14 @@ def generate_pdf(yamlfile) system_or_raise("#{texcommand} #{texoptions} book.tex") end - if File.exist?("book.idx") + call_hook("hook_beforemakeindex") + + if @config["makeindex"] && File.exist?("book.idx") system_or_raise("#{makeindex_command} #{makeindex_options} book") end + call_hook("hook_aftermakeindex") + system_or_raise("#{texcommand} #{texoptions} book.tex") call_hook("hook_aftertexcompile")