From baed6507d8f1916d9c830035c5e1c20d9625c52a Mon Sep 17 00:00:00 2001 From: Kenshi Muto Date: Tue, 16 Oct 2018 10:07:01 +0900 Subject: [PATCH 1/2] fix review2 texdocumentclass compatibility logic --- lib/review/configure.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/review/configure.rb b/lib/review/configure.rb index ada9939be..c7f5d7c49 100644 --- a/lib/review/configure.rb +++ b/lib/review/configure.rb @@ -77,7 +77,7 @@ def self.values 'footnotetext' => nil, 'texcommand' => 'uplatex', 'texoptions' => '-interaction=nonstopmode -file-line-error', - 'texdocumentclass' => ['review-jsbook', ''], + '_texdocumentclass' => ['review-jsbook', ''], 'dvicommand' => 'dvipdfmx', 'dvioptions' => '-d 5 -z 9', # for PDFMaker From 793cfe114331e8e3d61e6fcad6f16408531019de Mon Sep 17 00:00:00 2001 From: Kenshi Muto Date: Tue, 16 Oct 2018 10:23:45 +0900 Subject: [PATCH 2/2] backward compatibility for cover option --- lib/review/pdfmaker.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/review/pdfmaker.rb b/lib/review/pdfmaker.rb index 00ae68813..a9b50f925 100644 --- a/lib/review/pdfmaker.rb +++ b/lib/review/pdfmaker.rb @@ -429,6 +429,15 @@ def erb_config 'keepaspectratio' end + if @config.check_version('2', exception: false) + @coverimageoption = + if @documentclass == 'ubook' || @documentclass == 'utbook' + 'width=\\textheight,height=\\textwidth,keepaspectratio,angle=90' + else + 'width=\\textwidth,height=\\textheight,keepaspectratio' + end + end + @locale_latex = {} part_tuple = I18n.get('part').split(/\%[A-Za-z]{1,3}/, 2) chapter_tuple = I18n.get('chapter').split(/\%[A-Za-z]{1,3}/, 2)