admindatahandbook / book

Release candidates
https://admindatahandbook.github.io/
Other
3 stars 5 forks source link

Pandoc breaks bibliography when same author team publishes across multiple years #38

Open jimhshen opened 3 years ago

jimhshen commented 3 years ago

In the Hawley chapter, the bibliography breaks when there are two entries with the same author team across different years. The default behavior and when using the chicago style CSL file suppresses the author names from the second item (correct), but generates a duplicate entry of the first item (not correct). The output is duplicated below:

Hawley, Joshua D., Dixie Sommers, and Edwin Meléndez. 2003. “The Earnings Impact of Adult Workforce Education in Ohio.” In. Community Development Research Center.

Hawley, Joshua D., Dixie Sommers, and Edwin Meléndez. 2003. “The Earnings Impact of Adult Workforce Education in Ohio.” In. Community Development Research Center.
2005. “The Impact of Institutional Collaborations on the Earnings of Adult Workforce Education Completers.” Adult Education Quarterly 56 (1): 21–38. https://doi.org/10.1177/0741713605280140.

The duplication issue does not seem to occur when its a single author, as seen in the output in below in the OLDA chapter and the NB-IRDT chapter where the government of canada (single author) has multiple entries, but also does not suppress the author name for the subsequent entry.

Stevens, David W. 1989. “Using State Unemployment Insurance Wage-Records to Trace the Subsequent Labor Market Experiences of Vocational Education Program Leavers.” Report. Human Resource Data Systems, Inc.

Stevens, David W. 2012. “Documents and Presentations Enabled by or Related to the Administrative Data Research and Evaluation (ADARE) Project 1998-2012.” Report. Jacob Franz Institute, University of Baltimore. http://www.jacob-france-institute.org/wp-content/uploads/ADARE-publications-presentations-compendium-11-8-12.pdf.

Government of Canada. 1985. “Statistics Act, RSC 1985, c S-19.” http://canlii.ca/t/532pk.

Government of Canada. 2000. “Principles Set Out in the National Standard of Canada Entitled Model Code for the Protection of Personal Information, CAN/CSA-Q830-96.” https://laws-lois.justice.gc.ca/eng/acts/p-8.6/page-11.html.

The entries in the bib files and the pandoc command from R are below.

"C:/PROGRA~1/Pandoc/pandoc" +RTS -K512m -RTS _main.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output _main.html --email-obfuscation none --wrap preserve --standalone --section-divs --table-of-contents --toc-depth 2 --template "C:\Users\Jim\Documents\R\win-library\4.0\bookdown\templates\gitbook.html" --highlight-style tango --number-sections --css "assets\css\style.css" --css "assets\css\toc.css" --css "assets\css\font-awesome.min.css" --css "assets\css\draft.css" --include-in-header "C:\Users\Jim\AppData\Local\Temp\RtmpmkZHn3\rmarkdown-str2aac251290e.html" --mathjax --lua-filter "C:/Users/Jim/Documents/R/win-library/4.0/rmarkdown/rmd/lua/pagebreak.lua" --lua-filter "C:/Users/Jim/Documents/R/win-library/4.0/rmarkdown/rmd/lua/latex-div.lua" --filter "C:/PROGRA~1/Pandoc/pandoc-citeproc.exe" 

@inproceedings{hawley2003a,
    title = {The {Earnings} {Impact} of {Adult} {Workforce} {Education} in {Ohio}},
    publisher = {Community Development Research Center},
    author = {Hawley, Joshua D. and Sommers, Dixie and Meléndez, Edwin},
    year = {2003}
}

@article{hawley2005,
    title = {The {Impact} of {Institutional} {Collaborations} on the {Earnings} of {Adult} {Workforce} {Education} {Completers}},
    volume = {56},
    doi = {10.1177/0741713605280140},
    number = {1},
    journal = {Adult Education Quarterly},
    author = {Hawley, Joshua D. and Sommers, Dixie and Meléndez, Edwin},
    year = {2005},
    pages = {21--38}
}

