summaryrefslogtreecommitdiff
path: root/docs/user/config.txt
blob: 9bcb05beae3ee60bae108f81454d891b2999ba4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
========================
 Docutils Configuration
========================

:Author: David Goodger
:Contact: goodger@python.org
:Revision: $Revision$
:Date: $Date$
:Copyright: This document has been placed in the public domain.

.. sidebar:: Docutils Security for Web Applications

   For details about securing web applications, please see `Deploying
   Docutils Securely <../howto/security.html>`_.

.. contents::


-------------------
Configuration Files
-------------------

Configuration files are used for persistent customization; they can be
set once and take effect every time you use a front-end tool.
Configuration file settings override the built-in defaults, and
command-line options override all.

By default, Docutils checks the following places for configuration
files, in the following order:

1. ``/etc/docutils.conf``: This is a system-wide configuration file,
   applicable to all Docutils processing on the system.

2. ``./docutils.conf``: This is a project-specific configuration file,
   located in the current directory.  The Docutils front end has to be
   executed from the directory containing this configuration file for
   it to take effect (note that this may have nothing to do with the
   location of the source files).  Settings in the project-specific
   configuration file will override corresponding settings in the
   system-wide file.

3. ``~/.docutils``: This is a user-specific configuration file,
   located in the user's home directory.  Settings in this file will
   override corresponding settings in both the system-wide and
   project-specific configuration files.

If more than one configuration file is found, all will be read but
later entries will override earlier ones.  For example, a "stylesheet"
entry in a user-specific configuration file will override a
"stylesheet" entry in the system-wide file.

The default implicit config file paths can be overridden by the
``DOCUTILSCONFIG`` environment variable.  ``DOCUTILSCONFIG`` should
contain a colon-separated (semicolon-separated on Windows) sequence of
config file paths to search for; leave it empty to disable implicit
config files altogether.  Tilde-expansion is performed on paths.
Paths are interpreted relative to the current working directory.
Empty path items are ignored.

In addition, a configuration file may be explicitly specified with the
"--config" command-line option.  This configuration file is read after
the three implicit ones listed above (or the ones defined by the
``DOCUTILSCONFIG`` environment variable), and its entries will have
priority.


-------------------------
Configuration File Syntax
-------------------------

Configuration files are UTF-8-encoded text files.  The
ConfigParser.py_ module from Python_'s standard library is used to
read them.  From its documentation:

    The configuration file consists of sections, lead by a "[section]"
    header and followed by "name: value" entries, with continuations
    in the style of `RFC 822`_; "name=value" is also accepted.  Note
    that leading whitespace is removed from values.  ...  Lines
    beginning with "#" or ";" are ignored and may be used to provide
    comments.

.. Note:: No format string interpolation is done.

Configuration file entry names correspond to internal runtime
settings.  Underscores ("_") and hyphens ("-") can be used
interchangably in entry names; hyphens are automatically converted to
underscores.

For on/off switch settings (booleans), the following values are
recognized:

* On: "true", "yes", "on", "1"
* Off: "false", "no", "off", "0", "" (no value)


Example
=======

This is the contents of the ``tools/docutils.conf`` configuration file
supplied with Docutils::

    # These entries affect all processing:
    [general]
    source-link: yes
    datestamp: %Y-%m-%d %H:%M UTC
    generator: on

    # These entries affect HTML output:
    [html4css1 writer]
    # Required for docutils-update, the website build system:
    stylesheet-path: ../docutils/writers/html4css1/html4css1.css
    embed-stylesheet: no
    field-name-limit: 20

Individual configuration sections and settings are described in the
following section.


-------------------------------------
Configuration File Sections & Entries
-------------------------------------

Below are the Docutils runtime settings, listed by config file
section.  Any setting may be specified in any section, but only
settings from active sections will be used.  Sections correspond to
Docutils components (module name or alias; section names are always in
lowercase letters).  Each `Docutils application`_ uses a specific set
of components; corresponding configuration file sections are applied
when the application is used.  Configuration sections are applied in
general-to-specific order, as follows:

1. `[general]`_

2. `[parsers]`_, parser dependencies, and the section specific to the
   Parser used ("[... parser]").  Currently, only `[restructuredtext
   parser]`_ is applicable.

