Hello,
how could I build some macros, that make usage of \startbuffer and
\stopbuffer?
Example:
\def\startXXX[#1]{\doSomeMagicSetups{#1}%
\startbuffer[...]}
\def\stopXXX{\stopbuffer
\doSomeSpecialWorkHere}
And then:
\startXXX[some options]
some text
\stopXXX
TIA for any help!
Cheers, Peter
---------------------------------------------------
For those, who are interested, here in detail what I'm trying to do:
I still like the LaTeX listings.sty package very much, but porting it to
ConTeXt would be too much work for me. So why not using a wrapper?
Somewhere in the PATH I put the file createListing.sh:
#!/bin/bash
echo '\documentclass{article}\usepackage{listings}
\lstset{language=C++,tabsize=4}\pagestyle{empty}
\begin{document}\begin{lstlisting}{}' >$1-lst-ltx.tex
cat $1-lst.tmp >>$1-lst-ltx.tex
echo '\end{lstlisting}\end{document}' >>$1-lst-ltx.tex
latex $1-lst-ltx
dvips -E -o $1-lst-ltx.eps $1-lst-ltx
Then the ConTeXt-file:
\starttext
Here is a listing:
\startbuffer[lst]
#include