From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38241 Path: news.gmane.org!not-for-mail From: Shen Chen Newsgroups: gmane.comp.tex.context Subject: Re: Chemistry in lists Date: Mon, 24 Dec 2007 13:54:26 +0800 Message-ID: References: <6faad9f00712231506o15617410h9c43d83a28b6cf7a@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1198475833 6609 80.91.229.10 (24 Dec 2007 05:57:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Dec 2007 05:57:13 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Dec 24 07:05:17 2007 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 dough.gmane.org with esmtp (Exim 4.50) id 1J6gQw-0005ax-BX for gctc-ntg-context-518@m.gmane.org; Mon, 24 Dec 2007 07:05:14 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 91FD21FB8F; Mon, 24 Dec 2007 06:55:54 +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 13142-04-2; Mon, 24 Dec 2007 06:55:20 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C8C341FB38; Mon, 24 Dec 2007 06:55:20 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EA89A1FB30 for ; Mon, 24 Dec 2007 06:55:19 +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 13112-03-6 for ; Mon, 24 Dec 2007 06:54:39 +0100 (CET) Original-Received: from ims21.stu.nus.edu.sg (ims21.stu.nus.edu.sg [137.132.14.228]) by ronja.ntg.nl (Postfix) with ESMTP id 13B321FB38 for ; Mon, 24 Dec 2007 06:54:35 +0100 (CET) Original-Received: from MBX22.stu.nus.edu.sg ([137.132.14.213]) by ims21.stu.nus.edu.sg with Microsoft SMTPSVC(6.0.3790.3959); Mon, 24 Dec 2007 13:54:27 +0800 Original-Received: from 137.132.49.160 ([137.132.49.160]) by MBX22.stu.nus.edu.sg ([137.132.14.211]) via Exchange Front-End Server exchange.nus.edu.sg ([172.18.184.6]) with Microsoft Exchange Server HTTP-DAV ; Mon, 24 Dec 2007 05:54:27 +0000 User-Agent: Microsoft-Entourage/11.3.6.070618 Thread-Topic: [NTG-context] Chemistry in lists Thread-Index: AchF8XCuryks6bHkEdyBzgANk1x6Gg== In-Reply-To: <6faad9f00712231506o15617410h9c43d83a28b6cf7a@mail.gmail.com> X-OriginalArrivalTime: 24 Dec 2007 05:54:27.0665 (UTC) FILETIME=[71ACE410:01C845F1] 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:38241 Archived-At: Thanks for the suggestion, Taco's \molecule macro works. There is a similar problem for Units (with \usemodule[units]) that appears in headings, table of contents and list of figure captions, etc. Sample code: \usemodule[units] \starttext \placecontent \section{1 \Square\Centi\Meter} Hello world! 1 \Square\Centi\Meter \section{$1\Square\Centi\Meter$} Hello world! $1\Square\Centi\Meter$ \section{$1 {\rm cm^2}$} Hello world! $1 {\rm cm^2}$ \stoptext Units appear normally in text. But only the primary dimension "m" appeared in heading/list, while power/prefix are lost. In this case, I was able to trace down in the source code a little bit. In core-syn.tex, there is: \setupsynonyms [\v!unit] [\c!textstyle=\dimension] And \dimension is supposed to be invoked here: \def\processsynonym#1#2#3% {\begingroup % anders in mathmode lege \hbox, zie eenheden \ifsynonymmeaning \synonymmeaningfalse \doattributes{\??sm#1}\c!synonymstyle\c!synonymcolor{#3}% \else \explicithmode \doattributes{\??sm#1}\c!textstyle\c!textcolor{#2}% \fi \endgroup} However, in the case of heading/lists, \dimension is not called. I don't understand the part about \doattributes, and couldn't trace further. Thank you. Regards, shenchen On 12/24/07 7:06 AM, "Mojca Miklavec" wrote: > > The code is too complex for me to be able to understand what's going > on (but it seems like a problem which should be fixed, I agree). > I'm using an "ugly" piece of code from the wiki instead of the module > http://wiki.contextgarden.net/Chemistry > (bottom of the page) when I need to typeset simple chemistry. I also > needed a formula to apear in titiles and it worked really nice. > > Mojca > ___________________________________________________________________________________ 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 ___________________________________________________________________________________