Coder Social home page Coder Social logo

retorquere / zotero-better-bibtex Goto Github PK

View Code? Open in Web Editor NEW
4.9K 48.0 266.0 365.69 MB

Make Zotero effective for us LaTeX holdouts

Home Page: https://retorque.re/zotero-better-bibtex/

License: MIT License

Ruby 0.27% Shell 0.24% JavaScript 6.26% Gherkin 5.13% HTML 4.36% CSS 0.17% Python 11.23% TypeScript 49.04% Mako 0.55% Makefile 0.01% TeX 1.34% Lua 4.71% EJS 0.18% Pug 3.99% Fluent 12.51%
zotero bibtex citation-keys biblatex latex bib

zotero-better-bibtex's Introduction

Better BibTeX for Zotero

Join the chat at https://gitter.im/retorquere/zotero-better-bibtex Greenkeeper badge

Better BibTeX (BBT) is an extension for Zotero and Juris-M that makes it easier to manage bibliographic data, especially for people authoring documents using text-based toolchains (e.g. based on LaTeX / Markdown).

Zotero 7 beta support: Zotero beta 70+ currently not supported, a fix is underway

#2829

Better BibTeX is mostly compatible with the Zotero 7 beta; I am awaiting a change by the Zotero team to get to complete support. You can find the status of Zotero 7 support in the first post of #2522; if you find new problems (which are not still marked as unresolved in that top post), please report them as new issues, not by commenting on #2522.

Juris-M support

Juris-M is unfortunately not compatible with BBT at the moment. To my understanding, work is underway to get a Zotero-7-based Juris-M, and then BBT will work in Juris-M.

Features

Facilities for generating citation keys

  • Automatically generate citation keys without key clashes! Generate citation keys that take into account existing keys in your library even when they are not part of the items you export. Prevent random breakage!
  • Generate citation keys based on contents of your items using citekey formulas.
  • Set your own, stable citation keys, drag and drop LaTeX citations, add other custom BibLaTeX fields.

Conversion between formats and encodings

  • Zotero does all its work in UTF-8 Unicode, which is absolutely the right thing to do. Unfortunately, for those shackled to BibTeX and who cannot (yet) move to BibLaTeX, unicode is a major PITA. Also, Zotero supports some simple HTML markup in your items that Bib(La)TeX won't understand.

  • BBT will convert from/to HTML/LaTeX:

    • <i>...</i>\emph{...}/\textit{...}
    • <b>...</b>\textbf{...}
    • <sup>...</sup>\textsuperscript{...} and <sub>...</sub>\textsubscript{...}.

    More can be added on request.

    BBT contains a comprehensive list of LaTeX constructs, so stuff like \"{o} or \"o will be converted to their unicode equivalents on import (e.g., \"{o} to ö), and their unicode equivalents back to \"{o} if you have that option enabled (but you don't have to if you use BibLaTeX, which has fairly good Unicode support).

    If you need literal LaTeX in your export: surround it with <script>...</script> (or <pre>...</pre>, which do the same) markers.

Facilities for exporting data from Zotero

  • Highly customized exports.
  • Fixes date field exports: export dates like 'forthcoming' as 'forthcoming' instead of empty, but normalize valid dates to unambiguous international format.
  • Auto export of collections or entire libraries when they change.
  • Pull export from the embedded webserver.
  • Automatic journal abbreviation.

Getting started

To get started, read the installation instructions.

How does it work ?

At its core, BBT behaves like any Zotero import/export module; anywhere you can export or import bibliography items in Zotero, you'll find Better X listed among the choices.

If nothing else, you could keep your existing workflow as-is, and just enjoy the improved LaTeX ↔ unicode translation on import and export and more accurate field mapping.

Better BibTeX works from BibTeXing and Tame the BeaST for BibTeX, and The Biblatex Package for BibLaTeX, but since there isn't really a definitive manual for either format that is universally followed by Bib(La)TeX editors/processors, I'm pragmatic about implementing what works.

Got problems? We got fixes!

If you have any questions on BBT's use, do not hesitate to file a GitHub issue and ask for help.

If you're reporting a bug in BBT, please take a moment to glance through the support request guidelines; it will make sure I get your problem fixed as quick as possible. Clear bug reports commonly have really short time-to-fix, so if you report something, stick around -- it may be done as you wait.

The support request guidelines are very detailed, perhaps to the point of being off-putting, but please do not fret; these guidelines simply express my ideal bug submission. I of course prefer very clearly documented issue reports over fuzzy ones, but I prefer fuzzy ones over missed ones.

Sponsoring BBT

While the development needs of BBT are to a large extent covered by the generosity towards open-source developers of services such as github, my development system does require the occasional upgrade; also, I enjoy getting the occasional frivolous tech-toy that I wouldn't otherwise grant myself. While you should feel in no way obligated to pay for BBT, anything you can spare is very much appreciated. If you'd rather contribute a little bit each month (and a little means a lot) so I can save up for a replacement a year or so down the line, head on over to Patreon, but mind that Patreon takes a fairly large cut of what you give.

