From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15868 Path: main.gmane.org!not-for-mail From: Brooks Moses Newsgroups: gmane.comp.tex.context Subject: Re: Converting math from LaTeX to ConTeXt Date: Thu, 29 Jul 2004 09:46:38 -0700 Sender: ntg-context-bounces@ntg.nl Message-ID: <4.3.1.2.20040729093952.00b45f90@cits1.stanford.edu> References: <4.3.1.2.20040725215940.01876a88@cits1.stanford.edu> <4.3.1.2.20040725215940.01876a88@cits1.stanford.edu> <20040727114251.GG25818@cebitec.uni-bielefeld.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: sea.gmane.org 1091119819 22638 80.91.224.253 (29 Jul 2004 16:50:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Jul 2004 16:50:19 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 29 18:50:04 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BqE6W-0004nc-00 for ; Thu, 29 Jul 2004 18:50:04 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C8C7612795; Thu, 29 Jul 2004 18:50:03 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25338-05; Thu, 29 Jul 2004 18:50:03 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B25E012784; Thu, 29 Jul 2004 18:46:41 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8B41912784 for ; Thu, 29 Jul 2004 18:46:39 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25338-03 for ; Thu, 29 Jul 2004 18:46:39 +0200 (CEST) Original-Received: from smtp3.Stanford.EDU (unknown [171.67.16.138]) by ronja.ntg.nl (Postfix) with ESMTP id B3DC9126F8 for ; Thu, 29 Jul 2004 18:46:38 +0200 (CEST) Original-Received: from Brooks1.stanford.edu (DNab42a43c.Stanford.EDU [171.66.164.60]) by smtp3.Stanford.EDU (8.12.11/8.12.11) with ESMTP id i6TGkXgl023818 for ; Thu, 29 Jul 2004 09:46:35 -0700 X-Sender: brooks@cits1.stanford.edu X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Original-To: mailing list for ConTeXt users In-Reply-To: <20040727114251.GG25818@cebitec.uni-bielefeld.de> Original-References: <4.3.1.2.20040725215940.01876a88@cits1.stanford.edu> <4.3.1.2.20040725215940.01876a88@cits1.stanford.edu> X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:15868 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15868 At 04:42 AM 7/27/2004, you wrote: >On Sun, Jul 25, 2004 at 10:31:24PM -0700, Brooks Moses wrote: [things I need to translate from LaTeX to ConTeXt] > > \renewcommand{\vec}[1]{{\boldsymbol{#1}}} > > \renewcommand{\hatn}{\hat{\vec{n}}} > > \newcommand{\filter}[1]{\overline{#1}} > >You can use the tex primitve >\def\vec#1{{\boldsymbol{#1}} >or the context way >\define[1]\vec{{\boldsymbol{#1}} > >But afaik there is no checking if a command is already defined? I started poking through the ConTeXt source to see what I could find, and came across the following in the syst-ext.tex file: \def\define#1% {\ifx#1\undefined \expandafter\def \else \message{[\noexpand#1is already defined]}% \expandafter\def\expandafter\gobbleddefinition \fi#1} \def\redefine#1% {\ifx#1\undefined\else \message{[\noexpand#1is redefined]}% \fi \def#1} This appears to be doing the checks for commands being previously defined or not, as desired. However, I'm completely lost as to how we get from here to the \define[1] syntax. What am I missing? - Brooks