doconce.html

doconce.html.bibdict2htmllist(pyfile, citations)

Transform dict with bibliography to an HTML ordered list with anchors.

doconce.html.define(FILENAME_EXTENSION, BLANKLINE, INLINE_TAGS_SUBST, CODE, LIST, ARGLIST, TABLE, EXERCISE, FIGURE_EXT, CROSS_REFS, INDEX_BIB, INTRO, OUTRO)
doconce.html.html_author(authors_and_institutions, auth2index, inst2index, index2inst, auth2email)
doconce.html.html_code(filestr, format)
doconce.html.html_figure(m)
doconce.html.html_index_bib(filestr, index, citations, bibfile)
doconce.html.html_movie(m)
doconce.html.html_ref_and_label(section_label2title, format, filestr)
doconce.html.html_table(table)
doconce.html.latin2html(text)

Transform a text with possible latin-1 characters to the equivalent valid text in HTML with all special characters with ordinal > 159 encoded as &#number;

Method: convert from plain text (open(filename, ‘r’)) to utf-8, run through each character c, if ord(c) > 159, add the HTML encoded text to a list, otherwise just add c to the list, then finally join the list to make the new version of the text.

Note: A simpler method is just to set <?xml version=”1.0” encoding=”utf-8” ?> as the first line in the HTML file, see how rst2html.py starts the HTML file. (However, the method below shows how to cope with special European characters in general.)

Previous topic

doconce.common

Next topic

doconce.latex

This Page