Skip to content

Commit

Permalink
Merge branch 'master' into gh-1389
Browse files Browse the repository at this point in the history
  • Loading branch information
retorquere committed Jan 11, 2020
2 parents d58b654 + 8ea60f9 commit a779ac9
Show file tree
Hide file tree
Showing 8 changed files with 172 additions and 44 deletions.
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Changelog

## [5.2.7] - 2020-01-11
- allow capping the number of export workers

## [5.2.6] - 2020-01-11
- fixed quality report for 'online' entries

## [5.2.5] - 2020-01-11
- added cache support for workers

## [5.2.4] - 2020-01-10
- bugfix in zotero worker shim

## [5.2.0] - 2020-01-10
- merging of extra-fields would strip arXiv lines
- clear out duplicate alias-ids on key refresh
- cayw tex-studio push
- re-add raw imports
- preferences layout restructuring
- always sort output
- adds background exports

## [5.1.175] - 2019-12-28
- overwrite standard zotero fields with explicit fields listed in `extra`

## [5.1.172] - 2019-12-25
- import sentence casing fixed for non-english entries
- citation graph exporter fixed

## [5.1.171] - 2019-12-18
- Treat ideographs as individual words for key generation
- icons for pinned keys

## [5.1.170] - 2019-12-15
- fixed import of `online` entries
- retain referencetype if it could not be matched on import

## [5.1.169] - 2019-12-06
- loading icon caused 30% load on idle -- icon changed to static

## [5.1.168] - 2019-12-02
- remove chatty logging
11 changes: 6 additions & 5 deletions setup/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,14 @@ def doc(self, node, section=False):

def pref(self, pref):
if pref.name in self.printed: return ''
if not 'description' in pref: return ''

self.printed.append(pref.name)

if 'label' in pref:
label = pref.label
doc = f'#### {pref.label}\n\n'
else:
label = pref.name
doc = f'#### {label}\n\n'
doc = f'### {pref.name}\n\n' # hidden pref

dflt = pref.default
if 'options' in pref:
Expand All @@ -156,9 +157,9 @@ def pref(self, pref):
dflt = 'yes' if dflt else 'no'
elif pref.type == 'string' and dflt == '':
dflt = '<not set>'
doc + f'default: `{dflt}`\n\n'
doc += f'default: `{dflt}`\n\n'

if 'description' in pref: doc += pref.description + '\n\n'
doc += pref.description + '\n\n'

if 'options' in pref:
doc += 'Options:\n\n'
Expand Down
6 changes: 3 additions & 3 deletions site/content/installation/preferences/hidden-preferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ title: Hidden preferences
weight: 15
---

The following settings are not exposed in the UI, but can be found under `Preferences`/`Advanced`/`Config editor`.
{{% preferences/header %}}

All are prefixed with `extensions.zotero.translators.better-bibtex.` in the table you will find there
The following settings are not exposed in the UI, but can be found under `Preferences`/`Advanced`/`Config editor`.

{{% preferences/header %}}
All are prefixed with `extensions.zotero.translators.better-bibtex` in the table you will find there

{{% preferences/hidden-preferences %}}

18 changes: 18 additions & 0 deletions site/layouts/shortcodes/preferences/advanced.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
{{/* DO NOT EDIT. This shortcode is created automatically from Preferences.xul */}}
#### postscript

default: `<not set>`

Snippet of javascript to run [after each reference generation]({{ ref . "scripting" }}).

#### @string definitions

default: `<not set>`

If you have externally maintained @string vars paste them here and they will be resolved for subsequent imports

### Export

#### Apply title-casing to titles

default: `yes`

If you're dead-set on ignoring both BibTeX/BibLaTeX best practice and the Zotero recommendations on title/sentence
casing, you can turn this off to suppress [title casing for English references]({{ ref . "support/faq#bbt-is-changing-the-capitalization-of-my-titles-why" }}).

#### Apply brace-protection to capitalized words

default: `yes`

If you're dead-set on ignoring both BibTeX/BibLaTeX best practice and the Zotero recommendations on title/sentence
casing, you can turn this off to suppress [automatic brace-protection for words with uppercase letters]({{ ref . "support/faq#why-the-double-braces" }}).

### Import

#### Sentence-case titles on import:

