Open main menu

Changes

m
no edit summary
See also: [[write18Write18]]
== How to pass over part of the source to an external program? ==
I do not know what is the best source of their documenentation.
{{cmd|write}} is explained in the texbookTeXbook, [[write18Write18]] executes its argument on shell.
luatex will have a better model for executing commands on the shell, and some
of it is explained in the luatex manual. (But luatex is still pre-alpha, so
I found ConTeXt sources to be the best way to understand how these things are
working. See [[modules:t-lilypond|t-lilypond]], which checks if [[write18Write18]] is enabled or not, and then
uses {{cmd|executesystemcommand}} or {{cmd|installprogram}}:
types the output. It also shows how you can capture the contents of an
evironment to a temp file. The same idea is used in the [[modules:vim|t-vim]] module. Of
course, the ConTeXt sources have plenty of examples. There is also {{src|core-buf.tex{{}}
where the buffer handling is implemented, and the sources related to metapost
handling, which are perhaps the best example of how to go back and forth
* [[modules:filter|t-filter]]
[[Category:Inside ConTeXtProgramming and Databases]][[Category:Tools]]