3. `[readers]`_, reader dependencies, and the section specific to the
   Reader used ("[... reader]").  For example, `[pep reader]`_ depends
   on `[standalone reader]`_.

4. `[writers]`_, writer dependencies, and the section specific to the
   Writer used ("[... writer]").  For example, `[pep_html writer]`_
   depends on `[html4css1 writer]`_.

5. `[applications]`_, application dependencies, and the section
    specific to the Application (front-end tool) in use
    ("[... application]").

Since any setting may be specified in any section, this ordering
allows component- or application-specific overrides of earlier
settings.  For example, there may be Reader-specific overrides of
general settings; Writer-specific overrides of Parser settings;
Application-specific overrides of Writer settings; and so on.

If multiple configuration files are applicable, the process is
completed (all sections are applied in the order given) for each one
before going on to the next.  For example, a "[pep_html writer]
stylesheet" setting in an earlier configuration file would be
overridden by an "[html4css1 writer] stylesheet" setting in a later
file.

Some knowledge of Python_ is assumed for some attributes.

.. _ConfigParser.py:
   http://www.python.org/doc/current/lib/module-ConfigParser.html
.. _Python: http://www.python.org/
.. _RFC 822: http://www.rfc-editor.org/rfc/rfc822.txt
.. _Docutils application: tools.html


[general]
=========

Settings in the "[general]" section are always applied.

_`auto_id_prefix`
    Prefix prepended to all auto-generated IDs generated within the
    document, after id_prefix_.

    Default: "id".  Options: ``--auto-id-prefix`` (hidden, intended
    mainly for programmatic use).

