Module: Deplate::Footnote
- Defined in:
- lib/deplate/etc.rb
Instance Attribute Summary collapse
-
#accum ⇒ Object
readonly
Quack like Deplate::Region.
-
#caption ⇒ Object
readonly
Quack like Deplate::Region.
-
#captionOptions ⇒ Object
readonly
Quack like Deplate::Region.
-
#fnId ⇒ Object
readonly
Returns the value of attribute fnId.
-
#label ⇒ Object
readonly
Quack like Deplate::Region.
-
#level ⇒ Object
readonly
Quack like Deplate::Region.
-
#regNote ⇒ Object
readonly
Quack like Deplate::Region.
Instance Method Summary collapse
Instance Attribute Details
#accum ⇒ Object (readonly)
Quack like Deplate::Region
82 83 84 |
# File 'lib/deplate/etc.rb', line 82 def accum @accum end |
#caption ⇒ Object (readonly)
Quack like Deplate::Region
82 83 84 |
# File 'lib/deplate/etc.rb', line 82 def caption @caption end |
#captionOptions ⇒ Object (readonly)
Quack like Deplate::Region
82 83 84 |
# File 'lib/deplate/etc.rb', line 82 def captionOptions @captionOptions end |
#fnId ⇒ Object (readonly)
Returns the value of attribute fnId.
80 81 82 |
# File 'lib/deplate/etc.rb', line 80 def fnId @fnId end |
#label ⇒ Object (readonly)
Quack like Deplate::Region
82 83 84 |
# File 'lib/deplate/etc.rb', line 82 def label @label end |
#level ⇒ Object (readonly)
Quack like Deplate::Region
82 83 84 |
# File 'lib/deplate/etc.rb', line 82 def level @level end |
#regNote ⇒ Object (readonly)
Quack like Deplate::Region
82 83 84 |
# File 'lib/deplate/etc.rb', line 82 def regNote @regNote end |
Instance Method Details
#footnote_process ⇒ Object
105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/deplate/etc.rb', line 105 def footnote_process fn = @deplate.footnotes[@fnId] if fn # fn.elt.consumed = true fn.fn_consumed = true @elt = fn else log(['Unknown footnote', @fnId, @deplate.footnotes.keys.inspect], :error) @elt = nil end return format_particle(:format_footnote, self) end |
#footnote_setup(text) ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/deplate/etc.rb', line 84 def footnote_setup(text) if text @fnId = @args['id'] if @fnId and text and !text.empty? # @regNote = @fnId @accum = text # @level = @container.level fn = Deplate::Regions::Footnote.new(@deplate, @source, @fnId, {}, self) fn.finish fn.elt.each {|e| e.args[:minor] = true} else @fnId ||= text end if @container.kind_of?(Deplate::Element::Table) @container.contains_footnotes = true end else log('No footnote ID', :error) end end |