ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Euler Constant and limit
@ 2012-11-25  1:13 Kip Warner
  2012-11-25  9:37 ` Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Kip Warner @ 2012-11-25  1:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 877 bytes --]

Hey list,

I am trying to typeset the Verhulst equation which contains a Euler
constant which I cannot get to display correctly:

\placeformula[formula:Verhulst equation]
\startformula
\math{P(t) = \frac{K P_0 \Eulerconst^{rt}}
                  {K + P_0(\Eulerconst^{r t} - 1)}}
\stopformula

The location for the \Eulerconst just shows up blank with nothing there,
so I am assuming this is the wrong command. I am using ConTeXt
2012.11.16 under Ubuntu Precise.

In addition, the following formula does not typeset correctly. There is
no arrow linking 't' to infinity symbol:

\placeformula[formula:Limit of Verhulst equation]
\startformula
\math{\lim_{t\to\infty} P(t) = K.\,}
\stopformula

PS Please cc me, as I am not on the list currently.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

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

* Re: Euler Constant and limit
  2012-11-25  1:13 Euler Constant and limit Kip Warner
@ 2012-11-25  9:37 ` Wolfgang Schuster
  2012-11-25 20:46   ` Kip Warner
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2012-11-25  9:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Kip Warner


Am 25.11.2012 um 02:13 schrieb Kip Warner <kip@thevertigo.com>:

> Hey list,
> 
> I am trying to typeset the Verhulst equation which contains a Euler
> constant which I cannot get to display correctly:
> 
> \placeformula[formula:Verhulst equation]
> \startformula
> \math{P(t) = \frac{K P_0 \Eulerconst^{rt}}
>                  {K + P_0(\Eulerconst^{r t} - 1)}}
> \stopformula
> 
> The location for the \Eulerconst just shows up blank with nothing there,
> so I am assuming this is the wrong command. I am using ConTeXt
> 2012.11.16 under Ubuntu Precise.

You need a font which has the symbol, e.g. Cambria or Lucida OT.

> In addition, the following formula does not typeset correctly. There is
> no arrow linking 't' to infinity symbol:
> 
> \placeformula[formula:Limit of Verhulst equation]
> \startformula
> \math{\lim_{t\to\infty} P(t) = K.\,}
> \stopformula

Works for me (Version 2012.11.23).

BTW: Why do you use \math inside of \startformula because it’s the command for inline math in normal text?

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


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

* Re: Euler Constant and limit
  2012-11-25  9:37 ` Wolfgang Schuster
@ 2012-11-25 20:46   ` Kip Warner
  2012-11-25 21:15     ` Wolfgang Schuster
  2012-11-25 21:17     ` Wolfgang Schuster
  0 siblings, 2 replies; 8+ messages in thread
From: Kip Warner @ 2012-11-25 20:46 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1003 bytes --]

On Sun, 2012-11-25 at 10:37 +0100, Wolfgang Schuster wrote:
> You need a font which has the symbol, e.g. Cambria or Lucida OT.

Hey Wolfgang. Thanks for pointing that out. I had suspected as much,
which leads me to my next question: What is the setup for selecting a
new font, but just for math?

> > In addition, the following formula does not typeset correctly. There is
> > no arrow linking 't' to infinity symbol:
> > 
> > \placeformula[formula:Limit of Verhulst equation]
> > \startformula
> > \math{\lim_{t\to\infty} P(t) = K.\,}
> > \stopformula
> 
> Works for me (Version 2012.11.23).

It's probably the font I am using.

> BTW: Why do you use \math inside of \startformula because it’s the command for inline math in normal text?

I haven't any explanation. I just thought that that was how you were
suppose to do it from reading the manuals. How should it be?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

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

* Re: Euler Constant and limit
  2012-11-25 20:46   ` Kip Warner
@ 2012-11-25 21:15     ` Wolfgang Schuster
  2012-11-25 21:17     ` Wolfgang Schuster
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2012-11-25 21:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 25.11.2012 um 21:46 schrieb Kip Warner <kip@thevertigo.com>:

