adjust heading depth so that heading is included in appropriate section in PDF