lib/review/latexbuilder.rb in review-3.0.0.preview1 vs lib/review/latexbuilder.rb in review-3.0.0.preview2
- old
+ new
@@ -599,19 +599,27 @@
def table_header(id, caption)
if id.nil?
if caption.present?
@table_caption = true
@doc_status[:caption] = true
- puts "\\begin{table}[h]%%#{id}"
+ if @book.config.check_version('2', exception: false)
+ puts "\\begin{table}[h]%%#{id}"
+ else
+ puts "\\begin{table}%%#{id}"
+ end
puts macro('reviewtablecaption*', compile_inline(caption))
@doc_status[:caption] = nil
end
else
if caption.present?
@table_caption = true
@doc_status[:caption] = true
- puts "\\begin{table}[h]%%#{id}"
+ if @book.config.check_version('2', exception: false)
+ puts "\\begin{table}[h]%%#{id}"
+ else
+ puts "\\begin{table}%%#{id}"
+ end
puts macro('reviewtablecaption', compile_inline(caption))
@doc_status[:caption] = nil
end
puts macro('label', table_label(id))
end
@@ -982,13 +990,13 @@
end
def inline_hd_chap(chap, id)
n = chap.headline_index.number(id)
if chap.number and @book.config['secnolevel'] >= n.split('.').size
- str = I18n.t('chapter_quote', "#{chap.headline_index.number(id)} #{compile_inline(chap.headline(id).caption)}")
+ str = I18n.t('hd_quote', [chap.headline_index.number(id), compile_inline(chap.headline(id).caption)])
else
- str = I18n.t('chapter_quote', compile_inline(chap.headline(id).caption))
+ str = I18n.t('hd_quote_without_number', compile_inline(chap.headline(id).caption))
end
if @book.config['chapterlink']
anchor = n.gsub(/\./, '-')
macro('reviewsecref', str, sec_label(anchor))
else
@@ -996,10 +1004,10 @@
end
end
def inline_column_chap(chapter, id)
macro('reviewcolumnref',
- I18n.t('chapter_quote', compile_inline(chapter.column(id).caption)),
+ I18n.t('column', compile_inline(chapter.column(id).caption)),
column_label(id, chapter))
rescue KeyError
error "unknown column: #{id}"
end