Class: SiSU_XHTML_EPUB2_Format::FormatToc

Inherits:
FormatTextObject show all
Defined in:
lib/sisu/xhtml_epub2_format.rb

Instance Attribute Summary

Attributes inherited from FormatTextObject

#banner, #format, #headname, #link, #linkname, #md, #ocn, #p_num, #paranum, #t_o, #table, #txt, #url

Instance Method Summary collapse

Methods inherited from FormatTextObject

#alt, #block, #bold, #bold_heading, #bold_para, #break, #bullet, #center, #center_bold, #code, #dl, #endnote_body, #endnote_body_indent, #group, #gsub_body, #nametags_seg, #no_paranum, #para, #para_form_css, #seg_heading4, #seg_heading5, #seg_heading6, #seg_heading7, #seg_heading_sub, #table_css_end, #title_heading, #title_heading0, #title_heading1, #title_heading2, #title_heading3, #title_heading4, #toc_head_copy_at, #verse

Methods included from SiSU_Parts_XHTML

#css, #home, #num_css, #paragraph_font_small, #paragraph_font_tiny, #set_fonts, #set_small, #set_tiny, #site, #the_font, #the_line_break, #the_margin, #the_nav, #the_table_close, #the_url, #the_url_decoration, #txt_0, #txt_1, #txt_2, #txt_3, #txt_close, #txt_concordance, #txt_manifest, #txt_open, #txt_toc_link, #xml_close, #xml_open

Methods included from SiSU_Parts_Generic

#footer_signature, #home, #home_txt, #i_choice, #i_home_button, #i_ico, #i_new, #rl_root, #root_http, #sisu, #sisu_txt, #sisudoc, #site, #the_icon, #the_text, #the_url, #txt_home, #txt_hp, #txt_hp_alias, #txt_signature, #urify, #url_close, #url_open

Constructor Details

#initialize(md, txt) ⇒ FormatToc

Returns a new instance of FormatToc.



2224
2225
2226
# File 'lib/sisu/xhtml_epub2_format.rb', line 2224

def initialize(md,txt)
  super(md,txt)
end

Instance Method Details

#lev(tag, attrib) ⇒ Object



2235
2236
2237
2238
2239
2240
2241
2242
2243
# File 'lib/sisu/xhtml_epub2_format.rb', line 2235

def lev(tag,attrib)
  if @txt
    %{<#{tag} class="#{attrib}">
#{@txt}
  </#{tag}>
}
  else ''
  end
end

#lev0Object

docinfo



2265
2266
2267
# File 'lib/sisu/xhtml_epub2_format.rb', line 2265

def lev0 #docinfo
  lev('h0','toc')
end

#lev1Object



2244
2245
2246
# File 'lib/sisu/xhtml_epub2_format.rb', line 2244

def lev1
  lev('h1','toc')
end

#lev2Object



2247
2248
2249
# File 'lib/sisu/xhtml_epub2_format.rb', line 2247

def lev2
  lev('h2','toc')
end

#lev3Object



2250
2251
2252
# File 'lib/sisu/xhtml_epub2_format.rb', line 2250

def lev3
  lev('h3','toc')
end

#lev4Object



2253
2254
2255
# File 'lib/sisu/xhtml_epub2_format.rb', line 2253

def lev4
  lev('h4','toc')
end

#lev5Object



2256
2257
2258
# File 'lib/sisu/xhtml_epub2_format.rb', line 2256

def lev5
  lev('h5','toc')
end

#lev6Object



2259
2260
2261
# File 'lib/sisu/xhtml_epub2_format.rb', line 2259

def lev6
  lev('h6','toc')
end

#lev7Object



2262
2263
2264
# File 'lib/sisu/xhtml_epub2_format.rb', line 2262

def lev7
  lev('h7','toc')
end


2227
2228
2229
2230
2231
2232
2233
2234
# File 'lib/sisu/xhtml_epub2_format.rb', line 2227

def links_guide
  %{  <li class="doc">
<a href="#{@lnk_url}" target="_top">
  #{@lnk_txt}
</a>
  </li>
}
end