def setPageCounter(counter=None, style=None):
global _counter, _counterStyle
if counter is not None:
_counter = counter
if style is not None:
_counterStyle = style
if _counterStyle=='lowerroman':
ptext=toRoman(_counter).lower()
elif _counterStyle=='roman':
ptext=toRoman(_counter).upper()
elif _counterStyle=='alpha':
ptext=string.uppercase[_counter%26]
elif _counterStyle=='loweralpha':
ptext=string.lowercase[_counter%26]
else:
ptext=unicode(_counter)
return ptext
评论列表
文章目录