0

I am writing my PDF document in Rmarkdown and I keep the .tex file. I use Zotero for citation management. The following yalm had my citations coded transferable between .Rmd and .tex files, which means entries coded as [@ref] in .Rmd are written as \cite{ref} in .tex file but some reference entries have all the first letters in each word in the title capitalized while some only have the first letter of the whole title capitalized. For example

Author 2000. How to Write a Paragraph...

vs.

Author 2000. How to write a paragraph...

---
title: ""
author: ""
date:  "`r Sys.Date()`"
output: 
  pdf_document:
    keep_tex: true
    latex_engine: pdflatex
    citation_package: natbib
    pandoc_args : [ --listings ]
bibliography: ..../../ref
biblio-style: cell
---

enter image description here

Removing latex_engine, citation_package, and pandoc_args had all the entries consistently typed but citations command were neglected in the .tex file (places of citations are written as plain text). Is there a command that I can include in my .Rmd file so that no matter how Zotero saves each entry, I can override to have my references typed consistently? I would like to have the first letter of each word in the title, except the prepositions and definite/indefinite articles capitalized.

enter image description here

And here is the bib text:

@article{bellTimeRequirementPollination2010,
  ids = {bellTimeRequirementPollination2010},
  title = {Time {{Requirement}} from {{Pollination}} to {{Seed Maturity}} in {{Waterhemp}} ({{Amaranthus}} Tuberculatus)},
  author = {Bell, Michael S. and Tranel, Patrick J.},
  year = {2010},
  month = jun,
  volume = {58},
  pages = {167--173},
  issn = {0043-1745, 1550-2759},
  doi = {10/c547b8},
  abstract = {Experiments were conducted to determine the amount of time required for waterhemp to produce mature seeds after pollination. Female waterhemp plants were pollinated over a 24-h time period and then isolated from males. Two branches, each containing at least 500 flowers, were harvested from each female at the time of the initial pollination, designated as 0 d after pollination (DAP), as well as at multiple other times after pollination up to 62 DAP. One branch from each harvest was stored at 30 C for 48 h, while the other branch was stored at -20 C for 48 h. Branches were then stored at room temperature until all harvests were complete, at which time seeds from each branch at each time after pollination were collected, weighed, and stratified. Germination tests were then conducted to determine the time at which seeds become viable after pollination. Seeds that had not germinated by the end of the germination tests were subjected to tetrazolium testing for viability. Germination tests were also conducted on nonstratified seeds to investigate changes in seed dormancy that were expected to occur over the amount of time the seeds were allowed to remain on the plants. Seeds stored initially at 30 C postharvest became viable 7 to 9 DAP, whereas seeds stored initially at -20 C postharvest did not become mature until 11 DAP. Seed coat color was white soon after pollination and became dark brown to nearly black by 12 DAP, and seed weight increased until 12 DAP. Tetrazolium tests for seed viability correlated well with the germination tests. Germination tests on nonstratified seeds indicated that dormancy level was initially high in the population used, but began to decrease between 15 and 30 DAP. Results of this study have implications both for waterhemp management and research.},
  journal = {Weed Science},
  keywords = {Amaranthus tuberculatus (Moq.) Sauer AMATU,Dormancy,germination,pollination,seed set,seed weight,Waterhemp},
  language = {en},
  number = {2}
}

@book{foodandagricultureorganizationoftheunitednationsAridZoneForestry1989,
  title = {Arid Zone Forestry: A Guide for Field Technicians},
  shorttitle = {Arid Zone Forestry},
  editor = {{Food {and} Agriculture Organization of the United Nations}},
  year = {1989},
  publisher = {{Food and Agriculture Organization of the United Nations}},
  address = {{Rome}},
  isbn = {978-92-5-102809-4},
  keywords = {Arid regions,Forestry extension,Forests and forestry,Handbooks; manuals; etc},
  lccn = {SD373 .A75 1989},
  number = {20},
  series = {{{FAO}} Conservation Guide}
}

