Patch to text.c and wvHtml.c.

Purpose:

- Add the "micro" (mu) symbol as a math character.
- Fix the bug in wvHtml that made the --config wvHtml.xml option
  mandatory.
- Further work on embedded graphics on the LaTeX side.

-- 
Martin Vermeer [EMAIL PROTECTED]
:wq
Index: text.c
===================================================================
RCS file: /cvsroot/wv/text.c,v
retrieving revision 1.47
diff -u -r1.47 text.c
--- text.c      2000/08/25 11:15:31     1.47
+++ text.c      2000/08/26 19:36:13
@@ -564,6 +564,9 @@
                case 0xb3:
                        printf("$\\maththreesuperior$");
                        return(1);
+               case 0xb5:
+                       printf("$\\mu$");
+                       return(1);
                case 0xb9:
                        printf("$\\mathonesuperior$");
                        return(1);
Index: wvHtml.c
===================================================================
RCS file: /cvsroot/wv/wvHtml.c,v
retrieving revision 1.44
diff -u -r1.44 wvHtml.c
--- wvHtml.c    2000/08/25 11:15:31     1.44
+++ wvHtml.c    2000/08/26 19:36:17
@@ -26,7 +26,7 @@
 0 on success
 */
 
-char *config=NULL;
+char *config="wvHtml.xml";
 
 int myelehandler(wvParseStruct *ps,wvTag tag, void *props, int dirty);
 int mydochandler(wvParseStruct *ps,wvTag tag);
@@ -487,9 +487,10 @@
 
 void wvStrangeNoGraphicData(char *config, int graphicstype)
        {
-       wvError(("Strange No Graphic Data in the 0x01 graphic\n"));
+       wvError(("Strange No Graphic Data in the 0x01/0x08 graphic\n"));
 
-       if (strcmp(config, "wvLaTeX.xml") == 0)
+       if ( (strcmp(config, "wvLaTeX.xml") == 0) 
+         || (strcmp(config, "wvCleanLaTeX.xml") == 0) )
                
printf("\n\\resizebox*{\\baselineskip}{!}{\\includegraphics{placeholder.eps}}\
                  \n-- %#.2x graphic: StrangeNoGraphicData --", 
                        graphicstype);
@@ -500,13 +501,17 @@
        }
 
 void wvPrintGraphics(char *config, int graphicstype, int width, int height,
-               char* source)
+               char *source)
        {
-       if (strcmp(config, "wvLaTeX.xml") == 0)
+       if ( (strcmp(config, "wvLaTeX.xml") == 0) 
+         || (strcmp(config, "wvCleanLaTeX.xml") == 0) )
+               /* Output to real file name. Conversion to .eps must 
+               be done manually for now (until libwmf supports .eps)
+               but it's a start */
                printf("\n\\resizebox{%dpt}{%dpt}\
-                 {\\includegraphics{placeholder.eps}}\
-                 \n-- %#.2x graphic %s -- \n",
-                       width, height, graphicstype, source);
+                 {\\includegraphics{%s}}\
+                 \n-- %#.2x graphic -- \n",
+                       width, height, source, graphicstype);
        else
                printf("<img width=\"%d\" height=\"%d\" alt=\"%#.2x graphic\" 
src=\"%s\"><br>",
                width, height, graphicstype, source);

Reply via email to