From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/46098 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: looking for equivalence to LaTeX algorithm package Date: Wed, 3 Dec 2008 17:18:55 +0100 Message-ID: <742A812D-6397-4BE8-B834-8688AD25137C@gmail.com> References: <72c60e910811300809jab384aaw2bae79960b076d7f@mail.gmail.com> <4933E7F0.70204@mevis.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1228321475 31843 80.91.229.12 (3 Dec 2008 16:24:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2008 16:24:35 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Dec 03 17:25:38 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1L7uXa-00078s-Pm for gctc-ntg-context-518@m.gmane.org; Wed, 03 Dec 2008 17:25:30 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 68E551FC0B; Wed, 3 Dec 2008 17:24:16 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00416-06-6; Wed, 3 Dec 2008 17:22:48 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 51C121FB60; Wed, 3 Dec 2008 17:22:48 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C15F11FADC for ; Wed, 3 Dec 2008 17:22:46 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00416-06-5 for ; Wed, 3 Dec 2008 17:22:05 +0100 (CET) Original-Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by ronja.ntg.nl (Postfix) with ESMTP id 8C2FB1FB64 for ; Wed, 3 Dec 2008 17:22:05 +0100 (CET) Original-Received: by nf-out-0910.google.com with SMTP id c10so1840935nfd.44 for ; Wed, 03 Dec 2008 08:22:05 -0800 (PST) Original-Received: by 10.86.76.16 with SMTP id y16mr8090676fga.65.1228321325151; Wed, 03 Dec 2008 08:22:05 -0800 (PST) Original-Received: from ?10.40.42.107? (8.121.113.82.net.de.o2.com [82.113.121.8]) by mx.google.com with ESMTPS id 12sm6162110fgg.53.2008.12.03.08.22.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Dec 2008 08:22:03 -0800 (PST) In-Reply-To: <4933E7F0.70204@mevis.de> X-Mailer: Apple Mail (2.929.2) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:46098 Archived-At: Am 01.12.2008 um 14:34 schrieb Richard Rascher-Friesenhausen: > Zhaopeng Xing schrieb: >> Hi, >> >> Does anyone know how to describe algorithm procedures in similar >> way as LaTeX algorithmic and algorithm packages? I tried to search >> it on wiki but found nothing. Thanks. > > Hello, > > I once tried to copy the LaTeX environment to ConTeXt. And this is, > what came out of it: *t-algorithmic.tex* It works for me, but i'm > open to new and better implementations... It's ok for a private module but before you can put it on the garden a few things can be done better. - define the commands (IF, WHILE etc.) local and use protected names in the code, users can user similiar names in their documents and you have to take care of this - you can use \doadaptleftskip to increase/decrease the left margin with each \IF/\ENDIF ... pair - you can define \Algorithm with \defineframedtext[Algorithm] Thanks for sharing it with the rest of the community. Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________