XFIG(1) User Commands XFIG(1) NAME xfig - Facility for Interactive Generation of figures under X11 SYNOPSIS xfig [_o_p_t_i_o_n_s] [_f_i_l_e] DESCRIPTION _X_f_i_g is a menu-driven tool that allows the user to draw and manipulate objects interactively in an X window. It runs under X version 11 release 4 or higher and requires a two- or three-button mouse. _f_i_l_e specifies the name of a file to be edited. The description of objects in the file will be read at the start of _x_f_i_g. When using a two-button mouse use the <_M_e_t_a> key and the right button at the same time to effect the action of the middle button. The _T_r_a_n_s_F_i_g package is used to print or export the output from _x_f_i_g. Note for previous _x_f_i_g users: The _f_2_p and _f_2_p_s translators have been phased out because the _T_r_a_n_s_F_i_g package from Micah Beck is a more general purpose translator for more graphics languages. The _T_r_a_n_s_F_i_g package can be used as a back-end processor to _x_f_i_g to produce various types of output: LaTeX _f_i_g_2_d_e_v -_L _l_a_t_e_x translates _x_f_i_g to _L_a_T_e_X picture environment commands which can be processed along with other _L_a_T_e_X commands. PostScript _f_i_g_2_d_e_v -_L _p_s produces a _P_o_s_t_S_c_r_i_p_t output. Pic _f_i_g_2_d_e_v -_L _p_i_c produces a _p_i_c output. PiCTeX _f_i_g_2_d_e_v - _L _p_i_c_t_e_x produces _P_i_C_T_e_X output. This contains macros that can be used with the _P_i_C_T_e_X environment under _T_e_X or _L_a_T_e_X. Others _f_i_g_2_d_e_v has options for these other languages: _b_o_x, _e_p_i_c, _e_e_p_i_c, and _e_e_p_i_c_e_m_u. The _T_r_a_n_s_F_i_g package is available via anonymous ftp from _e_x_p_o_r_t._l_c_s._m_i_t._e_d_u in /contrib/R5fixes/transfig - fixes/transfig.2.1._X.tar.Z, where the _X is the current patchlevel. Note: _T_r_a_n_s_F_i_g versions 2.1.4 and later support color output for _P_o_s_t_S_c_r_i_p_t. SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 1 XFIG(1) User Commands XFIG(1) OPTIONS -L[andscape] Make _x_f_i_g come up in landscape mode (10" x 8"). This is the default. -P[ortrait] Make _x_f_i_g come up in portrait mode (8" x 9"). -bg _c_o_l_o_r Use _c_o_l_o_r as the background color for the canvas and buttons. -bol[d] _f_o_n_t Cause the font used for displaying confirmation messages to be _f_o_n_t (default = 8x13bold). -butt[on] _f_o_n_t Cause the font used for most buttons to be _f_o_n_t (default = 6x13). -but_[per_row] _n_u_m_b_e_r Specify the number of buttons wide the mode panel should be. This is useful in conjunction with the - pheight parameter to reduce the canvas height for small screens. -de[bug] Turn on debugging mode. Prints various debugging messages like font names etc. -e[xportLanguage] _l_a_n_g_u_a_g_e Specifies the language to be used for when exporting a fig file. Choices are: Name Language ------------------------------------------- box LaTeX box (figure boundary) latex LaTeX picture epic LaTeX picture + epic macros eepic LaTeX picture + eepic macros eepicemu LaTeX picture + eepicemu macros pictex PiCTeX macros ibmgl IBMGL (or HPGL) eps Encapuslated PostScript ps PostScript pstex Combined PS/LaTeX (PS part) pstex_t Combined PS/LaTeX (LaTeX part) textyl Textyl special commands tpic TPIC pic PIC xbm X11 Bitmap ------------------------------------------- SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 2 XFIG(1) User Commands XFIG(1) -fg _c_o_l_o_r Use _c_o_l_o_r as the foreground color and default color for objects. -fl[ushleft] Set the print option to print the figure flush left. The default is to center the figure on the page. -geom[etry] _Wx_H+_X+_Y Specifies the geometry for Fig application. -iconG[eometry] +_X+_Y Specifies the position for the icon. -inc[hes] Make inches the unit of choice (default). -me[tric] Make centimeters the unit of choice. After _x_f_i_g is started you may change the units from metric to imperial or vice versa from a popup menu available by pressing mouse button 3 in the _u_n_i_t_s box where the two rulers meet. -internalBW _w_i_d_t_h Use lines of width _w_i_d_t_h between all buttons and panels (default = 1). -inv[erse] Use inverse video (white on black). -k[eyFile] _c_o_m_p_o_s_e-_k_e_y-_f_i_l_e Use _c_o_m_p_o_s_e-_k_e_y-_f_i_l_e instead of _C_o_m_p_K_e_y_D_B for compose (meta) key database. If there are no ``/''s in the name, the file must reside in the _x_f_i_g library directory, $_X_F_I_G_L_I_B_D_I_R, usually /usr/local/lib/X11/xfig. If there are any ``/''s in the name it is taken as is (not relative to $_X_F_I_G_L_I_B_D_I_R). If there is a leading ``~/'' in the string then the ``~'' is expanded to the user's home directory. -lat[exfonts] Start _x_f_i_g with _L_a_T_e_X font selection. Normally, the _P_o_s_t_S_c_r_i_p_t fonts are available as the default. This flag selects the _L_a_T_e_X fonts to start. -le[ft] Change the position of the side panel window to the left of the canvas window. SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 3 XFIG(1) User Commands XFIG(1) -mo[nochrome] Use black and white only. -nor[mal] _f_o_n_t Cause the font used for the message panel and ruler numbers to be _f_o_n_t. This font is also used on the canvas when the selected font is not available in an X11 font (default = fixed). -not[rack] Turn off cursor (mouse) tracking arrows. -ph[eight] _u_n_i_t_s Make _x_f_i_g come up _u_n_i_t_s high (where units are either cm or in). -pw[idth] _u_n_i_t_s Make _x_f_i_g come up _u_n_i_t_s wide (where units are either cm or in). -ri[ght] Change the position of the side panel window to the right of the canvas window (default: left). -sc[alablefonts] Allows use of the X11R5 or OpenWindows scalable fonts (this is the default). If the scalable fonts aren't available _x_f_i_g will automatically switch to non-scaling fonts. -nosc[alablefonts] Disables use of the X11R5 or OpenWindows scalable fonts. You might want to use this for debugging. -sh[owallbuttons] Show all the _x_f_i_g indicator buttons instead of only those relevant to the current drawing mode. Normally, the buttons _l_i_n_e _w_i_d_t_h, _a_r_e_a-_f_i_l_l, _g_r_i_d _m_o_d_e, _t_e_x_t _s_i_z_e, etc. are only visible when they are relevant to the current drawing mode. The - showallbuttons option makes all of the indicator buttons visible at all times. This takes up more screen real estate, but allows the user to see all settable parameters. -sp[ecialtext] Start _x_f_i_g with the _s_p_e_c_i_a_l _t_e_x_t mode for text objects. -startf[ontsize] _p_o_i_n_t_s_i_z_e Set the default font size for text objects (default = 12pt). SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 4 XFIG(1) User Commands XFIG(1) -startl[atexFont] _f_o_n_t Set the starting font name for _L_a_T_e_X fonts. -startp[sFont] _f_o_n_t Set the starting font name for _P_o_s_t_S_c_r_i_p_t fonts. -te[xtoutline] Specifies that _x_f_i_g will draw a red (on color machines) outline of the ``actual'' bounding box of text objects. This is not very useful anymore. In the past it was useful to show you the outline of rotated text since _x_f_i_g didn't display rotated text then. -tr[ack] Turn on cursor (mouse) tracking arrows (default). -users[cale] _s_c_a_l_e Set the multiplier for displayed line lengths etc. This factor is multiplied by the actual length, radius or diameter of the object currently being drawn on the canvas. It is useful for making scale drawings, where e.g. 1 inch = 1 foot (userscale = 12.0) or 1cm = 1m (userscale = 100.0). -useru[nit] _u_n_i_t_s The _u_n_i_t_s string is printed with the length information when drawing objects. For example if the _u_s_e_r_s_c_a_l_e = 1.0 and the _u_s_e_r_u_n_i_t = _f_t then a line which is 3 inches long on the canvas would be displayed as ``length = 3 ft'' when it is being drawn. After _x_f_i_g is started you may change the _u_s_e_r_s_c_a_l_e and the _u_s_e_r_u_n_i_t from a popup menu available by pressing mouse button 3 in the _u_n_i_t_s box where the two rulers meet. GRAPHICAL OBJECTS The objects in _x_f_i_g are divided into primitive objects and compound objects. The primitive objects are: _A_R_C, _C_I_R_C_L_E, _C_L_O_S_E_D _S_P_L_I_N_E, _E_L_L_I_P_S_E, _P_O_L_Y_L_I_N_E, _P_O_L_Y_G_O_N, _E_N_C_A_P_S_U_L_A_T_E_D _P_O_S_T_S_C_R_I_P_T, _B_O_X, _A_R_C-_B_O_X, _S_P_L_I_N_E, and _T_E_X_T. A primitive object can be moved, rotated, flipped vertically or horizontally, scaled, copied, aligned within a compound object or erased. The _T_E_X_T primitive may not be flipped. The attributes of any primitive object can be edited using a popup panel (discussed below), so you can, for instance, set the position of an object manually. A compound object is composed of primitive objects. The primitive objects that constitute a compound can not be individually modified, but they can be manipulated as an SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 5 XFIG(1) User Commands XFIG(1) entity; a compound can be moved, rotated, flipped vertically or horizontally, scaled, copied or erased. A compound that contains any boxes or arc-boxes may only be rotated by 90 degrees. Objects may overlap other objects according to their ``depth''. Objects with larger depth number are obscured by objects with smaller depth. _R_e_g_u_l_a_r polygons may be created using a special drawing mode, but a general _P_O_L_Y_G_O_N is created as a result, which may then be modified, i.e. the individual vertices may be moved if desired. DISPLAY WINDOWS Ten regions comprise the display area of _x_f_i_g: the command region, top ruler, side ruler, drawing mode region, editing mode region, filename region, message region, mouse function indicator region and canvas region, and indicator region with buttons to set and show current line thickness, line style, color, area-fill gray color and several other settings. (The mouse function indicator region was inspired by the UPS debugger from the University of Kent.) The drawing and editing mode regions may be placed (together) to the left or right of the the canvas window (default: left). COMMAND PANEL FUNCTIONS _Q_u_i_t Exit from _x_f_i_g, discarding the figure. If the figure has been modified and not saved, the user will be asked to confirm the action, by clicking mouse button 1 on a confirm/cancel popup menu. The accelerator <_M_e_t_a>_q will also perform this function. This and all other accelerators are defined in the _a_p_p-_d_e_f_a_u_l_t_s file and may be changed if desired. _D_e_l_e_t_e _A_L_L Delete all objects from the canvas window (may be undone). The accelerator <_M_e_t_a>_d will also perform this function. _U_n_d_o Undo the last object creation, deletion or modification. The accelerator <_M_e_t_a>_u will also perform this function. _R_e_d_r_a_w Redraw the canvas. There are also two accelerators which do a redraw - <_M_e_t_a>_r and <_C_t_r_l>_l. _P_a_s_t_e Paste the object previously copied into the cut/paste file into the current figure (at its original position). The accelerator <_M_e_t_a>_t will also perform SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 6 XFIG(1) User Commands XFIG(1) this function. _F_i_l_e Pressing mouse button 3 on this button invokes _S_a_v_e function without popping up the file panel. Mouse button 1 or <_M_e_t_a>_f pops up a panel which contains several file-related functions: _C_u_r_r_e_n_t _F_i_l_e_n_a_m_e This is read-only AsciiTextWidget which contains the filename that will be used to write output to a file _i_f _t_h_e_r_e _i_s _n_o _n_a_m_e _s_p_e_c_i_f_i_e_d _i_n the _F_i_l_e_n_a_m_e panel. _F_i_l_e_n_a_m_e This is an editable AsciiTextWidget which contains the filename selected either by clicking on a filename from the _A_l_t_e_r_n_a_t_i_v_e_s list or by typing a name in directly. Pressing return in the Filename window will _L_o_a_d the file and copy the name to the _C_u_r_r_e_n_t _F_i_l_e_n_a_m_e widget. (_F_i_l_e) _A_l_t_e_r_n_a_t_i_v_e_s Pressing mouse button 1 on a filename in the file alternatives window will select that file by copying the filename into _F_i_l_e_n_a_m_e window. Pressing return in this window will _L_o_a_d the file specified in the _F_i_l_e_n_a_m_e window (if any) or the _C_u_r_r_e_n_t _F_i_l_e_n_a_m_e widget. _F_i_l_e_n_a_m_e _M_a_s_k A wildcard mask may be typed into this editable AsciiTextWidget to restrict the search of filenames to a subset ala the _l_s command. Pressing return in this window will automatically rescan the current directory. This string may be set by setting the X toolkit resource Fig*file_panel*mask*string. _C_u_r_r_e_n_t _D_i_r_e_c_t_o_r_y This is an editable AsciiTextWidget which shows the current directory. It may be modified by the user to manually set a directory name. When return is pressed in this window the directory specified is scanned for files matching the _F_i_l_e_n_a_m_e_m_a_s_k, if any. The ~ (tilde) character may be used to specify a user's home directory, ala unix shell tilde expansion. (_D_i_r_e_c_t_o_r_y) _A_l_t_e_r_n_a_t_i_v_e_s Pressing mouse button 1 on a directory name in the SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 7 XFIG(1) User Commands XFIG(1) directory alternatives list will do a ``change directory'' to that directory. Pressing mouse button 3 in either the file or _D_i_r_e_c_t_o_r_y _A_l_t_e_r_n_a_t_i_v_e_s window will do a ``change directory'' to the parent directory. _H_o_m_e Pressing this button will change the directory to the $_H_O_M_E directory of the user. _R_e_s_c_a_n Pressing this button or <_M_e_t_a>_r will rescan the current directory. _C_a_n_c_e_l Pressing this button or <_M_e_t_a>_c will pop down the _F_i_l_e panel without making any changes to the directory or file name. _S_a_v_e Pressing this button or <_M_e_t_a>_s will save the current contents of the canvas in the file specified in the _F_i_l_e_n_a_m_e window _i_f _a_n_y, or the name specified in the _C_u_r_r_e_n_t _F_i_l_e_n_a_m_e if the former is empty. If the file already exists a confirmation popup menu will appear asking the user to confirm or cancel the save. If there is a filename in the _F_i_l_e_n_a_m_e window it is copied to the _C_u_r_r_e_n_t _F_i_l_e_n_a_m_e window. The current Export directory is updated to the current File directory when Save is pressed. _L_o_a_d Pressing this button or <_M_e_t_a>_l will clear the canvas of any current figure and read the figure from the filename specified in the _F_i_l_e_n_a_m_e menu item _i_f _a_n_y, or the name specified in the _C_u_r_r_e_n_t _F_i_l_e_n_a_m_e if the former is empty. If there is a figure currently on the canvas and any modifications have been made to it and not saved, a popup query window will first appear asking if the user wishes to discard the current figure or cancel the _L_o_a_d operation. The current Export directory is updated to the current File directory when Load is pressed. A popup message window will appear and diagnostic messages will be written if _x_f_i_g changes any ``illegal'' object values to legal values. For example, older versions of _x_f_i_g were lax about initializing unused parts such as _d_e_p_t_h, and would produce very large, random values. _X_f_i_g now will SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 8 XFIG(1) User Commands XFIG(1) ``clean up'' bad values and inform you when it does so. Also, if you read in an older file format, _x_f_i_g will inform you that it is converting it to the current format for that version of _x_f_i_g. This window can be popped down by clicking the mouse button on the _D_i_s_m_i_s_s button. _M_e_r_g_e _R_e_a_d Pressing this button or <_M_e_t_a>_r will read the figure from the filename specified in the _F_i_l_e_n_a_m_e window _i_f _a_n_y, or the name specified in the _C_u_r_r_e_n_t _F_i_l_e_n_a_m_e if the former is empty, and merge it with the figure already shown on the canvas. See _L_o_a_d above for a description of the popup message window. _E_x_p_o_r_t Will let you export the figure to an output file in one of several formats. Pressing mouse button 3 on this button invokes _E_x_p_o_r_t function without popping up the export panel. Mouse button 1 or <_M_e_t_a>_e pops up a directory browser widget and a menu with several export-related functions: _M_a_g_n_i_f_i_c_a_t_i_o_n This is an editable AsciiTextWidget which contains the magnification to use when translating figure to the output language. The default is 100%. _O_r_i_e_n_t_a_t_i_o_n This button will toggle the output orientation between Landscape (horizontal) and Portrait (vertical). The default orientation is the same as the mode that _x_f_i_g was started with. _J_u_s_t_i_f_i_c_a_t_i_o_n This window will only be sensitive when the language selected is ``ps'' (_P_o_s_t_S_c_r_i_p_t). You may choose that the figure is _f_l_u_s_h _l_e_f_t or _c_e_n_t_e_r_e_d in the output file. _L_a_n_g_u_a_g_e The translation language to use for _x_f_i_g output when output is directed to a file. The default is _P_o_s_t_S_c_r_i_p_t. The figure may be saved as an X11 bitmap by choosing _X_b_i_t_m_a_p as the output language. The bitmap is created from the figure, the size of which is determined by the enclosing rectangle of all the figure plus a small border. SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 9 XFIG(1) User Commands XFIG(1) _D_e_f_a_u_l_t _O_u_t_p_u_t _F_i_l_e_n_a_m_e This is read-only AsciiTextWidget which contains the filename that will be used to write output to a file _i_f _t_h_e_r_e _i_s _n_o _n_a_m_e _s_p_e_c_i_f_i_e_d _i_n Output File. The default is the figure name plus an extension that reflects the output language used, e.g. myfigure.ps if _P_o_s_t_S_c_r_i_p_t is the current language used. If the file already exists a confirmation popup menu will appear asking the user to confirm or cancel the save. _O_u_t_p_u_t _F_i_l_e_n_a_m_e This is an editable AsciiTextWidget which contains the filename to use to write output to a file. Pressing return in this window will _E_x_p_o_r_t the file and copy the name to the _D_e_f_a_u_l_t _O_u_t_p_u_t _F_i_l_e_n_a_m_e widget. If the file already exists a confirmation popup menu will appear asking the user to confirm or cancel the save. (_F_i_l_e) _A_l_t_e_r_n_a_t_i_v_e_s Pressing mouse button 1 on a filename in the file alternatives window will select that file by copying the filename into _F_i_l_e_n_a_m_e window. Pressing return in this window will _E_x_p_o_r_t the file and copy the name to the _D_e_f_a_u_l_t _O_u_t_p_u_t _F_i_l_e_n_a_m_e widget. _F_i_l_e_n_a_m_e _M_a_s_k A wildcard mask may be typed into this editable AsciiTextWidget to restrict the search of filenames to a subset ala the _l_s command. Pressing return in this window will automatically rescan the current directory. This string may be set by setting the X toolkit resource Fig*export_panel*mask*string. _C_u_r_r_e_n_t _D_i_r_e_c_t_o_r_y This is an editable AsciiTextWidget which shows the current directory. It may be modified by the user to manually set a directory name. When return is pressed in this window the directory specified is scanned for files matching the _F_i_l_e_n_a_m_e_m_a_s_k, if any. It is automatically updated to follow the current File directory when a File Load or Save is done. The ~ (tilde) character may be used to specify a user's home directory, ala unix shell tilde expansion. SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 10 XFIG(1) User Commands XFIG(1) (_D_i_r_e_c_t_o_r_y) _A_l_t_e_r_n_a_t_i_v_e_s Pressing mouse button 1 on a directory name in the directory alternatives list will do a ``change directory'' to that directory. Pressing mouse button 3 in either the file or _D_i_r_e_c_t_o_r_y _A_l_t_e_r_n_a_t_i_v_e_s window will do a ``change directory'' to the parent directory. _H_o_m_e Pressing this button will change the directory to the $_H_O_M_E directory of the user. _R_e_s_c_a_n Pressing this button or <_M_e_t_a>_r will rescan the current directory. _C_a_n_c_e_l Pressing this button or <_M_e_t_a>_c will pop down the _E_x_p_o_r_t menu without doing any print operation. _E_x_p_o_r_t Pressing this button or <_M_e_t_a>_e will write (export) the figure to the file using the selected language. If the file already exists, a confirmation window will popup to ask the user to confirm the write or cancel. Pressing return in the Output Filename window will also Export the file. _P_r_i_n_t Pressing mouse button 3 on this button invokes _P_r_i_n_t _t_o _P_r_i_n_t_e_r function without popping up the print panel. Pressing the _S_h_i_f_t key and mouse button 3 invokes the _P_r_i_n_t _t_o _B_a_t_c_h function. Pressing mouse button 1 or <_M_e_t_a>_p pops up a menu with several print-related functions: _M_a_g_n_i_f_i_c_a_t_i_o_n This is an AsciiTextWidget which contains the magnification to use when translating figure to the output language. _O_r_i_e_n_t_a_t_i_o_n This button will toggle the output orientation between Landscape (horizontal) and Portrait (vertical). The default orientation is the same as the mode that _x_f_i_g was started with. _J_u_s_t_i_f_i_c_a_t_i_o_n This button will bring up a sub-menu from which you may choose _c_e_n_t_e_r or _f_l_u_s_h _l_e_f_t to justify the figure on the page. The default is _f_l_u_s_h _l_e_f_t. SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 11 XFIG(1) User Commands XFIG(1) _P_r_i_n_t_e_r This is an AsciiTextWidget which contains the printer to use if output is directed to a printer. The name of the printer may be set setting the X toolkit resource Fig*printer*string. If no resource is set, the environment variable _P_R_I_N_T_E_R is used. _P_r_i_n_t _J_o_b _P_a_r_a_m_s This is an AsciiTextWidget which into which you may put any extra command-line parameters that your lpr or lp program needs for printing. _F_i_g_u_r_e_s _i_n _b_a_t_c_h This indicator shows how many figures have been put in the batch file for printing _D_i_s_m_i_s_s Pressing this button or <_M_e_t_a>_c will pop down the _P_r_i_n_t menu. _P_r_i_n_t _F_I_G_U_R_E/_B_A_T_C_H _t_o _P_r_i_n_t_e_r Pressing this button or <_M_e_t_a>_p will send the current figure (or the batch file if it is has any figures in it) to the printer, by passing it through _f_i_g_2_d_e_v to convert it to _P_o_s_t_S_c_r_i_p_t then to the unix _l_p_r (on BSD equivalent Unixes) or _l_p (on SYSV systems) program. If the batch file is printed by this button then it is removed after printing. The message in the button changes to reflect whether the batch file will be printed (when there are any figures in the batch file) or the current figure. Note that the figure that is printed is what you see on the canvas, not necessarily the figure file. I.e., if you haven't saved the figure since the last changes, the figure from the canvas is printed. _X_f_i_g writes the figure to a temporary file to do this. The name of the file is _X_F_I_G_T_M_P_D_I_R/xfig-print_P_I_D, where _X_F_I_G_T_M_P_D_I_R is the value of the environment variable by that name and _P_I_D is the process ID of _x_f_i_g. If the environment variable _X_F_I_G_T_M_P_D_I_R is empty or not set, the /tmp directory is used. _P_r_i_n_t _F_I_G_U_R_E _t_o _B_a_t_c_h Pressing this button or <_M_e_t_a>_b will append the figure (in _P_o_s_t_S_c_r_i_p_t form) to a batch file. The _P_r_i_n_t _t_o _P_r_i_n_t_e_r button will send the batch file to the printer. _C_l_e_a_r _B_a_t_c_h Pressing this button or <_M_e_t_a>_x will erase the SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 12 XFIG(1) User Commands XFIG(1) accumulated figures from the batch file. INDICATOR PANEL COMMAND DESCRIPTIONS The indicator panel contains buttons to set certain drawing parameters such as line thickness, canvas grid, rotation angle etc. All of the buttons use the same mouse buttons for setting values. Pressing mouse button 1 on the indicator will pop up a panel in which either a value may be typed (e.g. for a line thickness) or the mouse may be clicked on one of several buttons (e.g. for grid style or font name). For those that expect a value, pressing return in the value part of the window will set the new value and pop down the menu. Pressing mouse button 2 on an indicator will decrement the value (e.g. for line thickness) or cycle through the options in one direction (e.g. font names), while pressing mouse button 3 will increment the value or cycle through the options in the other direction. _Z_O_O_M _S_C_A_L_E The canvas zoom scale may be set/increased/decreased with this button. The zoom scale is displayed within the zoom button. Ruler, grid and linewidth are scaled, too. Pressing mouse button 2 will decrease the zoom factor by 1.0 unless it is less than 1.0 already in which case it will reduce to the nearest 0.25. Pressing mouse button 3 will increase the zoom factor by 1.0 unless it is less than 1.0 in which case it will increase it to the nearest 0.25. Pressing the control key and mouse button 3 together will set the zoom scale to 1. The figure may also be zoomed by defining a zoom rectangle by pressing the control key and mouse button 1 together. This will define one corner of the zoom rectangle. Move the mouse and click mouse button 1 again to define the opposite corner of the zoom rectangle. _G_R_I_D _M_O_D_E With this button the user may select no grid, 1/4 inch (5mm in metric mode) grid or 1/2 inch (10mm) grid. _P_O_I_N_T _P_O_S_I_T_I_O_N This button controls the coarseness of object placement on the canvas. The options are exact (on pixel) placement, 1/16 inch (2mm in metric mode), 1/4 inch (5mm) or 1/2 inch (10mm). This allows the user to easily place objects in horizontal or vertical alignment. SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 13 XFIG(1) User Commands XFIG(1) This also restricts which objects may be ``picked up'' by the mouse when editing. If a corner of an object is not positioned on the canvas on a multiple of the point positioning resolution you may not be able to pick it. If this happens, a black square will temporarily appear above the mouse cursor. This square will also appear anytime the user tries to pick a nonexistent object. _R_O_T_A_T_I_O_N _A_N_G_L_E The rotation angle for rotating objects may be set/increased/decreased with this button. Note that not all objects may be rotated, and certain objects may only be rotated by certain angles. Pressing mouse button 2 will decrease the angle in steps of 15 degrees, while mouse button 3 will increase the angle the same amount. To select other angles, press mouse button 1 and enter the angle in the popup menu. _D_E_P_T_H The depth at which new objects will be created may be set/increased/decreased with this button. _N_U_M_B_E_R _O_F _P_O_L_Y_G_O_N _S_I_D_E_S The number of sides used in creating a _R_E_G_U_L_A_R _P_O_L_Y_G_O_N is set with this button. _S_M_A_R_T-_L_I_N_K_S _M_O_D_E This button controls the smart-links mode. When turned on, lines which link box-like objects together (henceforth called _l_i_n_k_s) are treated specially when one of the box-like objects is moved. When set to _M_O_V_E mode, the end point of the link which touches (or is very near) the perimeter of the box is moved with the box so that the box and the end point remain linked. When set to _S_L_I_D_E mode, the end segment of the link slides so that the box remains linked and the angle of the end segment is maintained. This is useful for keeping the last segment of a link horizontal or vertical. (At the moment, this mode only works for the _M_O_V_E and _C_O_P_Y functions and only works for _P_O_L_Y_L_I_N_E links and box-like objects. Another limitation at the moment is that if both ends of a link touch the box being operated on, only one end of the link will be adjusted.) _V_E_R_T_I_C_A_L _A_L_I_G_N This sets the vertical alignment mode for the _A_L_I_G_N button in the editing mode panel. The choices are no vertical alignment, align to top edge, middle or bottom edge of compound. The _H_O_R_I_Z_O_N_T_A_L _A_L_I_G_N and _V_E_R_T_I_C_A_L SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 14 XFIG(1) User Commands XFIG(1) _A_L_I_G_N indicator settings are used together to align objects inside a compound or in canvas. _H_O_R_I_Z_O_N_T_A_L _A_L_I_G_N This sets the horizontal alignment mode for the _A_L_I_G_N button in the editing mode panel. The choices are no horizontal alignment, align to left edge, middle or right edge of compound. The _H_O_R_I_Z_O_N_T_A_L _A_L_I_G_N and _V_E_R_T_I_C_A_L _A_L_I_G_N indicator settings are used together to align objects inside a compound or in canvas. _A_N_G_L_E _G_E_O_M_E_T_R_Y The following settings are available to restrict the drawing angle of line segments in _P_O_L_Y_L_I_N_E_S, _P_O_L_Y_G_O_N_S and _S_P_L_I_N_E_S. _U_N_R_E_S_T_R_I_C_T_E_D Allow lines to be drawn with any slope. This is the default setting. _L_A_T_E_X _L_I_N_E Allow lines to be drawn only at slopes which can be handled by _L_a_T_e_X picture environment lines: slope = _x/_y, where x,y are integers in the range [ -6,6]. _L_A_T_E_X _V_E_C_T_O_R Allow lines to be drawn only at slopes which can be handled by _L_a_T_e_X picture environment vectors: slope = _x/_y, where x,y are integers in the range [ -4,4]. _M_A_N_H_A_T_T_A_N-_M_O_U_N_T_A_I_N Allow lines to be drawn in the horizontal, vertical or diagonal direction only. _M_A_N_H_A_T_T_A_N Enforce drawing of lines in the horizontal and vertical direction only. The name _M_a_n_h_a_t_t_a_n comes from the horizontal/vertical look of the Manhattan (New York City) skyline. _M_O_U_N_T_A_I_N Enforce drawing of only diagonal lines. The name comes from the pointed shape of mountains. _F_I_L_L _S_T_Y_L_E This button allows the user to select the area fill darkness (grey scale) for all objects except _T_E_X_T and _E_N_C_A_P_S_U_L_A_T_E_D _P_O_S_T_S_C_R_I_P_T, or to turn off area fill altogether. SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 15 XFIG(1) User Commands XFIG(1) _C_O_L_O_R The user may select one of eight predefined colors to draw with, or select that the _d_e_f_a_u_l_t (-fg) color is to be used. The eight colors are black, blue, green, cyan, red, magenta, yellow and white. Note that _T_r_a_n_s_F_i_g versions 2.1.4 and later support color output for _P_o_s_t_S_c_r_i_p_t. On monochrome screens the objects are created with the selected color, but black is used to draw the objects on the canvas. _L_I_N_E _W_I_D_T_H The width of lines may be selected with this button. Zero width lines may be drawn for the purpose of having filled areas without outlines. _L_I_N_E _S_T_Y_L_E The choices for line style are solid, dashed and dotted. Once created, a dashed or dotted line may be edited to change the length of dashes or the spacing of dots respectively. The dash length and dot gap can be changed from the default using the popup menu. _B_O_X _C_U_R_V_E The radius of the corners on _A_R_C-_B_O_X objects may be set with this button. _A_R_R_O_W _M_O_D_E This button selects the auto-arrow mode for drawing lines. The options are no arrow heads, backward- pointing arrow head, forward-pointing arrow head or both. If one or both arrow head modes are turned on, then arrow heads are automatically drawn when drawing _P_O_L_Y_L_I_N_E, _S_P_L_I_N_E or _A_R_C objects. _T_E_X_T _J_U_S_T_I_F_I_C_A_T_I_O_N The adjustment of text may be set to _l_e_f_t, _c_e_n_t_e_r or _r_i_g_h_t _j_u_s_t_i_f_i_c_a_t_i_o_n. _T_E_X_T _S_I_Z_E The text size may be set/increased/decreased with this button. The default is 12 points. _T_E_X_T _S_T_E_P The interline spacing of text may be set/increased/decreased with this button. The number displayed gives the multiple of the font height that will be placed between lines on hitting <_r_e_t_u_r_n>. The default is a factor of 1.2 times the current font size. _T_E_X_T _F_O_N_T This button allows a selection of 35 fonts available for most Apple _P_o_s_t_S_c_r_i_p_t printers. There are two SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 16 XFIG(1) User Commands XFIG(1) buttons at the top of the menu. The _c_a_n_c_e_l button pops down the menu without changing the current font. The _u_s_e _l_a_t_e_x _f_o_n_t_s will switch the menu to the _L_a_T_e_X font choices. When the _L_a_T_e_X font menu is up, besides a _c_a_n_c_e_l button there is a button to switch back to the _P_o_s_t_S_c_r_i_p_t fonts. The name of the font is printed in the font itself so that one may see what that font looks like. If a corresponding X11 font exists, new text is created on the canvas using that font. _x_f_i_g uses the size of X11 font closest to that selected by the font size button. If the X11 font doesn't exist, _x_f_i_g uses the font selected by the -normal option. To abort selection of a font, click mouse button 1 on _c_a_n_c_e_l. _T_E_X_T _F_L_A_G_S This button displays the current setting of the text flags. You may use mouse buttons 2 and 3 to step back and forth through the three flag settings: _H_i_d_d_e_n, _R_i_g_i_d and _S_p_e_c_i_a_l. To change any of the flags you must use mouse button 1 to popup a menu from which you may change any or all of the flags. The _H_i_d_d_e_n and _S_p_e_c_i_a_l attributes of text objects are used with figures that will be incorporated into _L_a_T_e_X. Please see the documentation for _L_a_T_e_X for further information. The default for the _H_i_d_d_e_n flag is _o_f_f. The default for the _S_p_e_c_i_a_l flag is _o_f_f unless _x_f_i_g is started with the command-line parameter -specialtext (resource specialtext). The _R_i_g_i_d attribute forces text to remain the same size even if inside a compound object that is scaled up or down. The default is _o_f_f. DRAWING AND EDITING MODE PANELS Icons in the drawing and editing mode panel windows represent object manipulation functions, modes and other drawing or modification aids. Manipulation functions are selected by positioning the cursor over the icon representing the desired drawing/editing function and clicking mouse button 1. The selected icon is highlighted, and a message describing its function appears in the message window. The hilighting remains on until another function is selected. DRAWING MODE PANEL COMMAND DESCRIPTIONS The drawing mode panel contains buttons used to create the various _x_f_i_g objects. Once the drawing mode is selected, the object is created by moving the mouse to the point on the canvas where the object is to be placed and pressing and SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 17 XFIG(1) User Commands XFIG(1) releasing mouse button 1. After that the mouse is moved to the second point and mouse button 1 is again pressed for the next point. For those objects which may have more than two points (e.g. a line), mouse button 1 may be pressed for each successive point, and mouse button 2 must be pressed to finish the object. To create a single point using the _P_O_L_Y_L_I_N_E button, press and release mouse button 2. For the _A_R_C object, which requires exactly three points mouse button 1 is used for all three points. At any time mouse button 3 may be pressed to cancel the creation of the object. _A_R_C Create an arc. Specify three points using mouse button 1. The first and last points will form the endpoints of the arc and the second specifies any point on the arc. _B_O_X Create rectangular boxes. Start by clicking mouse button 1 on any corner of the desired box and finish with the same mouse button on the diagonally opposite corner of the box. _A_R_C-_B_O_X Create rectangular boxes with rounded corners. Start and finish with mouse button 1 in the same way as _B_O_X. The radius of the corners is selected by the _B_O_X _C_U_R_V_E button. _C_I_R_C_L_E Create circles by specifying their radii or diameters. Click mouse button 1 on the center of the circle and drag the mouse until the desired radius or diameter is attained. Click mouse button 1 again to finish the circle. _E_L_L_I_P_S_E Create ellipses using the same procedure as for the drawing of circles. _E_N_C_A_P_S_U_L_A_T_E_D _P_O_S_T_S_C_R_I_P_T _O_B_J_E_C_T (_E_P_S) Click mouse button 1 on any corner for the _E_P_S object and finish by clicking mouse button 1 again on the diagonally opposite corner. The _E_D_I_T popup panel will appear and the file name of the _E_P_S object may be entered. After pressing _D_O_N_E or _A_P_P_L_Y (see the description of the _E_D_I_T panel for the difference between the _D_O_N_E and _A_P_P_L_Y buttons) the bitmap part of the _E_P_S object will appear in the box just created. If no _E_P_S file is available yet or no name is entered or there is no _p_r_e_v_i_e_w _b_i_t_m_a_p in the _E_P_S file, pressing _D_O_N_E will pop down the edit panel and the word <_e_m_p_t_y> SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 18 XFIG(1) User Commands XFIG(1) or the _E_P_S file name will remain in the _E_P_S box. Later, when the name of the _E_P_S file is known or the file is available, you may re-read the _E_P_S file using the popup edit panel and the bitmap part of the _E_P_S file will replace the name in the box. If you want the original size of the _E_P_S object, press the ``Use orig size'' button and the eps bitmap will enlarge or shrink to the size specified in the preview bitmap of the _E_P_S file. If you want the _E_P_S object to be approximately the size of the rectangle specified with the mouse but want the aspect ratio to be same as the original, press either ``Shrink to orig'' or ``Enlarge to orig'' buttons. You must press the _A_P_P_L_Y button to see these effects. If the _E_P_S file has no preview bitmap, but has a %%_B_o_u_n_d_i_n_g_B_o_x comment and _x_f_i_g has been compiled with the -DGSBIT flag and you have _G_h_o_s_t_s_c_r_i_p_t (_g_s) version 2.4 or newer then _x_f_i_g will call _G_h_o_s_t_s_c_r_i_p_t to produce a preview bitmap on the screen. _G_h_o_s_t_s_c_r_i_p_t is available from _p_r_e_p._a_i._m_i_t._e_d_u. _I_N_T_E_R_P_O_L_A_T_E_D _S_P_L_I_N_E Create (cubic spline) spline objects. Enter control vectors in the same way as for creation of a _P_O_L_Y_L_I_N_E object. At least three points (two control vectors) must be entered. The spline will pass through the entered points. _P_O_L_Y_L_I_N_E Create polylines (line segments connecting a sequence of points). Enter points by clicking mouse button 1 at the desired positions on the canvas window. Click mouse button 2 to finish. _P_O_L_Y_G_O_N Same as _P_O_L_Y_L_I_N_E except that a line segment is drawn connecting the first and last points entered. _R_E_G_U_L_A_R _P_O_L_Y_G_O_N The number of sides is first selected with the _N_U_M _S_I_D_E_S button in the indicator panel. Then mouse button 1 is clicked on the center and the mouse dragged to the desired size. The object may be rotated as it is being created by moving the mouse up or down relative to the starting point. Click mouse button 1 to finish. _C_L_O_S_E_D _I_N_T_E_R_P_O_L_A_T_E_D _S_P_L_I_N_E Create closed or periodic splines. The function is similar to _P_O_L_Y_G_O_N except that a closed interpolated spline is drawn. The spline will pass through the SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 19 XFIG(1) User Commands XFIG(1) points (knots). _C_L_O_S_E_D _S_P_L_I_N_E Create closed or periodic spline objects. The function is similar to _P_O_L_Y_G_O_N except that a closed spline will be drawn instead of polygon. The entered points are just control points; i.e. the spline will not pass any of these points. _S_P_L_I_N_E Create (quadratic spline) spline objects. Enter control vectors in the same way as for creation of a _P_O_L_Y_L_I_N_E object. At least three points (two control vectors) must be entered. The spline will only pass through the two end points. _T_E_X_T Create text strings. Click mouse button 1 at the desired position on the canvas window, then enter text from the keyboard. Text may be pasted from the PRIMARY cut buffer (_x_t_e_r_m cut/paste buffer) by pressing the _F_1_8 function key (the _P_a_s_t_e key on Sun keyboards) or any key/button defined in the translation table for the canvas. See the default Fig.ad file for example. Text is drawn using the current font, font size and justification settings. A DEL or ^H (backspace) will delete a character, while a ^X will erase the entire line. Finish by clicking mouse button 2 or typing the <_r_e_t_u_r_n> key. If <_r_e_t_u_r_n> is used, the text pointer automatically moves to the next ``line'', a distance of the font height times the value in the _T_E_X_T _S_T_E_P button, and text input mode is re-entered. To finish text fully, click mouse button 2 or choose any panel button that changes modes (e.g. box, save, etc). To edit text, click on an existing text string with mouse button 1. Insertion of characters will take place at that point. Or, use the popup _E_D_I_T mode to modify the text. Eight-bit characters may be entered using the meta (compose) key. For example, to create an ``a umlaut'', hold down the meta key while pressing the letter ``a'', then press " (quote). To create a ``c cedilla'', use c followed by comma. The following is a list of all special characters available using the meta key: Keys Character Name ------------------------------------- !! upside-down exclamation point ?? upside-down question mark C/ cent sign L- British pound OX currency SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 20 XFIG(1) User Commands XFIG(1) Y- yen __ broken vertical bar SO section "" dieresis CO copyright RO registered trademark _a ordfeminine _o ordmasculine << guillemotleft >> guillemotright -| notsign -- hyphen +- plusminus ^- macron ^* degree ^. periodcentered ^1 onesuperior ^2 twosuperior ^3 threesuperior 14 onequarter 12 onehalf 34 threequarters \\ acute ** multiply -: division /u mu P! paragraph A` A accent grave A' A accent acute A^ A accent circumflex A~ A accent tilde A" A dieresis A* A ring AE AE a` a accent grave a' a accent acute a^ a accent circumflex a~ a accent tilde a" a dieresis a* a ring ae ae C, C cedilla c, c cedilla D- Eth d- eth E` E accent grave E' E accent acute E^ E accent circumflex E" E dieresis e` e accent grave e' e accent acute e^ e accent circumflex SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 21 XFIG(1) User Commands XFIG(1) e" e dieresis I` I accent grave I' I accent acute I^ I accent circumflex I" I accent dieresis i` i accent grave i' i accent acute i^ i accent circumflex i" i dieresis N~ N tilde n~ n tilde O` O accent grave O' O accent acute O^ O accent circumflex O~ O accent tilde O" O dieresis O/ O slash o` o accent grave o/ o accent acute o^ o accent circumflex o~ o accent tilde o" o dieresis o/ o slash P| Thorn p| thorn ss German ss (s-zed) U` U accent grave U' U accent acute U^ U accent circumflex U" U dieresis u` u accent grave u' u accent acute u^ u accent circumflex u" u dieresis Y' Y accent acute y' y accent acute y" y dieresis ------------------------------------- EDITING MODE PANEL COMMAND DESCRIPTIONS When a button in the editing mode panel is pressed, any objects that may be affected by that editing operation will show their corner markers. Only those objects may be affected by the particular edit mode. In cases where two edit modes exist for one button, it may be that the corner markers will appear for objects that may be affected by one button but not the other. SELECTING OBJECTS When multiple objects have points in common, e.g. two boxes that touch at one corner, only one object can be selected by clicking on that point. To select other objects, hold down SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 22 XFIG(1) User Commands XFIG(1) the shift key while pressing mouse button 1: the markers of one object will be temporarily highlighted. By repeatedly clicking mouse button 1 while holding down the shift key, it is possible to cycle through all candidates for selection at that point. To perform the selected action, e.g. deleting one box, click on the point without holding down the shift key. The operation will be performed on the highlighted object. Note: If the mouse is not clicked near enough to an object marker or for whatever reason _x_f_i_g cannot ``find'' the object the user is trying to select, a black square will temporarily appear above the mouse cursor. _G_L_U_E _C_O_M_P_O_U_N_D Compound objects are created by first tagging the objects to be compounded and then pressing mouse button 3 to group the tagged objects into a compound object. Single objects are tagged by clicking on them with mouse button 1. A number of objects can be tagged at once by using mouse button 2 to define the upper-left and lower-right corners of a region enclosing the objects. Tagged objects are shown with highlighted markers. Tagged objects which are selected (see the SELECTING OBJECTS section above) will be temporarily unhighlighted. There is currently no special command to tag or untag all of the objects within a figure. You can untag all of the objects by changing from _G_L_U_E mode to some other mode (apart from _B_R_E_A_K) and back again. _B_R_E_A_K _C_O_M_P_O_U_N_D Break a compound object to allow manipulation of its component parts. Click mouse button 1 on one of the corner markers of the compound object or along one of the imaginary lines defining the compound box. Clicking with mouse button 2 will achieve the same effect but will also tag the component parts (although you will not see the tags until you change to the _G_L_U_E mode). You can use this feature to easily alter the objects within a compound. _S_C_A_L_E _O_B_J_E_C_T Any object may be scaled. If mouse button 1 is pressed on a _B_O_X or _A_R_C-_B_O_X object, then that object will be scaled proportionally to its aspect ratio. If mouse button 2 is pressed on any object, that object will be scaled up or down about its center. Text may only be scaled if inside a compound object and then only if its _R_I_G_I_D flag is set to _N_O_R_M_A_L (using the popup edit panel). See the _T_r_a_n_s_F_i_g manual for description of text options. SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 23 XFIG(1) User Commands XFIG(1) _A_L_I_G_N Align objects. Click mouse button 1 to align objects inside a compound object or mouse button 2 to align all objects on canvas according to the setting in the _V_E_R_T_I_C_A_L _A_L_I_G_N and _H_O_R_I_Z_O_N_T_A_L _A_L_I_G_N indicators. The choices are the cumulative effect of vertically aligning the objects to the _T_O_P, _M_I_D_D_LE or _B_O_T_T_OM edge and horizontally aligning to the _L_E_FT, _M_I_D_D_LE or _R_I_G_HT edge of the compound. _M_O_V_E _P_O_I_N_T Modify the position of a point of any object except _T_E_X_T and _C_O_M_P_O_U_N_D objects. For unrestrained movement, click mouse button 1 over the desired point, reposition the point, and click the _l_e_f_t button again. For horizontally or vertically constrained move, click mouse button 2 on the desired point and move either horizontally or vertically. Notice that once you choose the direction (horizontal or vertical), movement is constrained in that direction. If, after moving the mouse initially, it is moved in the other direction a greater distance than the current position of the mouse relative to the starting point, then that will be the new constraint direction. In other words if you first move the mouse _h_o_r_i_z_o_n_t_a_l_l_y one inch (say) then move it _v_e_r_t_i_c_a_l_l_y 1.3 inches, the direction will switch to _v_e_r_t_i_c_a_l until any _h_o_r_i_z_o_n_t_a_l motion exceeds 1.3 inches. When the object is positioned where desired, click mouse button 1 to place it if that button was used to start the move (unconstrained), or mouse button 2 (constrained) if that button was used. _M_O_V_E Move object. Click mouse button 1 (unconstrained move) or mouse button 2 (constrained move) on any corner marker of the object to be moved. The horizontal/vertical constrained movement (mouse button 2) works exactly as described for _M_O_V_E _P_O_I_N_T. _A_D_D _P_O_I_N_T_S Add points to _P_O_L_Y_L_I_N_E, _P_O_L_Y_G_O_N, _S_P_L_I_N_E, or _C_L_O_S_E_D _S_P_L_I_N_E objects (points of a _B_O_X can not be added or deleted). Note that a _R_E_G_U_L_A_R _P_O_L_Y_G_O_N is really an ordinary _P_O_L_Y_G_O_N, so adding points to this object is allowed and does NOT keep the polygon regular. _C_O_P_Y / _C_U_T _T_O _C_U_T _B_U_F_F_E_R Copy object to canvas or cut buffer. Click mouse button 1 (unconstrained copy) or mouse button 2 (constrained copy) on any corner marker of the object to be copied (for _C_I_R_C_L_E and _E_L_L_I_P_S_E objects, mouse may also be clicked on their circumferences). The object will be duplicated and then moved exactly as in _M_O_V_E. SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 24 XFIG(1) User Commands XFIG(1) If mouse button 3 is clicked on an object, that object is copied to the cut buffer for pasting into this or another figure. The file used for the cut buffer is called .xfig in the user's $_H_O_M_E directory. This allows a user to run two or more _x_f_i_g processes and cut/paste objects between them. If there is no $_H_O_M_E, a file is created in a temporary directory called xfig_P_I_D where _P_I_D is the _x_f_i_g process ID. The temporary directory used is specified in the environment variable _X_F_I_G_T_M_P_D_I_R. If that variable is empty or not set then /tmp is used. _D_E_L_E_T_E _P_O_I_N_T_S Delete points from _P_O_L_Y_L_I_N_E, _P_O_L_Y_G_O_N, _S_P_L_I_N_E, or _C_L_O_S_E_D _S_P_L_I_N_E. Objects (points of a _B_O_X or _A_R_C-_B_O_X can not be added or deleted). Note that a _R_E_G_U_L_A_R _P_O_L_Y_G_O_N is really an ordinary _P_O_L_Y_G_O_N, so deleting points from this object is allowed and does NOT keep the polygon regular. _D_E_L_E_T_E Click mouse button 1 on an object to delete the object. Delete a _r_e_g_i_o_n of the canvas by clicking mouse button 2 and dragging the mouse to define an area of objects to delete. Clicking mouse button 3 on an object will copy the object to the cut buffer (see _C_O_P_Y/_C_U_T _T_O _C_U_T _B_U_F_F_E_R above). _E_D_I_T _O_B_J_E_C_T Edit settings for an existing object. Click mouse button 1 on the object and a pop-up menu will appear showing existing settings for the object. Some of the menu entries may be changed by typing new values in the appropriate windows. These are editable Ascii- TextWidgets and allow cut and paste. Others pop up a sub-menu of multiple choices when pressed and held. Yet others are buttons which toggle a setting on or off (e.g. arrow heads on lines). Press the ``done'' button to apply the changes to the object and finish. Press the ``apply'' button to apply the changes but keep the menu up for further changes. Press the ``cancel'' button to cancel the changes and pop down the menu. The following table shows which settings are used for the different objects. SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 25 XFIG(1) User Commands XFIG(1) Object Angle Area Line Line Box Depth|= Color Radius Text Font/ Fill Width Style Curve Just./Size ---------------------------------------------------------------------- Arc +o +o +o +o +o ---------------------------------------------------------------------- Arc-Box +o +o +o +o +o +o ---------------------------------------------------------------------- Circle +o +o +o +o +o +o +o ---------------------------------------------------------------------- Ellipse +o +o +o +o +o +o +o ---------------------------------------------------------------------- EPS +o +o ---------------------------------------------------------------------- Box +o +o +o +o +o ---------------------------------------------------------------------- Polygon +o +o +o +o +o ---------------------------------------------------------------------- Line +o +o +o +o +o ---------------------------------------------------------------------- Spline +o +o +o +o +o ---------------------------------------------------------------------- Text +o +o +o +o ---------------------------------------------------------------------- |= The depth defines how overlapping objects are displayed. Objects with a greater depth value are obstructed by objects with smaller depth value. The maximum depth allowed is 1000. _U_P_D_A_T_E By pressing mouse button 1 on an object, the current settings for the indicator buttons (line width, line style, area fill etc.) which have been selected for update are copied into that object. When _x_f_i_g is started, all indicator buttons which are components of objects are selected for update. To unselect an indicator, click on the update button and click mouse button 1 on the small button in the upper-right corner of the indicator. When that indicator is selected the foreground color (default black) shows. When it is unselected the background color (default white) shows. If mouse button 2 is clicked on an object, the settings in the object that are selected by the indicator buttons are copied into those indicator button settings. Thus, one may copy selected attributes of one object to another. _F_L_I_P _V_E_R_T_I_C_A_L_L_Y Flip the object up/down (mouse button 1) or copy the object and flip it (mouse button 2). Point to part of the object, click the appropriate button. That object SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 26 XFIG(1) User Commands XFIG(1) will be flipped vertically about that point. _F_L_I_P _H_O_R_I_Z_O_N_T_A_L_L_Y Flip the object left/right (mouse button 1) or copy the object and flip it (mouse button 2). Point to part of the object, click the appropriate button. That object will be flipped horizontally about that point. _R_O_T_A_T_E _C_L_O_C_K_W_I_S_E Rotate the object (mouse button 1) or copy and rotate it (mouse button 2) -_N degrees (clockwise), where _N is the amount set in the rotation indicator button. The object is rotated about the chosen point. Not all objects can be rotated, and not all can be rotated at arbitrary angles. For example, _B_O_X, _A_R_C-_B_O_X and _E_P_S objects may only be rotated by 90 degrees. Text objects may be rotated to any angle and will be displayed at any angle now. Older versions of _x_f_i_g (before 2.1.8) could only display horizontal and vertical text (2.1.7) or horizontal only (before 2.1.7). _R_O_T_A_T_E _C_O_U_N_T_E_R-_C_L_O_C_K_W_I_S_E Rotate the object (mouse button 1) or copy (mouse button 2) +_N degrees (counter-clockwise), where _N is the amount set in the rotation indicator button. The object is rotated about the chosen point. _S_P_L_I_N_E <-> _P_O_L_Y_L_I_N_E Turn _P_O_L_Y_G_O_N into a _C_L_O_S_E_D _I_N_T_E_R_P_O_L_A_T_E_D _S_P_L_I_N_E object, or turn _P_O_L_Y_L_I_N_E into a _I_N_T_E_R_P_O_L_A_T_E_D _S_P_L_I_N_E object. _A_D_D/_D_E_L_E_T_E _A_R_R_O_W_S Add or delete arrow heads of _A_R_C, _P_O_L_Y_L_I_N_E or _S_P_L_I_N_E objects. Add an arrow head by clicking mouse button 1 on the endpoint of the object. Delete an arrow head by clicking mouse button 2 on the endpoint or arrow head. The length and thickness of the arrowheads may be modified using the popup edit panel. PANNING The figure may be panned by clicking mouse button 1, 2 or 3 in the rulers. Clicking mouse button 1 in the top ruler will pan the image to the left by 1/2 inch (1cm in metric mode), adjusted for zoom factor. Clicking mouse button 3 in the top ruler will pan the image right by the same amount. By pressing and _h_o_l_d_i_n_g mouse button 2 the user may drag the ruler by the amount desired, thus panning the image by that amount. The figure is panned up and down in the same way by clicking the mouse in the ruler on the right of the canvas. Also, SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 27 XFIG(1) User Commands XFIG(1) the figure can be returned to its origin by clicking mouse button 1 in the units (e.g. _c_m or _i_n) box. The arrow keys may also be used to pan the image and the home key to return the figure to the origin. Also, pressing the Control Key and mouse button 2 will pan the figure to the origin. X DEFAULTS The overall widget name(Class) is xfig(Fig). These resources correspond to the command line arguments: Name Class Type Default Command-line equivalent ------------------------------------------------------------------------ justify Justify boolean false -left (false), -right (true) landscape Orientation boolean true -Landscape, -Portrait but_per_row But_per_row int 2 -but_per_row pwidth Width float 10(8) -pwidth pheight Height float 8(9.5) -pheight trackCursor Track boolean on -track, -notrack inches Inches boolean true -inches, -imperial, -centimeters, -metric reverseVideo ReverseVideo boolean off -inverse debug Debug boolean off -debug latexfonts Latexfonts boolean off -latexfonts normalFont NormalFont string fixed -normal boldFont ButtonFont string 8x13bold -bold startfontsize StartFontSize float 12 -startfontsize startpsFont StartpsFont string Times-Roman -startpsFont startlatexFont StartlatexFont string Default -startlatexFont showallbuttons ShowAllButtons boolean false -showallbuttons internalborderwidth InternalBorderWidth integer 1 -internalBW scalablefonts ScalableFonts boolean true -scalablefonts specialtext SpecialText boolean false -specialtext monochrome Monochrome boolean false -monochrome keyFile KeyFile string CompKeyDB -keyFile exportLanguage ExportLanguage string eps -exportLanguage flushleft FlushLeft boolean false -flushleft textoutline TextOutline boolean false -textoutline userscale UserScale float 1.0 -userscale userunit UserUnit string in(cm) -userunit color0 Color0 pixel black color1 Color1 pixel blue color2 Color2 pixel green color3 Color3 pixel cyan color4 Color4 pixel red SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 28 XFIG(1) User Commands XFIG(1) color5 Color5 pixel magenta color6 Color6 pixel yellow color7 Color7 pixel white ------------------------------------------------------------------------ The following are the default keyboard accelerators as distributed in the Fig.ad app-defaults file: (Context) Keys Function ----------------------------------------------------- (Main xfig panels) q Quit xfig d Delete all objects from canvas u Undo r Redraw l Redraw t pasTe xfig cutbuffer onto canvas f popup File menu e popup Export menu p popup Print menu l (re)Load figure from current file s Save figure to current file (Popup units panel in corner of rulers) c Cancel popup unit panel s Set units (Popup file panel) r Rescan current directory c Cancel l Load figure s Save figure m Merge read into current figure (Popup export panel) r Rescan current dirctory c Cancel e Export figure (Popup print panel) c Cancel b print to Batch file p Print to printer x clear batch file (Canvas) c Draw circle by radius c Draw circle by diameter e Draw ellipse by radius e Draw ellipse by diameter s Draw closed spline SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 29 XFIG(1) User Commands XFIG(1) s Draw open spline i Draw closed interpolated spline i Draw open interpolated spline p Draw polygon l Draw line b Draw box b Draw arcbox p Draw regular polygon r Draw arc p Draw EPS object t Draw text g Glue compound g Break compound s Scale object a Align object in compound m Move point m Move object a Add point to object c Copy object d Delete point from object d Delete object u Update object or indicator panel e Edit object f Flip object up/down f Flip object left/right r Rotate object clockwise r Rotate object counter-clockwise v Convert object to/from line/spline a Add/delete arrowhead WIDGET TREE Below is the widget structure of _x_f_i_g. The widget class name is given first, followed by the widget instance name. Fig xfig Form form Form commands Command quit Command delete_all Command undo Command redraw Command paste Command file Command export Command print Form msg_form Text message Label file_name Label mouse_panel Box mode_panel Label label SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 30 XFIG(1) User Commands XFIG(1) Command button (one for each of the 16 drawing mode buttons) Label label Command button (one for each of the 18 editing mode buttons) Label topruler Label canvas Label unitbox Label sideruler Viewport ind_viewport Core clip Scrollbar horizontal Box ind_panel Box upd_ctrl Command set_upd Command clr_upd Command tog_upd Form button_form (one for each of the 22 indicator buttons) Command button Toggle update (only those indicators that affect creation of objects have update toggles) TransientShell xfig_ps_font_menu Box menu Form buttons Command cancel Command use_latex_fonts Command pane (one for each of the 35 PostScript font panes) TransientShell xfig_latex_font_menu Box menu Form buttons Command cancel Command use_postscript_fonts Command pane (one for each of the 6 LaTeX font panes) TransientShell xfig_file_menu Form file_panel Label file_status Label num_objects Label cur_file_label Text cur_file_name Label file_label Text file_name Label file_alt_label Viewport vport Core clip Scrollbar vertical List file_list_panel Label mask_label Text mask Label dir_label Text dir_name Label dir_alt_label SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 31 XFIG(1) User Commands XFIG(1) Command home Viewport dirvport Core clip Scrollbar vertical List dir_list_panel Command rescan Command cancel Command save Command load Command merge TransientShell xfig_export_menu Form export_panel Label mag_label Text magnification Label orient_label MenuButton orientation SimpleMenu menu SmeBSB Portrait SmeBSB Landscape Label just_label MenuButton justify SimpleMenu menu SmeBSB Flush left SmeBSB Centered Label lang_label MenuButton language SimpleMenu menu SmeBSB LaTeX box (figure boundary) SmeBSB LaTeX picture SmeBSB LaTeX picture + epic macros SmeBSB LaTeX picture + eepic macros SmeBSB LaTeX picture + eepicemu macros SmeBSB PiCTeX macros SmeBSB IBMGL (or HPGL) SmeBSB Encapsulated PostScript SmeBSB PostScript SmeBSB Combined PS/LaTeX (PS part) SmeBSB Combined PS/LaTeX (LaTeX part) SmeBSB Textyl \special commands SmeBSB TPIC SmeBSB PIC SmeBSB X11 Bitmap Label def_file_label Label def_file_name Label out_file_name Text file Label file_alt_label Viewport vport Core clip Scrollbar vertical List file_list_panel SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 32 XFIG(1) User Commands XFIG(1) Label mask_label Text mask Label dir_label Text dir_name Label dir_alt_label Command home Viewport dirvport Core clip Scrollbar vertical List dir_list_panel Command rescan Command cancel Command export TransientShell xfig_print_menu Form print_panel Label printer_image Label mag_label Text magnification Label orient_label MenuButton landscape SimpleMenu menu SmeBSB portrait SmeBSB landscape Label just_label MenuButton justify SimpleMenu menu SmeBSB flush left SmeBSB centered Label print_label Text printer Label job_params_label Text job_params Label num_batch_label Label num_batch Command dismiss Command print Command print_batch Command clear_batch TransientShell xfig_file_msg Form file_msg_panel Text file_msg_win Command dismiss TransientShell query_popup Form query_form Label message Command yes Command no Command cancel SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 33 XFIG(1) User Commands XFIG(1) TransientShell xfig_set_unit_panel Form form Label Unit/Scale settings Label Ruler Units = MenuButton Imperial (in) SimpleMenu menu SmeBSB Metric (cm) SmeBSB Imperial (in) Label Figure units = MenuButton Ruler units SimpleMenu menu SmeBSB Ruler units SmeBSB User defined Label user_units Text Unit/Scale settings Label Figure scale = MenuButton User defined SimpleMenu menu SmeBSB Unity SmeBSB User defined Label scale_factor Text 1.0 Command cancel Command set NOTE: The following is a _t_y_p_i_c_a_l popup edit panel (for _A_R_C-_B_O_X) The panel will be different for other objects. TransientShell xfig_edit_panel Form form Label POLYLINE:ArcBox Label image Command done Command apply Command cancel Label Label Width = Text Width = Label Drawing color = MenuButton colors SimpleMenu menu SmeBSB Black SmeBSB Blue SmeBSB Green SmeBSB Cyan SmeBSB Red SmeBSB Magenta SmeBSB Yellow SmeBSB White SmeBSB Default Label Depth = Text Depth = SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 34 XFIG(1) User Commands XFIG(1) Label Fill style = MenuButton No fill SimpleMenu menu SmeBSB No fill SmeBSB Filled Label Fill intensity % = Text Fill intensity % = Label Line style = MenuButton Solid Line SimpleMenu menu SmeBSB Solid Line SmeBSB Dashed Line SmeBSB Dotted Line Label Dash length/Dot gap = Text Dash length/Dot gap = Label First Corner Label First Corner Text First Corner Label First Corner Text First Corner Label Opposite Corner Label Opposite Corner Text Opposite Corner Label Opposite Corner Text Opposite Corner Label Radius = Text Radius = BUGS and RESTRICTIONS Please send bug reports, fixes, new features etc. to: bvsmith@lbl.gov (Brian V. Smith) Not all operations employ smart redrawing of objects which are altered as a by product of the operation. You may need to use _R_e_d_r_a_w in these cases. Some servers do not allow bitmaps/pixmaps taller than the screen height or wider than the screen width. That is why there is a limit on the width of the top ruler and height of the side ruler. If you need wider/taller rulers AND your server allows bigger pixmaps, you may define MAX_TOPRULER_WD and/or MAX_SIDERULER_HT in your Imakefile in the _D_E_F_I_N_E_S line. For example, to have a maximum top ruler width of 1160 pixels, add -DMAX_TOPRULER_WD=1160 to your _D_E_F_I_N_E_S line in the Imakefile. If the image is panned or the _x_f_i_g window iconified and de- iconified during the middle of an operation (e.g. while drawing a line), the picture will be distorted. This can be corrected using _R_e_d_r_a_w after the operation is complete. SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 35 XFIG(1) User Commands XFIG(1) Corners of object scaled with point positioning in one of the grid modes will not always fall on the grid line, but to the closest pixel. See the README file for troubleshooting. SEE ALSO Brian W. Kernighan _P_I_C - _A _G_r_a_p_h_i_c_s _L_a_n_g_u_a_g_e _f_o_r _T_y_p_e_s_e_t_t_i_n_g _U_s_e_r _M_a_n_u_a_l fig2dev(1) (_T_r_a_n_s_F_i_g package) gs(1) (_G_h_o_s_t_s_c_r_i_p_t PostScript previewer) ACKNOWLEDGEMENT Many thanks goes to Professor Donald E. Fussell who inspired the creation of this tool. COPYRIGHT Original Copyright (c) 1985 by Supoj Sutanthavibul Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about suitability of this software for any purpose. It is provided ``as is'' without express or implied warranty. _P_o_s_t_S_c_r_i_p_t is a trademark of Adobe Systems Incorporated. FILES CompKeyDB Data base of compose (meta) key sequences for 8-bit characters. Must be installed in $(XFIGLIBDIR) with ``make install'', or may be specified with command line option - keyFile or X toolkit resource keyFile. See the _I_m_a_k_e_f_i_l_e. Doc/FORMAT2.1 Description of Fig file format. CHANGES Description of bug fixes/new features. AUTHORS Many people have contributed to _x_f_i_g. Here is a list of the people who have contributed the most (in chronological order): Original author: Supoj Sutanthavibul, University of Texas at Austin SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 36 XFIG(1) User Commands XFIG(1) The _L_a_T_e_X line drawing modes were contributed by: Frank Schmuck, Cornell University Original X11 port by: Ken Yap, Rochester Variable window sizes, cleanup of X11 port, right hand side panel: Dana Chee, Bellcore Cleanup of color port to X11 by: John T. Kohl, MIT Version 2.0: Area fill, multiple line thicknesses, multiple fonts and font sizes, bottom panel, line style/thickness modification of objects by: Brian V. Smith, Lawrence Berkeley Laboratory (standard disclaimer applies) (bvsmith@lbl.gov) Popup change-object menu by: Jon Tombs Frank Schmuck Zooming and panning functions, shift key select mechanism by: Dieter Pellkofer Henning Spruth Depth feature by: Mike Lutz Cut/Paste by: Tom Tkacik Version 2.1: Indicator panel, file menu popup, print menu popup, panning with rulers, mouse function window, regular polygon, rubberbanding of circles/ellipses, filled splines on canvas, dashed/dotted splines on canvas, update button, arbitrary angle rotation of objects, alignment in compound, object scaling, constrained copy/move, corner markers for compound, context sensitive corner markers, smarter redraw, undo for compound and point move for boxes, cancel object creation, point positioning to three resolutions, _T_r_a_n_s_F_i_g scalable text, hidden text, special text, save of figure on crash by: Paul King (king@cs.uq.oz.au) with help from: Brian V. Smith (bvsmith@lbl.gov) and Micah Beck (beck@cs.utk.edu) SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 37 XFIG(1) User Commands XFIG(1) Encapsulated _P_o_s_t_S_c_r_i_p_t importing by: Brian Boyter Color implementation and pan/zoom with ctrl key/mouse by: Henning Spruth International characters by: Herve Soulard Directory Browser based on XDir by: Win Treese, Digital Equipment Corporation Rotated ellipses by: James Tough, Dept. of Computer Science, Heriot-Watt University, Scotland Rotated text from the _x_v_e_r_t_e_x_t package by: Alan Richardson, Space Science Centre, School of MAPS, University of Sussex Popup scale menu and dynamic switching between inches and cm by: Paul King (king@cs.uq.oz.au) Extensive man page formatting revisions by: DaviD W. Sanderson (dws@ssec.wisc.edu) Many bug fixes/cleanups etc. by a host of faithful users See the CHANGES file for all the credits SunOS 5.4 Last change: Release 2.1(.8) (Protocol 2.1) 38