Class: ReVIEW::IndexBuilder
Constant Summary
Constants inherited
from Builder
Builder::CAPTION_TITLES
Instance Attribute Summary collapse
Attributes inherited from Builder
#doc_status, #location
Attributes included from Loggable
#logger
Instance Method Summary
collapse
-
#bibpaper(lines, id, caption) ⇒ Object
-
#bind(compiler, chapter, location) ⇒ Object
-
#blankline ⇒ Object
-
#bpo(lines) ⇒ Object
-
#captionblock(_type, lines, caption, _specialstyle = nil) ⇒ Object
-
#centering(lines) ⇒ Object
-
#check_id(id) ⇒ Object
-
#cmd(lines, caption = nil) ⇒ Object
-
#column_begin(_level, label, caption) ⇒ Object
-
#column_end(_level) ⇒ Object
-
#comment(lines, comment = nil) ⇒ Object
-
#compile_inline(s) ⇒ Object
-
#dd(lines) ⇒ Object
-
#dl_begin ⇒ Object
-
#dl_end ⇒ Object
-
#dt(line) ⇒ Object
-
#embed(_lines, _arg = nil) ⇒ Object
-
#emlist(lines, caption = nil, _lang = nil) ⇒ Object
-
#emlistnum(lines, caption = nil, _lang = nil) ⇒ Object
-
#emtable(_lines, caption = nil) ⇒ Object
-
#endnote(id, str) ⇒ Object
-
#error(msg = nil) ⇒ Object
-
#extract_chapter_id(_chap_ref) ⇒ Object
-
#firstlinenum(_num) ⇒ Object
-
#flushright(lines) ⇒ Object
-
#footnote(id, str) ⇒ Object
-
#get_chap(_chapter = nil) ⇒ Object
-
#graph(lines, id, _command, caption = '') ⇒ Object
-
#headline(level, label, caption) ⇒ Object
-
#highlight? ⇒ Boolean
-
#hr ⇒ Object
-
#image(_lines, id, caption, _metric = nil) ⇒ Object
-
#imgtable(_lines, id, caption = nil, _metric = nil) ⇒ Object
-
#indepimage(_lines, id, caption = '', _metric = nil) ⇒ Object
-
#initialize(strict = false, *args) ⇒ IndexBuilder
constructor
A new instance of IndexBuilder.
-
#inline_abbr(_str) ⇒ Object
-
#inline_acronym(_str) ⇒ Object
-
#inline_ami(_str) ⇒ Object
-
#inline_b(_str) ⇒ Object
-
#inline_balloon(_arg) ⇒ Object
-
#inline_bib(_id) ⇒ Object
-
#inline_big(_str) ⇒ Object
-
#inline_bou(str) ⇒ Object
-
#inline_br(_str) ⇒ Object
-
#inline_chap(_id) ⇒ Object
-
#inline_chapref(_id) ⇒ Object
-
#inline_cite(_str) ⇒ Object
-
#inline_code(_str) ⇒ Object
-
#inline_column(_id) ⇒ Object
-
#inline_column_chap(_chapter, _id) ⇒ Object
-
#inline_del(_str) ⇒ Object
-
#inline_dfn(_str) ⇒ Object
-
#inline_dtp(_str) ⇒ Object
-
#inline_em(_str) ⇒ Object
-
#inline_embed(_args) ⇒ Object
-
#inline_endnote(id) ⇒ Object
-
#inline_eq(_id) ⇒ Object
-
#inline_fn(id) ⇒ Object
-
#inline_hd(_id) ⇒ Object
-
#inline_hidx(_str) ⇒ Object
-
#inline_hr(_arg) ⇒ Object
-
#inline_href(_arg) ⇒ Object
-
#inline_i(_str) ⇒ Object
-
#inline_icon(id) ⇒ Object
-
#inline_idx(_str) ⇒ Object
-
#inline_img(_id) ⇒ Object
-
#inline_imgref(_id) ⇒ Object
-
#inline_ins(_str) ⇒ Object
-
#inline_kbd(_str) ⇒ Object
-
#inline_kw(_arg) ⇒ Object
-
#inline_list(_id) ⇒ Object
-
#inline_m(_str) ⇒ Object
-
#inline_pageref(_id) ⇒ Object
-
#inline_raw(_args) ⇒ Object
-
#inline_recipe(_str) ⇒ Object
-
#inline_ruby(_arg) ⇒ Object
-
#inline_samp(_str) ⇒ Object
-
#inline_sec(_id) ⇒ Object
-
#inline_secref(_id) ⇒ Object
-
#inline_sectitle(_id) ⇒ Object
-
#inline_small(_str) ⇒ Object
-
#inline_strong(_str) ⇒ Object
-
#inline_sub(_str) ⇒ Object
-
#inline_sup(_str) ⇒ Object
-
#inline_table(_id) ⇒ Object
-
#inline_tcy(_arg) ⇒ Object
-
#inline_title(_id) ⇒ Object
-
#inline_tt(_str) ⇒ Object
-
#inline_ttb(_str) ⇒ Object
-
#inline_tti(_str) ⇒ Object
-
#inline_u(_str) ⇒ Object
-
#inline_uchar(_str) ⇒ Object
-
#inline_var(_str) ⇒ Object
-
#inline_w(_s) ⇒ Object
-
#inline_wb(_s) ⇒ Object
-
#label(id) ⇒ Object
-
#list(lines, id, caption, _lang = nil) ⇒ Object
-
#listnum(lines, id, caption, _lang = nil) ⇒ Object
-
#nodisp_begin(level, label, caption) ⇒ Object
-
#nodisp_end(_level) ⇒ Object
-
#nofunc_text(_str) ⇒ Object
-
#noindent ⇒ Object
-
#nonum_begin(level, label, caption) ⇒ Object
-
#nonum_end(_level) ⇒ Object
-
#notoc_begin(level, label, caption) ⇒ Object
-
#notoc_end(_level) ⇒ Object
-
#numberlessimage(_lines, id, caption = '', _metric = nil) ⇒ Object
-
#ol_begin ⇒ Object
-
#ol_end ⇒ Object
-
#ol_item(lines, _num) ⇒ Object
-
#olnum(_num) ⇒ Object
-
#pagebreak ⇒ Object
-
#paragraph(lines) ⇒ Object
-
#parasep ⇒ Object
-
#post_paragraph ⇒ Object
-
#pre_paragraph ⇒ Object
-
#printendnotes ⇒ Object
-
#quote(lines) ⇒ Object
-
#raw(_str) ⇒ Object
-
#read(_lines) ⇒ Object
(also: #lead)
-
#result ⇒ Object
-
#source(lines, caption = nil, _lang = nil) ⇒ Object
-
#sup_begin(_level, label, _caption) ⇒ Object
-
#sup_end(_level) ⇒ Object
-
#table(lines, id = nil, caption = nil) ⇒ Object
-
#target_name ⇒ Object
-
#texequation(_lines, id = nil, caption = '') ⇒ Object
-
#text(_str) ⇒ Object
-
#tsize(_str) ⇒ Object
-
#ul_begin ⇒ Object
-
#ul_end ⇒ Object
-
#ul_item_begin(lines) ⇒ Object
-
#ul_item_end ⇒ Object
-
#unknown_command(*_args) ⇒ Object
-
#xcolumn_begin(_level, label, _caption) ⇒ Object
-
#xcolumn_end(_level) ⇒ Object
Methods inherited from Builder
#beginchild, #caption_top?, #check_nest, #check_nested_minicolumn, #check_printendnotes, #detab, #endchild, #endnote_begin, #endnote_end, #endnote_item, #escape, #graph_aafigure, #graph_blockdiag, #graph_gnuplot, #graph_graphviz, #graph_mermaid, #graph_plantuml, #handle_metric, #image_ext, #in_minicolumn?, #inline_include, #line_num, #load_words, #minicolumn_block_name?, #over_secnolevel?, #parse_metric, #parse_table_rows, #previous_list_type, #print, #puts, #result_metric, #solve_nest, #system_graph, #table_row_separator_regexp, #table_rows
Methods included from Loggable
#app_error, #debug, #error!, #warn
Methods included from TextUtils
#add_space?, #detab, #join_lines_to_paragraph, #split_paragraph
Constructor Details
#initialize(strict = false, *args) ⇒ IndexBuilder
Returns a new instance of IndexBuilder.
21
22
23
|
# File 'lib/review/index_builder.rb', line 21
def initialize(strict = false, *args)
super
end
|
Instance Attribute Details
#bibpaper_index ⇒ Object
Returns the value of attribute bibpaper_index.
16
17
18
|
# File 'lib/review/index_builder.rb', line 16
def bibpaper_index
@bibpaper_index
end
|
#column_index ⇒ Object
Returns the value of attribute column_index.
16
17
18
|
# File 'lib/review/index_builder.rb', line 16
def column_index
@column_index
end
|
#endnote_index ⇒ Object
Returns the value of attribute endnote_index.
16
17
18
|
# File 'lib/review/index_builder.rb', line 16
def endnote_index
@endnote_index
end
|
#equation_index ⇒ Object
Returns the value of attribute equation_index.
16
17
18
|
# File 'lib/review/index_builder.rb', line 16
def equation_index
@equation_index
end
|
Returns the value of attribute footnote_index.
16
17
18
|
# File 'lib/review/index_builder.rb', line 16
def
@footnote_index
end
|
#headline_index ⇒ Object
Returns the value of attribute headline_index.
16
17
18
|
# File 'lib/review/index_builder.rb', line 16
def headline_index
@headline_index
end
|
#icon_index ⇒ Object
Returns the value of attribute icon_index.
16
17
18
|
# File 'lib/review/index_builder.rb', line 16
def icon_index
@icon_index
end
|
#image_index ⇒ Object
Returns the value of attribute image_index.
16
17
18
|
# File 'lib/review/index_builder.rb', line 16
def image_index
@image_index
end
|
#indepimage_index ⇒ Object
Returns the value of attribute indepimage_index.
16
17
18
|
# File 'lib/review/index_builder.rb', line 16
def indepimage_index
@indepimage_index
end
|
#list_index ⇒ Object
Returns the value of attribute list_index.
16
17
18
|
# File 'lib/review/index_builder.rb', line 16
def list_index
@list_index
end
|
#numberless_image_index ⇒ Object
Returns the value of attribute numberless_image_index.
16
17
18
|
# File 'lib/review/index_builder.rb', line 16
def numberless_image_index
@numberless_image_index
end
|
#table_index ⇒ Object
Returns the value of attribute table_index.
16
17
18
|
# File 'lib/review/index_builder.rb', line 16
def table_index
@table_index
end
|
Instance Method Details
#bibpaper(lines, id, caption) ⇒ Object
508
509
510
511
512
513
514
|
# File 'lib/review/index_builder.rb', line 508
def bibpaper(lines, id, caption)
check_id(id)
item = ReVIEW::Book::Index::Item.new(id, @bibpaper_index.size + 1, caption)
@bibpaper_index.add_item(item)
compile_inline(caption)
lines.each { |line| compile_inline(line) }
end
|
#bind(compiler, chapter, location) ⇒ Object
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/review/index_builder.rb', line 43
def bind(compiler, chapter, location)
@compiler = compiler
@chapter = chapter
@location = location
@output = StringIO.new
if @chapter.present?
@book = @chapter.book
end
builder_init_file
end
|
#blankline ⇒ Object
363
364
|
# File 'lib/review/index_builder.rb', line 363
def blankline
end
|
#bpo(lines) ⇒ Object
380
381
382
|
# File 'lib/review/index_builder.rb', line 380
def bpo(lines)
lines.each { |line| compile_inline(line) }
end
|
#captionblock(_type, lines, caption, _specialstyle = nil) ⇒ Object
677
678
679
680
681
|
# File 'lib/review/index_builder.rb', line 677
def captionblock(_type, lines, caption, _specialstyle = nil)
compile_inline(caption)
lines.each { |line| compile_inline(line) }
''
end
|
#centering(lines) ⇒ Object
370
371
372
|
# File 'lib/review/index_builder.rb', line 370
def centering(lines)
lines.each { |line| compile_inline(line) }
end
|
#check_id(id) ⇒ Object
25
26
27
28
29
30
31
32
33
|
# File 'lib/review/index_builder.rb', line 25
def check_id(id)
if id
if id =~ %r![#%\\{}\[\]~/$'"|*?&<>`\s]!
warn "deprecated ID: `#{$&}` in `#{id}`", location: location
elsif id.start_with?('.')
warn "deprecated ID: `#{id}` begins from `.`", location: location
end
end
end
|
#cmd(lines, caption = nil) ⇒ Object
280
281
282
283
|
# File 'lib/review/index_builder.rb', line 280
def cmd(lines, caption = nil)
compile_inline(caption)
lines.each { |line| compile_inline(line) }
end
|
#column_begin(_level, label, caption) ⇒ Object
176
177
178
179
180
181
|
# File 'lib/review/index_builder.rb', line 176
def column_begin(_level, label, caption)
check_id(label)
item_id = label || caption
item = ReVIEW::Book::Index::Item.new(item_id, @column_index.size + 1, caption)
@column_index.add_item(item)
end
|
#column_end(_level) ⇒ Object
183
184
|
# File 'lib/review/index_builder.rb', line 183
def column_end(_level)
end
|
312
313
|
# File 'lib/review/index_builder.rb', line 312
def (lines, = nil)
end
|
#compile_inline(s) ⇒ Object
390
391
392
|
# File 'lib/review/index_builder.rb', line 390
def compile_inline(s)
@compiler.text(s)
end
|
#dd(lines) ⇒ Object
227
228
|
# File 'lib/review/index_builder.rb', line 227
def dd(lines)
end
|
221
222
|
# File 'lib/review/index_builder.rb', line 221
def dl_begin
end
|
230
231
|
# File 'lib/review/index_builder.rb', line 230
def dl_end
end
|
224
225
|
# File 'lib/review/index_builder.rb', line 224
def dt(line)
end
|
#embed(_lines, _arg = nil) ⇒ Object
651
652
653
|
# File 'lib/review/index_builder.rb', line 651
def embed(_lines, _arg = nil)
''
end
|
#emlist(lines, caption = nil, _lang = nil) ⇒ Object
270
271
272
273
|
# File 'lib/review/index_builder.rb', line 270
def emlist(lines, caption = nil, _lang = nil)
compile_inline(caption)
lines.each { |line| compile_inline(line) }
end
|
#emlistnum(lines, caption = nil, _lang = nil) ⇒ Object
275
276
277
278
|
# File 'lib/review/index_builder.rb', line 275
def emlistnum(lines, caption = nil, _lang = nil)
compile_inline(caption)
lines.each { |line| compile_inline(line) }
end
|
#emtable(_lines, caption = nil) ⇒ Object
306
307
308
309
310
|
# File 'lib/review/index_builder.rb', line 306
def emtable(_lines, caption = nil)
compile_inline(caption)
end
|
#endnote(id, str) ⇒ Object
334
335
336
337
338
339
340
|
# File 'lib/review/index_builder.rb', line 334
def endnote(id, str)
check_id(id)
@crossref[:endnote][id] ||= 0
item = ReVIEW::Book::Index::Item.new(id, @endnote_index.size + 1, str)
@endnote_index.add_item(item)
compile_inline(str)
end
|
#error(msg = nil) ⇒ Object
656
657
658
|
# File 'lib/review/index_builder.rb', line 656
def error(msg = nil)
end
|
673
674
675
|
# File 'lib/review/index_builder.rb', line 673
def (_chap_ref)
''
end
|
#firstlinenum(_num) ⇒ Object
484
485
486
|
# File 'lib/review/index_builder.rb', line 484
def firstlinenum(_num)
''
end
|
#flushright(lines) ⇒ Object
366
367
368
|
# File 'lib/review/index_builder.rb', line 366
def flushright(lines)
lines.each { |line| compile_inline(line) }
end
|
326
327
328
329
330
331
332
|
# File 'lib/review/index_builder.rb', line 326
def (id, str)
check_id(id)
@crossref[:footnote][id] ||= 0
item = ReVIEW::Book::Index::Item.new(id, @footnote_index.size + 1, str)
@footnote_index.add_item(item)
compile_inline(str)
end
|
#get_chap(_chapter = nil) ⇒ Object
669
670
671
|
# File 'lib/review/index_builder.rb', line 669
def get_chap(_chapter = nil)
''
end
|
#graph(lines, id, _command, caption = '') ⇒ Object
683
684
685
|
# File 'lib/review/index_builder.rb', line 683
def graph(lines, id, _command, caption = '')
image(lines, id, caption)
end
|
#headline(level, label, caption) ⇒ Object
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
# File 'lib/review/index_builder.rb', line 97
def headline(level, label, caption)
check_id(label)
@sec_counter.inc(level)
return if level < 2
cursor = level - 2
@headline_stack[cursor] = (label || caption)
if @headline_stack.size > cursor + 1
@headline_stack = @headline_stack.take(cursor + 1)
end
item_id = @headline_stack.join('|')
item = ReVIEW::Book::Index::Item.new(item_id, @sec_counter.number_list, caption)
@headline_index.add_item(item)
compile_inline(caption)
end
|
#highlight? ⇒ Boolean
699
700
701
|
# File 'lib/review/index_builder.rb', line 699
def highlight?
false
end
|
356
357
|
# File 'lib/review/index_builder.rb', line 356
def hr
end
|
#image(_lines, id, caption, _metric = nil) ⇒ Object
289
290
291
292
293
294
|
# File 'lib/review/index_builder.rb', line 289
def image(_lines, id, caption, _metric = nil)
check_id(id)
item = ReVIEW::Book::Index::Item.new(id, @image_index.size + 1, caption)
@image_index.add_item(item)
compile_inline(caption)
end
|
#imgtable(_lines, id, caption = nil, _metric = nil) ⇒ Object
315
316
317
318
319
320
321
322
323
324
|
# File 'lib/review/index_builder.rb', line 315
def imgtable(_lines, id, caption = nil, _metric = nil)
check_id(id)
item = ReVIEW::Book::Index::Item.new(id, @table_index.size + 1)
@table_index.add_item(item)
item = ReVIEW::Book::Index::Item.new(id, @indepimage_index.size + 1)
@indepimage_index.add_item(item)
compile_inline(caption)
end
|
#indepimage(_lines, id, caption = '', _metric = nil) ⇒ Object
342
343
344
345
346
347
|
# File 'lib/review/index_builder.rb', line 342
def indepimage(_lines, id, caption = '', _metric = nil)
check_id(id)
item = ReVIEW::Book::Index::Item.new(id, @indepimage_index.size + 1)
@indepimage_index.add_item(item)
compile_inline(caption)
end
|
#inline_abbr(_str) ⇒ Object
564
565
566
|
# File 'lib/review/index_builder.rb', line 564
def inline_abbr(_str)
''
end
|
#inline_acronym(_str) ⇒ Object
568
569
570
|
# File 'lib/review/index_builder.rb', line 568
def inline_acronym(_str)
''
end
|
#inline_ami(_str) ⇒ Object
444
445
446
|
# File 'lib/review/index_builder.rb', line 444
def inline_ami(_str)
''
end
|
#inline_b(_str) ⇒ Object
440
441
442
|
# File 'lib/review/index_builder.rb', line 440
def inline_b(_str)
''
end
|
#inline_balloon(_arg) ⇒ Object
552
553
554
|
# File 'lib/review/index_builder.rb', line 552
def inline_balloon(_arg)
''
end
|
#inline_bib(_id) ⇒ Object
532
533
534
|
# File 'lib/review/index_builder.rb', line 532
def inline_bib(_id)
''
end
|
#inline_big(_str) ⇒ Object
600
601
602
|
# File 'lib/review/index_builder.rb', line 600
def inline_big(_str)
''
end
|
#inline_bou(str) ⇒ Object
448
449
450
|
# File 'lib/review/index_builder.rb', line 448
def inline_bou(str)
str
end
|
#inline_br(_str) ⇒ Object
476
477
478
|
# File 'lib/review/index_builder.rb', line 476
def inline_br(_str)
''
end
|
#inline_chap(_id) ⇒ Object
398
399
400
|
# File 'lib/review/index_builder.rb', line 398
def inline_chap(_id)
''
end
|
#inline_chapref(_id) ⇒ Object
394
395
396
|
# File 'lib/review/index_builder.rb', line 394
def inline_chapref(_id)
''
end
|
#inline_cite(_str) ⇒ Object
572
573
574
|
# File 'lib/review/index_builder.rb', line 572
def inline_cite(_str)
''
end
|
#inline_code(_str) ⇒ Object
464
465
466
|
# File 'lib/review/index_builder.rb', line 464
def inline_code(_str)
''
end
|
#inline_column(_id) ⇒ Object
536
537
538
|
# File 'lib/review/index_builder.rb', line 536
def inline_column(_id)
''
end
|
#inline_column_chap(_chapter, _id) ⇒ Object
540
541
542
|
# File 'lib/review/index_builder.rb', line 540
def inline_column_chap(_chapter, _id)
''
end
|
#inline_del(_str) ⇒ Object
620
621
622
|
# File 'lib/review/index_builder.rb', line 620
def inline_del(_str)
''
end
|
#inline_dfn(_str) ⇒ Object
576
577
578
|
# File 'lib/review/index_builder.rb', line 576
def inline_dfn(_str)
''
end
|
#inline_dtp(_str) ⇒ Object
460
461
462
|
# File 'lib/review/index_builder.rb', line 460
def inline_dtp(_str)
''
end
|
#inline_em(_str) ⇒ Object
580
581
582
|
# File 'lib/review/index_builder.rb', line 580
def inline_em(_str)
''
end
|
#inline_embed(_args) ⇒ Object
695
696
697
|
# File 'lib/review/index_builder.rb', line 695
def inline_embed(_args)
''
end
|
#inline_endnote(id) ⇒ Object
431
432
433
434
|
# File 'lib/review/index_builder.rb', line 431
def inline_endnote(id)
@crossref[:endnote][id] = @crossref[:endnote][id] ? @crossref[:endnote][id] + 1 : 1
''
end
|
#inline_eq(_id) ⇒ Object
422
423
424
|
# File 'lib/review/index_builder.rb', line 422
def inline_eq(_id)
''
end
|
#inline_fn(id) ⇒ Object
426
427
428
429
|
# File 'lib/review/index_builder.rb', line 426
def inline_fn(id)
@crossref[:footnote][id] = @crossref[:footnote][id] ? @crossref[:footnote][id] + 1 : 1
''
end
|
#inline_hd(_id) ⇒ Object
516
517
518
|
# File 'lib/review/index_builder.rb', line 516
def inline_hd(_id)
''
end
|
#inline_hidx(_str) ⇒ Object
472
473
474
|
# File 'lib/review/index_builder.rb', line 472
def inline_hidx(_str)
''
end
|
#inline_hr(_arg) ⇒ Object
500
501
502
|
# File 'lib/review/index_builder.rb', line 500
def inline_hr(_arg)
''
end
|
#inline_href(_arg) ⇒ Object
496
497
498
|
# File 'lib/review/index_builder.rb', line 496
def inline_href(_arg)
''
end
|
#inline_i(_str) ⇒ Object
436
437
438
|
# File 'lib/review/index_builder.rb', line 436
def inline_i(_str)
''
end
|
#inline_icon(id) ⇒ Object
636
637
638
639
640
641
|
# File 'lib/review/index_builder.rb', line 636
def inline_icon(id)
check_id(id)
item = ReVIEW::Book::Index::Item.new(id, @icon_index.size + 1)
@icon_index.add_item(item)
''
end
|
#inline_idx(_str) ⇒ Object
468
469
470
|
# File 'lib/review/index_builder.rb', line 468
def inline_idx(_str)
''
end
|
#inline_img(_id) ⇒ Object
410
411
412
|
# File 'lib/review/index_builder.rb', line 410
def inline_img(_id)
''
end
|
#inline_imgref(_id) ⇒ Object
414
415
416
|
# File 'lib/review/index_builder.rb', line 414
def inline_imgref(_id)
''
end
|
#inline_ins(_str) ⇒ Object
624
625
626
|
# File 'lib/review/index_builder.rb', line 624
def inline_ins(_str)
''
end
|
#inline_kbd(_str) ⇒ Object
584
585
586
|
# File 'lib/review/index_builder.rb', line 584
def inline_kbd(_str)
''
end
|
#inline_kw(_arg) ⇒ Object
492
493
494
|
# File 'lib/review/index_builder.rb', line 492
def inline_kw(_arg)
''
end
|
#inline_list(_id) ⇒ Object
406
407
408
|
# File 'lib/review/index_builder.rb', line 406
def inline_list(_id)
''
end
|
#inline_m(_str) ⇒ Object
480
481
482
|
# File 'lib/review/index_builder.rb', line 480
def inline_m(_str)
''
end
|
544
545
546
|
# File 'lib/review/index_builder.rb', line 544
def (_id)
''
end
|
#inline_raw(_args) ⇒ Object
691
692
693
|
# File 'lib/review/index_builder.rb', line 691
def inline_raw(_args)
''
end
|
#inline_recipe(_str) ⇒ Object
632
633
634
|
# File 'lib/review/index_builder.rb', line 632
def inline_recipe(_str)
''
end
|
#inline_ruby(_arg) ⇒ Object
488
489
490
|
# File 'lib/review/index_builder.rb', line 488
def inline_ruby(_arg)
''
end
|
#inline_samp(_str) ⇒ Object
588
589
590
|
# File 'lib/review/index_builder.rb', line 588
def inline_samp(_str)
''
end
|
#inline_sec(_id) ⇒ Object
524
525
526
|
# File 'lib/review/index_builder.rb', line 524
def inline_sec(_id)
''
end
|
#inline_secref(_id) ⇒ Object
520
521
522
|
# File 'lib/review/index_builder.rb', line 520
def inline_secref(_id)
''
end
|
#inline_sectitle(_id) ⇒ Object
528
529
530
|
# File 'lib/review/index_builder.rb', line 528
def inline_sectitle(_id)
''
end
|
#inline_small(_str) ⇒ Object
604
605
606
|
# File 'lib/review/index_builder.rb', line 604
def inline_small(_str)
''
end
|
#inline_strong(_str) ⇒ Object
592
593
594
|
# File 'lib/review/index_builder.rb', line 592
def inline_strong(_str)
''
end
|
#inline_sub(_str) ⇒ Object
608
609
610
|
# File 'lib/review/index_builder.rb', line 608
def inline_sub(_str)
''
end
|
#inline_sup(_str) ⇒ Object
612
613
614
|
# File 'lib/review/index_builder.rb', line 612
def inline_sup(_str)
''
end
|
#inline_table(_id) ⇒ Object
418
419
420
|
# File 'lib/review/index_builder.rb', line 418
def inline_table(_id)
''
end
|
#inline_tcy(_arg) ⇒ Object
548
549
550
|
# File 'lib/review/index_builder.rb', line 548
def inline_tcy(_arg)
''
end
|
#inline_title(_id) ⇒ Object
402
403
404
|
# File 'lib/review/index_builder.rb', line 402
def inline_title(_id)
''
end
|
#inline_tt(_str) ⇒ Object
616
617
618
|
# File 'lib/review/index_builder.rb', line 616
def inline_tt(_str)
''
end
|
#inline_ttb(_str) ⇒ Object
456
457
458
|
# File 'lib/review/index_builder.rb', line 456
def inline_ttb(_str)
''
end
|
#inline_tti(_str) ⇒ Object
452
453
454
|
# File 'lib/review/index_builder.rb', line 452
def inline_tti(_str)
''
end
|
#inline_u(_str) ⇒ Object
628
629
630
|
# File 'lib/review/index_builder.rb', line 628
def inline_u(_str)
''
end
|
#inline_uchar(_str) ⇒ Object
643
644
645
|
# File 'lib/review/index_builder.rb', line 643
def inline_uchar(_str)
''
end
|
#inline_var(_str) ⇒ Object
596
597
598
|
# File 'lib/review/index_builder.rb', line 596
def inline_var(_str)
''
end
|
#inline_w(_s) ⇒ Object
556
557
558
|
# File 'lib/review/index_builder.rb', line 556
def inline_w(_s)
''
end
|
#inline_wb(_s) ⇒ Object
560
561
562
|
# File 'lib/review/index_builder.rb', line 560
def inline_wb(_s)
''
end
|
#label(id) ⇒ Object
359
360
361
|
# File 'lib/review/index_builder.rb', line 359
def label(id)
check_id(id)
end
|
#list(lines, id, caption, _lang = nil) ⇒ Object
249
250
251
252
253
254
255
|
# File 'lib/review/index_builder.rb', line 249
def list(lines, id, caption, _lang = nil)
check_id(id)
item = ReVIEW::Book::Index::Item.new(id, @list_index.size + 1)
@list_index.add_item(item)
compile_inline(caption)
lines.each { |line| compile_inline(line) }
end
|
#listnum(lines, id, caption, _lang = nil) ⇒ Object
262
263
264
265
266
267
268
|
# File 'lib/review/index_builder.rb', line 262
def listnum(lines, id, caption, _lang = nil)
check_id(id)
item = ReVIEW::Book::Index::Item.new(id, @list_index.size + 1)
@list_index.add_item(item)
compile_inline(caption)
lines.each { |line| compile_inline(line) }
end
|
#nodisp_begin(level, label, caption) ⇒ Object
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
# File 'lib/review/index_builder.rb', line 156
def nodisp_begin(level, label, caption)
check_id(label)
return if level < 2
cursor = level - 2
@headline_stack[cursor] = (label || caption)
if @headline_stack.size > cursor + 1
@headline_stack = @headline_stack.take(cursor + 1)
end
item_id = @headline_stack.join('|')
item = ReVIEW::Book::Index::Item.new(item_id, nil, caption)
@headline_index.add_item(item)
end
|
#nodisp_end(_level) ⇒ Object
173
174
|
# File 'lib/review/index_builder.rb', line 173
def nodisp_end(_level)
end
|
#nofunc_text(_str) ⇒ Object
240
241
242
|
# File 'lib/review/index_builder.rb', line 240
def nofunc_text(_str)
''
end
|
384
385
|
# File 'lib/review/index_builder.rb', line 384
def noindent
end
|
#nonum_begin(level, label, caption) ⇒ Object
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
# File 'lib/review/index_builder.rb', line 116
def nonum_begin(level, label, caption)
check_id(label)
return if level < 2
cursor = level - 2
@headline_stack[cursor] = (label || caption)
if @headline_stack.size > cursor + 1
@headline_stack = @headline_stack.take(cursor + 1)
end
item_id = @headline_stack.join('|')
item = ReVIEW::Book::Index::Item.new(item_id, nil, caption)
@headline_index.add_item(item)
end
|
#nonum_end(_level) ⇒ Object
133
134
|
# File 'lib/review/index_builder.rb', line 133
def nonum_end(_level)
end
|
#notoc_begin(level, label, caption) ⇒ Object
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
# File 'lib/review/index_builder.rb', line 136
def notoc_begin(level, label, caption)
check_id(label)
return if level < 2
cursor = level - 2
@headline_stack[cursor] = (label || caption)
if @headline_stack.size > cursor + 1
@headline_stack = @headline_stack.take(cursor + 1)
end
item_id = @headline_stack.join('|')
item = ReVIEW::Book::Index::Item.new(item_id, nil, caption)
@headline_index.add_item(item)
end
|
#notoc_end(_level) ⇒ Object
153
154
|
# File 'lib/review/index_builder.rb', line 153
def notoc_end(_level)
end
|
#numberlessimage(_lines, id, caption = '', _metric = nil) ⇒ Object
349
350
351
352
353
354
|
# File 'lib/review/index_builder.rb', line 349
def numberlessimage(_lines, id, caption = '', _metric = nil)
check_id(id)
item = ReVIEW::Book::Index::Item.new(id, @indepimage_index.size + 1)
@indepimage_index.add_item(item)
compile_inline(caption)
end
|
212
213
|
# File 'lib/review/index_builder.rb', line 212
def ol_begin
end
|
218
219
|
# File 'lib/review/index_builder.rb', line 218
def ol_end
end
|
#ol_item(lines, _num) ⇒ Object
215
216
|
# File 'lib/review/index_builder.rb', line 215
def ol_item(lines, _num)
end
|
#olnum(_num) ⇒ Object
374
375
|
# File 'lib/review/index_builder.rb', line 374
def olnum(_num)
end
|
#pagebreak ⇒ Object
377
378
|
# File 'lib/review/index_builder.rb', line 377
def pagebreak
end
|
#paragraph(lines) ⇒ Object
233
234
|
# File 'lib/review/index_builder.rb', line 233
def paragraph(lines)
end
|
236
237
238
|
# File 'lib/review/index_builder.rb', line 236
def parasep
''
end
|
#post_paragraph ⇒ Object
39
40
41
|
# File 'lib/review/index_builder.rb', line 39
def post_paragraph
''
end
|
#pre_paragraph ⇒ Object
35
36
37
|
# File 'lib/review/index_builder.rb', line 35
def pre_paragraph
''
end
|
#printendnotes ⇒ Object
387
388
|
# File 'lib/review/index_builder.rb', line 387
def printendnotes
end
|
#quote(lines) ⇒ Object
285
286
287
|
# File 'lib/review/index_builder.rb', line 285
def quote(lines)
lines.each { |line| compile_inline(line) }
end
|
#raw(_str) ⇒ Object
647
648
649
|
# File 'lib/review/index_builder.rb', line 647
def raw(_str)
''
end
|
#read(_lines) ⇒ Object
Also known as:
lead
244
245
|
# File 'lib/review/index_builder.rb', line 244
def read(_lines)
end
|
81
82
83
84
85
86
87
88
89
90
91
|
# File 'lib/review/index_builder.rb', line 81
def result
%i[footnote endnote].each do |name|
@crossref[name].each_pair do |k, v|
if v == 0
warn "#{@chapter.basename}: #{name} ID #{k} is not referred."
end
end
end
nil
end
|
#source(lines, caption = nil, _lang = nil) ⇒ Object
257
258
259
260
|
# File 'lib/review/index_builder.rb', line 257
def source(lines, caption = nil, _lang = nil)
compile_inline(caption)
lines.each { |line| compile_inline(line) }
end
|
#sup_begin(_level, label, _caption) ⇒ Object
193
194
195
|
# File 'lib/review/index_builder.rb', line 193
def sup_begin(_level, label, _caption)
check_id(label)
end
|
#sup_end(_level) ⇒ Object
197
198
|
# File 'lib/review/index_builder.rb', line 197
def sup_end(_level)
end
|
#table(lines, id = nil, caption = nil) ⇒ Object
296
297
298
299
300
301
302
303
304
|
# File 'lib/review/index_builder.rb', line 296
def table(lines, id = nil, caption = nil)
check_id(id)
if id
item = ReVIEW::Book::Index::Item.new(id, @table_index.size + 1, caption)
@table_index.add_item(item)
end
compile_inline(caption)
lines.each { |line| compile_inline(line) }
end
|
#target_name ⇒ Object
93
94
95
|
# File 'lib/review/index_builder.rb', line 93
def target_name
'index'
end
|
#texequation(_lines, id = nil, caption = '') ⇒ Object
660
661
662
663
664
665
666
667
|
# File 'lib/review/index_builder.rb', line 660
def texequation(_lines, id = nil, caption = '')
check_id(id)
if id
item = ReVIEW::Book::Index::Item.new(id, @equation_index.size + 1)
@equation_index.add_item(item)
end
compile_inline(caption)
end
|
#text(_str) ⇒ Object
504
505
506
|
# File 'lib/review/index_builder.rb', line 504
def text(_str)
''
end
|
#tsize(_str) ⇒ Object
687
688
689
|
# File 'lib/review/index_builder.rb', line 687
def tsize(_str)
''
end
|
200
201
|
# File 'lib/review/index_builder.rb', line 200
def ul_begin
end
|
209
210
|
# File 'lib/review/index_builder.rb', line 209
def ul_end
end
|
#ul_item_begin(lines) ⇒ Object
203
204
|
# File 'lib/review/index_builder.rb', line 203
def ul_item_begin(lines)
end
|
#ul_item_end ⇒ Object
206
207
|
# File 'lib/review/index_builder.rb', line 206
def ul_item_end
end
|
#unknown_command(*_args) ⇒ Object
703
704
705
|
# File 'lib/review/index_builder.rb', line 703
def unknown_command(*_args)
end
|
#xcolumn_begin(_level, label, _caption) ⇒ Object
186
187
188
|
# File 'lib/review/index_builder.rb', line 186
def xcolumn_begin(_level, label, _caption)
check_id(label)
end
|
#xcolumn_end(_level) ⇒ Object
190
191
|
# File 'lib/review/index_builder.rb', line 190
def xcolumn_end(_level)
end
|