_`datestamp`
    Include a time/datestamp in the document footer.  Contains a
    format string for Python's ``time.strftime``.  See the `time
    module documentation`__.

    Default: None.  Options: ``--date, -d, --time, -t,
    --no-datestamp``.

    Configuration file entry examples::

        # Equivalent to --date command-line option, results in
        # ISO 8601 extended format datestamp, e.g. "2001-12-21":
        datestamp: %Y-%m-%d

        # Equivalent to --time command-line option, results in
        # date/timestamp like "2001-12-21 18:43 UTC":
        datestamp: %Y-%m-%d %H:%M UTC

        # Disables datestamp; equivalent to --no-datestamp:
        datestamp:

    __ http://www.python.org/doc/current/lib/module-time.html

_`debug`
    Report debug-level system messages.

    Default: don't (None).  Options: ``--debug, --no-debug``.

_`dump_internals`
    At the end of processing, write all internal attributes of the
    document (``document.__dict__``) to stderr.

    Default: don't (None).  Options: ``--dump-internals`` (hidden, for
    development use only).

_`dump_pseudo_xml`
    At the end of processing, write the pseudo-XML representation of
    the document to stderr.

    Default: don't (None).  Options: ``--dump-pseudo-xml`` (hidden,
    for development use only).

_`dump_settings`
    At the end of processing, write all Docutils settings to stderr.

    Default: don't (None).  Options: ``--dump-settings`` (hidden, for
    development use only).

_`dump_transforms`
    At the end of processing, write a list of all transforms applied
    to the document to stderr.

    Default: don't (None).  Options: ``--dump-transforms`` (hidden,
    for development use only).

_`error_encoding`
    The text encoding for error output.

    Default: "ascii".  Options: ``--error-encoding, -e``.

_`error_encoding_error_handler`
    The error handler for unencodable characters in error output.  See
    output_encoding_error_handler_ for acceptable values.

    Default: "backslashreplace" for Python 2.3 and later; "replace"
    otherwise.  Options: ``--error-encoding-error-handler,
    --error-encoding, -e``.

_`exit_status_level`
    A system message level threshold; non-halting system messages at
    or above this level will produce a non-zero exit status at normal
    exit.  Exit status is the maximum system message level plus 10 (11
    for INFO, etc.).

    Default: disabled (5).  Options: ``--exit-status``.

_`expose_internals`
    List of internal attribues to expose as external attributes (with
    "internal:" namespace prefix).  To specify multiple attributes in
    configuration files, use colons to separate names; on the command
    line, the option may be used more than once.

    Default: don't (None).  Options: ``--expose-internal-attribute``
    (hidden, for development use only).

_`footnote_backlinks`
    Enable or disable backlinks from footnotes and citations to their
    references.

    Default: enabled (1).  Options: ``--footnote-backlinks,
    --no-footnote-backlinks``.

_`generator`
    Include a "Generated by Docutils" credit and link in the document
    footer.

    Default: off (None).  Options: ``--generator, -g,
    --no-generator``.

_`halt_level`
    The threshold at or above which system messages are converted to
    exceptions, halting execution immediately.  If `traceback`_ is
    set, the exception will propagate; otherwise, Docutils will exit.

    Default: severe (4).  Options: ``--halt, --strict``.

_`id_prefix`
    Prefix prepended to all IDs generated within the document.  See
    also auto_id_prefix_.

    Default: "" (empty).  Options: ``--id-prefix`` (hidden, intended
    mainly for programmatic use).

_`input_encoding`
    The text encoding for input.

    Default: auto-detect (None).  Options: ``--input-encoding, -i``.

_`input_encoding_error_handler`
    The error handler for undecodable characters in the input.
    Acceptable values include:

    strict
        Raise an exception in case of an encoding error.
    replace
        Replace malformed data with the official Unicode replacement
        character, U+FFFD.
    ignore
        Ignore malformed data and continue without further notice.

    Acceptable values are the same as for the "error" parameter of
    Python's ``unicode`` function; other values may be defined in
    applications or in future versions of Python.

    Default: "strict".  Options: ``--input-encoding-error-handler,
    --input-encoding, -i``.

_`language_code`
    `ISO 639`_ 2-letter language code (3-letter codes used only if no
    2-letter code exists).

    Default: English ("en").  Options: ``--language, -l``.

_`output_encoding`
    The text encoding for output.

    Default: "UTF-8".  Options: ``--output-encoding, -o``.

_`output_encoding_error_handler`
    The error handler for unencodable characters in the output.
    Acceptable values include:

    strict
        Raise an exception in case of an encoding error.
    replace
        Replace malformed data with a suitable replacement marker,
        such as "?".
    ignore
        Ignore malformed data and continue without further notice.
    xmlcharrefreplace
        Replace with the appropriate XML character reference, such as
        "``&#8224;``".
    backslashreplace
        (Python 2.3+)  Replace with backslashed escape sequences, such
        as "``\u2020``".

    Acceptable values are the same as for the "error" parameter of
    Python's ``encode`` string method; other values may be defined in
    applications or in future versions of Python.

    Default: "strict".  Options: ``--output-encoding-error-handler,
    --output-encoding, -o``.

_`record_dependencies`
    Path to a file where Docutils will write a list of files that the
    input and output depend on [#dependencies]_, e.g. due to file
    inclusion. [#pwd]_ The format is one filename per line.  This
    option is particularly useful in conjunction with programs like
    ``make``.

    Set to ``-`` in order to write dependencies to stdout.

    Default: None.  Option: ``--record-dependencies``.

_`report_level`
    Verbosity threshold at or above which system messages are
    reported.

    Default: warning (2).  Options: ``--report, -r, --verbose, -v,
    --quiet, -q``.

_`sectnum_xform`
    Enable or disable the section numbering transform
    (docutils.transforms.parts.SectNum).

    Default: enabled (1).  Options: ``--section-numbering``,
    ``--no-section-numbering``.

_`source_link`
    Include a "View document source" link in the document footer.  URL
    will be relative to the destination.

    Default: don't (None).  Options: ``--source-link, -s,
    --no-source-link``.

_`source_url`
    An explicit URL for a "View document source" link, used verbatim.

    Default: compute if source_link (None).  Options: ``--source-url,
    --no-source-link``.

_`strict_visitor`
    When processing a document tree with the Visitor pattern, raise an
    error if a writer does not support a node type listed as optional.
    For transitional development use.

    Default: disabled (None).  Option: ``--strict-visitor`` (hidden,
    for development use only).

_`strip_classes`
    List of "classes" attribute values to remove from all elements in
    the document tree.

    .. WARNING:: Potentially dangerous; use with caution.

    Default: disabled (None).  Option: ``--strip-class``.

_`strip_comments`
    Enable the removal of comment elements from the document tree.

    Default: disabled (None).  Options: ``--strip-comment``,
    ``--leave-comments``.

_`strip_elements_with_classes`
    List of "classes" attribute values; matching elements to be
    removed from the document tree.

    .. WARNING:: Potentially dangerous; use with caution.

    Default: disabled (None).  Option: ``--strip-element-with-class``.

_`title`
    The document title as metadata, which does not become part of the
    document body.  It overrides a document-supplied title.  For
    example, in HTML output the metadata document title appears in the
    title bar of the browser window.

    Default: none.  Option: ``--title``.

_`toc_backlinks`
    Enable backlinks from section titles to table of contents entries
    ("entry"), to the top of the TOC ("top"), or disable ("none").

    Default: "entry".  Options: ``--toc-entry-backlinks,
    --toc-top-backlinks, --no-toc-backlinks``.

_`traceback`
    Enable Python tracebacks when halt-level system messages and other
    exceptions occur.  Useful for debugging, and essential for issue
    reports.  Exceptions are allowed to propagate, instead of being
    caught and reported (in a user-friendly way) by Docutils.

    Default: disabled (None) unless Docutils is run programmatically
    using the `Publisher Interface`_.  Options: ``--traceback,
    --no-traceback``.

    .. _Publisher Interface: ../api/publisher.html

_`warning_stream`
    Path to a file for the output of system messages (warnings)
    [#pwd]_.

    Default: stderr (None).  Options: ``--warnings``.


[parsers]
---------

Docutils currently supports only one parser, for reStructuredText.


[restructuredtext parser]
`````````````````````````

