Alex Fernandez wrote:
Hi,

On Wed, Jun 17, 2009 at 12:19 AM, Tim
Michelsen<timmichel...@gmx-topmail.de> wrote:
As example, by modifying line 5 of lyx.css from
   font: x-small serif;
to
   font: small sans-serif;

and then adding the line
   font-family: serif;
to ".formula", the text is more web-styled (i.e. it uses sans-serif fonts
(formulas stay in serif) and fonts are a little larger.
Yes,
This kind of modifications incorporate more screen-friendly display.

I have updated the CSS file in version 0.27 following Olivier's suggestions:
  http://www.nongnu.org/elyxer/

Actually, I think you could do even better (more challenges) ;-). I haven't touched CSS for years, so there might be innacuracies in the following ideas.

The LyX user can choose its font-family in the documents settings. I'm not sure, but I think it's in the .lyx at the line:

\font_default_family sfdefault

It would be nice if elyxer could somehow parse that. I see several ways to do so:

1- maintain 2-3 CSS (one for sans, one for serif, perhaps one for monospace) and link to the relevant one.

2- use a CSS with things in common and another one with just the differences (in this case, the font-family attribute of the body element).

3- use a CSS for the common stuff (i.e. do not specify the font-family in the body element), and have elyxer add to the head
  <style type="text/css">
  body {
    font-family: sans-serif;}
  </style>

with the font-family mentionned in the lyx file.

I think solution 3 is by far the most elegant one. And it work on FF3 and IE8.

It is then also possible to imagine elyxer parsing other attributes:
\paperfontsize 10
is most likely the line for the "base size", usually 10, 11 and 12 in the settings. That could help setting the base size (x-small, small, etc.) However, it might not be that good an idea...

What do you think ?

Best regards,

Olivier

PS: Of course, the .formula change should stay: equations never look good with a monospace or a sasn-serif font.


Please let me know if you like the changes:
  http://www.nongnu.org/elyxer/math.html

Thanks,

Alex.


Reply via email to