Aspose::Words::NumberStyle enum

NumberStyle enum

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

enum class NumberStyle : int

Values

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

Examples

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

auto doc = System::MakeObject<Aspose::Words::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.
System::SharedPtr<Aspose::Words::Lists::List> list = doc->get_Lists()->Add(ListTemplate::NumberDefault);

System::SharedPtr<Aspose::Words::Lists::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 = System::MakeObject<Aspose::Words::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(get_ArtifactsDir() + u"Lists.CreateCustomList.docx");

See Also