pic.man revision 79543
179543Sru.ig 279543SruCopyright (C) 1989-2000, 2001 Free Software Foundation, Inc. 375584Sru 475584SruPermission is granted to make and distribute verbatim copies of 575584Sruthis manual provided the copyright notice and this permission notice 675584Sruare preserved on all copies. 775584Sru 875584SruPermission is granted to copy and distribute modified versions of this 975584Srumanual under the conditions for verbatim copying, provided that the 1075584Sruentire resulting derived work is distributed under the terms of a 1175584Srupermission notice identical to this one. 1275584Sru 1375584SruPermission is granted to copy and distribute translations of this 1475584Srumanual into another language, under the above conditions for modified 1575584Sruversions, except that this permission notice may be included in 1675584Srutranslations approved by the Free Software Foundation instead of in 1775584Sruthe original English. 1875584Sru.. 1975584Sru.\" Like TP, but if specified indent is more than half 2075584Sru.\" the current line-length - indent, use the default indent. 2175584Sru.de Tp 2275584Sru.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP 2375584Sru.el .TP "\\$1" 2475584Sru.. 2575584Sru.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X 2675584Sru.el .ds tx TeX 2775584Sru.ie \n(.g .ds ic \/ 2875584Sru.el .ds ic \^ 2975584Sru.\" The BSD man macros can't handle " in arguments to font change macros, 3075584Sru.\" so use \(ts instead of ". 3175584Sru.tr \(ts" 3275584Sru.TH @G@PIC @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" 3375584Sru.SH NAME 3475584Sru@g@pic \- compile pictures for troff or TeX 3575584Sru.SH SYNOPSIS 3675584Sru.B @g@pic 3775584Sru[ 3875584Sru.B \-nvCSU 3975584Sru] 4075584Sru[ 4175584Sru.I filename 4275584Sru\&.\|.\|. 4375584Sru] 4475584Sru.br 4575584Sru.B @g@pic 4675584Sru.B \-t 4775584Sru[ 4875584Sru.B \-cvzCSU 4975584Sru] 5075584Sru[ 5175584Sru.I filename 5275584Sru\&.\|.\|. 5375584Sru] 5475584Sru.SH DESCRIPTION 5575584SruThis manual page describes the GNU version of 5675584Sru.BR pic , 5775584Sruwhich is part of the groff document formatting system. 5875584Sru.B pic 5975584Srucompiles descriptions of pictures embedded within 6075584Sru.B troff 6175584Sruor \*(tx input files into commands that are understood by \*(tx or 6275584Sru.BR troff . 6375584SruEach picture starts with a line beginning with 6475584Sru.B .PS 6575584Sruand ends with a line beginning with 6675584Sru.BR .PE . 6775584SruAnything outside of 6875584Sru.B .PS 6975584Sruand 7075584Sru.B .PE 7175584Sruis passed through without change. 7275584Sru.LP 7375584SruIt is the user's responsibility to provide appropriate definitions of the 7475584Sru.B PS 7575584Sruand 7675584Sru.B PE 7775584Srumacros. 7875584SruWhen the macro package being used does not supply such definitions 7975584Sru(for example, old versions of \-ms), 8075584Sruappropriate definitions can be obtained with 8175584Sru.BR \-mpic : 8275584Sruthese will center each picture. 8375584Sru.SH OPTIONS 8475584SruOptions that do not take arguments may be grouped behind a single 8575584Sru.BR \- . 8675584SruThe special option 8775584Sru.B \-\^\- 8875584Srucan be used to mark the end of the options. 8975584SruA filename of 9075584Sru.B \- 9175584Srurefers to the standard input. 9275584Sru.TP 9375584Sru.B \-C 9475584SruRecognize 9575584Sru.B .PS 9675584Sruand 9775584Sru.B .PE 9875584Srueven when followed by a character other than space or newline. 9975584Sru.TP 10075584Sru.B \-S 10175584SruSafer mode; do not execute 10275584Sru.B sh 10375584Srucommands. 10475584SruThis can be useful when operating on untrustworthy input. 10575584Sru(enabled by default) 10675584Sru.TP 10775584Sru.B \-U 10875584SruUnsafe mode; revert the default option 10975584Sru.BR \-S . 11075584Sru.TP 11175584Sru.B \-n 11275584SruDon't use the groff extensions to the troff drawing commands. 11375584SruYou should use this if you are using a postprocessor that doesn't support 11475584Sruthese extensions. 11575584SruThe extensions are described in 11675584Sru.BR groff_out (@MAN5EXT@). 11775584SruThe 11875584Sru.B \-n 11975584Sruoption also causes 12075584Sru.B pic 12175584Srunot to use zero-length lines to draw dots in troff mode. 12275584Sru.TP 12375584Sru.B \-t 12475584Sru\*(tx mode. 12575584Sru.TP 12675584Sru.B \-c 12775584SruBe more compatible with 12875584Sru.BR tpic . 12975584SruImplies 13075584Sru.BR \-t . 13175584SruLines beginning with 13275584Sru.B \e 13375584Sruare not passed through transparently. 13475584SruLines beginning with 13575584Sru.B . 13675584Sruare passed through with the initial 13775584Sru.B . 13875584Sruchanged to 13975584Sru.BR \e . 14075584SruA line beginning with 14175584Sru.B .ps 14275584Sruis given special treatment: 14375584Sruit takes an optional integer argument specifying 14475584Sruthe line thickness (pen size) in milliinches; 14575584Srua missing argument restores the previous line thickness; 14675584Sruthe default line thickness is 8 milliinches. 14775584SruThe line thickness thus specified takes effect only 14875584Sruwhen a non-negative line thickness has not been 14975584Sruspecified by use of the 15075584Sru.B thickness 15175584Sruattribute or by setting the 15275584Sru.B linethick 15375584Sruvariable. 15475584Sru.TP 15575584Sru.B \-v 15675584SruPrint the version number. 15775584Sru.TP 15875584Sru.B \-z 15975584SruIn \*(tx mode draw dots using zero-length lines. 16075584Sru.LP 16175584SruThe following options supported by other versions of 16275584Sru.B pic 16375584Sruare ignored: 16475584Sru.TP 16575584Sru.B \-D 16675584SruDraw all lines using the \eD escape sequence. 16775584Sru.B pic 16875584Srualways does this. 16975584Sru.TP 17075584Sru.BI \-T \ dev 17175584SruGenerate output for the 17275584Sru.B troff 17375584Srudevice 17475584Sru.IR dev . 17575584SruThis is unnecessary because the 17675584Sru.B troff 17775584Sruoutput generated by 17875584Sru.B pic 17975584Sruis device-independent. 18075584Sru.SH USAGE 18175584SruThis section describes only the differences between GNU 18275584Sru.B pic 18375584Sruand the original version of 18475584Sru.BR pic . 18575584SruMany of these differences also apply to newer versions of Unix 18675584Sru.BR pic . 18775584Sru.SS \*(tx mode 18875584Sru.LP 18975584Sru\*(tx mode is enabled by the 19075584Sru.B \-t 19175584Sruoption. 19275584SruIn \*(tx mode, 19375584Sru.B pic 19475584Sruwill define a vbox called 19575584Sru.B \egraph 19675584Srufor each picture. 19775584SruYou must yourself print that vbox using, for example, the command 19875584Sru.RS 19975584Sru.LP 20075584Sru.B 20175584Sru\ecenterline{\ebox\egraph} 20275584Sru.RE 20375584Sru.LP 20475584SruActually, since the vbox has a height of zero this will produce 20575584Sruslightly more vertical space above the picture than below it; 20675584Sru.RS 20775584Sru.LP 20875584Sru.B 20975584Sru\ecenterline{\eraise 1em\ebox\egraph} 21075584Sru.RE 21175584Sru.LP 21275584Sruwould avoid this. 21375584Sru.LP 21475584SruYou must use a \*(tx driver that supports the 21575584Sru.B tpic 21675584Sruspecials, version 2. 21775584Sru.LP 21875584SruLines beginning with 21975584Sru.B \e 22075584Sruare passed through transparently; a 22175584Sru.B % 22275584Sruis added to the end of the line to avoid unwanted spaces. 22375584SruYou can safely use this feature to change fonts or to 22475584Sruchange the value of 22575584Sru.BR \ebaselineskip . 22675584SruAnything else may well produce undesirable results; use at your own risk. 22775584SruLines beginning with a period are not given any special treatment. 22875584Sru.SS Commands 22975584Sru.TP 23075584Sru\fBfor\fR \fIvariable\fR \fB=\fR \fIexpr1\fR \fBto\fR \fIexpr2\fR \ 23175584Sru[\fBby\fR [\fB*\fR]\fIexpr3\fR] \fBdo\fR \fIX\fR \fIbody\fR \fIX\fR 23275584SruSet 23375584Sru.I variable 23475584Sruto 23575584Sru.IR expr1 . 23675584SruWhile the value of 23775584Sru.I variable 23875584Sruis less than or equal to 23975584Sru.IR expr2 , 24075584Srudo 24175584Sru.I body 24275584Sruand increment 24375584Sru.I variable 24475584Sruby 24575584Sru.IR expr3 ; 24675584Sruif 24775584Sru.B by 24875584Sruis not given, increment 24975584Sru.I variable 25075584Sruby 1. 25175584SruIf 25275584Sru.I expr3 25375584Sruis prefixed by 25475584Sru.B * 25575584Sruthen 25675584Sru.I variable 25775584Sruwill instead be multiplied by 25875584Sru.IR expr3 . 25975584Sru.I X 26075584Srucan be any character not occurring in 26175584Sru.IR body . 26275584Sru.TP 26375584Sru\fBif\fR \fIexpr\fR \fBthen\fR \fIX\fR \fIif-true\fR \fIX\fR \ 26475584Sru[\fBelse\fR \fIY\fR \fIif-false\fR \fIY\fR] 26575584SruEvaluate 26675584Sru.IR expr ; 26775584Sruif it is non-zero then do 26875584Sru.IR if-true , 26975584Sruotherwise do 27075584Sru.IR if-false . 27175584Sru.I X 27275584Srucan be any character not occurring in 27375584Sru.IR if-true . 27475584Sru.I Y 27575584Srucan be any character not occurring in 27675584Sru.IR if-false . 27775584Sru.TP 27875584Sru\fBprint\fR \fIarg\fR\|.\|.\|. 27975584SruConcatenate the arguments and print as a line on stderr. 28075584SruEach 28175584Sru.I arg 28275584Srumust be an expression, a position, or text. 28375584SruThis is useful for debugging. 28475584Sru.TP 28575584Sru\fBcommand\fR \fIarg\fR\|.\|.\|. 28675584SruConcatenate the arguments 28775584Sruand pass them through as a line to troff or\*(tx. 28875584SruEach 28975584Sru.I arg 29075584Srumust be an expression, a position, or text. 29175584SruThis has a similar effect to a line beginning with 29275584Sru.B . 29375584Sruor 29475584Sru.BR \e , 29575584Srubut allows the values of variables to be passed through. 29675584Sru.TP 29775584Sru\fBsh\fR \fIX\fR \fIcommand\fR \fIX\fR 29875584SruPass 29975584Sru.I command 30075584Sruto a shell. 30175584Sru.I X 30275584Srucan be any character not occurring in 30375584Sru.IR command . 30475584Sru.TP 30575584Sru\fBcopy\fR \fB"\fIfilename\fB"\fR 30675584SruInclude 30775584Sru.I filename 30875584Sruat this point in the file. 30975584Sru.TP 31075584Sru\fBcopy\fR [\fB"\fIfilename\fB"\fR] \fBthru\fR \fIX\fR \fIbody\fR \fIX\fR \ 31175584Sru[\fBuntil\fR \fB"\fIword\*(ic\fB"\fR] 31275584Sru.ns 31375584Sru.TP 31475584Sru\fBcopy\fR [\fB"\fIfilename\fB"\fR] \fBthru\fR \fImacro\fR \ 31575584Sru[\fBuntil\fR \fB"\fIword\*(ic\fB"\fR] 31675584SruThis construct does 31775584Sru.I body 31875584Sruonce for each line of 31975584Sru.IR filename ; 32075584Sruthe line is split into blank-delimited words, 32175584Sruand occurrences of 32275584Sru.BI $ i 32375584Sruin 32475584Sru.IR body , 32575584Srufor 32675584Sru.I i 32775584Srubetween 1 and 9, 32875584Sruare replaced by the 32975584Sru.IR i -th 33075584Sruword of the line. 33175584SruIf 33275584Sru.I filename 33375584Sruis not given, lines are taken from the current input up to 33475584Sru.BR .PE . 33575584SruIf an 33675584Sru.B until 33775584Sruclause is specified, 33875584Srulines will be read only until a line the first word of which is 33975584Sru.IR word ; 34075584Sruthat line will then be discarded. 34175584Sru.I X 34275584Srucan be any character not occurring in 34375584Sru.IR body . 34475584SruFor example, 34575584Sru.RS 34675584Sru.IP 34775584Sru.ft B 34875584Sru.nf 34975584Sru\&.PS 35075584Srucopy thru % circle at ($1,$2) % until "END" 35175584Sru1 2 35275584Sru3 4 35375584Sru5 6 35475584SruEND 35575584Srubox 35675584Sru\&.PE 35775584Sru.ft 35875584Sru.fi 35975584Sru.RE 36075584Sru.IP 36175584Sruis equivalent to 36275584Sru.RS 36375584Sru.IP 36475584Sru.ft B 36575584Sru.nf 36675584Sru\&.PS 36775584Srucircle at (1,2) 36875584Srucircle at (3,4) 36975584Srucircle at (5,6) 37075584Srubox 37175584Sru\&.PE 37275584Sru.ft 37375584Sru.fi 37475584Sru.RE 37575584Sru.IP 37675584SruThe commands to be performed for each line can also be taken 37775584Srufrom a macro defined earlier by giving the name of the macro 37875584Sruas the argument to 37975584Sru.BR thru . 38075584Sru.LP 38175584Sru.B reset 38275584Sru.br 38375584Sru.ns 38475584Sru.TP 38575584Sru\fBreset\fI variable1\fB,\fI variable2 .\^.\^. 38675584SruReset pre-defined variables 38775584Sru.IR variable1 , 38875584Sru.I variable2 38975584Sru\&.\^.\^. to their default values. 39075584SruIf no arguments are given, reset all pre-defined variables 39175584Sruto their default values. 39275584SruNote that assigning a value to 39375584Sru.B scale 39475584Srualso causes all pre-defined variables that control dimensions 39575584Sruto be reset to their default values times the new value of scale. 39675584Sru.TP 39775584Sru\fBplot\fR \fIexpr\fR [\fB"\fItext\*(ic\fB"\fR] 39875584SruThis is a text object which is constructed by using 39975584Sru.I text 40075584Sruas a format string for sprintf 40175584Sruwith an argument of 40275584Sru.IR expr . 40375584SruIf 40475584Sru.I text 40575584Sruis omitted a format string of 40675584Sru.B "\(ts%g\(ts" 40775584Sruis used. 40875584SruAttributes can be specified in the same way as for a normal text 40975584Sruobject. 41075584SruBe very careful that you specify an appropriate format string; 41175584Sru.B pic 41275584Srudoes only very limited checking of the string. 41375584SruThis is deprecated in favour of 41475584Sru.BR sprintf . 41575584Sru.TP 41675584Sru.IB variable := expr 41775584SruThis is similar to 41875584Sru.B = 41975584Sruexcept 42075584Sru.I variable 42175584Srumust already be defined, 42275584Sruand the value of 42375584Sru.I variable 42475584Sruwill be changed only in the innermost block in which it is defined. 42575584Sru(By contrast, 42675584Sru.B = 42775584Srudefines the variable in the current block if it is not already defined there, 42875584Sruand then changes the value in the current block.) 42975584Sru.LP 43075584SruArguments of the form 43175584Sru.IP 43275584Sru.IR X\ anything\ X 43375584Sru.LP 43475584Sruare also allowed to be of the form 43575584Sru.IP 43675584Sru.BI {\ anything\ } 43775584Sru.LP 43875584SruIn this case 43975584Sru.I anything 44075584Srucan contain balanced occurrences of 44175584Sru.B { 44275584Sruand 44375584Sru.BR } . 44475584SruStrings may contain 44575584Sru.I X 44675584Sruor imbalanced occurrences of 44775584Sru.B { 44875584Sruand 44975584Sru.BR } . 45075584Sru.SS Expressions 45175584SruThe syntax for expressions has been significantly extended: 45275584Sru.LP 45375584Sru.IB x\ ^\ y 45475584Sru(exponentiation) 45575584Sru.br 45675584Sru.BI sin( x ) 45775584Sru.br 45875584Sru.BI cos( x ) 45975584Sru.br 46075584Sru.BI atan2( y , \ x ) 46175584Sru.br 46275584Sru.BI log( x ) 46375584Sru(base 10) 46475584Sru.br 46575584Sru.BI exp( x ) 46675584Sru(base 10, ie 10\v'-.4m'\fIx\*(ic\fR\v'.4m') 46775584Sru.br 46875584Sru.BI sqrt( x ) 46975584Sru.br 47075584Sru.BI int( x ) 47175584Sru.br 47275584Sru.B rand() 47375584Sru(return a random number between 0 and 1) 47475584Sru.br 47575584Sru.BI rand( x ) 47675584Sru(return a random number between 1 and 47775584Sru.IR x ; 47875584Srudeprecated) 47975584Sru.br 48075584Sru.BI srand( x ) 48175584Sru(set the random number seed) 48275584Sru.br 48375584Sru.BI max( e1 , \ e2 ) 48475584Sru.br 48575584Sru.BI min( e1 , \ e2 ) 48675584Sru.br 48775584Sru.BI ! e 48875584Sru.br 48975584Sru\fIe1\fB && \fIe2\fR 49075584Sru.br 49175584Sru\fIe1\fB || \fIe2\fR 49275584Sru.br 49375584Sru\fIe1\fB == \fIe2\fR 49475584Sru.br 49575584Sru\fIe1\fB != \fIe2\fR 49675584Sru.br 49775584Sru\fIe1\fB >= \fIe2\fR 49875584Sru.br 49975584Sru\fIe1\fB > \fIe2\fR 50075584Sru.br 50175584Sru\fIe1\fB <= \fIe2\fR 50275584Sru.br 50375584Sru\fIe1\fB < \fIe2\fR 50475584Sru.br 50575584Sru\fB"\fIstr1\*(ic\fB" == "\fIstr2\*(ic\fB"\fR 50675584Sru.br 50775584Sru\fB"\fIstr1\*(ic\fB" != "\fIstr2\*(ic\fB"\fR 50875584Sru.br 50975584Sru.LP 51075584SruString comparison expressions must be parenthesised in some contexts 51175584Sruto avoid ambiguity. 51275584Sru.SS Other Changes 51375584Sru.LP 51475584SruA bare expression, 51575584Sru.IR expr , 51675584Sruis acceptable as an attribute; 51775584Sruit is equivalent to 51875584Sru.IR dir\ expr , 51975584Sruwhere 52075584Sru.I dir 52175584Sruis the current direction. 52275584SruFor example 52375584Sru.IP 52475584Sru.B line 2i 52575584Sru.LP 52675584Srumeans draw a line 2 inches long in the current direction. 52775584Sru.LP 52875584SruThe maximum width and height of the picture are taken from the variables 52975584Sru.B maxpswid 53075584Sruand 53175584Sru.BR maxpsht . 53275584SruInitially these have values 8.5 and 11. 53375584Sru.LP 53475584SruScientific notation is allowed for numbers. 53575584SruFor example 53675584Sru.RS 53775584Sru.B 53875584Srux = 5e\-2 53975584Sru.RE 54075584Sru.LP 54175584SruText attributes can be compounded. 54275584SruFor example, 54375584Sru.RS 54475584Sru.B 54575584Sru"foo" above ljust 54675584Sru.RE 54775584Sruis legal. 54875584Sru.LP 54975584SruThere is no limit to the depth to which blocks can be examined. 55075584SruFor example, 55175584Sru.RS 55275584Sru.B 55375584Sru[A: [B: [C: box ]]] with .A.B.C.sw at 1,2 55475584Sru.br 55575584Sru.B 55675584Srucircle at last [\^].A.B.C 55775584Sru.RE 55875584Sruis acceptable. 55975584Sru.LP 56075584SruArcs now have compass points 56175584Srudetermined by the circle of which the arc is a part. 56275584Sru.LP 56375584SruCircles and arcs can be dotted or dashed. 56475584SruIn \*(tx mode splines can be dotted or dashed. 56575584Sru.LP 56675584SruBoxes can have rounded corners. 56775584SruThe 56875584Sru.B rad 56975584Sruattribute specifies the radius of the quarter-circles at each corner. 57075584SruIf no 57175584Sru.B rad 57275584Sruor 57375584Sru.B diam 57475584Sruattribute is given, a radius of 57575584Sru.B boxrad 57675584Sruis used. 57775584SruInitially, 57875584Sru.B boxrad 57975584Sruhas a value of 0. 58075584SruA box with rounded corners can be dotted or dashed. 58175584Sru.LP 58275584SruThe 58375584Sru.B .PS 58475584Sruline can have a second argument specifying a maximum height for 58575584Sruthe picture. 58675584SruIf the width of zero is specified the width will be ignored in computing 58775584Sruthe scaling factor for the picture. 58875584SruNote that GNU 58975584Sru.B pic 59075584Sruwill always scale a picture by the same amount vertically as horizontally. 59175584SruThis is different from the 59275584Sru.SM DWB 59375584Sru2.0 59475584Sru.B pic 59575584Sruwhich may scale a picture by a different amount vertically than 59675584Sruhorizontally if a height is specified. 59775584Sru.LP 59875584SruEach text object has an invisible box associated with it. 59975584SruThe compass points of a text object are determined by this box. 60075584SruThe implicit motion associated with the object is also determined 60175584Sruby this box. 60275584SruThe dimensions of this box are taken from the width and height attributes; 60375584Sruif the width attribute is not supplied then the width will be taken to be 60475584Sru.BR textwid ; 60575584Sruif the height attribute is not supplied then the height will be taken to be 60675584Sruthe number of text strings associated with the object 60775584Srutimes 60875584Sru.BR textht . 60975584SruInitially 61075584Sru.B textwid 61175584Sruand 61275584Sru.B textht 61375584Sruhave a value of 0. 61475584Sru.LP 61575584SruIn places where a quoted text string can be used, 61675584Sruan expression of the form 61775584Sru.IP 61875584Sru.BI sprintf(\(ts format \(ts,\ arg ,\fR.\|.\|.\fB) 61975584Sru.LP 62075584Srucan also be used; 62175584Sruthis will produce the arguments formatted according to 62275584Sru.IR format , 62375584Sruwhich should be a string as described in 62475584Sru.BR printf (3) 62575584Sruappropriate for the number of arguments supplied, 62675584Sruusing only the 62775584Sru.BR e , 62875584Sru.BR f , 62975584Sru.B g 63075584Sruor 63175584Sru.B % 63275584Sruformat characters. 63375584Sru.LP 63475584SruThe thickness of the lines used to draw objects is controlled by the 63575584Sru.B linethick 63675584Sruvariable. 63775584SruThis gives the thickness of lines in points. 63875584SruA negative value means use the default thickness: 63975584Sruin \*(tx output mode, this means use a thickness of 8 milliinches; 64075584Sruin \*(tx output mode with the 64175584Sru.B -c 64275584Sruoption, this means use the line thickness specified by 64375584Sru.B .ps 64475584Srulines; 64575584Sruin troff output mode, this means use a thickness proportional 64675584Sruto the pointsize. 64775584SruA zero value means draw the thinnest possible line supported by 64875584Sruthe output device. 64975584SruInitially it has a value of -1. 65075584SruThere is also a 65175584Sru.BR thick [ ness ] 65275584Sruattribute. 65375584SruFor example, 65475584Sru.RS 65575584Sru.LP 65675584Sru.B circle thickness 1.5 65775584Sru.RE 65875584Sru.LP 65975584Sruwould draw a circle using a line with a thickness of 1.5 points. 66075584SruThe thickness of lines is not affected by the 66175584Sruvalue of the 66275584Sru.B scale 66375584Sruvariable, nor by the width or height given in the 66475584Sru.B .PS 66575584Sruline. 66675584Sru.LP 66775584SruBoxes (including boxes with rounded corners), 66875584Srucircles and ellipses can be filled by giving then an attribute of 66975584Sru.BR fill [ ed ]. 67075584SruThis takes an optional argument of an expression with a value between 67175584Sru0 and 1; 0 will fill it with white, 1 with black, values in between 67275584Sruwith a proportionally gray shade. 67375584SruA value greater than 1 can also be used: 67475584Sruthis means fill with the 67575584Srushade of gray that is currently being used for text and lines. 67675584SruNormally this will be black, but output devices may provide 67775584Srua mechanism for changing this. 67875584SruWithout an argument, then the value of the variable 67975584Sru.B fillval 68075584Sruwill be used. 68175584SruInitially this has a value of 0.5. 68275584SruThe invisible attribute does not affect the filling of objects. 68375584SruAny text associated with a filled object will be added after the 68475584Sruobject has been filled, so that the text will not be obscured 68575584Sruby the filling. 68675584Sru.LP 68775584SruArrow heads will be drawn as solid triangles if the variable 68875584Sru.B arrowhead 68975584Sruis non-zero and either \*(tx mode is enabled or 69075584Sruthe 69175584Sru.B \-x 69275584Sruoption has been given. 69375584SruInitially 69475584Sru.B arrowhead 69575584Sruhas a value of 1. 69675584Sru.LP 69775584SruThe troff output of 69875584Sru.B pic 69975584Sruis device-independent. 70075584SruThe 70175584Sru.B \-T 70275584Sruoption is therefore redundant. 70375584SruAll numbers are taken to be in inches; numbers are never interpreted 70475584Sruto be in troff machine units. 70575584Sru.LP 70675584SruObjects can have an 70775584Sru.B aligned 70875584Sruattribute. 70975584SruThis will only work when the postprocessor is 71075584Sru.BR grops . 71175584SruAny text associated with an object having the 71275584Sru.B aligned 71375584Sruattribute will be rotated about the center of the object 71475584Sruso that it is aligned in the direction from the start point 71575584Sruto the end point of the object. 71675584SruNote that this attribute will have no effect for objects whose start and 71775584Sruend points are coincident. 71875584Sru.LP 71975584SruIn places where 72075584Sru.IB n th 72175584Sruis allowed 72275584Sru.BI ` expr 'th 72375584Sruis also allowed. 72475584SruNote that 72575584Sru.B 'th 72675584Sruis a single token: no space is allowed between the 72775584Sru.B ' 72875584Sruand the 72975584Sru.BR th . 73075584SruFor example, 73175584Sru.IP 73275584Sru.B 73375584Sru.nf 73475584Srufor i = 1 to 4 do { 73575584Sru line from `i'th box.nw to `i+1'th box.se 73675584Sru} 73775584Sru.fi 73875584Sru.SH CONVERSION 73975584SruTo obtain a stand-alone picture from a 74075584Sru.B pic 74175584Srufile, enclose your 74275584Sru.B pic 74375584Srucode with 74475584Sru.B .PS 74575584Sruand 74675584Sru.B .PE 74775584Srurequests; 74875584Sru.B roff 74975584Sruconfiguration commands may be added at the beginning of the file, but no 75075584Sru.B roff 75175584Srutext. 75275584Sru.LP 75375584SruIt is necessary to feed this file into 75475584Sru.B groff 75575584Sruwithout adding any page information, so you must check which 75675584Sru.B .PS 75775584Sruand 75875584Sru.B .PE 75975584Srurequests are actually called. 76075584SruFor example, the mm macro package adds a page number, which is very 76175584Sruannoying. 76275584SruAt the moment, calling standard 76375584Sru.B groff 76475584Sruwithout any macro package works. 76575584SruAlternatively, you can define your own requests, e.g. to do nothing: 76675584Sru.LP 76775584Sru.RS 76875584Sru.nf 76975584Sru.ft B 77075584Sru\&.de PS 77175584Sru\&.. 77275584Sru\&.de PE 77375584Sru\&.. 77475584Sru.ft 77575584Sru.fi 77675584Sru.RE 77775584Sru.LP 77875584Sru.B groff 77975584Sruitself does not provide direct conversion into other graphics file 78075584Sruformats. 78175584SruBut there are lots of possibilities if you first transform your picture 78275584Sruinto PostScript\*R format using the 78375584Sru.B groff 78475584Sruoption 78575584Sru.BR -Tps . 78675584SruSince this 78775584Sru.IR ps -file 78875584Srulacks BoundingBox information it is not very useful by itself, but it 78975584Srumay be fed into other conversion programs, usually named 79075584Sru.BI ps2 other 79175584Sruor 79275584Sru.BI psto other 79375584Sruor the like. 79475584SruMoreover, the PostScript interpreter 79575584Sru.B ghostscript 79675584Sru.RB ( gs ) 79775584Sruhas built-in graphics conversion devices that are called with the option 79875584Sru.LP 79975584Sru.RS 80075584Sru.BI "gs -sDEVICE=" <devname> 80175584Sru.RE 80275584Sru.LP 80375584SruCall 80475584Sru.RS 80575584Sru.B gs --help 80675584Sru.RE 80775584Sru.LP 80875584Srufor a list of the available devices. 80975584Sru.LP 81075584SruAs the Encapsulated PostScript File Format 81175584Sru.B EPS 81275584Sruis getting more and more important, and the conversion wasn't regarded 81375584Srutrivial in the past you might be interested to know that there is a 81475584Sruconversion tool named 81575584Sru.B ps2eps 81675584Sruwhich does the right job. 81775584SruIt is much better than the tool 81875584Sru.B ps2epsi 81975584Srupackaged with 82075584Sru.BR gs . 82175584Sru.LP 82275584SruFor bitmapped graphic formats, you should use 82375584Sru.BR pstopnm ; 82475584Sruthe resulting (intermediate) 82575584Sru.B PNM 82675584Srufile can be then converted to virtually any graphics format using the tools 82775584Sruof the 82875584Sru.B netpbm 82975584Srupackage . 83075584Sru.SH FILES 83175584Sru.Tp \w'\fB@MACRODIR@/pic.tmac'u+3n 83275584Sru.B 83375584Sru@MACRODIR@/pic.tmac 83475584SruExample definitions of the 83575584Sru.B PS 83675584Sruand 83775584Sru.B PE 83875584Srumacros. 83975584Sru.SH "SEE ALSO" 84075584Sru.BR @g@troff (@MAN1EXT@), 84175584Sru.BR groff_out (@MAN5EXT@), 84275584Sru.BR tex (1), 84375584Sru.BR gs (1), 84475584Sru.BR ps2eps (1), 84575584Sru.BR pstopnm (1), 84675584Sru.BR ps2epsi (1), 84775584Sru.BR pnm (5) 84875584Sru.LP 84975584SruTpic: Pic for \*(tx 85075584Sru.LP 85175584SruBrian W. Kernighan, 85275584SruPIC \(em A Graphics Language for Typesetting (User Manual). 85375584SruAT&T Bell Laboratories, Computing Science Technical Report No.\ 116 85475584Sru<URL:http://cm.bell-labs.com/cm/cs/cstr/116.ps.gz> 85575584Sru(revised May, 1991). 85675584Sru.LP 85775584Sru.B ps2eps 85875584Sruis available from CTAN mirrors, e.g. 85975584Sru.br 86075584Sru<ftp://ftp.dante.de/tex-archive/support/ps2eps/> 86175584Sru.LP 86275584SruW. Richard Stevens - Turning PIC Into HTML 86375584Sru.br 86475584Sru<http://www.kohala.com/start/troff/pic2html.html> 86575584Sru.LP 86675584SruW. Richard Stevens - Examples of picMacros 86775584Sru.br 86875584Sru<http://www.kohala.com/start/troff/pic.examples.ps> 86975584Sru.SH BUGS 87075584Sru.LP 87175584SruInput characters that are illegal for 87275584Sru.B groff 87375584Sru(ie those with 87475584Sru.SM ASCII 87575584Srucode 0 or between 013 and 037 octal or between 0200 and 0237 octal) 87675584Sruare rejected even in \*(tx mode. 87775584Sru.LP 87875584SruThe interpretation of 87975584Sru.B fillval 88075584Sruis incompatible with the pic in 10th edition Unix, 88175584Sruwhich interprets 0 as black and 1 as white. 88275584Sru.LP 88375584SruPostScript\*R is a registered trademark of Adobe Systems Incorporation. 88479543Sru. 88579543Sru.\" Local Variables: 88679543Sru.\" mode: nroff 88779543Sru.\" End: 888