code: def counter_style(self, val, style):
          
          if style == 'decimal-leading-zero':
              if val < 10:
                  valstr = "0{}".format(val)
              else:
                  valstr = str(val)
          elif style == 'lower-roman':
              valstr = _to_roman(val).lower()
          elif style == 'upper-roman':
              valstr = _to_roman(val)
          elif style == 'lower-latin' or style == 'lower-alpha':
              if 1 <= val <= 26:
                  valstr = chr(val + 96)
              else:
                  log(WARN, 'Counter out of range for latin (must be 1...26)')
                  valstr = str(val)
          elif style == 'upper-latin' or style == 'upper-alpha':
              if 1 <= val <= 26:
                  valstr = chr(val + 64)
              else:
                  log(WARN, 'Counter out of range for latin (must be 1...26)')
                  valstr = str(val)
          elif style == 'decimal':
              valstr = str(val)
          else:
              log(WARN, u"ERROR: Counter numbering not supported for"
                  u" list type {}. Using decimal.".format(
                      style).encode('utf-8'))
              valstr = str(val)
          return valstr
docs: Return counter value in given style.