X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c103ca4b4d594119a4209e095beb597156ab52e4..c354beeafacc20831ce76e266703d07f27e826c7:/utils/tex2rtf/src/htmlutil.cpp diff --git a/utils/tex2rtf/src/htmlutil.cpp b/utils/tex2rtf/src/htmlutil.cpp index f95065016d..7e3a6b8d6d 100644 --- a/utils/tex2rtf/src/htmlutil.cpp +++ b/utils/tex2rtf/src/htmlutil.cpp @@ -181,7 +181,7 @@ void ReopenFile(FILE **fd, char **fileName) { if (*fd) { - fprintf(*fd, "\n\n"); + fprintf(*fd, "\n\n"); fclose(*fd); } fileId ++; @@ -583,6 +583,17 @@ char *ParseColourString(char *bkStr, bool *isPicture) else return NULL; } +void OutputFont(void) +{ + // Output + TexOutput("\n"); +} + // Output start of block void OutputBodyStart(void) { @@ -637,6 +648,8 @@ void OutputBodyStart(void) } } TexOutput(">\n"); + + OutputFont(); } // Called on start/end of macro examination @@ -707,8 +720,8 @@ void HTMLOnMacro(int macroId, int no_args, bool start) // Add this section title to the list of keywords if (htmlIndex) { - OutputCurrentSectionToString(wxBuffer); - AddKeyWordForTopic(topicName, wxBuffer, ConvertCase(currentFileName)); + OutputCurrentSectionToString(wxTex2RTFBuffer); + AddKeyWordForTopic(topicName, wxTex2RTFBuffer, ConvertCase(currentFileName)); } } break; @@ -769,8 +782,8 @@ void HTMLOnMacro(int macroId, int no_args, bool start) // Add this section title to the list of keywords if (htmlIndex) { - OutputCurrentSectionToString(wxBuffer); - AddKeyWordForTopic(topicName, wxBuffer, currentFileName); + OutputCurrentSectionToString(wxTex2RTFBuffer); + AddKeyWordForTopic(topicName, wxTex2RTFBuffer, currentFileName); } } break; @@ -876,8 +889,8 @@ void HTMLOnMacro(int macroId, int no_args, bool start) // Add this section title to the list of keywords if (htmlIndex) { - OutputCurrentSectionToString(wxBuffer); - AddKeyWordForTopic(topicName, wxBuffer, currentFileName); + OutputCurrentSectionToString(wxTex2RTFBuffer); + AddKeyWordForTopic(topicName, wxTex2RTFBuffer, currentFileName); } } @@ -954,8 +967,8 @@ void HTMLOnMacro(int macroId, int no_args, bool start) // Add this section title to the list of keywords if (htmlIndex) { - OutputCurrentSectionToString(wxBuffer); - AddKeyWordForTopic(topicName, wxBuffer, currentFileName); + OutputCurrentSectionToString(wxTex2RTFBuffer); + AddKeyWordForTopic(topicName, wxTex2RTFBuffer, currentFileName); } } } @@ -1027,7 +1040,8 @@ void HTMLOnMacro(int macroId, int no_args, bool start) if (inTabular) { // End cell, start cell - TexOutput(""); + + TexOutput(""); // Start new row and cell, setting alignment for the first cell. if (currentColumn < noColumns) @@ -1051,6 +1065,7 @@ void HTMLOnMacro(int macroId, int no_args, bool start) else sprintf(buf, "\n"); TexOutput(buf); + OutputFont(); } else TexOutput("&"); @@ -1099,12 +1114,13 @@ void HTMLOnMacro(int macroId, int no_args, bool start) else sprintf(buf, "\n"); TexOutput(buf); + OutputFont(); } else { // End cell and row // Start new row and cell - TexOutput("\n\n"); + TexOutput("\n\n"); } break; } @@ -1906,7 +1922,11 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) { if (helpRefText) TraverseChildrenFromChunk(helpRefText); - TexOutput(" (REF NOT FOUND)"); + if (!ignoreBadRefs) + TexOutput(" (REF NOT FOUND)"); + wxString errBuf; + errBuf.Printf("Warning: unresolved reference '%s'", refName); + OnInform((char *)errBuf.c_str()); } } else TexOutput("??"); @@ -2090,6 +2110,7 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) descriptionItemArg = GetArgChunk(); return FALSE; } + return TRUE; } case ltTWOCOLITEM: case ltTWOCOLITEMRULED: @@ -2110,8 +2131,9 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) TexOutput(buf); } else TexOutput("\n\n"); + OutputFont(); } else - TexOutput("\n\n"); + TexOutput("\n\n"); } if (arg_no == 2) { @@ -2123,8 +2145,9 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) TexOutput(buf); } else TexOutput("\n\n"); + OutputFont(); } else - TexOutput("\n\n"); + TexOutput("\n\n"); } return TRUE; break; @@ -2626,6 +2649,7 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) if (compatibilityMode) { TexOutput("\n"); + OutputFont(); /* for (int i = 0; i < noColumns; i++) { @@ -2905,25 +2929,25 @@ bool HTMLGo(void) if (Chapters) { - fprintf(Chapters, "\n\n"); + fprintf(Chapters, "\n\n"); fclose(Chapters); Chapters = NULL; } if (Sections) { - fprintf(Sections, "\n\n"); + fprintf(Sections, "\n\n"); fclose(Sections); Sections = NULL; } if (Subsections && !combineSubSections) { - fprintf(Subsections, "\n\n"); + fprintf(Subsections, "\n\n"); fclose(Subsections); Subsections = NULL; } if (Subsubsections && !combineSubSections) { - fprintf(Subsubsections, "\n\n"); + fprintf(Subsubsections, "\n\n"); fclose(Subsubsections); Subsubsections = NULL; } @@ -2991,7 +3015,7 @@ bool HTMLGo(void) fclose(fd); } - fprintf(tmpTitle, "\n\n"); + fprintf(tmpTitle, "\n\n"); if (htmlFrameContents) {