bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

makeinfo and CSS (was: @format and @display in HTML output)


From: Torsten Bronger
Subject: makeinfo and CSS (was: @format and @display in HTML output)
Date: Mon, 21 Apr 2003 06:42:32 +0200
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2

Halloechen!

address@hidden (Karl Berry) writes:

> [...]
>
> 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?

I think that the first two options are necessary and well named.
You can make the third option implicit: If a *reference* is given
the defaults are omitted.  So if the user wants to use their CSS'es
in an @import rule, they have to provide a complete set.  I see no
point in override the user's @import'ed definitions, especially
because makeinfo's default CSS may be changed or extended.

You could limit it to just the first option if you scan the given
file to find out whether it starts with an @import rule.  (It must
come first according to the scpecification, so you only have to skip
whitespace and comments for that.)  If it is present, omit the
defaults and include file contents as is.  If not, write out the
defaults and after them file contents.

> 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.

I couldn't find such a thing either.  I see four possibilities:

1. Leave it.

2. Use 'inherit' instead of 'serif'.

3. Omit all changes of the font-family, and use DIVs with
   div.display { white-space: pre }

4. As (3) but with <BR />s instead of the CSS rule.

(3) means that the browser must interpret the CSS rule, otherwise
you get undesired results.  (4) means that too long lines or too
narrow browser windows will produce undesired line breaks.

I don't know how good support for (2) is.  My Mozilla browser does
it nicely.  It is a serious alternative.

But if all else fails I think it's fair to say that makeinfo's
defauls style sheet sets a serif font as the default font.  If the
users wants to have something else, they must set it in own CSS
rules.  An additional "body { font-family: serif }" rule guarantees
that everything is consistent.

Tschoe,
Torsten.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]