Hi:
I setup the document with a simple heading command:
#set heading(numbering: “1.a)”)
And I want to align the heading text with the paragraph after the heading. Like this:
How can I do it? Thank you!!
Sean
Hi:
I setup the document with a simple heading command:
#set heading(numbering: “1.a)”)
And I want to align the heading text with the paragraph after the heading. Like this:
How can I do it? Thank you!!
Sean
I can’t reproduce the problem with the code you gave. Please post a minimum reproducible example.
Also, it is nice that you formatted the code differently from the rest of the post, but it should be in a code block, whereas now it is in a quote block.
Code:
```
#set heading(numbering: "1.a)")
```
Quote:
> #set heading(numbering: "1.a)")
Edit: I misunderstood your post as the image shows an undesired behavior. Now I understand that you want what is shown in the image.
The info string should include typst
or typ
.
I think it can be done but it would be a bit involved.
If I understand correctly - always best to spell it out - you want each section to be indented and the indent should correspond to the heading level in some sense. Is this the idea?
I think the current spec is incomplete - it looks like sections 1.a)
and 2.a)
could for example have different indent if the symbols 1
and 2
are of different width. One early choice in design is probably to decide to normalize this so that same level sections have the same indent. (That sounds like the way to make it a nice design)
I would split the task in two parts
(*) It doesn’t have to be placed into the margin. It’s more or less equivalent to let it be placed naturally, but increasing the section’s indent by the same amount.
The second point doesn’t sound trivial - especially not for non-paragraph items like equations. In general in Typst’s document model, the section heading “does not own its section content”, i.e there is no strong connection between the section heading and all the content that follows it.
One way to change that is of course to add new markup - you define a function that you use to enclose each section’s content. Then you’ve added information to the document source that was kind of missing in the model.