ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Compiling a large metapost document
@ 2022-06-01 14:48 Stefan Nedeljkovic via ntg-context
  2022-06-01 16:43 ` Stefan Nedeljkovic via ntg-context
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Nedeljkovic via ntg-context @ 2022-06-01 14:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Stefan Nedeljkovic


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

Dear list,

I have a large .tex file with metapost embedded in it and want to compile
it, but it fails. Here is a link to the file (~12MB):
https://drive.google.com/file/d/1t-6mxFmGp-nzpl0RrPgNFq8KRvpplgDv/view?usp=sharing

Do you know of a way to compile it?
BTW, the file is automatically generated by a Python script.

Sincerely,
Stefan

[-- Attachment #1.2: Type: text/html, Size: 552 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Compiling a large metapost document
  2022-06-01 14:48 Compiling a large metapost document Stefan Nedeljkovic via ntg-context
@ 2022-06-01 16:43 ` Stefan Nedeljkovic via ntg-context
  2022-06-01 17:24   ` Bruce Horrocks via ntg-context
  2022-06-01 23:45   ` Max Chernoff via ntg-context
  0 siblings, 2 replies; 19+ messages in thread
From: Stefan Nedeljkovic via ntg-context @ 2022-06-01 16:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Stefan Nedeljkovic


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

Just fixed the file, here is the new link:
https://drive.google.com/file/d/16jTzHbaqxPmhgmNaDOBRijlhlmUCnH4j/view?usp=sharing

On Wed, Jun 1, 2022 at 4:48 PM Stefan Nedeljkovic <tsar.srb@gmail.com>
wrote:

> Dear list,
>
> I have a large .tex file with metapost embedded in it and want to compile
> it, but it fails. Here is a link to the file (~12MB):
> https://drive.google.com/file/d/1t-6mxFmGp-nzpl0RrPgNFq8KRvpplgDv/view?usp=sharing
>
> Do you know of a way to compile it?
> BTW, the file is automatically generated by a Python script.
>
> Sincerely,
> Stefan
>

