Next: Example
Up: Setting Up Printer Definitions
Previous: Setting Up Printer Definitions
The syntax of a configuration file is a sequence of the following.
Annotaion
:
Spec-Doc
:
Spec-Page
:
Spec-Queue
:
Spec-Cancel
:
Each line defines a printer;
each definition consists of five components, each of which is terminated
by a colon.
A printer definition can be divided into several lines, by
placing a backslash (\
) at the end of line.
Sharp character (#
) is a begging of a comment until the end of line.
For
Spec-Doc
,
Spec-Page
,
Spec-Queue
, and
Spec-Cancel
,
following directives can be used.
If the first character of
Spec-Doc
,
Spec-Page
,
Spec-Queue
,
and
Spec-Cancel
is @
, command sequence to be executed
is not printed on message area in printer window of xgdvi.
Otherwise, command sequence is printed.
- %%
% character itself.
- %f
DVI file name. (e.g., doc/fib20.dvi)
- %b
Base name of DVI file. (e.g., fib20.dvi)
- %B
Base name of DVI file without extension. (e.g., fib20)
- %F
Full path name of DVI file. (e.g., /home/jrh/doc/fib20.dvi)
- %d
Directory part of full path name of DVI file. (e.g., /home/jrh/doc)
- %n
The total number of pages.
- %a{fmt}{sep}
Expand format string fmt for each page.
(See %p and %P directives.)
sep is a separator between expanded fmts.
When sep is omitted, a space character is used.
- %c
Current page number, absolute.
(the first page is page 1, and the last page is %n)
- %C
Current page number, page number string in DVI file.
(the page number string displayed in page number panel of xgdvi.)
- %p
Current page number, absolute.
If this directive appear in fmt of %a directive,
each page number is obtained by this directive, %p.
(Values of %c and %C are not affected when they appear
%a directive.)
- %P
Current page number, page number string in DVI file.
If this directive appear in fmt of %a directive,
each page number string is obtained by this directive.
- %Rb
Beginning page of region to be printed, in absolute page number.
- %Re
End page of region to be printed, in absolute page number.
- %RB
Beginning page of region to be printed, in page number string.
- %Rb
End page of region to be printed, in page number string.
- %Rs
The number of pages in a region to be printed.
- %Rr{DELIM}{HEADER}
When a part of a document is printed, it is expanded
to DELIM %Rb HEADER %Re.
Otherwise, null string.
- %RR{DELIM}{HEADER}
Same as %Rr except it is expanted
to DELIM %RB HEADER %RE.
- %s
Paper size in lower case. (e.g., a4)
- %S
Paper size in upper case. (e.g., A4)
- %o{string}
string if paper orientation is portrait; otherwise, null.
- %O{string}
string if paper orientation is landscape; otherwise, null.
- %w
Current working directory. (e.g., /home/jrh)
- %t
Temporary file name (with temporay directory name).
(each occurrence of %t in the same spec have the same file name.)
- %T
Temporary directory name. (e.g., /var/tmp)
- %e{env}
Value of an environment variable env if it is defined.
In case of the variable is undefined, null.
- %E{env}{alt-string}
Value of an environment variable env if it is defined.
In case of the variable is undefined, alt-string.
- %u
User (login) name. (e.g., jrh)
- %r
Real user name. (e.g., J. Random Hacker)
- %h
Home directory. (e.g., /home/jrh)
- %i
User id. (e.g., 6765)
- %g
Group id. (e.g., 20)
- %H
Hostname. (e.g., vax.cs.foo.edu)
- %xK
Device mode name (e.g., cx)
- %xD
Device resolution in DPI (e.g., 300)
- %xV
File name of vflibcap (e.g.,: vflibcap-tex)
- %xA
Anti-aliasing factor (e.g.,: 2)
- %xS
Shrink factor (e.g.,: 2.5)
- %xS
Shrink factor devided by anti-aliasing factor (e.g.,: 1.25)
Next: Example
Up: Setting Up Printer Definitions
Previous: Setting Up Printer Definitions
Hirotsugu Kakugawa
2001-11-02