-
Notifications
You must be signed in to change notification settings - Fork 334
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
Using headings with profiles in book format always shows the first heading of the file #6251
Comments
I think we resolve @dragonstyle do you think this is something we should try to do better ?
We have some shortcodes feature to get variables data : https://quarto.org/docs/authoring/variables.html So providing that this works,
You could try to leverage the This is not profile aware (maybe something we can do), but you could have two files (one per language) and then rename to Though, you could probably leverage Metadata which are profile aware (https://quarto.org/docs/projects/profiles.html) This would lead to
Just ideas to test to see if this helps.
If you haven't seen it you could be interested in this thread |
Yes, this is the gist of the issue. Currently, More generally, we should take some time and design precisely what steps our document processing will take at what points, and document it. Quarto would then be able to provide error messages when we see "bad" documents. |
@cderv thanks for those suggestions and pointing me to that very interesting thread! I think I understand the remarks that this may not be a proper way to use that functionality at this time. But some sort of solution where headings can be made multilingual and contained within a single file would be beneficial I think. The argument being that it keeps all things text in the same place and there is no separate file with variables and shortcodes that make collaborating with non-coders more difficult. To illustrate, in my work context the visual editor in RStudio has lowered the barrier for non-coders to directly work in Quarto files, making it more efficient compared to having to integrate things from Word into Quarto. Getting buy-in from non-coders is a challenge and code and variables for the actual text make this harder. Some small additional detail related to this issue: for the html output it is possible to set the ToC text for a chapter through a comment in R code. The chapter heading won't show up in the document itself (or in the ToC if the format is a pdf). I have added an example of this to the repo as well as a pdf output and as @cscheid says there seems to be some format-specificity. |
@mvwestendorp it seems you are using |
@mcanouil thanks for your suggestion. Yes I use |
In R you can access environment variable using Using code cell1, for "complex" cases and as an example:
Footnotes
|
And using 1.4 pre-release (https://quarto.org/docs/prerelease/1.4/inline.html):
Footnotes |
Bug description
I am using the project profiles to support multi-language documents (i.c. Dutch & French) by only showing the text for that language. This works nicely, but when trying to use the same method for headings the first heading always shows up even when it should not be shown based on the profile used.
Steps to reproduce
https://github.com/mvwestendorp/bug-heading-quarto-profile
quarto render . --profile NL
renders a correct version in_report-NL
quarto render . --profile FR
renders an incorrect version in_report-FR
Expected behavior
Only headings that are visible based on the project's profile are visible in the output
Actual behavior
The first heading of a file is always shown regardless of project profile
Your environment
Quarto check output
The text was updated successfully, but these errors were encountered: