Method: ReVIEW::LATEXBuilder#inline_hd_chap

Defined in:
lib/review/latexbuilder.rb

#inline_hd_chap(chap, id) ⇒ Object



1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
# File 'lib/review/latexbuilder.rb', line 1278

def inline_hd_chap(chap, id)
  n = chap.headline_index.number(id)
  str = if n.present? && chap.number && over_secnolevel?(n)
          I18n.t('hd_quote', [chap.headline_index.number(id), compile_inline(chap.headline(id).caption)])
        else
          I18n.t('hd_quote_without_number', compile_inline(chap.headline(id).caption))
        end
  if @book.config['chapterlink']
    anchor = n.tr('.', '-')
    macro('reviewsecref', str, sec_label(anchor))
  else
    str
  end
end