From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15599 Path: main.gmane.org!not-for-mail From: Maurice Diamantini dom Newsgroups: gmane.comp.tex.context Subject: High level user macro (howto?) Date: Sat, 26 Jun 2004 11:51:14 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <5CAF4C26-C756-11D8-AE54-000A95C38698@chello.fr> References: <"m2hdtw92rn.fs f"@levana.de> <6.1.1.1.2.20040601200608.01eb9640@server-1> <"m2n032tvs8.fs f"@levana.de> <20040622161300.GA5608@swordfish> <34371.80.58.5.46.1087924408.squirrel@bitmail.bitmailer.com> <0D45B077-C4DA-11D8-972E-000A9595B57C@ensta.fr> <40D944A4.5030402@gmx.de> <43DEE2EE-C510-11D8-972E-000A9595B57C@ensta.fr> <72D4BC80-C612-11D8-9706-0030659899AA@fiee.net> <40DC4CDF.2090904@wxs.nl> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v618) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1088411339 31057 80.91.224.253 (28 Jun 2004 08:28:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Jun 2004 08:28:59 +0000 (UTC) Cc: Maurice Diamantini Original-X-From: ntg-context-admin@ntg.nl Mon Jun 28 10:28:49 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BerVR-0001lL-00 for ; Mon, 28 Jun 2004 10:28:49 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 0D4BA10B61; Mon, 28 Jun 2004 10:28:44 +0200 (MEST) Original-Received: from viefep16-int.chello.at (viefep16-int.chello.at [213.46.255.17]) by ref.ntg.nl (Postfix) with ESMTP id 4FCD610ABC for ; Sat, 26 Jun 2004 11:51:25 +0200 (MEST) Original-Received: from [10.0.1.2] (really [213.245.48.252]) by viefep16-int.chello.at (InterMail vM.6.00.05.02 201-2115-109-103-20031105) with ESMTP id <20040626095124.NOCW726.viefep16-int.chello.at@[10.0.1.2]>; Sat, 26 Jun 2004 11:51:24 +0200 In-Reply-To: <40DC4CDF.2090904@wxs.nl> Original-To: ntg-context@ntg.nl X-Mailer: Apple Mail (2.618) Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk X-Reply-To: Maurice Diamantini List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:15599 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15599 Bonjour =E0 tous, One thing is missing in context (or not documented in reference manual?) is a standard and easy way to build arbitrary parametrised high level=20 macros. For exemple, instead of \def\myCommand#9{...} That I should call by \myCommand{param1}{param2}{...} {param9} Id'like too keep default value for most of the parameters but param7 and write something like: \myCommand[param7=3Dvalue7]{body} In LaTeX, there is a package keyval for doing this And context use this everywere, but I haven't seen anything for a user beeing able to do this. This is the base for building arbitrary complex user commands with some defauld behavior, and then, if this personal macro is usefull enough, building some user contribution library. As a true exemple, see a latex package I've written some years ago for drawing uml diagramms whith LaTeX command (using PsTricks). This file is available at http://www.ensta.fr/~diam/latex/pst-uml/pst-uml-981218-09h41.tar.gz (should now be available on CTAN too) See documents for the samples (in french but the samples are in LaTeX=20 and drawing are in "picture" !) One of the first exemple I'd like is some command to put some little table as caractere in a line (see that as some personalised box): start of line $-$\myStack[border=3D1ex,baseline=3D0.5]{ aaa & bbb \\ aaa & bbb \\ aaa & bbb }$-$ end of line Or a little command to draw some picture, with default but modifiable parameters: $-$\myzigzag[dir=3Ddown,linewith=3D1pt,color=3Dred,with=3D3\em]$-$ Using Metafun. Cordialement, -- Maurice=