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.



2226
2227
2228
# File 'lib/sisu/xhtml_epub2_format.rb', line 2226

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

Instance Method Details

#lev(tag, attrib) ⇒ Object



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

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

#lev0Object

docinfo



2267
2268
2269
# File 'lib/sisu/xhtml_epub2_format.rb', line 2267

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

#lev1Object



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

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

#lev2Object



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

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

#lev3Object



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

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

#lev4Object



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

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

#lev5Object



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

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

#lev6Object



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

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

#lev7Object



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

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


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

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