-
Notifications
You must be signed in to change notification settings - Fork 335
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
Compatibility issue with .{content-hidden} and section-bibliographies extension with update from Quarto v1.2 to v1.3 #5904
Comments
Sorry for the late reply. |
No worries! Ah, so the content in |
Your use is actually a misuse of the reference feature (not only in Quarto). I am going ahead and close this as I don't see any bug or issue with the feature. |
Thanks for the response. So obviously yes, that was what I originally had tried, but again, you can only have one notice field per document. The purpose of the original method was to create multiple bibliographies, one for each document type, as is required on an academic CV. The only way I could get that to work using Maybe a more official way to do this could be considered as a feature in the future? |
@ttalVlatt I believe you are trying to use a Quarto feature to circumvent a non-existing feature in the
So yes this should be better supported but probably in https://github.com/pandoc-ext/section-bibliographies and not is quarto directly. At least not until splitting bibliography by section is a feature built in.
It seems there was indeed a change in 1.2 - There was a reworkd in Quarto for custom AST node, and conditional blocks are one of them. See https://quarto.org/docs/prerelease/1.3/ast.html This means that the filter I don't think will change in Quarto but this could probably be definitely supported in https://github.com/pandoc-ext/section-bibliographies Bibliography is working in those conditional block as Quarto handles this custom AST nodes. If you do this ---
title: "repex"
csl: apa.csl
bibliography: references.yaml
format:
html: default
docx: default
---
# References
### Section One
:::{.content-hidden when-format="docx"}
@tufte2001 says this
:::
### Section Two
@yau2011 says that
You'll get the citation in HTML format. So this is something to report in https://github.com/pandoc-ext/section-bibliographies so that some adaptation are made for Quarto, or maybe a fork specific for Quarto. |
Though just an addition. You could try reproduce this behavior though by adding custom lua filter.
Div = function(div)
if div.classes:includes("hide") then
return {}
end
end
filters:
- section-bibliographies
- hide.lua As there is no custom AST node here, and you apply the hide feature after your filter, then Hope it helps. |
Thanks for clarifying the situation @cderv ! I will play around with section-bib and see if I can get something to work |
Bug description
I updated to the latest published Quarto 1.3.361 and noticed that my section-bibliographies extension no longer worked. At first I thought it was a general compatibility issue, but it seems it might be a change in how the .{content-hidden} is processed? As I have played around and found that it still works fine if the content is cited in the normal markdown text, but not if the content is cited inside a .{content-hidden} section, which worked identically in v1.2.475.
Steps to reproduce
Quarto-Repex.zip
The attached zip repex should illustrate the issue, with Quarto 1.2.475 both section bibliographies are written, but with Quarto 1.3.361 only the second section where the citation not in .{content-hidden} shows up.
Expected behavior
section-bibliography should work identically if the citation is within .{content-hidden} or not
Actual behavior
with Quarto v.1.3 the section-bibliography does not form if the citation is within .{content-hidden} like it did in Quarto v1.2
Your environment
Quarto check output
No response
The text was updated successfully, but these errors were encountered: