I’m trying to create a document where level 4 headings are placed without numbering in the right margin with the body text on the same vertical level.
Here is what it should look like:
Here’s what I have so far.
#set page(
paper: "a4",
margin: (top: 3.75cm, bottom: 2.75cm, left: 2.5cm, right: 5cm),
)
#let customnumbering(..n) = {
if n.pos().len() == 1 { return numbering("1", ..n) }
if n.pos().len() == 2 { return numbering("1.1", ..n) }
if n.pos().len() == 3 { return numbering("1.1.1", ..n) }
if n.pos().len() == 4 { return "" }
return ""
}
#set heading(
numbering: customnumbering,
depth: 4,
outlined: true,
bookmarked: true,
)
#show heading: set text(fill: green)
= Heading1
== Heading2
=== Heading3
==== Heading4
#lorem(30)
How would I go about doing this?


