1html2psrc(5)           html2ps configuration file format          html2psrc(5)
2
3
4

NAME

6       html2psrc - configuration file format for html2ps(1)
7

DESCRIPTION

9       Configuration  files  are used for layout control, resource information
10       etc. Normally, there should always exist a global  configuration  file.
11       In  this  file one typically specify things like: what image conversion
12       packages are available on the  system,  the  default  paper  size,  the
13       default text fonts and sizes, etc.
14
15       For  Unix and Windows systems, the installation script 'install' can be
16       used to automatically build a global configuration file with all neces‐
17       sary  definitions,  and  install  all  files. The files replaced by the
18       installation are saved. If you for some reason are not  satisfied  with
19       the new version: execute the script 'backout' to reinstall your earlier
20       version.
21
22       On other systems, you will have to manually create a global  configura‐
23       tion  file,  and  insert  the name of this file into the html2ps script
24       (close to the beginning, the line starting with "$globrc=").  The  con‐
25       figuration  file  should contain a package block, and perhaps paper and
26       hyphenation blocks, described below.
27
28       Each user can then have  a  personal  configuration  file  (by  default
29       $HOME/.html2psrc)  that  complements/overrides  the definitions made in
30       the global file. It is also possible to specify  alternative  files  on
31       the command line, using the -f option.
32

FILE FORMAT

