<?xml version="1.0" encoding="utf-8"?>
<article xmlns:pod="http://axkit.org/ns/2000/pod2xml">

<title>TrEd - a graphical visualizer and editor of tree graphs</title>

<section>
<title>NAME</title>
<para>
TrEd - a graphical visualizer and editor of tree graphs
</para>
</section>
<section>
<title>SYNOPSIS</title>
<literallayout>
tred [-q] [-c &lt;config-file&gt;] [-m|-I &lt;macro-file&gt;] [-t context]
     [-l &lt;filelist&gt;] [-n encoding] [other-options] [file[##N|##N.M|#ID] ...]
</literallayout>
<para>
or
</para>
<literallayout>
tred -C &lt;command&gt;
</literallayout>
<para>
or
</para>
<literallayout>
tred -u          for usage
tred -h          for help
tred --man       for the manual page
tred --version   for version
</literallayout>
</section>
<section>
<title>DESCRIPTION</title>
<para>
TrEd is a graphical visualizer and editor of tree graphs.
</para>
<section>
<title>Filename arguments</title>
<para>
Each filename on the command-line or in a file list may be optionally
followed by a suffix which identifies a node to be selected when the
file is opened.  The suffix can be of one of the following following
forms:
</para>
<para>
#ID     where ID is an identifier of a node (for file formats that have
        identifiers, e.g. PML).
</para>
<para>
##N     where N is a number. This selects the root of the N-th tree
</para>
<para>
##N.M   where N and M are numbers. This selects the M-th node in
        the depth-first order in the N-th tree.
</para>
</section>
<section>
<title>Options</title>
<variablelist><varlistentry><term><emphasis>-C</emphasis> command</term><listitem>
<para>
Perform a given command on a running instance of TrEd.
Currently only one command is supported:
</para>
<literallayout>
open &lt;filename&gt;
</literallayout>
<para>
If there is no TrEd instance running, the filename is opened in a new
instance.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--filelist|-l</emphasis> filename</term><listitem>
<para>
Read a list of filenames to process from a given file (one filename
per line). Files specified in a file-list are processed prior to files
specified on the command-line. If file-list is a file with .fl
extension, then the first line may contain a file-list name (as in
TrEd). Moreover, unlike in other file-lists, filenames in .fl
file-lists are assumed to be relative to the file-list file location.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--macro-file|-m</emphasis> filename</term><listitem>
<para>
File with macro definitions to load.  If no macro-file is given,
standard macro file (by default <filename>tred.mac</filename>) is used.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--include-macro-file|-I</emphasis> filename</term><listitem>
<para>
A file containing additional set of macros to load. This option is
typically used instead of <literal>--macro-file</literal> to allow loading macros
<emphasis>both</emphasis> from <literal>filename</literal> <emphasis>and</emphasis> the default macro set (<filename>tred.mac</filename>).
<literal>--macro-file</literal> can still be used in combination with
<emphasis>--include-macro-file</emphasis> to supply a replacement for <filename>tred.mac</filename>.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--config-file|-c</emphasis> filename</term><listitem>
<para>
TrEd configuration file (overrides ~/.tredrc).
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--option|-O</emphasis> name=value</term><listitem>
<para>
Override configuration option from the config file with a given
value. This flag can be used several times for different options.
</para>
<para>
Special syntax of the name part allows some modifications of existing
option values for options that are delimited lists (this cannot be
used to modify default or implicit values):
</para>
<variablelist><varlistentry><term>nameX=value</term><listitem>
<para>
Treat the option as a list delimited by the delimiter X and
prepend the value to the list.
</para>
</listitem></varlistentry><varlistentry><term>nameX+=value</term><listitem>
<para>
Treat the option as a list delimited by the delimiter X and append the
value to the list.
</para>
</listitem></varlistentry><varlistentry><term>nameX-=value</term><listitem>
<para>
Treat the option as a list delimited by the delimiter X and remove the
value from the list (if exists).
</para>
</listitem></varlistentry></variablelist><para>
Only the following characters can be used as a delimiter:
</para><literallayout>
; : , &amp; | / + - \s \t SPACE
</literallayout><para>
where SPACE is a space character, \s matches arbitrary white-space,
and \t matches TAB character.
</para><para>
The options can be combined; for example
</para><literallayout>
-O "extensionRepos\\s"-=http://foo/bar -O "extensionRepos\\s"+=http://foo/bar
</literallayout><para>
first removes any occurrence of the URL http://foo/bar from the
white-space separated list of extensionRepos and then appends the URL
to the end of the list.
</para></listitem></varlistentry><varlistentry><term><emphasis>--stylesheet-file</emphasis> path</term><listitem>
<para>
Path may be either a file name, in which case it must point to a TrEd
stylesheet configuration file in the old format or ~/.tred-stylesheets
(obsolete), or a directory, in which case each file in the directory
must be a TrEd stylesheet.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--resource-dir|-Z</emphasis> dirnames</term><listitem>
<para>
Specifies resource path. This option can be repeated and overrides
ResoucePath setting in the TrEd configuration file.
</para>
<para>
Individual paths can also be separated by colon (POSIX/Unix) or
semi-colon (Windows) separator. If there is a lone leading or trailing
separator, the default resource path is prepended or appended,
respectively.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--context|-t</emphasis> context_name</term><listitem>
<para>
Initial macro context.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--show-hidden-nodes|-H</emphasis></term><listitem>
<para>
Start in the mode where hidden nodes are displayed.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--stylesheet|-s</emphasis> stylesheet-name</term><listitem>
<para>
Initial stylesheet to render the tree according to.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--split-window|-p</emphasis> number</term><listitem>
<para>
Split window to given number of subwindows (horizontally if
positive, vertically if negative) and open n'th file
in n'th subwindow.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--execute|-e</emphasis> perl-code</term><listitem>
<para>
Macro code to evaluate just before the main loop is started.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--window-embed|-W</emphasis> window_ID</term><listitem>
<para>
Embed main window into window with the given window ID.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--no-geometry|-G</emphasis></term><listitem>
<para>
Do not initially resize window to its last geometry.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--extra-backends|-B</emphasis> backend</term><listitem>
<para>
Comma separated list of user-defined IO-backend modules to load.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--file-encoding|-n</emphasis> encoding</term><listitem>
<para>
Allows to specify character encoding of input files (does not apply to
XML files).
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--define-symbol</emphasis> symbol_name</term><listitem>
<para>
Symbol name or a name=value pair to be used by macro-preprocessor
(equivalent to a <literal>#define</literal> instruction at the beginning of the macro
file). Multiple definitions symbols may be separated by a comma and
the option may be repeated.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--no-secondary-files|-Y</emphasis></term><listitem>
<para>
Neither load or save "secondary" files. Normally, secondary files (if
loaded) are saved along with their primary files (the exactly same
file-name prefix/suffix processing and format apply to both the
primary and secondary files). A secondary file is a file required by a
(normal - primary) file to be loaded along with it; this is typical
for files containing some form of a stand-off annotation where one
tree is built upon another. Note however, that this does not include so
called knitting - an operation where the stand-off annotation is
handled by a IO backend and the resulting knitted file appears to
btred as a single unit.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--enable-extensions|-j</emphasis> list</term><listitem>
<para>
Give a comma-separated list of installed TrEd extension names to
temporarily enable if disabled in the extension configuration.
Use '*' to enable all currently enabled extensions.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--disable-extensions|-J</emphasis> list</term><listitem>
<para>
Give a comma-separated list of installed TrEd extension names to
temporarily disable if enabled in the extension configuration.
Use '*' to disable all currently enabled extensions.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--tectogrammatical-trees|-R</emphasis></term><listitem>
<para>
Build tectogrammatic trees from CSTS files.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--csts-tree-attributes|-X</emphasis> gov,ord?,hide?</term><listitem>
<para>
CSTS format is "many in one"; there may be more tree structures in one
file.  This option can be used to specify which tree structure should
be used.  Provide a comma separated list consisting of names of node
attributes corresponding to CSTS elements that contain the necessary
information to build a tree out of a CSTS file. The first attribute
should be an attribute containing the index of the governing node; the
second one is optional and specifies the ordering attribute; the third
one is also optional and if specified, it should be the attribute used
to mark hidden nodes with the string 'hide'. If the third argument is
specified as empty (i.e. there is a trailing comma), default to
'X_hide' with preset-value 'hide'.
</para>
<para>
Examples:
  -X govTR,dord  - corresponds to elements &lt;TRg&gt; and &lt;tfr&gt;
                   in CSTS
</para>
<literallayout>
-X govMD_c,ord,x_MD_c_hide
               - corresponds to &lt;MDg src="c"&gt;, &lt;r&gt;,
                 and &lt;x name="MD_c_hide"&gt;).
