ipypublish.sphinx.gls.directives module

define the bibglossary directive

Originally adapted from: https://github.com/mcmtroffaes/sphinxcontrib-bibtex

class ipypublish.sphinx.gls.directives.BibGlossaryDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Bases: docutils.parsers.rst.Directive

Class for processing the bibglossary directive.

Parses the bibliography files, and produces a BibGlossaryNode node.

See also

Further processing of the resulting BibGlossaryNode node is done by BibGlossaryTransform.

final_argument_whitespace = True
has_content = False
option_spec = {'all': <function flag>, 'cited': <function flag>, 'encoding': <function encoding>, 'filter': <function unchanged>, 'keyprefix': <function unchanged>, 'notcited': <function flag>, 'style': <function unchanged>, 'unsorted': <function flag>}
optional_arguments = 0
process_bibfile(bibfile, encoding)[source]

Check if env.bibgloss_cache.bibfiles[bibfile] is still up to date. If not, parse the bibfile, and store parsed data in the bibtex cache.


bibfile (str) – The bib file name.

required_arguments = 1

Process .bib files, set file dependencies, and create a node that is to be transformed to the entries of the glossary.

update_bibfile_cache(bibfile, mtime, encoding)[source]

Parse bibfile, and store the parsed data, along with modification time mtime, in the bibtex cache.

  • bibfile (str) – The bib file name.

  • mtime (float) – The bib file’s modification time.