1html2textrc(5)                File Formats Manual               html2textrc(5)
2
3
4

NAME

6       html2textrc - formatting properties file for html2text(1)
7

SYNOPSIS

9       Key [ = | : ] Value
10

DESCRIPTION

12       The  html2textrc(5) file defines a set of formatting properties used by
13       the html2text(1) utility, that overrides the program's built-in format‐
14       ting  defaults.   Each line of the html2textrc(5) file is either a for‐
15       matting property or a comment.
16
17       Lines with a leading "#" or "!" (i.e. the first non-space character  is
18       a "#" or a "!")  and blank lines (i.e. a line consisting only of white-
19       space characters), are considered  comments  and  ignored.   Everything
20       else  is  literary  interpreted by the parser as a formatting property,
21       where a string-type property value may also be  empty  (unsets  default
22       value).   Both, the property key and the property value, may contain C-
23       style escape sequences to mask meta characters.
24
25       A property definition line consists of:
26
27       (1)    Optional leading space,
28
29       (2)    the property key (a sequence of non-space characters except  "="
30              and ":") as described below,
31
32       (3)    an optional space,
33
34       (4)    an optional "=" or ":",
35
36       (5)    optional space,
37
38       (6)    the property value as described below.
39              Everything up to the next newline is interpreted literary as the
40              value of the specified element. Literary  meant  leading  white-
41              space  must be quoted with backslashes (i.e. "\ "). Be aware not
42              to include unwanted trailing white-space characters.
43

OPTIONS

