bin/review-compile in review-1.1.0 vs bin/review-compile in review-1.2.0

- old
+ new

@@ -1,9 +1,10 @@ #!/usr/bin/env ruby # # $Id: review-compile 4326 2010-01-12 14:10:17Z kmuto $ # +# Copyright (c) 2008-2014 Kenshi Muto, Masayoshi Takahashi, KADO Masanori, Minero Aoki # Copyright (c) 1999-2007 Minero Aoki # # This program is free software. # You can distribute or modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. @@ -50,12 +51,10 @@ "nolf" => nil, # for IDGXML "chapref" => nil, # for IDGXML "structuredxml" => nil, # for IDGXML "inencoding" => "UTF-8", "outencoding" => "UTF-8", - "subdirmode" => nil, - "singledirmode" => nil, "stylesheet" => [], # for HTML "mathml" => nil, # for HTML "language" => "ja", # for HTML "deprecated-blocklines" => nil, "footnotetext" => false, @@ -77,22 +76,31 @@ parser.on('--nolfinxml', 'Do not insert LF in XML. (idgxml)') { param["nolf"] = true } parser.on('--structuredxml', 'Produce XML with structured sections. (idgxml)') { param["structuredxml"] = true } parser.on('--table=WIDTH', 'Default table width. (idgxml)') {|tbl| param["tableopt"] = tbl } parser.on('--listinfo', 'Append listinfo tag to lists to indicate begin/end. (idgxml)') { param["listinfo"] = true } parser.on('--chapref="before,middle,after"', 'Chapref decoration.') {|cdec| param["chapref"] = cdec } - parser.on('--subdirmode', 'Use chapter/id.ext path style to find images.') { param["subdirmode"] = true } - parser.on('--singledirmode', 'Use id.ext path style to find images.') { param["singledirmode"] = true } + parser.on('--subdirmode', 'Use chapter/id.ext path style to find images. (deprecated)') do + STDERR.puts "Warning: --subdirmode is deprecated. Images are automatically detected." + end + parser.on('--singledirmode', 'Use id.ext path style to find images. (deprecated)') do + STDERR.puts "Warning: --singledirmode is deprecated. Images are automatically detected." + end parser.on('--chapterlink', 'make chapref hyperlink') { param["chapterlink"] = true } parser.on('--stylesheet=file', 'Stylesheet file for HTML (comma separated)') {|files| param["stylesheet"] = files.split(/\s*,\s*/) } parser.on('--mathml', 'Use MathML for TeX equation in HTML') do param["mathml"] = true require 'math_ml' + require "math_ml/symbol/character_reference" end parser.on('--htmlversion=VERSION', 'HTML version.') do |v| v = v.to_i param["htmlversion"] = v if v == 4 || v == 5 end + parser.on('--epubversion=VERSION', 'EPUB version.') do |v| + v = v.to_i + param["epubversion"] = v if v == 2 || v == 3 + end parser.on('--hdnumberingmode', 'Output numbering headlines. (deprecated)') { param["hdnumberingmode"] = true } parser.on('--deprecated-blocklines', 'Disable paragrahs in block tags. Treat physical line as a paragraph. (deprecated)') { param["deprecated-blocklines"] = true } parser.on('--target=FMT', 'Target format.') {|fmt| target = fmt } unless target parser.on('--footnotetext', 'Use footnotetext and footnotemark instead of footnote (latex)') { @@ -130,9 +138,10 @@ exit 1 end begin ReVIEW.book.param = param + ReVIEW.book.param["builder"] = target compiler = ReVIEW::Compiler.new(load_strategy_class(target, check_only)) case mode when :files if ARGV.empty? error 'no input'