3

I am RevTex version 4-2 in combination with a Zotero-generated bib file. The bib file contains a lot of "random" entries in the "Language" field, such as "en", "eng", etc. These entries were automatically generated when adding the papers. RevTex 4-1 could deal with this bib file just fine. However, with RevTex 4-2, I get a lot of babel error messages related to the bibliography.

My question is: Is there any way to ignore the "Language" field in the bib file with RevTex 4-2, as it was apparently done in RevTex 4-1?

Note: I would like to avoid any solutions that require me to manually change > 1000 entries in my paper database to remove or correct the language entry.

Edit. Here is a minimal example:

\documentclass{revtex4-2}
\usepackage[english]{babel}
\begin{document}
\nocite{kubota_stress-induced_2012}
\nocite{kubota_stress-induced_2012_2}
% \bibliographystyle{apsrev4-1}
\bibliography{references}
\end{document}

Where references.bib reads

@article{kubota_stress-induced_2012,
    title = {Stress-{Induced} {Perpendicular} {Magnetization} in {Epitaxial} {Iron} {Garnet} {Thin} {Films}},
    volume = {5},
    issn = {1882-0786},
    url = {https://iopscience.iop.org/article/10.1143/APEX.5.103002/meta},
    doi = {10.1143/APEX.5.103002},
    language = {en},
    number = {10},
    urldate = {2019-09-07},
    journal = {Applied Physics Express},
    author = {Kubota, Masashi and Tsukazaki, Atsushi and Kagawa, Fumitaka and Shibuya, Keisuke and Tokunaga, Yusuke and Kawasaki, Masashi and Tokura, Yoshinori},
    month = sep,
    year = {2012},
    pages = {103002}
}


@article{kubota_stress-induced_2012_2,
    title = {Stress-{Induced} {Perpendicular} {Magnetization} in {Epitaxial} {Iron} {Garnet} {Thin} {Films}},
    volume = {5},
    issn = {1882-0786},
    url = {https://iopscience.iop.org/article/10.1143/APEX.5.103002/meta},
    doi = {10.1143/APEX.5.103002},
    number = {10},
    urldate = {2019-09-07},
    journal = {Applied Physics Express},
    author = {Kubota, Masashi and Tsukazaki, Atsushi and Kagawa, Fumitaka and Shibuya, Keisuke and Tokunaga, Yusuke and Kawasaki, Masashi and Tokura, Yoshinori},
    month = sep,
    year = {2012},
    pages = {103002}
}

When I un-comment the bibliographystyle line, everything works fine. It seems that the new bibliographystyle changes the .bbl title entry from

\bibfield  {title}{\bibinfo {title} {Stress-{Induced} {Perpendicular} ...

to

\bibfield  {title}{{\selectlanguage {en}\bibinfo {title} {Stress-{Induced} {Perpendicular} ...

I guess one has to edit the bst file, or just use the old style.

3
  • Have you asked zotero support how you can correct the wrong output of that software? Seems to be more an issue with zotero and not LaTeX ...
    – Mensch
    Sep 16, 2019 at 16:11
  • I understand this comment but given that RevTex 4-1 and many other classes seem to be fine with ignoring the Language field in bib files, I'd like to understand if that can also be achieved with RevTex 4-2. Frankly, I don't see a reason why the Language field should be evaluated.
    – Felix
    Sep 16, 2019 at 16:40
  • Well, then please show us a short compilable tex code resulting in your issue. Please do not forget to add two used bib entries to your question ... Did you only change the documentclass or did you also change from BiBTeX to BibLaTeX/Biber?
    – Mensch
    Sep 16, 2019 at 16:57

1 Answer 1

4

I recommend you to install the Better BibTeX for Zotero. It solves many issues with BibTeX export. When you have Better BibTeX installed, you can skip the export of language fields.

In Zotero, select Edit -> Preferences -> Better BibTeX -> Export and set Fields to omit from export to "language"

enter image description here

3
  • 2
    Very useful! I had to play around a bit to make the better bibtex keys the same as the original zotero keys, to not break compatibility with my old documents. In case this is relevant for someone else, here is my citation key pattern: [auth:lower]_[Title:lower:select=1,1]_[year]
    – Felix
    Sep 17, 2020 at 8:06
  • 1
    [zotero] gets you the original zotero key algorithm.
    – retorquere
    Oct 12, 2020 at 11:39
  • NOTE 1: Applies only to FULL export for complete bib, not to selected items export. NOTE 2: The picture shown is slightly different in latest BBT release, however omitting 'language' can be set.
    – K J
    Feb 25, 2022 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.