Method: ReVIEW::LATEXBuilder#captionblock

Defined in:
lib/review/latexbuilder.rb

#captionblock(type, lines, caption) ⇒ Object



276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
# File 'lib/review/latexbuilder.rb', line 276

def captionblock(type, lines, caption)
  check_nested_minicolumn
  if @book.config.check_version('2', exception: false)
    type = 'minicolumn'
  end

  print "\\begin{review#{type}}"

  @doc_status[:caption] = true
  if @book.config.check_version('2', exception: false)
    puts
    if caption.present?
      puts "\\reviewminicolumntitle{#{compile_inline(caption)}}"
    end
  else
    if caption.present?
      print "[#{compile_inline(caption)}]"
    end
    puts
  end

  @doc_status[:caption] = nil
  blocked_lines = split_paragraph(lines)
  puts blocked_lines.join("\n\n")

  puts "\\end{review#{type}}"
end