default: `yes, but try to exclude already-sentence-cased titles`

Bib(La)TeX references ought to be stored in Title Case; Zotero references are expected to be entered as sentence-case. With this option on, BBT will try to sentence-case
during import. This sentence-casing uses heuristics, no natural language processing is performed, and the results are not perfect. You can turn this off, but you may then also want
to disable `Apply title-casing to titles` (which has its own problems, see the help entry for that option on this page). With 'yes, but try to exclude already-sentence-cased titles', BBT will attempt to detect
Expand All @@ -36,6 +46,8 @@ Options:

#### Insert case-protection for braces:

default: `minimal`

On import, BBT will add case-protection (<span class="nocase">...<span>) to titles that have words in {Braces}. There's plenty of bib(la)tex files
out there that do this a little overzealously, and you may not like the resulting HTML code in your items, even though this is what the braces mean in bib(la)tex, and
Zotero supports it. If you turn this off, the markup is omitted during import. When you select `yes`, all braces that bib(la)tex would interpret as case protection ([which is
Expand All @@ -51,10 +63,14 @@ Options:

#### Expand the @string vars below during imports

default: `yes`

When enabled, BBT will prepend the @strings section below to all Bib(La)TeX imports and will expand the strings during export.

#### If a field could be a @string var, export it without braces

default: `No`

When enabled, BBT will try to retain @string vars its exports unsurrounded by braces; when set to 'detect', single-word strings will be assumed to be externally-defined @string vars,
when set to 'match', only @strings declared in the @strings section of the preferences will be preserved. If you don't know what this means, leave it off.

Expand All @@ -68,6 +84,8 @@ Options:

#### Warn me when changing citation keys in bulk

default: `10`

For those who are curious about what the `Clear/Generate BibTeX key` right-click options do, this will warn
you if you are doing this on more than 10 (default) at the same time, to prevent your curiosity from changing
all your citation keys at once.
Expand Down
2 changes: 2 additions & 0 deletions site/layouts/shortcodes/preferences/automatic-export.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{/* DO NOT EDIT. This shortcode is created automatically from Preferences.xul */}}
#### Automatic export

default: `On Change`

Determines when [automatic exports]({{ ref . "exporting" }}) are kicked off. Having it disabled still marks
auto-exports as needing updates, so when you re-enable it, those exports will start. On-change means exports
happen whenever a reference in the export changes/is added/is removed. On idle does more or less what
Expand Down
16 changes: 16 additions & 0 deletions site/layouts/shortcodes/preferences/citation-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@

#### Citation key format

default: `​[auth:lower][shorttitle3_3][year]`

Set the pattern used to generate citation keys. The format of the keys is documented [here]({{ ref . "citing" }}).

#### Force citation key to plain text

default: `yes`

If you have deviated from the default citation key format pattern by [specifying your own]({{ ref . "citing" }}), you may
wind up with non-ASCII characters in your citation keys. You can prevent that using the `fold` function at the
appropriate place in your pattern, but checking this checkbox will just apply `fold` to all your keys.
Expand All @@ -15,6 +19,8 @@ appropriate place in your pattern, but checking this checkbox will just apply `f

#### Keep keys unique

default: `within each library`

Auto-generated (non-pinned) keys automatically get a postfix when they would generate a duplicate. By default, the check for duplicates is restricted
to the library/group the item lives in. When set to global, the check will include all libraries/groups, so auto-generated keys would be globally
unique. Changing this setting *does not* affect existign keys - for this you would need to select the items and refresh the keys.
Expand All @@ -26,6 +32,8 @@ Options:

#### On conflict with a pinned key, non-pinned keys will be

default: `kept (causes key duplicates)`

This determines what happens if you pin a key to a value that is already in use in a different reference but not pinned there.
Neither are ideal, you just get to pick your poison. If you let BBT change the non-pinned key by adding a postfix character,
the citation key changes which could be problematic for existing papers. If you keep the non-pinned key as-is, your library now has duplicate keys.
Expand All @@ -39,6 +47,8 @@ Options:

#### QuickCopy format

default: `LaTeX`

Used for drag-and-drop/quick copy using Better BibTeX citekeys. In the Zotero "Export" pane, choose `Better BibTeX Quick Copy`
as the default export format for quick copy, and choose the desired format for the drag-and-drop citations here.

Expand All @@ -58,18 +68,24 @@ Options:

#### LaTeX command

default: `cite`

Used for drag-and-drop/quick copy citations in `LaTeX` format. Set the desired LaTeX citation command here. If you set this to `citep`,
drag-and-drop citations will yield `\citep{key1,key2,...}`

#### Surround Pandoc citations with brackets

default: `no`

Used for drag-and-drop/quick copy citations in `Pandoc` format. You can use this option to select whether you want
to have these pandoc citations surrounded with brackets or not.

### BibTeX AUX scanner

#### When scanning an AUX file, attempt to import references from the attached bib file when their citation keys are not in Zotero

default: `no`

By default, when scanning for cited items in the aux file, BBT will just generate a note listing all citation keys it cannot find in Zotero.
When this option is turned on, BBT will attempt to import such missing items from the bib file that the AUX file being scanned points to.

Expand Down
24 changes: 24 additions & 0 deletions site/layouts/shortcodes/preferences/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@

#### Export unicode as plain-text latex commands (recommended)

default: `yes`

BibTeX has really spotty Unicode support, so you generally want this on. It will translate things like accented characters
to their equivalent LaTeX constructs on export.

#### Disregard name prefixes when sorting

default: `no`

Name handling is a lot more complex than I had ever thought it to be. A *lot* more complex. BibTeX has
really limited ways of dealing with names with particles (van, von, de, etc). If you turn this on, BBT
will add code to have `van Gogh` sorted under `Gogh`.

#### Add URLs to BibTeX export

default: `no`

BibLaTeX supports urls in your references natively; BibTeX does not. For this reason, URLs are
omitted from BibTeX exports by default. Using this setting you can have them added to your exports either in a `note`
field (not as clean, but compatible with BibTeX out of the box), or in a `url` field (requires extra packages to be loaded,
Expand All @@ -29,11 +35,15 @@ Options:

#### Export unicode as plain-text latex commands

default: `no`

BibLaTeX actually has really good Unicode support, so you generally want this off. But for some geezers such as me it is
simply more pleasing to have things like accented characters translated to their equivalent LaTeX constructs on export.

#### Use BibLaTeX extended name format (requires biblatex 3.5)

default: `no`

Use the extended biber 2.7 format for names with particles - only works in BibLaTeX 3.5 or later.
This biblatex has a new (less ambiguous) way to store creator names. It's technically
superior, but the LaTeX world moves slowly, so many people won't have it yet. But if you're an early adopter,
Expand All @@ -43,6 +53,8 @@ you can enable it here

#### When a reference has both a DOI and a URL, export

default: `both`

Does what it says on the tin, really. If a reference has both a DOI and an URL, you can choose to have them both exported, or either one of them. Note that for BibTeX,
you must load the `url` package when you have `doi` or `url` fields. `doi` and `url` fields are so-called `verbatim` fields with different escaping rules, and
BibTeX compilation will likely error out without the package loaded.
Expand All @@ -55,10 +67,14 @@ Options:

#### Fields to omit from export (comma-separated)

default: `<not set>`

If there are some fields you don't want in your bibtex files (such as `note` for example), add a list of them here, separated by comma's.

#### Include JabRef-specific metadata:

default: `no`

Export JabRef-specific information fields; timetamps and groups for collections. Note that format `4` will disable caching in exports,
which is really undesirable specifically for auto-exports.

Expand All @@ -70,21 +86,29 @@ Options:

#### Include comments about potential problems with the references

default: `no`

Generate quality reports for exported references.

#### Include automatic tags in export

default: `yes`

Some importers or Zotero extensions (such as the ShortDOI manager for example) create tags on items that are more for item management than that
they are descriptive of the item. When this is off, such tags will not be included in the export.

### Journal abbreviations

#### Automatically abbreviate journal title if none is set explicitly

default: `no`

If set, generates journal abbreviations on export using the Zotero journal abbreviator, according to the abbreviation style selected in the list below the checkbox.

#### Abbreviation style:

default: `<not set>`

Select the style for auto-abbreviation. Only applicable to Juris-M; in Zotero, the style for automatic
abbreviation is not configurable.

Expand Down
Loading

0 comments on commit a779ac9

Please sign in to comment.