Many, many thanks, also to the existing contributors -- thanks to you I've hit my first target and have been able to replace my trusty macbook air with a newer macbook pro which has much more breathing room.

My github stats

Metrics

zotero-better-bibtex's People

Contributors

abejellinek avatar amomentofmusic avatar andersjohansson avatar bwiernik avatar cottrell avatar danielfleischer avatar dlukes avatar emic37 avatar f3fora avatar georgd avatar greenkeeper[bot] avatar hbuschme avatar jmuccigr avatar joelnitta avatar julianaym avatar kasi07 avatar katrinleinweber avatar kjambunathan avatar konstantinkhabarlak avatar koppor avatar lukesmurray avatar mblode avatar mgmeyers avatar michael-hoss avatar njbart avatar pgoelz avatar qqobb avatar qualzyy avatar retorquere avatar urrameu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zotero-better-bibtex's Issues

Title field not being exported

the title field is not being exported in v0.2.13 using the Better Biblatex translator. All other fields seem to export fine.

language v. langid for better biblatex export

Hi,

The biblatex export engine (translator?) seems to export the "language" field with that title, when it should be "langid" for biblatex. This is supposedly fixed (https://forums.zotero.org/discussion/33960/biblatex-importexport-csl-language-biblatex-langid/) in the standard translator but I'm not getting either "language" or "langid" when I use the standard translator (I included it in the gist too). Any chance this could be updated?

Thanks!

https://gist.github.com/bauchner/7074b5081bed49a0fedf

ps: thanks for the super fast pandoc fix this morning

export JabRef groups

Will be there an option to export collections to bibtex field, for example as "Groups" item. I have try to implement this option, but I am not very good Java programer. I have tried with Zotero.nextCollection() function, but this doesn't work. I have found this implementation but only form active collection (
var z = Zotero;
var report = new Array;
var collection= z.getActiveZoteroPane().getSelectedCollection();
var items = collection.getChildItems();
for (var i=0;i<items.length;i++) {
item = items[i];
...
writeField('Groups', escape(collection));
}

I have used the tags field, but this is not good idea:
writeField('Groups', escape(item.tags.map(function(tag) {return tag.tag;}), {brace: true, sep: ', '}));
Thank you for your work!

Import error

After the last changes, the biblatex import doesn't work at all. the old file "Better BibLaTeX.js" works good.

entries with no author sometimes don't get a cite key

Some entries of my bibliography don't get a cite key generated when exporting.
I thought I'll just fix it with setting a fixed citekey for that entry with bibtex:thecitekey.
But after a new export, a different entry that had no author got the same problem, the bibtex-file had no citekey set.
This might be no problem in some cases, but pandoc using --bibliography complains in those cases.

The easiest solution probably would be: if a citekey couldn't be generated from authordate, use the titledate or title, otherwise if not even a title exists, assign a (eg. md5) hash from a big enough random number.

[authorsN] and [auth.etal] field markers not working

Using 0.3.2 with Zotero 4.0.17. Trying to set up custom citekeys using the JabRef fields that you link to. I've observed the following:

  • [authorsN] does not seem to work. I tried it with [authors2][year], and it is just ignored. I get bibtex: 2014 in the result.
  • [auth.etal] produces the same thing as [auth.auth.ea]. Instead of getting Author1.etal2014 I get Author1.Author2.ea2014.

Thanks for your work on this. This is my first time using. Previously, I exported from Zotero to BibTex, used JabRef to create the keys, inserted the citation keys in Markdown for Pandoc processing. Looking forward to being able to maintain the cite keys in Zotero.

Provide button for citations

Drag-and-drop citations are not that handy when working with maximized windows of both TeX editor and (browser) Zotero UI: the user has to first "unmaximize" these two windows to be able to drag-and-drop.

I know the Ctrl+Shift+C shortcut but a feature à la JabRef could be nice: a button (and a shortcut!) for adding the citation in a (preselected) TeX editor (JabRef currently has plug-ins for Emacs, Vim,TeXstudio, Kile, LaTeXEditor, WinEdt, LyX, OpenOffice). Hence, instead of (being writing in the TeX editor window):

  1. Alt+Tab to switch to the Zotero UI,
  2. click to select the relevant item,
  3. Ctrl+Shift+C to copy it,
  4. Alt+Tab to switch to the TeX editor window,
  5. Ctrl+V to paste the citation,
  6. continue to write,

it would require only:

  1. Alt+Tab to switch to the Zotero UI,
  2. click to select the relevant item,
  3. click on the relevant button or (better) hit the corresponding shortcut,
  4. Alt+Tab to switch to the TeX editor window,
  5. continue to write.

Okay, only one step less but probably a more natural workflow.

Using special fields of BibLaTeX not available in Zotero

Using andersjohannson's BibLatex translator, I can embed special fields of BibLatex that are not (yet) available in Zotero. For instance, origdate or origtitle are important fields when citing a translated work, but they are currently unsupported in Zotero. Using andersjohannson's BibLatex translator I could export these fields by putting the following in a Zotero record's Extra field:

biblatexdata[origdate=1856;origtitle=An Old Title]

How difficult would it be for your plugin to make use of this feature of andersjohannson's Biblatex translator?

No "Bib(La)TeX citations" translater available

I have just installed version 0.2.18 into Zotero 4.0..19 standalone

In the instructions section: "Drag and drop/hotkey citations" it says to use the default output format named: "Bib(La)TeX citations"

There is no such translator in the list.

I have tried

  • disabling other add-ons
  • reset the translators.
  • removed and re-installed zotero-better-biblatex
  • same in firefox plugin-based Zotero

I guess either the translator is missing, or called something else.

Cheers....

journal field

Another missing bibtex field is the Journal field: writeField('Journal', escape(item.journalAbbreviation, {brace: true}));

Problem with forced citekey generation

Hi. I'm having issues trying to force generate bibtex citekeys using the Better Bib(La)Tex plugin and the Zotero Standalone app in Mac OSX.

Whenever I right-click any entry and then click "Generate BibTex key", it generates a value "bibtex: undefined" in the "extra" field.

I'm using Zotero Standalone v4.0.20 (Mac OSX) and Zotero Better Bib(La)Tex v0.5.2.

Please help!

-g

Import

Now the import from Jabref doesn't work at all

Javascript "An error occurred while trying to export the selected file"

Hi fellows,

Overnight, I started getting the following error when trying to export:

[JavaScript Error: "CiteKeys.initialize.forEach is not a function" {file: "C:\Users\Daniel\AppData\Roaming\Zotero\Zotero\Profiles\uvik018t.default\zotero\translators\Better BibTeX.js" line: 12430}]

I am using Zotero standalone 4.0.17 with better bib(la)tex 0.1.22. I'm sorry for being obtuse, but I have no idea what that error means. Can it be that I changed one of my entries (I did update some of them today) and I filled in something wrong, maybe with some invalid symbol, or maybe left some important entry blank?

Any help would be appreciated!
Cheers,
Daniel

Encoding of library when accessed by http

Defaul encoding of BibLaTeX export is set to utf8. But when I'm accessing library by http ( http://localhost:23119/better-bibtex/collection?/0/FTIQKJSD.biblatex ) it is 7byte encoded and all the special characters are replaced by their LaTeX equivalents. For exmample, I'm getting this:

author = {Bobak, Dariusz and P\l{}onka, Tomasz and Po\l{}towicz-Bobak, Marta and Wi\'{s}niewski, Andrzej},

instead of:

author = {Bobak, Dariusz and Płonka, Tomasz and Połtowicz-Bobak, Marta and Wiśniewski, Andrzej},

Is it bug, or persumed behaviour?

<i>work</i> Closing tag ignored

Hi,
It looks like the closing html tag is ignored for , i.e. title:
FoodNet Estimate of the Burden of Illness Caused by Nontyphoidal Salmonella Infections in the United States
results in:
{{FoodNet Estimate of the Burden of Illness Caused by Nontyphoidal \emph{Salmonella Infections in the United States}}
In both better bibtex and better biblatex.

Drag and Drop Bibtex KEY differs from the KEY in the exported library

Hello,

this relates to users who use Drag and Drop Bibtex \cite{KEY} with a default [author][year] Bibtex key output. If author has many publications of the same year all Bibtex keys will be identical - [AuthorYYYY].

This is not an issue when one exports the whole zotero library - identical Bibtex keys are appended with a letter: [AuthorYYYYa], [AuthorYYYYb], [AuthorYYYYc]...

I don't know the underlying working mechanism, therefore I am raising two questions:

  1. is it possible that suffix generation depends on the document order in the Zotero library tree? If yes, then by changing the order and re-exporting the library there is a danger to mix-up Bibtex keys.
  2. The only solution I have come up with is to change citation output to [auth][year][title]. To prevent the possibility of such problem, I would suggest to add something like [hash] field. A unique hash, calculated from Bibtex entry (thus only entry data dependent) and checked against other library entries to be truly unique.

ensuremath

Dear all, thanks for writing this, it is very useful to me. I have a small problem, which started occurring when I installed this in my zotero standalone. the titles in greek do not show up.

I have in zotero this
ΔΗΛΟΣ ΕΚΙΝΗΘΗ: An 'Imaginary Earthquake' on Delos in Herodotus and Thucydides

in my .bib
\ensuremath{ΔΗΛΟΣ} \ensuremath{ΕΚΙΝΗΘΗ}: An 'Imaginary Earthquake' on Delos in Herodotus and Thucydides

then in the .bbl
\field{title}{\ensuremath{ΔΗΛΟΣ} \ensuremath{ΕΚΙΝΗΘΗ}: An 'Imaginary Earthquake' on Delos in Herodotus and Thucydides

I believe the problem is \ensuremath or something related to that. but I am a classicist with little clue about what might be going on here. thanks a lot.

Ambiguous keys

Great bibtex integration! However, I have a problem with two entries in my bibliography by Smith in the year 2013. How can I disambiguate these? When I drag'n'drop the zotero entry, it always gives me the same \cite{Smith2013} whichever one I pick. In my .bib file, one is Smith2013 and the other is Smith2013-1. What will happen if I add another Smith2013 later on? Are the keys for the first two guaranteed to stay constant? Or another problem might be if I delete Smith2013 from the bibloigraphy: would Smith2013-1 become Smith2013?

extra items

In my opinion, the biblatex exporter don't work properly. The added items, for example: biblatexdata[origdate=1856;origtitle=An Old Title;timestamp=2011.03.22] should be exported as separate bibtex items:
@Article{example2014,
title = {title},
origdate={1856};
origtitle={An Old Title};
timestamp={2011.03.22}
}
and not as note item:
note = { biblatexdata[origdate=1856;origtitle=An Old Title;timestamp=2011.03.22]},
Thank You for your work

[Idea] collection autoexport/syncing

This is a feature proposal.
It would be useful in some cases to automatically synchronize changes in the zotero database with a biblatex/bibtex database. So once a new element was added, removed, edited in zotero, a new export would be triggered.
I like to only work eg. with markdown/latex and just add my references in zotero. However I don't always want to export my library manually, I'd rather like to (more or less) instantly use my added bibliography items in markdown/latex.

To reduce overhead when editing alot at the same time several approaches could be thought of in some different ways:

  • if change (edit, add, remove, ...) is less than $time ago: do nothing. Otherwise export collection or merge only the changes.
  • export/merge every $minutes/seconds if changes happened
  • export when focus (cursor) is out of zotero/firefox (zotero/firefox not the active window) and changes happened.
  • ask for export/merge after a change happenend

Missing standard bibtex field

It will be nice to include the year field var date = Zotero.Utilities.strToISO(item.date); var date1 = Zotero.Utilities.strToDate(item.date); //added if (date) { writeField('date', escape(date)); writeField('Year', escape(date1.year)); //added } else { writeField('date', escape({literal:item.date})); } }
Officially this is the standard bibtex field.

JavaScript Error on export

When I try to export in BetterBibLaTeX or BetterBibTeX format, export fails with the following error:
[JavaScript Error: "CiteKeys[("_" + field.replace(...))] is not a function" {file: "C:\Users\deni\zotero\translators\BetterBibLaTeX.js" line: 12213}]

What would be the problem?

Edit: Zotero Standalone version 4.0.17, BetterBib(La)TeX version 0.0.58, OS: Windows 8.1 64bit, polish version

doi field wrapped in second pair of {}

Since the commit that fixed issue #32 , the doi field of any bib(latex) entry is now being wrapped in a second pair of {}:

    doi = {{10.1145/1500774.1500840}}

This syntax does not play nice with pandoc, since the reference now renders as:

Smith, D. C., Irby, C., Kimball, R., & Harslem, E. (1982). The Star User Interface: An Overview. In Proceedings of the June 7-10, 1982, National Computer Conference (pp. 515–528). New York, NY, USA: ACM. doi:{10.1145/1500774.1500840}

where the doi hyperlink links to the invalid address:

http://dx.doi.org/{10.1145/1500774.1500840}

I'm not sure if this is a zotero-better-biblatex or a pandoc issue. I thought I'd ask here first, since you have been extremely helpful in the past.

Thanks!

Many field markers not working in Better Biblatex's key format

Hello,

Im using the latest versions of Zotero (4.0.19) and Better Biblatex (0.2.17) on Windows 7 x64 and Im trying to configure Better Biblatex to create unique Bibtex-Keys. It try for example to create the key format as

[auth][year][month]

but the [month] seems not to be supported and the creation of the Bibtey-Key fails. The same holds for the fields [volume], [journal], [doi] and possibly many more. How can I fix this?

weird journal field with BibTeX export and abbreviations

If I export my collection in BibTeX with the "Journal Abbreviations" option, and if the "Journal Abbreviation" field is empty in Zotero, the "journal" field in the .bib output is as follows:

journal = {\ensuremath{[}object Object\ensuremath{]}},

Perhaps a better behavior would be to revert to the full journal title if the abbreviation is unavailable.

I'm using Zotero 4.0.17 and better BibTeX 0.0.52

Change in Pandoc Citation behavior

I just updated to .4.17, and now when I "copy" a selected item in my Zotero (cmd+shift+c) with Pandoc Citation selected as default output format, I get the correct cite key with @ [at] symbol but now with the bibtex \cite prepended before it. When I deleted "cite" from the Better Bib(La)Tex preferences, it produces @CitKey. Deleting the backslash isn't a big deal, but I think this is a bug, right?

Bug in authorLast

the function _authorLast contains a typo in the return

return authors[creator.authors.length - 1];
should be
return authors[authors.length - 1];

Disabling HTTP export breaks connection to Zotero browser plugins

As the title says, if HTTP export is disabled in the plugin preferences in Zotero standalone, all communication on 127.0.0.1:23119 is broken, and this kills the connection to Zotero Browser plugins. Re-enabling the HTTP export and restarting Zotero standalone fixes the problem.

This is clearly not the expected behavior of the HTTP export option.

Please see this thread for relevant details.

ReferenceError: item not defined

Hi friflaj,
I'm unable to fetch my bibliography using your plugins Bibliography export. When I run: curl http://localhost:23119/better-bibtex/collection\?/0/IUS7DPUE.biblatex

I get the following error.
(2)(+0000000): Translate: Translation using Better BibLaTeX failed:
fileName => /Users/thomas/Library/Application Support/Zotero/Profiles/3dl6w827.default/zotero/translators/Better BibLaTeX.js
lineNumber => 226
columnNumber => 0
string => ReferenceError: item is not defined

I can't rule out that it's something I've been doing wrong. Just thought I create an issue to hear back from you, if this is a general problem.

Thanks!

Thomas

Babelbib interaction with month field of generated bibliography

If I have a date in Zotero like July 27th, 2012 this gets converted into:

    month = {jul},
    year = {2012},

For reason or another babelbib will not recognize the month correctly. It will recognize either month = jul or month = 7 or month = {7} correctly, but not if the month name is enclosed in curly braces.

I think this is at https://github.com/friflaj/zotero-better-bibtex/blob/master/resource/translators/BetterBibTex.js.template#L169 where the escape() call is unnecessary, since the months array contains only BibTex-safe values in the first place.

Proper URL encoding for bibtex

According to the specs, bibtex is expecting url parameter to be prepared for simply copying and pasting it to .bbl, which is basically a series of latex commands. Thus, if a url contains underscores or some unicode characters (e.g. Cyrillic symbols), it is necessary to edit the .bib file manually after export, and this is not good.

Here is an example:

.bib for an entry with URL www.example.com/underscore_in_urls:

@misc{test,
    title = {Testing URLs},
    url = {http://www.example.com/underscore%5fin%5furls},
    urldate = {2013-01-27},
    author = {Tester, A.},
    month = jan,
    year = {2014}

}

.bbl for Harvard referencing style:

\begin{thebibliography}{xx}

\harvarditem{Tester}{2014}{test}
A., Tester. 2014.
\newblock ``Testing URLs.''.
\newline\harvardurl{http://www.example.com/underscore%5fin%5furls}

\end{thebibliography}

As _ is converted to %5f, % is treated as the beginning of a comment, so the end of the line is skipped. This results the rest of the document to appear inside \harvardurl (or another command depending on the style), so .tex cannot be compiled.

Fixing this would not be simple; here are some requirements and limitations that I see:

  1. _ and other special characters should remain unchanged in the resulting pdf to keep readability of the URLs, but at the same time theURLs should be clickable.
  2. Unicode symbols should be supported, e.g. www.example.com/тест.
  3. The method of converting URLs should be universal for various referencing styles or the approach should be extendable. E.g. different translation functions that are kept in some folder should do the job.

I've currently fixed the problem by using a small script, which does the proper escaping of url in .bib after curl for my particular case, but this is a hack rather a solution.

Any ideas?

Error when importing with better bibtex

I am having the same problem described in this thread: https://forums.zotero.org/discussion/35745/problem-with-betterbiblatex/ and wasn't sure if it was ever brought to your attention.

Here is a partial output from my log:

[JavaScript Error: "fieldMap[field] is undefined" {file: "/SOME PATH/Library/Application Support/Zotero/Profiles/ou9y27wn.default/zotero/translators/Better BibLaTeX.js" line: 5088}]

[JavaScript Error: "fieldMap[field] is undefined" {file: "/SOME PATH/Application Support/Zotero/Profiles/ou9y27wn.default/zotero/translators/Better BibLaTeX.js" line: 5088}]

version => 4.0.19, platform => MacIntel, oscpu => Intel Mac OS X 10.9, locale => en-US, appName => Zotero, appVersion => 4.0.19

(4)(+0019559): Translate: Binding sandbox to http://www.example.com/

(4)(+0000001): Translate: Parsing code for Better BibLaTeX

(3)(+0000013): Translate: [Better BibLaTeX] Scanning 291 characters for BibTeX

(3)(+0000001): Translate: All translator detect calls and RPC calls complete

(5)(+0000000): Translate: Running handler 0 for translators

(5)(+0000001): Beginning DB transaction

(3)(+0000000): Beginning Notifier event queue

(4)(+0000000): Translate: Parsing code for Better BibLaTeX

(3)(+0000007): Translate: Beginning translation with Better BibLaTeX

(2)(+0000001): Translate: Translation using Better BibLaTeX failed:
string => TypeError: fieldMap[field] is undefined
stack => processField@/SOME PATH/Application Support/Zotero/Profiles/ou9y27wn.default/zotero/translators/Better BibLaTeX.js:5088
beginRecord@/SOME PATH/Library/Application Support/Zotero/Profiles/ou9y27wn.default/zotero/translators/Better BibLaTeX.js:5493
doImport@/SOME PATH/Library/Application Support/Zotero/Profiles/ou9y27wn.default/zotero/translators/Better BibLaTeX.js:5538

url => undefined
downloadAssociatedFiles => true
automaticSnapshots => true

Double brackets for authors if single field

I have some authors I need in double brackets

Instead of

author = {Bundeszentrale f\"{u}r politische Bildung},

I need

author = {{Bundeszentrale f\"{u}r politische Bildung}},

Otherwise my literature entry looks wuite strange cause it is interpreted as firstname and surname...

I tried to use the single-field-feature in zotero and hoped that better-bibtex would then put it in double brackets...

Export with notes & files fails

I tried to export my whole bibliography but when checking the 3 checkboxes to export files and notes as well it fails with just the message:

An error occured while trying to export the chosen file

The Export stops on the very first entry and the whole bibtex looks like this.

@book{Beckmann2006,
    address = {Stuttgart},
    title = {Mobilit\"{a}t 2020: Perspektiven f\"{u}r den Verkehr von morgen : Schwerpunkt: Strassen- und Schienenverkehr},
    isbn = {3816770231 9783816770237},
    shorttitle = {Mobilit\"{a}t 2020},
    language = {German},
    publisher = {{Fraunhofer-IRB-Verl.}},
    author = {Beckmann, Klaus and M\"{o}ller, Andreas},
    year = {2006}

Files are not exported (no zotero like directories...

Comments

After exporting the “comment” field is changed to “Annotation”, In my opinion the standard bibtex comment name is "note", eventually "annote" it is better to export the correct one "note". writeField('note', escape(item.meetingName));

Export fails with v0.19

Export of my library fails with the new version for both BetterBibtex and BetterBibLatex.
Here is the error log I get from Zotero:

[JavaScript Error: "config.citeKeyFormat is undefined" {file: "/home/.../.zotero/zotero/ewf4md4e.default/zotero/translators/BetterBibLaTeX.js" line: 12351}]

version => 4.0.17, platform => Linux x86_64, oscpu => Linux x86_64, locale => en-US, appName => Zotero, appVersion => 4.0.17

=========================================================

(3)(+0000000): Translate: All translator detect calls and RPC calls complete

(4)(+0005826): Translate: Binding sandbox to http://www.example.com/

(4)(+0000007): Translate: Parsing code for BetterBibLaTeX

(3)(+0000024): Translate: Error fetching hidden option citeCommand: undefined

(3)(+0000000): Translate: Error fetching hidden option citeKeyFormat: undefined

(3)(+0000000): Translate: Error fetching hidden option fancyURLs: undefined

(3)(+0000000): Translate: Error fetching hidden option unicode: undefined

(3)(+0000000): Translate: [better bibtex BetterBibLaTeX] config = {"exportCharset":"UTF-8","translator":{"id":"b6e39b57-8942-4d11-8259-342c46ce395f","label":"BetterBibLaTeX","unicode":true}}

(5)(+0000002): SELECT A.itemID FROM items A LEFT JOIN itemNotes B USING (itemID) LEFT JOIN itemAttachments C ON (C.itemID=A.itemID) WHERE B.sourceItemID IS NULL AND C.sourceItemID IS NULL AND A.itemID NOT IN (SELECT itemID FROM deletedItems) AND libraryID IS NULL

(3)(+0000007): Translate: Beginning translation with BetterBibLaTeX

(3)(+0000000): Zotero.Item.toArray() is deprecated -- use Zotero.Item.serialize()

(5)(+0000000): SELECT fieldID, value FROM itemData NATURAL JOIN itemDataValues WHERE itemID=?

(5)(+0000000): Binding parameter 1 of type int: 458

(5)(+0000002): SELECT creatorID, creatorTypeID, orderIndex FROM itemCreators WHERE itemID=? ORDER BY orderIndex

(5)(+0000001): Binding parameter 1 of type int: 458

(5)(+0000000): SELECT COUNT(*) FROM creators WHERE creatorID=?

(5)(+0000000): Binding parameter 1 of type int: 406

(5)(+0000000): SELECT COUNT(*) FROM creators WHERE creatorID=?

(5)(+0000000): Binding parameter 1 of type int: 34

(5)(+0000000): SELECT COUNT(*) FROM creators WHERE creatorID=?

(5)(+0000001): Binding parameter 1 of type int: 407

(5)(+0000000): SELECT creatorTypeID AS id, creatorType AS name FROM creatorTypes

(3)(+0000001): Loading data for creator 406 in Zotero.Creator.load()

(5)(+0000000): SELECT C.*, CD.* FROM creators C NATURAL JOIN creatorData CD WHERE creatorID=?

(5)(+0000000): Binding parameter 1 of type int: 406

(3)(+0000000): Loading data for creator 34 in Zotero.Creator.load()

(5)(+0000000): SELECT C.*, CD.* FROM creators C NATURAL JOIN creatorData CD WHERE creatorID=?

(5)(+0000000): Binding parameter 1 of type int: 34

(3)(+0000001): Loading data for creator 407 in Zotero.Creator.load()

(5)(+0000000): SELECT C.*, CD.* FROM creators C NATURAL JOIN creatorData CD WHERE creatorID=?

(5)(+0000000): Binding parameter 1 of type int: 407

(3)(+0000000): Loading data for creator 378 in Zotero.Creator.load()

(5)(+0000000): SELECT C.*, CD.* FROM creators C NATURAL JOIN creatorData CD WHERE creatorID=?

(5)(+0000000): Binding parameter 1 of type int: 378

(5)(+0000000): SELECT N.itemID, title FROM itemNotes N NATURAL JOIN items WHERE sourceItemID=? AND N.itemID NOT IN (SELECT itemID FROM deletedItems)

(5)(+0000001): Binding parameter 1 of type int: 458

(5)(+0000000): SELECT A.itemID, value AS title FROM itemAttachments A NATURAL JOIN items I LEFT JOIN itemData ID ON (fieldID=110 AND A.itemID=ID.itemID) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE sourceItemID=? AND A.itemID NOT IN (SELECT itemID FROM deletedItems)

(5)(+0000000): Binding parameter 1 of type int: 458

(3)(+0000000): Zotero.Item.toArray() is deprecated -- use Zotero.Item.serialize()

(5)(+0000000): SELECT fieldID, value FROM itemData NATURAL JOIN itemDataValues WHERE itemID=?

(5)(+0000000): Binding parameter 1 of type int: 720

(5)(+0000001): SELECT note FROM itemNotes WHERE itemID=?

(5)(+0000000): Binding parameter 1 of type int: 720

(5)(+0000000): SELECT tagID, name FROM tags WHERE tagID IN (SELECT tagID FROM itemTags WHERE itemID=?)

(5)(+0000000): Binding parameter 1 of type int: 720

(5)(+0000000): SELECT linkedItemID FROM itemSeeAlso WHERE itemID=?

(5)(+0000000): Binding parameter 1 of type int: 720

(5)(+0000000): SELECT itemID FROM itemSeeAlso WHERE linkedItemID=?

(5)(+0000000): Binding parameter 1 of type int: 720

(5)(+0000000): SELECT tagID, name FROM tags WHERE tagID IN (SELECT tagID FROM itemTags WHERE itemID=?)

(5)(+0000000): Binding parameter 1 of type int: 458

(5)(+0000000): SELECT linkedItemID FROM itemSeeAlso WHERE itemID=?

(5)(+0000000): Binding parameter 1 of type int: 458

(5)(+0000001): SELECT itemID FROM itemSeeAlso WHERE linkedItemID=?

(5)(+0000000): Binding parameter 1 of type int: 458

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 90

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 5

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 3

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 28

(5)(+0000001): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 29

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 25

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 87

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 26

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 13

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000001): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 116

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 1

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 27

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 123

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 19

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 62

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 18

(5)(+0000001): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 2

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 4

(5)(+0000000): Binding parameter 2 of type int: 22

(3)(+0000000): Zotero.Item.toArray() is deprecated -- use Zotero.Item.serialize()

(5)(+0000000): SELECT tagID, name FROM tags WHERE tagID IN (SELECT tagID FROM itemTags WHERE itemID=?)

(5)(+0000000): Binding parameter 1 of type int: 720

(5)(+0000000): SELECT itemID FROM itemSeeAlso WHERE linkedItemID=?

(5)(+0000000): Binding parameter 1 of type int: 720

(5)(+0000000): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 14

(5)(+0000000): Binding parameter 2 of type int: 27

(5)(+0000001): SELECT baseFieldID FROM baseFieldMappingsCombined WHERE itemTypeID=? AND fieldID=?

(5)(+0000000): Binding parameter 1 of type int: 14

(5)(+0000000): Binding parameter 2 of type int: 1

(5)(+0000000): SELECT linkMode FROM itemAttachments WHERE itemID=?

(5)(+0000000): Binding parameter 1 of type int: 720

(5)(+0000000): SELECT mimeType FROM itemAttachments WHERE itemID=?

(5)(+0000000): Binding parameter 1 of type int: 720

(5)(+0000000): SELECT charsetID FROM itemAttachments WHERE itemID=?

(5)(+0000000): Binding parameter 1 of type int: 720

(5)(+0000000): SELECT path FROM itemAttachments WHERE itemID=?

(5)(+0000000): Binding parameter 1 of type int: 720

(5)(+0000000): Translate: Running handler 0 for itemDone

(5)(+0000001): Spinning event loop (1)

(2)(+0000096): Translate: Translation using BetterBibLaTeX failed: 
fileName => /home/.../.zotero/zotero/ewf4md4e.default/zotero/translators/BetterBibLaTeX.js
lineNumber => 12351
columnNumber => 0
string => TypeError: config.citeKeyFormat is undefined
stack => CiteKeys.build@/home/.../.zotero/zotero/ewf4md4e.default/zotero/translators/BetterBibLaTeX.js:12351
doExport@/home/.../.zotero/zotero/ewf4md4e.default/zotero/translators/BetterBibLaTeX.js:12410

url => /home/.../research/thesis/bibliography.bib
downloadAssociatedFiles => true
automaticSnapshots => true

(5)(+0000000): Translate: Running handler 0 for done

Collection export small problem

Small export bug: The problem is, that the exporter change in the abstractnote each : and ; symbols with } bracket, for example:
orginal: Abstractnote = {To determine whether gene expression profiling could improve risk classification and outcome prediction in older acute myeloid leukemia (AML) patients, expression profiles were obtained in pretreatment leukemic samples from 170 patients whose median age was 65 years. Unsupervised clustering methods were used to classify patients into 6 cluster groups (designated A to F) that varied significantly in rates of resistant disease (RD; P < .001), complete response (CR; P = .023), and disease-free survival (DFS; P = .023). Cluster A (n = 24), dominated by NPM1 mutations (78%), normal karyotypes (75%), and genes associated with signaling and apoptosis, had the best DFS (27%) and overall survival (OS; 25% at 5 years). Patients in clusters B (n = 22) and C (n = 31) had the worst OS (5% and 6%, respectively); cluster B was distinguished by the highest rate of RD (77%) and multidrug resistant gene expression (ABCG2, MDR1). Cluster D was characterized by a “proliferative” gene signature with the highest proportion of detectable cytogenetic abnormalities (76%; including 83% of all favorable and 34% of unfavorable karyotypes). Cluster F (n = 33) was dominated by monocytic leukemias (97% of cases), also showing increased NPM1 mutations (61%). These gene expression signatures provide insights into novel groups of AML not predicted by traditional studies that impact prognosis and potential therapy.},
Exported: abstractnote = {To determine whether gene expression profiling could improve risk classification and outcome prediction in older acute myeloid leukemia (AML) patients, expression profiles were obtained in pretreatment leukemic samples from 170 patients whose median age was 65 years. Unsupervised clustering methods were used to classify patients into 6 cluster groups (designated A to F) that varied significantly in rates of resistant disease (RD}, P = { .023), and disease-free survival (DFS}, P = { .023). Cluster A (n }, 25% at 5 years). Patients in clusters B (n = { 22) and C (n }, including 83% of all favorable and 34% of unfavorable karyotypes). Cluster F (n = { 33) was dominated by monocytic leukemias (97% of cases), also showing increased NPM1 mutations (61%). These gene expression signatures provide insights into novel groups of AML not predicted by traditional studies that impact prognosis and potential therapy.},

Non-numeric dates not exporting in Biblatex

In 0.2.15, the date field appears to be omitted entirely from the Better Biblatex output in cases where there is a non-numeric date such as "in press" or "forthcoming".

The Better Bibtex exporter seems to handle it fine.

Ability to control exportNotes and other settings in translators

Currently there seems to be no straightforward way to control what fields are being exported.

In particular, it is sometimes useful to avoid inclusion of notes to the export in order to reduce the size of the bib file. The same applies to file field: having a path to local pdf does not add much value. The situation is somewhat similar with abstract.

It would be nice to control whether these potentially long fields are being exported, either via GUI or by adding a certain key-value pair to zotero settings. This is probably possible even now, but I could not find a reliable way of doing so after over an hour of playing with translators.

Douplicate entry for BetterBibLaTeX

When exported for BetterBibLaTeX 2 options in the select are available.
I guess one of both is obsolete ;)

BetterBibLaTeX
Better BibLaTeX
Better BibTeX
...

Configurable citekey generator

Hi,
First of all, I thank you for the great extension. I use the following citekey generator in Jabref. It works there. But in Zotero with your extension, it omits the dot between the first and the second author.

[auth.auth.ea:lower][shortyear]

e.g it should be
"brown.black13"
but Zotero creates
"brownblack13"
Thanks for any solution.

Murat Tasdemir

Underscores or other ‘glue’ in citation key format

It’s currently impossible to generate citation key in a format that contains underscores, e.g.:

smith_paper_2014

when you define citation key format as

[auth:lower]_[veryshorttitle:lower]_[year]

underscores are ignored:

smithpaper2014

No "and" in AUTHOR field when multiple authors

When exporting database by using "better bibtex", I end up with fields like :

author = {Fang, Hao,Kiss, A.,Robertsson, L.,Zeggagh, A.,Lan, J.,Mirandes, E. de,Solve, S.,Picard, A.,Stock, M.}
instead of
author = {Fang, Hao and Kiss, A. and Robertsson, L. and Zeggagh, A. and Lan, J. and Mirandes, E. de and Solve, S. and Picard, A. and Stock, M.}

zotero and better bibtex are up to date

JavaScript error on export

First, Thanks for writing this great add-on!
Using Zotero 4.0.17, I get the following error when exporting to Better BibLaTeX:

(2)(+0000079): Translate: Translation using Better BibLaTeX failed: 
fileName => ~/.mozilla/firefox/[...].default/zotero/translators/Better BibLaTeX.js
lineNumber => 12026
columnNumber => 4
string => TypeError: creators.forEach is not a function

I came up with a fix myself, replacing

    creators.forEach(function(type) {
      if (creators[type].length == 0) { creators[type] = null; }
    });   

with

    if (creators.authors.length == 0) { creators.authors = null; }
    if (creators.editors.length == 0) { creators.editors = null; }
    if (creators.translators.length == 0) { creators.translators = null; }
    if (creators.collaborators.length == 0) { creators.collaborators = null; }

This may not be the most elegant patch, but now it works again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.