X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aed3314d6ebf4653928b513c5476c482b7b5180a..eefc691533295ee9ffbdb166c5684bdc361b53da:/utils/tex2rtf/src/htmlutil.cpp?ds=sidebyside
diff --git a/utils/tex2rtf/src/htmlutil.cpp b/utils/tex2rtf/src/htmlutil.cpp
index 7e3a6b8d6d..ea8b6efc2e 100644
--- a/utils/tex2rtf/src/htmlutil.cpp
+++ b/utils/tex2rtf/src/htmlutil.cpp
@@ -652,6 +652,24 @@ void OutputBodyStart(void)
OutputFont();
}
+void HTMLHead()
+{
+ TexOutput("
");
+ if (htmlStylesheet) {
+ TexOutput("");
+ }
+};
+
+void HTMLHeadTo(FILE* f)
+{
+ if (htmlStylesheet)
+ fprintf(f,"",htmlStylesheet);
+ else
+ fprintf(f,"");
+}
+
// Called on start/end of macro examination
void HTMLOnMacro(int macroId, int no_args, bool start)
{
@@ -682,7 +700,8 @@ void HTMLOnMacro(int macroId, int no_args, bool start)
SetCurrentOutput(Chapters);
- TexOutput("");
+ HTMLHead();
+ TexOutput("");
OutputCurrentSection(); // Repeat section header
TexOutput("\n");
OutputBodyStart();
@@ -751,7 +770,8 @@ void HTMLOnMacro(int macroId, int no_args, bool start)
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(1, topicName, SectionsName);
SetCurrentOutput(Sections);
- TexOutput("");
+ HTMLHead();
+ TexOutput("");
OutputCurrentSection();
TexOutput("\n");
OutputBodyStart();
@@ -844,7 +864,8 @@ void HTMLOnMacro(int macroId, int no_args, bool start)
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(2, topicName, SubsectionsName);
SetCurrentOutput(Subsections);
- TexOutput("");
+ HTMLHead();
+ TexOutput("");
OutputCurrentSection();
TexOutput("\n");
OutputBodyStart();
@@ -924,7 +945,8 @@ void HTMLOnMacro(int macroId, int no_args, bool start)
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(3, topicName, SubsubsectionsName);
SetCurrentOutput(Subsubsections);
- TexOutput("");
+ HTMLHead();
+ TexOutput("");
OutputCurrentSection();
TexOutput("\n");
OutputBodyStart();
@@ -2004,7 +2026,7 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
{
TexOutput("");
+ TexOutput("\""); TexOutput(alignment); TexOutput(">");
delete[] inlineFilename;
}
}
@@ -2690,7 +2712,8 @@ bool HTMLOnArgument(int macroId, int arg_no, bool start)
else
sprintf(titleBuf, "%s_contents.html", FileNameFromPath(FileRoot));
- TexOutput("");
+ HTMLHead();
+ TexOutput("");
TexOutput(ReferencesNameString);
TexOutput("\n");
OutputBodyStart();
@@ -2968,17 +2991,19 @@ bool HTMLGo(void)
if (DocumentTitle)
{
SetCurrentOutput(tmpTitle);
- TexOutput("\n\n");
+ HTMLHead();
+ TexOutput("\n");
TraverseChildrenFromChunk(DocumentTitle);
TexOutput("\n");
}
else
{
SetCurrentOutput(tmpTitle);
+ HTMLHeadTo(tmpTitle);
if (contentsString)
- fprintf(tmpTitle, "%s\n\n", contentsString);
+ fprintf(tmpTitle, "%s\n\n", contentsString);
else
- fprintf(tmpTitle, "%s\n\n", FileNameFromPath(FileRoot));
+ fprintf(tmpTitle, "%s\n\n", FileNameFromPath(FileRoot));
}
// Output frame information
@@ -3161,8 +3186,10 @@ void GenerateHTMLWorkshopFiles(char *fname)
fprintf(f,
"\n"
- "\n"
- "\n"
+ "\n");
+ HTMLHeadTo(f);
+ fprintf(f,
+ "\n"
"\n"
"\n"
"\n"
@@ -3237,8 +3264,10 @@ void HTMLWorkshopStartContents()
fprintf(HTMLWorkshopContents,
"\n"
- "\n"
- "\n"
+ "\n");
+ HTMLHeadTo(HTMLWorkshopContents);
+ fprintf(HTMLWorkshopContents,
+ "\n"
"\n"
"\n"
"\n"