header with section title & auto number

Hi all,
I don’t know how to explain my question.
I’v had been bothered by it for a long time.

How could I compile drafts to look like scrivener manual in dashed square in the attachment?

I had tried “<$sn>.<$sectiontilte>”. It does not work.

This is probably a daft question but are you sure you don’t have a typo in the code you’re using (there’s a typo in the code that you’ve posted -$sectiontilte instead of $sectiontitle)

That probably isn’t the answer, but just checking.