output: Use Cairo and Pango to draw charts, instead of libplot.
[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 * Cairo driver class::          Configuration of Cairo devices.
15 * ASCII driver class::          Configuration of character-code devices.
16 * HTML driver class::           Configuration for HTML output.
17 * PostScript driver class::     Configuration of PostScript devices.
18 * Miscellaneous configuring::   Even more configuration variables.
19 @end menu
20
21 @node File locations
22 @section Locating configuration files
23
24 PSPP searches each directory in the configuration file path for most
25 configuration files.  The default configuration file path searches first
26 @file{$HOME/.pspp}, then the package system configuration directory (usually
27 @file{/usr/local/etc/pspp} or @file{/etc/pspp}).  The value of
28 environment variable @env{PSPP_CONFIG_PATH}, if defined, overrides this
29 default path.  Finally, @samp{-B @var{path}} or
30 @samp{--config-dir=@var{path}} specified on the command line has highest
31 priority.
32
33 @node Configuration techniques
34 @section Configuration techniques
35
36 There are many ways that PSPP can be configured.  These are
37 described in the list below.  Values given by earlier items take
38 precedence over those given by later items.
39
40 @enumerate
41 @item
42 Syntax commands that modify settings, such as @cmd{SET}.  @xref{SET}.
43
44 @item
45 Command-line options.  @xref{Invocation}.
46
47 @item
48 PSPP-specific environment variable contents.  @xref{Environment
49 variables}.
50
51 @item
52 General environment variable contents.  @xref{Environment variables}.
53
54 @item
55 Configuration file contents.  @xref{Configuration files}.
56
57 @item
58 Fallback defaults.
59 @end enumerate
60
61 Some of the above may not apply to a particular setting.
62
63 @node Configuration files
64 @section Configuration files
65
66 Most configuration files have a common form:
67
68 @itemize @bullet
69 @item
70 Each line forms a separate command or directive.  This means that lines
71 cannot be broken up, unless they are spliced together with a trailing
72 backslash, as described below.
73
74 @item
75 Before anything else is done, trailing white space is removed.
76
77 @item
78 When a line ends in a backslash (@samp{\}), the backslash is removed,
79 and the next line is read and appended to the current line.
80
81 @itemize @minus
82 @item
83 White space preceding the backslash is retained.
84
85 @item
86 This rule continues to be applied until the line read does not end in a
87 backslash.
88
89 @item
90 It is an error if the last line in the file ends in a backslash.
91 @end itemize
92
93 @item
94 Comments are introduced by an octothorpe (@samp{#}), and continue until the
95 end of the line.
96
97 @itemize @minus
98 @item
99 An octothorpe inside balanced pairs of double quotation marks (@samp{"})
100 or single quotation marks (@samp{'}) does not introduce a comment.
101
102 @item
103 The backslash character can be used inside balanced quotes of either
104 type to escape the following character as a literal character.  
105
106 (This is distinct from the use of a backslash as a line-splicing
107 character.)
108
109 @item
110 Line splicing takes place before comment removal.
111 @end itemize
112
113 @item
114 Blank lines, and lines that contain only white space, are ignored.
115 @end itemize
116
117 @node Environment variables
118 @section Environment variables
119
120 You may think the concept of environment variables is a fairly simple
121 one.  However, the author of PSPP has found a way to complicate
122 even something so simple.  Environment variables are further described
123 in the sections below:
124
125 @menu
126 * Environment substitutions::   How environment substitutions are made.
127 * Predefined variables::        A few variables are automatically defined.
128 @end menu
129
130 @node Environment substitutions
131 @subsection Environment substitutions
132
133 Much of the power of environment variables lies in the way that they may
134 be substituted into configuration files.  Variable substitutions are
135 described below.
136
137 The line is scanned from left to right.  In this scan, all characters
138 other than dollar signs (@samp{$}) are retained without change.  Dollar
139 signs introduce environment variable references.  References
140 take three forms:
141
142 @table @code
143 @item $@var{var}
144 Replaced by the value of environment variable @var{var}.  @var{var} must
145 consist of either one or more letters, or exactly one non-alphabetic
146 character other than a left brace (@samp{@{}).
147
148 @item $@{@var{var}@}
149 Same as above, but @var{var} may contain any character (except
150 @samp{@}}).
151
152 @item $$
153 Replaced by a single dollar sign.
154 @end table
155
156 Undefined variables expand to a empty value.
157
158 @node Predefined variables
159 @subsection Predefined environment variables
160
161 There are two environment variables predefined for use in environment
162 substitutions:
163
164 @table @samp
165 @item VER
166 Defined as the version number of PSPP, as a string, in a format
167 something like @samp{0.9.4}.
168
169 @item ARCH
170 Defined as the host architecture of PSPP, as a string, in standard
171 cpu-manufacturer-OS format.  For instance, Debian GNU/Linux 1.1 on an
172 Intel machine defines this as @samp{i586-unknown-linux}.  This is
173 somewhat dependent on the system used to compile PSPP.
174 @end table
175
176 Nothing prevents these values from being overridden, although it's a
177 good idea not to do so.
178
179 @node Output devices
180 @section Output devices
181
182 Configuring output devices is the most complicated aspect of configuring
183 PSPP.  The output device configuration file is named
184 @file{devices}.  It is searched for using the usual algorithm for
185 finding configuration files (@pxref{File locations}).  Each line in the
186 file is read in the usual manner for configuration files
187 (@pxref{Configuration files}).
188
189 Lines in @file{devices} are divided into three categories, described
190 briefly in the table below:
191
192 @table @i
193 @item driver category definitions
194 Define a driver in terms of other drivers.
195
196 @item macro definitions
197 Define environment variables local to the output driver
198 configuration file.
199
200 @item device definitions
201 Describe the configuration of an output device.
202 @end table
203
204 The following sections further elaborate the contents of the
205 @file{devices} file.
206
207 @menu
208 * Driver categories::           How to organize the driver namespace.
209 * Macro definitions::           Environment variables local to @file{devices}.
210 * Device definitions::          Output device descriptions.
211 * Dimensions::                  Lengths, widths, sizes, @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 `cairo' 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 Distinguishing line types
448 @subsection How lines are divided into types
449
450 The lines in @file{devices} are distinguished in the following manner:
451
452 @enumerate
453 @item
454 Leading white space is removed.
455
456 @item
457 If the resulting line begins with the exact string @code{define},
458 followed by one or more white space characters, the line is processed as
459 a macro definition.
460
461 @item
462 Otherwise, the line is scanned for the first instance of a colon
463 (@samp{:}) or an equals sign (@samp{=}).
464
465 @item
466 If a colon is encountered first, the line is processed as a driver
467 definition.
468
469 @item
470 Otherwise, if an equals sign is encountered, the line is processed as a
471 macro definition.
472
473 @item
474 Otherwise, the line is ill-formed.
475 @end enumerate
476
477 @node Tokenizing lines
478 @subsection How lines are divided into tokens
479
480 Each driver definition line is run through a simple tokenizer.  This
481 tokenizer recognizes two basic types of tokens.
482
483 The first type is an equals sign (@samp{=}).  Equals signs are both
484 delimiters between tokens and tokens in themselves.
485
486 The second type is an identifier or string token.  Identifiers and
487 strings are equivalent after tokenization, though they are written
488 differently.  An identifier is any string of characters other than
489 white space or equals sign.
490
491 A string is introduced by a single- or double-quote character (@samp{'}
492 or @samp{"}) and, in general, continues until the next occurrence of
493 that same character.  The following standard C escapes can also be
494 embedded within strings:
495
496 @table @code
497 @item \'
498 A single-quote (@samp{'}).
499
500 @item \"
501 A double-quote (@samp{"}).
502
503 @item \?
504 A question mark (@samp{?}).  Included for hysterical raisins.
505
506 @item \\
507 A backslash (@samp{\}).
508
509 @item \a
510 Audio bell (ASCII 7).
511
512 @item \b
513 Backspace (ASCII 8).
514
515 @item \f
516 Formfeed (ASCII 12).
517
518 @item \n
519 New-line (ASCII 10)
520
521 @item \r
522 Carriage return (ASCII 13).
523
524 @item \t
525 Tab (ASCII 9).
526
527 @item \v
528 Vertical tab (ASCII 11).
529
530 @item \@var{o}@var{o}@var{o}
531 Each @samp{o} must be an octal digit.  The character is the one having
532 the octal value specified.  Any number of octal digits is read and
533 interpreted; only the lower 8 bits are used.
534
535 @item \x@var{h}@var{h}
536 Each @samp{h} must be a hex digit.  The character is the one having the
537 hexadecimal value specified.  Any number of hex digits is read and
538 interpreted; only the lower 8 bits are used.
539 @end table
540
541 Tokens, outside of quoted strings, are delimited by white space or equals
542 signs.
543
544 @node Cairo driver class
545 @section The Cairo driver class
546
547 The @code{cairo} driver class can produce output in PDF, PostScript,
548 and SVG formats.  It has full support for international character
549 sets.
550
551 The Cairo driver is only available if your copy of PSPP was built with
552 the Cairo library.
553
554 The available options are listed below.
555
556 @table @code
557 @item output-file=@var{file-name}
558
559 File to which output should be sent.  Default: @code{"pspp.pdf"}.
560
561 @item output-type=@var{output-type}
562
563 Type of output to write to the output file, one of @code{pdf},
564 @code{ps}, or @code{svg}.  Default: @code{pdf}.
565
566 @item paper-size=@var{paper-size}
567
568 Paper size.  You may specify a name (e.g.@: @code{a4}, @code{letter})
569 or measurements (e.g.@: @code{210x297}, @code{8.5x11in}).
570
571 The default paper size is taken from the @env{PAPERSIZE} environment
572 variable or the file indicated by the @env{PAPERCONF} environment
573 variable, if either variable is set.  If not, and your system supports
574 the @code{LC_PAPER} locale category, then the default paper size is
575 taken from the locale.  Otherwise, if @file{/etc/papersize} exists,
576 the default paper size is read from it.  As a last resort, A4 paper is
577 assumed.
578
579 @item orientation=@var{orientation}
580
581 Either @code{portrait} or @code{landscape}.  Default: @code{portrait}.
582
583 @item headers=@var{boolean}
584
585 Controls whether the standard headers showing the time and date and
586 title and subtitle are printed at the top of each page.  Default:
587 @code{on}.
588
589 @item left-margin=@var{dimension}
590 @itemx right-margin=@var{dimension}
591 @itemx top-margin=@var{dimension}
592 @itemx bottom-margin=@var{dimension}
593
594 Sets the margins around the page.  The headers, if enabled, are not
595 included in the margins; they are in addition to the margins.  For a
596 description of dimensions, see @ref{Dimensions}.  Default: @code{0.5in}.
597
598 @item prop-font=@var{font-name}
599 @itemx emph-font=@var{font-name}
600 @itemx fixed-font=@var{font-name}
601
602 Sets the font used for proportional, emphasized, or fixed-pitch text.
603 Most systems support CSS-like font names such as ``serif'' and
604 ``monospace'', but a wide range of system-specific font are likely to
605 be supported as well.
606
607 Default: proportional font @code{serif}, emphasis font @code{serif
608 italic}, fixed-pitch font @code{monospace}.
609
610 @item font-size=@var{font-size}
611
612 Sets the size of the default fonts, in thousandths of a point.  Default:
613 10000 (10 point).
614
615 @item line-gutter=@var{dimension}
616
617 Sets the width of white space on either side of lines that border text
618 or graphics objects.  @xref{Dimensions}.  Default: @code{1pt}.
619
620 @item line-spacing=@var{dimension}
621
622 Sets the spacing between the lines in a double line in a table.
623 Default: @code{1pt}.
624
625 @item line-width=@var{dimension}
626
627 Sets the width of the lines used in tables.  Default: @code{0.5pt}.
628 @end table
629
630 @node ASCII driver class
631 @section The ASCII driver class
632
633 The ASCII driver class produces output that can be displayed on a
634 terminal or output to printers.  The ASCII driver has class name
635 @samp{ascii}.
636
637 The available options are listed below.
638
639 @table @code
640 @item output-file=@var{file-name}
641
642 File to which output should be sent.  This can be an ordinary file name
643 (e.g., @code{"pspp.txt"}), a pipe (e.g., @code{"|more"}), or
644 stdout (@code{"-"}).  Default: @code{"pspp.list"}.
645
646 @item chart-files=@var{file-name-template}
647 Template for the file names used for charts.  The name should contain
648 a single @samp{#}, which is replaced by the chart number.  Default:
649 @file{"pspp-#.png"}.
650
651 @item chart-type=@var{type}.
652 Type of charts to output, either @samp{png} or @samp{none}.
653 Default: @samp{png}.
654
655 Charts are always disabled if your installation of PSPP was compiled
656 without the @code{cairo} library.
657
658 @item paginate=@var{boolean}
659
660 If set, a formfeed will be written at the end of every page.  Default:
661 @code{on}.
662
663 @item tab-width=@var{tab-width-value}
664
665 The distance between tab stops for this device.  If set to 0, tabs will
666 not be used in the output.  Default: @code{8}.
667
668 @item headers=@var{boolean}
669
670 If enabled, two lines of header information giving title and subtitle,
671 page number, date and time, and PSPP version are printed at the top of
672 every page.  These two lines are in addition to any top margin
673 requested.  Default: @code{on}.
674
675 @item length=@var{line-count}
676
677 Physical length of a page.  Headers and margins are subtracted from
678 this value.  You may specify the number of lines as a number, or for
679 screen output you may specify @code{auto} to track the height of the
680 terminal as it changes.  Default: @code{66}.
681
682 @item width=@var{character-count}
683
684 Physical width of a page.  Margins are subtracted from this value.
685 You may specify the width as a number of characters, or for screen
686 output you may specify @code{auto} to track the width of the terminal
687 as it changes.  Default: @code{79}.
688
689 @item top-margin=@var{top-margin-lines}
690
691 Length of the top margin, in lines.  PSPP subtracts this value from
692 the page length.  Default: @code{2}.
693
694 @item bottom-margin=@var{bottom-margin-lines}
695
696 Length of the bottom margin, in lines.  PSPP subtracts this value from
697 the page length.  Default: @code{2}.
698
699 @item box[@var{line-type}]=@var{box-chars}
700
701 The characters used for lines in tables produced by the ASCII driver can
702 be changed using this option.  @var{line-type} is used to indicate which
703 type of line to change; @var{box-chars} is the character or string of
704 characters to use for this type of line.
705
706 @var{line-type} must be a 4-digit number.  The digits are in the order
707 `right', `bottom', `left', `top'.  The possibilities for each digit are:
708
709 @table @asis
710 @item 0
711 No line.
712
713 @item 1
714 Single line.
715
716 @item 2
717 Double line.
718 @end table
719
720 Examples:
721
722 @table @code
723 @item box[0101]="|"
724
725 Sets @samp{|} as the character to use for a single-width line with
726 bottom and top components.
727
728 @item box[2222]="#"
729
730 Sets @samp{#} as the character to use for the intersection of four
731 double-width lines, one each from the top, bottom, left and right.
732
733 @item box[1100]="\xda"
734
735 Sets @samp{"\xda"}, which under MS-DOS is a box character suitable for
736 the top-left corner of a box, as the character for the intersection of
737 two single-width lines, one each from the right and bottom.
738
739 @end table
740
741 Defaults:
742
743 @itemize @bullet
744 @item
745 @code{box[0000]=" "}
746
747 @item
748 @code{box[1000]="-"}
749 @*@code{box[0010]="-"}
750 @*@code{box[1010]="-"}
751
752 @item
753 @code{box[0100]="|"}
754 @*@code{box[0001]="|"}
755 @*@code{box[0101]="|"}
756
757 @item
758 @code{box[2000]="="}
759 @*@code{box[0020]="="}
760 @*@code{box[2020]="="}
761
762 @item
763 @code{box[3000]="="}
764 @*@code{box[0030]="="}
765 @*@code{box[3030]="="}
766
767 @item
768 For all others, @samp{+} is used unless there are double lines or
769 special lines, in which case @samp{#} is used.
770 @end itemize
771
772 @item init=@var{init-string}
773 If set, this string is written at the beginning of each output file.
774 It can be used to initialize device features, e.g.@: to enable VT100
775 line-drawing characters.
776
777 @item emphasis=@var{emphasis-style}
778
779 How to emphasize text.  Your choices are @code{bold}, @code{underline},
780 or @code{none}.  Bold and underline emphasis are achieved with
781 overstriking, which may not be supported by all the software to which
782 you might pass the output.
783 @end table
784
785 @node HTML driver class
786 @section The HTML driver class
787
788 The @code{html} driver class is used to produce output for viewing in
789 tables-capable web browsers such as Emacs' w3-mode.  Its configuration
790 is very simple.  Currently, the output has a very plain format.  In the
791 future, further work may be done on improving the output appearance.
792
793 There are only a few options:
794
795 @table @code
796 @item output-file=@var{file-name}
797
798 File to which output should be sent.  This can be an ordinary file name
799 (i.e., @code{"pspp.ps"}), a pipe (i.e., @code{"|lpr"}), or
800 stdout (@code{"-"}).  Default: @file{"pspp.html"}.
801
802 @item chart-files=@var{file-name-template}
803 Template for the file names used for charts, which are output in PNG
804 format.  The name should contain a single @samp{#}, which is replaced by
805 the chart number.  Default: @file{"pspp-#.png"}.
806 @end table
807
808 @node PostScript driver class
809 @section The PostScript driver class
810
811 The @code{postscript} driver class is used to produce output that is
812 acceptable to PostScript printers and other interpreters.
813 The PostScript driver class does not support charts.
814
815 The PostScript driver class is deprecated.  It is likely to be removed
816 in a future version of PSPP.  We suggest that you use the Cairo driver
817 class instead, which can output PostScript as well and has better font
818 support, including support for international character sets, and does
819 support charts.
820
821 The available options are listed below.
822
823 @table @code
824 @item output-file=@var{file-name}
825
826 File to which output should be sent.  This can be an ordinary file name
827 (i.e., @code{"pspp.ps"}), a pipe (i.e., @code{"|lpr"}), or
828 stdout (@code{"-"}).  Default: @code{"pspp.ps"}.
829
830 @item headers=@var{boolean}
831
832 Controls whether the standard headers showing the time and date and
833 title and subtitle are printed at the top of each page.  Default:
834 @code{on}.
835
836 @item paper-size=@var{paper-size}
837
838 Paper size.  You may specify a name (e.g.@: @code{a4}, @code{letter})
839 or measurements (e.g.@: @code{210x297}, @code{8.5x11in}).
840
841 The default paper size is taken from the @env{PAPERSIZE} environment
842 variable or the file indicated by the @env{PAPERCONF} environment
843 variable, if either variable is set.  If not, and your system supports
844 the @code{LC_PAPER} locale category, then the default paper size is
845 taken from the locale.  Otherwise, if @file{/etc/papersize} exists,
846 the default paper size is read from it.  As a last resort, A4 paper is
847 assumed.
848
849 @item orientation=@var{orientation}
850
851 Either @code{portrait} or @code{landscape}.  Default: @code{portrait}.
852
853 @item left-margin=@var{dimension}
854 @itemx right-margin=@var{dimension}
855 @itemx top-margin=@var{dimension}
856 @itemx bottom-margin=@var{dimension}
857
858 Sets the margins around the page.  The headers, if enabled, are not
859 included in the margins; they are in addition to the margins.  For a
860 description of dimensions, see @ref{Dimensions}.  Default: @code{0.5in}.
861
862 @item prop-font=@var{afm-file}[,@var{font-file}[,@var{encoding-file}]]
863 @itemx emph-font=@var{afm-file}[,@var{font-file}[,@var{encoding-file}]]
864 @itemx fixed-font=@var{afm-file}[,@var{font-file}[,@var{encoding-file}]]
865
866 Sets the font used for proportional, emphasized, or fixed-pitch text.
867 The only required value is @var{afm-file}, the AFM file for the font.
868
869 If specified, @var{font-file} will be downloaded to the printer at the
870 beginning of the print job.  The font file may be in PFA or PFB format.
871
872 The font is reencoded as specified in @var{encoding-file}, if specified.
873 Each line in @var{encoding-file} should consist of a PostScript
874 character name and a decimal encoding value (between 0 and 255),
875 separated by white space.  Blank lines and comments introduced by
876 @samp{#} are also allowed.
877
878 The files specified on these options are located as follows.  If
879 the file name begins with @samp{/}, then it is taken as an absolute
880 path.  Otherwise, PSPP searches its configuration path for the specified
881 name prefixed by @code{psfonts/} (@pxref{File locations}).
882
883 Default: proportional font @code{Times-Roman.afm}, emphasis font
884 @code{Times-Italic.afm}, fixed-pitch font @code{Courier.afm}.
885
886 @item font-size=@var{font-size}
887
888 Sets the size of the default fonts, in thousandths of a point.  Default:
889 10000 (10 point).
890
891 @item line-gutter=@var{dimension}
892
893 Sets the width of white space on either side of lines that border text
894 or graphics objects.  @xref{Dimensions}.  Default: @code{1pt}.
895
896 @item line-spacing=@var{dimension}
897
898 Sets the spacing between the lines in a double line in a table.
899 Default: @code{1pt}.
900
901 @item line-width=@var{dimension}
902
903 Sets the width of the lines used in tables.  Default: @code{0.5pt}.
904 @end table
905
906 @node Miscellaneous configuring
907 @section Miscellaneous configuration
908
909 The following environment variables can be used to further configure
910 PSPP:
911
912 @table @code
913 @item HOME
914
915 Used to determine the user's home directory.  No default value.
916
917 @item STAT_INCLUDE_PATH
918
919 Path used to find include files in PSPP syntax files.  Defaults vary
920 across operating systems:
921
922 @table @asis
923 @item UNIX
924
925 @itemize @bullet
926 @item
927 @file{.}
928
929 @item
930 @file{$HOME/.pspp/include}
931
932 @item
933 @file{/usr/local/lib/pspp/include}
934
935 @item
936 @file{/usr/lib/pspp/include}
937
938 @item
939 @file{/usr/local/share/pspp/include}
940
941 @item
942 @file{/usr/share/pspp/include}
943 @end itemize
944
945 @item MS-DOS
946
947 @itemize @bullet
948 @item
949 @file{.}
950
951 @item
952 @file{C:\PSPP\INCLUDE}
953
954 @item
955 @file{$PATH}
956 @end itemize
957
958 @item Other OSes
959 No default path.
960 @end table
961
962 @item TERM
963
964 The terminal type @code{termcap} or @code{ncurses} will use, if such
965 support was compiled into PSPP.
966
967 @item STAT_OUTPUT_INIT_FILE
968
969 The basename used to search for the driver definition file.
970 @xref{Output devices}.  @xref{File locations}.  Default: @code{devices}.
971
972 @item STAT_OUTPUT_INIT_PATH
973
974 The path used to search for the driver definition file.
975 @xref{File locations}.  Default: the standard configuration path.
976
977 @item TMPDIR
978
979 The directory in which PSPP stores its temporary files (used when sorting 
980 cases or concatenating large numbers of cases).
981 Default: (UNIX) @file{/tmp}, (MS-DOS) @file{\}, (other OSes) empty string.
982
983 @item TEMP
984 @item TMP
985
986 Under MS-DOS only, these variables are consulted after TMPDIR, in this
987 order.
988 @end table