method
list_name

Ruby latest stable (v2_5_5)
-
0 notes -
Class: SM::ToLaTeX
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
list_name(list_type, is_open_tag)
private
Hide source
# File lib/rdoc/markup/simple_markup/to_latex.rb, line 277 def list_name(list_type, is_open_tag) tags = LIST_TYPE_TO_LATEX[list_type] || raise("Invalid list type: #{list_type.inspect}") if tags[2] # enumerate if is_open_tag @list_depth += 1 if @prev_list_types[@list_depth] != tags[2] case @list_depth when 1 roman = "i" when 2 roman = "ii" when 3 roman = "iii" when 4 roman = "iv" else raise("Too deep list: level #{@list_depth}") end @prev_list_types[@list_depth] = tags[2] return l("\\renewcommand{\\labelenum#{roman}}{#{tags[2]}{enum#{roman}}}") + "\n" + tags[0] end else @list_depth -= 1 end end tags[ is_open_tag ? 0 : 1] end