lib/review/latexbuilder.rb in review-1.1.0 vs lib/review/latexbuilder.rb in review-1.2.0
- old
+ new
@@ -388,11 +388,11 @@
end
rows = adjust_n_cols(rows)
begin
table_header id, caption unless caption.nil?
- rescue KeyError => err
+ rescue KeyError
error "no such table: #{id}"
end
return if rows.empty?
table_begin rows.first.size
if sepidx
@@ -545,14 +545,15 @@
def noindent
print '\noindent'
end
def inline_chapref(id)
+ title = super
if ReVIEW.book.param["chapterlink"]
- "\\hyperref[chap:#{id}]{#{@chapter.env.chapter_index.display_string(id)}}"
+ "\\hyperref[chap:#{id}]{#{title}}"
else
- @chapter.env.chapter_index.display_string(id)
+ title
end
rescue KeyError
error "unknown chapter: #{id}"
nofunc_text("[UnknownChapter:#{id}]")
end
@@ -615,13 +616,12 @@
def inline_bou(str)
str.split(//).map {|c| macro('ruby', escape(c), macro('textgt', BOUTEN)) }.join('\allowbreak')
end
- def inline_ruby(str)
- base, ruby = *str.split(/,/)
- macro('ruby', base, ruby)
+ def compile_ruby(base, ruby)
+ macro('ruby', escape(base), escape(ruby))
end
# math
def inline_m(str)
" $#{str}$ "
@@ -745,9 +745,10 @@
puts macro('label', bib_label(id))
end
def bibpaper_bibpaper(id, caption, lines)
print split_paragraph(lines).join("")
+ puts ""
end
def index(str)
str.sub!(/\(\)/, '')
decl = ''