[-- Attachment #1.2: Type: text/html, Size: 1150 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Compiling a large metapost document
  2022-06-01 16:43 ` Stefan Nedeljkovic via ntg-context
@ 2022-06-01 17:24   ` Bruce Horrocks via ntg-context
  2022-06-01 17:35     ` Stefan Nedeljkovic via ntg-context
  2022-06-01 23:45   ` Max Chernoff via ntg-context
  1 sibling, 1 reply; 19+ messages in thread
From: Bruce Horrocks via ntg-context @ 2022-06-01 17:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Bruce Horrocks

Hi Stefan,

What exactly are you asking for help with?

The previous file was 12MB and simply ran out of resource when compiled. The new file is 812KB and compiles provided you remove the references to \setxheight[...] because \setxheight generates an error.


> On 1 Jun 2022, at 17:43, Stefan Nedeljkovic via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Just fixed the file, here is the new link: https://drive.google.com/file/d/16jTzHbaqxPmhgmNaDOBRijlhlmUCnH4j/view?usp=sharing
> 
> On Wed, Jun 1, 2022 at 4:48 PM Stefan Nedeljkovic <tsar.srb@gmail.com> wrote:
> Dear list,
> 
> I have a large .tex file with metapost embedded in it and want to compile it, but it fails. Here is a link to the file (~12MB): https://drive.google.com/file/d/1t-6mxFmGp-nzpl0RrPgNFq8KRvpplgDv/view?usp=sharing
> 
> Do you know of a way to compile it?
> BTW, the file is automatically generated by a Python script.
> 
> Sincerely,
> Stefan

—
Bruce Horrocks
Hampshire, UK

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

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

* Re: Compiling a large metapost document
  2022-06-01 17:24   ` Bruce Horrocks via ntg-context
@ 2022-06-01 17:35     ` Stefan Nedeljkovic via ntg-context
  2022-06-01 18:34       ` Thomas A. Schmitz via ntg-context
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Nedeljkovic via ntg-context @ 2022-06-01 17:35 UTC (permalink / raw)
  To: ntg; +Cc: Stefan Nedeljkovic, mailing list for ConTeXt users


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

Sorry, i just updated the file, should now compile, but fail due to
resources. Are the configuration options to context that would enable this
file to be compiled?

On Wed, Jun 1, 2022 at 7:24 PM Bruce Horrocks <ntg@scorecrow.com> wrote:

> Hi Stefan,
>
> What exactly are you asking for help with?
>
> The previous file was 12MB and simply ran out of resource when compiled.
> The new file is 812KB and compiles provided you remove the references to
> \setxheight[...] because \setxheight generates an error.
>
>
> > On 1 Jun 2022, at 17:43, Stefan Nedeljkovic via ntg-context <
> ntg-context@ntg.nl> wrote:
> >
> > Just fixed the file, here is the new link:
> https://drive.google.com/file/d/16jTzHbaqxPmhgmNaDOBRijlhlmUCnH4j/view?usp=sharing
> >
> > On Wed, Jun 1, 2022 at 4:48 PM Stefan Nedeljkovic <tsar.srb@gmail.com>
> wrote:
> > Dear list,
> >
> > I have a large .tex file with metapost embedded in it and want to
> compile it, but it fails. Here is a link to the file (~12MB):
> https://drive.google.com/file/d/1t-6mxFmGp-nzpl0RrPgNFq8KRvpplgDv/view?usp=sharing
> >
> > Do you know of a way to compile it?
> > BTW, the file is automatically generated by a Python script.
> >
> > Sincerely,
> > Stefan
>
> —
> Bruce Horrocks
> Hampshire, UK
>
>

[-- Attachment #1.2: Type: text/html, Size: 2030 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Compiling a large metapost document
  2022-06-01 17:35     ` Stefan Nedeljkovic via ntg-context
@ 2022-06-01 18:34       ` Thomas A. Schmitz via ntg-context
  2022-06-01 20:15         ` Stefan Nedeljkovic via ntg-context
  2022-06-02 10:15         ` Hans Hagen via ntg-context
  0 siblings, 2 replies; 19+ messages in thread
From: Thomas A. Schmitz via ntg-context @ 2022-06-01 18:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Thomas A. Schmitz



On 6/1/22 19:35, Stefan Nedeljkovic via ntg-context wrote:
> Sorry, i just updated the file, should now compile, but fail due to 
> resources. Are the configuration options to context that would enable 
> this file to be compiled?
The question still stands: what do you expect us to do? Hunt for a 
problem through a huge file? What have you done to identify this 
problem? Is there a minimal example?

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

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

* Re: Compiling a large metapost document
  2022-06-01 18:34       ` Thomas A. Schmitz via ntg-context
@ 2022-06-01 20:15         ` Stefan Nedeljkovic via ntg-context
  2022-06-01 20:16           ` Stefan Nedeljkovic via ntg-context
  2022-06-01 20:25           ` Thomas A. Schmitz via ntg-context
  2022-06-02 10:15         ` Hans Hagen via ntg-context
  1 sibling, 2 replies; 19+ messages in thread
From: Stefan Nedeljkovic via ntg-context @ 2022-06-01 20:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Stefan Nedeljkovic, Thomas A. Schmitz


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

The problem *is* the file size. There is not a minimal example,
because everything works when there is less drawdot commands. There is
125000+ drawdot commands in the file.
The run ends with the message:
If you really absolutely need more capacity, you can ask a wizard to
enlarge me.
mtx-context     | fatal error: return code: 1

I really don't know how to "enlarge" LMTX, so my question is not about
debugging the file, but rather compiling it. The current version of the
file should produce no syntax etc. errors. I accidentally uploaded the
wrong file twice, now it should be fixed, and you should get the same
message in the console as me.

On Wed, Jun 1, 2022 at 9:35 PM Thomas A. Schmitz via ntg-context <
ntg-context@ntg.nl> wrote:

>
>
> On 6/1/22 19:35, Stefan Nedeljkovic via ntg-context wrote:
> > Sorry, i just updated the file, should now compile, but fail due to
> > resources. Are the configuration options to context that would enable
> > this file to be compiled?
> The question still stands: what do you expect us to do? Hunt for a
> problem through a huge file? What have you done to identify this
> problem? Is there a minimal example?
>
> Thomas
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 2558 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Compiling a large metapost document
  2022-06-01 20:15         ` Stefan Nedeljkovic via ntg-context
@ 2022-06-01 20:16           ` Stefan Nedeljkovic via ntg-context
  2022-06-01 20:25           ` Thomas A. Schmitz via ntg-context
  1 sibling, 0 replies; 19+ messages in thread
From: Stefan Nedeljkovic via ntg-context @ 2022-06-01 20:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Stefan Nedeljkovic, Thomas A. Schmitz


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

P.S. Use the last link I posted, the updated file is there.

On Wed, Jun 1, 2022 at 10:15 PM Stefan Nedeljkovic <tsar.srb@gmail.com>
wrote:

> The problem *is* the file size. There is not a minimal example,
> because everything works when there is less drawdot commands. There is
> 125000+ drawdot commands in the file.
> The run ends with the message:
> If you really absolutely need more capacity, you can ask a wizard to
> enlarge me.
> mtx-context     | fatal error: return code: 1
>
> I really don't know how to "enlarge" LMTX, so my question is not about
> debugging the file, but rather compiling it. The current version of the
> file should produce no syntax etc. errors. I accidentally uploaded the
> wrong file twice, now it should be fixed, and you should get the same
> message in the console as me.
>
> On Wed, Jun 1, 2022 at 9:35 PM Thomas A. Schmitz via ntg-context <
> ntg-context@ntg.nl> wrote:
>
>>
>>
>> On 6/1/22 19:35, Stefan Nedeljkovic via ntg-context wrote:
>> > Sorry, i just updated the file, should now compile, but fail due to
>> > resources. Are the configuration options to context that would enable
>> > this file to be compiled?
>> The question still stands: what do you expect us to do? Hunt for a
>> problem through a huge file? What have you done to identify this
>> problem? Is there a minimal example?
>>
>> Thomas
>>
>> ___________________________________________________________________________________
>> 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
>>
>> ___________________________________________________________________________________
>>
>

[-- Attachment #1.2: Type: text/html, Size: 2993 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Compiling a large metapost document
  2022-06-01 20:15         ` Stefan Nedeljkovic via ntg-context
  2022-06-01 20:16           ` Stefan Nedeljkovic via ntg-context
@ 2022-06-01 20:25           ` Thomas A. Schmitz via ntg-context
  2022-06-01 21:30             ` Stefan Nedeljkovic via ntg-context
  1 sibling, 1 reply; 19+ messages in thread
From: Thomas A. Schmitz via ntg-context @ 2022-06-01 20:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Thomas A. Schmitz


On 6/1/22 22:15, Stefan Nedeljkovic via ntg-context wrote:
> The problem *is* the file size. There is not a minimal example, 
> because everything works when there is less drawdot commands. There is 
> 125000+ drawdot commands in the file.
> The run ends with the message:
> If you really absolutely need more capacity, you can ask a wizard to 
> enlarge me.
> mtx-context     | fatal error: return code: 1
> 
> I really don't know how to "enlarge" LMTX, so my question is not about 
> debugging the file, but rather compiling it. The current version of the 
> file should produce no syntax etc. errors. I accidentally uploaded the 
> wrong file twice, now it should be fixed, and you should get the same 
> message in the console as me.

Excuse me: you want me to download a huge file, from an unknown author, 
that may or may not contain all sorts of things. You want me to compile 
this file on my computer. To obtain an error message that you could have 
mentioned in your first message. Why? Why don't you search the list 
archives with the key words "enlarge capacity"? I still don't understand 
what you expect us to do.

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

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

* Re: Compiling a large metapost document
  2022-06-01 20:25           ` Thomas A. Schmitz via ntg-context
@ 2022-06-01 21:30             ` Stefan Nedeljkovic via ntg-context
  2022-06-01 22:26               ` Bruce Horrocks via ntg-context
  2022-06-02  7:18               ` Thomas A. Schmitz via ntg-context
  0 siblings, 2 replies; 19+ messages in thread
From: Stefan Nedeljkovic via ntg-context @ 2022-06-01 21:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Stefan Nedeljkovic, Thomas A. Schmitz


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

Dear Thomas,

I'm sorry for all the shortcomings of my question. I'll try to be more
concrete. If you won't download my file, could you at least give me a hint
on how to configure LMTX?

I Tried editing the file context/tex/texmf/web2c/texmfcnf.lua, and running
context --generate, context --make, but the error persists. I'm new to
context and I don't know how to configure this file. Running --usage
reveals in the log that the category "token" is exceeded. I tried the
aforementioned editing of the conf file, but the log stays the same.

Sincerely,
Stefan

On Wed, Jun 1, 2022 at 10:26 PM Thomas A. Schmitz via ntg-context <
ntg-context@ntg.nl> wrote:

>
> On 6/1/22 22:15, Stefan Nedeljkovic via ntg-context wrote:
> > The problem *is* the file size. There is not a minimal example,
> > because everything works when there is less drawdot commands. There is
> > 125000+ drawdot commands in the file.
> > The run ends with the message:
> > If you really absolutely need more capacity, you can ask a wizard to
> > enlarge me.
> > mtx-context     | fatal error: return code: 1
> >
> > I really don't know how to "enlarge" LMTX, so my question is not about
> > debugging the file, but rather compiling it. The current version of the
> > file should produce no syntax etc. errors. I accidentally uploaded the
> > wrong file twice, now it should be fixed, and you should get the same
> > message in the console as me.
>
> Excuse me: you want me to download a huge file, from an unknown author,
> that may or may not contain all sorts of things. You want me to compile
> this file on my computer. To obtain an error message that you could have
> mentioned in your first message. Why? Why don't you search the list
> archives with the key words "enlarge capacity"? I still don't understand
> what you expect us to do.
>
> Thomas
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3381 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Compiling a large metapost document
  2022-06-01 21:30             ` Stefan Nedeljkovic via ntg-context
@ 2022-06-01 22:26               ` Bruce Horrocks via ntg-context
  2022-06-02  7:18               ` Thomas A. Schmitz via ntg-context
  1 sibling, 0 replies; 19+ messages in thread
From: Bruce Horrocks via ntg-context @ 2022-06-01 22:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Bruce Horrocks



> On 1 Jun 2022, at 22:30, Stefan Nedeljkovic via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Dear Thomas,
> 
> I'm sorry for all the shortcomings of my question. I'll try to be more concrete. If you won't download my file, could you at least give me a hint on how to configure LMTX?
> 
> I Tried editing the file context/tex/texmf/web2c/texmfcnf.lua, and running context --generate, context --make, but the error persists. I'm new to context and I don't know how to configure this file. Running --usage reveals in the log that the category "token" is exceeded. I tried the aforementioned editing of the conf file, but the log stays the same.

For the benefit of others, the error is:

tex memory      > bumping category 'token' failed, details: all=80000000 | ini=495183 | max=10000000 | mem=10000000 | min=1000000 | ptr=10002079 | set=10000000 | stp=250000 | top=10000000

I can't see where max token memory is defined to try and increase it. The only reference seems to be in ~/tex/texmf-context/tex/context/base/mkxl/luat-cod.lmt but uncommenting and increasing had no obvious effect.

—
Bruce Horrocks
Hampshire, UK

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

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

* Re: Compiling a large metapost document
  2022-06-01 16:43 ` Stefan Nedeljkovic via ntg-context
  2022-06-01 17:24   ` Bruce Horrocks via ntg-context
@ 2022-06-01 23:45   ` Max Chernoff via ntg-context
  2022-06-02  2:00     ` Stefan Nedeljkovic via ntg-context
  1 sibling, 1 reply; 19+ messages in thread
From: Max Chernoff via ntg-context @ 2022-06-01 23:45 UTC (permalink / raw)
  To: ntg-context; +Cc: Max Chernoff

> I have a large .tex file with metapost embedded in it and want to compile
> it, but it fails. Do you know of a way to compile it?

Just use plain MetaPost:

     diff --git a/belgrade_gm.tex b/belgrade_gm.mp
     index 3281754..d536b64 100644
     --- a/belgrade_gm.tex
     +++ b/belgrade_gm.mp
     @@ -1 +1 @@
     -\startMPpage
     +beginfig(1)
     @@ -125187 +125187 @@ drawdot (264.352, 116.362) withpen pencircle scaled 1.35 withcolor (0.929, 0.110
     -\stopMPpage
     \ No newline at end of file
     +endfig; end;

Then compile with:
     
     mpost belgrade_gm
     ps2pdf belgrade_gm.1

-- Max

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

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

* Re: Compiling a large metapost document
  2022-06-01 23:45   ` Max Chernoff via ntg-context
@ 2022-06-02  2:00     ` Stefan Nedeljkovic via ntg-context
  2022-06-02  2:22       ` Max Chernoff via ntg-context
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Nedeljkovic via ntg-context @ 2022-06-02  2:00 UTC (permalink / raw)
  To: Max Chernoff; +Cc: Stefan Nedeljkovic, mailing list for ConTeXt users


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

Thank you very much Max! It works indeed! One more question. How would I
import the eps file back into MPpage, so I could do trickery with text.


)

On Thu, Jun 2, 2022 at 1:46 AM Max Chernoff <mseven@telus.net> wrote:

> > I have a large .tex file with metapost embedded in it and want to compile
> > it, but it fails. Do you know of a way to compile it?
>
> Just use plain MetaPost:
>
>      diff --git a/belgrade_gm.tex b/belgrade_gm.mp
>      index 3281754..d536b64 100644
>      --- a/belgrade_gm.tex
>      +++ b/belgrade_gm.mp
>      @@ -1 +1 @@
>      -\startMPpage
>      +beginfig(1)
>      @@ -125187 +125187 @@ drawdot (264.352, 116.362) withpen pencircle
> scaled 1.35 withcolor (0.929, 0.110
>      -\stopMPpage
>      \ No newline at end of file
>      +endfig; end;
>
> Then compile with:
>
>      mpost belgrade_gm
>      ps2pdf belgrade_gm.1
>
> -- Max
>
>

[-- Attachment #1.2: Type: text/html, Size: 1447 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Compiling a large metapost document
  2022-06-02  2:00     ` Stefan Nedeljkovic via ntg-context
@ 2022-06-02  2:22       ` Max Chernoff via ntg-context
  2022-06-02  2:41         ` Stefan Nedeljkovic via ntg-context
  0 siblings, 1 reply; 19+ messages in thread
From: Max Chernoff via ntg-context @ 2022-06-02  2:22 UTC (permalink / raw)
  To: Stefan Nedeljkovic; +Cc: Max Chernoff, mailing list for ConTeXt users

On 2022-06-01 8:00 p.m., Stefan Nedeljkovic wrote:
> Thank you very much Max! It works indeed! One more question. How would I 
> import the eps file back into MPpage, so I could do trickery with text.

Convert the PostScript file into PDF with either "ps2pdf" or 
GhostScript, then you can import the file with "externalfigure":

     \startMPpage
         draw externalfigure "belgrade_gm.pdf";
         draw textext.top("One") shifted (264.352, 116.362);
         draw textext.top("Two") shifted (306.821, 186.907);
     \stopMPpage

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

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

* Re: Compiling a large metapost document
  2022-06-02  2:22       ` Max Chernoff via ntg-context
@ 2022-06-02  2:41         ` Stefan Nedeljkovic via ntg-context
  2022-06-02  3:21           ` Stefan Nedeljkovic via ntg-context
  0 siblings, 1 reply; 19+ messages in thread
From: Stefan Nedeljkovic via ntg-context @ 2022-06-02  2:41 UTC (permalink / raw)
  To: Max Chernoff; +Cc: Stefan Nedeljkovic, mailing list for ConTeXt users


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

There is one more problem: the pdf generated has incorrect margins. I tried
to manually calculate the size in ps points and run gs directly, but the
results are the same. How can I get an accurate rendering of the page?

On Thu, Jun 2, 2022 at 4:22 AM Max Chernoff <mseven@telus.net> wrote:

> On 2022-06-01 8:00 p.m., Stefan Nedeljkovic wrote:
> > Thank you very much Max! It works indeed! One more question. How would I
> > import the eps file back into MPpage, so I could do trickery with text.
>
> Convert the PostScript file into PDF with either "ps2pdf" or
> GhostScript, then you can import the file with "externalfigure":
>
>      \startMPpage
>          draw externalfigure "belgrade_gm.pdf";
>          draw textext.top("One") shifted (264.352, 116.362);
>          draw textext.top("Two") shifted (306.821, 186.907);
>      \stopMPpage
>
> -- Max
>

[-- Attachment #1.2: Type: text/html, Size: 1259 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Compiling a large metapost document
  2022-06-02  2:41         ` Stefan Nedeljkovic via ntg-context
@ 2022-06-02  3:21           ` Stefan Nedeljkovic via ntg-context
  0 siblings, 0 replies; 19+ messages in thread
From: Stefan Nedeljkovic via ntg-context @ 2022-06-02  3:21 UTC (permalink / raw)
  To: Max Chernoff; +Cc: Stefan Nedeljkovic, mailing list for ConTeXt users


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

I figured it out. I was wrongly calculating the page size argument for gs.
Thank you very, very much again Max!

On Thu, Jun 2, 2022 at 4:41 AM Stefan Nedeljkovic <tsar.srb@gmail.com>
wrote:

> There is one more problem: the pdf generated has incorrect margins. I
> tried to manually calculate the size in ps points and run gs directly, but
> the results are the same. How can I get an accurate rendering of the page?
>
> On Thu, Jun 2, 2022 at 4:22 AM Max Chernoff <mseven@telus.net> wrote:
>
>> On 2022-06-01 8:00 p.m., Stefan Nedeljkovic wrote:
>> > Thank you very much Max! It works indeed! One more question. How would
>> I
>> > import the eps file back into MPpage, so I could do trickery with text.
>>
>> Convert the PostScript file into PDF with either "ps2pdf" or
>> GhostScript, then you can import the file with "externalfigure":
>>
>>      \startMPpage
>>          draw externalfigure "belgrade_gm.pdf";
>>          draw textext.top("One") shifted (264.352, 116.362);
>>          draw textext.top("Two") shifted (306.821, 186.907);
>>      \stopMPpage
>>
>> -- Max
>>
>

[-- Attachment #1.2: Type: text/html, Size: 1755 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Compiling a large metapost document
  2022-06-01 21:30             ` Stefan Nedeljkovic via ntg-context
  2022-06-01 22:26               ` Bruce Horrocks via ntg-context
@ 2022-06-02  7:18               ` Thomas A. Schmitz via ntg-context
  2022-06-02  8:51                 ` Stefan Nedeljkovic via ntg-context
  1 sibling, 1 reply; 19+ messages in thread
From: Thomas A. Schmitz via ntg-context @ 2022-06-02  7:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Thomas A. Schmitz


On 01.06.22 23:30, Stefan Nedeljkovic wrote:
> I Tried editing the file context/tex/texmf/web2c/texmfcnf.lua, and 
> running context --generate, context --make, but the error persists. I'm 
> new to context and I don't know how to configure this file. Running 
> --usage reveals in the log that the category "token" is exceeded. I 
> tried the aforementioned editing of the conf file, but the log stays the 
> same.
> 

That is the correct file, and I would assume that the category 
"luametatex.tokensize" (line 135) would be the correct one to edit. Is 
that the one you've edited, e.g. by bumping size to double its current 
value?

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

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

* Re: Compiling a large metapost document
  2022-06-02  7:18               ` Thomas A. Schmitz via ntg-context
@ 2022-06-02  8:51                 ` Stefan Nedeljkovic via ntg-context
  0 siblings, 0 replies; 19+ messages in thread
From: Stefan Nedeljkovic via ntg-context @ 2022-06-02  8:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Stefan Nedeljkovic, Thomas A. Schmitz


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

I just bumped it to double the size, did mtxrun --reload, context
--generate and the error is still
tex memory      > bumping category 'token' failed, details: all=80000000 |
ini=4
We ran into troubles scanning an argument.

On Thu, Jun 2, 2022 at 9:20 AM Thomas A. Schmitz via ntg-context <
ntg-context@ntg.nl> wrote:

>
> On 01.06.22 23:30, Stefan Nedeljkovic wrote:
> > I Tried editing the file context/tex/texmf/web2c/texmfcnf.lua, and
> > running context --generate, context --make, but the error persists. I'm
> > new to context and I don't know how to configure this file. Running
> > --usage reveals in the log that the category "token" is exceeded. I
> > tried the aforementioned editing of the conf file, but the log stays the
> > same.
> >
>
> That is the correct file, and I would assume that the category
> "luametatex.tokensize" (line 135) would be the correct one to edit. Is
> that the one you've edited, e.g. by bumping size to double its current
> value?
>
> Thomas
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 2409 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Compiling a large metapost document
  2022-06-01 18:34       ` Thomas A. Schmitz via ntg-context
  2022-06-01 20:15         ` Stefan Nedeljkovic via ntg-context
@ 2022-06-02 10:15         ` Hans Hagen via ntg-context
  2022-06-02 10:36           ` Stefan Nedeljkovic via ntg-context
  1 sibling, 1 reply; 19+ messages in thread
From: Hans Hagen via ntg-context @ 2022-06-02 10:15 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 6/1/2022 8:34 PM, Thomas A. Schmitz via ntg-context wrote:
> 
> 
> On 6/1/22 19:35, Stefan Nedeljkovic via ntg-context wrote:
>> Sorry, i just updated the file, should now compile, but fail due to 
>> resources. Are the configuration options to context that would enable 
>> this file to be compiled?
> The question still stands: what do you expect us to do? Hunt for a 
> problem through a huge file? What have you done to identify this 
> problem? Is there a minimal example?
due to a mail server crash i lost todays and last nights mail sop here s 
a partial reply

(Just put that large mp blob in a file and call that one instead of 
passing through tex's tokenizer:

\startMPpage
     input test.mp ;
\stopMPpage

then in order to save runtime do

draw image (
draw (220.852, 127.175) ;
draw (226.248, 128.606) ;
draw (221.840, 129.541) ;
draw (280.733, 100.927) ;
draw (276.968, 83.053) ;
draw (251.644, 83.879) ;
) withpen pencircle scaled 0.16875 withcolor (0.976, 0.702, 0.204) ;


Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Compiling a large metapost document
  2022-06-02 10:15         ` Hans Hagen via ntg-context
@ 2022-06-02 10:36           ` Stefan Nedeljkovic via ntg-context
  0 siblings, 0 replies; 19+ messages in thread
From: Stefan Nedeljkovic via ntg-context @ 2022-06-02 10:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Stefan Nedeljkovic


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

Thanks for the advice, Hans. I'll try that!

On Thu, Jun 2, 2022 at 12:17 PM Hans Hagen via ntg-context <
ntg-context@ntg.nl> wrote:

> On 6/1/2022 8:34 PM, Thomas A. Schmitz via ntg-context wrote:
> >
> >
> > On 6/1/22 19:35, Stefan Nedeljkovic via ntg-context wrote:
> >> Sorry, i just updated the file, should now compile, but fail due to
> >> resources. Are the configuration options to context that would enable
> >> this file to be compiled?
> > The question still stands: what do you expect us to do? Hunt for a
> > problem through a huge file? What have you done to identify this
> > problem? Is there a minimal example?
> due to a mail server crash i lost todays and last nights mail sop here s
> a partial reply
>
> (Just put that large mp blob in a file and call that one instead of
> passing through tex's tokenizer:
>
> \startMPpage
>      input test.mp ;
> \stopMPpage
>
> then in order to save runtime do
>
> draw image (
> draw (220.852, 127.175) ;
> draw (226.248, 128.606) ;
> draw (221.840, 129.541) ;
> draw (280.733, 100.927) ;
> draw (276.968, 83.053) ;
> draw (251.644, 83.879) ;
> ) withpen pencircle scaled 0.16875 withcolor (0.976, 0.702, 0.204) ;
>
>
> Hans
>
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 3228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2022-06-02 10:36 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 14:48 Compiling a large metapost document Stefan Nedeljkovic via ntg-context
2022-06-01 16:43 ` Stefan Nedeljkovic via ntg-context
2022-06-01 17:24   ` Bruce Horrocks via ntg-context
2022-06-01 17:35     ` Stefan Nedeljkovic via ntg-context
2022-06-01 18:34       ` Thomas A. Schmitz via ntg-context
2022-06-01 20:15         ` Stefan Nedeljkovic via ntg-context
2022-06-01 20:16           ` Stefan Nedeljkovic via ntg-context
2022-06-01 20:25           ` Thomas A. Schmitz via ntg-context
2022-06-01 21:30             ` Stefan Nedeljkovic via ntg-context
2022-06-01 22:26               ` Bruce Horrocks via ntg-context
2022-06-02  7:18               ` Thomas A. Schmitz via ntg-context
2022-06-02  8:51                 ` Stefan Nedeljkovic via ntg-context
2022-06-02 10:15         ` Hans Hagen via ntg-context
2022-06-02 10:36           ` Stefan Nedeljkovic via ntg-context
2022-06-01 23:45   ` Max Chernoff via ntg-context
2022-06-02  2:00     ` Stefan Nedeljkovic via ntg-context
2022-06-02  2:22       ` Max Chernoff via ntg-context
2022-06-02  2:41         ` Stefan Nedeljkovic via ntg-context
2022-06-02  3:21           ` Stefan Nedeljkovic via ntg-context

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