const char *ID,
xmlParserCtxtPtr ctxt);
+#define LIBXML_DEBUG_ENABLED
+//#define DEBUG
+
static int debug = 0;
static int novalid = 0;
static int noout = 0;
{ '_', "\\_" },
{ '{', "\\{" },
{ '}', "\\}" },
- { '~', "\\verb+~+" },
+ { '~', "$\\sim$" },
{ 160, "~" },
{ 161, "!`" },
{ 162, "..." },
xmlXIncludeProcessFlags(doc, XSLT_PARSE_OPTIONS);
+#ifdef DEBUG
+ xmlDebugDumpDocument(stdout, doc);
+#endif
+
if (latex)
{
LatexEscape(xmlDocGetRootElement(doc));
void LatexEscape(xmlNodePtr node)
{
xmlNodePtr child;
+ xmlAttrPtr attribute;
xmlChar *byte;
int unicode;
int textlen;
int i;
+#ifdef DEBUG
+ fprintf(stderr, "\n-------- Node type %d\n", node->type);
+#endif
if (xmlNodeIsText(node))
{
#ifdef DEBUG
}
else
{
+ for (attribute = node->properties; attribute != 0; attribute = attribute->next)
+ {
+ LatexEscape(attribute->children);
+ }
for (child = node->children; child != 0; child = child->next)
{
if (strcmp(child->name, "verbatim") != 0 )