Numbering start from number doesn't work
See original GitHub issueMy greetings 😃 This list men to to start from 50, but it does not. Do I do something wrong or feature got corrupted? Tested on 6.0.1, 6.0.3 Based on: https://github.com/dolanmiu/docx/blob/7acd9e1/src/file/numbering/level.ts#L89
const fs = require('fs');
const { Document, Packer, Paragraph, PageNumberFormat} = require('docx');
const doc = new Document({
numbering:{
config:[{
reference: 'ref1',
levels: [
{
level: 0,
format: PageNumberFormat.DECIMAL,
text: '%1)',
start: 50,
}
],
}]
},
sections: [{
children: [
new Paragraph({
text: "REF1 - inst:0 - lvl:0",
numbering : {
reference: 'ref1',
instance: 0,
level: 0,
}
}),
new Paragraph({
text: "REF1 - inst:0 - lvl:0",
numbering : {
reference: 'ref1',
instance: 0,
level: 0,
}
}),
new Paragraph({
text: "REF1 - inst:0 - lvl:0",
numbering : {
reference: 'ref1',
instance: 0,
level: 0,
}
}),
],
}]
});
// Used to export the file into a .docx file
Packer.toBuffer(doc).then((buffer) => {
fs.writeFileSync("start_numbering.docx", buffer);
});
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Change the numbering in a numbered list - Microsoft Support
Double-click the numbers in the list. The text will not appear selected. Numbers selected. Right-click the number you want to start a new...
Read more >Word: Solutions for Common Issues with Numbered Lists
This is a simple fix. Right click on top of the number 1 next to the word Brouhaha.
Read more >Word: When Restart Numbering doesn't work
Put your cursor at the beginning of the second item (was the first), and right-click. Select Restart Numbering. Your second item should now...
Read more >Word will not set the Numbering Value that I choose
Right click the number · Click 'Adjust List Indents...' · Click 'More >>' (bottom left) · Untick the 'Restart lst after:' option on...
Read more >Correct a Word document when lists won't renumber correctly
It can be frustrating the numbered list in your Word document keeps starting at the wrong number -- even if you select Restart...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@TheDarkStrix Can you create some easy example for me to run to illustrate the problem? (Just like I did in the issue description) This way it would be a little easier to understand what exactly doesn’t work.
I would close the issue, since the first stated problem solved by merged https://github.com/dolanmiu/docx/pull/1057 @tiejunhu I think it worth opening new issue if your problem persists. Or you can reopen if you like…