Closed JanaMuschinski closed 1 year ago
Further update - I went back to your index file on the repository and saw there were some differences in the citation section, so replaced everything about bibliography/citations down to the end in my index file with the most up to date version from yours. Biblatex is still the only option compiling, pandoc and natbib are not. The issue continues with biblatex.
Updated index file section:
######################
## bibliography path ##
#######################
bibliography: [bibliography/test.bib]
########################
## PDF layout options ###
#########################
### submitting a master's thesis ###
# set masters-submission: true for an alternative, anonymous title page with
# candidate number and word count
masters-submission: false
candidate-number: 123456
word-count: "10,052"
# if you want to use a different title page altogether, provide a path to a
# .tex file here and it will override the default Oxford one
# alternative-title-page: templates/alt-title-page-example.tex
### abbreviations ###
abbreviations-width: 3.2cm
abbreviations-heading: List of Abbreviations
### citation and bibliography style ###
# heading title for the references section
params:
insertReferencesHeadingInPDF: true
insertReferencesHeadingInOtherOutput: true
referenceHeading: "References"
# citation and reference options (pandoc) #
csl: bibliography/apa.csl # try csl: bibliography/transactions-on-computer-human-interaction.csl for numerical citations
refs-line-spacing: 6mm
refs-space-between-entries: 1mm
## biblatex options ##
#use-biblatex: true # set to true, and set "output:bookdown::pdf_book: citation_package: biblatex"
#bib-latex-options: "style=authoryear, sorting=nyt, backend=biber, maxcitenames=2, useprefix, doi=true, isbn=false, uniquename=false" #for science, you might want style=numeric-comp, sorting=none for numerical in-text citation with references in order of appearance
## natbib options ##
#use-natbib: true # set to true, and set "output:bookdown::pdf_book: citation_package: natbib"
#natbib-citation-style: authoryear #for science, you might want numbers,square
#natbib-bibliography-style: templates/ACM-Reference-Format.bst #e.g. "plainnat", unsrtnat, or path to a .bst file
### correction highlighting ###
corrections: true
# and the rest of the index file...
I made sure I had the apa.csl file in my bibliography folder.
It won't compile with just pandoc - it gives the following error: "! LaTeX Error: Command \bibfont undefined."
The _main.log file says the following:
! LaTeX Error: Command \bibfont undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.178 \renewcommand*{\bibfont}
{\raggedright\small}
I made sure to change the citation_package under output as well. It compiles but continues to have the issue and gives the following messages:
Warning: Package inputenc Warning: inputenc package ignored with utf8 based engines.
Warning: Package fancyhdr Warning: \fancyhead's `E' option without twoside option is useless on input line 131.
Warning: LaTeX Warning: Command \@parboxrestore has changed.
Warning: Check if current package is valid.
Warning: Package fvextra Warning: csquotes should be loaded after fvextra, to avoid a warning from the lineno package on input line 37.
Warning: Package biblatex Warning: Language 'latin' not supported.
Warning: (biblatex) Using dummy definitions on input line 217.
It does not compile and gives the following:
Error: Failed to build the bibliography via bibtex
In addition: Warning message:
bibtex seems to have failed:
This is BibTeX, Version 0.99d (TeX Live 2022)
Capacity: max_strings=200000, hash_size=200000, hash_prime=170003
The top-level auxiliary file: _main.aux
The style file: templates/ACM-Reference-Format.bst.bst
Case mismatch error between cite keys Colmenares1991 and colmenares1991
---line 317 of file _main.aux
: \citation{dalpesco2020,colmenares1991,Colmenares1991
: ,dalpesco2018,Smuts1990}
I'm skipping whatever remains of this command
Case mismatch error between cite keys Colmenares1991 and colmenares1991
---line 320 of file _main.aux
: \citation{Pelaez1982,Colmenares1990,colmenares1991,Colmenares1991
: ,Fraser2007,kummer1968}
I'm skipping whatever remains of this command
Case mismatch error between cite keys Colmenares1991 and colmenares1991
---line 565 of file _main.aux
: \citation{Colmenares1990,Colmenares1991
: [... truncated]
Warning: Package inputenc Warning: inputenc package ignored with utf8 based engines.
Warning: Package fancyhdr Warning: \fancyhead's `E' option without twoside option is useless on input line 131.
Warning: LaTeX Warning: Command \@parboxrestore has changed.
Warning: Check if current package is valid.
Warning: Package fvextra Warning: csquotes should be loaded after fvextra, to avoid a warning from the lineno package on input line 37.
Warning: Package minitoc Warning: W0010
Warning: (minitoc) No file _main.toc.
Warning: (minitoc) MINITOCS NOT PREPARED on input line 289.
Warning: Package natbib Warning: Citation `dalpesco2020' on page 1 undefined on input line 341.
And then continues to list off a warning for every single citation.
I spoke with a friend today who is using the template and she also has the same issues with in-text citation inconsistencies.
I've tried to look into the error messages, but am unfortunately quite new to csl and LaTeX so am struggling.
Thanks for any help!
Issue solved! Hope this may help someone else in the future.
I replaced my index page and templates with the most recent ones on the repository. It would then run with pandoc again instead of only biblatex, but the problem persisted, but only in specific circumstances.
After much combing through my .bib file I realized three things:
Love the template and package, thanks for putting so much work in!
I have been having trouble with in-line citation formatting.
No problem with this entry - shows up as "(Mercier et al. 2017)" in text (so when I use [@mercier2017])
Too many names before et al. - This one on the other hand shows up as "(De Marco, Cozzolino, et al. 2011)" when I use [@demarco2011].
I tried putting {} around "De Marco" and it still persists. Same issue in another De Marco citation and a bunch of other citations that have single-word last names, but weirdly not in others. I cannot find a pattern.
I've also found other instances where sources with three authors had all three listed. I really have no idea what is going on unfortunately.
Index file
The index file has the following as per the template. I have tried running it with natbib and it will not compile. The error it gives when attempting to use natbib is below.
Natbib error:
The flextable warning is fine - but I'm not sure what's happening above that. There is one point in the text where the phrase "testing of cooperative potential" is used, but those citations do not come after it and there is no where in the text where those two citations happen together.
When I compile the whole thing to Word rather than a PDF, the De Marco citations show up fine, as do all the others it looks like. However, citations of up to three names remain as three full names rather than being shortened to First et al.
Thank you for any help!! I am meant to submit my CoS this week and the citations are really throwing me some curve balls.
Bookdown version 0.26 Tinytex version 0.41 R studio version 2022.07.1 Build 554 R version