X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf16085dc068819ecb1fc272298c094600a5e041..4b04699b670b4ab4632229fa0264d154acd3bec1:/utils/tex2rtf/src/htmlutil.cpp diff --git a/utils/tex2rtf/src/htmlutil.cpp b/utils/tex2rtf/src/htmlutil.cpp index b85e33f4a4..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; } @@ -2094,6 +2110,7 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) descriptionItemArg = GetArgChunk(); return FALSE; } + return TRUE; } case ltTWOCOLITEM: case ltTWOCOLITEMRULED: @@ -2114,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) { @@ -2127,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; @@ -2630,6 +2649,7 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) if (compatibilityMode) { TexOutput("\n"); + OutputFont(); /* for (int i = 0; i < noColumns; i++) { @@ -2909,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; } @@ -2995,7 +3015,7 @@ bool HTMLGo(void) fclose(fd); } - fprintf(tmpTitle, "\n\n"); + fprintf(tmpTitle, "\n\n"); if (htmlFrameContents) {