From c26054b76e551ab9bc6f0877834724cc464f000e Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Thu, 9 Nov 2023 13:23:47 -0700 Subject: [PATCH] add number-section spans to headers when markdownwithhtml. Closes #1145 --- src/resources/filters/crossref/sections.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/resources/filters/crossref/sections.lua b/src/resources/filters/crossref/sections.lua index 12266c57ce1..93ed7596be1 100644 --- a/src/resources/filters/crossref/sections.lua +++ b/src/resources/filters/crossref/sections.lua @@ -5,7 +5,7 @@ function sections() return { Header = function(el) - + -- index the heading indexAddHeading(el.attr.identifier) @@ -61,7 +61,7 @@ function sections() el.content:insert(1, pandoc.Space()) end - if _quarto.format.isHtmlOutput() then + if _quarto.format.isHtmlOutput() or _quarto.format.isMarkdownWithHtmlOutput() then el.content:insert(1, pandoc.Span( stringToInlines(section), pandoc.Attr("", { "header-section-number"}) @@ -99,7 +99,7 @@ end function numberSections() return not _quarto.format.isLatexOutput() and not _quarto.format.isTypstOutput() and - not _quarto.format.isMarkdownOutput() + (not _quarto.format.isMarkdownOutput() or _quarto.format.isMarkdownWithHtmlOutput()) and numberSectionsOptionEnabled() end