htmlize {diaglib - an editor for commutative diagrams in Tcl/Tk} {
[P Hey. Do you want an editor for commutative diagrams that is
intuitive and easy to use?]
[P If you do then you'd better look elsewhere. Try xfig or tkdraw.]
[P I wrote diaglib.014 because I needed something that I could hack
easily to add more features, and that would let me write the
diagrams in a real programming language. And I wanted to be able to
edit the diagrams in Emacs, not just by pointing and clicking\; the
graphical interface was to be used only to drag some reference points
until the final result looked reasonably pretty.]
[P [TT [Q ]] [BR] ...experience shows ( :-) that editing diagrams
in ASCII-art in Emacs is always much funnier than editing them using
graphical tools, and coding them after that in diaglib code is very
quick and funny enough (especially when you're diaglib's author, of
course). [BR] [TT [Q ]]]
[H2 Quick and messy description:]
[P Diagrams are made of text objects (see \"TEXT ITEMS\" in the
manpage (3tk)canvas) and arrow objects (\"LINE ITEMS\" in (3tk)canvas).
Arrow objects always go from a corner of a text object to a corner
of another\; they're generally straight but there are tricks to
get curves. For the arrow objects we can specify line width, stipple,
arrow shape and which ends get arrows. Text objects can be dragged
with the mouse\; when one of them is dragged all other text objects
whose coordinates depended on it are dragged together with it and the
diagram is redrawn\; some arrows may move because their control points
moved.]
[P Diagrams are written as Tcl code that is executed after sourcing
diaglib.014. The code creates two strings, \$OnCreate and \$OnUpdate,
that are in fact Tk scripts\; these scripts can be inspected by
pressing buttons on the main window. OnCreate is only eval'ed once and
OnUpdate is eval'ed every time a drag is done. A third array, OnDump,
has Tcl code to show the present coordinates of the text objects in a
format that can be incorporated in the diagram code.]
[P Some text objects may be marked as auxiliaries. There's a button that
deletes all auxiliary objects. Another button makes all objects black.
Another one exports the current figure as encapsulated postscript to
[TT ~/LATEX/eps/][IT [Q ]][TT .eps], where [IT [Q
]] is set with the command \"epsfile\". The path
[TT ~/LATEX/eps/] is hardcoded but trivial to change.]
[P The contents of the variables OnCreate, OnUpdate and OnDump (and the
result of eval'ing OnDump) can be sent to stdout or to ~/o\; again the
path is hardcoded but easy to change. A button toggles if the output
goes to stodut or to ~/o.]
}