asciidoc would work well for my case, so does any lightweight markup
language like bbcode. HTML is a bit too complicated because my "novice"
users want to update it by themselves. So I think what I need is a
rendering engine written in tcl for a lightweight markup language. Is
there such a tool and how mature is it?
Thanks in advance!
P.S. My homework including reading this article which didn't give any
read-to-use products or tools but only mostly ideas, or code that was
said to be done but not published:
A wiki-like markup language for the text widget
<http://wiki.tcl.tk/_/ref?N=3084>
Also I checked syntax highlight library offered by tkoutline but found
two problems.
1. it doesn't work on tk8.5 (is okay with tk8.4), while my exiting
application made too much use of tcl/k8.5
2. It take some work to customize the library to display headline
etc, and not sure in case *bold* can it hide the asterisk when
making "bold" bold
However it has the potential to be improved to an asciidoc rendering
engine, out side of my project's time scope though.
Another homework I did is to check lightweight markup language comparison
http://en.wikipedia.org/wiki/Lightweight_markup_language
only to find none are supported by tcl.
I checked there exist a basic HTML rendering engine: scrolledhtml
<http://wiki.tcl.tk/_/ref?N=2306> and htext
<http://wiki.tcl.tk/_/ref?N=1848>
Your conclusion seems correct so-far.
+ The gridplus package appears to have some htmlish markup, too
http://www.satisoft.com/tcltk/gridplus/text.html
+ Jeszra's code generation could also being extended to handle
asciidoc import, but than the text-code generation is trivial --it
hardly warrants the effort...
Are you planning to use asciidoc as the front-end for a docbook toolchain?
-roger
Try using the code on this page:
It lets you add tags based on regular expressions. For example, to
reformat a line that looks like "*Heading*" you would do something
like:
tag .t -regexp {\*.*\*$} 1.0 end {
%W delete "%s" ;# delete leading *
%W delete "%e -1c" ;# delete trailing *
%W tag add heading %s %e
}
It would be easy to support just about any simple markup you want.