-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quarto.doc.include_text does not add text into revealjs #5666
Comments
Thanks a lot for the great report! This is indeed an issue in our processing here: quarto-cli/src/resources/pandoc/datadir/init.lua Lines 1544 to 1553 in 4b7c0fe
It seems I think this is why it gets ignored at the end. Maybe this is a Pandoc issue where using the @dragonstyle we can definitely patch and handle but what is your thoughts about what Pandoc should be doing with |
Woah that is a surprising and cool bug. I'm honestly not sure the best approach to this- overall specifying a raw block of the current format seems correct, but perhaps we need to provide per format overrides here. Have you confirmed that manually tweaking the |
Yes this is surprising - I asked in Pandoc discuss to confirm what Pandoc expects https://groups.google.com/g/pandoc-discuss/c/2ffxC1uLh2M
Yes I have confirm. I wonder if this is not related to the Writer .hs file in pandoc. Revealjs is part of I didn't find the code in Pandoc code where under which contidion a This is a current fix that covers slides mainly diff --git a/src/resources/pandoc/datadir/init.lua b/src/resources/pandoc/datadir/init.lua
index 533c8b742..dac5cdcf1 100644
--- a/src/resources/pandoc/datadir/init.lua
+++ b/src/resources/pandoc/datadir/init.lua
@@ -1540,7 +1540,14 @@ local function processTextDependency(dependency, meta)
if meta[textLoc] == nil then
meta[textLoc] = {}
end
- meta[textLoc]:insert(pandoc.RawBlock(FORMAT, rawText.text))
+ local rawFormat = FORMAT
+ -- Some output formats requires raw blocks in another format
+ if format.isHtmlSlideOutput() then
+ rawFormat = "html"
+ elseif format.isLatexOutput() then
+ rawFormat = "latex"
+ end
+ meta[textLoc]:insert(pandoc.RawBlock(rawFormat, rawText.text))
end |
Ok found it. This check for LaTeX handle beamer format ok I would think this is an issue in Pandoc. We'll see what they answer. |
So @dragonstyle this will be an issue for sure with current pandoc with all HTML slide formats that are defined in the
We could patch only those, or look into all the writers to find all the possible format that are not correctly handle as raw block. I believe |
We can add a |
if we do the association between FORMAT and raw block equivalent, why not solve that when creating the RawBlock directly ? In both case we need find all the mismatches and cover them . Edit: Understood now having the broader picture of what you are suggesting after the meeting. |
Issue has been opened upstream, so it could be fixed in next Pandoc maybe |
Submitted a PR to Pandoc (jgm/pandoc#9110) that covers just the HTML writer for the moment. We'll see what happens next. |
The upstream fix has been merged into Pandoc. So are we now just waiting for the next version of Pandoc to be released and then for Quarto to re-build with the new Pandoc? |
Basically yes, but note that this will only be available in the 1.4 pre-release. |
Pandoc v3.1.9 was just released yesterday and included a fix for this. https://github.com/jgm/pandoc/releases/tag/3.1.9 Can the included pandoc version in Quarto get upgraded this week? Unfortunately, I can't bump the version in an official way given dependencies are cached in an RStudio/Posit S3 bucket. |
Hopefully. We'll try to get it done quickly (and certainly before 1.4 is out), but in general we can't promise a specific time. |
Bug description
If we have the following code inside of a Lua filter that is included as a
quarto
extension:The
quarto.doc.include_text()
fails to include the text inside of theheader
under therevealjs
format. However, it works under thehtml
format option. Per the Lua documentation at:https://quarto.org/docs/extensions/lua-api.html#includes
I feel like this should be a bug as the
revealjs
format is a version of anhtml
document.You can experiment and see more details on the
quarto.doc.include_text()
use with the filter here:https://github.com/coatless/quarto-ext-revealjs-bug
Checklist
quarto check
so we know which version of quarto and its dependencies you're running.The text was updated successfully, but these errors were encountered: