lib/review/ewbbuilder.rb in review-2.1.0 vs lib/review/ewbbuilder.rb in review-2.2.0

- old
+ new

@@ -25,15 +25,15 @@ puts unless level == 1 puts "//#{'i' * level} #{caption}" puts end -# Compiler.defsyntax(:emlist, :block, 0..1) {|args| -# if args[0] and not args[0] == 'noescape' -# raise SyntaxError, "unknown //emlist option: #{args[0]}" -# end -# } + # Compiler.defsyntax(:emlist, :block, 0..1) {|args| + # if args[0] and not args[0] == 'noescape' + # raise SyntaxError, "unknown //emlist option: #{args[0]}" + # end + # } def emlist(lines, caption = nil) # firstline = f.lineno puts puts caption @@ -47,15 +47,15 @@ end puts '//}' puts end -# Compiler.defsyntax(:cmd, :block, 0..1) {|args| -# if args[0] and not args[0] == 'noescape' -# raise SyntaxError, "unknown //cmd option: #{args[0]}" -# end -# } + # Compiler.defsyntax(:cmd, :block, 0..1) {|args| + # if args[0] and not args[0] == 'noescape' + # raise SyntaxError, "unknown //cmd option: #{args[0]}" + # end + # } def cmd(lines, caption = nil) puts puts caption puts '//sc1{' @@ -71,15 +71,15 @@ end puts '//}' puts end -# Compiler.defsyntax(:list, :block, 0..1) {|args| -# if args[0] and not args[0] == 'noescape' -# raise SyntaxError, "unknown //list option: #{args[0]}" -# end -# } + # Compiler.defsyntax(:list, :block, 0..1) {|args| + # if args[0] and not args[0] == 'noescape' + # raise SyntaxError, "unknown //list option: #{args[0]}" + # end + # } def list(lines, id, caption) puts puts "//l#{list_number(id)} " + caption puts '//lst2{' @@ -89,10 +89,10 @@ puts '//}' puts end def image_header(file, caption) - if /\.png\z/ =~ file and not FileTest.exist?('images/' + file) + if /\.png\z/ =~ file and !FileTest.exist?('images/' + file) warn "image file not exist: #{file}" end id = file.sub(/\.\w+\z/, '') puts "//f#{figure_number(id)} #{text(caption)} file=#{file}" if id end