Flowdock
method

list_name

Importance_0
v1_9_1_378 - Show latest stable - 0 notes - Class: ToLaTeX
list_name(list_type, is_open_tag) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rdoc/markup/to_latex.rb, line 273
  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
Register or log in to add new notes.