X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48c12cb1290224f44161d9af774170d5f0fae440..8f974c520a8733158591891458fda10fae4c3950:/utils/tex2rtf/src/htmlutil.cpp diff --git a/utils/tex2rtf/src/htmlutil.cpp b/utils/tex2rtf/src/htmlutil.cpp index 487fb97a62..c91ca52c9f 100644 --- a/utils/tex2rtf/src/htmlutil.cpp +++ b/utils/tex2rtf/src/htmlutil.cpp @@ -28,6 +28,10 @@ #include "tex2rtf.h" #include "table.h" + +extern wxHashTable TexReferences; + + extern void DecToHex(int, char *); void GenerateHTMLIndexFile(char *fname); @@ -76,6 +80,11 @@ static bool inTable = FALSE; // This is defined in the Tex2Any library. extern char *BigBuffer; +// DHS Two-column table dimensions. +static int TwoColWidthA = -1; +static int TwoColWidthB = -1; + + class HyperReference: public wxObject { public: @@ -1189,8 +1198,12 @@ void HTMLOnMacro(int macroId, int no_args, bool start) { if ( start ) TexOutput("\n\n"); - else + else { TexOutput("\n
\n"); + // DHS + TwoColWidthA = -1; + TwoColWidthB = -1; + } break; } case ltPAR: @@ -1894,6 +1907,9 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) if (helpRefText) TraverseChildrenFromChunk(helpRefText); TexOutput(" (REF NOT FOUND)"); + wxString errBuf; + errBuf.Printf("Warning: unresolved reference '%s'", refName); + OnInform((char *)errBuf.c_str()); } } else TexOutput("??"); @@ -2089,17 +2105,29 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) */ if (arg_no == 1) { - if ( start ) - TexOutput("\n\n"); - else + if ( start ) { + // DHS + if (TwoColWidthA > -1) { + char buf[100]; + sprintf(buf,"\n\n",TwoColWidthA); + TexOutput(buf); + } else + TexOutput("\n\n"); + } else TexOutput("\n\n"); } if (arg_no == 2) { - if ( start ) - TexOutput("\n\n"); - else - TexOutput("\n\n"); + // DHS + if ( start ) { + if (TwoColWidthB > -1) { + char buf[100]; + sprintf(buf,"\n\n",TwoColWidthB); + TexOutput(buf); + } else + TexOutput("\n\n"); + } else + TexOutput("\n\n"); } return TRUE; break; @@ -2153,6 +2181,30 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) TexOutput("

\n"); break; } + // DHS + case ltTWOCOLWIDTHA: + { + if (start) + { + char *val = GetArgData(); + float points = ParseUnitArgument(val); + TwoColWidthA = (int)((points * 100.0) / 72.0); + } + return FALSE; + break; + } + // DHS + case ltTWOCOLWIDTHB: + { + if (start) + { + char *val = GetArgData(); + float points = ParseUnitArgument(val); + TwoColWidthB = (int)((points * 100.0) / 72.0); + } + return FALSE; + break; + } /* * Accents *