Re: [NTG-context] issue in Lua syntax formatting
Am 01.06.22 um 02:39 schrieb Max Chernoff: the formatting of Lua multi-line strings messes up the source structure, in the following MWE, the "one" is displayed after "[[": I can reproduce this. As a workaround, you can insert a non-breaking space (U+00A0) immediately after the "[[": Good idea, but I’d like to avoid invisible tweaks. You can also use the Scite syntax highlighting: \usemodule[scite] Thank you for the reminder! Since I need it for the CG journal, I wanted to avoid additional dependencies, but the scite module is part of the distribution anyway and works as a drop-in replacement. Hraban ___ 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] ugly bug
Hi, several times I got problems with my publishing house when they noticed that the headerlines jump up and down on pages that end/begin with qoutes (i.e. smaller interlineskip), see example below: on page 1 the blackrule is about 1mm higher than on page 2. In the past I then used really laborious workarounds to get these single pages in the correct way (without jumping)… manual pagebreak, re-define layout etc. But as the pages are hard to find it would be better that the layout would be reliable consistent. How can this be solved? Best wishes, Steffen === \setupbodyfont[palatino,9.5pt]\setupinterlinespace[13pt] \setuppagenumbering [alternative=doublesided,location=] \setupheader[strut=yes] \setupheadertexts[text][][\blackrule] \definepapersize[stw][width=17cm,height=24cm] \setuppapersize[stw][stw] \setuplayout [width=122mm, backspace=18mm,topspace=10mm, header=7mm,headerdistance=5.969mm, footer=5mm,footerdistance=5mm,height=214.031mm, location=middle] \definedelimitedtext [narrowtext] [leftmargin=6mm,rightmargin=0mm]%, \starttext %%Test 1: \dorecurse{6}{\input linden} %%Test 2: %\dorecurse{5}{\input tufte} \start \startdelimitedtext[narrowtext] \switchtobodyfont[8pt]\setuplocalinterlinespace[line=11pt] \input linden\par \stopdelimitedtext \stop \stoptext ___ 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] Compiling a large metapost document
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 ___ 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] Compiling a large metapost document
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 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 > 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 ___
[NTG-context] issue with scite module
Dear list, I have the following sample: \usemodule[scite] \starttext \startTEXpage[offset=1ex] \type[option=xml]{} \type[option=xml]{<áñß/>} \stopTEXpage \stoptext Using scite, I don’t get the second element right. Without scite, both elements are displayed right. In both Geany and Notepad++ (which use Scintilla internally), the two elements are displayed right. Could anyone confirm the issue? Many thanks for your help, Pablo ___ 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] Compiling a large metapost document
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 > 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 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 ___
Re: [NTG-context] issue with scite module
On 6/1/22 18:58, Henning Hraban Ramm via ntg-context wrote: > Am 01.06.22 um 18:47 schrieb Pablo Rodriguez via ntg-context: >> [...] >> Could anyone confirm the issue? > > Hi Pablo, > > with LMTX version 2022.05.11, both elements are displayed, but the first > in blue, the second in red. Apparently the scite highlighter doesn’t > like non-ASCII characters in elements. Hi Hraban, this is exactly what I’m experiencing (and sorry, I forgot to mention that I was using current latest). I experienced that without scite and Hans fixed it (in buff-imp-xml.lua). I mentioned both Geany and Notepad++, because I think it may not be an issue outside ConTeXt. But I don’t know which file deals with it (so I could try to submit a patch). Many thanks for your help, Pablo ___ 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] issue with scite module
Am 01.06.22 um 18:47 schrieb Pablo Rodriguez via ntg-context: Dear list, I have the following sample: \usemodule[scite] \starttext \startTEXpage[offset=1ex] \type[option=xml]{} \type[option=xml]{<áñß/>} \stopTEXpage \stoptext Using scite, I don’t get the second element right. Without scite, both elements are displayed right. In both Geany and Notepad++ (which use Scintilla internally), the two elements are displayed right. Could anyone confirm the issue? Hi Pablo, with LMTX version 2022.05.11, both elements are displayed, but the first in blue, the second in red. Apparently the scite highlighter doesn’t like non-ASCII characters in elements. Hraban ___ 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] Compiling a large metapost document
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 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 > ___ 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] issue with scite module
Am 01.06.22 um 19:45 schrieb Pablo Rodriguez via ntg-context: But I don’t know which file deals with it (so I could try to submit a patch). That would be texmf-context/tex/context/modules/mkiv/m-scite.mkiv and texmf-context/context/data/scite/context/lexers/scite-context-lexer-xml.lua and there probably local name = (R("az","AZ","09") + S("_-."))^1 Now, I still don’t understand LPEG and don’t know if there’s a general “character” class that doesn’t need a list... Hraban ___ 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] Compiling a large metapost document
P.S. Use the last link I posted, the updated file is there. On Wed, Jun 1, 2022 at 10:15 PM Stefan Nedeljkovic 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 >> >> ___ >> > ___ 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] Compiling a large metapost document
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 ___
Re: [NTG-context] Compiling a large metapost document
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 > > ___ > ___ 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] Compiling a large metapost document
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 > > ___ > ___ 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] issue with scite module
Now, I still don’t understand LPEG and don’t know if there’s a general “character” class that doesn’t need a list... Well looking through the XML spec https://www.w3.org/TR/REC-xml/#NT-NameChar you'd think that we'd want a pattern like this: local name = (R("az","AZ","09", "\u{C0}\u{D6}", "\u{D8}\u{F6}", "\u{F8}\u{2FF}", "\u{370}\u{37D}", "\u{37F}\u{1FFF}", "\u{200C}\u{200D}", "\u{2070}\u{218F}", "\u{2C00}\u{2FEF}", "\u{3001}\u{D7FF}", "\u{F900}\u{FDCF}", "\u{FDF0}\u{FFFD}", "\u{1}\u{E}", "\u{0300}\u{036F}", "\u{203F}\u{2040}") + S("_-.\u{B7}"))^1 But that doesn't work, since The same is true for lpeg.R, although the latter will display an error message if used with multibyte characters. Therefore lpeg.R('aä') results in the message bad argument #1 to 'R' (range must have two characters), since to lpeg, ä is two ’characters’ (bytes), so aä totals three. (https://texdoc.org/serve/luatex/0##680) The easiest way that I found was to just cheat and use everything with a TeX catcode 11 ("letters"): local name = (R("az","AZ","09") + S("_-.") + lpeg.utfchartabletopattern(characters.csletters))^1 This isn't strictly speaking correct, but I think that it's close enough. It seems to work correctly for Pablo's initial example, but it may break something else. -- Max diff --git a/texmf-context/context/data/scite/context/lexers/scite-context-lexer-xml.original b/texmf-context/context/data/scite/context/lexers/scite-context-lexer-xml.lua index e635d40..97de3fd 100644 --- a/texmf-context/context/data/scite/context/lexers/scite-context-lexer-xml.original +++ b/texmf-context/context/data/scite/context/lexers/scite-context-lexer-xml.lua @@ -41,7 +41,7 @@ local semicolon= P(";") local equal= P("=") local ampersand= P("&") -local name = (R("az","AZ","09") + S("_-."))^1 +local name = (R("az","AZ","09") + S("_-.") + lpeg.utfchartabletopattern(characters.csletters))^1 local openbegin= P("<") local openend = P("") + P(">") ___ 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] Compiling a large metapost document
> On 1 Jun 2022, at 22:30, Stefan Nedeljkovic via ntg-context > 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=8000 | ini=495183 | max=1000 | mem=1000 | min=100 | ptr=10002079 | set=1000 | stp=25 | top=1000 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 ___
Re: [NTG-context] Compiling a large metapost document
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 ___
Re: [NTG-context] Compiling a large metapost document
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 ___
Re: [NTG-context] Compiling a large metapost document
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 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 > > ___ 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] Compiling a large metapost document
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 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 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 >> > ___ 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] Compiling a large metapost document
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 ___
Re: [NTG-context] Compiling a large metapost document
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 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 > ___ 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 ___