Re: [NTG-context] Arithmetic overflow on placing an external figure in MP

2019-09-07 Thread Fabrice L
Hi,

> Le 7 sept. 2019 à 16:47, Henning Hraban Ramm  a écrit :
> 
> Bear with me, I still got no experience in MetaPost…
> 
> I’m trying to place a pixel image on a MP page.
> 
> According to the MetaFun manual this should work:
> 
> \startMPpage
> draw externalfigure "mill.png" scaled 5cm shifted (-6cm,0) ;
> \stopMPpage
> 
> And it works with mill.png (copied into my test dir), but with none of my 
> other PNGs, I always get
> 
> ! Arithmetic overflow.
> <*> ...xternalfigure "dodo.png" scaled 5cm shifted
> (-6cm,0) ; ;
> Uh, oh. A little while ago one of the quantities that I was
> computing got too large, so I'm afraid your answers will be
> somewhat askew. You'll probably have to adopt different
> tactics next time. But I shall try to carry on anyway.
> 
> [1]
> 
> 1 \startMPpage
> 2 draw externalfigure "dodo.png" scaled 5cm shifted (-6cm,0) ;
> 3 >>  \stopMPpage
> 4
> 

I can reproduce your error with MKIV, but this world with lmtx; I think this is 
just too big for MKIV (I’m not sure why !).
Be aware of the difference between « scaled » and « sized ». You can try:

\starttext
\startMPpage
draw externalfigure "dodo.png" sized  5cm shifted (-6cm,0) ;
\stopMPpage
\stoptext

and try:

\starttext
\startMPpage
draw externalfigure "dodo.png" scaled 0.018cm shifted (0,0) ;
draw ((0,0) -- (5cm,0) -- (5cm,5cm) -- (0,5cm) -- cycle ) withcolor red ;
\stopMPpage
\stoptext

In the second case, your image fits (approximately) in a 5cm square. 
Fabrice.


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] no pagenumber depending of number of lines?

2019-09-07 Thread Henning Hraban Ramm
Hi, I got a difficult customer…

If the last page of a chapter is less then half full (or has less than n 
lines), he doesn’t want a page number.

Is there a simple solution to that request?
Otherwise I delete the page numbers from the PDF...


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Arithmetic overflow on placing an external figure in MP

2019-09-07 Thread Henning Hraban Ramm
Bear with me, I still got no experience in MetaPost…

I’m trying to place a pixel image on a MP page.

According to the MetaFun manual this should work:

\startMPpage
draw externalfigure "mill.png" scaled 5cm shifted (-6cm,0) ;
\stopMPpage

And it works with mill.png (copied into my test dir), but with none of my other 
PNGs, I always get

! Arithmetic overflow.
<*> ...xternalfigure "dodo.png" scaled 5cm shifted
(-6cm,0) ; ;
Uh, oh. A little while ago one of the quantities that I was
computing got too large, so I'm afraid your answers will be
somewhat askew. You'll probably have to adopt different
tactics next time. But I shall try to carry on anyway.

[1]

1 \startMPpage
2 draw externalfigure "dodo.png" scaled 5cm shifted (-6cm,0) ;
3 >>  \stopMPpage
4


The same image file works with

\starttext
\externalfigure[dodo][height=8cm]
\stoptext

What’s wrong?

The image is here:
https://github.com/fiee/ConTeXt/raw/master/tshirts/img/dodo.png


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] [External] Re: Math \not

2019-09-07 Thread Rogers, Michael K
Thanks! I should have tried that.  -mkr

> On Sep 7, 2019, at 12:59 PM, Otared Kavian  wrote:
> 
> Hi you should use \nequiv as in
> 
> \starttext
> Let $f \nequiv 0$ be a function
> \stoptext
> 
> Best regards: OK
> 
>> On 7 Sep 2019, at 18:35, Rogers, Michael K  wrote:
>> 
>> In plain TeX you can get a slash through $\equiv$ with $\not\equiv$.  When I 
>> do the same in ConTeXt, the slash next to the $\equiv$.  Is there a way to 
>> get a not-equivalent sign in ConTeXt?
>> 
>> Thanks,
>> 
>> - Michael
>> 
>> \starttext
>> $\not\equiv$
>> \stoptext
>> 
>> 
>> 
>> 
>> This e-mail message (including any attachments) is for the sole use of
>> the intended recipient(s) and may contain confidential and privileged
>> information. If the reader of this message is not the intended
>> recipient, you are hereby notified that any dissemination, distribution
>> or copying of this message (including any attachments) is strictly
>> prohibited.
>> 
>> If you have received this message in error, please contact
>> the sender by reply e-mail message and destroy all copies of the
>> original message (including attachments).
>> ___
>> 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://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Math \not

2019-09-07 Thread Otared Kavian
Hi you should use \nequiv as in

\starttext
Let $f \nequiv 0$ be a function
\stoptext

Best regards: OK

> On 7 Sep 2019, at 18:35, Rogers, Michael K  wrote:
> 
> In plain TeX you can get a slash through $\equiv$ with $\not\equiv$.  When I 
> do the same in ConTeXt, the slash next to the $\equiv$.  Is there a way to 
> get a not-equivalent sign in ConTeXt?
> 
> Thanks,
> 
> - Michael
> 
> \starttext
> $\not\equiv$
> \stoptext
> 
> 
> 
> 
> This e-mail message (including any attachments) is for the sole use of
> the intended recipient(s) and may contain confidential and privileged
> information. If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination, distribution
> or copying of this message (including any attachments) is strictly
> prohibited.
> 
> If you have received this message in error, please contact
> the sender by reply e-mail message and destroy all copies of the
> original message (including attachments).
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Math \not

2019-09-07 Thread Rogers, Michael K
In plain TeX you can get a slash through $\equiv$ with $\not\equiv$.  When I do 
the same in ConTeXt, the slash next to the $\equiv$.  Is there a way to get a 
not-equivalent sign in ConTeXt?

Thanks,

- Michael

\starttext
$\not\equiv$
\stoptext




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___