Class: Deplate::Regions::Inlatex
Instance Attribute Summary collapse
Instance Method Summary
collapse
check_file, clean_strings, #deprecated_regnote, deprecated_regnote, #finish_accum, #format_compound, regions, register_as, set_line_cont
Methods inherited from Element
#join_lines, #join_lines_re_zh_cn
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
426
427
428
|
# File 'lib/deplate/regions.rb', line 426
def content_type
@content_type
end
|
Instance Method Details
#finish ⇒ Object
433
434
435
436
437
438
439
|
# File 'lib/deplate/regions.rb', line 433
def finish
finish_accum
pre = @deplate.variables['inlatexPrelude']
@accum = [pre, @accum].flatten.compact if pre
@deplate.formatter.inlatex(self)
return self
end
|
#process ⇒ Object
441
442
443
444
|
# File 'lib/deplate/regions.rb', line 441
def process
process_etc
return self
end
|
#register_caption ⇒ Object
446
447
448
449
450
451
452
453
454
|
# File 'lib/deplate/regions.rb', line 446
def register_caption
if @args["inline"]
log("Cannot attach caption to a LaTeX fragment marked as inline", :error)
elsif @content_type == "table"
register_table
elsif @content_type == "fig"
register_figure
end
end
|
#setup(region) ⇒ Object
428
429
430
431
|
# File 'lib/deplate/regions.rb', line 428
def setup(region)
super
@content_type = @args["type"] || "fig"
end
|