Import .bib item types

edited February 9, 2021
Hey all,

Apologies if this is ignorant or if there's an answer here already, tried to poke around but couldn't figure anything out.

So, the problem:

I was hoping to import a bibtex file and then export it to csl-json. The reason I want to do that is that I'm having some trouble getting things to format right with pandoc citeproc, and I think it's because it's not processing the .bib file right. But on importing my .bib file into Zotero, I get a lot of errors for somewhat less usual item types, in particular, "manuscript". Zotero says it doesn't know what to do with them and therefore makes them into journal articles.

Here's a .bib-formatted citation:

address = {Wilmington, DE},
archive = {Hagley Museum and Library},
bib = {archives},
shorttitle = {NICB Records},
title = {{National Industrial Conference Board} Records},
type = {Accession number 1057},

But if I go to Zotero and do "Import from Clipboard", it says

Import errors found: Don't know what Zotero type to make of 'manuscript' for @nicb, importing as journalArticle

This seems strange since Zotero does in fact have an item type Manuscript, as does csl-json, and according to this: they should map fine. If I create an item in Zotero with that type and export it to csl-json, all seems to be well (I can load that export into the Visual CSL editor ( and it formats as I expect after editing the csl style, and it formats right if I use Zotero to insert the citation into Word and use the style I've edited).

I'm on a Mac (Mojave) and use the standalone Zotero.

For context: I'm trying to finish a book in which I cite a lot of Congressional hearings and archival sources, and was using the Visual CSL editor to adapt one of the Chicago footnote styles so as to get these to format sensibly in the somewhat hacky and half-baked system I've used in citing them. Things work great in the CSL editor and with Zotero directly, but I use Scrivener and export into .md and then run that in pandoc, so I need citeproc to understand what I'm doing.

Any suggestions welcome! At least, ones that don't involve laborious upending my workflow for this project, which is basically done... though if they're not that laborious I'd consider it. I haven't e.g. tried using Zotero directly in Scrivener or anything like that; came originally from pdflatex & bibtex but I liked Scrivener and have to produce Word documents so I have cobbled together something...
  • Zotero and CSL do have a manuscript item type -- bibtex doesn't. The @manuscript is just something ad hoc someone invented with no basis in any standard; in biblatex, manuscripts would be @unpublished

    You can see if BetterBibTeX does something different than plain Zotero -- Emiliano has built all types of smart parsing in there

    Alternatively, you can modify Zotero's built-in bibtex parsing. Just adding an item type mapping shouldn't be very hard.
  • Thanks for the quick response! That does help a bit. I kind of forgot how few actual bibtex types there are. Turns ouf if I just make it 'unpublished' instead of 'manuscript' in the original bib file, it imports into Zotero as manuscript, and also citeproc treats it as manuscript. However, since the unpublished type has so few fields, I can't get enough of the fields in there (e.g. anything where to record the archive... I guess I could put it in author, and edit the csl to handle it right, but that seems a bit crazy). And while I can play with the Translator editor, I can't get it to pay attention to additional fields (I tried to modify the list of fields that's there in e.g. Better BibTex, but no luck - I expect I'm missing something, not my expertise).

    Anyway, I suppose I can import my archive collections list into Zotero and edit them there and then export the csl and use that when compiling with pandoc. That should, I think, do the trick and it's not that much work since there's only a dozen or so archival collections in my bibliography. Thanks again!
  • Yes, I definitely recommend using CSL-JSON or CSL YAML with pandoc. That’s pandoc’s native format

    What’s your workflow more broadly? Are you writing in Markdown and using pandoc directly? Working with RStudio?
  • CSL -JSON I'm sure you're right, but given the messy state of my bibtex files accumulated over a couple of decades, don't quite have the stomach for it right now...

    I'm using Scrivener and exporting to Markdown and then running pandoc from the command line.

    Thanks! Any tips for future workflows appreciated!
  • If you’re working with .bib files with pandoc, you will need to accept that citations to items other than journal articles, books, or chapters are going to be messy or inaccurate. BibLaTeX and CSL have different data storage conventions, and BibLaTeX is much more ad hoc—putting lots of style-specific things into single custom fields. Because of that, when pandoc coverts from .bib to CSL, that conversion is lossy.

    If you want accurate citations with pandoc, then taking the time to import the bib files to Zotero, then exporting to CSL YAML or CSL-JSON will yield you consistently accurate citations. If you have many manuscripts/etc., the differences will likely be big as you’ve seen. Installing the BetterBibTeX plugin and using its output formats will yield the best JSON/YAML output.
  • Thanks! Guess I'll have to put that on the agenda...
  • Hi,
    The documentation says zotero reads biblatex, but there isn't an option on my zotero to import biblatex, only bibtex. How do I import my over 50 references into zotero?
  • What do you mean there isn't an option? You don't have to specify the format when importing, Zotero is able to contextually recognize whether a .bib file is bibtex or biblatex
Sign In or Register to comment.