_`file_insertion_enabled`
    Enable or disable directives that insert the contents of external
    files, such as the "include_" & "raw_".  A "warning" system
    message (including the directive text) is inserted instead.  (See
    also raw_enabled_ for another security-relevant setting.)

    Default: enabled (1).  Options: ``--file-insertion-enabled,
    --no-file-insertion``.

    .. _include: ../ref/rst/directives.html#include
    .. _raw: ../ref/rst/directives.html#raw

_`pep_references`
    Recognize and link to standalone PEP references (like "PEP 258").

    Default: disabled (None); enabled (1) in PEP Reader.  Options:
    ``--pep-references``.

_`pep_base_url`
    Base URL for PEP references.

    Default: "http://www.python.org/peps/".  Option:
    ``--pep-base-url``.

_`pep_file_url_template`
    Template for PEP file part of URL, interpolated with the PEP
    number and appended to pep_base_url_.

    Default: "pep-%04d".  Option: ``--pep-file-url``.

_`raw_enabled`
    Enable or disable the "raw_" directive.  A "warning" system
    message (including the directive text) is inserted instead.  (See
    also file_insertion_enabled_ for another security-relevant
    setting.)

    Default: enabled (1).  Options: ``--raw-enabled, --no-raw``.

_`rfc_references`
    Recognize and link to standalone RFC references (like "RFC 822").

    Default: disabled (None); enabled (1) in PEP Reader.  Options:
    ``--rfc-references``.

_`rfc_base_url`
    Base URL for RFC references.

    Default: "http://www.faqs.org/rfcs/".  Option: ``--rfc-base-url``.

_`tab_width`
    Number of spaces for hard tab expansion.

    Default: 8.  Options: ``--tab-width``.

_`trim_footnote_reference_space`
    Remove spaces before footnote references.

    Default: don't (None); may be overriden by a writer-specific
    footnote_references__ default though.  Options:
    ``--trim-footnote-reference-space,
    --leave-footnote-reference-space``.

__ `footnote_references [latex2e writer]`_


[readers]
---------


[standalone reader]
```````````````````

_`docinfo_xform`
    Enable or disable the bibliographic field list transform
    (docutils.transforms.frontmatter.DocInfo).

    Default: enabled (1).  Options: ``--no-doc-info``.

_`doctitle_xform`
    Enable or disable the promotion of a lone top-level section title
    to document title (and subsequent section title to document
    subtitle promotion; docutils.transforms.frontmatter.DocTitle).

    Default: enabled (1).  Options: ``--no-doc-title``.

_`sectsubtitle_xform`

    Enable or disable the promotion of the title of a lone subsection
    to a subtitle (docutils.transforms.frontmatter.SectSubTitle).

    Default: disabled (0).  Options: ``--section-subtitles,
    --no-section-subtitles``.


[pep reader]
````````````

The `pep_references`_ and `rfc_references`_ settings
(`[restructuredtext parser]`_) are set on by default.


[python reader]
```````````````

