Fixed LaTeX special characters
[xmldoc.git] / xp.c
diff --git a/xp.c b/xp.c
index d5120b5..52a6491 100644 (file)
--- a/xp.c
+++ b/xp.c
@@ -91,12 +91,13 @@ struct
    {  '$',     "\\$"              },
    {  '%',     "\\%"              },
    {  '&',     "\\&"              },
-   {  '<',     "\\verb+<+"        },
-   {  '>',     "\\verb+>+"        },
+   {  '<',     "$<$"              },
+   {  '>',     "$>$"              },
    {  '\\',    "$\\backslash$"    },
-   {  '^',     "\\verb+^+"        },
+   {  '^',     "$\\wedge$"        },
    {  '_',     "\\_"              },
    {  '{',     "\\{"              },
+   {  '|',     "$\\mid$"          },
    {  '}',     "\\}"              },
    {  '~',     "$\\sim$"          },
    {  160,     "~"                },
@@ -510,7 +511,7 @@ void LatexEscape(xmlNodePtr node)
       }
       for (child = node->children; child != 0; child = child->next)
       {
-         if (strcmp(child->name, "verbatim") != 0 )
+         if (strcmp(child->name, "verbatim") != 0 && strcmp(child->name, "example") != 0)
          {
             LatexEscape(child);
          }