OutputFont();
}
+void HTMLHead()
+{
+ TexOutput("<head>");
+ if (htmlStylesheet) {
+ TexOutput("<link rel=stylesheet type=\"text/css\" href=\"");
+ TexOutput(htmlStylesheet);
+ TexOutput("\">");
+ }
+};
+
+void HTMLHeadTo(FILE* f)
+{
+ if (htmlStylesheet)
+ fprintf(f,"<head><link rel=stylesheet type=\"text/css\" href=\"%s\">",htmlStylesheet);
+ else
+ fprintf(f,"<head>");
+}
+
// Called on start/end of macro examination
void HTMLOnMacro(int macroId, int no_args, bool start)
{
SetCurrentOutput(Chapters);
- TexOutput("<head><title>");
+ HTMLHead();
+ TexOutput("<title>");
OutputCurrentSection(); // Repeat section header
TexOutput("</title></head>\n");
OutputBodyStart();
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(1, topicName, SectionsName);
SetCurrentOutput(Sections);
- TexOutput("<head><title>");
+ HTMLHead();
+ TexOutput("<title>");
OutputCurrentSection();
TexOutput("</title></head>\n");
OutputBodyStart();
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(2, topicName, SubsectionsName);
SetCurrentOutput(Subsections);
- TexOutput("<head><title>");
+ HTMLHead();
+ TexOutput("<title>");
OutputCurrentSection();
TexOutput("</title></head>\n");
OutputBodyStart();
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(3, topicName, SubsubsectionsName);
SetCurrentOutput(Subsubsections);
- TexOutput("<head><title>");
+ HTMLHead();
+ TexOutput("<title>");
OutputCurrentSection();
TexOutput("</title></head>\n");
OutputBodyStart();
else
sprintf(titleBuf, "%s_contents.html", FileNameFromPath(FileRoot));
- TexOutput("<head><title>");
+ HTMLHead();
+ TexOutput("<title>");
TexOutput(ReferencesNameString);
TexOutput("</title></head>\n");
OutputBodyStart();
if (DocumentTitle)
{
SetCurrentOutput(tmpTitle);
- TexOutput("\n<HTML>\n<HEAD><TITLE>");
+ HTMLHead();
+ TexOutput("\n<HEAD><TITLE>");
TraverseChildrenFromChunk(DocumentTitle);
TexOutput("</TITLE></HEAD>\n");
}
else
{
SetCurrentOutput(tmpTitle);
+ HTMLHeadTo(tmpTitle);
if (contentsString)
- fprintf(tmpTitle, "<HEAD><TITLE>%s</TITLE></HEAD>\n\n", contentsString);
+ fprintf(tmpTitle, "<TITLE>%s</TITLE></HEAD>\n\n", contentsString);
else
- fprintf(tmpTitle, "<HEAD><TITLE>%s</TITLE></HEAD>\n\n", FileNameFromPath(FileRoot));
+ fprintf(tmpTitle, "<TITLE>%s</TITLE></HEAD>\n\n", FileNameFromPath(FileRoot));
}
// Output frame information
fprintf(f,
"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
- "<HTML>\n"
- "<HEAD>\n"
+ "<HTML>\n");
+ HTMLHeadTo(f);
+ fprintf(f,
+ "\n"
"<meta name=\"GENERATOR\" content=\"tex2rtf\">\n"
"<!-- Sitemap 1.0 -->\n"
"</HEAD><BODY>\n"
fprintf(HTMLWorkshopContents,
"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
- "<HTML>\n"
- "<HEAD>\n"
+ "<HTML>\n");
+ HTMLHeadTo(HTMLWorkshopContents);
+ fprintf(HTMLWorkshopContents,
+ "\n"
"<meta name=\"GENERATOR\" content=\"tex2rtf\">\n"
"<!-- Sitemap 1.0 -->\n"
"</HEAD><BODY>\n"
htmlWorkshopFiles = StringTobool(settingValue);
else if (StringMatch(settingName, "htmlFrameContents", FALSE, TRUE))
htmlFrameContents = StringTobool(settingValue);
+ else if (StringMatch(settingName, "htmlStylesheet", FALSE, TRUE))
+ {
+ if (htmlStylesheet) delete[] htmlStylesheet;
+ htmlStylesheet = copystring(settingValue);
+ }
else if (StringMatch(settingName, "upperCaseNames", FALSE, TRUE))
upperCaseNames = StringTobool(settingValue);
else if (StringMatch(settingName, "ignoreBadRefs", FALSE, TRUE))