[NTG-context] Using forms and saving values

Wolfgang Schuster schuster.wolfgang at googlemail.com
Tue Apr 5 20:32:45 CEST 2011


Am 05.04.2011 um 20:23 schrieb Aditya Mahajan:

> BTW, does anyone has a minimal example on how to use mkvi syntax. I tried a few examples, but the best that I could do was using one of the mtx-* scripts to convert mkvi to tex (And that conversion does not work for \starttextdefinition ... \stoptexdefinition).

http://www.ntg.nl/pipermail/ntg-context/2010/054629.html

<example>
% macros=mkvi

\def\one#one#two{#one : #two}

\def\two{\dosingleempty\dofoo}

\def\dofoo[#optional]#mandatory%
  {\iffirstargument #optional\else Hello \fi #mandatory}

\starttext

\one{A}{B}

\foo{\ConTeXt!}

\foo[Hi]{\ConTeXt!}

\stoptext
</example>

Wolfgang


More information about the ntg-context mailing list