The configuration and customizing of TrEd is possible through the configuration file. When started TrEd tries to search for its configuration file on several places and uses the first configuraton file found:
First TrEd looks for a file given with a command-line parameter -c (see Section 8. for details).
If the HOME system variable is set (on UNIX/Linux this variable points to user's home directory) TrEd searches for .tredrc (mind the dot here) file in that directory.
If the TREDHOME system variable is set TrEd searches for tredrc file in that directory.
TrEd looks for a tredrc file in the directory where the program file of TrEd itself is located.
TrEd looks for a tredrc file in directories ../lib/tred, ../lib/tredlib and ./tredlib/tredrc respectively, relatvely to the directory where the program file of TrEd itself is located.
TrEd looks for a tredrc file in the /usr/share/config/ directory.
If none of these files is found, default values for configuration options are used.
TrEd's configuration file is a plain text file with a very simple structure. It can be edited not only in any editor (like vi, Emacs or Notepad) and also directly from TrEd when the File->Edit Config menu command is issued. In both cases there is a way to update the options used by a running session of TrEd:
Use File->Reload Config menu command to make TrEd re-read the configuration file from disk.
In the TrEd's internal configuration editor use the Save and Apply button to apply changes and save them or Apply button to apply changes withought saving them. The first command aslo quits the configuration editor.
Note | |
---|---|
Some configuration options even if applyed take effect only after restarting TrEd. |
The format of the configuration file is of this simple form:
There may be any amount of white-space between the option name and value but they must be both on the same line. Any characters folowing a semi-colon (;) to the end of line are considered as comment and are ignored. You may also need to quote the value using either double-quotes ("value") or simple quotes ('value') to preserve white-space or semi-colons. The option names are case-insensitive.
The available configuration options may be divided into several categories:
Color to highlight the nearest node to indicate the destination of a possible drop when dragging a node.
Color used to display text of extra-highlighted tree attributes. See FS-format description to learn about how to specify which attributes are shadowed, highlighted and extra-highlighted.
Here n stands for any number between 0..9. These options define ten custom colors which may be symbolically refered to and used in the attribute patterns. To refer to the n'th custom color use the sequence #{customn} in the pattern. For more information see Section 5.. See also the AllowCustomColors option which can be used to enable or disable the actual use of the custom colors.
Color used to flash the text of an attribute under the mouse-pointer.
Background color of a border drawn around the text of attributes if the View->Draw Boxes item is checked.
Background color of a border drawn around the text of the active node's attributes if the View->Draw Boxes item is checked.
Background color of a border drawn around the text of a hidden node's attributes if the View->Draw Boxes and View->Show Hidden items are checked.
Color used to draw the lines connecting dependent nodes in a tree. Default is black.
Color used to fill an ordinary node of the tree. Default is yellow.
Color used to draw the outline of an ordinary node. Default is black.
Color used to draw nodes marked as hidden, if shown. Default is black.
The horizontal diameter of the elipsis representing a node in a tree.
The vertical diameter of the elipsis representing a node in a tree.
The horizontal diameter of the elipsis representing the active node in a tree.
The vertical diameter of the elipsis representing the active node in a tree.
The minimal horizontal distance between two nodes in a tree.
Horizontal amount of space left around borders of the box surrounding the text of displayed attributes of a node.
Horizontal amount of space left around borders of the box surrounding the text of displayed attributes of a node.
The horizontal distance of the tree root (zero's node) from the right of the tree view.
The vertical distance of the tree root (zero's node) from the top of the tree view.
If this option is set, TrEd starts with the View->DrawBoxes menu item checked.
If this option is set, TrEd starts with the View->Highlight Attributes menu item checked.
Choose if invisible rectangles should be drawn beneath text labels to clear the background for the text. Possible values are 0 and 1.
This option takes one of the values 0 and 1. If set to 0, all references to custom colors in attribute patterns are ignored. It is also the default value.
If this option is set, TrEd starts with the View->Show Hidden Nodes menu item checked.
This option controls the length of the time interval between user points a node with a cursor mouse and to when TrEd displayes the floating hint for the node. The value is to be given in milliseconds. See Section 5. for more information about defining the content of the hints.
This option lets you define the default method used when searching with the Node->Find command. The default value is Exhaustive regular expression but user may use any of the following values (actually only the first letter suffices):
Regular Expression |
Wildcards |
Literal |
Exhaustive regular expression |
This option defines the default ordering of macros when View->List of Named Macros... menu command is used. Possible values are letters M (sort by macro menu label) and K (sort by keyboard shortcuts assigned to macros). Default value is M.
This option may be used to tell TrEd how many fields should fit in one screen of a list when a dialog displaying possible (or already assigned) values for a certain attribute is displayed. (The greater the number is, the taller the dialog grows).
This option may be used to tell TrEd how many fields should fit in one screen of the Edit Node Attributes and Find Node by Attributes dialog windows. (The greater the number, the taller the dialogs).
Style of the relief of the GUI buttons. Possible values for this option are: raised, sunken, flat, ridge, solid, and groove. Default is 'raised'.
Style of the relief of the GUI menu-bar. Same values as for ButtonsRelief option are possible. Default is 'raised'.
Maximal number of User-menu lines. If more lines in the menu should appear, a submenu is created as a last item, in which the menu continues.
If 1, all lists where attribute names or values are displayed are sorted alphabetically. Otherwise the order given in the FS-file header is preserved. Default value for this option is 1.
If this option is 1, TrEd creates a special menu Key-macros where all defined macros which are assigned a key are presented also as menu functions.
If this option is 1, strict motifish look and feel is used in TrEd's GUI.
Font used to display the text of attributes and also in several other places of GUI where the text of attributes is displayed or edited. There are two possible formats of values for this option:
Standard X font-spec, with possible wildcards, e.g.: -*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-2
Font attribute-oriented format, which is a comma-separated list of pairs of the form font-attribute:value. The attributes are: family, size, weight, slant, underline, overstrike. Family is a font-family name like Arial, Helvetica or Times New Roman. Size is a number providing the font-size in points (i.e. not pixels!). Possible values for bold are normal and bold, possible values for slant are roman and italics. The underline and overstrike attributes take just boolean values of 1 and 0. If a font, that would match the specified attributes exactly, is not found, the most similar font is used.
Example | |
---|---|
Font = family:Arial,size:10,weight:bold |
Font used for displaying the text in the value line above tree. The same formats as for Font are allowed for this option. If not specified, Font is used.
If 0, TrEd prints in black and white. If 1, TrEd uses the same colors for printing as it does for displaying the tree on the screen. This option may be overriden by the Use Colors check-box in the Print dialog.
A Postscript font name to be substituted by the font given in PsFontFile in the final PosctScript.
Size of the Postscript font to be substituted by the font given in PsFontFile in the final PosctScript.
Width of the paper used for printing. Append one of the characters i,c,m to the number to destinguish the dimension (inches, centimeters, milimeters respectively).
Width of the paper used for printing. Same format as PrtFmtWidth.
A PostScript document media-type identifier to be used in the header of the printed PostScript. The default value is %%DocumentMedia: A4 595 842 white()
The default name of the output file when printed to file. This name may be modified in the Print dialog.
If this option is on (i.e. 1), TrEd tryes to draw the tree as big as to fill the whole paper. Default is 0 here.
This option forces TrEd to search for its library files in the specified directory.
If 1 is set here, TrEd uses Czech locales for handling text. This may be especially useful in macros.
This option may be used to provide a path to an SGML parser with support for ESIS output, such as James Clark's SGML parser nsgmls. TrEd may then use this parser to read SGML CSTS files (used e.g. in the Prague Dependency Treebank 1.0).
This option may be used to provide additional parameters to the SGML parser declared in Sgmls option. By default, this option is set to -i preserve.gen.entities. These parameters forces James Clark's nsgmls parser to include a part of CSTS DTD where all global entities are re-declared in such a way that they expand to themselves literally and thus are preserved (as if no expansion was done).
This option should point to a file containing CSTS doctype declaration combining both the SGML subset declaration as well as the CSTS DTD. This file is included in the distribution of TrEd and is by default stored in TrEd's library directory as csts.doctype. Setting this option overrides this default.
This option may be used to point TrEd to a GNU gzip command, which may be used for transparent saving files commpressed by GNU gzip. The default value is /bin/gzip -c if /bin/gzip exists and is executable. Otherwise the value is undefined and TrEd does not support transparent saving GNU-zipped files.
This option may be used to point TrEd to a GNU zcat command, which may be used for transparent opening files commpressed by GNU gzip. (These files are recognized by the .gz suffix.) The default value is /bin/zcat if /bin/zcat exists and is executable. Otherwise the value of gzip option is used.