Class: ReVIEW::PLAINTEXTTocBuilder

Inherits:
PLAINTEXTBuilder show all
Defined in:
lib/review/tocprinter.rb

Constant Summary

Constants inherited from Builder

Builder::CAPTION_TITLES

Instance Attribute Summary

Attributes inherited from Builder

#doc_status, #location

Attributes included from Loggable

#logger

Instance Method Summary collapse

Methods inherited from PLAINTEXTBuilder

#base_parablock, #best, #bibpaper, #bibpaper_bibpaper, #bibpaper_header, #bpo, #caution, #centering, #circle_begin, #circle_end, #cmd, #column_begin, #column_end, #comment, #common_column_begin, #common_column_end, #compile_href, #compile_kw, #compile_ruby, #dd, #dl_begin, #dl_end, #dt, #dtp, #edition_begin, #edition_end, #emlist, #emlistnum, #expert, #extname, #flushright, #footnote, #graph_mermaid, #hood_begin, #hood_end, #image, #image_ext, #imgtable, #important, #indepimage, #info, #inline_balloon, #inline_bib, #inline_br, #inline_chap, #inline_chapref, #inline_comment, #inline_del, #inline_dtp, #inline_fn, #inline_hd_chap, #inline_hidx, #inline_icon, #inline_ins, #inline_labelref, #inline_pageref, #inline_raw, #inline_tcy, #inline_uchar, #insideout_begin, #insideout_end, #insn, #label, #link, #list, #list_body, #list_header, #listnum, #listnum_body, #memo, #nodisp_begin, #nodisp_end, #nofunc_text, #noindent, #nonum_begin, #nonum_end, #note, #notice, #notoc_begin, #notoc_end, #ol_begin, #ol_end, #ol_item, #olnum, #paragraph, #planning, #point, #post_paragraph, #practice, #pre_paragraph, #quote, #read, #ref_begin, #ref_end, #reference, #result, #security, #shoot, #solve_nest, #source, #sup_begin, #sup_end, #table, #table_begin, #table_end, #table_header, #term, #texequation, #texequation_header, #text, #tip, #tr, #ul_begin, #ul_end, #ul_item, #warning, #world_begin, #world_end, #xcolumn_begin, #xcolumn_end

Methods included from TextUtils

#add_space?, #detab, #join_lines_to_paragraph, #split_paragraph

Methods inherited from Builder

#beginchild, #bibpaper, #bind, #blankline, #caption_top?, #captionblock, #check_nest, #check_nested_minicolumn, #check_printendnotes, #compile_inline, #detab, #embed, #emtable, #endchild, #endnote, #endnote_begin, #endnote_end, #endnote_item, #escape, #extract_chapter_id, #firstlinenum, #get_chap, #graph, #graph_aafigure, #graph_blockdiag, #graph_gnuplot, #graph_graphviz, #graph_mermaid, #graph_plantuml, #handle_metric, #highlight?, #image, #image_ext, #in_minicolumn?, #initialize, #inline_balloon, #inline_bou, #inline_chap, #inline_chapref, #inline_column, #inline_column_chap, #inline_embed, #inline_endnote, #inline_eq, #inline_fn, #inline_hd, #inline_href, #inline_img, #inline_imgref, #inline_include, #inline_kw, #inline_list, #inline_pageref, #inline_raw, #inline_ruby, #inline_sec, #inline_sectitle, #inline_table, #inline_tcy, #inline_title, #inline_w, #inline_wb, #line_num, #list, #listnum, #load_words, #minicolumn_block_name?, #over_secnolevel?, #parse_metric, #parse_table_rows, #post_paragraph, #pre_paragraph, #previous_list_type, #print, #printendnotes, #puts, #raw, #result, #result_metric, #solve_nest, #source, #system_graph, #table, #table_row_separator_regexp, #table_rows, #target_name, #text, #tsize, #ul_item_begin, #ul_item_end

Methods included from Loggable

#app_error, #debug, #error, #error!, #warn

Constructor Details

This class inherits a constructor from ReVIEW::Builder

Instance Method Details

#base_block(type, lines, caption = nil) ⇒ Object



27
28
29
30
31
# File 'lib/review/tocprinter.rb', line 27

def base_block(type, lines, caption = nil)
  puts "\x01STARTLIST\x01"
  super(type, lines, caption)
  puts "\x01ENDLIST\x01"
end

#blankObject



33
34
35
# File 'lib/review/tocprinter.rb', line 33

def blank
  @blank_seen = true
end

#headline(level, label, caption) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/review/tocprinter.rb', line 17

def headline(level, label, caption)
  if @chapter.is_a?(ReVIEW::Book::Part)
    print "\x01H0\x01" # XXX: don't modify level value. level value will be handled in sec_counter#prefix()
  else
    print "\x01H#{level}\x01"
  end
  # embed header information for tocparser
  super(level, label, caption)
end