class SiSU_XML_ODF_ODT_Format::ParagraphNumber

Public Class Methods

new(make,paranum) click to toggle source
# File lib/sisu/xml_odf_odt_format.rb, line 59
def initialize(make,paranum)
  @make=make
  @paranum=/(\d+)/m.match(paranum.to_s)[1]
end

Public Instance Methods

goto() click to toggle source
# File lib/sisu/xml_odf_odt_format.rb, line 84
def goto
  @paranum.gsub(/(\d+)/,'<a href="#\1">')
end
name() click to toggle source
# File lib/sisu/xml_odf_odt_format.rb, line 81
def name
  @paranum.gsub(/(\d+)/,'<a name="\1"></a>')
end
set_bookmark_and_display() click to toggle source
# File lib/sisu/xml_odf_odt_format.rb, line 72
def set_bookmark_and_display
  set_ref=@paranum.gsub(/(\d+)/,
    ' <text:span text:style-name="Span_subscript"><text:bookmark-start text:name="\1"/><text:bookmark-end text:name="\1"/></text:span>')
  disp=@paranum.gsub(/(\d+)/,
    (@make.build.odt_ocn?) \
    ? %{ <text:span text:style-name="Span_subscript">#{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}</text:span>}
    : '')
  { display: disp, set_ref: set_ref }
end
set_ref_and_display() click to toggle source
# File lib/sisu/xml_odf_odt_format.rb, line 63
def set_ref_and_display
  set_ref=@paranum.gsub(/(\d+)/,
    ' <text:span text:style-name="Span_subscript"><text:reference-mark-start text:name="\1"/><text:reference-mark-end text:name="\1"/></text:span>')
  disp=@paranum.gsub(/(\d+)/,
    (@make.build.odt_ocn?) \
    ? %{ <text:span text:style-name="Span_subscript">#{Dx[:ocn_o]}\\1#{Dx[:ocn_c]}</text:span>}
    : '')
  { display: disp, set_ref: set_ref }
end