Bibtex export - support for cyrillic
Now Zotero just ignores any Cyrillic characters for autogenerated citerefs and they become something __2009 -- completely unusable. As far as I have seen there are translation tables in converter file.
Is it possible to add Cyrillic characters there too?
Is it possible to add Cyrillic characters there too?
Even with that, though, I believe the current citekey generation function skips everything that's not ascii. That's pretty easy to disable in a custom version Currently
https://github.com/zotero/translators/blob/master/BibTeX.js#L2125
lists the _allowed_ characters. That could easily be turned into a version only banning certain characters (likely # % ' ( ) , = { } ~ and backslash )
Someone more knowledgeable would have to chime in on whether that makes sense (and then there's always the problem that this will break existing citekeys).
Yes, I expect manually specifiable citekeys for Zotero 4.2
when I mark up two italic words in the same title, the first one get parsed, but the second one would be parsed wrongly:
Example:
Tagged title in Zotero:
Correlation of T cell response and bacterial clearance in human volunteers challenged with Helicobacter pylori revealed by randomised controlled vaccination with Ty21a-based Salmonella vaccines
Output in BibTex .bib file after export,
Correlation of T cell response and bacterial clearance in human volunteers challenged with \textit{Helicobacter pylori} revealed by randomised controlled vaccination with Ty21a-based {\textless}i{\textgreater}Salmonella{\textless}/i{\textgreater} vaccines}
Secondly, can Zotero add another tag which is for emphasized text, which is equivelant to \emph{} in LaTeX?
https://forums.zotero.org/discussion/23785/parse-markup-tags-in-titles/#Item_8
AFAIK bibtex
- does not allow any special or non-ASCII characters in the citekey.
- will handle most (all?) characters in entries
- cannot do anything useful with non-ASCII characters. For example, it can't sort Cyrillic names.
IME bibtex will just pass through any character unless it is part of the citekey where it is quite strict. So it sort of does and doesn't support UTF8.
Full UTF8 support (with all possible ways of sorting etc.) is only available for biblatex/biber (actually, proper UTF8 handling was one of the reasons biber was started).
I wish if there is something like this:
- dedicated shortcut key in Zotero to copy the citation key in bibtex format, but only citation key devoid from any surrounded mark-up strings
- parsing properly the italics, even if it is repeated twice in the same title of Zotero entry
- you can have a look at the workflow and suggest more improvements may be
- citation key author_title_year, is not a good idea IMHO, the title if the title would be marked up with some tags then you will see these tags flowing into your citation key, which is not an elegant thing, citation keys should be stable, immutable, and informative as much as possible
- parsing of the translator is not working if I do rich text tagging in the title more than once, if I am a chemist, or biologist, I would do this frequently with species names, chemicals, etc..., then this would be a nightmare to see the first tag parsed correctly, the others are not and will make it into your .bib file
- I would expect a dedicated shortcut key to be assigned in Zotero bibtex translator to copy the citation key ALONE (without any mark-up strings or any other fields) of the selected reference(s) into clipboard to be pasted in the tex editor (saves a lot of time), like CTRL+ALT+B, is not bad.
But make no mistake: Biblatex's format is not bibtex proper. It's very similar, but it's not the same. It features many types and fields which are not part of traditional bibtex, some fields have a different format (date field is a good example) and, as already mentioned, it supports UTF8. Non-ASCII characters in the citekey are allowed in biblatex/biber, for traditional bibtex they are a no go. So while the formats are very similar, they are not the same.
There is a simple way to (temporarily) fix this for Zotero 4.0:
in
%ZOTERO_DIR%/translators/BibLaTeX.js
replace line 235:var citeKeyCleanRe = /[^a-z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\[\]\^\_\`\|]+/g;
with:
var citeKeyCleanRe = /["#%'(),={}~]+/g;
Also, for citation, you may use script from here, - save it under
%ZOTERO_DIR%/translators/BibLaTeX-autocite.js, and enable in Settings. It will copy links in the format
\autocite{%author%_%title%_%year%}
, compatible with the fix shown above.And if you want to copy just key, without any tags, replace line 228 from
Zotero.write((first ? "\\autocite{" : ",") + citekey);
to
Zotero.write((first ? "" : ",") + citekey);
and remove line 233.
"label": "BibTeX-autocite",
change to:
"label": "BibLaTeX-autocite",
For citation key ONLY, I suggest this less code:
replace
Zotero.write((first ? "\\autocite{" : ",") + citekey);
simply withZotero.write(citekey);
to prevent the unwanted brace at the end, replace
Zotero.write("}");
withZotero.write("");