ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan BRASLAU <alan.braslau@cea.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Spacing and font problem with \chemical inside display math
Date: Thu, 13 Dec 2012 16:30:23 +0100	[thread overview]
Message-ID: <20121213163023.17761169@sole> (raw)
In-Reply-To: <201212131541.57569.romain.diss@yahoo.fr>

We are currently in the process of a complete re-write of the chemical macros. In fact, we are almost finished and Hans is including the new macros in the beta (as fast as he can keep up with my changes...).

In your example, I see the spacing problem in display math but do not see the font problem. Maybe Hans can fix this extra spacing problem.

Rather than display math (as was suggested with ppchTeX), we have now introduced
\startchemicalformula
\stopchemicalformula
in order to "display" a chemical formula.

Also, I'm not sure why you might want to put \chemical{} within a \text command; may I suggest either \type{\chemical{CO_2}} or {\tt typewriter \chemical{CO_2}}, depending upon what you want to achieve.

Alan


On Thu, 13 Dec 2012 15:41:56 +0100
Romain Diss <romain.diss@yahoo.fr> wrote:

> Hi all,
> 
> I found what I suppose to be a bug with the \chemical command:
> - when one use \chemical inside display math, the spacing is wrong around the 
> \chemical stuff. The font change inside \chemical also persists outside the 
> command.
> - if one enclose the \chemical command into curly braces, the font problem do 
> not appear but the spaces are still wrong.
> - if one put the \chemical command inside a \text{} command, ConTeXt stops 
> with an error.
> These problems do not occur in inline math.
> 
> Here is a minimal example:
> 
> %% START
> \starttext
> 
> Chemical within inline math: \m{M(\chemical{CO_2})} or
> \m{M(\text{\chemical{CO_2}})}. This works fine.
> 
> Chemical in display math: \startformula M(\chemical{CO_2}) \stopformula gives
> some strange spacing and seems to modify the font outside \tex{chemical}.
> 
> Chemical in display math: \startformula M({\chemical{CO_2}}) \stopformula
> corrects the font problem but still gives some strange spacing.
> 
> %Chemical inside \text in display math: \startformula 
> %M(\text{\chemical{CO_2}}) \stopformula gives an error.
> 
> \stoptext
> %% END
> 
> Anyone has an idea to solve this?
> 
> Thanks in advance.

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2012-12-13 15:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-13 14:41 [***SPAM***] " Romain Diss
2012-12-13 14:45 ` Romain Diss
2012-12-13 14:53   ` Andre Caldas
2012-12-13 15:30 ` Alan BRASLAU [this message]
2012-12-13 23:24   ` [***SPAM***] " Romain Diss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121213163023.17761169@sole \
    --to=alan.braslau@cea.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).