34       A  configuration  file  can  include other configuration files. This is
35       done with:
36
37          @import "filename";
38
39       The rest of the configuration file consists of zero or more blocks.   A
40       block  is  given  by a block name, followed by the block definition, as
41       in:
42
43          BODY {
44            font-size: 12pt;
45            font-family: Helvetica;
46            text-align: justify
47          }
48
49       The block definition, enclosed by curly braces: { }, consists  of  key-
50       value  pairs  and/or other blocks. A key-value pair consists of the key
51       name followed by a colon, followed by the value. Blocks  and  key-value
52       pairs are separated by semicolons. The semicolon may be omitted after a
53       block.
54
55       Several blocks can share the same definition. The block names are  then
56       separated be commas, as in:
57
58          H2, H4, H6 { font-style: italic }
59
60       A  comment  in a configuration file starts with the characters "/*" and
61       ends with "*/":
62
63          @html2ps {
64            seq-number: 1;  /* Automatic numbering of headings */
65          }
66
67       Notations
68
69       Here are some definitions of terms used below:
70
71              Flag:  A value of either 0 (absence, inactive etc) or  1  (pres‐
72                     ence, active etc).
73              Absolute size:
74                     A real number optionally followed by one of the following
75                     two-letter unit identifiers: cm (centimeters),  mm  (mil‐
76                     limeters),  in (inches), pt (points, 1pt = 1/72 inch), pc
77                     (picas, 1pc = 12pt). The default unit is centimeters.
78              Relative size:
79                     A size relative to current fontsize. The default and cur‐
80                     rently only recognized unit is em. One em equals the size
81                     of the current font.  The value should be given as a real
82                     number, optionally followed by 'em', as in '0.25em'.
83              Whitespace:
84                     Any  one  of the characters: space, tab, newline, or car‐
85                     riage return.
86
87       CSS2 blocks
88
89       All blocks, except one: the @html2ps block, coincides with a subset  of
90       the    Cascading    Style    Sheets,   level   2   CSS2   Specification
91       (http://www.w3.org/TR/REC-CSS2/).  The following default  settings  for
92       html2ps  illustrate  just  about  everything that currently can be used
93       from the CSS2 specification:
94
95          BODY {
96            font-family: Times;
97            font-size: 11pt;
98            text-align: left;
99            background: white;
100          }
101
102          H1, H2, H3, H4, H5, H6 {
103            font-weight: bold;
104            margin-top: 0.8em;
105            margin-bottom: 0.5em;
106          }
107          H1 { font-size: 19pt }
108          H2 { font-size: 17pt }
109          H3 { font-size: 15pt }
110          H4 { font-size: 13pt }
111          H5 { font-size: 12pt }
112          H6 { font-size: 11pt }
113
114          P, OL, UL, DL, BLOCKQUOTE, PRE {
115            margin-top: 1em;
116            margin-bottom: 1em;
117          }
118
119          P {
120            line-height: 1.2em;
121            text-indent: 0;
122          }
123
124          OL, UL, DD { margin-left: 2em }
125
126          TT, KBD, PRE { font-family: Courier }
127
128          PRE { font-size: 9pt }
129
130          BLOCKQUOTE {
131            margin-left: 1em;
132            margin-right: 1em;
133          }
134
135          ADDRESS {
136            margin-top: 0.5em;
137            margin-bottom: 0.5em;
138          }
139
140          TABLE {
141            margin-top: 1.3em;
142            margin-bottom: 1em;
143          }
144
145          DIV.noprint { display: none }
146
147          DEL { text-decoration: line-through }
148
149          A:link, HR { color: black }
150
151          @page {
152            margin-left: 2.5cm;
153            margin-right: 2.5cm;
154            margin-top: 3cm;
155            margin-bottom: 3cm;
156          }
157
158       The program specific block @html2ps:
159
160       This block is used to specify parameters that are specific to  html2ps,
161       and not covered by CSS2. The @html2ps  block has several sub-blocks and
162       key-value pairs, these are described in this section.
163
164       The package block
165            This block is used to specify which program packages are installed
166            on the system. Typically, this is done in the global configuration
167            file.
168
169            PerlMagick
170                   A flag specifying whether the  Perl  module  PerlMagick  is
171                   installed or not. The default is 0.
172
173            ImageMagick
174                   A  flag  specifying  whether  the  ImageMagick  package  is
175                   installed or not. The default is 0.
176
177            pbmplus
178                   A flag specifying whether the pbmplus package is  installed
179                   or not. The default is 0.
180
181            netpbm A  flag  specifying whether the netpbm package is installed
182                   or not. The default is 0.
183
184            djpeg  A flag specifying whether djpeg is installed or  not.   The
185                   default is 0.
186
187            Ghostscript
188                   A  flag specifying whether Ghostscript is installed or not.
189                   The default is 0.
190
191            TeX    A flag specifying whether the TeX package is  installed  or
192                   not.  The default is 0.
193
194            dvips  A  flag  specifying whether dvips is installed or not.  The
195                   default is 0.
196
197            libwww-perl
198                   A flag specifying whether the Perl module  library  libwww-
199                   perl is installed or not. The default is 0.
200
201            geturl When  neither  of  the  Perl packages for retrieving remote
202                   documents are available, it is possible to use  some  other
203                   program  like  wget  or lynx. This value should be set to a
204                   command that retrieves a  document  with  a  complete  MIME
205                   header,   such  as  "wget  -s  -q  -O-"  or  "lynx  -source
206                   -mime_header".
207
208            check  The name of a program used for syntax checking  HTML  docu‐
209                   ments.  No default, a good choice is weblint.
210
211            path   A colon separated list of directories where the executables
212                   from the program packages are.  It  is  only  necessary  to
213                   include  directories that are not in the PATH for a typical
214                   user.
215
216       The paper block
217            The paper size is defined in this block. The size  can  either  be
218            given  as  one of the recognized paper types or by giving explicit
219            values for the paper height and width. As of  version  1.0  beta2,
220            one  can  also use the @page block in CSS2 for the paper size. The
221            paper block is kept for backwards compatibility.   Also,  one  can
222            only  specify explicit dimensions in @page, not any paper types by
223            name.
224
225            type   Paper  type,  possible  choices  are:  A0,  A1,   A2,   A3,
226                   A4,...,A10,  B0,  B1,...,B10,  letter, legal, arche, archd,
227                   archc, archb, archa, flsa,  flse,  halfletter,  11x17,  and
228                   ledger  (this  set  of  paper  types  is taken from Aladdin
229                   Ghostscript). The default is A4.
230
231            height An absolute size specifying the paper height.
232
233            width  An absolute size specifying the paper width.
234
235       The option block
236            This block is used to set default  values  for  the  command  line
237            options.  The  key  in  the  key-value pair is the option name, in
238            either its long or short form.
239
240            twoup  Two column (2-up) output. The default  is  one  column  per
241                   page.
242
243            base   Use URL as a base to expand relative references for in-line
244                   images. This is useful if you have downloaded a document to
245                   a local file.  The URL should then be the URL of the origi‐
246                   nal document.
247
248            check  Check the syntax of the HTML file (using an external syntax
249                   checker). The default is to not make a syntax check.
250
251            toc    Generate  a  table of contents (ToC). The value should be a
252                   string consisting of one of the letters 'f', 'h',  or  't',
253                   optionally combined with the letter 'b':
254
255                   b      The  ToC  will  be printed first. This requires that
256                          Ghostscript is installed.
257                   f      The ToC will be generated from the links in the con‐
258                          verted document.
259                   h      The  ToC  will be generated from headings and titles
260                          in the converted documents. Note that if  the  docu‐
261                          ment  author  for  some strange reason has chosen to
262                          use some other means to represent the headings  than
263                          the HTML elements H1,...,H6, you are out of luck!
264                   t      The  ToC  will  be  generated  from links having the
265                          attribute rev=TOC in the converted document.
266
267            debug  Generate debugging information. You should always use  this
268                   option when reporting problems with html2ps.
269
270            DSC    Generate  DSC  compliant  PostScript.  This requires Ghost‐
271                   script and can take quite some time  to  do.  Note  that  a
272                   PostScript  file  generated with this option cannot be used
273                   as input to html2ps for reformatting later.
274
275            encoding
276                   The document  encoding.  Currently  recognized  values  are
277                   ISO-8859-1,  EUC-JP, SHIFT-JIS, and ISO-2022-JP (other EUC-
278                   xx encodings may also work). The default is ISO-8859-1.
279
280            rcfile A colon separated list of configuration file names  to  use
281                   instead   of   the   default  personal  configuration  file
282                   $HOME/.html2psrc.  Definitions made in  one  file  override
283                   definitions  in  previous  files (the last file in the list
284                   has highest precedence). An empty file name (as in ':file',
285                   'file1::file3', or 'file:') will expand to the default per‐
286                   sonal file. The environment variable HTML2PSPATH is used to
287                   specify  the  directories  where to search for these files.
288                   (Note: this is only supposed to  be  used  on  the  command
289                   line, not in a configuration file.)
290
291            frame  Draw  a  frame around the text on each page. The default is
292                   to not draw a frame.
293
294            grayscale
295                   Convert colour images to grayscale images.  Note  that  the
296                   PostScript  file  will  be smaller when the images are con‐
297                   verted to grayscale. The  default  is  to  generate  colour
298                   images.
299
300            help   Show usage information.
301
302            hyphenate
303                   Hyphenate  the  text. This requires TeX hyphenation pattern
304                   files.
305
306            scaleimage
307                   Scale in-line images with a factor num.  The default is 1.
308
309            cookie Enable cookie support, using a  netscape  formatted  cookie
310                   file (requires libwww-perl).
311
312            language
313                   Specifies  the language of the document (overrides an even‐
314                   tual LANG attribute of the  BODY  element).   The  language
315                   should      be      given      according     to     RFC1766
316                   (ftp://ftp.nordu.net/rfc/rfc1766.txt)    and    ISO     639
317                   (http://www.w3.org/WAI/ER/IG/ert/iso639.htm).
318
319            landscape
320                   Generate  code  for printing in landscape mode. The default
321                   is portrait mode.
322
323            scalemath
324                   Scale mathematical formulas with a factor num.  The default
325                   is 1.
326
327            mainchapter
328                   Specifies the start number for automatic numbering of head‐
329                   ings (by setting the seq-number parameter), the default  is
330                   1.
331
332            number Insert  page  numbers.  The  default  is  to not number the
333                   pages.
334
335            startno
336                   Specifies the starting page number, the default is 1.
337
338            output Write the PostScript code to file. The default is to  write
339                   to standard output.
340
341            original
342                   Use  PostScript original images if they exist. For example,
343                   if a document contains an image figure.gif, and an encapsu‐
344                   lated  PostScript  file  named figure.ps exists in the same
345                   directory, that file will be use instead.  This  only  work
346                   for  documents read as local files. Note: if the PostScript
347                   file is large or contains bitmap images, this must be  com‐
348                   bined  with the -D option. In HTML 4.0 this can be achieved
349                   in a much better way with:
350
351               <OBJECT data="figure.ps" type="application/postscript">
352                <OBJECT data="figure.gif" type="image/gif">
353                 <PRE>[Maybe some ASCII art for text browsers]</PRE>
354                </OBJECT>
355               </OBJECT>
356
357            rootdir
358                   When a document is read from a local file, this value spec‐
359                   ifies  a base directory for resolving relative links start‐
360                   ing with "/".  Typically,  this  should  be  the  directory
361                   where your web server's home page resides.
362
363            xref   Insert  cross references at every link to within the set of
364                   converted documents.
365
366            scaledoc
367                   Scale the entire document with a factor num.   The  default
368                   is 1.
369
370            style  This  option  complements/overrides definitions made in the
371                   configuration files. The string must follow the  configura‐
372                   tion  file  syntax. (Note: this is only supposed to be used
373                   on the command line, not in a configuration file.)
374
375            titlepage
376                   Generate a title page. The default is to not generate one.
377
378            text   Text mode, ignore images. The default  is  to  include  the
379                   images.
380
381            underline
382                   Underline  text  that  constitutes  a  hypertext  link. The
383                   default is to not underline.
384
385            colour Produce colour output for text and background, when  speci‐
386                   fied.   The  default  is  black  text  on  white background
387                   (mnemonic: coloUr ;-).
388
389            version
390                   Print information about the current version of html2ps.
391
392            web    Process a web of documents by recursively retrieve and con‐
393                   vert  documents  that  are referenced with hyperlinks. When
394                   dealing with remote documents it will of course  be  neces‐
395                   sary  to  impose  restrictions,  to  avoid  downloading the
396                   entire web... The value should be a  string  consisting  of
397                   one  of  the letters 'a', 'b', 'l', 'r', or 's', optionally
398                   combined with a combination of the letters 'p', 'L', and  a
399                   positive integer:
400
401                   a      Follow all links.
402                   b      Follow  only  links to within the same directory, or
403                          below, as the start document.
404                   l      Follow only links specified with  "<LINK  rel=NEXT>"
405                          in the document.
406                   p      Prompt  for  each  remote  document.  This mode will
407                          automatically be entered after the  first  50  docu‐
408                          ments.
409                   r      Follow only relative links.
410                   s      Follow  only  links to within the same server as the
411                          start document.
412                   L      With this option, the order in which  the  documents
413                          are  processed  will  be:  first all top level docu‐
414                          ments, then the documents linked to from these  etc.
415                          For example, if the document A has links to B and C,
416                          and B has a link to D, the order  will  be  A-B-C-D.
417                          By  default,  each  document will be followed by the
418                          first document it links to etc; so the default order
419                          for the example is A-B-D-C.
420                   #      A  positive  integer  giving the number of recursive
421                          levels.  The  default  is  4  (when  the  option  is
422                          present).
423
424            duplex Generate  postscript code for single or double sided print‐
425                   ing.  No default, valid values are:
426
427                   0      Single sided.
428                   1      Double sided.
429                   2      Double sided, opposite page reversed (tumble mode).
430
431       The margin block
432            This block is used to specify page margins. The left,  right,  top
433            and bottom margins, previously defined with this block, should now
434            be defined using the @page construction from CSS2.
435
436            middle An absolute size for the distance between the columns  when
437                   printing two columns per page, default is 2cm.
438
439       The xref block
440            At  every  hyperlink (to within the set of converted documents) it
441            is possible to have a cross reference inserted. The xref block  is
442            used to control this function.
443
444            text   This  defines  the cross reference text to be inserted; the
445                   symbol $N will expand to the page number,  default  is  "[p
446                   $N]".
447
448            passes The  number  of passes used to insert the cross references.
449                   Normally, only one pass is run. But since the insertion  of
450                   the  page  numbers may effect the page breaks, it might for
451                   large documents with many links be necessary with more than
452                   one  pass to get the cross references right. The default is
453                   1.
454
455       The quote block
456            Language specific quotation  marks  are  defined  in  this  block.
457            These  quotation  marks  are used with the HTML 4.01 element Q for
458            short quotations. Quotation marks are predefined for  a  few  lan‐
459            guages  (English,  Swedish,  Danish,  Norwegian  (also Nynorsk and
460            Bokmål), Finnish, Spanish, French, German and Italian). It is pos‐
461            sible  to  define  different  quotation  marks  for  quotes within
462            quotes.
463
464            A quotation mark is defined as a string, using the  same  encoding
465            as the converted document (normally ISO-8859-1), and/or with char‐
466            acter entities.  Note that quotation mark characters  for  several
467            languages  are not included in ISO-8859-1, and their corresponding
468            character entities were not been defined prior to HTML 4.0.
469
470            Quotation marks for a language can be defined explicitly in a sub-
471            block  of the quote block. One can also identify the set of quota‐
472            tion marks with another previously defined language, using a  key-
473            value pair.  The sub-block/key name should equal the language code
474            as defined in ISO 639. The language sub-block can have the follow‐
475            ing key-values:
476
477                   open   The quote opening character(s).
478                   close  The  quote  closing  character(s).  If undefined, it
479                          will equal open.
480                   open2  The quote opening  character(s)  for  quotes  within
481                          quotes. If undefined, it will equal open.
482                   close2 The  quote  closing  character(s)  for quotes within
483                          quotes. If undefined, it will equal close.
484
485            Example: English and Spanish use the same set of quotation marks -
486            at  least according to my book on typography. These (already known
487            to html2ps) are defined with:
488
489               quote {
490                 en {
491                   open: "&ldquo;";
492                   close: "&rdquo;";
493                   open2: "`";
494                   close2: "'";
495                 }
496                 es: en;
497               }
498
499       The toc block
500            When a table of contents (ToC) is generated from document headings
501            and titles, the appearance is controlled by this block.
502
503            heading
504                   A  string  with  HTML code specifying a heading used on the
505                   first ToC page.
506
507            level  The maximum heading level used for building  the  ToC.  The
508                   default  is  6, which means that all headings will generate
509                   ToC entries.
510
511            indent The ToC entries are indented  proportional  to  the  corre‐
512                   sponding  heading  level.  This value specifies the size of
513                   the indentation.  The default is 1em.
514
515       The titlepage block
516            When a title page is generated, its appearance  is  controlled  by
517            this block.
518
519            content
520                   A  string  with  HTML code specifying a heading used on the
521                   title   page,   The   default   is   "<DIV    align=center>
522                   <H1><BIG>$T</BIG></H1> <H2>$[author]</H2></DIV>".
523
524            margin-top
525                   The  size  of the top margin on the title page, The default
526                   is 4cm.
527
528       The font block
529            Currently,  html2ps  recognizes  the  fonts:  Times,  New-Century-
530            Schoolbook,  Helvetica,  Helvetica-Narrow,  Palatino,  Avantgarde,
531            Bookman, and Courier. To add a new font (family),  choose  a  name
532            (consisting  of letters, digits, hyphens, and underscores) for the
533            font. Then define a sub-block to the font  block,  with  the  same
534            name as the chosen font name. This block can contain two key-value
535            pairs:
536
537                   names  A string containing four PostScript font names, sep‐
538                          arated  by  whitespace,  corresponding  to  the font
539                          styles normal, italic,  bold,  and  bold-italic.  If
540                          less  than  four  names are given, the first is used
541                          for the missing names.  Note  that  PostScript  font
542                          names are case sensitive.
543                   files  A  string  of  four  file names, separated by white‐
544                          space, for files containing font definitions for the
545                          four font styles as specified above.
546
547            Example: A font 'myfont' has its four font styles defined in local
548            files.  To use this font in all tables in the converted documents,
549            one can use something like:
550
551               TABLE { font-family: myfont }
552
553               @html2ps {
554                 font {
555                   myfont {
556                     names:  "MyFont-Roman  MyFont-Italic  MyFont-Bold MyFont-
557                     BoldItalic";
558                     files:   "/x/y/myfr.pfa    /x/y/myfi.pfa    /x/y/myfb.pfa
559                     /x/y/myfbi.pfa";
560                   }
561                 }
562               }
563
564       The hyphenation block
565            Hyphenation pattern files for different languages are specified in
566            sub-blocks within this block. The blocks names  should  equal  the
567            language  code  as  defined  in ISO 639. These language blocks can
568            contain the following two key-values:
569
570                   file   A hyphenation pattern file in TeX  format  for  this
571                          language.
572                   extfile
573                          A  file  containing a list of hyphenation exceptions
574                          for this language.  The exception file  should  con‐
575                          tain  words,  separated by whitespaces, with hyphens
576                          inserted where hyphenation is allowed, as  in:  "in-
577                          fra-struc-ture white-space".
578
579            For  example, for English (with language code 'en') one can have a
580            block like:
581
582                   en {
583                     file: "/opt/tex/lib/macros/hyphen.tex";
584                     extfile: "/opt/tdb/lib/html2ps/enhyphext";
585                   }
586
587            The hyphenation block itself can furthermore have  these  key-val‐
588            ues:
589
590            min    A positive integer defining the minimum number of letters a
591                   word must contain to make it a candidate  for  hyphenation.
592                   The default is 8.
593
594            start  A  positive  integer defining the minimum number of letters
595                   that must precede the hyphen when  a  word  is  hyphenated.
596                   The default is 4.
597
598            end    A  positive  integer defining the minimum number of letters
599                   that must follow the hyphen when a word is hyphenated.  The
600                   default is 3.
601
602       The header block
603            This  block  is  used  to  specify page headers. It is possible to
604            define left, center, and right headers. Different headers for  odd
605            and  even  pages  can  be specified. Some symbols can be used that
606            will expand to document title, author, date etc. See below.
607
608            left   A left aligned header. If the alternate flag in this  block
609                   is set to 1, this will be the right header on even pages.
610
611            center A centered header.
612
613            right  A right aligned header. If the alternate flag in this block
614                   is set to 1, this will be the left header on even pages.
615
616            odd-left
617                   A left aligned header on odd pages.
618
619            odd-center
620                   A centered header on odd pages.
621
622            odd-right
623                   A right aligned header on odd pages.
624
625            even-left
626                   A left aligned header on even pages.
627
628            even-center
629                   A centered header on even pages.
630
631            even-right
632                   A right aligned header on even pages.
633
634            font-family
635                   The font used for the header, default is Helvetica.
636
637            font-size
638                   The font size for the header, default is 8pt.
639
640            font-style
641                   The default is "normal".
642
643            font-weight
644                   The default is "normal".
645
646            color  The header color, default is black.
647
648            alternate
649                   A flag indicating whether the headers given by the left and
650                   right  keys  should  change  place on even pages. Typically
651                   used for double sided printing.  The default is 1.
652
653       The footer block
654            This block is used to specify page  footers.  It  is  possible  to
655            define  left, center, and right footers. Different footers for odd
656            and even pages can be specified. Some symbols  can  be  used  that
657            will expand to document title, author, date etc. See below.
658
659            left   A  left aligned footer. If the alternate flag in this block
660                   is set to 1, this will be the right footer on even pages.
661
662            center A centered footer.
663
664            right  A right aligned footer. If the alternate flag in this block
665                   is set to 1, this will be the left footer on even pages.
666
667            odd-left
668                   A left aligned footer on odd pages.
669
670            odd-center
671                   A centered footer on odd pages.
672
673            odd-right
674                   A right aligned footer on odd pages.
675
676            even-left
677                   A left aligned footer on even pages.
678
679            even-center
680                   A centered footer on even pages.
681
682            even-right
683                   A right aligned footer on even pages.
684
685            font-family
686                   The font used for the footer, default is Helvetica.
687
688            font-size
689                   The font size for the footer, default is 8pt.
690
691            font-style
692                   The default is "normal".
693
694            font-weight
695                   The default is "normal".
696
697            color  The footer color, default is black.
698
699            alternate
700                   A flag indicating whether the footers given by the left and
701                   right keys should change place  on  even  pages.  Typically
702                   used for double sided printing.  The default is 1.
703
704       The frame block
705            The  appearance of the optional frame (drawn on each page) is con‐
706            trolled by this block.
707
708            width  The width of the frame, default is 0.6pt.
709
710            margin The size of the frame margin, default is 0.5cm.
711
712            color  The colour of the frame, default is black.
713
714       The justify block
715            This block specifies the maximum amount of  extra  space  inserted
716            between words and letters when text justification is in effect.
717
718            word   Maximum  amount of extra space inserted between words.  The
719                   default is 15pt.
720
721            letter Maximum amount of  extra  space  inserted  between  letters
722                   within words. The default is 0pt.
723
724       The draft block
725            It  is  possible  to have some text written in a large font diago‐
726            nally across each page. Typically this is a  word,  written  in  a
727            very light colour, indicating that the document is a draft.
728
729            text   The text to be printed, default is "DRAFT".
730
731            print  A  flag specifying whether the draft text should be printed
732                   or not.  If unspecified, the draft text is printed when the
733                   document    head    contains   <META   name="Status"   con‐
734                   tent="Draft">.
735
736            dir    Specifies print direction, 0=downwards, 1=upwards.
737
738            font-family
739                   The default is Helvetica.
740
741            font-style
742                   The default is "normal".
743
744            font-weight
745                   The default is "bold".
746
747            color  The default is "F0F0F0".
748
749       The colour block
750            The 16 standard colour names from HTML 4.01 (although their use in
751            HTML  elements are now deprecated) are recognized by html2ps.  Use
752            this block to extend this list of colours. This is done with  key-
753            value  pairs,  where  the key is the colour name, and the value is
754            the colour given as a hexadecimal RGB value, for example:  "brown:
755            A52A2A;".
756       Key-value pairs in the @html2ps block
757
758       html2psrc
759              The  name  of  the  default  personal  configuration  file.  The
760              default is $HOME/.html2psrc.
761
762       imgalt Specifies which text should be written as a replacement for  in-
763              line  images  when  the  IMG  element has no ALT attribute.  The
764              default is "[IMAGE]".
765
766       datefmt
767              The symbol $D can be used in page headers and footers to  insert
768              the  current  date/time;  the value of the datefmt key specifies
769              the format used. The syntax is the same as  in  the  strftime(3)
770              routine.  The  default  is  "%e  %b  %Y  %R", which gives a date
771              string like "10 Dec 2005  18:29".
772
773       locale The locale (language code) used for formating language dependent
774              parts  of the date/time in datefmt. If unspecified, the value is
775              taken from environment variables, see setlocale(3). No default.
776
777       doc-sep
778              A string of HTML code that will be inserted  between  the  docu‐
779              ments when more than one are converted. The default is "<!--New‐
780              Page-->", which will cause a page break. You  may  use  (almost)
781              any HTML code, for example "<HR><HR>" or "<IMG src=...>".
782
783       ball-radius
784              The  radius,  given  as  a  relative  size, of the balls used in
785              unordered lists. The default is 0.25em.
786
787       numbstyle
788              Page numbering style, 0=arabic, 1=roman. The default is 0.
789
790       showurl
791              When this flag is set to 1, the URL for external links are shown
792              within parentheses after the link. The default is 0.
793
794       seq-number
795              When  this  flag  is  set,  the headings in the document will be
796              sequentially numbered: H1 headings will be numbered 1, 2,..., H2
797              headings  1.1,  1.2,  etc.  The  starting  number  for H1 can be
798              changed using the -M (--mainchapter) option. The default is 0.
799
800       extrapage
801              A flag specifying  whether  an  extra  (empty)  page  should  be
802              printed,  when necessary, to ensure that the title page, the ta‐
803              ble of contents, and the  document  itself  will  start  on  odd
804              pages.  This  is  typically desirable for double sided printing.
805              The default is 1.
806
807       break-table
808              A flag specifying if a table should be broken across  two  pages
809              when  it does not fit on the current page, but it does on a page
810              of its own.  The default is 0 (avoid breaking tables when possi‐
811              ble).
812
813       forms  This  flag is used to specify whether FORM elements in the docu‐
814              ment should be processed or ignored. Some forms may be  suitable
815              for printing out and be filled out (with a pen), others are not.
816              The default is 1.
817
818       textarea-data
819              When a TEXTAREA element contains prefilled data, the  text  will
820              be  used  as  labels if this flag is set, otherwise ignored. The
821              default is 0.
822
823       page-break
824              Set this flag to 0 to suppress the normal behavior of generating
825              page  breaks  from  the comment <!--NewPage--> etc, as specified
826              below. The default is 1.
827
828       expand-acronyms
829              A flag specifying whether acronyms, given by  the  ACRONYM  ele‐
830              ment, should be expanded or not. The default is 0.
831
832       spoof  Some  web  servers return different documents depending on which
833              user agent is used to retrieve the document. You  can  fool  the
834              web server that a certain browser is used, by setting this value
835              to  the  identification   used   by   the   browser,   such   as
836              "Mozilla/4.0".  This only works if you are using one of the Perl
837              packages to retrieve remote documents.
838
839       ssi    When this flag is set, some Server Side Includes  will  be  pro‐
840              cessed when the document is read from a local file. Examples are
841              <!--#include    file=...>,    <!--#echo    var="LAST_MODIFIED">,
842              <!--#config timefmt=...>. The default is 1.
843
844       prefilled
845              This  flag  controls whether the content of form elements should
846              be rendered or not. That is, when this flag is set, the  content
847              of  TEXTAREA  elements,  and the value of the value attribute of
848              text INPUT elements will be shown. Also, checked  radio  buttons
849              and checkboxes will be marked.  The default is 0.
850

SYMBOLS

852       The  following  symbols  can  be used on the title page, the page head‐
853       ers/footers, and in the heading for the table of contents:
854
855       Symbols of the form "$[name]" will expand to the value of  the  content
856       attribute of META elements, having either of the attributes "name=name"
857       or "http-equiv=name" (case insensitive string matching).  For  example,
858       when a document containing:
859
860          <META name="expires" content="31 Dec 2006">
861
862       is converted, using a configuration file with:
863
864          footer { left: "Expires: $[expires]" }
865
866       this left footer will be inserted:
867
868          Expires: 31 Dec 2006
869
870       In addition, these symbols are defined:
871
872              $T     Current document title.
873              $A     Author  of  current  document,  as  specified  with <META
874                     name="Author" content="..."> in the document head.
875              $U     The URL, or file name, of current document.
876              $N     Page number.
877              $H     Current document heading (level 1-3).
878              $D     Current date/time. The format is  given  by  the  datefmt
879                     key.
880
881       So $A is equivalent to $[author], but kept for backwards compatibility.
882
883       To avoid symbol expansion, precede the dollar sign with a backslash, as
884       in "\$T".
885

HINTS

887       I imagine that a typical use of configuration files  can  be  something
888       along the following lines.
889
890       System  specific  definitions  (e.g. specification of available program
891       packages) and global defaults (paper  type  etc)  are  defined  in  the
892       global configuration file.
893
894       If  there is more than one user of the program on the system, each user
895       can also have a personal configuration file with his/hers own  personal
896       preferences.   (On a single user system one can use the global configu‐
897       ration file for this purpose as well.)
898
899       One may also develop a collection of configuration  files  for  typical
900       situations.  These  files are placed in a directory that is searched by
901       html2ps (the search path  is  defined  with  the  environment  variable
902       HTML2PSPATH).   For  example,  to print a document as slides - in land‐
903       scape mode, with large text in Helvetica, and a thick frame -  one  can
904       create a configuration file, called 'slides' say, containing:
905
906          @html2ps {
907            option {
908              landscape: 1;
909              frame: 1;
910            }
911            frame { width: 3pt }
912          }
913          BODY {
914            font-family: Helvetica;
915            font-size: 20pt;
916          }
917          H1 { font-size: 35pt }
918          H2 { font-size: 32pt }
919          H3 { font-size: 29pt }
920          H4 { font-size: 26pt }
921          H5 { font-size: 23pt }
922          H6 { font-size: 20pt }
923          PRE { font-size: 18pt }
924
925       Then use the command:
926
927          html2ps -f slides ...
928
929       to  convert the document. Note that with this command the file 'slides'
930       is used instead of the personal configuration file. If you want both to
931       be  used,  giving  precedence to definitions made in the file 'slides',
932       use the command:
933
934          html2ps -f :slides ...
935
936       (The page breaks between the slides can for  example  be  generated  by
937       adding '<HR class=PAGE-BREAK>' to the HTML document.)
938
939       For  features that are frequently turned on and off, and that cannot be
940       controlled by command line options, it may be a  good  idea  to  create
941       small configuration files as "building blocks". For example a file 'A4'
942       for printing on A4 paper (if you have some other default paper type):
943
944          @html2ps { paper { type: A4 } }
945
946       and a file 'hnum' for automatic numbering of headings:
947
948          @html2ps { seq-number: 1 }
949
950       Combining this with the previous example: to  convert  a  document  for
951       printing  on  A4  sized slides with all headings numbered, use the com‐
952       mand:
953
954          html2ps -f :slides:A4:hnum ...
955

SEE ALSO

957       html2ps(1), setlocale(3), strftime(3)
958

VERSION

960       This manpage describes html2ps version 1.0 beta5.
961

AVAILABILITY

963       http://user.it.uu.se/~jan/html2ps.html
964

AUTHOR

966       Jan Karrman (jan@it.uu.se)
967
968
969
970
971Autogenerated                     10 Dec 2005                     html2psrc(5)
Impressum