Version 2 of tmdoc::tmdoc

Updated 2020-02-19 19:53:26 by DDG

Literate programming tool using Markdown as markup languages and tcl as programming language. Tcl code can be embedded directly in the text using single backticks or as code blocks using triple A good example is the extensive tutorial for the tmdoc::tmdoc package at https://chiselapp.com/user/dgroth/repository/tclcode/doc/tip/tmdoc/tutorial/tmd.html

Usage, you have intermixed Markdown markup and Tcl code in a tmd file which can converted to Markdown using the tmdoc command line application.

tclsh tmdoc.tcl docu.tmd > docu.md
# afterwards Markdown can be converted to HTML or PDF for instance using pandoc
pandoc -i tmd.md -s --highlight-style pygments -c dgw.css  -o tmd.html

Code chunks:

Are starting after three backticks and a {tcl} indication of the programming language. Here an example:

```{tcl echo=false}
set x 1
puts $x
```

Further short Tcl code can be embedded directly within the text using single backticks:

The curent date and time is: `tcl clock format [clock seconds] -format "%Y-%m-%d %H:%M"`

Should embed the current date and time in the text.

The manual states as well support for images create from Tcl for instance using commands from gdtcl or the canvas widget.

Changes:

  • 2020-02-19: 0.1 first release

See also:

Discussion:

Please discuss here ...

DDG 2020-02-19: Please note, that this is a work in progress. I am open for suggestions. But tmdoc should basically have a reasonable subset of the functionality of R's Sweave https://stat.ethz.ch/R-manual/R-devel/library/utils/doc/Sweave.pdf and R markdown https://rmarkdown.rstudio.com/