Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
grops(1)
Edit
PageHistory
Diff
Info
LikePages
GROPS !!!GROPS NAME SYNOPSIS DESCRIPTION OPTIONS USAGE ENVIRONMENT FILES SEE ALSO ---- !!NAME grops - !PostScript driver for groff !!SYNOPSIS __grops__ [[ __-glmv__ ] [[ __-b__''n'' ] [[ __-c__''n'' ] [[ __-w__''n'' ] [[ __-F__''dir'' ] [[ __-P__''prologue'' ] [[ ''files...'' ] It is possible to have whitespace between a command line option and its parameter. !!DESCRIPTION __grops__ translates the output of GNU __troff__ to !PostScript. Normally __grops__ should be invoked by using the groff command with a __-Tps__ option. (Actually, this is the default for groff.) If no files are given, __grops__ will read the standard input. A filename of __-__ will also cause __grops__ to read the standard input. !PostScript output is written to the standard output. When __grops__ is run by __groff__ options can be passed to __grops__ using the __groff -P__ option. !!OPTIONS __-b__''n'' Workaround broken spoolers and previewers. Normally __grops__ produces output that conforms the Document Structuring Conventions version 3.0. Unfortunately some spoolers and previewers can't handle such output. The value of ''n'' controls what __grops__ does to its output acceptable to such programs. A value of 0 will cause grops not to employ any workarounds. Add 1 if no __%%!BeginDocumentSetup__ and __%%!EndDocumentSetup__ comments should be generated; this is needed for early versions of !TranScript that get confused by anything between the __%%!EndProlog__ comment and the first __%%Page__ comment. Add 2 if lines in included files beginning with __%!__ should be stripped out; this is needed for Sun's pageview previewer. Add 4 if __%%Page__, __%%Trailer__ and __%%!EndProlog__ comments should be stripped out of included files; this is needed for spoolers that don't understand the __%%!BeginDocument__ and __%%!EndDocument__ comments. Add 8 if the first line of the !PostScript output should be __%!PS-Adobe-2.0__ rather than __%!PS-Adobe-3.0__; this is needed when using Sun's Newsprint with a printer that requires page reversal. The default value can be specified by a __broken__ ''n'' command in the DESC file. Otherwise the default value is 0. __-c__''n'' Print ''n'' copies of each page. __-g__ Guess the page length. This generates !PostScript code that guesses the page length. The guess will be correct only if the imageable area is vertically centered on the page. This option allows you to generate documents that can be printed both on letter (8.511) paper and on A4 paper without change. __-l__ Print the document in landscape format. __-m__ Turn manual feed on for the document. __-F__''dir'' Prepend directory ''dir''__/dev__''name'' to the search path for prologue, font, and device description files; ''name'' is the name of the device, usually __ps__. __-P__''prologue-file'' Use the file ''prologue-file'' (in the font path) as the prologue instead of the default prologue file __prologue__. This option overrides the environment variable GROPS_PROLOGUE. __-w__''n'' Lines should be drawn using a thickness of ''n'' thousandths of an em. __-v__ Print the version number. !!USAGE There are styles called __R__, __I__, __B__, and __BI__ mounted at font positions 1 to 4. The fonts are grouped into families __A__, __BM__, __C__, __H__, __HN__, __N__, __P__ and __T__ having members in each of these styles: __AR__ !AvantGarde-Book __AI__ !AvantGarde-!BookOblique __AB__ !AvantGarde-Demi __ABI__ !AvantGarde-!DemiOblique __BMR__ Bookman-Light __BMI__ Bookman-!LightItalic __BMB__ Bookman-Demi __BMBI__ Bookman-!DemiItalic __CR__ Courier __CI__ Courier-Oblique __CB__ Courier-Bold __CBI__ Courier-!BoldOblique __HR__ Helvetica __HI__ Helvetica-Oblique __HB__ Helvetica-Bold __HBI__ Helvetica-!BoldOblique __HNR__ Helvetica-Narrow __HNI__ Helvetica-Narrow-Oblique __HNB__ Helvetica-Narrow-Bold __HNBI__ Helvetica-Narrow-!BoldOblique __NR__ !NewCenturySchlbk-Roman __NI__ !NewCenturySchlbk-Italic __NB__ !NewCenturySchlbk-Bold __NBI__ !NewCenturySchlbk-!BoldItalic __PR__ Palatino-Roman __PI__ Palatino-Italic __PB__ Palatino-Bold __PBI__ Palatino-!BoldItalic __TR__ Times-Roman __TI__ Times-Italic __TB__ Times-Bold __TBI__ Times-!BoldItalic There is also the following font which is not a member of a family: __ZCMI__ !ZapfChancery-!MediumItalic There are also some special fonts called __SS__ and __S__. Zapf Dingbats is available as __ZD__ and a reversed version of !ZapfDingbats (with symbols pointing in the opposite direction) is available as __ZDR__; most characters in these fonts are unnamed and must be accessed using __N__. __grops__ understands various X commands produced using the __X__ escape sequence; __grops__ will only interpret commands that begin with a __ps:__ tag. __X'ps: exec__ ''code''__'__ This executes the arbitrary !PostScript commands in ''code''. The !PostScript currentpoint will be set to the position of the __X__ command before executing ''code''. The origin will be at the top left corner of the page, and y coordinates will increase down the page. A procedure __u__ will be defined that converts groff units to the coordinate system in effect. For example, __.nr x 1i X'ps: exec nx u 0 rlineto stroke'__ will draw a horizontal line one inch long. ''code'' may make changes to the graphics state, but any changes will persist only to the end of the page. A dictionary containing the definitions specified by the __def__ and __mdef__ will be on top of the dictionary stack. If your code adds definitions to this dictionary, you should allocate space for them using __X'ps mdef__ ''n''__'__. Any definitions will persist only until the end of the page. If you use the __Y__ escape sequence with an argument that names a macro, ''code'' can extend over multiple lines. For example, __.nr x 1i .de y ps: exec nx u 0 rlineto stroke .. Yy __ is another way to draw a horizontal line one inch long. __X'ps: file__ ''name''__'__ This is the same as the __exec__ command except that the !PostScript code is read from file ''name''. __X'ps: def__ ''code''__'__ Place a !PostScript definition contained in ''code'' in the prologue. There should be at most one definition per __X__ command. Long definitions can be split over several __X__ commands; all the ''code'' arguments are simply joined together separated by newlines. The definitions are placed in a dictionary which is automatically pushed on the dictionary stack when an __exec__ command is executed. If you use the __Y__ escape sequence with an argument that names a macro, ''code'' can extend over multiple lines. __X'ps: mdef__ ''n code''__'__ Like __def__, except that ''code'' may contain up to ''n'' definitions. __grops__ needs to know how many definitions ''code'' contains so that it can create an appropriately sized !PostScript dictionary to contain them. __X'ps: import__ ''file llx lly urx ury width'' [[ ''height'' ]__'__ Import a !PostScript graphic from ''file''. The arguments ''llx'', ''lly'', ''urx'', and ''ury'' give the bounding box of the graphic in the default !PostScript coordinate system; they should all be integers; ''llx'' and ''lly'' are the x and y coordinates of the lower left corner of the graphic; ''urx'' and ''ury'' are the x and y coordinates of the upper right corner of the graphic; ''width'' and ''height'' are integers that give the desired width and height in groff units of the graphic. The graphic will be scaled so that it has this width and height and translated so that the lower left corner of the graphic is located at the position associated with __X__ command. If the height argument is omitted it will be scaled uniformly in the x and y directions so that it has the specified width. Note that the contents of the __X__ command are not interpreted by __troff__; so vertical space for the graphic is not automatically added, and the ''width'' and ''height'' arguments are not allowed to have attached scaling indicators. If the !PostScript file complies with the Adobe Document Structuring Conventions and contains a __%%!BoundingBox__ comment, then the bounding box can be automatically extracted from within groff by using the __psbb__ request. The __-mps__ macros (which are automatically loaded when __grops__ is run by the groff command) include a __PSPIC__ macro which allows a picture to be easily imported. This has the format __.PSPIC__ [[ __-L__ | __-R__ | __-I__ ''n'' ] ''file'' [[ ''width'' [[ ''height'' ]] ''file'' is the name of the file containing the illustration; ''width'' and ''height'' give the desired width and height of the graphic. The ''width'' and ''height'' arguments may have scaling indicators attached; the default scaling indicator is __i__. This macro will scale the graphic uniformly in the x and y directions so that it is no more than ''width'' wide and ''height'' high. By default, the graphic will be horizontally centered. The __-L__ and __-R__ cause the graphic to be left-aligned and right-aligned respectively. The __-I__ option causes the graphic to be indented by ''n''. __X'ps: invis'__ __X'ps: endinvis'__ No output will be generated for text and drawing commands that are bracketed with these __X__ commands. These commands are intended for use when output from __troff__ will be previewed before being processed with __grops__; if the previewer is unable to display certain characters or other constructs, then other substitute characters or constructs can be used for previewing by bracketing them with these __X__ commands. For example, __gxditview__ is not able to display a proper ____ character because the standard X11 fonts do not provide it; this problem can be overcome by executing the following request __.char X'ps: invis'\ Z'v'-.25m'h'.05m'D'l .9m 0'h'.05m''\ X'ps: endinvis' __ In this case, __gxditview__ will be unable to display the ____ character and will draw the line, whereas __grops__ will print the ____ character and ignore the line. The input to __grops__ must be in the format output by troff(1). This is described in groff_out(5). In addition the device and font description files for the device used must meet certain requirements. The device and font description files supplied for __ps__ device meet all these requirements. afmtodit(1) can be used to create font files from AFM files. The resolution must be an integer multiple of 72 times the __sizescale__. The __ps__ device uses a resolution of 72000 and a sizescale of 1000. The device description file should contain a command __paperlength__ ''n'' which says that output should be generated which is suitable for printing on a page whose length is ''n'' machine units. Each font description file must contain a command __internalname__ ''psname'' which says that the !PostScript name of the font is ''psname''. It may also contain a command __encoding__ ''enc_file'' which says that the !PostScript font should be reencoded using the encoding described in ''enc_file''; this file should consist of a sequence of lines of the form: ''pschar code'' where ''pschar'' is the !PostScript name of the character, and ''code'' is its position in the encoding expressed as a decimal integer. The code for each character given in the font file must correspond to the code for the character in encoding file, or to the code in the default encoding for the font if the !PostScript font is not to be reencoded. This code can be used with the __N__ escape sequence in __troff__ to select the character, even if the character does not have a groff name. Every character in the font file must exist in the !PostScript font, and the widths given in the font file must match the widths used in the !PostScript font. __grops__ will assume that a character with a groff name of __space__ is blank (makes no marks on the page); it can make use of such a character to generate more efficient and compact !PostScript output. __grops__ can automatically include the downloadable fonts necessary to print the document. Any downloadable fonts which should, when required, be included by __grops__ must be listed in the file __/usr/share/groff/1.17.2/font/devps/download__; this should consist of lines of the form ''font filename'' where ''font'' is the !PostScript name of the font, and ''filename'' is the name of the file containing the font; lines beginning with __#__ and blank lines are ignored; fields may be separated by tabs or spaces; ''filename'' will be searched for using the same mechanism that is used for groff font metric files. The __download__ file itself will also be searched for using this mechanism. If the file containing a downloadable font or imported document conforms to the Adobe Document Structuring Conventions, then __grops__ will interpret any comments in the files sufficiently to ensure that its own output is conforming. It will also supply any needed font resources that are listed in the __download__ file as well as any needed file resources. It is also able to handle inter-resource dependencies. For example, suppose that you have a downloadable font called Garamond, and also a downloadable font called Garamond-Outline which depends on Garamond (typically it would be defined to copy Garamond's font dictionary, and change the !PaintType), then it is necessary for Garamond to be appear before Garamond-Outline in the !PostScript document. __grops__ will handle this automatically provided that the downloadable font file for Garamond-Outline indicates its dependence on Garamond by means of the Document Structuring Conventions, for example by beginning with the following lines __%!PS-Adobe-3.0 Resource-Font %%!DocumentNeededResources: font Garamond %%!EndComments %%!IncludeResource: font Garamond__ In this case both Garamond and Garamond-Outline would need to be listed in the __download__ file. A downloadable font should not include its own name in a __%%!DocumentSuppliedResources__ comment. __grops__ will not interpret __%%!DocumentFonts__ comments. The __%%!DocumentNeededResources__, __%%!DocumentSuppliedResources__, __%%!IncludeResource__, __%%!BeginResource__ and __%%!EndResource__ comments (or possibly the old __%%!DocumentNeededFonts__, __%%!DocumentSuppliedFonts__, __%%!IncludeFont__, __%%!BeginFont__ and __%%!EndFont__ comments) should be used. !!ENVIRONMENT __GROPS_PROLOGUE__ If this is set to ''foo'', then __grops__ will use the file ''foo'' (in the font path) instead of the default prologue file __prologue__. The option __-P__ overrides this environment variable. !!FILES __/usr/share/groff/1.17.2/font/devps/DESC__ Device description file. __/usr/share/groff/1.17.2/font/devps/__''F'' Font description file for font ''F''. __/usr/share/groff/1.17.2/font/devps/download__ List of downloadable fonts. __/usr/share/groff/1.17.2/font/devps/text.enc__ Encoding used for text fonts. __/usr/share/groff/1.17.2/tmac/ps.tmac__ Macros for use with __grops__; automatically loaded by __troffrc__ __/usr/share/groff/1.17.2/tmac/pspic.tmac__ Definition of __PSPIC__ macro, automatically loaded by __ps.tmac__. __/usr/share/groff/1.17.2/tmac/psold.tmac__ Macros to disable use of characters not present in older !PostScript printers (e.g. `eth' or `thorn'). __/tmp/grops__''XXXXXX'' Temporary file. !!SEE ALSO afmtodit(1), groff(1), troff(1), psbb(1), groff_out(5), __groff_font__(5), groff_char(7) ----
6 pages link to
grops(1)
:
pfbtops(1)
Man1g
roff(7)
troff(1)
afmtodit(1)
groff(1)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.