Common Lisp Package: DOCUTILS.TRANSFORM

Package containing standard docutils Node names

README:

FUNCTION

Public

Undocumented

EXTERNAL-TARGETS (ELEMENT)

FOOTNOTES (DOCUMENT)

INTERNAL-TARGETS (ELEMENT)

Private

ANONYMOUS-REFERENCES (ELEMENT)

Return a list of external targets in a document in order of occurance

DATE (OS UTIME &OPTIONAL COLON-P AT-P (PRECISION 7) (TIMEZONE *TIMEZONE*))

Formatter which formats a universal time for output as a date and time Modifiers: - os: an output stream designator - arg: a universal time - colon-p: a generalised boolean (default false). If true use month and day names in date - at-p: a generalised boolean (default false) - if true print in yyyy-mm-dd (sortable) format rather than dd-mm-yyy - precision: what precision to print it to. 6 is to the second, 7 includes timezone, a negative number counts backward. - timezone: an integer (default nil). If nil no timezone used and time is in current timezone adjusted for daylight saving time. Result: nil Examples: (format nil "~/date/" (get-universal-time)) => "19-03-2009 08:30"

FINAL-CHECK-TRANSITION (NODE)

Move transitions at the end of sections up the tree. Complain on transitions after a title, at the beginning or end of the document, and after another transition.

FIRST-CHILD-NOT-TYPE (NODE TYPE)

Returns first child of node not of type type

NUMBER-FOOTNOTE-REFERENCES (TRANSFORM &OPTIONAL (NAMEIDS (NAMEIDS (DOCUMENT (NODE TRANSFORM)))) (IDS (IDS (DOCUMENT (NODE TRANSFORM)))))

Assign numbers to autonumbered footnote references.

NUMBER-FOOTNOTES (TRANSFORM STARTNUM)

Assign numbers to autonumbered footnotes. For labeled autonumbered footnotes, copy the number over to corresponding footnote references.

REM-CHILDREN (NODE)

Remove children from node and return them as a list

SPLIT-STRING (STRING &KEY COUNT (DELIMITER +WS+) REMOVE-EMPTY-SUBSEQS)

Split `string' along whitespace as defined by the sequence `ws'. Whitespace which causes a split is elided from the result. The whole string will be split, unless `max' is provided, in which case the string will be split into `max' tokens at most, the last one containing the whole rest of the given `string', if any.

SUBSTITUTION-DEFS (ELEMENT)

Return hashtable of substitution definitions in a document

SUBSTITUTION-REFS (ELEMENT)

Return a hashtable of lists of substitution refs keyed by name

SYMBOLISE-FOOTNOTES (TRANSFORM)

Add symbols indexes to '[*]'-style footnotes and references.

Undocumented

ANONYMOUS-TARGETS (ELEMENT)

AUTHORS-FROM-BULLET-LIST (LIST)

AUTHORS-FROM-PARAGRAPH (PARAGRAPH)

AUTHORS-FROM-PARAGRAPHS (VALUE)

AUTOFOOTNOTE-REFS (DOCUMENT)

AUTOFOOTNOTES (DOCUMENT)

CANDIDATE-NODE (DOCUMENT)

CHECK-COMPOUND-BIBLIO-FIELD (FIELD NAME)

CHECK-EMPTY-BIBLIO-FIELD (FIELD NAME)

CITATION-REFS (DOCUMENT)

CITATIONS (DOCUMENT)

CLEAN-RCS-KEYWORDS (PARAGRAPH &OPTIONAL (SUBSTITUTIONS *RCS-KEYWORD-SUBSTITUTIONS*))

COPY-CONTENTS-TITLE (DESTINATION TITLE)

EXTRACT-AUTHORS (FIELD NAME DOCINFO)

EXTRACT-BIBLIOGRAPHIC (FIELD-LIST BIBLIO-NODES)

FINAL-CHECK-REFERENCE (NODE NAMEIDS)

FOOTNOTE-REFS (DOCUMENT)

INDIRECT-TARGETS (DOCUMENT)

MAKE-TARGET-FOOTNOTE (DOCUMENT TARGET REFS NOTES)

