Reference manual¶
The manual presents links whose targets give a full explanation of each concept.
Syntax¶
See the style guide.
Docutils¶
CodeChat adds the following role and directives to Docutils:
docname
(a role): see _docname_role; in Sphinx, this is typically used via the|docname|
substitution reference. See docname substitution.codeinclude
: see _CodeInclude.fenced-code
: see _FencedCodeBlock. This is typically only needed for internal CodeChat use.set-line
: See _SetLine. This is typically only needed for internal CodeChat use.
JavaScript¶
CodeChat documents include JavaScript to correctly style the resulting HTML. This JavaScript is invoked when the document is ready. To style dynamically-added content, invoke
CodeChat_doStyle(element)
to styleelement
and all its children.
Sphinx¶
CodeChat provides the CodeToRestSphinx.py - a Sphinx extension to translate source code to reST extension. This extension provides the following configuration options:
It also provides the following utilities:
API¶
CodeChat provides the following API:
reStructuredText: code_to_rest_string, code_to_rest_file, code_to_html_string, and code_to_html_file.
Markdown: code_to_markdown_string and code_to_markdown_file.
Supporting routines: get_lexer.
Back-translation: the routines in RestToCode.py - a module to translate reST to source code are in beta.