How to set numbering only for specific heading level? #1363
Replies: 6 comments 4 replies
-
This works, but it feels really like a hack, since one has to redefine the show rules by hand for all the headings: #set heading(numbering: "1.1.")
#show heading: it => block(it.body)
#show heading.where(level: 1): it => block(it.numbering.at(0) + ". " + it.body)
= Foo
== Bar Maybe numbering patterns handle that better, say |
Beta Was this translation helpful? Give feedback.
-
You could use numbering functions like this: #set heading(numbering: (first, ..other) =>
if other.pos().len() == 0 { return first }
)
= This is numbered
== This is not imo it would be nicer to have some way of modifying the style of the current element, similar to how show-set rules are written but also affecting itself |
Beta Was this translation helpful? Give feedback.
-
@richardkraus-adesso thanks that's much tidier 😀 I know there is some "style" work under the hood, this might provides a way to do so. |
Beta Was this translation helpful? Give feedback.
-
I think the solution of @richardkraus-adesso can be generalised to support any heading depth:
|
Beta Was this translation helpful? Give feedback.
-
@VitalyyBezuglyj just use the #show heading.where(level: 1): set heading(numbering: "1") I don't know if this works with a TOC tho... |
Beta Was this translation helpful? Give feedback.
-
Hi Guys! This is more a question than an answer. I came around to this topic. Not numbered1 Numbered "(1.0 or just 1)"1.1 Numered "(1.1)"Regards |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I want to be numbered only in the headers of level 1, and the rest went without numbering (those no 1.1, 1.a, and so on). How can I do this?
The idea is to redefine the function, but I don't really understand how to do it correctly.
P.S. It seems like it would be great to add this to the functionality of the original function, but that's a separate topic
Beta Was this translation helpful? Give feedback.
All reactions