X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c103ca4b4d594119a4209e095beb597156ab52e4..59ae507561b72fc57a553b73ca54ea375dadaa0d:/utils/tex2rtf/src/htmlutil.cpp diff --git a/utils/tex2rtf/src/htmlutil.cpp b/utils/tex2rtf/src/htmlutil.cpp index f95065016d..086a32b20d 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 @@ -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("??"); @@ -2110,8 +2130,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 +2144,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 +2648,7 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start) if (compatibilityMode) { TexOutput("\n"); + OutputFont(); /* for (int i = 0; i < noColumns; i++) { @@ -2905,25 +2928,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 +3014,7 @@ bool HTMLGo(void) fclose(fd); } - fprintf(tmpTitle, "\n\n"); + fprintf(tmpTitle, "\n\n"); if (htmlFrameContents) {