@article{mohlerVerticalMovementWeed2006,
  ids = {mohlerVerticalMovementWeed2006},
  title = {Vertical Movement of Weed Seed Surrogates by Tillage Implements and Natural Processes},
  author = {Mohler, Charles L. and Frisch, James C. and McCulloch, Charles E.},
  year = {2006},
  month = mar,
  volume = {86},
  pages = {110--122},
  issn = {0167-1987},
  doi = {10/cm85q3},
  abstract = {Vertical position of weed seeds in the soil column is one of the critical factors governing the density of emerged seedlings, but data on movement of subsurface seeds and seed surrogates by tillage are limited. In this experiment ceramic beads were seeded at 0, 4, 8, 12, 16 and 20cm using specially constructed equipment. Plots were then tilled at right angles to the bead slots with either a moldboard plow, a chisel plow with curved blades, a chisel plow with straight blades, heavy tandem disks, a rotary tiller, or left untilled. Soil was sampled to determine bead positions. The probability matrix describing movement of beads from each soil layer to any other was estimated for each tillage regimen by maximum likelihood. Movement patterns for moldboard plow, the two chisel plow treatments, and disk and rotary tillage differed significantly. The difference between disking and rotary tillage was only marginally significant (0.0580\% probability of remaining in at their original depth. Tillage by moldboard plow showed the expected soil inversion, but burial of surface beads was greater than return of buried beads to the surface. For example, the probability of a surface bead ending up below 10cm was over 77\% whereas the probability of a bead originally in the 14\textendash 18cm layer moving to the top 10cm was only 44\%. Sampling of the no tillage and moldboard plow treatments the following spring showed an upward movement of beads by natural causes for beads below 14cm. To allow flexibility in vertically structured population models, the movement probability matrices were fitted with a continuous model based on the beta distribution. The model showed that for a hypothetical uniformly distributed seed bank, 97\% of seeds in the top 4cm following moldboard plowing had arrived there from greater depths. In contrast, only about one third of seeds in the top 4cm of soil after tillage by chisel, disk or rotary tiller arrived from deeper layers.},
  journal = {Soil and Tillage Research},
  keywords = {Chisel plow,Disk,Moldboard plow,No-till,Probability model,Rotary tiller,Seed movement},
  number = {1}
}
8
  • The authors of each document chose how their title should be capitalized. Do not change their choice! Commented May 30, 2020 at 6:22
  • 2
    It is not uncommon for styles to insist on different case conventions in the bibliography. (APA style would be one example.) Often the rule of thumb is that titles of stand-alone-works (that are usually written in italics, e.g. book/journal titles) are written in Title Case whereas titles of works contained in larger works (that are written in quotation marks or without special formatting, e.g. titles of articles) are converted into sentence case. ...
    – moewe
    Commented May 30, 2020 at 10:29
  • ... BibTeX styles usually implement that, but they have to rely on the user giving all titles in Title Case in the input .bib file (see tex.stackexchange.com/q/439440/35864 for details and some background). IIRC Zotero enforces the opposite convention and wants all titles given in sentence case. (I don't know about standard Zotero .bib export, but Better BibTeX for Zotero does quite some work to get that right.) ...
    – moewe
    Commented May 30, 2020 at 10:32
  • ... The second and first entries and their title capitalisation would behave exactly like I'd expect if the style applies sentence case as explained above. I'd expect the first entry to have sentence casing in the title as well, but it may well be that the title is wrongly WYSIWYG-protected with braces in the .bib file (title = {{Time Requirement from Pollination to Seed Maturity in Waterhemp}}, instead of the correct title = {Time Requirement from Pollination to Seed Maturity in Waterhemp},.)
    – moewe
    Commented May 30, 2020 at 10:34
  • Thank you for your comments. I am using Better BibTex. I noticed that the latest version was May 31. Updating doesn't solve the problem. I'd like to avoid going in and change individual entries because I have many.
    – hnguyen
    Commented Jun 1, 2020 at 14:25

1 Answer 1

0

Given the output that was posted above, I am sure that the titles in Zotero are title-cased, where Zotero expects (English) titles to be written in sentence-case.

You can either right-click the title in Zotero to convert it to sentence case, or disable case-protection in Better BibTeX. Either of these will make the problem go away, but I consider the latter to be a workaround rather than a fix.

4
  • Thank you for answering my question. Being able to have an organizer, like Zotero and switching cases with one click, is already convenient. I must admit that clicking single entry to switch case is one of my procrastination activities. I am looking forward to a way to modify all entries at once.
    – hnguyen
    Commented Jun 9, 2020 at 17:09
  • This can be automated using the built-in javascript runner and a bit of javascript
    – retorquere
    Commented Jun 9, 2020 at 18:26
  • Could you be more specific, please? I am not a developer.
    – hnguyen
    Commented Jun 17, 2020 at 17:21
  • I've looked into it and I was mistaken -- I thought it would be possible to call the code which does this in Zotero (in which case I'd have gladly put together a script and instructions for you), but the way the code is called I don't think there's a way to automate this. Your best bet would be to ask your question on forums.zotero.org -- the Zotero developers hang out there and will be able to tell.
    – retorquere
    Commented Jun 17, 2020 at 22:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .