Documentation
¶
Overview ¶
Package label writes the labels a reader sees in front of list items and on pages: bullets, and numbers as letters and Roman numerals, and reads Roman numerals back. Moved here from go-fast-ooxml and go-fast-msbin (internal/label, the same in both), with Alpha, the lettering HTML, RTF and OpenDocument use, and the page labels of go-fast-pdf.
Index ¶
Constants ¶
const MaxParseThousands = 64
MaxParseThousands bounds the Ms ParseRoman reads: the most RomanN writes for a PDF's page labels.
Variables ¶
This section is empty.
Functions ¶
func Alpha ¶
Alpha writes 1 as A, 26 as Z, 27 as AA, 28 as AB: it counts in base 26 without a zero, as CSS's upper-alpha, RTF and OpenDocument (without letter synchronisation) do. It returns "" for a number below 1.
func Bullet ¶
Bullet returns the character a reader sees for a bullet definition. Bullets are usually stored as a code of a symbol font, often in the private range; the code is translated by the font's table, and a code with no character, or a bullet with nothing to show, becomes a plain bullet.
func Letters ¶
Letters writes 1 as A, 26 as Z, 27 as AA, 28 as BB: Office repeats the letter, it does not count in base 26 (see Alpha). It is LettersN with 30 repeats, and returns "" for a number past 780.
func LettersN ¶ added in v0.1.22
LettersN writes a number as Letters does, the letter repeated at most repeats times: from 1 to 26*repeats. It returns "" for any other number. go-fast-pdf writes page labels with up to 64 repeats.
func ParseRoman ¶ added in v0.1.22
ParseRoman reads a Roman numeral, in capitals or small letters (or both), and reports whether s is one: exactly what RomanN writes for its value, with at most MaxParseThousands thousands. "IIII", "VX" and "" are not numerals.
func Roman ¶
Roman writes a number from 1 to 3999 in capital Roman numerals, and "" for any other: RomanN with three thousands, as Office numbers lists.
Types ¶
This section is empty.