doconce.common

This module contains data structures used in translation of the Doconce format to other formats. Some convenience functions used in translation modules (latex.py, html.py, etc.) are also included in here.

doconce.common.default_movie(m)

Replace a movie entry by a proper URL with text.

doconce.common.indent_lines(text, format, indentation=' ')

Indent each line in the string text, provided in a format for HTML, LaTeX, epytext, ..., by the blank string indentation. Return new version of text.

doconce.common.insert_code_and_tex(filestr, code_blocks, tex_blocks, format)
doconce.common.plain_exercise(exer)
doconce.common.ref2equations(filestr)

Replace references to equations: (ref{my:label}) -> Equation (my:label) (ref{my:label1})-(ref{my:label2}) -> Equations (my:label1)-(my:label2) (ref{my:label1}) and (ref{my:label2}) -> Equations (my:label1) and (my:label2) (ref{my:label1}), (ref{my:label2}) and (ref{my:label3}) -> Equations (my:label1), (my:label2) and (ref{my:label2})

doconce.common.remove_code_and_tex(filestr)

Remove verbatim and latex (math) code blocks from the file and store separately in lists (code_blocks and tex_blocks). The function insert_code_and_tex will insert these blocks again.

doconce.common.table_analysis(table)

Return max width of each column.

doconce.common.where()

Return the location where the doconce package is installed.

Previous topic

doconce.doconce

Next topic

doconce.html

This Page