ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem with chemistry in display mode
@ 2007-10-09 15:50 Shen Chen
  2007-10-09 17:59 ` Aditya Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: Shen Chen @ 2007-10-09 15:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all, 

The following example with the chemical module complains that "! Argument of
\mtharrowfill has an extra }.".

-----------
\usemodule[chemic]
\starttext
$$ \chemical{2H_2,PLUS,O_2,GIVES,2H_2O} $$
\stoptext
-----------

The result pdf looks fine, though. The annoying problem only occurs when
there's an arrow "GIVES", and only in display mode.

I am using ConTeXt 2007.08.24, and the complete warning message is

-----------
! Argument of \mtharrowfill has an extra }.
<inserted text> 
                \par
<to be read again> 
                   }
\chemicaloutermolecule ...chemicalstyle {\strut #1
                                                  }$}\doresetsubscripts
}\ma...

\dochemicalouterarrow ...>\!!zeropoint \box 4\fi }
                                                  \egroup
\p!compareprocessactionD ...ommalistelement {#3}#2
                                                  \expandafter
\quitcommalis...

\next2 #1,->\p!dodoprocessaction {#1}
                                     \doprocesscommaitem
...
-----------


Thanks a lot,
shenchen

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with chemistry in display mode
  2007-10-09 15:50 Problem with chemistry in display mode Shen Chen
@ 2007-10-09 17:59 ` Aditya Mahajan
  2007-10-10  2:18   ` Shen Chen
  0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2007-10-09 17:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 9 Oct 2007, Shen Chen wrote:

> Hi all,
>
> The following example with the chemical module complains that "! Argument of
> \mtharrowfill has an extra }.".
>
> -----------
> \usemodule[chemic]
> \starttext
> $$ \chemical{2H_2,PLUS,O_2,GIVES,2H_2O} $$
> \stoptext
> -----------
>
> The result pdf looks fine, though. The annoying problem only occurs when
> there's an arrow "GIVES", and only in display mode.

This error is due to a change that I suggested in math-ext (for over 
and under arrows). I did not check that it breaks ppchtex. Here is a 
fix. Add this somewhere in your style file:

\def\chemicalsingleouterarrow
   {\dochemicalouterarrow
      {\hbox to \dimen2{\rightarrowfill\textstyle}}}

\def\chemicaldoubleouterarrow
   {\dochemicalouterarrow
      {\lower.5\ht0\vbox
         {\offinterlineskip
          \hbox to \dimen2{\rightarrowfill\textstyle}
          \hbox to \dimen2{\leftarrowfill\textstyle}}}}

\def\chemicaltwintipouterarrow
   {\dochemicalouterarrow
      {\hbox
         {\hbox to \dimen2{\rightarrowfill\textstyle}%
          \hskip-\dimen2
          \hbox to \dimen2{\leftarrowfill\textstyle}}}}


Hans, this should be corrected in ppchtex. There are a few other 
chemistry modules that use arrowfills, which now needs an argument 
specifying the math mode in which arrow should be drawn.

I will look into it, but I have examples of working chemical 
formulas.

Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with chemistry in display mode
  2007-10-09 17:59 ` Aditya Mahajan
@ 2007-10-10  2:18   ` Shen Chen
  0 siblings, 0 replies; 3+ messages in thread
From: Shen Chen @ 2007-10-10  2:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

The fix works. Thanks a lot!

shenchen

On 10/10/07 1:59 AM, "Aditya Mahajan" <adityam@umich.edu> wrote:

> On Tue, 9 Oct 2007, Shen Chen wrote:
> 
>> Hi all,
>> 
>> The following example with the chemical module complains that "! Argument of
>> \mtharrowfill has an extra }.".
>> 
>> -----------
>> \usemodule[chemic]
>> \starttext
>> $$ \chemical{2H_2,PLUS,O_2,GIVES,2H_2O} $$
>> \stoptext
>> -----------
>> 
>> The result pdf looks fine, though. The annoying problem only occurs when
>> there's an arrow "GIVES", and only in display mode.
> 
> This error is due to a change that I suggested in math-ext (for over
> and under arrows). I did not check that it breaks ppchtex. Here is a
> fix. Add this somewhere in your style file:
> 
> \def\chemicalsingleouterarrow
>    {\dochemicalouterarrow
>       {\hbox to \dimen2{\rightarrowfill\textstyle}}}
> 
> \def\chemicaldoubleouterarrow
>    {\dochemicalouterarrow
>       {\lower.5\ht0\vbox
>          {\offinterlineskip
>           \hbox to \dimen2{\rightarrowfill\textstyle}
>           \hbox to \dimen2{\leftarrowfill\textstyle}}}}
> 
> \def\chemicaltwintipouterarrow
>    {\dochemicalouterarrow
>       {\hbox
>          {\hbox to \dimen2{\rightarrowfill\textstyle}%
>           \hskip-\dimen2
>           \hbox to \dimen2{\leftarrowfill\textstyle}}}}
> 
> 
> Hans, this should be corrected in ppchtex. There are a few other
> chemistry modules that use arrowfills, which now needs an argument
> specifying the math mode in which arrow should be drawn.
> 
> I will look into it, but I have examples of working chemical
> formulas.
> 
> Aditya
> ______________________________________________________________________________
> _____
> 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
> ______________________________________________________________________________
> _____

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-10  2:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-09 15:50 Problem with chemistry in display mode Shen Chen
2007-10-09 17:59 ` Aditya Mahajan
2007-10-10  2:18   ` Shen Chen

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).