> On Sun, 2012-11-25 at 10:37 +0100, Wolfgang Schuster wrote:
>> You need a font which has the symbol, e.g. Cambria or Lucida OT.
> 
> Hey Wolfgang. Thanks for pointing that out. I had suspected as much,
> which leads me to my next question: What is the setup for selecting a
> new font, but just for math?

You have to define a typeface and enable it but Latin Modern as text font with patella etc.
for math doesn’t look very nice.

\definetypeface[mainface][rm][serif][modern] [default][designsize=auto]
\definetypeface[mainface][ss][sans] [modern] [default][designsize=auto]
\definetypeface[mainface][tt][mono] [modern] [default][designsize=auto]
\definetypeface[mainface][mm][math] [pagella]

\setupbodyfont[mainface]

>>> In addition, the following formula does not typeset correctly. There is
>>> no arrow linking 't' to infinity symbol:
>>> 
>>> \placeformula[formula:Limit of Verhulst equation]
>>> \startformula
>>> \math{\lim_{t\to\infty} P(t) = K.\,}
>>> \stopformula
>> 
>> Works for me (Version 2012.11.23).
> 
> It's probably the font I am using.
> 
>> BTW: Why do you use \math inside of \startformula because it’s the command for inline math in normal text?
> 
> I haven't any explanation. I just thought that that was how you were
> suppose to do it from reading the manuals. How should it be?

\setupbodyfont[pagella]

\starttext

left \math{1 + 2 = 3} middle \m{\Eulerconst} right % \math and \m are synonyms

\blank

before
\startformula
1 + 2 = 3
\stopformula
after

\stoptext

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


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

* Re: Euler Constant and limit
  2012-11-25 20:46   ` Kip Warner
  2012-11-25 21:15     ` Wolfgang Schuster
@ 2012-11-25 21:17     ` Wolfgang Schuster
  2012-11-27  6:39       ` Kip Warner
  1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2012-11-25 21:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Kip Warner


Am 25.11.2012 um 21:46 schrieb Kip Warner <kip@thevertigo.com>:

> On Sun, 2012-11-25 at 10:37 +0100, Wolfgang Schuster wrote:
>> You need a font which has the symbol, e.g. Cambria or Lucida OT.
> 
> Hey Wolfgang. Thanks for pointing that out. I had suspected as much,
> which leads me to my next question: What is the setup for selecting a
> new font, but just for math?

You have to define a typeface and enable it but Latin Modern as text font with patella etc.
for math doesn’t look very nice.

\definetypeface[mainface][rm][serif][modern] [default][designsize=auto]
\definetypeface[mainface][ss][sans] [modern] [default][designsize=auto]
\definetypeface[mainface][tt][mono] [modern] [default][designsize=auto]
\definetypeface[mainface][mm][math] [pagella]

\setupbodyfont[mainface]

>>> In addition, the following formula does not typeset correctly. There is
>>> no arrow linking 't' to infinity symbol:
>>> 
>>> \placeformula[formula:Limit of Verhulst equation]
>>> \startformula
>>> \math{\lim_{t\to\infty} P(t) = K.\,}
>>> \stopformula
>> 
>> Works for me (Version 2012.11.23).
> 
> It's probably the font I am using.
> 
>> BTW: Why do you use \math inside of \startformula because it’s the command for inline math in normal text?
> 
> I haven't any explanation. I just thought that that was how you were
> suppose to do it from reading the manuals. How should it be?

\setupbodyfont[pagella]

\starttext

left \math{1 + 2 = 3} middle \m{\Eulerconst} right % \math and \m are synonyms

\blank

before
\startformula
1 + 2 = 3
\stopformula
after

\stoptext

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


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

