2 @chapter Invoking @command{pspp}
6 PSPP has two separate user interfaces. This chapter describes
7 @command{pspp}, PSPP's command-line driven text-based user interface.
8 The following chapter briefly describes PSPPIRE, the graphical user
11 The sections below describe the @command{pspp} program's command-line
16 * PDF PostScript and SVG Output Options::
17 * Plain Text Output Options::
18 * HTML Output Options::
19 * OpenDocument Output Options::
20 * Comma-Separated Value Output Options::
26 Here is a summary of all the options, grouped by type, followed by
27 explanations in the same order.
29 In the table, arguments to long options also apply to any
30 corresponding short options.
33 @item Non-option arguments
40 -o, --output=@var{output-file}
41 -O @var{option}=@var{value}
42 -O format=@var{format}
43 -O device=@{terminal|listing@}
44 -e, --error-file=@var{error-file}
47 @item Language options
49 -I, --include=@var{dir}
53 -a, --algorithm=@{compatible|enhanced@}
54 -x, --syntax=@{compatible|enhanced@}
57 @item Informational options
71 @item @var{syntax-file}
72 Read and execute the named syntax file. If no syntax files are
73 specified, PSPP prompts for commands. If any syntax files are
74 specified, PSPP by default exits after it runs them, but you may make
75 it prompt for commands by specifying @samp{-} as an additional syntax
78 @item -o @var{output-file}
79 Write output to @var{output-file}. PSPP has several different output
80 drivers that support output in various formats (use @option{--help} to
81 list the available formats). Specify this option more than once to
82 produce multiple output files, presumably in different formats.
84 Use @samp{-} as @var{output-file} to write output to standard output.
86 If no @option{-o} option is used, then PSPP writes output to standard
87 output in plain text format.
89 @item -O @var{option}=@var{value}
90 Sets an option for the output file configured by a preceding
91 @option{-o}. Most options are specific to particular output formats.
92 A few options that apply generically are listed below.
94 @item -O format=@var{format}
95 PSPP uses the extension of the file name given on @option{-o} to
96 select an output format. Use this option to override this choice by
97 specifying an alternate format, e.g.@: @option{-o pspp.out -O html} to
98 write HTML to a file named @file{pspp.out}. Use @option{--help} to
99 list the available formats.
101 @item -O device=@{terminal|listing@}
102 Sets whether PSPP considers the output device configured by the
103 preceding @option{-o} to be a terminal or a listing device. This
104 affects what output will be sent to the device, as configured by the
105 SET command's output routing subcommands (@pxref{SET}). By default,
106 output written to standard output is considered a terminal device and
107 other output is considered a listing device.
109 @item -e @var{error-file}
110 @itemx --error-file=@var{error-file}
111 Configures a file to receive PSPP error, warning, and note messages in
112 plain text format. Use @samp{-} as @var{error-file} to write messages
113 to standard output. The default error file is standard output in the
114 absence of these options, but this is suppressed if an output device
115 writes to standard output (or another terminal), to avoid printing
116 every message twice. Use @samp{none} as @var{error-file} to
117 explicitly suppress the default.
120 @itemx --include=@var{dir}
121 Appends @var{dir} to the set of directories searched by INCLUDE
122 (@pxref{INCLUDE}) and INSERT (@pxref{INSERT}).
126 Clears all directories from the include path, including directories
127 inserted in the include path by default. The default include path is
128 @file{.} (the current directory), followed by @file{.pspp} in the
129 user's home directory, followed by PSPP's system configuration
130 directory (usually @file{/etc/pspp} or @file{/usr/local/etc/pspp}).
134 This option forces syntax files to be interpreted in interactive
135 mode, rather than the default batch mode. @xref{Syntax Variants}, for
136 a description of the differences.
140 Disables running @file{rc} at PSPP startup time.
142 @item -a @{enhanced|compatible@}
143 @itemx --algorithm=@{enhanced|compatible@}
144 With @code{enhanced}, the default, PSPP uses the best implemented
145 algorithms for statistical procedures. With @code{compatible},
146 however, PSPP will in some cases use inferior algorithms to produce
147 the same results as the proprietary program SPSS.
149 Some commands have subcommands that override this setting on a per
152 @item -x @{enhanced|compatible@}
153 @itemx --syntax=@{enhanced|compatible@}
154 With @code{enhanced}, the default, PSPP accepts its own extensions
155 beyond those compatible with the proprietary program SPSS. With
156 @code{compatible}, PSPP rejects syntax that uses these extensions.
160 Prints a message describing PSPP command-line syntax and the available
161 device formats, then exits.
165 Prints a brief message listing PSPP's version, warranties you don't
166 have, copying conditions and copyright, and e-mail address for bug
171 Disables certain unsafe operations. This includes the ERASE and
172 HOST commands, as well as use of pipes as input and output files.
175 Invoke heuristics to assist with testing PSPP. For use by @code{make
176 check} and similar scripts.
179 @node PDF PostScript and SVG Output Options
180 @section PDF, PostScript, and SVG Output Options
182 To produce output in PDF, PostScript, and SVG formats, specify
183 @option{-o @var{file}} on the PSPP command line, optionally followed
184 by any of the options shown in the table below to customize the output
187 PDF, PostScript, and SVG output is only available if your installation
188 of PSPP was compiled with the Cairo library.
191 @item -O format=@{pdf|ps|svg@}
192 Specify the output format. This is only necessary if the file name
193 given on @option{-o} does not end in @file{.pdf}, @file{.ps}, or
196 @item -O paper-size=@var{paper-size}
197 Paper size, as a name (e.g.@: @code{a4}, @code{letter}) or
198 measurements (e.g.@: @code{210x297}, @code{8.5x11in}).
200 The default paper size is taken from the @env{PAPERSIZE} environment
201 variable or the file indicated by the @env{PAPERCONF} environment
202 variable, if either variable is set. If not, and your system supports
203 the @code{LC_PAPER} locale category, then the default paper size is
204 taken from the locale. Otherwise, if @file{/etc/papersize} exists,
205 the default paper size is read from it. As a last resort, A4 paper is
208 @item -O orientation=@var{orientation}
209 Either @code{portrait} or @code{landscape}. Default: @code{portrait}.
211 @item -O headers=@var{boolean}
212 When enabled, headers showing the time and date, title and subtitle,
213 and page number are printed at the top of each page. Default:
216 @item -O left-margin=@var{dimension}
217 @itemx -O right-margin=@var{dimension}
218 @itemx -O top-margin=@var{dimension}
219 @itemx -O bottom-margin=@var{dimension}
220 Sets the margins around the page. The headers, if enabled, are not
221 included in the margins; they are in addition to the margins. See
222 below for the allowed forms of @var{dimension} Default: @code{0.5in}.
224 @item -O prop-font=@var{font-name}
225 @itemx -O emph-font=@var{font-name}
226 @itemx -O fixed-font=@var{font-name}
227 Sets the font used for proportional, emphasized, or fixed-pitch text.
228 Most systems support CSS-like font names such as ``serif'' and
229 ``monospace'', but a wide range of system-specific font are likely to
230 be supported as well.
232 Default: proportional font @code{serif}, emphasis font @code{serif
233 italic}, fixed-pitch font @code{monospace}.
235 @item -O font-size=@var{font-size}
236 Sets the size of the default fonts, in thousandths of a point. Default:
239 @item -O line-gutter=@var{dimension}
240 Sets the width of white space on either side of lines that border text
241 or graphics objects. Default: @code{1pt}.
243 @item -O line-spacing=@var{dimension}
244 Sets the spacing between the lines in a double line in a table.
247 @item -O line-width=@var{dimension}
248 Sets the width of the lines used in tables. Default: @code{0.5pt}.
251 Each @var{dimension} value above may be specified in various units
252 based on its suffix: @samp{mm} for millimeters, @samp{in} for inches,
253 or @samp{pt} for points. Lacking a suffix, numbers below 50 are
254 assumed to be in inches and those about 50 are assumed to be in
257 @node Plain Text Output Options
258 @section Plain Text Output Options
260 PSPP can produce plain text output, drawing boxes using ASCII or
261 Unicode line drawing characters. To produce plain text output,
262 specify @option{-o @var{file}} on the PSPP command line, optionally
263 followed by options from the table below to customize the output
268 Specify the output format. This is only necessary if the file name
269 given on @option{-o} does not end in @file{.txt} or @file{.list}.
271 @item -O charts=@{@var{template}.png|none@}
272 Name for chart files included in output. The value should be a file
273 name that includes a single @samp{#} and ends in @file{png}. When a
274 chart is output, the @samp{#} is replaced by the chart number. The
275 default is the file name specified on @option{-o} with the extension
276 stripped off and replaced by @file{-#.png}.
278 Specify @code{none} to disable chart output. Charts are always
279 disabled if your installation of PSPP was compiled without the
282 @item -O paginate=@var{boolean}
283 If set, PSPP writes an ASCII formfeed the end of every page. Default:
286 @item -O headers=@var{boolean}
287 If enabled, PSPP prints two lines of header information giving title
288 and subtitle, page number, date and time, and PSPP version are printed
289 at the top of every page. These two lines are in addition to any top
290 margin requested. Default: @code{off}.
292 @item -O length=@var{line-count}
293 Physical length of a page. Headers and margins are subtracted from
294 this value. You may specify the number of lines as a number, or for
295 screen output you may specify @code{auto} to track the height of the
296 terminal as it changes. Default: @code{66}.
298 @item -O width=@var{character-count}
299 Width of a page, in characters. Margins are subtracted from this
300 value. For screen output you may specify @code{auto} in place of a
301 number to track the width of the terminal as it changes. Default:
304 @item -O top-margin=@var{top-margin-lines}
305 Length of the top margin, in lines. PSPP subtracts this value from
306 the page length. Default: @code{0}.
308 @item -O bottom-margin=@var{bottom-margin-lines}
309 Length of the bottom margin, in lines. PSPP subtracts this value from
310 the page length. Default: @code{0}.
312 @item -O box[@var{line-type}]=@var{box-chars}
313 Sets the characters used for lines in tables. @var{line-type} is a
314 4-digit number that indicates the type of line to change, in the order
315 `right', `bottom', `left', `top'. Each digit is 0 for ``no line'', 1
316 for a single line, and 2 for a double line. @var{box-chars} is the
317 character or string of characters to use for this type of line.
319 For example, @code{box[0101]="|"} sets @samp{|} as the character to
320 use for a single-width vertical line, and @code{box[1100]="\xda"} sets
321 @samp{"\xda"}, which on MS-DOS is suitable for the top-left corner of
322 a box, as the character for the intersection of two single-width
323 lines, one each from the right and bottom.
325 The defaults use @samp{-}, @samp{|}, and @samp{+} for single-width
326 lines and @samp{=} and @samp{#} for double-width lines.
328 @item -O init=@var{init-string}
329 If set, this string is written at the beginning of each output file.
330 It can be used to initialize device features, e.g.@: to enable VT100
331 line-drawing characters.
333 @item -O emphasis=@{none|bold|underline@}
334 How to emphasize text. Bold and underline emphasis are achieved with
335 overstriking, which may not be supported by all the software to which
336 you might pass the output. Default: @code{none}.
339 @node HTML Output Options
340 @section HTML Output Options
342 To produce output in HTML format, specify @option{-o @var{file}} on
343 the PSPP command line, optionally followed by any of the options shown
344 in the table below to customize the output format.
348 Specify the output format. This is only necessary if the file name
349 given on @option{-o} does not end in @file{.html}.
351 @item -O charts=@{@var{template}.png|none@}
352 Sets the name used for chart files. @xref{Plain Text Output Options},
356 @node OpenDocument Output Options
357 @section OpenDocument Output Options
359 To produce output as an OpenDocument text (ODT) document, specify
360 @option{-o @var{file}} on the PSPP command line. If @var{file} does
361 not end in @file{.odt}, you must also specify @option{-O format=odt}.
363 ODT support is only available if your installation of PSPP was
364 compiled with the libxml2 library.
366 The OpenDocument output format does not have any configurable options.
368 @node Comma-Separated Value Output Options
369 @section Comma-Separated Value Output Options
371 To produce output in comma-separated value (CSV) format, specify
372 @option{-o @var{file}} on the PSPP command line, optionally followed
373 by any of the options shown in the table below to customize the output
378 Specify the output format. This is only necessary if the file name
379 given on @option{-o} does not end in @file{.csv}.
381 @item -O separator=@var{field-separator}
382 Sets the character used to separate fields. The default is a comma
386 The CSV format used is an extension to that specified in RFC 4180:
390 Each table row is output on a separate line, and each column is output
391 as a field. The contents of a cell that spans multiple rows or
392 columns is output only for the top-left row and column; the rest are
393 output as empty fields. When a table has a caption, it is output just
394 above the table as a single field prefixed by @samp{Table:}.
397 Text in output is printed as a field on a line by itself. The TITLE
398 and SUBTITLE produce similar output, prefixed by @samp{Title:} or
399 @samp{Subtitle:}, respectively.
402 Errors, warnings, and notes are printed the same way as text.
405 Charts are not included in CSV output.
408 Successive output items are separated by a blank line.
410 @node Invoking PSPPIRE
411 @chapter Invoking @command{psppire}
412 @section The graphic user interface
413 @cindex Graphic user interface
416 The PSPPIRE graphic user interface for PSPP can perform all
417 functionality of the command line interface. In addition it gives an
418 instantaneous view of the data, variables and statistical output.
420 The graphic user interface can be started by typing @command{psppire} at a
422 Alternatively many systems have a system of interactive menus or buttons
423 from which @command{psppire} can be started by a series of mouse clicks.
425 Once the principles of the PSPP system are understood,
426 the graphic user interface is designed to be largely intuitive, and
427 for this reason is covered only very briefly by this manual.