From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15803 Path: main.gmane.org!not-for-mail From: Brooks Moses Newsgroups: gmane.comp.tex.context Subject: Converting math from LaTeX to ConTeXt Date: Sun, 25 Jul 2004 22:31:24 -0700 Sender: ntg-context-bounces@ntg.nl Message-ID: <4.3.1.2.20040725215940.01876a88@cits1.stanford.edu> 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 1090819918 19563 80.91.224.253 (26 Jul 2004 05:31:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Jul 2004 05:31:58 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 26 07:31:48 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 1Boy5U-0004jg-00 for ; Mon, 26 Jul 2004 07:31:48 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0623212780; Mon, 26 Jul 2004 07:31:47 +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 32682-06; Mon, 26 Jul 2004 07:31:44 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3A5351276D; Mon, 26 Jul 2004 07:31:44 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0AC851276D for ; Mon, 26 Jul 2004 07:31:42 +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 32649-06 for ; Mon, 26 Jul 2004 07:31:41 +0200 (CEST) Original-Received: from smtp1.Stanford.EDU (unknown [171.67.16.123]) by ronja.ntg.nl (Postfix) with ESMTP id 07B4D1276B for ; Mon, 26 Jul 2004 07:31:40 +0200 (CEST) Original-Received: from Brooks1.stanford.edu (DNab42a596.Stanford.EDU [171.66.165.150]) by smtp1.Stanford.EDU (8.12.11/8.12.11) with ESMTP id i6Q5VYsn024812 for ; Sun, 25 Jul 2004 22:31:36 -0700 X-Sender: brooks@cits1.stanford.edu X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Original-To: ConTeXt users list 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:15803 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15803 First, by way of introduction: I've been using LaTeX for about five years now, but am quite new to ConTeXt. I'm a grad student in mechanical engineering, so my primary uses of ConTeXt in the near future are likely to be for my thesis and associated presentations, all of which will likely have lots of complicated equations in them. After looking at what documentation is available for this, I think I have a fair handle on the basics of including math in ConTeXt. However, I do have some questions about things beyond the basics that I use rather frequently, and I haven't been able to find useful answers in the documentation or the list archives. To begin with, I have the following sets of definitions in my standard LaTeX preamble. I know that \newcommand and \renewcommand are LaTeX-specific; what's the appropriate ConTeXt equivalent? Also, do \hat, \vec, and \overline work as I would expect? And is there a direct equivalent to \boldsymbol from the amsmath package? (I need something that will handle both roman and greek letters.) \renewcommand{\vec}[1]{{\boldsymbol{#1}}} \renewcommand{\hatn}{\hat{\vec{n}}} \newcommand{\filter}[1]{\overline{#1}} Also, many of these equations run over multiple lines using the macros from the amsmath package (the "split" environment in particular, but also the "align" environment), and I haven't been able to find much documentation on how to do this in ConTeXt. For an example of the sorts of things I end up doing: \begin{equation} \begin{split} \lefteqn{ \frac{\partial (\rho (\phi u)_j)}{\partial t} + \nabla_k (\rho (\phi u)_k u_j) }\quad\quad \\ = &\; -\nabla_j (\phi p) + \nabla_j (\lambda \nabla_k (\phi u_k)) + \nabla_k \left[\mu \left( \nabla_k (\phi u)_j + (\nabla_j (\phi u)_k) \right) \right] \\&\; {} - \lambda (\nabla_j u_k) \nabla_k \phi - \mu (\nabla_k \phi) \nabla_k u_j - \mu (\nabla_k u_k) \nabla \phi_j - \tau_{\text{surface, $jk$}} \nabla_k \phi \end{split} \end{equation} Looking at that reminds me that I also rather heavily use the \text command from amsmath as well, and rely on its ability to properly size things in subscripts and such. Does this (or an analogue) exist in ConTeXt? Any suggestions? I'd like to be able to simply cut and paste the equations like this one from my LaTeX documents into my ConTeXt documents with as little editing as possible (so that I can maintain consistency between documents in each format), but anything that produces the same output would be good to know about. Thanks much! - Brooks