Under construction.


[writers]
---------

[docutils_xml writer]
`````````````````````

_`doctype_declaration`
    Generate XML with a DOCTYPE declaration.

    Default: do (1).  Options: ``--no-doctype``.

_`indents`
    Generate XML with indents and newlines.

    Default: don't (None).  Options: ``--indents``.

_`newlines`
    Generate XML with newlines before and after tags.

    Default: don't (None).  Options: ``--newlines``.

.. _xml_declaration [docutils_xml writer]:

xml_declaration
    Generate XML with an XML declaration.  Also defined for the
    `HTML Writer`__.

    .. Caution:: The XML declaration carries text encoding
       information, without which standard tools may be unable to read
       the generated XML.

    Default: do (1).  Options: ``--no-xml-declaration``.

    __ `xml_declaration [html4css1 writer]`_


[html4css1 writer]
``````````````````

.. _attribution [html4css1 writer]:

attribution
    Format for block quote attributions: one of "dash" (em-dash
    prefix), "parentheses"/"parens", or "none".  Also defined for the
    `LaTeX Writer`__.

    Default: "dash".  Options: ``--attribution``.

    __ `attribution [latex2e writer]`_

_`cloak_email_addresses`
    Scramble email addresses to confuse harvesters.  In the reference
    URI, the "@" will be replaced by %-escapes (as of RFC 1738).  In
    the visible text (link text) of an email reference, the "@" and
    all periods (".") will be surrounded by ``<span>`` tags.
    Furthermore, HTML entities are used to encode these characters in
    order to further complicate decoding the email address.  For
    example, "abc@example.org" will be output as::

        <a class="reference" href="mailto:abc&#37;&#52;&#48;example&#46;org">
        abc<span>&#64;</span>example<span>&#46;</span>org</a>

    .. Note:: While cloaking email addresses will have little to no
       impact on the rendering and usability of email links in most
       browsers, some browsers (e.g. the ``links`` browser) may decode
       cloaked email addresses incorrectly.

    Default: don't cloak (None).  Option: ``--cloak-email-addresses``.

_`compact_lists`
    Remove extra vertical whitespace between items of bullet lists and
    enumerated lists, when list items are all "simple" (i.e., items
    each contain one paragraph and/or one "simple" sublist only).  The
    behaviour can be specified directly via "class" attributes (values
    "compact" and "open") in the document.

    Default: enabled (1).  Options: ``--compact-lists,
    --no-compact-lists``.

_`compact_field_lists`
    Remove extra vertical whitespace between items of field lists that
    are "simple" (i.e., all field bodies each contain at most one
    paragraph).  The behaviour can be specified directly via "class"
    attributes (values "compact" and "open") in the document.

    Default: enabled (1).  Options: ``--compact-field-lists,
    --no-compact-field-lists``.

_`embed_stylesheet`
    Embed the stylesheet in the output HTML file.  The stylesheet file
    must be accessible during processing.

    Default: enabled.  Options: ``--embed-stylesheet,
    --link-stylesheet``.

_`field_name_limit`
    The maximum width (in characters) for one-column field names.
    Longer field names will span an entire row of the table used to
    render the field list.  0 indicates "no limit".  See also
    option_limit_.

    Default: 14 characters.  Option: ``--field-name-limit``.

.. _footnote_references [html4css1 writer]:

footnote_references
    Format for footnote references, one of "superscript" or
    "brackets".  Also defined for the `LaTeX Writer`__.

    Overrides [#override]_ trim_footnote_reference_space_, if
    applicable. [#footnote_space]_

    Default: "brackets".  Option: ``--footnote-references``.

    __ `footnote_references [latex2e writer]`_

_`initial_header_level`
    The initial level for header elements.  This does not affect the
    document title & subtitle; see doctitle_xform_.

    Default: 1 (for "<h1>").  Option: ``--initial-header-level``.

_`option_limit`
    The maximum width (in characters) for options in option lists.
    Longer options will span an entire row of the table used to render
    the option list.  0 indicates "no limit".  See also
    field_name_limit_.

    Default: 14 characters.  Option: ``--option-limit``.

.. _stylesheet [html4css1 writer]:

stylesheet
    CSS stylesheet URL, used verbatim.  Overrides the
    "stylesheet_path" setting [#override]_.  Pass an empty string to
    deactivate stylesheet inclusion.

    Default: None.  Options: ``--stylesheet``.

    (Setting also defined for the `LaTeX Writer`__.)

    __ `stylesheet [latex2e writer]`_

.. _stylesheet_path [html4css1 writer]:

stylesheet_path
    Path to CSS stylesheet [#pwd]_.  Overrides the "stylesheet" URL
    setting [#override]_.  Path is adjusted relative to the output
    HTML file.  Also defined for the `LaTeX Writer`__.

    Default: "html4css1.css" in the docutils/writers/html4css1/
    directory (installed automatically; for the exact machine-specific
    path, use the ``--help`` option).  Options: ``--stylesheet-path``.

    __ `stylesheet_path [latex2e writer]`_

_`template`
    Path to template file, which must be encoded in UTF-8 [#pwd]_.

    Default: "template.txt" in the docutils/writers/html4css1/
    directory (installed automatically; for the exact machine-specific
    path, use the ``--help`` option).  Options: ``--template``.

.. _xml_declaration [html4css1 writer]:

xml_declaration
    Generate XML with an XML declaration.  Also defined for the
    `Docutils XML Writer`__.

    .. Caution:: The XML declaration carries text encoding
       information, without which standard tools may be unable to read
       the generated XML.

    Default: do (1).  Options: ``--no-xml-declaration``.

    __ `xml_declaration [docutils_xml writer]`_


[pep_html writer]
.................

The PEP/HTML Writer derives from the standard HTML Writer, and shares
all settings defined in the `[html4css1 writer]`_ section.  The
"[html4css1 writer]" section of configuration files is processed
before the "[pep_html writer]" section.

_`no_random`
    Do not use a random banner image.  Mainly used to get predictable
    results when testing.

    Default: random enabled (None).  Options: ``--no-random``
    (hidden).

_`pep_home`
    Home URL prefix for PEPs.

    Default: current directory (".").  Options: ``--pep-home``.

_`python_home`
    Python's home URL.

    Default: parent directory ("..").  Options: ``--python-home``.

The PEP/HTML Writer's default for the following settings differ from
those of the standard HTML Writer:

* ``stylesheet_path``: The default is
  ``docutils/writers/pep_html/pep.css`` in the installation directory.
  For the exact machine-specific path, use the ``--help`` option.

* ``template``: The default is
  ``docutils/writers/pep_html/template.txt`` in the installation
  directory.  For the exact machine-specific path, use the ``--help``
  option.


[s5_html writer]
.................

The S5/HTML Writer derives from the standard HTML Writer, and shares
all settings defined in the `[html4css1 writer]`_ section.  The
"[html4css1 writer]" section of configuration files is processed
before the "[s5_html writer]" section.

_`hidden_controls`
    Auto-hide the presentation controls in slideshow mode, or or keep
    them visible at all times.

    Default: auto-hide (1).  Options: ``--hidden-controls``,
    ``--visible-controls``.

_`current_slide`
    Enable or disable the current slide indicator ("1/15").

    Default: disabled (None).  Options: ``--current-slide``,
    ``--no-current-slide``.

_`overwrite_theme_files`
    Allow or prevent the overwriting of existing theme files in the
    ``ui/<theme>`` directory.  This has no effect if "theme_url_" is
    used.

    Default: keep existing theme files (None).  Options:
    ``--keep-theme-files``, ``--overwrite-theme-files``.

_`theme`
    Name of an installed S5 theme, to be copied into a ``ui/<theme>``
    subdirectory, beside the destination file (output HTML).  Note
    that existing theme files will not be overwritten; the existing
    theme directory you must be deleted manually.  Overrides the
    "theme_url_" setting [#override]_.

    Default: "default".  Option: ``--theme``.

_`theme_url`
    The URL of an S5 theme directory.  The destination file (output
    HTML) will link to this theme; nothing will be copied.  Overrides
    the "theme_" setting [#override]_.

    Default: None.  Option: ``--theme-url``.

_`view_mode`
    The initial view mode, either "slideshow" or "outline".

    Default: "slidewhow".  Option: ``--view-mode``.

The S5/HTML Writer's default for the following settings differ
from those of the standard HTML Writer:

* ``compact_lists``: The default here is to disable compact lists.

* ``template``: The default is
  ``docutils/writers/s5_html/template.txt`` in the installation
  directory.  For the exact machine-specific path, use the ``--help``
  option.


[latex2e writer]
````````````````

_`use_latex_toc`
    To get pagenumbers in the table of contents the table of contents
    must be generated by latex. Usually latex must be run twice to get
    numbers correct.

    *Note:* LaTeX will number the sections, which might be a bug in
    this case.

    Default: off.  Option: ``--use-latex-toc``.

.. XXX Missing: use_latex_docinfo

_`use_latex_footnotes`
    Use LaTeX-footnotes not a figure simulation. This might give no
    Hyperrefs on /to footnotes, but should be able to handle an
    unlimited number of footnotes.

    Default: off.  Option: ``--use-latex-footnotes``.

_`hyperlink_color`
    Color of any hyperlinks embedded in text. Use "0" to disable
    coloring of links.

    Default: "blue".  Option: ``--hyperlink-color``.

_`documentclass`
    Specify latex documentclass, *but* beaware that books have chapters
    articles not.

    Default: "article".  Option: ``--documentclass``.

_`documentoptions`
    Specify document options.  Multiple options can be given, separated by
    commas.

    Default: "10pt,a4paper".  Option: ``--documentoptions``.

.. _stylesheet [latex2e writer]:

stylesheet
    Specify a stylesheet file.  Overrides stylesheet_path
    [#override]_.  The file will be ``\input`` by latex in the
    document header.  Also defined for the `HTML Writer`__.

    Default: no stylesheet ("").  Option: ``--stylesheet``.

    __ `stylesheet [html4css1 writer]`_

.. _stylesheet_path [latex2e writer]:

stylesheet_path
    Path to stylesheet [#pwd]_.  Overrides "stylesheet" setting
    (``--stylesheet``) [#override]_.

    Please note that you will have to run ``latex`` from the directory
    containing the output file; otherwise the stylesheet reference
    will be invalid.

    This setting is also defined for the `HTML Writer`__.

    Default: None.  Option: ``--stylesheet-path``.

    __ `stylesheet_path [html4css1 writer]`_

.. XXX Missing: embed_stylesheet

.. _footnote_references [latex2e writer]:

footnote_references
    Format for footnote references: one of "superscript" or
    "brackets".  Also defined for the `HTML Writer`__.

    Overrides [#override]_ trim_footnote_reference_space_, if
    applicable. [#footnote_space]_

    Default: "superscript".  Option: ``--footnote-references``.

    __ `footnote_references [html4css1 writer]`_

.. _attribution [latex2e writer]:

attribution
    Format for block quote attributions, the same as for the
    html-writer: one of "dash" (em-dash prefix),
    "parentheses"/"parens" or "none".  Also defined for the `HTML
    Writer`__.

    Default: "dash".  Option: ``--attribution``.

    __ `attribution [html4css1 writer]`_

_`compound_enumerators`
    Enable or disable compound enumerators for nested enumerated lists
    (e.g. "1.2.a.ii").

    Default: disabled (None).  Options: ``--compound-enumerators``,
    ``--no-compound-enumerators``.

_`section_prefix_for_enumerators`
    Enable or disable section ("." subsection ...) prefixes for
    compound enumerators.  This has no effect unless
    `compound_enumerators`_ are enabled.

    Default: disabled (None).  Options:
    ``--section-prefix-for-enumerators``,
    ``--no-section-prefix-for-enumerators``.

_`section_enumerator_separator`
    The separator between section number prefix and enumerator for
    compound enumerated lists (see `compound_enumerators`_).

    Generally it isn't recommended to use both sub-sections and nested
    enumerated lists with compound enumerators.  This setting avoids
    ambiguity in the situation where a section "1" has a list item
    enumerated "1.1", and subsection "1.1" has list item "1".  With a
    separator of ".", these both would translate into a final compound
    enumerator of "1.1.1".  With a separator of "-", we get the
    unambiguous "1-1.1" and "1.1-1".

    Default: "-".  Option: ``--section-enumerator-separator``.

_`table_style`
    Specify the drawing of separation lines.

    - "standard" lines around and between cells.
    - "booktabs" a line above and below the table and one after the
      head.
    - "nolines".

    Default: "standard".  Option: ``--table-style``.


[pseudoxml writer]
``````````````````

No settings are defined for this Writer.


[applications]
--------------

[buildhtml application]
```````````````````````

