Implemented the INSERT command.
[pspp-builds.git] / doc / configuring.texi
1 @node Configuration
2 @appendix Configuring PSPP
3 @cindex configuration
4 @cindex PSPP, configuring
5
6 This chapter describe how to configure PSPP for your system.
7
8 @menu
9 * File locations::              How PSPP finds config files.
10 * Configuration techniques::    Many different methods of configuration...
11 * Configuration files::         How configuration files are read.
12 * Environment variables::       All about environment variables.
13 * Output devices::              Describing your terminal(s) and printer(s).
14 * PostScript driver class::     Configuration of PostScript devices.
15 * ASCII driver class::          Configuration of character-code devices.
16 * HTML driver class::           Configuration for HTML output.
17 * Miscellaneous configuring::   Even more configuration variables.
18 @end menu
19
20 @node File locations
21 @section Locating configuration files
22
23 PSPP searches each directory in the configuration file path for most
24 configuration files.  The default configuration file path searches first
25 @file{$HOME/.pspp}, then the package system configuration directory (usually
26 @file{/usr/local/etc/pspp} or @file{/etc/pspp}).  The value of
27 environment variable @env{PSPP_CONFIG_PATH}, if defined, overrides this
28 default path.  Finally, @samp{-B @var{path}} or
29 @samp{--config-dir=@var{path}} specified on the command line has highest
30 priority.
31
32 @node Configuration techniques
33 @section Configuration techniques
34
35 There are many ways that PSPP can be configured.  These are
36 described in the list below.  Values given by earlier items take
37 precedence over those given by later items.
38
39 @enumerate
40 @item
41 Syntax commands that modify settings, such as @cmd{SET}.  @xref{SET}.
42
43 @item
44 Command-line options.  @xref{Invocation}.
45
46 @item
47 PSPP-specific environment variable contents.  @xref{Environment
48 variables}.
49
50 @item
51 General environment variable contents.  @xref{Environment variables}.
52
53 @item
54 Configuration file contents.  @xref{Configuration files}.
55
56 @item
57 Fallback defaults.
58 @end enumerate
59
60 Some of the above may not apply to a particular setting.
61
62 @node Configuration files
63 @section Configuration files
64
65 Most configuration files have a common form:
66
67 @itemize @bullet
68 @item
69 Each line forms a separate command or directive.  This means that lines
70 cannot be broken up, unless they are spliced together with a trailing
71 backslash, as described below.
72
73 @item
74 Before anything else is done, trailing white space is removed.
75
76 @item
77 When a line ends in a backslash (@samp{\}), the backslash is removed,
78 and the next line is read and appended to the current line.
79
80 @itemize @minus
81 @item
82 White space preceding the backslash is retained.
83
84 @item
85 This rule continues to be applied until the line read does not end in a
86 backslash.
87
88 @item
89 It is an error if the last line in the file ends in a backslash.
90 @end itemize
91
92 @item
93 Comments are introduced by an octothorpe (@samp{#}), and continue until the
94 end of the line.
95
96 @itemize @minus
97 @item
98 An octothorpe inside balanced pairs of double quotation marks (@samp{"})
99 or single quotation marks (@samp{'}) does not introduce a comment.
100
101 @item
102 The backslash character can be used inside balanced quotes of either
103 type to escape the following character as a literal character.  
104
105 (This is distinct from the use of a backslash as a line-splicing
106 character.)
107
108 @item
109 Line splicing takes place before comment removal.
110 @end itemize
111
112 @item
113 Blank lines, and lines that contain only white space, are ignored.
114 @end itemize
115
116 @node Environment variables
117 @section Environment variables
118
119 You may think the concept of environment variables is a fairly simple
120 one.  However, the author of PSPP has found a way to complicate
121 even something so simple.  Environment variables are further described
122 in the sections below:
123
124 @menu
125 * Environment substitutions::   How environment substitutions are made.
126 * Predefined variables::        A few variables are automatically defined.
127 @end menu
128
129 @node Environment substitutions
130 @subsection Environment substitutions
131
132 Much of the power of environment variables lies in the way that they may
133 be substituted into configuration files.  Variable substitutions are
134 described below.
135
136 The line is scanned from left to right.  In this scan, all characters
137 other than dollar signs (@samp{$}) are retained without change.  Dollar
138 signs introduce environment variable references.  References
139 take three forms:
140
141 @table @code
142 @item $@var{var}
143 Replaced by the value of environment variable @var{var}.  @var{var} must
144 consist of either one or more letters, or exactly one non-alphabetic
145 character other than a left brace (@samp{@{}).
146
147 @item $@{@var{var}@}
148 Same as above, but @var{var} may contain any character (except
149 @samp{@}}).
150
151 @item $$
152 Replaced by a single dollar sign.
153 @end table
154
155 Undefined variables expand to a empty value.
156
157 @node Predefined variables
158 @subsection Predefined environment variables
159
160 There are two environment variables predefined for use in environment
161 substitutions:
162
163 @table @samp
164 @item VER
165 Defined as the version number of PSPP, as a string, in a format
166 something like @samp{0.9.4}.
167
168 @item ARCH
169 Defined as the host architecture of PSPP, as a string, in standard
170 cpu-manufacturer-OS format.  For instance, Debian GNU/Linux 1.1 on an
171 Intel machine defines this as @samp{i586-unknown-linux}.  This is
172 somewhat dependent on the system used to compile PSPP.
173 @end table
174
175 Nothing prevents these values from being overridden, although it's a
176 good idea not to do so.
177
178 @node Output devices
179 @section Output devices
180
181 Configuring output devices is the most complicated aspect of configuring
182 PSPP.  The output device configuration file is named
183 @file{devices}.  It is searched for using the usual algorithm for
184 finding configuration files (@pxref{File locations}).  Each line in the
185 file is read in the usual manner for configuration files
186 (@pxref{Configuration files}).
187
188 Lines in @file{devices} are divided into three categories, described
189 briefly in the table below:
190
191 @table @i
192 @item driver category definitions
193 Define a driver in terms of other drivers.
194
195 @item macro definitions
196 Define environment variables local to the output driver
197 configuration file.
198
199 @item device definitions
200 Describe the configuration of an output device.
201 @end table
202
203 The following sections further elaborate the contents of the
204 @file{devices} file.
205
206 @menu
207 * Driver categories::           How to organize the driver namespace.
208 * Macro definitions::           Environment variables local to @file{devices}.
209 * Device definitions::          Output device descriptions.
210 * Dimensions::                  Lengths, widths, sizes, @enddots{}
211 * papersize::                   Letter, legal, A4, envelope, @enddots{}
212 * Distinguishing line types::   Details on @file{devices} parsing.
213 * Tokenizing lines::            Dividing @file{devices} lines into tokens.
214 @end menu
215
216 @node Driver categories
217 @subsection Driver categories
218
219 Drivers can be divided into categories.  Drivers are specified by their
220 names, or by the names of the categories that they are contained in.
221 Only certain drivers are enabled each time PSPP is run; by
222 default, these are the drivers in the category `default'.  To enable a
223 different set of drivers, use the @samp{-o @var{device}} command-line
224 option (@pxref{Invocation}).
225
226 Categories are specified with a line of the form
227 @samp{@var{category}=@var{driver1} @var{driver2} @var{driver3} @var{@dots{}}
228 @var{driver@var{n}}}.  This line specifies that the category
229 @var{category} is composed of drivers named @var{driver1},
230 @var{driver2}, and so on.  There may be any number of drivers in the
231 category, from zero on up.
232
233 Categories may also be specified on the command line
234 (@pxref{Invocation}).
235
236 This is all you need to know about categories.  If you're still curious,
237 read on.
238
239 First of all, the term `categories' is a bit of a misnomer.  In fact,
240 the internal representation is nothing like the hierarchy that the term
241 seems to imply: a linear list is used to keep track of the enabled
242 drivers.
243
244 When PSPP first begins reading @file{devices}, this list contains
245 the name of any drivers or categories specified on the command line, or
246 the single item `default' if none were specified.
247
248 Each time a category definition is specified, the list is searched for
249 an item with the value of @var{category}.  If a matching item is found,
250 it is deleted.  If there was a match, the list of drivers (@var{driver1}
251 through @var{driver@var{n}}) is then appended to the list.
252
253 Each time a driver definition line is encountered, the list is searched.
254 If the list contains an item with that driver's name, the driver is
255 enabled and the item is deleted from the list.  Otherwise, the driver
256 is not enabled.
257
258 It is an error if the list is not empty when the end of @file{devices}
259 is reached.
260
261 @node Macro definitions
262 @subsection Macro definitions
263
264 Macro definitions take the form @samp{define @var{macroname}
265 @var{definition}}.  In such a macro definition, the environment variable
266 @var{macroname} is defined to expand to the value @var{definition}.
267 Before the definition is made, however, any macros used in
268 @var{definition} are expanded.
269
270 Please note the following nuances of macro usage:
271
272 @itemize @bullet
273 @item
274 For the purposes of this section, @dfn{macro} and @dfn{environment
275 variable} are synonyms.
276
277 @item
278 Macros may not take arguments.
279
280 @item
281 Macros may not recurse.
282
283 @item
284 Macros are just environment variable definitions like other environment
285 variable definitions, with the exception that they are limited in scope
286 to the @file{devices} configuration file.
287
288 @item
289 Macros override other all environment variables of the same name (within
290 the scope of @file{devices}).
291
292 @item
293 Earlier macro definitions for a particular @var{key} override later
294 ones.  In particular, macro definitions on the command line override
295 those in the device definition file.  @xref{Non-option Arguments}.
296
297 @item
298 There are two predefined macros, whose values are determined at runtime:
299
300 @table @samp
301 @item viewwidth
302 Defined as the width of the console screen, in columns of text.
303
304 @item viewlength
305 Defined as the length of the console screen, in lines of text.
306 @end table
307 @end itemize
308
309 @node Device definitions
310 @subsection Driver definitions
311
312 Driver definitions are the ultimate purpose of the @file{devices}
313 configuration file.  These are where the real action is.  Driver
314 definitions tell PSPP where it should send its output.
315
316 Each driver definition line is divided into four fields.  These fields
317 are delimited by colons (@samp{:}).  Each line is subjected to
318 environment variable interpolation before it is processed further
319 (@pxref{Environment substitutions}).  From left to right, the four
320 fields are, in brief:
321
322 @table @i
323 @item driver name
324 A unique identifier, used to determine whether to enable the driver.
325
326 @item class name
327 One of the predefined driver classes supported by PSPP.  The
328 currently supported driver classes include `postscript' and `ascii'.
329
330 @item device type(s)
331 Zero or more of the following keywords, delimited by spaces:
332
333 @table @code
334 @item screen
335
336 Indicates that the device is a screen display.  This may reduce the
337 amount of buffering done by the driver, to make interactive use more
338 convenient.
339
340 @item printer
341
342 Indicates that the device is a printer.
343
344 @item listing
345
346 Indicates that the device is a listing file.
347 @end table
348
349 These options are just hints to PSPP and do not cause the output to be
350 directed to the screen, or to the printer, or to a listing file---those
351 must be set elsewhere in the options.  They are used primarily to decide
352 which devices should be enabled at any given time.  @xref{SET}, for more
353 information.
354
355 @item options
356 An optional set of options to pass to the driver itself.  The exact
357 format for the options varies among drivers.
358 @end table
359
360 The driver is enabled if:
361
362 @enumerate
363 @item
364 Its driver name is specified on the command line, or
365
366 @item
367 It's in a category specified on the command line, or
368
369 @item
370 If no categories or driver names are specified on the command line, it
371 is in category @code{default}.
372 @end enumerate
373
374 For more information on driver names, see @ref{Driver categories}.
375
376 The class name must be one of those supported by PSPP.  The
377 classes supported depend on the options with which PSPP was
378 compiled.  See later sections in this chapter for descriptions of the
379 available driver classes.
380
381 Options are dependent on the driver.  See the driver descriptions for
382 details.
383
384 @node Dimensions
385 @subsection Dimensions
386
387 Quite often in configuration it is necessary to specify a length or a
388 size.  PSPP uses a common syntax for all such, calling them
389 collectively by the name @dfn{dimensions}.
390
391 @itemize @bullet
392 @item
393 You can specify dimensions in decimal form (@samp{12.5}) or as
394 fractions, either as mixed numbers (@samp{12-1/2}) or raw fractions
395 (@samp{25/2}).
396
397 @item 
398 A number of different units are available.  These are suffixed to the
399 numeric part of the dimension.  There must be no spaces between the
400 number and the unit.  The available units are identical to those offered
401 by the popular typesetting system @TeX{}:
402
403 @table @code
404 @item in
405 inch (1 @code{in} = 2.54 @code{cm})
406
407 @item "
408 inch (1 @code{in} = 2.54 @code{cm})
409
410 @item pt
411 printer's point (1 @code{in} = 72.27 @code{pt})
412
413 @item pc
414 pica (12 @code{pt} = 1 @code{pc})
415
416 @item bp
417 PostScript point (1 @code{in} = 72 @code{bp})
418
419 @item cm
420 centimeter
421
422 @item mm
423 millimeter (10 @code{mm} = 1 @code{cm})
424
425 @item dd
426 didot point (1157 @code{dd} = 1238 @code{pt})
427
428 @item cc
429 cicero (1 @code{cc} = 12 @code{dd})
430
431 @item sp
432 scaled point (65536 @code{sp} = 1 @code{pt})
433 @end table
434
435 @item
436 If no explicit unit is given, PSPP attempts to guess the best unit:
437
438 @itemize @minus
439 @item
440 Numbers less than 50 are assumed to be in inches.
441
442 @item
443 Numbers 50 or greater are assumed to be in millimeters.
444 @end itemize
445 @end itemize
446
447 @node papersize
448 @subsection Paper sizes
449
450 Output drivers usually deal with some sort of hardcopy media.  This
451 media is called @dfn{paper} by the drivers, though in reality it could
452 be a transparency or film or thinly veiled sarcasm.  To make it easier
453 for you to deal with paper, PSPP allows you to have (of course!) a
454 configuration file that gives symbolic names, like ``letter'' or
455 ``legal'' or ``a4'', to paper sizes, rather than forcing you to use
456 cryptic numbers like ``8-1/2 x 11'' or ``210 by 297''.  Surprisingly
457 enough, this configuration file is named @file{papersize}.
458 @xref{Configuration files}.
459
460 When PSPP tries to connect a symbolic paper name to a paper size, it
461 reads and parses each non-comment line in the file, in order.  The first
462 field on each line must be a symbolic paper name in double quotes.
463 Paper names may not contain double quotes.  Paper names are not
464 case-sensitive: @samp{legal} and @samp{Legal} are equivalent.
465
466 If a match is found for the paper name, the rest of the line is parsed.
467 If it is found to be a pair of dimensions (@pxref{Dimensions}) separated
468 by either @samp{x} or @samp{by}, then those are taken to be the paper
469 size, in order of width followed by length.  There @emph{must} be at
470 least one space on each side of @samp{x} or @samp{by}.
471
472 Otherwise the line must be of the form
473 @samp{"@var{paper-1}"="@var{paper-2}"}.  In this case the target of the
474 search becomes paper name @var{paper-2} and the search through the file
475 continues.
476
477 @node Distinguishing line types
478 @subsection How lines are divided into types
479
480 The lines in @file{devices} are distinguished in the following manner:
481
482 @enumerate
483 @item
484 Leading white space is removed.
485
486 @item
487 If the resulting line begins with the exact string @code{define},
488 followed by one or more white space characters, the line is processed as
489 a macro definition.
490
491 @item
492 Otherwise, the line is scanned for the first instance of a colon
493 (@samp{:}) or an equals sign (@samp{=}).
494
495 @item
496 If a colon is encountered first, the line is processed as a driver
497 definition.
498
499 @item
500 Otherwise, if an equals sign is encountered, the line is processed as a
501 macro definition.
502
503 @item
504 Otherwise, the line is ill-formed.
505 @end enumerate
506
507 @node Tokenizing lines
508 @subsection How lines are divided into tokens
509
510 Each driver definition line is run through a simple tokenizer.  This
511 tokenizer recognizes two basic types of tokens.
512
513 The first type is an equals sign (@samp{=}).  Equals signs are both
514 delimiters between tokens and tokens in themselves.
515
516 The second type is an identifier or string token.  Identifiers and
517 strings are equivalent after tokenization, though they are written
518 differently.  An identifier is any string of characters other than
519 white space or equals sign.
520
521 A string is introduced by a single- or double-quote character (@samp{'}
522 or @samp{"}) and, in general, continues until the next occurrence of
523 that same character.  The following standard C escapes can also be
524 embedded within strings:
525
526 @table @code
527 @item \'
528 A single-quote (@samp{'}).
529
530 @item \"
531 A double-quote (@samp{"}).
532
533 @item \?
534 A question mark (@samp{?}).  Included for hysterical raisins.
535
536 @item \\
537 A backslash (@samp{\}).
538
539 @item \a
540 Audio bell (ASCII 7).
541
542 @item \b
543 Backspace (ASCII 8).
544
545 @item \f
546 Formfeed (ASCII 12).
547
548 @item \n
549 New-line (ASCII 10)
550
551 @item \r
552 Carriage return (ASCII 13).
553
554 @item \t
555 Tab (ASCII 9).
556
557 @item \v
558 Vertical tab (ASCII 11).
559
560 @item \@var{o}@var{o}@var{o}
561 Each @samp{o} must be an octal digit.  The character is the one having
562 the octal value specified.  Any number of octal digits is read and
563 interpreted; only the lower 8 bits are used.
564
565 @item \x@var{h}@var{h}
566 Each @samp{h} must be a hex digit.  The character is the one having the
567 hexadecimal value specified.  Any number of hex digits is read and
568 interpreted; only the lower 8 bits are used.
569 @end table
570
571 Tokens, outside of quoted strings, are delimited by white space or equals
572 signs.
573
574 @node PostScript driver class
575 @section The PostScript driver class
576
577 The @code{postscript} driver class is used to produce output that is
578 acceptable to PostScript printers and other interpreters.
579
580 The available options are listed below.
581
582 @table @code
583 @item output-file=@var{file-name}
584
585 File to which output should be sent.  This can be an ordinary file name
586 (i.e., @code{"pspp.ps"}), a pipe (i.e., @code{"|lpr"}), or
587 stdout (@code{"-"}).  Default: @code{"pspp.ps"}.
588
589 @item headers=@var{boolean}
590
591 Controls whether the standard headers showing the time and date and
592 title and subtitle are printed at the top of each page.  Default:
593 @code{on}.
594
595 @item paper-size=@var{paper-size}
596
597 Paper size, either as a symbolic name (i.e., @code{letter} or @code{a4})
598 or specific measurements (i.e., @code{8-1/2x11} or @code{"210 x 297"}.
599 @xref{papersize, , Paper sizes}.  Default: @code{letter}.
600
601 @item orientation=@var{orientation}
602
603 Either @code{portrait} or @code{landscape}.  Default: @code{portrait}.
604
605 @item left-margin=@var{dimension}
606 @itemx right-margin=@var{dimension}
607 @itemx top-margin=@var{dimension}
608 @itemx bottom-margin=@var{dimension}
609
610 Sets the margins around the page.  The headers, if enabled, are not
611 included in the margins; they are in addition to the margins.  For a
612 description of dimensions, see @ref{Dimensions}.  Default: @code{0.5in}.
613
614 @item prop-font=@var{afm-file}[,@var{font-file}[,@var{encoding-file}]]
615 @itemx emph-font=@var{afm-file}[,@var{font-file}[,@var{encoding-file}]]
616 @itemx fixed-font=@var{afm-file}[,@var{font-file}[,@var{encoding-file}]]
617
618 Sets the font used for proportional, emphasized, or fixed-pitch text.
619 The only required value is @var{afm-file}, the AFM file for the font.
620
621 If specified, @var{font-file} will be downloaded to the printer at the
622 beginning of the print job.  The font file may be in PFA or PFB format.
623
624 The font is reencoded as specified in @var{encoding-file}, if specified.
625 Each line in @var{encoding-file} should consist of a PostScript
626 character name and a decimal encoding value (between 0 and 255),
627 separated by white space.  Blank lines and comments introduced by
628 @samp{#} are also allowed.
629
630 The files specified on these options are located as follows.  If
631 the file name begins with @samp{/}, then it is taken as an absolute
632 path.  Otherwise, PSPP searches its configuration path for the specified
633 name prefixed by @code{psfonts/} (@pxref{File locations}).
634
635 Default: proportional font @code{Times-Roman.afm}, emphasis font
636 @code{Times-Italic.afm}, fixed-pitch font @code{Courier.afm}.
637
638 @item font-size=@var{font-size}
639
640 Sets the size of the default fonts, in thousandths of a point.  Default:
641 10000 (10 point).
642
643 @item line-gutter=@var{dimension}
644
645 Sets the width of white space on either side of lines that border text
646 or graphics objects.  @xref{Dimensions}.  Default: @code{1pt}.
647
648 @item line-spacing=@var{dimension}
649
650 Sets the spacing between the lines in a double line in a table.
651 Default: @code{1pt}.
652
653 @item line-width=@var{dimension}
654
655 Sets the width of the lines used in tables.  Default: @code{0.5pt}.
656 @end table
657
658 @node ASCII driver class
659 @section The ASCII driver class
660
661 The ASCII driver class produces output that can be displayed on a
662 terminal or output to printers.  The ASCII driver has class name
663 @samp{ascii}.
664
665 The available options are listed below.
666
667 @table @code
668 @item output-file=@var{file-name}
669
670 File to which output should be sent.  This can be an ordinary file name
671 (e.g., @code{"pspp.txt"}), a pipe (e.g., @code{"|more"}), or
672 stdout (@code{"-"}).  Default: @code{"pspp.list"}.
673
674 @item chart-files=@var{file-name-template}
675 Template for the file names used for charts.  The name should contain
676 a single @samp{#}, which is replaced by the chart number.  Default:
677 @file{"pspp-#.png"}.
678
679 @item chart-type=@var{type}.
680 Type of charts to output.  Available types typically include @samp{X},
681 @samp{png}, @samp{gif}, @samp{svg}, @samp{ps}, @samp{cgm}, @samp{fig},
682 @samp{pcl}, @samp{hpgl}, @samp{regis}, @samp{tek}, and @samp{meta}.
683 Default: @samp{png}.
684
685 You may specify @samp{none} to disable chart output.  Charts are also
686 disabled if your installation of PSPP was compiled without
687 @code{libplot}.
688
689 @item paginate=@var{boolean}
690
691 If set, a formfeed will be written at the end of every page.  Default:
692 @code{on}.
693
694 @item tab-width=@var{tab-width-value}
695
696 The distance between tab stops for this device.  If set to 0, tabs will
697 not be used in the output.  Default: @code{8}.
698
699 @item headers=@var{boolean}
700
701 If enabled, two lines of header information giving title and subtitle,
702 page number, date and time, and PSPP version are printed at the top of
703 every page.  These two lines are in addition to any top margin
704 requested.  Default: @code{on}.
705
706 @item length=@var{line-count}
707
708 Physical length of a page, in lines.  Headers and margins are subtracted
709 from this value.  Default: @code{66}.
710
711 @item width=@var{character-count}
712
713 Physical width of a page, in characters.  Margins are subtracted from
714 this value.  Default: @code{130}.
715
716 @item top-margin=@var{top-margin-lines}
717
718 Length of the top margin, in lines.  PSPP subtracts this value from
719 the page length.  Default: @code{2}.
720
721 @item bottom-margin=@var{bottom-margin-lines}
722
723 Length of the bottom margin, in lines.  PSPP subtracts this value from
724 the page length.  Default: @code{2}.
725
726 @item box[@var{line-type}]=@var{box-chars}
727
728 The characters used for lines in tables produced by the ASCII driver can
729 be changed using this option.  @var{line-type} is used to indicate which
730 type of line to change; @var{box-chars} is the character or string of
731 characters to use for this type of line.
732
733 @var{line-type} must be a 4-digit number.  The digits are in the order
734 `right', `bottom', `left', `top'.  The possibilities for each digit are:
735
736 @table @asis
737 @item 0
738 No line.
739
740 @item 1
741 Single line.
742
743 @item 2
744 Double line.
745 @end table
746
747 Examples:
748
749 @table @code
750 @item box[0101]="|"
751
752 Sets @samp{|} as the character to use for a single-width line with
753 bottom and top components.
754
755 @item box[2222]="#"
756
757 Sets @samp{#} as the character to use for the intersection of four
758 double-width lines, one each from the top, bottom, left and right.
759
760 @item box[1100]="\xda"
761
762 Sets @samp{"\xda"}, which under MS-DOS is a box character suitable for
763 the top-left corner of a box, as the character for the intersection of
764 two single-width lines, one each from the right and bottom.
765
766 @end table
767
768 Defaults:
769
770 @itemize @bullet
771 @item
772 @code{box[0000]=" "}
773
774 @item
775 @code{box[1000]="-"}
776 @*@code{box[0010]="-"}
777 @*@code{box[1010]="-"}
778
779 @item
780 @code{box[0100]="|"}
781 @*@code{box[0001]="|"}
782 @*@code{box[0101]="|"}
783
784 @item
785 @code{box[2000]="="}
786 @*@code{box[0020]="="}
787 @*@code{box[2020]="="}
788
789 @item
790 @code{box[3000]="="}
791 @*@code{box[0030]="="}
792 @*@code{box[3030]="="}
793
794 @item
795 For all others, @samp{+} is used unless there are double lines or
796 special lines, in which case @samp{#} is used.
797 @end itemize
798
799 @item init=@var{init-string}
800 If set, this string is written at the beginning of each output file.
801 It can be used to initialize device features, e.g.@: to enable VT100
802 line-drawing characters.
803
804 @item emphasis=@var{emphasis-style}
805
806 How to emphasize text.  Your choices are @code{bold}, @code{underline},
807 or @code{none}.  Bold and underline emphasis are achieved with
808 overstriking, which may not be supported by all the software to which
809 you might pass the output.
810 @end table
811
812 @node HTML driver class
813 @section The HTML driver class
814
815 The @code{html} driver class is used to produce output for viewing in
816 tables-capable web browsers such as Emacs' w3-mode.  Its configuration
817 is very simple.  Currently, the output has a very plain format.  In the
818 future, further work may be done on improving the output appearance.
819
820 There are only a few options:
821
822 @table @code
823 @item output-file=@var{file-name}
824
825 File to which output should be sent.  This can be an ordinary file name
826 (i.e., @code{"pspp.ps"}), a pipe (i.e., @code{"|lpr"}), or
827 stdout (@code{"-"}).  Default: @file{"pspp.html"}.
828
829 @item chart-files=@var{file-name-template}
830 Template for the file names used for charts, which are output in PNG
831 format.  The name should contain a single @samp{#}, which is replaced by
832 the chart number.  Default: @file{"pspp-#.png"}.
833 @end table
834
835 @node Miscellaneous configuring
836 @section Miscellaneous configuration
837
838 The following environment variables can be used to further configure
839 PSPP:
840
841 @table @code
842 @item HOME
843
844 Used to determine the user's home directory.  No default value.
845
846 @item STAT_INCLUDE_PATH
847
848 Path used to find include files in PSPP syntax files.  Defaults vary
849 across operating systems:
850
851 @table @asis
852 @item UNIX
853
854 @itemize @bullet
855 @item
856 @file{.}
857
858 @item
859 @file{$HOME/.pspp/include}
860
861 @item
862 @file{/usr/local/lib/pspp/include}
863
864 @item
865 @file{/usr/lib/pspp/include}
866
867 @item
868 @file{/usr/local/share/pspp/include}
869
870 @item
871 @file{/usr/share/pspp/include}
872 @end itemize
873
874 @item MS-DOS
875
876 @itemize @bullet
877 @item
878 @file{.}
879
880 @item
881 @file{C:\PSPP\INCLUDE}
882
883 @item
884 @file{$PATH}
885 @end itemize
886
887 @item Other OSes
888 No default path.
889 @end table
890
891 @item TERM
892
893 The terminal type @code{termcap} or @code{ncurses} will use, if such
894 support was compiled into PSPP.
895
896 @item STAT_OUTPUT_INIT_FILE
897
898 The basename used to search for the driver definition file.
899 @xref{Output devices}.  @xref{File locations}.  Default: @code{devices}.
900
901 @item STAT_OUTPUT_PAPERSIZE_FILE
902
903 The basename used to search for the papersize file.  @xref{papersize}.
904 @xref{File locations}.  Default: @code{papersize}.
905
906 @item STAT_OUTPUT_INIT_PATH
907
908 The path used to search for the driver definition file and the papersize
909 file.  @xref{File locations}.  Default: the standard configuration path.
910
911 @item TMPDIR
912
913 The directory in which PSPP stores its temporary files (used when sorting 
914 cases or concatenating large numbers of cases).
915 Default: (UNIX) @file{/tmp}, (MS-DOS) @file{\}, (other OSes) empty string.
916
917 @item TEMP
918 @item TMP
919
920 Under MS-DOS only, these variables are consulted after TMPDIR, in this
921 order.
922 @end table