With the attached file test-biblio-header-spacing.md and the default LaTeX template, I observed that the space between the bibliography and the subsequent heading is too short in PDF output (see bad.pdf). This comes from the l. 381 in the default template that implements the hanging indentation in the CSLReferences environment: \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi I have not been able to tweak \everypar so that I could, for instance, revert it to its former definition at the end of the environment. Instead, as \hangindent needs to be reset at every paragraph and bibliographical items are always preceded by the \leavevmode command, I achieved the same result by redefining \leavevmode without interfering with the spacing at the end of the bibliography (see custom-template.latex and good.pdf): \ifodd #1 \edef\leavevmodesave{\leavevmode} \def\leavevmode{\leavevmodesave\setlength{\hangindent}{\cslhangindent}} \fi (Notice that I removed \ignorespaces here: since we are at the beginning of a paragraph, I suspect it is not relevant. But I may be mistaken.) However I have only vague ideas about TeX. Although I haven't noticed any side effect, I fear that I have missed something, or that a cleaner solution exists. Has anyone a better insight? -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/YCJl10BwugKyauLh%40localhost.