* Re: Euler Constant and limit
  2012-11-25 21:17     ` Wolfgang Schuster
@ 2012-11-27  6:39       ` Kip Warner
  2012-11-27  7:06         ` Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Kip Warner @ 2012-11-27  6:39 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2170 bytes --]

On Sun, 2012-11-25 at 22:17 +0100, Wolfgang Schuster wrote:
> You have to define a typeface and enable it but Latin Modern as text font with patella etc.
> for math doesn’t look very nice.
> 
> \definetypeface[mainface][rm][serif][modern] [default][designsize=auto]
> \definetypeface[mainface][ss][sans] [modern] [default][designsize=auto]
> \definetypeface[mainface][tt][mono] [modern] [default][designsize=auto]
> \definetypeface[mainface][mm][math] [pagella]
> 
> \setupbodyfont[mainface]

So that would define a typeface for Latin Modern as the main body text
and Pagella for math? So any time one typesets formulas or uses \math,
it will automatically come out as Pagella? If that is the case, it
didn't seem to work. I added the following to my environment, but the
typesetting of formulae did not change:

...
    % Font to use for math...
    \definetypeface[mainface][mm][math][pagella]
...

> >>> In addition, the following formula does not typeset correctly. There is
> >>> no arrow linking 't' to infinity symbol:
> >>> 
> >>> \placeformula[formula:Limit of Verhulst equation]
> >>> \startformula
> >>> \math{\lim_{t\to\infty} P(t) = K.\,}
> >>> \stopformula
> >> 
> >> Works for me (Version 2012.11.23).
> > 
> > It's probably the font I am using.
> > 
> >> BTW: Why do you use \math inside of \startformula because it’s the command for inline math in normal text?
> > 
> > I haven't any explanation. I just thought that that was how you were
> > suppose to do it from reading the manuals. How should it be?
> 
> \setupbodyfont[pagella]
> 
> \starttext
> 
> left \math{1 + 2 = 3} middle \m{\Eulerconst} right % \math and \m are synonyms
> 
> \blank
> 
> before
> \startformula
> 1 + 2 = 3release a new 
> \stopformula
> after
> 
> \stoptext
> 
> Wolfgang

Sorry Wolfgang, you lost me. What should the following have been written as?

        \placeformula[formula:Limit of Verhulst equation]
        \startformula
        \math{\lim_{t\to\infty} P(t) = K.\,}
        \stopformula

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

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

* Re: Euler Constant and limit
  2012-11-27  6:39       ` Kip Warner
@ 2012-11-27  7:06         ` Wolfgang Schuster
  2012-11-28  0:21           ` Kip Warner
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2012-11-27  7:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Kip Warner


Am 27.11.2012 um 07:39 schrieb Kip Warner <kip@thevertigo.com>:

> On Sun, 2012-11-25 at 22:17 +0100, Wolfgang Schuster wrote:
>> You have to define a typeface and enable it but Latin Modern as text font with patella etc.
>> for math doesn’t look very nice.
>> 
>> \definetypeface[mainface][rm][serif][modern] [default][designsize=auto]
>> \definetypeface[mainface][ss][sans] [modern] [default][designsize=auto]
>> \definetypeface[mainface][tt][mono] [modern] [default][designsize=auto]
>> \definetypeface[mainface][mm][math] [pagella]
>> 
>> \setupbodyfont[mainface]
> 
> So that would define a typeface for Latin Modern as the main body text
> and Pagella for math? So any time one typesets formulas or uses \math,
> it will automatically come out as Pagella? If that is the case, it
> didn't seem to work. I added the following to my environment, but the
> typesetting of formulae did not change:
> 
> ...
>    % Font to use for math...
>    \definetypeface[mainface][mm][math][pagella]

Better define a complete set which includes also serif and sans.
Afterwards you have to enable it with \setupbodyfont[…].

