From 67f72c32ceb262ad4f10b0573f49144002fae0f1 Mon Sep 17 00:00:00 2001 From: Kenshi Muto Date: Mon, 5 Nov 2018 00:09:16 +0900 Subject: [PATCH] add part flag for future use --- lib/review/pdfmaker.rb | 1 + templates/latex/config.erb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/review/pdfmaker.rb b/lib/review/pdfmaker.rb index a9b50f925..71b8c8fde 100644 --- a/lib/review/pdfmaker.rb +++ b/lib/review/pdfmaker.rb @@ -164,6 +164,7 @@ def make_input_files(book, yamlfile) input_files = Hash.new { |h, key| h[key] = '' } book.parts.each do |part| if part.name.present? + @config['use_part'] = true if part.file? output_chaps(part.name, yamlfile) input_files['CHAPS'] << %Q(\\input{#{part.name}.tex}\n) diff --git a/templates/latex/config.erb b/templates/latex/config.erb index 9b02b02c3..fa750ec66 100644 --- a/templates/latex/config.erb +++ b/templates/latex/config.erb @@ -94,5 +94,8 @@ \def\reviewchapterfiles{<%= @input_files['CHAPS'] %>} \def\reviewappendixfiles{<%= @input_files['APPENDIX'] %>} \def\reviewpostdeffiles{<%= @input_files['POSTDEF'] %>} +<%- if @config['use_part'] -%> +\def\reviewusepart{true} +<%- end -%> \makeatother