Class: ReVIEW::IndexBuilder

Inherits:
Builder show all
Defined in:
lib/review/index_builder.rb

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

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_indexObject (readonly)

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_indexObject (readonly)

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_indexObject (readonly)

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_indexObject (readonly)

Returns the value of attribute equation_index.



16
17
18
# File 'lib/review/index_builder.rb', line 16

def equation_index
  @equation_index
end

#footnote_indexObject (readonly)

Returns the value of attribute footnote_index.



16
17
18
# File 'lib/review/index_builder.rb', line 16

def footnote_index
  @footnote_index
end

#headline_indexObject (readonly)

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_indexObject (readonly)

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_indexObject (readonly)

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_indexObject (readonly)

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_indexObject (readonly)

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_indexObject (readonly)

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_indexObject (readonly)

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

#blanklineObject



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

#comment(lines, comment = nil) ⇒ Object



312
313
# File 'lib/review/index_builder.rb', line 312

def comment(lines, comment = 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

#dl_beginObject



221
222
# File 'lib/review/index_builder.rb', line 221

def dl_begin
end

#dl_endObject



230
231
# File 'lib/review/index_builder.rb', line 230

def dl_end
end

#dt(line) ⇒ Object



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)
  # item = ReVIEW::Book::TableIndex::Item.new(id, @table_index.size + 1)
  # @table_index << item
  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

override



656
657
658
# File 'lib/review/index_builder.rb', line 656

def error(msg = nil)
  # ignore in indexing
end

#extract_chapter_id(_chap_ref) ⇒ Object



673
674
675
# File 'lib/review/index_builder.rb', line 673

def extract_chapter_id(_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

#footnote(id, str) ⇒ Object



326
327
328
329
330
331
332
# File 'lib/review/index_builder.rb', line 326

def footnote(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

Returns:

  • (Boolean)


699
700
701
# File 'lib/review/index_builder.rb', line 699

def highlight?
  false
end

#hrObject



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)

  ## to find image path
  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

#inline_pageref(_id) ⇒ Object



544
545
546
# File 'lib/review/index_builder.rb', line 544

def inline_pageref(_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

#noindentObject



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

#ol_beginObject



212
213
# File 'lib/review/index_builder.rb', line 212

def ol_begin
end

#ol_endObject



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

#pagebreakObject



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

#parasepObject



236
237
238
# File 'lib/review/index_builder.rb', line 236

def parasep
  ''
end

#post_paragraphObject



39
40
41
# File 'lib/review/index_builder.rb', line 39

def post_paragraph
  ''
end

#pre_paragraphObject



35
36
37
# File 'lib/review/index_builder.rb', line 35

def pre_paragraph
  ''
end

#printendnotesObject



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

#resultObject



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_nameObject



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

#ul_beginObject



200
201
# File 'lib/review/index_builder.rb', line 200

def ul_begin
end

#ul_endObject



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_endObject



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)
  # ignore
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