-
-
Notifications
You must be signed in to change notification settings - Fork 285
Scripting
retorquere edited this page Sep 7, 2015
·
19 revisions
The global Translator object allows access to the current configuration of the translator
- enum preserveCaps whether capitals should be preserved by bracing then with {}. Values: none, all, inner
- boolean fancyURLs set to true when BBT will generate \url{..} around the urls
The Bib(La)TeX references are generated by the Reference
class. Before being comitted to the cache, you can add
postscript code that can manipulated the fields
or the referencetype
- Array @fields Array of reference fields
- String @referencetype referencetype
- Object @item the current Zotero item being converted
The fields are objects with the following keys:
- name: name of the Bib(La)TeX field
- value: the value of the field
- bibtex: the LaTeX-encoded value of the field
- enc: the encoding to use for the field
Return a copy of the given field
with a new value
- field field to be cloned
- value value to be assigned
- Object copy of field settings with new value
'Encode' to raw LaTeX value
- field field to encode
-
String unmodified
field.value
Encode to LaTeX url
- field field to encode
-
String field.value encoded as verbatim LaTeX string (minimal escaping). If preference
fancyURLs
is on, wraps return value in\href{string}{string}
Encode to verbatim LaTeX
- field field to encode
- String field.value encoded as verbatim LaTeX string (minimal escaping).
Encode creators to author-style field
-
field field to encode. The 'value' must be an array of Zotero-serialized
creator
objects.
- String field.value encoded as author-style value
Encode text to LaTeX
This encoding supports simple HTML markup.
- field field to encode.
- String field.value encoded as author-style value
Add a field to the reference field set
- field field to add. 'name' must be set, and either 'value' or 'bibtex'. If you set 'bibtex', BBT will trust you and just use that as-is. If you set 'value', BBT will escape the value according the encoder passed in 'enc'; no 'enc' means 'enc_latex'. If you pass both 'bibtex' and 'latex', 'bibtex' takes precedence (and 'value' will be ignored)
Remove a field from the reference field set
- name field to remove.
- Object the removed field, if present