NUMBER-FIGURES (DOCUMENT &KEY (FIGLABEL #'WRITE-TO-STRING) (EQNLABEL #'(LAMBDA (N) (FORMAT NIL (~D) N))))

PROMOTE-DOCUMENT-SUBTITLE (DOCUMENT)

PROMOTE-DOCUMENT-TITLE (DOCUMENT)

RELATIVE-PATH (SOURCE DESTINATION)

RESOLVE-FOOTNOTES-AND-CITATIONS (DOCUMENT)

RESOLVE-INDIRECT-REFERENCES (TARGET &OPTIONAL (REFNAMES (REFNAMES (DOCUMENT TARGET))) (REFIDS (REFIDS (DOCUMENT TARGET))))

RESOLVE-INDIRECT-TARGET (TARGET &OPTIONAL (NAMEIDS (NAMEIDS (DOCUMENT TARGET))) (IDS (IDS (DOCUMENT TARGET))) (REFNAMES (REFNAMES (DOCUMENT TARGET))) (REFIDS (REFIDS (DOCUMENT TARGET))))

RESOLVE-REFERENCES (NOTES REFS)

SYMBOL-FOOTNOTE-REFS (DOCUMENT)

SYMBOL-FOOTNOTES (DOCUMENT)

GENERIC-FUNCTION

Public

EVALUATE (NODE)

Evaluate the node in current dynamic context, returning the result.

Private

FORMAT-OUTPUT (SPECIFICATION VALUE &KEY FMT FORMAT RADIX (PACKAGE *PACKAGE*) (MULTIPLEP NIL) (PRESERVE-NEWLINES-P T) STREAM IF-NO-SPECIFICATION FIELD-SPECIFICATIONS NIL-ALLOWED (MULT 1) (%-P T) (PLACES 0) (UNITS T) (PADCHAR ) (DECIMAL-PLACES 2) (ZONE *TIMEZONE*) (IF-NIL NIL) (SEPARATOR , ) TYPE &ALLOW-OTHER-KEYS)

Return a string representation of value formatted according to a specification. If specification is a list the first element specifies the actual validation method and the rest of the list are passed as keyword arguments to the specific method e.g. (format-output '(date :fmt :rfc2822) (get-universal-time)) >"Mon, 10 Jul 2006 15:43:45 +00"

GENERATE-HEADER (TRANSFORM)

Generate the header and add to document

SLOT-ACCESSOR

Private

Undocumented

AUTOFOOTNOTE-LABELS (OBJECT)

SETFAUTOFOOTNOTE-LABELS (NEW-VALUE OBJECT)

BIBLIO-NODES (OBJECT)

SYMBOLS (OBJECT)

VARIABLE

Public

*EVALUATOR*

Function to call when evaluating an evaluateable node

Private

Undocumented

*RCS-KEYWORD-SUBSTITUTIONS*

CLASS

Public

CHAINED-TARGETS

Attributes "refuri" and "refname" are migrated from the final direct target up the chain of contiguous adjacent internal targets

CLASS-ATTRIBUTE

Move class attribute of pending node to next non-comment element

CONTENTS

Include or exclude elements - for use with pending elements

DECORATIONS

Populate a document's decoration element (header, footer).

DOCINFO

Transform to create document bibliographic fields.

DOCTITLE

Transform to promote document title and subtitle.

EVALUATE-TRANSFORM

Evaluate nodes cahcing result

EXTERNAL-TARGETS (ELEMENT)

replace :refname attribute with the direct :refuri attribute for external targets.

FIGNUM

Automatically assigns numbers to Figures, tables and equations.

FILTER

Include or exclude elements - for use with pending elements

FILTER-MESSAGES

Remove system messages below verbosity threshold.

FINAL-CHECKS

Perform last-minute checks and transforms. - Check for dangling references (incl. footnote & citation). - Check for illegal transitions, move transitions

FOOTNOTES (DOCUMENT)

Assign numbers to autonumbered footnotes, and resolve links to footnotes, citations, and their references.

INTERNAL-TARGETS (ELEMENT)

replace :refname attribute with the direct :refid attribute for internal targets.

RESOLVE-MEDIA

Resolve media dependancies

SECTNUM

Automatically assigns numbers to the titles of document sections.

SIMPLE-TRANSFORM

A simple transform which calls the closure with the node

SUBSTITUTIONS

Replace substitution-references with the contents of the corresponding substitution-definitions.

TARGET-NOTES

Creates a footnote for each external target in the text, and corresponding footnote references after each reference.

CONDITION

Private

Undocumented

TRANSFORM-CONDITION