class ReVIEW::TOPBuilder

Public Instance Methods

base_block(type, lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 260
def base_block(type, lines, caption = nil)
  blank
  puts "◆→開始:#{@titles[type]}←◆"
  puts "■#{compile_inline(caption)}" unless caption.nil?
  puts lines.join("\n")
  puts "◆→終了:#{@titles[type]}←◆"
  blank
end
base_parablock(type, lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 269
def base_parablock(type, lines, caption = nil)
  blank
  puts "◆→開始:#{@titles[type]}←◆"
  puts "■#{compile_inline(caption)}" unless caption.nil?
  puts split_paragraph(lines).join("\n")
  puts "◆→終了:#{@titles[type]}←◆"
  blank
end
best(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 641
def best(lines, caption = nil)
  base_parablock "best", lines, caption
end
box(lines, caption = nil)
Alias for: insn
bpo(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 727
def bpo(lines)
  base_block "bpo", lines, nil
end
caution(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 653
def caution(lines, caption = nil)
  base_parablock "caution", lines, caption
end
centering(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 617
def centering(lines)
  base_parablock "centering", lines, nil
end
circle_begin(level, label, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 794
def circle_begin(level, label, caption)
  puts "・\t#{caption}"
end
circle_end(level) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 798
def circle_end(level)
end
cmd(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 302
def cmd(lines, caption = nil)
  base_block "cmd", lines, caption
end
column_begin(level, label, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 549
def column_begin(level, label, caption)
  common_column_begin("column", caption)
end
column_end(level) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 553
def column_end(level)
  common_column_end("column")
end
comment(lines, comment = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 386
def comment(lines, comment = nil)
  lines ||= []
  lines.unshift comment unless comment.blank?
  str = lines.join("")
  puts "◆→DTP連絡:#{str}←◆"
end
common_column_begin(type, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 538
def common_column_begin(type, caption)
  blank
  puts "◆→開始:#{@titles[type]}←◆"
  puts %Q[■#{compile_inline(caption)}]
end
common_column_end(type) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 544
def common_column_end(type)
  puts %Q[◆→終了:#{@titles[type]}←◆]
  blank
end
compile_href(url, label) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 412
def compile_href(url, label)
  if label.nil?
    %Q[△#{url}☆]
  else
    %Q[#{label}(△#{url}☆)]
  end
end
compile_kw(word, alt) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 405
def compile_kw(word, alt)
  if alt
  then "★#{word}☆(#{alt.strip})"
  else "★#{word}☆"
  end
end
compile_ruby(base, ruby) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 401
def compile_ruby(base, ruby)
  "#{base}◆→DTP連絡:「#{base}」に「#{ruby}」とルビ←◆"
end
dd(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 208
def dd(lines)
  split_paragraph(lines).each do |paragraph|
    puts "\t#{paragraph.gsub(/\n/, '')}"
  end
end
dl_begin() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 200
def dl_begin
  blank
end
dl_end() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 214
def dl_end
  blank
end
dt(line) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 204
def dt(line)
  puts "★#{line}☆"
end
dtp(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 723
def dtp(str)
  # FIXME
end
edition_begin(level, label, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 581
def edition_begin(level, label, caption)
  common_column_begin("edition", caption)
end
edition_end(level) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 585
def edition_end(level)
  common_column_end("edition")
end
emlist(lines, caption = nil, lang = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 278
def emlist(lines, caption = nil, lang = nil)
  base_block "emlist", lines, caption
end
emlistnum(lines, caption = nil, lang = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 282
def emlistnum(lines, caption = nil, lang = nil)
  blank
  puts "◆→開始:#{@titles["emlist"]}←◆"
  puts "■#{compile_inline(caption)}" unless caption.nil?
  _lines = []
  lines.each_with_index do |line, i|
    puts (i + 1).to_s.rjust(2) + ": #{line}"
  end
  puts "◆→終了:#{@titles["emlist"]}←◆"
  blank
end
error(msg) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 127
def error(msg)
  $stderr.puts "#{@location.filename}:#{@location.lineno}: error: #{msg}"
end
expert(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 685
def expert(lines)
  base_parablock "expert", lines, nil
end
extname() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 44
def extname
  '.txt'
end
flushright(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 613
def flushright(lines)
  base_parablock "flushright", lines, nil
end
footnote(id, str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 393
def footnote(id, str)
  puts "【注#{@chapter.footnote(id).number}】#{compile_inline(str)}"
end
headline(level, label, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 135
def headline(level, label, caption)
  prefix = ""
  blank
  case level
  when 1
    if @chapter.number.to_s =~ /\A\d+\Z/
      prefix = "第#{@chapter.number}章 "
    elsif @chapter.number.present?
      prefix = "#{@chapter.number} "
    end
    @section = 0
    @subsection = 0
    @subsubsection = 0
    @subsubsubsection = 0
  when 2
    @section += 1
    prefix = @chapter.number.present? ? "#{@chapter.number}.#{@section} " : ""
    @subsection = 0
    @subsubsection = 0
    @subsubsubsection = 0
  when 3
    @subsection += 1
    prefix = @chapter.number.present? ? "#{@chapter.number}.#{@section}.#{@subsection} " : ""
    @subsubsection = 0
    @subsubsubsection = 0
  when 4
    @subsubsection += 1
    prefix = @chapter.number.present? ? "#{@chapter.number}.#{@section}.#{@subsection}.#{@subsubsection} " : ""
    @subsubsubsection = 0
  when 5
    @subsubsubsection += 1
    prefix = @chapter.number.present? ? "#{@chapter.number}.#{@section}.#{@subsection}.#{@subsubsection}.#{@subsubsubsection} " : ""
  else
    raise "caption level too deep or unsupported: #{level}"
  end
  prefix = "" if (level.to_i > @book.config["secnolevel"])
  puts "■H#{level}■#{prefix}#{compile_inline(caption)}"
end
hood_begin(level, label, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 573
def hood_begin(level, label, caption)
  common_column_begin("hood", caption)
end
hood_end(level) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 577
def hood_end(level)
  common_column_end("hood")
end
image(lines, id, caption, metric=nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 328
def image(lines, id, caption, metric=nil)
  blank
  puts "◆→開始:#{@titles["image"]}←◆"
  if get_chap.nil?
    puts "#{I18n.t("image")}#{I18n.t("format_number_without_chapter", [@chapter.image(id).number])}#{I18n.t("caption_prefix_idgxml")}#{compile_inline(caption)}"
  else
    puts "#{I18n.t("image")}#{I18n.t("format_number", [get_chap, @chapter.image(id).number])}#{I18n.t("caption_prefix_idgxml")}#{compile_inline(caption)}"
  end
  blank
  if @chapter.image(id).bound?
    puts "◆→#{@chapter.image(id).path}←◆"
  else
    lines.each do |line|
      puts line
    end
  end
  puts "◆→終了:#{@titles["image"]}←◆"
  blank
end
important(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 645
def important(lines, caption = nil)
  base_parablock "important", lines, caption
end
indepimage(id, caption=nil, metric=nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 699
def indepimage(id, caption=nil, metric=nil)
  blank
  begin
    puts "◆→画像 #{@chapter.image(id).path.sub(/\A\.\//, "")} #{metric.join(" ")}←◆"
  rescue
    warn "no such image: #{id}"
    puts "◆→画像 #{id}←◆"
  end
  puts "図 #{compile_inline(caption)}" if caption.present?
  blank
end
Also aliased as: numberlessimage, numberlessimage
info(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 633
def info(lines, caption = nil)
  base_parablock "info", lines, caption
end
inline_ami(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 448
def inline_ami(str)
  "#{str}◆→DTP連絡:「#{str}」に網カケ←◆"
end
inline_b(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 456
def inline_b(str)
  "★#{str}☆"
end
Also aliased as: inline_strong, inline_strong
inline_balloon(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 497
def inline_balloon(str)
  %Q(\t←#{str.gsub(/@maru\[(\d+)\]/, inline_maru('\1'))})
end
inline_bou(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 489
def inline_bou(str)
  "#{str}◆→DTP連絡:「#{str}」に傍点←◆"
end
inline_br(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 745
def inline_br(str)
  %Q(\n)
end
inline_chap(id) click to toggle source
Calls superclass method ReVIEW::Builder#inline_chap
# File ../../../../../lib/review/topbuilder.rb, line 753
def inline_chap(id)
  #"「第#{super}章 #{inline_title(id)}」"
  # "第#{super}章"
  super
end
inline_chapref(id) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 759
def inline_chapref(id)
  chs = ["", "「", "」"]
  unless @book.config["chapref"].nil?
    _chs = @book.config["chapref"].split(",")
    if _chs.size != 3
      error "--chapsplitter must have exactly 3 parameters with comma."
    else
      chs = _chs
    end
  else
  end
  "#{chs[0]}#{@book.chapter_index.number(id)}#{chs[1]}#{@book.chapter_index.title(id)}#{chs[2]}"
rescue KeyError
  error "unknown chapter: #{id}"
  nofunc_text("[UnknownChapter:#{id}]")
end
inline_code(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 741
def inline_code(str)
  %Q[△#{str}☆]
end
inline_comment(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 505
def inline_comment(str)
  if @book.config["draft"]
    %Q[◆→DTP連絡:#{str}←◆]
  else
    ""
  end
end
inline_del(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 736
def inline_del(str)
  # FIXME
  ""
end
inline_dtp(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 731
def inline_dtp(str)
  # FIXME
  ""
end
inline_fn(id) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 397
def inline_fn(id)
  "【注#{@chapter.footnote(id).number}】"
end
inline_hd_chap(chap, id) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 517
def inline_hd_chap(chap, id)
  if chap.number
    n = chap.headline_index.number(id)
    if @book.config["secnolevel"] >= n.split('.').size
      return I18n.t("chapter_quote", "#{n} #{compile_inline(chap.headline(id).caption)}")
    end
  end
  I18n.t("chapter_quote", compile_inline(chap.headline(id).caption))
end
inline_hidx(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 444
def inline_hidx(str)
  "◆→索引項目:#{str}←◆"
end
inline_hint(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 432
def inline_hint(str)
  "◆→ヒントスタイルここから←◆#{str}◆→ヒントスタイルここまで←◆"
end
inline_i(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 452
def inline_i(str)
  "▲#{str}☆"
end
inline_icon(id) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 480
def inline_icon(id)
  begin
    return "◆→画像 #{@chapter.image(id).path.sub(/\A\.\//, "")}←◆"
  rescue
    warn "no such icon image: #{id}"
    return "◆→画像 #{id}←◆"
  end
end
inline_idx(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 440
def inline_idx(str)
  "#{str}◆→索引項目:#{str}←◆"
end
inline_img(id) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 319
def inline_img(id)
  chapter, id = extract_chapter_id(id)
  if get_chap(chapter).nil?
    "#{I18n.t("image")}#{I18n.t("format_number_without_chapter", [chapter.image(id).number])}"
  else
    "#{I18n.t("image")}#{I18n.t("format_number", [get_chap(chapter), chapter.image(id).number])}"
  end
end
inline_keytop(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 493
def inline_keytop(str)
  "#{str}◆→キートップ#{str}←◆"
end
inline_labelref(idref) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 784
def inline_labelref(idref)
  %Q(「◆→#{idref}←◆」) # 節、項を参照
end
Also aliased as: inline_ref, inline_ref
inline_list(id) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 231
def inline_list(id)
  chapter, id = extract_chapter_id(id)
  if get_chap(chapter).nil?
    %Q[#{I18n.t("list")}#{I18n.t("format_number_without_chapter", [@chapter.list(id).number])}]
  else
    %Q[#{I18n.t("list")}#{I18n.t("format_number", [get_chap(chapter), @chapter.list(id).number])}]
  end

end
inline_m(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 513
def inline_m(str)
  %Q[◆→TeX式ここから←◆#{str}◆→TeX式ここまで←◆]
end
inline_maru(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 436
def inline_maru(str)
  "#{str}◆→丸数字#{str}←◆"
end
inline_pageref(idref) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 790
def inline_pageref(idref)
  %Q(●ページ◆→#{idref}←◆) # ページ番号を参照
end
inline_raw(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 428
def inline_raw(str)
  %Q[#{super(str).gsub("\\n", "\n")}]
end
inline_ref(idref)
Alias for: inline_labelref
inline_strong(str)
Alias for: inline_b
inline_sub(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 424
def inline_sub(str)
  "#{str}◆→DTP連絡:「#{str}」は下付き←◆"
end
inline_sup(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 420
def inline_sup(str)
  "#{str}◆→DTP連絡:「#{str}」は上付き←◆"
end
inline_table(id) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 310
def inline_table(id)
  chapter, id = extract_chapter_id(id)
  if get_chap(chapter).nil?
    "#{I18n.t("table")}#{I18n.t("format_number_without_chapter", [chapter.table(id).number])}"
  else
    "#{I18n.t("table")}#{I18n.t("format_number", [get_chap(chapter), chapter.table(id).number])}"
  end
end
inline_tt(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 462
def inline_tt(str)
  "△#{str}☆"
end
inline_ttb(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 466
def inline_ttb(str)
  "★#{str}☆◆→等幅フォント太字←◆"
end
Also aliased as: inline_ttbold, inline_ttbold
inline_ttbold(str)
Alias for: inline_ttb
inline_tti(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 472
def inline_tti(str)
  "▲#{str}☆◆→等幅フォントイタ←◆"
end
inline_ttibold(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 780
def inline_ttibold(str)
  "▲#{str}☆◆→等幅フォント太字イタ←◆"
end
inline_u(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 476
def inline_u(str)
  "@#{str}@◆→@〜@部分に下線←◆"
end
inline_uchar(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 501
def inline_uchar(str)
  [str.to_i(16)].pack("U")
end
insideout_begin(level, label, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 589
def insideout_begin(level, label, caption)
  common_column_begin("insideout", caption)
end
insideout_end(level) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 593
def insideout_end(level)
  common_column_end("insideout")
end
insn(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 689
def insn(lines, caption = nil)
  base_block "insn", lines, caption
end
Also aliased as: box, box
label(id) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 713
def label(id)
  # FIXME
  ""
end
lead(lines)
Alias for: read
list_body(id, lines, lang) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 252
def list_body(id, lines, lang)
  lines.each do |line|
    puts detab(line)
  end
  puts "◆→終了:#{@titles["list"]}←◆"
  blank
end
list_header(id, caption, lang) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 241
def list_header(id, caption, lang)
  blank
  puts "◆→開始:#{@titles["list"]}←◆"
  if get_chap.nil?
    puts %Q[#{I18n.t("list")}#{I18n.t("format_number_without_chapter", [@chapter.list(id).number])}#{I18n.t("caption_prefix_idgxml")}#{compile_inline(caption)}]
  else
    puts %Q[#{I18n.t("list")}#{I18n.t("format_number", [get_chap, @chapter.list(id).number])}#{I18n.t("caption_prefix_idgxml")}#{compile_inline(caption)}]
  end
  blank
end
listnum_body(lines, lang) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 294
def listnum_body(lines, lang)
  lines.each_with_index do |line, i|
    puts (i + 1).to_s.rjust(2) + ": #{line}"
  end
  puts "◆→終了:#{@titles["list"]}←◆"
  blank
end
memo(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 625
def memo(lines, caption = nil)
  base_parablock "memo", lines, caption
end
messages() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 131
def messages
  error_messages() + warning_messages()
end
nofunc_text(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 801
def nofunc_text(str)
  str
end
noindent() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 527
def noindent
  puts "◆→DTP連絡:次の1行インデントなし←◆"
end
nonum_begin(level, label, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 531
def nonum_begin(level, label, caption)
  puts "■H#{level}■#{compile_inline(caption)}"
end
nonum_end(level) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 535
def nonum_end(level)
end
note(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 621
def note(lines, caption = nil)
  base_parablock "note", lines, caption
end
notice(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 665
def notice(lines, caption = nil)
  base_parablock "notice", lines, caption
end
numberlessimage(id, caption=nil, metric=nil)
Alias for: indepimage
ol_begin() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 186
def ol_begin
  blank
  @olitem = 0
end
ol_end() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 195
def ol_end
  blank
  @olitem = nil
end
ol_item(lines, num) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 191
def ol_item(lines, num)
  puts "#{num}\t#{lines.join}"
end
paragraph(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 218
def paragraph(lines)
  puts lines.join
end
planning(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 637
def planning(lines, caption = nil)
  base_parablock "planning", lines, caption
end
point(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 669
def point(lines, caption = nil)
  base_parablock "point", lines, caption
end
post_paragraph() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 40
def post_paragraph
  ''
end
practice(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 681
def practice(lines)
  base_parablock "practice", lines, nil
end
pre_paragraph() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 36
def pre_paragraph
  ''
end
quote(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 306
def quote(lines)
  base_parablock "quote", lines, nil
end
read(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 222
def read(lines)
  puts "◆→開始:#{@titles["lead"]}←◆"
  puts split_paragraph(lines).join("\n")
  puts "◆→終了:#{@titles["lead"]}←◆"
  blank
end
Also aliased as: lead, lead
ref_begin(level, label, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 597
def ref_begin(level, label, caption)
  common_column_begin("ref", caption)
end
ref_end(level) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 601
def ref_end(level)
  common_column_end("ref")
end
reference(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 677
def reference(lines)
  base_parablock "reference", lines, nil
end
result() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 119
def result
  @output.string
end
security(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 649
def security(lines, caption = nil)
  base_parablock "security", lines, caption
end
shoot(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 673
def shoot(lines, caption = nil)
  base_parablock "shoot", lines, caption
end
source(lines, caption = nil, lang = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 776
def source(lines, caption = nil, lang = nil)
  base_block "source", lines, caption
end
sup_begin(level, label, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 605
def sup_begin(level, label, caption)
  common_column_begin("sup", caption)
end
sup_end(level) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 609
def sup_end(level)
  common_column_end("sup")
end
table_begin(ncols) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 366
def table_begin(ncols)
end
table_end() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 381
def table_end
  puts "◆→終了:#{@titles["table"]}←◆"
  blank
end
table_header(id, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 355
def table_header(id, caption)
  blank
  puts "◆→開始:#{@titles["table"]}←◆"
  if get_chap.nil?
    puts "#{I18n.t("table")}#{I18n.t("format_number_without_chapter", [@chapter.table(id).number])}#{I18n.t("caption_prefix_idgxml")}#{compile_inline(caption)}"
  else
    puts "#{I18n.t("table")}#{I18n.t("format_number", [get_chap, @chapter.table(id).number])}#{I18n.t("caption_prefix_idgxml")}#{compile_inline(caption)}"
  end
  blank
end
td(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 377
def td(str)
  str
end
term(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 657
def term(lines)
  base_parablock "term", lines, nil
end
texequation(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 348
def texequation(lines)
  puts "◆→開始:#{@titles["texequation"]}←◆"
  puts "#{lines.join("\n")}"
  puts "◆→終了:#{@titles["texequation"]}←◆"
  blank
end
text(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 749
def text(str)
  str
end
th(str) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 373
def th(str)
  "★#{str}☆"
end
tip(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 629
def tip(lines, caption = nil)
  base_parablock "tip", lines, caption
end
tr(rows) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 369
def tr(rows)
  puts rows.join("\t")
end
tsize(id) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 718
def tsize(id)
  # FIXME
  ""
end
ul_begin() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 174
def ul_begin
  blank
end
ul_end() click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 182
def ul_end
  blank
end
ul_item(lines) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 178
def ul_item(lines)
  puts "●\t#{lines.join}"
end
warn(msg) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 123
def warn(msg)
  $stderr.puts "#{@location.filename}:#{@location.lineno}: warning: #{msg}"
end
warning(lines, caption = nil) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 693
def warning(lines, caption = nil)
  base_parablock "warning", lines, caption
end
world_begin(level, label, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 565
def world_begin(level, label, caption)
  common_column_begin("world", caption)
end
world_end(level) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 569
def world_end(level)
  common_column_end("world")
end
xcolumn_begin(level, label, caption) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 557
def xcolumn_begin(level, label, caption)
  common_column_begin("xcolumn", caption)
end
xcolumn_end(level) click to toggle source
# File ../../../../../lib/review/topbuilder.rb, line 561
def xcolumn_end(level)
  common_column_end("xcolumn")
end