Overview

How the # headings in your notes become the section structure of the document.

How you write it in Obsidian

# Main heading

Body text under the main heading.

## A subsection

### A sub-subsection

What Obsitex generates

\section{Main heading}
Body text under the main heading.

\subsection{A subsection}
\subsubsection{A sub-subsection}

Obsitex also appends a \label{…} to every heading automatically (omitted above for readability), so you can cross-reference it. The exact label scheme is covered in Naming conventions; using the links is covered in Links & cross-references.

Heading levels

By default (the article class) the levels map like this:

Obsidian LaTeX command
# \section
## \subsection
### \subsubsection
#### \paragraph
##### \subparagraph

Book-style classes (book, report, scrbook) also have \chapter and \part above \section. Which command a given # level produces depends on the starting level (see below).

Unnumbered headings

Add a Pandoc-style attribute at the end of the heading line:

\section*{Unnumbered but listed}\addcontentsline{toc}{section}{Unnumbered but listed}
\section*{Unnumbered and unlisted}

Shifting all headings in a file

The note property latex-heading-offset (Obsidian's Properties, stored as YAML frontmatter) pushes every heading in that file down (or up) by a fixed number of levels. With latex-heading-offset: 1: