mirror of
https://github.com/TeachBooks/manual.git
synced 2026-11-12 22:35:51 +00:00
Remove custom bibtex styles and add APA warning info
Removed custom bibtex style settings from _config.yml. Added documentation in apa.md about handling duplicate label warnings in APA references, including advice on adding letters to years in .bib files.
This commit is contained in:
parent
7117d92eed
commit
9e531c7e5f
2 changed files with 31 additions and 2 deletions
|
|
@ -39,8 +39,6 @@ sphinx:
|
|||
html_show_copyright: false
|
||||
html_last_updated_fmt: '%B %-d, %Y'
|
||||
html_static_path: ["images"]
|
||||
bibtex_default_style: myapastyle
|
||||
bibtex_reference_style: author_year_round
|
||||
mathjax3_config:
|
||||
tex:
|
||||
macros:
|
||||
|
|
|
|||
|
|
@ -74,6 +74,37 @@ The references section at the end of your book will also be formatted in APA sty
|
|||
```
|
||||
::::
|
||||
|
||||
## Duplicate label warning
|
||||
|
||||
You might encounter a warning during the build process that has this structure:
|
||||
|
||||
```
|
||||
<filename>:<lineno>: WARNING: duplicate label "<authors>, <year>" for keys "<key1>" and "<key2>"
|
||||
```
|
||||
|
||||
This is might have different cause, but often it is because two different references have the same author(s) and the same year. A common solution is to add letters to the year in the `.bib` file, like this:
|
||||
|
||||
```bibtex
|
||||
@misc{launch_buttons,
|
||||
author = {{TeachBooks}},
|
||||
title = {Custom launch buttons},
|
||||
url = {https://github.com/TeachBooks/Sphinx-launch-buttons},
|
||||
year = {2024a},
|
||||
note = {Retrieved December, 2024. BSD-3-Clause.},
|
||||
}
|
||||
|
||||
@misc{nested,
|
||||
author = {{TeachBooks}},
|
||||
title = {Git workflow: Share content between book},
|
||||
url = {https://github.com/TeachBooks/Nested-Books},
|
||||
year = {2024b},
|
||||
note = {Retrieved December, 2024. CC BY 4.0.},
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
This does negate the automatic ordering of references by the order `authors > year > title`, so our advice is to only use this solution when the bibliography contains duplicate author-year combinations ánd the bibliography is final. That way the you can use the sorted order with warnings to determine the correct letters to add to the years.
|
||||
|
||||
## Implementation
|
||||
|
||||
The extension is based on [`pybtex`](https://pybtex.org/), which is a BibTeX-compatible bibliography processor in Python that is extendible with plugins.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue