Import .bib item types
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:
@manuscript{nicb,
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: https://aurimasv.github.io/z2csl/typeMap.xml 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 (https://editor.citationstyles.org/visualEditor/) 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...
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:
@manuscript{nicb,
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: https://aurimasv.github.io/z2csl/typeMap.xml 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 (https://editor.citationstyles.org/visualEditor/) 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...
@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 https://retorque.re/zotero-better-bibtex/ -- 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. https://www.zotero.org/support/dev/translators/coding
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!
What’s your workflow more broadly? Are you writing in Markdown and using pandoc directly? Working with RStudio?
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 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.
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?