How can I indent my headings?

I want to indent my headings like this:

A. Example title
     A.1. Example Table
     A.2. Example Graph

Hi @Ivan_Zhao, welcome to the forum! The following reproduces the numbering in your example:

#set heading(numbering: "A.1.")

= Example Title
== Example Table
== Example Graph

image

Is this what you meant, or do you want to add spacing between the number and the text? Also maybe you mean to change the appearance of the outline (table of contents)?

@sijo, sorry, it didn’t include the indents in my post. I’d like the subheadings A.1. and A.2. to be indented from the major heading A. Like this
image

#show heading.where(level: 2): it => {
    h(2em)
    it
}

A more general solution that doesn’t manually add space and works for more than level 2 would be the following:

#set heading(numbering: "A.1.")

#show heading: it => {
  set block(inset: (left: (it.level - 1) * 2em))
  it
}
= Example Title
== Example Table
=== more examples
== Example Graph

Each heading is a block, and with show heading: set block you can affect it. Since we need a property from the heading (the level), I used show ...: it => ... instead of show ...: set ....

One problem is that set block will affect all blocks within the heading. Usually that isn’t a problem, but if you use box to add e.g. a $ display equation $ or image() to the heading, it will disrupt things.

A post was split to a new topic: How can I prevent indent on paragraphs with run-in headings?