_`ignore`
    List of wildcard (shell globing) patterns to silently ignore.  To
    specify multiple patterns in configuration files, use
    colon-separated patterns; on the command line, the option may be
    used more than once.

    Default: ['.svn', 'CVS'].  Options: ``--ignore``.

_`prune`
    List of directories not to process.  To specify multiple
    directories in configuration files, use colon-separated paths; on
    the command line, the option may be used more than once.

    Default: none ([]).  Options: ``--prune``.

_`recurse`
    Recursively scan subdirectories, or ignore subdirectories.

    Default: recurse (1).  Options: ``--recurse, --local``.

_`silent`
    Work silently (no progress messages).  Independent of
    "report_level".

    Default: show progress (None).  Options: ``--silent``.


[docfactory application]
````````````````````````

(To be completed.)


Other Settings
==============

Command-Line Only
-----------------

These settings are only effective as command-line options; setting
them in configuration files has no effect.

_`config`
    Path to a configuration file to read (if it exists) [#pwd]_.
    Settings may override defaults and earlier settings.  The config
    file is processed immediately.  Multiple ``--config`` options may
    be specified; each will be processed in turn.

    Filesystem path settings contained within the config file will be
    interpreted relative to the config file's location (*not* relative
    to the current working directory).

    Default: None.  Options: ``--config``.


