Method: IsoDoc::Function::XrefGen#listlabel

Defined in:
lib/isodoc/function/xref_gen.rb

#listlabel(depth, i) ⇒ Object



101
102
103
104
105
106
107
108
# File 'lib/isodoc/function/xref_gen.rb', line 101

def listlabel(depth, i)
  return i.to_s if [2, 7].include? depth
  return (96 + i).chr.to_s if [1, 6].include? depth
  return (64 + i).chr.to_s if [4, 9].include? depth
  return RomanNumerals.to_roman(i).downcase if [3, 8].include? depth
  return RomanNumerals.to_roman(i).upcase if [5, 10].include? depth
  return i.to_s
end