my goal is to create the following structure multi-levle list
二、 Titie
(一) sub_titile
<tab space>1. sub_sub_title
<tab space><tab space>(1)sub_sub_subtitle
<tab space><tab space><tab space>a. sub_sub_sub_sub_title
but my code prodoce the following result
二、 Titie
(一) sub_titile
1. sub_sub_title
(1) sub_sub_subtitle
<tab space><tab space><tab space> a. sub_sub_sub_sub_title
i creat the custom liststyle with the following code
- Code: Select all
ListStyle listStyle = new ListStyle(document, ListType.Numbered);
listStyle.Name = "levelstyle";
listStyle.Levels[0].PatternType = ListPatternType.ChineseCounting;
listStyle.Levels[0].NumberPrefix = "第";
listStyle.Levels[0].NumberSufix = "章";
listStyle.Levels[0].ParagraphFormat.SetLeftIndent(0);
listStyle.Levels[0].ParagraphFormat.SetFirstLineIndent(0);
listStyle.Levels[1].PatternType = ListPatternType.ChineseCounting;
listStyle.Levels[1].NumberSufix = "、";
listStyle.Levels[1].NumberPosition = -25;
listStyle.Levels[1].ParagraphFormat.SetLeftIndent(25);
listStyle.Levels[1].ParagraphFormat.SetFirstLineIndent(0);
listStyle.Levels[2].PatternType = ListPatternType.Arabic;
listStyle.Levels[2].NumberPrefix = "(";
listStyle.Levels[2].NumberSufix = ")";
listStyle.Levels[2].CharacterFormat.FontSize = contentformat.FontSize;
listStyle.Levels[2].CharacterFormat.FontName = "DFKai-SB";
listStyle.Levels[2].ParagraphFormat.SetLeftIndent(30);
listStyle.Levels[2].ParagraphFormat.SetFirstLineIndent(0);
listStyle.Levels[2].NumberPosition = -30;
listStyle.Levels[2].NumberAlignment = ListNumberAlignment.Left;
listStyle.Levels[3].PatternType = ListPatternType.Arabic;
listStyle.Levels[3].ParagraphFormat.SetLeftIndent(40);
listStyle.Levels[3].ParagraphFormat.SetFirstLineIndent(0);
listStyle.Levels[3].NumberPosition = -40;
listStyle.Levels[4].PatternType = ListPatternType.LowLetter;
listStyle.Levels[4].NumberPosition = -60;
listStyle.Levels[4].ParagraphFormat.SetLeftIndent(60);
listStyle.Levels[4].ParagraphFormat.SetFirstLineIndent(0);
document.ListStyles.Add(listStyle);
any suggestion of solving the indent and header misalign issue?