-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When setting chapter as {number=n}, subsequent chapter should become {number=n+1} etc. #393
Comments
I do, they are, but there's a caveat: if you use Now that I think about it, pandoc itself kind of supports function Header(el)
el.attributes.number = el.attributes.label
el.attributes.label = nil;
return el
end You need to enable $ pandoc -F pandoc-crossref -L fixup-header-nums.lua --number-sections -MsetLabelAttribute input.md -t docx -o out.docx An alternative is to let pandoc-crossref number sections: $ pandoc -F pandoc-crossref -MnumberSections -MsectionsDepth=-1 input.md -t docx -o out.docx |
Thanks, I had missed |
As described in the title. Appreciate the new feature, I think the next step would be to computationally set chapter numbers so they are consistent. Example: I set the chapter number of the first chapter of my document to 0 (foreword), but the chapter after became chapter 2, i.e., there was no chapter 1. In case this is format dependent, I was converting a markdown document to .docx. System is Ubuntu 22.04, pandoc 3.1.5, pandoc-crossref 0.3.16.0 (love those nightlies).
The text was updated successfully, but these errors were encountered: