Resolution of Bibliographical References
Author(s): Manuel Hermenegildo (original version), Jose F. Morales.
This module provides a predicate to resolve the bibliographical references found during the generation of documentation.
Usage and interface
- Library usage:
:- use_module(lpdoc(autodoc_bibrefs)). - Exports:
- Predicates:
resolve_bibliography/1, parse_commands/3.
- Predicates:
- Imports:
- Application modules:
autodoc_state, autodoc_doctree, autodoc_refsdb, autodoc_settings, autodoc_filesystem, autodoc_aux, autodoc_parse. - System library modules:
dict, aggregates, terms, file_utils, lists, format, pathnames. - Internal (engine) modules:
term_basic, arithmetic, atomic_basic, basic_props, basiccontrol, data_facts, exceptions, io_aux, io_basic, prolog_flags, streams_basic, system_info, term_compare, term_typing, hiord_rt, debugger_support. - Packages:
prelude, nonpure, condcomp, dcg, assertions, regtypes.
- Application modules:
Documentation on exports
PREDICATE
Usage:resolve_bibliography(DocSt)
This predicate resolves bibliographical references. The algorithm is as follows:
- Write all the bibliographical references to a .aux file.
- Invoke BibTeX with a customized .bst file that generates a pseudo-docstring.
- Load the docstring and fix its syntax.
- Parse the docstring as a doctree.
- Extract (Label,Ref) pairs from bibitem commands.
Both the docstring and label/reference pairs are kept in the DocSt, and used later to map symbolic references to textual labels.
- The following properties should hold at call time:
(docstate/1)docstate(DocSt)