ChapterAutoNumber make chapter header with dot after its number (example: 1. Chapter name).
I need to remove ending dot (example: 1 Chapter name).
How can i do it?
The same problem with sections.
Can you add how you use ChapterAutoNumber?
In Section you can find
public static final int NUMBERSTYLE_DOTTED = 0; and
public static final int NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT = 1;
maybe this could help you?
I'm use ChapterAutoNumber like this:
ChapterAutoNumber chapter = new ChapterAutoNumber(new Paragraph(chapterTitle));
for (lib.text.model.element.Element element : rubric) {
chapter.add(new Paragraph(element.getText()));
}
// Sections
for (Rubric subRubric: rubric.getSubrubrics()) {
Paragraph sectTitle = new Paragraph(subRubric.getTitle());
Section section = chapter.addSection(sectTitle);
section.setIndentationLeft(settings.indentSize);
for (lib.text.model.element.Element element : subRubric) {
chapter.add(new Paragraph(element.getText()));
}
}
pdfDoc.add(chapter);
Yes. public static final int NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT = 1; is what i need.
chapter.setNumberStyle(NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT); works fine.
Thanks.
Most helpful comment
I'm use ChapterAutoNumber like this:
Yes.
public static final int NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT = 1;is what i need.chapter.setNumberStyle(NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT);works fine.Thanks.