</literallayout>
</listitem></varlistentry><varlistentry><term><emphasis>--no-backups</emphasis></term><listitem>
<para>
Do not generate `tilda' backup files.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--no-locks</emphasis></term><listitem>
<para>
Do not attempt to create lock files. Lock files are used to prevent
another TrEd instance/user from modifying the same document.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--autosave</emphasis> number</term><listitem>
<para>
Create an auto-save file for each modified document every given number
of minutes. If 0, auto-saving is disabled.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--quiet|-q</emphasis></term><listitem>
<para>
Print only general processing information on stderr.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--debugging|-D</emphasis></term><listitem>
<para>
Print a lot of debugging information on the stderr.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--carp</emphasis></term><listitem>
<para>
Replace 'die' with 'Carp::confess', so that a complete stack trace is
printed upon error. Useful for debugging.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--version|-v</emphasis></term><listitem>
<para>
Print version and quit.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--man|-m</emphasis></term><listitem>
<para>
Displays the help as manual page.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--help|-h</emphasis></term><listitem>
<para>
Prints the help page and exits.
</para>
</listitem></varlistentry><varlistentry><term><emphasis>--usage|-u</emphasis></term><listitem>
<para>
Print a brief help message on usage and exits.
</para>
</listitem></varlistentry></variablelist>
</section>
</section>
<section>
<title>SEE ALSO</title>
<para>
TrEd User Manual at http://ufal.mff.cuni.cz/~pajas/tred/ar01-toc.html
(also located in the documentation directory in the installation of
TrEd).
</para>
</section>
<section>
<title>LICENSE</title>
<para>
This software is distributed under GPL - The General Public Licence.
Full text of the GPL can be found in the LICENSE file distributed with
this program and also on-line at http://www.gnu.org/copyleft/gpl.html .
</para>
</section>
<section>
<title>AUTHOR</title>
<para>
Petr Pajas &lt;pajas@matfyz.cz&gt;
</para>
<para>
Copyright 2000-2008 Petr Pajas.
</para>
</section>
</article>