>>>>> In addition, the following formula does not typeset correctly. There is
>>>>> no arrow linking 't' to infinity symbol:
>>>>> 
>>>>> \placeformula[formula:Limit of Verhulst equation]
>>>>> \startformula
>>>>> \math{\lim_{t\to\infty} P(t) = K.\,}
>>>>> \stopformula
>>>> 
>>>> Works for me (Version 2012.11.23).
>>> 
>>> It's probably the font I am using.
>>> 
>>>> BTW: Why do you use \math inside of \startformula because it’s the command for inline math in normal text?
>>> 
>>> I haven't any explanation. I just thought that that was how you were
>>> suppose to do it from reading the manuals. How should it be?
>> 
>> \setupbodyfont[pagella]
>> 
>> \starttext
>> 
>> left \math{1 + 2 = 3} middle \m{\Eulerconst} right % \math and \m are synonyms
>> 
>> \blank
>> 
>> before
>> \startformula
>> 1 + 2 = 3release a new 
>> \stopformula
>> after
>> 
>> \stoptext
>> 
>> Wolfgang
> 
> Sorry Wolfgang, you lost me. What should the following have been written as?
> 
>        \placeformula[formula:Limit of Verhulst equation]
>        \startformula
>        \math{\lim_{t\to\infty} P(t) = K.\,}
>        \stopformula

\placeformula[formula:Limit of Verhulst equation]
\startformula
\lim_{t\to\infty} P(t) = K.
\stopformula

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


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

* Re: Euler Constant and limit
  2012-11-27  7:06         ` Wolfgang Schuster
@ 2012-11-28  0:21           ` Kip Warner
  0 siblings, 0 replies; 8+ messages in thread
From: Kip Warner @ 2012-11-28  0:21 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1932 bytes --]

On Tue, 2012-11-27 at 08:06 +0100, Wolfgang Schuster wrote:
> Better define a complete set which includes also serif and sans.
> Afterwards you have to enable it with \setupbodyfont[…].

Hey Wolfgang. The reason why I hadn't done that is I didn't want to
overwrite the selected typeface I was using already for the main body
font. Isn't that what \setupbodyfont[mainface] would do?

In any case, when I add the following to my environment file...

\definetypeface[mainface][rm][serif][modern] [default][designsize=auto]
\definetypeface[mainface][ss][sans] [modern] [default][designsize=auto]
\definetypeface[mainface][tt][mono] [modern] [default][designsize=auto]
\definetypeface[mainface][mm][math] [pagella]
\setupbodyfont[mainface]

...I end up with the following error which, as usual, I don't
understand:

Underfull \hbox (badness 10000) in paragraph at lines 62--64

! Math error: parameter \Umathfraction_rule\displaystyle is not set.
\stopdisplaymath ->\stopinnermath $$
                                    \par \afterdisplayspace \par
\egroup 
\strc_formulas_stop_formula ...native \v!formula }
                                                  \dostoptagged
\dostoptagge...
l.69 \stopformula
                 
E
? You want to edit file Terms_and_Concepts/Terms_and_Concepts.tex at
line 69

Here is the suspect file:

<https://bazaar.launchpad.net/~avaneya/avaneya/trunk/view/head:/Documentation/Contributors/Handbook/Terms_and_Concepts/Terms_and_Concepts.tex>

> \placeformula[formula:Limit of Verhulst equation]
> \startformula
> \lim_{t\to\infty} P(t) = K.
> \stopformula

So what you are saying is that there is no need for \math whenever the
formulas are bracketed with \start and \stopformula? I will give this a
try as soon as I can get the book to compile.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

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

end of thread, other threads:[~2012-11-28  0:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-25  1:13 Euler Constant and limit Kip Warner
2012-11-25  9:37 ` Wolfgang Schuster
2012-11-25 20:46   ` Kip Warner
2012-11-25 21:15     ` Wolfgang Schuster
2012-11-25 21:17     ` Wolfgang Schuster
2012-11-27  6:39       ` Kip Warner
2012-11-27  7:06         ` Wolfgang Schuster
2012-11-28  0:21           ` Kip Warner

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