Skip to content

Commit

Permalink
Merge branch 'master' into add_nonum_title_toc
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuto committed Apr 14, 2016
2 parents fdace0e + c7e21c4 commit a2a5a40
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bin/review-compile
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ def _main
config["footnotetext"] = true
}
opts.on('--draft', 'use draft mode(inline comment)') { config["draft"] = true }
opts.on('-a', '--all', 'Compile all chapters.') do
mode = :dir
basedir = nil
end
opts.on('--directory=DIR', 'Compile all chapters in DIR.') do |path|
mode = :dir
basedir = path
Expand Down Expand Up @@ -146,6 +142,10 @@ def _main
config["builder"] = target
ReVIEW::I18n.setup(config["language"])

if ARGV.blank?
mode = :dir
end

case mode
when :files
if ARGV.empty?
Expand Down
13 changes: 13 additions & 0 deletions lib/review/idgxmlbuilder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,19 @@ def table_end
print "<?dtp tablerow last?>"
end

def imgtable(lines, id, caption = nil, metric = nil)
if @chapter.image(id).bound?
metrics = parse_metric("idgxml", metric)
puts "<table>"
table_header id, caption
puts %Q[<imgtable><Image href="file://#{@chapter.image(id).path.sub(/\A.\//, "")}"#{metrics} /></imgtable>]
puts "</table>"
else
warn "image not bound: #{id}" if @strict
image_dummy id, caption, lines
end
end

def comment(str)
print %Q(<!-- [Comment] #{escape_html(str)} -->)
end
Expand Down
2 changes: 1 addition & 1 deletion test/sample-book/src/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def build(mode, chapter)
end

def build_all(mode)
sh "review-compile --all --target=#{mode} --footnotetext --stylesheet=style.css"
sh "review-compile --target=#{mode} --footnotetext --stylesheet=style.css"
end

task :default => :html_all
Expand Down

0 comments on commit a2a5a40

Please sign in to comment.