ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* + as plain vanilla math character
@ 2007-09-20 10:00 Oliver Buerschaper
  2007-09-20 10:46 ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Buerschaper @ 2007-09-20 10:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear all,

I'm wondering how to typeset a sequence of pluses such that each plus  
is placed with "normal" math character spacing around it ... In this  
snippet I guess a plus (or at least the majority of pluses) is simply  
treated as a binary operator with appropriate spacing:

---

\def\ket#1{\lvert#1\rangle}

\starttext

Note the spacing in
\startformula
\startmathalignment
\NC\ket{+}\NR
\NC\ket{++}\NR
\NC\ket{+++}\NR
\NC\ket{++++}\NR
\NC\ket{000}\NR
\stopmathalignment
\stopformula

\stoptext

---

Cheerio,
Oliver
___________________________________________________________________________________
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] 5+ messages in thread

* Re: + as plain vanilla math character
  2007-09-20 10:00 + as plain vanilla math character Oliver Buerschaper
@ 2007-09-20 10:46 ` Taco Hoekwater
  2007-09-20 12:02   ` Oliver Buerschaper
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2007-09-20 10:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Oliver Buerschaper wrote:
> Dear all,
> 
> I'm wondering how to typeset a sequence of pluses such that each plus  
> is placed with "normal" math character spacing around it ... In this  
> snippet I guess a plus (or at least the majority of pluses) is simply  
> treated as a binary operator with appropriate spacing:

This should normally work, but it depends on the current math
encoding (see the math-xxx.tex files  in the distribution):

   \definemathcharacter [+] [ord] [mr] ["2B] % [bin] is default

Best wishes,
Taco
___________________________________________________________________________________
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] 5+ messages in thread

* Re: + as plain vanilla math character
  2007-09-20 10:46 ` Taco Hoekwater
@ 2007-09-20 12:02   ` Oliver Buerschaper
  2007-09-20 12:20     ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Buerschaper @ 2007-09-20 12:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Taco,

> This should normally work, but it depends on the current math
> encoding (see the math-xxx.tex files  in the distribution):
>
>    \definemathcharacter [+] [ord] [mr] ["2B] % [bin] is default

Just tried this but to no avail :-( It seems like the definition  
isn't found at all:

---

\def\ket#1{\lvert#1\rangle}

\startmathcollection[default]
	\definemathcharacter [myplus] [ord] [mr] ["2B]
\stopmathcollection

\starttext

Note the spacing in
\startformula
\startmathalignment
\NC\ket{+}\NR
\NC\ket{++}\NR
\NC\ket{+++}\NR
\NC\ket{++++}\NR
\NC\ket{\myplus\myplus\myplus\myplus}\NR
\NC\ket{000}\NR
\stopmathalignment
\stopformula

\stoptext

---

Is this caused by some wrong math encoding scheme? Or is there  
something else that I miss?

Puzzled,
Oliver
___________________________________________________________________________________
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] 5+ messages in thread

* Re: + as plain vanilla math character
  2007-09-20 12:02   ` Oliver Buerschaper
@ 2007-09-20 12:20     ` Taco Hoekwater
  2007-09-20 15:57       ` Oliver Buerschaper
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2007-09-20 12:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Oliver Buerschaper wrote:
> Hi Taco,
> 
>> This should normally work, but it depends on the current math
>> encoding (see the math-xxx.tex files  in the distribution):
>>
>>    \definemathcharacter [+] [ord] [mr] ["2B] % [bin] is default
> 
> Just tried this but to no avail :-( 

Probably because "+" is done already.

> \startmathcollection[default]
> 	\definemathcharacter [myplus] [ord] [mr] ["2B]
> \stopmathcollection

This will work, except that you need \definemathsymbol,
not \definemathcharacter.

   \startmathcollection[default]
   \definemathsymbol [myplus] [ord] [mr] ["2B]
   \stopmathcollection

Best wishes,
Taco
___________________________________________________________________________________
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] 5+ messages in thread

* Re: + as plain vanilla math character
  2007-09-20 12:20     ` Taco Hoekwater
@ 2007-09-20 15:57       ` Oliver Buerschaper
  0 siblings, 0 replies; 5+ messages in thread
From: Oliver Buerschaper @ 2007-09-20 15:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>> \startmathcollection[default]
>> 	\definemathcharacter [myplus] [ord] [mr] ["2B]
>> \stopmathcollection
>
> This will work, except that you need \definemathsymbol,
> not \definemathcharacter.
>
>    \startmathcollection[default]
>    \definemathsymbol [myplus] [ord] [mr] ["2B]
>    \stopmathcollection

That's it, stupid me ... now it works like a charm. Many thanks!

Oliver


___________________________________________________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2007-09-20 15:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-20 10:00 + as plain vanilla math character Oliver Buerschaper
2007-09-20 10:46 ` Taco Hoekwater
2007-09-20 12:02   ` Oliver Buerschaper
2007-09-20 12:20     ` Taco Hoekwater
2007-09-20 15:57       ` Oliver Buerschaper

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