git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15363
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+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)
{
// Called on start/end of macro examination
void HTMLOnMacro(int macroId, int no_args, bool start)
{
SetCurrentOutput(Chapters);
SetCurrentOutput(Chapters);
- TexOutput("<head><title>");
+ HTMLHead();
+ TexOutput("<title>");
OutputCurrentSection(); // Repeat section header
TexOutput("</title></head>\n");
OutputBodyStart();
OutputCurrentSection(); // Repeat section header
TexOutput("</title></head>\n");
OutputBodyStart();
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(1, topicName, SectionsName);
SetCurrentOutput(Sections);
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(1, topicName, SectionsName);
SetCurrentOutput(Sections);
- TexOutput("<head><title>");
+ HTMLHead();
+ TexOutput("<title>");
OutputCurrentSection();
TexOutput("</title></head>\n");
OutputBodyStart();
OutputCurrentSection();
TexOutput("</title></head>\n");
OutputBodyStart();
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(2, topicName, SubsectionsName);
SetCurrentOutput(Subsections);
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(2, topicName, SubsectionsName);
SetCurrentOutput(Subsections);
- TexOutput("<head><title>");
+ HTMLHead();
+ TexOutput("<title>");
OutputCurrentSection();
TexOutput("</title></head>\n");
OutputBodyStart();
OutputCurrentSection();
TexOutput("</title></head>\n");
OutputBodyStart();
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(3, topicName, SubsubsectionsName);
SetCurrentOutput(Subsubsections);
if (htmlWorkshopFiles) HTMLWorkshopAddToContents(3, topicName, SubsubsectionsName);
SetCurrentOutput(Subsubsections);
- TexOutput("<head><title>");
+ HTMLHead();
+ TexOutput("<title>");
OutputCurrentSection();
TexOutput("</title></head>\n");
OutputBodyStart();
OutputCurrentSection();
TexOutput("</title></head>\n");
OutputBodyStart();
else
sprintf(titleBuf, "%s_contents.html", FileNameFromPath(FileRoot));
else
sprintf(titleBuf, "%s_contents.html", FileNameFromPath(FileRoot));
- TexOutput("<head><title>");
+ HTMLHead();
+ TexOutput("<title>");
TexOutput(ReferencesNameString);
TexOutput("</title></head>\n");
OutputBodyStart();
TexOutput(ReferencesNameString);
TexOutput("</title></head>\n");
OutputBodyStart();
if (DocumentTitle)
{
SetCurrentOutput(tmpTitle);
if (DocumentTitle)
{
SetCurrentOutput(tmpTitle);
- TexOutput("\n<HTML>\n<HEAD><TITLE>");
+ HTMLHead();
+ TexOutput("\n<HEAD><TITLE>");
TraverseChildrenFromChunk(DocumentTitle);
TexOutput("</TITLE></HEAD>\n");
}
else
{
SetCurrentOutput(tmpTitle);
TraverseChildrenFromChunk(DocumentTitle);
TexOutput("</TITLE></HEAD>\n");
}
else
{
SetCurrentOutput(tmpTitle);
- fprintf(tmpTitle, "<HEAD><TITLE>%s</TITLE></HEAD>\n\n", contentsString);
+ fprintf(tmpTitle, "<TITLE>%s</TITLE></HEAD>\n\n", contentsString);
- fprintf(tmpTitle, "<HEAD><TITLE>%s</TITLE></HEAD>\n\n", FileNameFromPath(FileRoot));
+ fprintf(tmpTitle, "<TITLE>%s</TITLE></HEAD>\n\n", FileNameFromPath(FileRoot));
}
// Output frame information
}
// Output frame information
fprintf(f,
"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
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"
"<meta name=\"GENERATOR\" content=\"tex2rtf\">\n"
"<!-- Sitemap 1.0 -->\n"
"</HEAD><BODY>\n"
fprintf(HTMLWorkshopContents,
"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\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"
"<meta name=\"GENERATOR\" content=\"tex2rtf\">\n"
"<!-- Sitemap 1.0 -->\n"
"</HEAD><BODY>\n"
bool winHelpContents = FALSE; // Generate .cnt file for WinHelp 4
bool htmlIndex = FALSE; // Generate .htx file for HTML
bool htmlFrameContents = FALSE; // Use frames for HTML contents page
bool winHelpContents = FALSE; // Generate .cnt file for WinHelp 4
bool htmlIndex = FALSE; // Generate .htx file for HTML
bool htmlFrameContents = FALSE; // Use frames for HTML contents page
+char *htmlStylesheet = NULL; // Use this CSS stylesheet for HTML pages
bool useHeadingStyles = TRUE; // Insert \s1, s2 etc.
bool useWord = TRUE; // Insert proper Word table of contents, etc etc
int contentsDepth = 4; // Depth of Word table of contents
bool useHeadingStyles = TRUE; // Insert \s1, s2 etc.
bool useWord = TRUE; // Insert proper Word table of contents, etc etc
int contentsDepth = 4; // Depth of Word table of contents
extern bool winHelpContents; // Generate .cnt file
extern bool htmlIndex; // Generate .htx HTML index file
extern bool htmlFrameContents; // Use frames for HTML contents page
extern bool winHelpContents; // Generate .cnt file
extern bool htmlIndex; // Generate .htx HTML index file
extern bool htmlFrameContents; // Use frames for HTML contents page
+extern char *htmlStylesheet; // Use this CSS stylesheet for HTML pages
extern int contentsDepth; // Depth of contents for linear RTF files
extern bool upperCaseNames; // Filenames; default is lower case
extern char *backgroundImageString; // HTML background image
extern int contentsDepth; // Depth of contents for linear RTF files
extern bool upperCaseNames; // Filenames; default is lower case
extern char *backgroundImageString; // HTML background image
htmlWorkshopFiles = StringTobool(settingValue);
else if (StringMatch(settingName, "htmlFrameContents", FALSE, TRUE))
htmlFrameContents = StringTobool(settingValue);
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))
else if (StringMatch(settingName, "upperCaseNames", FALSE, TRUE))
upperCaseNames = StringTobool(settingValue);
else if (StringMatch(settingName, "ignoreBadRefs", FALSE, TRUE))