Aspose::Words::NumberStyle enum

NumberStyle enum

Specifies the number style for a list, footnotes and endnotes, page numbers.

enum class NumberStyle

Values

NameValueDescription
Arabic0Arabic numbering (1, 2, 3, …)
UppercaseRoman1Upper case Roman (I, II, III, …)
LowercaseRoman2Lower case Roman (i, ii, iii, …)
UppercaseLetter3Upper case Letter (A, B, C, …)
LowercaseLetter4Lower case letter (a, b, c, …)
Ordinal5Ordinal (1st, 2nd, 3rd, …)
Number6Numbered (One, Two, Three, …)
OrdinalText7Ordinal (text) (First, Second, Third, …)
Hex8Hexadecimal: 8, 9, A, B, C, D, E, F, 10, 11, 12.
ChicagoManual9Chicago Manual of Style: *, †, †
Kanji10Ideograph-digital.
KanjiDigit11Japanese counting.
AiueoHalfWidth12Aiueo.
IrohaHalfWidth13Iroha.
ArabicFullWidth14Full-width Arabic: 1, 2, 3, 4.
ArabicHalfWidth15Half-width Arabic: 1, 2, 3, 4.
KanjiTraditional16Japanese legal.
KanjiTraditional217Japanese digital ten thousand.
NumberInCircle18Enclosed circles.
DecimalFullWidth19Decimal full width: 1, 2, 3, 4.
Aiueo20Aiueo full width.
Iroha21Iroha full width.
LeadingZero22Leading Zero (01, 02,…, 09, 10, 11,…, 99, 100, 101,…)
Bullet23Bullet (check the character code in the text)
Ganada24Korean Ganada.
Chosung25Korea Chosung.
GB126Enclosed full stop.
GB227Enclosed parenthesis.
GB328Enclosed circle Chinese.
GB429Ideograph enclosed circle.
Zodiac130Ideograph traditional.
Zodiac231Ideograph Zodiac.
Zodiac332Ideograph Zodiac traditional.
TradChinNum133Taiwanese counting.
TradChinNum234Ideograph legal traditional.
TradChinNum335Taiwanese counting thousand.
TradChinNum436Taiwanese digital.
SimpChinNum137Chinese counting.
SimpChinNum238Chinese legal simplified.
SimpChinNum339Chinese counting thousand.
SimpChinNum440Chinese (not implemented)
HanjaRead41Korean digital.
HanjaReadDigit42Korean counting.
Hangul43Korea legal.
Hanja44Korea digital2.
Hebrew145Hebrew-1.
Arabic146Arabic alpha.
Hebrew247Hebrew-2.
Arabic248Arabic abjad.
HindiLetter149Hindi vowels.
HindiLetter250Hindi consonants.
HindiArabic51Hindi numbers.
HindiCardinalText52Hindi descriptive (cardinals)
ThaiLetter53Thai letters.
ThaiArabic54Thai numbers.
ThaiCardinalText55Thai descriptive (cardinals)
VietCardinalText56Vietnamese descriptive (cardinals)
NumberInDash57Page number format: - 1 -, - 2 -, - 3 -, - 4 -.
LowercaseRussian58Lowercase Russian alphabet.
UppercaseRussian59Uppercase Russian alphabet.
None255No bullet or number.
Custom65280Custom number format. It is supported by DOCX format only.

Examples

Shows how to apply custom list formatting to paragraphs when using DocumentBuilder.

auto doc = MakeObject<Document>();

// A list allows us to organize and decorate sets of paragraphs with prefix symbols and indents.
// We can create nested lists by increasing the indent level.
// We can begin and end a list by using a document builder's "ListFormat" property.
// Each paragraph that we add between a list's start and the end will become an item in the list.
// Create a list from a Microsoft Word template, and customize the first two of its list levels.
SharedPtr<List> list = doc->get_Lists()->Add(ListTemplate::NumberDefault);

SharedPtr<ListLevel> listLevel = list->get_ListLevels()->idx_get(0);
listLevel->get_Font()->set_Color(System::Drawing::Color::get_Red());
listLevel->get_Font()->set_Size(24);
listLevel->set_NumberStyle(NumberStyle::OrdinalText);
listLevel->set_StartAt(21);
listLevel->set_NumberFormat(u"\x0000");

listLevel->set_NumberPosition(-36);
listLevel->set_TextPosition(144);
listLevel->set_TabPosition(144);

listLevel = list->get_ListLevels()->idx_get(1);
listLevel->set_Alignment(ListLevelAlignment::Right);
listLevel->set_NumberStyle(NumberStyle::Bullet);
listLevel->get_Font()->set_Name(u"Wingdings");
listLevel->get_Font()->set_Color(System::Drawing::Color::get_Blue());
listLevel->get_Font()->set_Size(24);

// This NumberFormat value will create star-shaped bullet list symbols.
listLevel->set_NumberFormat(u"\xf0af");
listLevel->set_TrailingCharacter(ListTrailingCharacter::Space);
listLevel->set_NumberPosition(144);

// Create paragraphs and apply both list levels of our custom list formatting to them.
auto builder = MakeObject<DocumentBuilder>(doc);

builder->get_ListFormat()->set_List(list);
builder->Writeln(u"The quick brown fox...");
builder->Writeln(u"The quick brown fox...");

builder->get_ListFormat()->ListIndent();
builder->Writeln(u"jumped over the lazy dog.");
builder->Writeln(u"jumped over the lazy dog.");

builder->get_ListFormat()->ListOutdent();
builder->Writeln(u"The quick brown fox...");

builder->get_ListFormat()->RemoveNumbers();

builder->get_Document()->Save(ArtifactsDir + u"Lists.CreateCustomList.docx");

See Also