same as sys.stderr.write(), but bwrite() will make it
bold if stderr is a tty (for visibility).
Use these everywhere instead of accessing
sys.stderr.write() directly.
find_all_child_elements(): Find all elements by type name that are
immediate children of another.
cleanup_synopses(): Receive both the document and fragment objects as
parameters; if only the document is passed, synopsis
information is never found since it's in the fragment!
build_para(): Add a chunk of code to ensure that a newline always
follows the </para> end-tag. Not really important, but
makes presentation consistent for authoring/
maintenance.
fixup_bifuncindexes_chunk(): Use find_all_child_elements() instead of
find_all_elements() so we don't work with too many
levels at once; that could cause DOM exceptions with
the <elem>.removeChild() method.
Removed some obsolete commented-out code.
Merged BaseConversion into Conversion since there's only one
conversion process now.
Remove push/pop of output stream; it's no longer needed.
Separate the Conversion class into a base and a subclass; the subclass
is pretty minimal but the separation is useful for....
NewConversion: New class that implements a somewhat different
approach to the conversion. This uses a table of
instances (rather than tuples) that have more
information than the tuples used for the older
conversion procedure. This allows a lot more control
over the conversion, and it seems to be pretty
stable.
TableEntry,
Parameter: New classes that are used to build the conversion
specification used by NewConversion.
TableParser: xmllib.XMLParser subclass that builds a conversion
specification from an XML document.
load_table(): Convenience function that loads a table from a file.
main(): Added flags --new and --old; these select which conversion is
used. The default is --new.
Several fixes have been made in the old conversion as well; these were
done before writing & switching to the new conversion, and should be
archived.
The next checkin of this file will discard the old conversion; is is
kept in this checkin to allow it to be retrieved if needed, and to
avoid lossing the bugfixes that have been made to it in the interim.
Use a temporary file to pass results from latex2esis.py to
docfixer.py; this makes for better error detection by make (if the
first pipeline stage fails, make wasn't catching it).
Lots of changes to get the paragraph marking to work, and not go into
an infinite recursion.
Start to rationalize markup of method signatures; not complete.
find_all_elements(): similar to getElementsByTagName(), but operates
on the not-quite-legal fragments we deal with here.
Simplifies several individual transforms.
fixup_sectionauthors(): Convert \sectionauthor items to <author> just
after the <section>'s <title>.
general identifiers for which closing tags will be omitted
when SGML is generated. This can be used to tell the markup
generator to drop stuff like </para>. Note that it needs to
be possible for the closing tag to *always* be omitted for it
to be included in "autoclose".
main(): Added command-line option "-a" / "--autoclose" to set the
list of general identifiers passed to the convert() function
as the "autoclose" parameter. The list may only be specified
once (not additive) and GIs should be comma-separated. The
default list includes only "para".
any subdirectory; don't continue with remaining subdirs.
Added "api", "ext", "lib", "mac", "ref", and "tut" targets to only do
submakes in those directories. This is just a lot easier to use than
to cd into the subdir and use make.rules directly.
currently generated by the LaTeX and LaTeX2HTML processes is generated
here as well, making it more flexible in the SGML version.
Reduce the <args> element so that <optional> goes away; just use
square brackets to indicate what's optional. This makes it easier to
read than the LaTeX, and the processor can do any checking it needs to
in order to make sure it's legit. Possible shortcoming: DSSSL
processors may need more explicit markup. Can probably hack around it
for this case, but we'll see.
used to deal with the table headings and entries.
An additional flag in the element table is used to indicate elements
which have no "general" content, but which do have subelement
content. These must be flagged distinctly from empty elements.
Currently used for \lineii, \lineiii, and \lineiv.
<moduleinfo> element based on various meta information, and
strip some cruftiness. This is more usable for information
extraction, and organizes the information more clearly.
cleanup_synopses(): Rewrite to use create_module_info(), so this
will work with multi-rooted "documents".