Thesis type not being exported to .bib file

I have a Thesis entry in Zotero (5.0.97-beta.65+15ae72d14). I noticed that the value for the Type field is sometimes not exported to the .bib file. If I enter "PhD dissertation" or "PhD thesis" for the Type in Zotero, the resulting @phdthesis entry in the .bib file does not have a type field. However, if I enter "PhD report" for the Type in Zotero, then the entry in the .bib files has a type field with the correct value. Is this a known issue?

I believe I am using Better BibTex 6.1.10. Sorry if this is not the right forum for this issue.
  • Thus is expected. In BibTeX, the “type” of a thesis is implicitly indicated by the item type, either @phdthesis or @masterthesis
  • edited February 5, 2022
    Thanks @bwiernik. I've been putting "MS thesis" and "PhD dissertation" in the Zotero Type field. What information is the Type field intended to capture? Is there a way to instruct the export to map a Zotero Thesis entry to @masterthesis?

    EDIT: Looks like "MA" or "Masters" gets mapped to @masterthesis.

    https://forums.zotero.org/discussion/comment/366329/#Comment_366329
  • Yes, “PhD thesis” or “Doctoral dissertation” or “Masters thesis” etc is what you should enter in Type. That will appear if you create citations using a CSL style (like what Zotero’s Word plugin uses, or pandoc/RMarkdown). In CSL, all theses are the same item type (thesis) and the specific type is distinguished by the ‘genre’ variable (the Type field in Zotero).

    BibTeX uses a different data structure convention. In BibTeX, doctoral and masters theses are two separate item types (@phdthesis and @mastersthesis). They are not distinguished by a type field the way they are in CSL. If you are writing a paper in LaTeX, what BetterBibTeX is producing by omitting the Type field after classifying as phdthesis or @mastersthesis is correct. The BibTeX citation style you use should add the relevant labels, etc as needed.

    Note that if you are writing with Markdown, you should be exporting to Better CSL JSON or Better CSL YAML, not BibTeX.

  • The mapping BBT uses is a heuristic that works as follows: lowercase the Type field, remove any character that is not in the range a-z, remove thesis if it appears at the end, and then map the remainder according to this list:

    phd: phdthesis,
    dissertation: phdthesis,
    phddissertation: phdthesis,
    doctoraldissertation: phdthesis,

    ma: mastersthesis,
    master: mastersthesis,
    masters: mastersthesis,

    ba: bathesis,
    bachelor: bathesis,
    bachelors: bathesis,

    cand: candthesis,
    candidate: candthesis,
    candidates: candthesis
  • Thanks @bwiernik and @emilianoeheyns. That's exactly what I needed.
  • I believe Zotero might have been updated? If I write PhD Dissertation in the "type" field, it exports to BibLaTeX as "phddissertation".

    However, none of the rest of them work, bathesis, mathesis and candthesis.

    I would suggest that Zotero map the thesis "type" field to the 4 bibtex types: bathesis, mathesis, candthesis and phdthesis, perhaps even by introducing a drop-down menu.

    Bibtex has other thesis types, such as technical report, etc. that should also work.
  • @henrex using Zotero BibTeX or Better BibTeX?
  • I use Zotero only. If I write PhD Dissertation in the type field, Zotero exports "phdthesis" in the type field in the bibtex exported file.
  • I'm having the same issue.

    zotero 6.0.15
    Better BibTeX for Zotero 6.7.24

    When exporting the references to the .bib file using "BibLaTeX" or "Better BibLaTeX", the "type" field of theses is being overwritten as follows:

    "PhD thesis" -> "phdthesis"
    "Master's thesis" -> "mathesis"
    "Bachelor's thesis" -> "bathesis"
  • I'm confused -- that sounds like it's working as described above?
  • Yes, it's the same issue as described above by others. But I think that the Zotero export (for BibLaTeX) should keep the "type" field intact.
  • I disagree -- since an entry in the type field overrides the localized form in BibLaTeX, exporting only the standardized version seems like a much better solution.
    If you disagree, though, you have access to the Zotero item in BBT post-processing hooks, so you can change this for your export.
  • edited October 11, 2022
    Thank you for your explanation! I agree with you now. My LaTeX problem with referencing theses is solved.

    Note: my previous issue was that my .bib file output contained "type={{phdthesis}}" instead of "type={phdthesis}" (due to a post-processing script I was using) which was not rendering "PhD thesis" as expected in the list of References.
Sign In or Register to comment.