I have some custom numbering to have appendices numbered as Appendix A, Appendix B, etc.
This is working great, except that the outline is really indented for the other normal headings because it tries to put every title on the same indent. This is a minimal working example of my template where you can see that the chapters Introduction and Continuation are indented to the same level as the Appendix Data, which looks really weird:
#outline()
= List of Figures
= List of Abbreviations
#set heading(numbering: "1.1")
= Introduction
== Motivation
== Objective
= Continuation
#set heading(numbering: none)
= Bibliography
#counter(heading).update(0)
#set heading(supplement: [appendix],
numbering: (..nums) => {
let numbers = nums.pos()
// level 1 heading is Appendix A:, Appendix B:, ...
if numbers.len() == 1 {
"Appendix " + numbering("A", ..numbers) + ": "
} else {
// other headings A.1, A.2, B.1, B.2, ...
numbering("A.1", ..numbers)
}
}
)
= Data
= Code
I don’t think so, my issue is specifically with the indents in the outline. I already have it working to have the headings numbered with Appendix A, etc. which is what that post is explaining. I’ve attached a screenshot that shows the indentation of the two normal headers “Introduction” and “Continuation”
This prevents the longer indent for the beginning of the outline and keeps it for the second part (mainly if you have level 2, which you have numbering set for.
Full code
#let appendix(body) = {
set heading(supplement: [Appendix], numbering: (..nums) => {
let numbers = nums.pos()
// level 1 heading is Appendix A:, Appendix B:, ...
if numbers.len() == 1 {
"Appendix " + numbering("A", ..numbers) + ": "
} else {
// other headings A.1, A.2, B.1, B.2, ...
numbering("A.1", ..numbers)
}
})
counter(heading).update(0)
body
}
#outline(target: heading.where(supplement: [Section]))
#outline(target: heading.where(supplement: [Appendix]), title: none)
= List of Figures
= List of Abbreviations
#set heading(numbering: "1.1")
= Introduction
== Motivation
== Objective
= Continuation
#set heading(numbering: none)
= Bibliography
#show: appendix
= Data
== Sub Data
== Sub Data
= Code
== Sub Code
== Sub Code