Internal Settings
-----------------

These settings are for internal use only; setting them in
configuration files has no effect, and there are no corresponding
command-line options.

_`_config_files`
    List of paths of applied configuration files.

    Default: None.  No command-line options.

_`_directories`
    (``buildhtml.py`` front end.)  List of paths to source
    directories, set from positional arguments.

    Default: current working directory (None).  No command-line
    options.

_`_disable_config`
    Prevent standard configuration files from being read.  For
    programmatic use only.

    Default: config files enabled (None).  No command-line options.

_`_destination`
    Path to output destination, set from positional arguments.

    Default: stdout (None).  No command-line options.

_`_source`
    Path to input source, set from positional arguments.

    Default: stdin (None).  No command-line options.


.. _ISO 639: http://www.loc.gov/standards/iso639-2/englangn.html

.. [#pwd] Path relative to the working directory of the process at
   launch.

.. [#override] The overridden setting will automatically be set to
   ``None`` for command-line options and config file settings.  Client
   programs which specify defaults that override other settings must
   do the overriding explicitly, by assigning ``None`` to the other
   settings.

.. [#dependencies] Some notes on the dependency recorder:

   * Images are only added to the dependency list if the
     reStructuredText parser extracted image dimensions from the file.

   * Stylesheets are only added if they are embedded.

   * For practical reasons, the output of the LaTeX writer is
     considered merely an *intermediate* processing stage.  The
     dependency recorder records all files the *rendered* file
     (e.g. in PDF or DVI format) depends on.  Thus, images and
     stylesheets are both unconditionally recorded as dependencies
     when using the LaTeX writer.

.. [#footnote_space] The footnote space is trimmed if the reference
   style is "superscript", and it is left if the reference style is
   "brackets".

   The overriding only happens if the parser supports the
   trim_footnote_reference_space option.


------------------------------
Old-Format Configuration Files
------------------------------

Formerly, Docutils configuration files contained a single "[options]"
section only.  This was found to be inflexible, and in August 2003
Docutils adopted the current component-based configuration file
sections as described above.  Docutils will still recognize the old
"[options]" section, but complains with a deprecation warning.

To convert existing config files, the easiest way is to change the
section title: change "[options]" to "[general]".  Most settings
haven't changed.  The only ones to watch out for are these:

=====================  =====================================
Old-Format Setting     New Section & Setting
=====================  =====================================
pep_stylesheet         [pep_html writer] stylesheet
pep_stylesheet_path    [pep_html writer] stylesheet_path
pep_template           [pep_html writer] template
=====================  =====================================