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(library(autodoc_bibrefs)). - Exports:
- Predicates:
resolve_bibliography/1, parse_commands/3.
- Predicates:
- Imports:
- Application modules:
lpdocsrc(src(autodoc_state)), lpdocsrc(src(autodoc_doctree)), lpdocsrc(src(autodoc_refsdb)), lpdocsrc(src(autodoc_aux)), lpdocsrc(src(autodoc_settings)), lpdocsrc(src(autodoc_parse)). - System library modules:
dict, aggregates, terms, file_utils, lists, format, make/make_rt, system_extra. - 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, 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)