45       The following is the list of valid formatting properties, together with
46       their default values. If the -style command line option of html2text(1)
47       is used, different default values apply.
48
49       Curly braces indicate alternatives, e.g.  {A B}C stands for AC or BC.
50
51       DOCUMENT.{vspace.{before after} indent.{left right}} = 0
52              Specifies how many blank lines are inserted  before  and  after,
53              and  how  many blank columns are inserted to the left and to the
54              right of the formatted document.  (Numeric.)
55
56       BODY.{vspace.{before after} indent.{left right}} = 0
57              Same for the document body. (Since the  document  body  is  cur‐
58              rently  the only document part that is rendered, it is virtually
59              the same whether you specifiy DOCUMENT or BODY).  (Numeric.)
60
61       {OL UL DIR MENU DL}.vspace.{before between after} = 0
62              Specifies how many blank  lines  are  inserted  before  a  list,
63              between   the   individual  list  items,  and  after  the  list.
64              (Numeric.)
65
66       {OL UL DIR MENU}.indents = 6
67              Specifies by how deep list items are indented. If an item bullet
68              would  not  fit  into the space created by the indentation, then
69              the indentation is automatically increased such that the  bullet
70              fits  in  (relevant for relatively wide bullets, e.g. roman num‐
71              bers).   If N blank-separated integers are specified instead  of
72              one,  then  the  first  N-1 integers specify indentation for the
73              first N-1 list nesting levels, while the last integer  specifies
74              the indentation for nesting levels N and higher.  (Numeric.)
75
76       {UL DIR}.default_types = DISC CIRCLE SQUARE
77              Specifies  the default list type (i.e. the bullet style), if the
78              HTML list tag does not specify an explicit  type.  Legal  values
79              are  NO_BULLET,  DISC, SQUARE, CIRCLE, CUSTOM1, CUSTOM2 and CUS‐
80              TOM3.  If more than one value  is  specified,  then  the  values
81              apply  for  the  respective  list  nesting levels (see indents).
82              (Option.)
83
84       MENU.default_types = NO_BULLET
85              Same for <MENU>, but here the default is NO_BULLET.  (Option.)
86
87       LI.{disc square circle custom1 custom2 custom3}_bullet = {* # o + - ~}
88              Specifies the strings used as list item bullets.  (String.)
89
90       {DT DD}.{vspace.{before after} indent.{left right}} = 0
91              Specifies how many blank lines are inserted  before  and  after,
92              and  how  many blank columns are inserted to the left and to the
93              right of each <DT> or <DD> element.  (Numeric.)
94
95       HR.marker = =
96              Specifies the character to use for horizontal rules.  (String.)
97
98       HR.{vspace.{before after} indent.{left right}} = 0
99              Specifies how many blank lines are inserted  before  and  after,
100              and  how  many blank columns are inserted to the left and to the
101              right of the horizontal rule.  (Numeric.)
102
103       {H1 H2 H3 H4 H5 H6}.prefix = {****** ***** **** *** ** *}
104              Specifies how headings are decorated with a prefix. (The default
105              values have a trailing blank, e.g. "****** ".)  (String.)
106
107       {H1 H2 H3 H4 H5 H6}.suffix = {****** ***** **** *** ** *}
108              Specifies how headings are decorated with a suffix. (The default
109              values have a leading blank, e.g. "\ ******".)  (String.)
110
111       {H1 H2 H3 H4 H5 H6}.vspace.{before after} = 0
112              Specifies how many blank lines are  inserted  before  and  after
113              headings.  (Numeric.)
114
115       {PRE P}.{vspace.{before after} indent.{left right}} = 0
116              Specifies  how  many  blank lines are inserted before and after,
117              and how many blank columns are inserted to the left and  to  the
118              right of these items.  (Numeric.)
119
120       {BLOCKQUOTE ADDRESS}.{vspace.{before after} indent.{left right}} = {0 0
121       5 5}
122              Specifies how many blank lines are inserted  before  and  after,
123              and  how  many blank columns are inserted to the left and to the
124              right of these items.  (Numeric.)
125
126       TABLE.vspace.{before after} = 0
127              Specifies how many blank lines are  inserted  before  and  after
128              tables.  (Numeric.)
129
130       {H1 H2 H3 H4 H5 H6}.attributes = BOLD
131              Specifies  the  cell  attributes  for  headings.  The value is a
132              sequence of NONE, BOLD, UNDERLINE and STRIKETHROUGH.  (Option.)
133
134       {TT I BIG SMALL SUB SUP DFN CODE SAMP KBD CITE}.attributes = NONE
135              Specifies the cell attributes for these text items.  Legal  val‐
136              ues are: NONE, BOLD, UNDERLINE or STRIKETHROUGH.  (Option.)
137
138       U.attributes = UNDERLINE
139              Same  for  <U>  elements,  but  with  a different default value.
140              (Option.)
141
142       {B EM STRONG}.attributes = BOLD
143              Same for these elements, but with  a  different  default  value.
144              (Option.)
145
146       STRIKE.attributes = STRIKETHROUGH
147              Same  for <STRIKE> elements, but with a different default value.
148              (Option.)
149
150       A.attributes.{internal_link external_link} = UNDERLINE
151              Specifies the cell attributes for links. A link is an <A> elemet
152              that  has  an "HREF" attribute. An internal link is a link who's
153              "HREF"  attribute  starts  with  a  hash  character  (e.g.   "<A
154              href="#42">").  Legal values are again NONE, BOLD, UNDERLINE and
155              STRIKETHROUGH.  (Option.)
156
157       IMG.replace.{all noalt} = unset
158              Specifies the string used to  replace  all  <IMG>  elements,  or
159              those without an "ALT" attribute set.  (String.)
160
161       IMG.alt.{prefix suffix} = {[ ]}
162              Specifies  how  the  values  (if  any)  of  IMG  elements' "ALT"
163              attributes are marked.  (String.)
164

AUTHOR

166       Current maintainer and primary download location for html2text is:
167       Martin Bayer <mbayer@zedat.fu-berlin.de>
168       http://userpage.fu-berlin.de/~mbayer/tools/ ⟨⟩
169

SEE ALSO

171       html2text(1)
172
173
174
175                                  2001-06-11                    html2textrc(5)
Impressum