method

list_name

ruby latest stable - Class: RDoc::Markup::ToLaTeX

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_1_378) is shown here.

list_name(list_type, is_open_tag)
private

No documentation available.

# 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