bib2glossary
This package is intended to allow for the storage and management of
latex glossary terms
in standard reference management packages (such as Zotero),
by converting between .bib files
and .tex files containing \newglossaryentry or \newacronym definitions.
To date the only other way to achieve this is via bib2gls. However, it implementation is somewhat complex, and the item types it uses are not supported by Zotero.
In bib2glossary, the user may override the default relationships between
reference item fields and glossary term parameters,
by supplying a JSON file, e.g.:
{
"abbreviation": "abbrevfield"
}
The defaults are taken from the Dictionary Entry type in Zotero.
For \newacronym:
| Parameter | Field |
|---|---|
| misc | @type |
| longname | journal* |
| abbreviation | shorttitle |
| description | abstract |
| plural | series |
| longplural | isbn |
| firstplural | address** |
For \newglossaryentry:
| Parameter | Field |
|---|---|
| misc | @type |
| name | journal* |
| description | abstract |
| plural | series |
| symbol | volume |
| text | edition |
| sort | publisher |
* This shows as 'Dictionary Title' in Zotero
** This shows as 'Place' in Zotero
[Note: The title field is not used, since it is usely used to generate the key.]
Installation
>> pip install bib2glossary
Usage
Conversion of \newacronym:
>> bib2acronym --help
>> bib2acronym path/to/file.bib --entry-type misc --param2field path/to/file.json
or
>> acronym2bib --help
>> acronym2bib path/to/file.tex --entry-type misc --param2field path/to/file.json
Conversion of \newglossaryentry:
>> bib2glossary --help
>> bib2glossary path/to/file.bib --entry-type misc --param2field path/to/file.json
or
>> glossary2bib --help
>> glossary2bib path/to/file.tex --entry-type misc --param2field path/to/file.json
Implementation
- Parsing of
texfiles is handled by TexSoup - Parsing of
bibfiles is handled by BibtexParser
Release files for bib2glossary 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bib2glossary-0.1.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Release files / bib2glossary-0.1.2-py2.py3-none-any.whl
| Download URL | bib2glossary-0.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
178e45131a75320b13398eff44a6fe788889908f5b43339d6650203dbd349727
|
|
BLAKE2b-256 checksum How to use checksums |
d916d35245e4d62f6de4700f31b5b8a5bca36083a49c998e7f4ddf8af725f8d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.3
|