POV-Ray : Newsgroups : povray.general : Proposed tutorial format (hope this is in plain text). : Re: Proposed tutorial format (hope this is in plain text). Server Time
9 Aug 2024 01:20:46 EDT (-0400)
  Re: Proposed tutorial format (hope this is in plain text).  
From: Mike Williams
Date: 9 Sep 2000 02:10:39
Message: <uKcg$CAMiYu5Ewpt@econym.demon.co.uk>
Wasn't it Greg M. Johnson who wrote:

>Do I actually know _how_ to do a style sheet?  Never read that chapter of
>html for dummies.

It doesn't need to be very complicated. Something like this might be a
start:-


BODY { font-family: Arial,Helvetica,sans-serif;
       margin-left: 50px;
       margin-right: 50px;
     }
H3   { font-family: Tahoma,"Ariel Black",sans-serif;
       color: #FF2222;
       background-color: #FFFF00;
       text-align: center;
     }
A    { font-weight: bold }
CODE { color: #0000AA;
       font-size: 12pt;
     }


If you save that as "pretty.css" and replace the <blockquote> in your
original example with something like:-

<link rel="stylesheet" type="text/css" href="pretty.css">
</head>
<body bgcolor="#BBFFBB">


I suggest putting the margin settings into the BODY style, so that you
don't pick up any unwanted side effects that come with BLOCKQUOTE (e.g.
some browsers use italics for blockquotes).

The syntax of the css file should be reasonably obvious to somebody who
is used to handling POV script. A statement like
   H3   { color: #FF2222; }
applies the specified text colour to everything within <h3> - </h3>
tags. 

Distances can be specified in various units such as pixels (px), points
(pt), picas (pc), millimetres (mm), inches (in), or a percentage of what
the size would otherwise have been (%).

The FONT-FAMILY parameter has the special property that a series of
fonts can be specified. If the first font family is present in the
target environment, then that's what is used. If that font family is not
present, then the next one is used, etc. There are five magic "generic"
font names (serif, sans-serif, cursive, fantasy, monospace) that will
always be available, so it's a good idea to have one of those magic
words at the end of the parameter list.


It's also possible to define your own classes. Suppose we wanted any
glossary information in the tutorials to be distinctive, we could define
our own class of paragraph, and add

  P.GLOSSARY { border: 2px solid;       /* draw a box round it */
               background-color: #44FF44;
             }
to the style sheet, and place all the glossary text within 
<p class="glossary"> - </p> tags.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.