Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/review/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def self.values
"bib_file" => "bib.re",
"colophon_order" => %w(aut csl trl dsr ill cov edt pbl contact prt),
"externallink" => true,
"otf" => true, # for LaTeX
"tableopt" => nil, # for IDGXML
"listinfo" => nil, # for IDGXML
"nolf" => true, # for IDGXML
Expand Down
6 changes: 4 additions & 2 deletions templates/latex/layout.tex.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
\documentclass[<%= @documentclassoption %>]{<%= @documentclass %>}
<%- if @texcompiler == "uplatex" -%>
<%- if @config["otf"] -%>
<%- if @texcompiler == "uplatex" -%>
\usepackage[deluxe,uplatex]{otf}
<%- else -%>
<%- else -%>
\usepackage[deluxe]{otf}
<%- end -%>
<%- end -%>
\usepackage[dvipdfmx]{color}
\usepackage[dvipdfmx]{graphicx}
Expand Down
10 changes: 10 additions & 0 deletions test/test_pdfmaker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ def test_gettemplate_with_backmatter
end
end

def test_gettemplate_disable_otf
@config["otf"] = false
Dir.mktmpdir do |dir|
@maker.basedir = Dir.pwd
tmpl = @maker.get_template
matched = (tmpl =~ /usepackage[^{]+\{otf\}/)
assert_equal(nil, matched)
end
end

def test_colophon_history
@config["aut"] = ["Mr.Smith"]
@config["pbl"] = ["BLUEPRINT"]
Expand Down