Edit per-node attributes
Not logged in

Currently tkoutline doesn't have a nice way of editing per node attributes. The core tree structure and file structure already supports having unlimited user defined attributes. Here are some ways attributes can be edited (taking from some email that was targetting setting of attributes for Export to latex):

One way to modify node attributes is from the console <F2>. Put the insertion cursor on the node you want to tag and then in the console type:

 tree set getnode insert type chapter

Another option is to download a development version of tkoutline from http://tkoutline.sourceforge.net/tkoutline-devel.exe and download the attributes editing plugin (code written by Scott Gamon and adapted by me into a plugin) from http://tkoutline.sourceforge.net/tkoutline-plugins.kit Then add this line to your startup script (outside of any function):

 source /path/to/tkoutline-plugins.kit

You should see a button on the button bar that looks like a document and clicking on it will show you a table where you can add and edit the attributes for the current node.

That particular plugin is based on a C-extension to Tcl and it currently only contains the Windows binary, so let me know if you are on a different platform.

A third way to do it is to bind a keystroke for each type. Here is some code you can put in your startup:

 set typesAndKeystrokes {
    part p
    chapter c
    section s
    subsection {s s}
    subsubsection {s s s}
    paragraph p
    subparagraph {s p}
    text t
    enumerate e
    itemize i
 proc setCurrentNodesType {win type} {
    set outline winfo parent $win
    set node $outline getnode insert
    $outline tree set $node type $type
 foreach {type keystrokes} $typesAndKeystrokes {
    set sequence {}
        foreach keystroke $keystrokes {
            append sequence <Control-string toupper $keystroke>
        bind Outline $sequence namespace code "setCurrentNodesType %W $type"

This code will bind <Control-P> (hold down control-shift and hit p) to set the type to part and <Control-S><Control-S> (hold down control-shift and hit s twice) for subsection, etc.

To examine the attributes, use the attributes plugin mentioned above, or type the following in the console:

 tree set getnode insert type

msel, 01 Dec 2006 What can I do with attributes? Is it possible to export or search for attributes?

2007-01-01 Brian Theado: Sorry for such a late response. Without writing a bit of code, there's not much you can do with the attributes.