6. Styling the documents

6.1. Meta.in

For every document, the file meta.in is read if it exists. Some common styling directives can be set here. For example:

 .set tableexpand no

will set the table expansion to "no" for every document where this meta.in is used.

An alternative meta file can be given as optional argument; the filename must start with meta so, for example, if you use metacomplete.in as meta file, you would call in3multipass with

in2multipass --metacomplete.in inputfile.in

The file given in the --meta flag replaces the standard meta.in. However, if this file does not exist, meta.in is used anyway and the flag is silently ignored.

For inputfile.in the file meta.inputfile.in is also read. This is in addition to the normal meta.in (or its replacement) and read after it.

6.2. Stylesheet.mm

For the GROFF output output, if a file stylesheet.mm is avaliable in the directory, it will be read before all other input to GROFF.

As an example: this set of documents have the following stylesheet:

 .nr Ej 1
 .ds HF  HB HB HI HI I I I
 .ds HP  16 12 12  0 0 0 0
 .nr Hb 4
 .nr Hs 1
 .nr Hps 0
 .ds pg*header '' in3 ''
 .ds pg*footer ''- \\nP -''

The styles set variables for the in.tmac macro set, which is derived largely from the original set for mm.

If you use configyour and there is a

 .NOHEAD

in stylesheet.css then groff is called with -rN=4 to spupress the header on the first page. The complete text is always made with -rN=4.

6.3. Stylesheet.css

The output of xml3html references a stylesheet.css wihich can be used to change the appearance of the web page. There are a number of in3-specific classes.

As an example of a stylesheet that makes the output relatively close to the pdf version is below.


 
 h1,h2,h3,h4,h5 {
     font-family:"arial";
 }
 .paragraph {
   text-align: justify;
   text-justify: inter-word;
   font-family: "Times New Roman", Times, serif;
 }
 table.table {
   margin-left: auto;
   margin-right: auto;
 }
 .table {
   font-family: "Times New Roman", Times, serif;
 }
 .list {
   font-family: "Times New Roman", Times, serif;
 }
 .lst{
   font-family: monospace;
 }
 pre {
   width: 90%;
   border: 1px solid black;
   padding: 10px;
   margin: 2px;
 }
 .leftnote {
   font-family: "Times New Roman", Times, serif;
 }
 .sidenote {
     width: 15%;
     font-size:small;
   font-family: "Times New Roman", Times, serif;
 }
 div.test {
   max-width: 45%;
   padding: 15px 15px 15px 50%;
   color: red;
 }
 
 .test p {
   font-family: Arial, sans-serif;
   line-height: 1.5;
   margin: 0;
   text-align: justify;
   font-size: 12px;
   text-indent: -30px;
 }