I'm using Pandoc. I found this answer but it works on first-level headers only.

How can I offset second-level headers so that they are:




instead of






doesn't seem to be working.

Edited to add code:

title: My title
date: 01/01/1970
 - John Doe
 - \usepackage{fancyhdr}
 - \pagestyle{fancy}
 - \fancyhead[LO,LE]{This is my header}
 - \fancyfoot[LO,LE]{This is my footer}
 - \fancyfoot[CE,CO]{\thepage}
 - \usepackage[owncaptions,tablegrid]{vhistory}
numbersections: true
mainfont: Helvetica
mainfontoptions: BoldFont=Helvetica Bold
mainfontoptions: ItalicFont=Helvetica Oblique
mainfontoptions: BoldItalicFont=Helvetica Bold Oblique

\vhEntry{1.1}{13.05.04}{JW|AK|KL}{Typos corrected.}
\vhEntry{1.2}{03.02.04}{DP|JPW}{revised after review}

<!--- TOC -->


asdfghj fghjkl

asdfgh fghjkl fghjkl fvghjkl hjklnjk
  • It would be easier to help you if you will provide (non)Working Minimal Example ...
    – Zarko
    Nov 1, 2016 at 0:12
  • @Zarko Added my code
    – Barbara
    Nov 1, 2016 at 0:17
  • A minimal example is something we can compile. Many potential helpers will not be able to compile that. You will stand a better chance of getting answers if you paste code for a minimal document in a format everyone can work with i.e. a .tex file e.g. TeX or LaTeX or ConTeXt or whatever.
    – cfr
    Nov 1, 2016 at 2:45
  • Each time you say \section, the subsection counter is reset to zero. If you just wanted continuous numbering from zero, that would be fairly straightforward. But for this you'll need to change the reset code rather than eliminating it. This depends on class etc., too. I've no idea what the code produced by pandoc looks like in general or in your environment in particular.
    – cfr
    Nov 1, 2016 at 2:47

1 Answer 1


Instead of


you can add to your preamble (or elsewhere)


This changes only the representation of the \subsection counter to be one less than it actually is. This would also work with references, if needed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .