-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[FR] Add support for the YALM setting "language: ui: references_name" to change the title of references section in html output #1437
Comments
How do you insert your reference section in your project ? See We mention in the doc how to add references section in a HTML book This is Pandoc feature: https://pandoc.org/MANUAL.html#placement-of-the-bibliography The |
Thank you for the answer. The example you mention: The relevant part of my YAML config is:
I use the
I already get a section with the citations at the end of each of the chapters, including its title "References", and I don't know how to change it. If, following pandoc manual, I add
at the end of each Rmd file, I get the references twice, one with the "Bibliography" title, and the second with the "References" title. Also tried adding Looking for a solution I realized that I am not the only one with this issue, see e.g.: |
Do you have chapter for references like bookdown-demo ? If you set In the bookdown-demo, you'll notice that there is specific chapter at the end, with only a title. This is because Pandoc will put bibliography at the end of the book. (end of all merged document). If you use the
|
To narrow down my problem I tried to do a minimal example reproducing it and then it started working as expected.
Then pandoc uses this title for the per-chapter reference sections. I believe that this is indeed not very intuitive and that it is not explained at all in the official documentation: A more intuitive option would be to add support for the Thank you Christophe for your help. Before asking here I tried all possible options for a couple of days, with no success. I even had prepared a script to swap in the html files |
To be clear on what happens
This could be an issue 🤔 If there is a header above the reference section, it should be reused. Unless Pandoc adds it another way this option is set...
No problem. Feel free to ask anytime. We try to document correctly, but it is hard to document everything in the right place and the right form. |
But basically bookdown expects chapters to be at least in one source file, but using
Anyhow, for now, it can't be used. Sorry |
Ok know issues that I forgot about 🤦 |
Right now (to the best of my knowledge) there is no way to modify the title of the "References" section that is added at the end of each chapter in the bookdown::gitbook html output. This is required not only for a proper multi-language support, but also because in some cases it would be useful to have a different title for the section (e.g., "Bibliography").
One option would be to add support for a new YALM setting
and use this setting for the corresponding section title. Now, in the output html files this is simply rendered as
<h3>References</h3>
The text was updated successfully, but these errors were encountered: