Skip to content
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

Specify caveats of book-project bibliographies #1076

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/authoring/footnotes-and-citations.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ You can find CSL files or learn more about using styles at the [CSL Project](htt

### Bibliography Generation

By default, Pandoc will automatically generate a list of works cited and place it in the document if the style calls for it. It will be placed in a div with the id `refs` if one exists:
By default, Pandoc will automatically generate a list of works cited if the style calls for it. If it exists, the bibliography will be explicitly placed where a div with the id `refs` is specified:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually find the original ordering here was confusing, I sort of feel the 'default' behaviour should be described first: i.e., if no div was specified.


``` markdown
### References
Expand All @@ -90,7 +90,7 @@ By default, Pandoc will automatically generate a list of works cited and place i
:::
```

If no such div is found, the works cited list will be placed at the end of the document.
If no such div is found, the works cited list will be placed at the end of the document. Book projects that desire a bibliography of the entire project on a single page should explicitly place the `div`.

If your bibliography is being generated using BibLaTeX or natbib (@sec-biblatex), the bibliography will always appear at the end of the document and the `#refs` div will be ignored.

Expand Down
10 changes: 9 additions & 1 deletion docs/books/book-structure.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ Note that `toc-depth` is independent of `number-depth` (i.e. you can have unnumb

## References

You should include a `div` with the id `#refs` at the location in your book where you'd like the bibliography to be generated. For example the `references.qmd` file generated by `quarto create project book` includes this:
By default, the references of any citations in a page will be rendered at the bottom of each file.

If you want the entire bibliography in a single location such as on a dedicated 'references' file., you should include a `div` with the id `#refs` at the location in your book where you'd like the bibliography to be generated.

For example the `references.qmd` file generated by `quarto create project book` includes this:

``` markdown
# References {.unnumbered}
Expand All @@ -75,6 +79,10 @@ You should include a `div` with the id `#refs` at the location in your book wher
:::
```

Here, the bibliography of all cited works in the project will be placed.

Note that if you have specified a `.qmd` file-specific bibliography references in the file's header (with `bibliography:`), the references in this file will still be displayed in where the `div` is specified, irregardless of the the location the `bibliography:` was specified.

Note that you can change the chapter title to whatever you like, remove `.unnumbered` to have it be numbered like other chapters, and add other content before or after the bibliography as necessary.

## Creating an Index
Expand Down