@techreport{stevens1989,
    type = {Report},
    title = {Using {State} {Unemployment} {Insurance} {Wage}-{Records} to {Trace} the {Subsequent} {Labor} {Market} {Experiences} of {Vocational} {Education} {Program} {Leavers}},
    institution = {Human Resource Data Systems, Inc.},
    author = {Stevens, David W.},
    year = {1989}
}

@techreport{stevens2012,
    type = {Report},
    title = {Documents and {Presentations} {Enabled} by or {Related} to the {Administrative} {Data} {Research} and {Evaluation} ({ADARE}) {Project} 1998-2012},
    url = {http://www.jacob-france-institute.org/wp-content/uploads/ADARE-publications-presentations-compendium-11-8-12.pdf},
    institution = {Jacob Franz Institute, University of Baltimore},
    author = {Stevens, David W.},
    year = {2012}
}

@misc{governmentofcanada1985,
    title = {Statistics {Act}, {RSC} 1985, c {S}-19},
    url = {http://canlii.ca/t/532pk},
    urldate = {2020-06-13},
    author = {{Government of Canada}},
    year = {1985}
}

@misc{governmentofcanada2000a,
    title = {Principles {Set} {Out} in the {National} {Standard} of {Canada} {Entitled} {Model} {Code} for the {Protection} of {Personal} {Information}, {CAN}/{CSA}-{Q830}-96},
    url = {https://laws-lois.justice.gc.ca/eng/acts/p-8.6/page-11.html},
    author = {{Government of Canada}},
    year = {2000}
}
jimhshen commented 3 years ago

Looking in the chicago style CSL file, it looks like this line causes the duplication problem:

  <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="&#8212;&#8212;&#8212;" entry-spacing="0">

Deleting subsequent-author-substitute="———" prevents it from generating a duplicate entry. Unclear why it also doesn't seem to actually work to suppress the author names for the single author entries.

larsvilhuber commented 3 years ago

I don't think that's the root cause. I think this is another bookdown-chapter-bib issue. Create a MWE with no chapter-bib to see if it is truly the issue. If it is bookdown, send the MWE with chapter-bib to Yihue.

jimhshen commented 3 years ago

Looks like you're right, just by looking at the references that's auto generated at the end of the book. Everything works properly there.

larsvilhuber commented 3 years ago

For now, it is fine to

but keep the issue open for later, to fix it.

-- Lars Vilhuber, Economist Cornell University, Executive Director, Labor Dynamics Institute and ILR School - Department of Economics American Economic Association - Data Editor Journal of Privacy and Confidentiality - Managing Editor

lars.vilhuber@cornell.edu | http://lars.vilhuber.com/ p: +1.607-330-5743 | https://twitter.com/larsvil

Assistant: ldi@cornell.edu | +1.607-255-2744


From: jimhshen notifications@github.com Sent: Tuesday, September 22, 2020 16:07 To: admindatahandbook/book book@noreply.github.com Cc: Lars Vilhuber lars.vilhuber@cornell.edu; Assign assign@noreply.github.com Subject: Re: [admindatahandbook/book] Pandoc breaks bibliography when same author team publishes across multiple years (#38)

Looks like you're right, just by looking at the references that's auto generated at the end of the book. Everything works properly there.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/admindatahandbook/book/issues/38#issuecomment-696951072, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABVSQ6FZAMI5J2Y33SCCPBLSHD7XTANCNFSM4RWDQNTQ.

jimhshen commented 3 years ago

https://jimhshen.github.io/citationfootnotes/chapter-bib-issues.html

If Hawley went by Joshua Hawley instead of Joshua D. Hawley (and therefore didn't have a period in his name) we wouldn't have noticed this.

jimhshen commented 3 years ago

Opened bookdown issue here https://github.com/rstudio/bookdown/issues/952