[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: @format and @display in HTML output
From: |
Karl Berry |
Subject: |
Re: @format and @display in HTML output |
Date: |
Sun, 20 Apr 2003 21:02:32 -0400 |
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
pre.format { font-family: serif }
</style>
Thanks for the suggestion. I added font-size:smaller to the small* envs
for the heck of it.
I didn't (yet) implement the external css-include that you suggested.
For one thing, I wondered if people might not want to specify their own
css file which would be included as an @import or a <link>, instead of
physically including the style definitions. But then another option is
needed to eradicate the defaults output here, if that's desired, since
(as far as I can tell) there's no way to override them from an external
file. So we'd come down to several new options:
--css-include=FILE include contents of FILE after the built-indefinitions
--css-reference=URL put @import(URL) after the <style> tag
--css-omit-defaults do not include the built-in definitions
This seems like a lot of options. Is there a cleaner way?
BTW, the `serif' here seems wrong. What it should really be is the
"default" font for the document, e.g., if someone uses sans serif by
default. Is there such a value for font-family? I couldn't find it.
Thanks,
karl
*** html.c.~1.9.~ Tue Feb 11 08:39:06 2003
--- html.c Sun Apr 20 14:48:42 2003
***************
*** 73,78 ****
--- 73,96 ----
insert_string ("-->\n");
}
+ /* Put the style definitions in a comment for the sake of browsers
+ that don't support <style>. */
+ add_word ("<meta http-equiv=\"Content-Style-Type\"
content=\"text/css\">\n");
+ add_word ("<style type=\"text/css\"><!--\n");
+ /* This seems cleaner than adding <br>'s at the end of each line.
+ It's not exactly the end of the world if the browser doesn't do
+ <style>s, either; they'll just come out in typewriter. */
+ add_word (" pre.display { font-family: serif }\n");
+ add_word (" pre.format { font-family: serif }\n");
+
+ /* Alternatively, we could do <font size=-1> in insertion.c, but this
+ way makes it easier to override. */
+ add_word (" pre.smalldisplay { font-size: smaller; font-family: serif
}\n");
+ add_word (" pre.smallformat { font-size: smaller; font-family: serif
}\n");
+ add_word (" pre.smallexample { font-size: smaller }\n");
+ add_word (" pre.smalllisp { font-size: smaller }\n");
+ add_word ("--></style>\n");
+
add_word ("</head>\n<body>\n");
if (title && !html_title_written && titlepage_cmd_present)
- Re: @format and @display in HTML output, (continued)