2 @chapter Invoking @command{pspp}
4 @cindex @pspp{}, invoking
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@}
45 -e, --error-file=@var{error-file}
48 @item Language options
50 -I, --include=@var{dir}
55 -a, --algorithm=@{compatible|enhanced@}
56 -x, --syntax=@{compatible|enhanced@}
57 --syntax-encoding=@var{encoding}
60 @item Informational options
74 @item @var{syntax-file}
75 Read and execute the named syntax file. If no syntax files are
76 specified, @pspp{} prompts for commands. If any syntax files are
77 specified, @pspp{} by default exits after it runs them, but you may make
78 it prompt for commands by specifying @samp{-} as an additional syntax
81 @item @option{-o @var{output-file}}
82 Write output to @var{output-file}. @pspp{} has several different output
83 drivers that support output in various formats (use @option{--help} to
84 list the available formats). Specify this option more than once to
85 produce multiple output files, presumably in different formats.
87 Use @samp{-} as @var{output-file} to write output to standard output.
89 If no @option{-o} option is used, then @pspp{} writes text and CSV
90 output to standard output and other kinds of output to whose name is
91 based on the format, e.g.@: @file{pspp.pdf} for PDF output.
93 @item @option{-O @var{option}=@var{value}}
94 Sets an option for the output file configured by a preceding
95 @option{-o}. Most options are specific to particular output formats.
96 A few options that apply generically are listed below.
98 @item @option{-O format=@var{format}}
99 @pspp{} uses the extension of the file name given on @option{-o} to
100 select an output format. Use this option to override this choice by
101 specifying an alternate format, e.g.@: @option{-o pspp.out -O html} to
102 write HTML to a file named @file{pspp.out}. Use @option{--help} to
103 list the available formats.
105 @item @option{-O device=@{terminal|listing@}}
106 Sets whether @pspp{} considers the output device configured by the
107 preceding @option{-o} to be a terminal or a listing device. This
108 affects what output will be sent to the device, as configured by the
109 SET command's output routing subcommands (@pxref{SET}). By default,
110 output written to standard output is considered a terminal device and
111 other output is considered a listing device.
113 @item @option{--no-output}
114 Disables output entirely, if neither @option{-o} nor @option{-O} is
115 also used. If one of those options is used, @option{--no-output} has
118 @item @option{-e @var{error-file}}
119 @itemx @option{--error-file=@var{error-file}}
120 Configures a file to receive @pspp{} error, warning, and note messages in
121 plain text format. Use @samp{-} as @var{error-file} to write messages
122 to standard output. The default error file is standard output in the
123 absence of these options, but this is suppressed if an output device
124 writes to standard output (or another terminal), to avoid printing
125 every message twice. Use @samp{none} as @var{error-file} to
126 explicitly suppress the default.
128 @item @option{-I @var{dir}}
129 @itemx @option{--include=@var{dir}}
130 Appends @var{dir} to the set of directories searched by the @cmd{INCLUDE}
131 (@pxref{INCLUDE}) and @cmd{INSERT} (@pxref{INSERT}) commands.
134 @itemx @option{--no-include}
135 Clears all directories from the include path, including directories
136 inserted in the include path by default. The default include path is
137 @file{.} (the current directory), followed by @file{.pspp} in the
138 user's home directory, followed by @pspp{}'s system configuration
139 directory (usually @file{/etc/pspp} or @file{/usr/local/etc/pspp}).
142 @item @option{--batch}
144 @itemx @option{--interactive}
145 These options forces syntax files to be interpreted in batch mode or
146 interactive mode, respectively, rather than the default ``auto'' mode.
147 @xref{Syntax Variants}, for a description of the differences.
150 @itemx @option{--no-statrc}
151 Disables running @file{rc} at @pspp{} startup time.
153 @item @option{-a @{enhanced|compatible@}}
154 @itemx @option{--algorithm=@{enhanced|compatible@}}
155 With @code{enhanced}, the default, @pspp{} uses the best implemented
156 algorithms for statistical procedures. With @code{compatible},
157 however, @pspp{} will in some cases use inferior algorithms to produce
158 the same results as the proprietary program SPSS.
160 Some commands have subcommands that override this setting on a per
163 @item @option{-x @{enhanced|compatible@}}
164 @itemx @option{--syntax=@{enhanced|compatible@}}
165 With @code{enhanced}, the default, @pspp{} accepts its own extensions
166 beyond those compatible with the proprietary program SPSS. With
167 @code{compatible}, @pspp{} rejects syntax that uses these extensions.
169 @item @option{--syntax-encoding=@var{encoding}}
170 Specifies @var{encoding} as the encoding for syntax files named on the
171 command line. The @var{encoding} also becomes the default encoding
172 for other syntax files read during the @pspp{} session by the
173 @cmd{INCLUDE} and @cmd{INSERT} commands. @xref{INSERT}, for the
174 accepted forms of @var{encoding}.
176 @item @option{--help}
177 Prints a message describing @pspp{} command-line syntax and the available
178 device formats, then exits.
181 @itemx @option{--version}
182 Prints a brief message listing @pspp{}'s version, warranties you don't
183 have, copying conditions and copyright, and e-mail address for bug
187 @itemx @option{--safer}
188 Disables certain unsafe operations. This includes the @subcmd{ERASE} and
189 @subcmd{HOST} commands, as well as use of pipes as input and output files.
191 @item @option{--testing-mode}
192 Invoke heuristics to assist with testing @pspp{}. For use
193 by @command{make check} and similar scripts.
196 @node PDF PostScript and SVG Output Options
197 @section PDF, PostScript, and SVG Output Options
202 To produce output in PDF, PostScript, and SVG formats, specify
203 @option{-o @var{file}} on the @pspp{} command line, optionally followed
204 by any of the options shown in the table below to customize the output
207 PDF, PostScript, and SVG output is only available if your installation
208 of @pspp{} was compiled with the Cairo library.
211 @item @option{-O format=@{pdf|ps|svg@}}
212 Specify the output format. This is only necessary if the file name
213 given on @option{-o} does not end in @file{.pdf}, @file{.ps}, or
216 @item @option{-O paper-size=@var{paper-size}}
217 Paper size, as a name (e.g.@: @code{a4}, @code{letter}) or
218 measurements (e.g.@: @code{210x297}, @code{8.5x11in}).
220 The default paper size is taken from the @env{PAPERSIZE} environment
221 variable or the file indicated by the @env{PAPERCONF} environment
222 variable, if either variable is set. If not, and your system supports
223 the @code{LC_PAPER} locale category, then the default paper size is
224 taken from the locale. Otherwise, if @file{/etc/papersize} exists,
225 the default paper size is read from it. As a last resort, A4 paper is
228 @item @option{-O foreground-color=@var{color}}
229 @itemx @option{-O background-color=@var{color}}
230 Sets @var{color} as the color to be used for the background or foreground.
231 Color should be given in the format @code{#@var{RRRR}@var{GGGG}@var{BBBB}},
232 where @var{RRRR}, @var{GGGG} and @var{BBBB} are 4 character hexadecimal
233 representations of the red, green and blue components respectively.
235 @item @option{-O orientation=@var{orientation}}
236 Either @code{portrait} or @code{landscape}. Default: @code{portrait}.
238 @item @option{-O left-margin=@var{dimension}}
239 @itemx @option{-O right-margin=@var{dimension}}
240 @itemx @option{-O top-margin=@var{dimension}}
241 @itemx @option{-O bottom-margin=@var{dimension}}
242 Sets the margins around the page. See
243 below for the allowed forms of @var{dimension} Default: @code{0.5in}.
245 @item @option{-O prop-font=@var{font-name}}
246 @itemx @option{-O emph-font=@var{font-name}}
247 @itemx @option{-O fixed-font=@var{font-name}}
248 Sets the font used for proportional, emphasized, or fixed-pitch text.
249 Most systems support CSS-like font names such as ``serif'' and
250 ``monospace'', but a wide range of system-specific font are likely to
251 be supported as well.
253 Default: proportional font @code{serif}, emphasis font @code{serif
254 italic}, fixed-pitch font @code{monospace}.
256 @item @option{-O font-size=@var{font-size}}
257 Sets the size of the default fonts, in thousandths of a point. Default:
260 @item @option{-O line-gutter=@var{dimension}}
261 Sets the width of white space on either side of lines that border text
262 or graphics objects. Default: @code{1pt}.
264 @item @option{-O line-spacing=@var{dimension}}
265 Sets the spacing between the lines in a double line in a table.
268 @item @option{-O line-width=@var{dimension}}
269 Sets the width of the lines used in tables. Default: @code{0.5pt}.
272 Each @var{dimension} value above may be specified in various units
273 based on its suffix: @samp{mm} for millimeters, @samp{in} for inches,
274 or @samp{pt} for points. Lacking a suffix, numbers below 50 are
275 assumed to be in inches and those about 50 are assumed to be in
278 @node Plain Text Output Options
279 @section Plain Text Output Options
281 @pspp{} can produce plain text output, drawing boxes using ASCII or
282 Unicode line drawing characters. To produce plain text output,
283 specify @option{-o @var{file}} on the @pspp{} command line, optionally
284 followed by options from the table below to customize the output
287 Plain text output is encoded in UTF-8.
290 @item @option{-O format=txt}
291 Specify the output format. This is only necessary if the file name
292 given on @option{-o} does not end in @file{.txt} or @file{.list}.
294 @item @option{-O charts=@{@var{template}.png|none@}}
295 Name for chart files included in output. The value should be a file
296 name that includes a single @samp{#} and ends in @file{png}. When a
297 chart is output, the @samp{#} is replaced by the chart number. The
298 default is the file name specified on @option{-o} with the extension
299 stripped off and replaced by @file{-#.png}.
301 Specify @code{none} to disable chart output. Charts are always
302 disabled if your installation of @pspp{} was compiled without the
305 @item @option{-O paginate=@var{boolean}}
306 If set, @pspp{} writes an ASCII formfeed the end of every page. Default:
309 @item @option{-O headers=@var{boolean}}
310 If enabled, @pspp{} prints two lines of header information giving title
311 and subtitle, page number, date and time, and @pspp{} version are printed
312 at the top of every page. These two lines are in addition to any top
313 margin requested. Default: @code{off}.
315 @item @option{-O length=@var{line-count}}
316 Physical length of a page. Headers and margins are subtracted from
317 this value. You may specify the number of lines as a number, or for
318 screen output you may specify @code{auto} to track the height of the
319 terminal as it changes. Default: @code{66}.
321 @item @option{-O width=@var{character-count}}
322 Width of a page, in characters. Margins are subtracted from this
323 value. For screen output you may specify @code{auto} in place of a
324 number to track the width of the terminal as it changes. Default:
327 @item @option{-O top-margin=@var{top-margin-lines}}
328 Length of the top margin, in lines. @pspp{} subtracts this value from
329 the page length. Default: @code{0}.
331 @item @option{-O bottom-margin=@var{bottom-margin-lines}}
332 Length of the bottom margin, in lines. @pspp{} subtracts this value from
333 the page length. Default: @code{0}.
335 @item @option{-O box=@{ascii|unicode@}}
336 Sets the characters used for lines in tables.
338 @code{ascii} the characters @samp{-}, @samp{|}, and @samp{+} for single-width
339 lines and @samp{=} and @samp{#} for double-width lines are used.
340 If set to @code{unicode} then Unicode box drawing characters will be used.
341 The default is @code{unicode} if the locale's character encoding is "UTF-8"
342 or @code{ascii} otherwise.
344 @item @option{-O emphasis=@{none|bold|underline@}}
345 How to emphasize text. Bold and underline emphasis are achieved with
346 overstriking, which may not be supported by all the software to which
347 you might pass the output. Default: @code{none}.
350 @node HTML Output Options
351 @section HTML Output Options
353 To produce output in HTML format, specify @option{-o @var{file}} on
354 the @pspp{} command line, optionally followed by any of the options shown
355 in the table below to customize the output format.
358 @item @option{-O format=html}
359 Specify the output format. This is only necessary if the file name
360 given on @option{-o} does not end in @file{.html}.
362 @item @option{-O charts=@{@var{template}.png|none@}}
363 Sets the name used for chart files. @xref{Plain Text Output Options},
366 @item @option{-O borders=@var{boolean}}
367 Decorate the tables with borders. If set to false, the tables produced
368 will have no borders. The default value is true.
370 @item @option{-O css=@var{boolean}}
371 Use cascading style sheets. Cascading style sheets give an improved appearance
372 and can be used to produce pages which fit a certain web site's style.
373 The default value is true.
377 @node OpenDocument Output Options
378 @section OpenDocument Output Options
380 To produce output as an OpenDocument text (ODT) document, specify
381 @option{-o @var{file}} on the @pspp{} command line. If @var{file} does
382 not end in @file{.odt}, you must also specify @option{-O format=odt}.
384 ODT support is only available if your installation of @pspp{} was
385 compiled with the libxml2 library.
387 The OpenDocument output format does not have any configurable options.
389 @node Comma-Separated Value Output Options
390 @section Comma-Separated Value Output Options
392 To produce output in comma-separated value (CSV) format, specify
393 @option{-o @var{file}} on the @pspp{} command line, optionally followed
394 by any of the options shown in the table below to customize the output
398 @item @option{-O format=csv}
399 Specify the output format. This is only necessary if the file name
400 given on @option{-o} does not end in @file{.csv}.
402 @item @option{-O separator=@var{field-separator}}
403 Sets the character used to separate fields. Default: a comma
406 @item @option{-O quote=@var{qualifier}}
407 Sets @var{qualifier} as the character used to quote fields that
408 contain white space, the separator (or any of the characters in the
409 separator, if it contains more than one character), or the quote
410 character itself. If @var{qualifier} is longer than one character,
411 only the first character is used; if @var{qualifier} is the empty
412 string, then fields are never quoted.
414 @item @option{-O captions=@var{boolean}}
415 Whether table captions should be printed. Default: @code{on}.
418 The CSV format used is an extension to that specified in RFC 4180:
422 Each table row is output on a separate line, and each column is output
423 as a field. The contents of a cell that spans multiple rows or
424 columns is output only for the top-left row and column; the rest are
425 output as empty fields. When a table has a caption and captions are
426 enabled, the caption is output just above the table as a single field
427 prefixed by @samp{Table:}.
430 Text in output is printed as a field on a line by itself. The TITLE
431 and SUBTITLE produce similar output, prefixed by @samp{Title:} or
432 @samp{Subtitle:}, respectively.
435 Errors, warnings, and notes are printed the same way as text.
438 Charts are not included in CSV output.
441 Successive output items are separated by a blank line.
443 @node Invoking PSPPIRE
444 @chapter Invoking @command{psppire}
445 @section The graphic user interface
446 @cindex Graphic user interface
449 The PSPPIRE graphic user interface for @pspp{} can perform all
450 functionality of the command line interface. In addition it gives an
451 instantaneous view of the data, variables and statistical output.
453 The graphic user interface can be started by typing @command{psppire} at a
455 Alternatively many systems have a system of interactive menus or buttons
456 from which @command{psppire} can be started by a series of mouse clicks.
458 Once the principles of the @pspp{} system are understood,
459 the graphic user interface is designed to be largely intuitive, and
460 for this reason is covered only very briefly by this manual.