Re: [NTG-context] placing (on) layers
On 4/15/22 21:51, Henning Hraban Ramm via ntg-context wrote: > Hi again, > > I’m always struggling with putting stuff on layers, since these just > never start where I’d expect them to, and the offsets changed a few > times within the last years. > > Please explain how I should define a layer that covers the whole page, > since the following MWE is wrong (the layer always starts below the > first line): Hi Hraban, slightly modifying your MWE, I think I get what might fit your needs (see below). I never used \flushlayer and your sample shows that it doesn’t fit here. The layer is relative to the page, not to the paper in this case. And the state is an option for the layer (in \definelayer), not for the background, being "start" its default value. Just in case it might help, Pablo \setupexternalfigures [location={default,global}] \setuppapersize[A5][A4] \setuplayout[ marking=on, location=middle, ] \definemeasure[Bleed][3mm] \definemeasure[MaxHeight] [{\dimexpr\paperheight + 2\measure{Bleed}\relax}] \definemeasure[MaxWidth] [{\dimexpr\paperwidth + 2\measure{Bleed}\relax}] \definelayer[papier][ preset=lefttop, %x=0mm,y=0mm, width=\paperwidth, height=\paperheight, ] \setupbackgrounds[page][background=papier] \starttext \showframe TEST \setlayerframed[papier][ preset=lefttop, %x=-\measure{Bleed}, %y=-\measure{Bleed}, offset=overlay, %frame=off, width=\measure{MaxWidth}, height=\measure{MaxHeight}, ]{\externalfigure[cow][ width=\measure{MaxWidth},height=\measure{MaxHeight} ]} \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 ___
Re: [NTG-context] placing (on) layers
Hi Willi, thank you, I wasn’t aware that \flushlayer works this way. This was also the problem in my real project. And I had the wrong layer mentioned in \setupbackgrounds from another test. Also, cropoffset was interfering in the real project, see my other mail. Hraban Am 16.04.22 um 22:27 schrieb Willi Egger via ntg-context: Hi Hraban, if you flush a layer like in your example, then the layer is attached to the left top of the text area. If you want to place it in another place, you will have to move it by x and y dimensions to the right place in the first brackets of the \setlayerframed command . — What would be possible is to attach the layer as a background to one of the different areas of the paper. I hope this gives you a hint how to proceed.. Willi On 15 Apr 2022, at 21:51, Henning Hraban Ramm via ntg-context wrote: Hi again, I’m always struggling with putting stuff on layers, since these just never start where I’d expect them to, and the offsets changed a few times within the last years. Please explain how I should define a layer that covers the whole page, since the following MWE is wrong (the layer always starts below the first line): \useMPlibrary[dum] \setuppapersize[A5][A4] \setuplayout[ marking=on, location=middle, ] \definemeasure[Bleed][3mm] \definemeasure[MaxHeight][{\dimexpr\paperheight + 2\measure{Bleed}\relax}] \definemeasure[MaxWidth][{\dimexpr\paperwidth + 2\measure{Bleed}\relax}] \definelayer[papier][ preset=lefttop, %x=0mm,y=0mm, width=\paperwidth, height=\paperheight, ] \setupbackgrounds[paper][background=cover,state=start] \starttext \showframe TEST \setlayerframed[papier][ preset=lefttop, %x=-\measure{Bleed}, %y=-\measure{Bleed}, offset=overlay, %frame=off, width=\measure{MaxWidth}, height=\measure{MaxHeight}, ]{\externalfigure[dummy][ width=\measure{MaxWidth},height=\measure{MaxHeight} ]} \flushlayer[papier] \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 ___ ___ 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] TeXworks on Linux
Hello Alain, sorry fro the late reaction. — I thought that I had done precisely what you mention in your reply. — however I will double-check this. Thank you for your answer. Willi > On 10 Apr 2022, at 14:01, Alain Delmotte via ntg-context > wrote: > > Hi Willi! > > Le 9/04/2022 à 21:52, Willi Egger via ntg-context a écrit : >> Good evening! >> >> Currently I am trying to test different editors on a Linux-box. — Tonight I >> installed TeXworks. Now I wanted to change the editor to use ConTeXt LMTX. I >> added in the tab “typesetting" the path to the executables in the TeX tree. >> Then I added funder editing the processing tools following the Wiki as a >> programme mtxrun and as parameters —script context $fullname. >> >> After restarting the application I get the error: >> >> “unknown script ‘mtx-base.lua' or ‘mtx-mtx-base.lua’” >> >> My question is, is there a user out there who knows how to fix this? >> >> Kind regards >> >> Willi >> > I have an old computer under Linux 18.04 > In TeXworks/Edit/Preferences/Typesetting I have an entry for ConTeXt lmtx: > > path: > /usr/bin > /usr/local/sbin > /usr/local/bin > /usr/sbin > /sbin > /bin > /usr/games > /home/alain/context-lmtx/bin > /home/alain/context-lmtx/tex/texmf-linux/bin > /usr/local/texlive/2020/bin/i386-linux > > Most of the path is automatically created when installing TeXworks. You > should perhaps take care that the paths for context-lmtx is "before the one > for texlive, if you have it. > > Now for the definition for the program: > name: Context (which will appear in the drop-down menu > program: context > parameters: --synctex(which is not fonctionnal) > $fullname > > That'all! > > I hope it will help. > > Alain > > > ___ > 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] placing (on) layers
Hi Hraban, if you flush a layer like in your example, then the layer is attached to the left top of the text area. If you want to place it in another place, you will have to move it by x and y dimensions to the right place in the first brackets of the \setlayerframed command . — What would be possible is to attach the layer as a background to one of the different areas of the paper. I hope this gives you a hint how to proceed.. Willi > On 15 Apr 2022, at 21:51, Henning Hraban Ramm via ntg-context > wrote: > > Hi again, > > I’m always struggling with putting stuff on layers, since these just never > start where I’d expect them to, and the offsets changed a few times within > the last years. > > Please explain how I should define a layer that covers the whole page, since > the following MWE is wrong (the layer always starts below the first line): > > > \useMPlibrary[dum] > > \setuppapersize[A5][A4] > \setuplayout[ > marking=on, > location=middle, > ] > \definemeasure[Bleed][3mm] > \definemeasure[MaxHeight][{\dimexpr\paperheight + 2\measure{Bleed}\relax}] > \definemeasure[MaxWidth][{\dimexpr\paperwidth + 2\measure{Bleed}\relax}] > > \definelayer[papier][ > preset=lefttop, > %x=0mm,y=0mm, > width=\paperwidth, > height=\paperheight, > ] > \setupbackgrounds[paper][background=cover,state=start] > > > \starttext > \showframe > TEST > > \setlayerframed[papier][ > preset=lefttop, > %x=-\measure{Bleed}, > %y=-\measure{Bleed}, > offset=overlay, > %frame=off, > width=\measure{MaxWidth}, > height=\measure{MaxHeight}, > ]{\externalfigure[dummy][ > width=\measure{MaxWidth},height=\measure{MaxHeight} > ]} > > \flushlayer[papier] > > \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 > ___ ___ 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] to XMP info?
Hi Hans, I need to access the document language using Poppler’s GObject introspection. Right now, the only way to do that would be to have (https://raw.githubusercontent.com/adobe/XMP-Toolkit-SDK/main/docs/XMPSpecificationPart1.pdf#search=dc:language) in the XMP metadata included in the PDF file. Would it be possible to have included in the XMP metadata (besides other DC elements, such as author, title, description or format)? 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] right item marks for associative questions? (śrīrāma)
On 4/16/22 5:31 PM Damien Thiriet via ntg-context wrote: > Could you explain the whereabouts of calling to context.(start|stop)()? > Some expansion stuff? I must admit that I am not a (LuaMetaT)eXpert. My limited understanding is that it might be due to expansion and the behaviour of (start|stop)item, or equivalently (start|stop)itemgroupitem. It does not seem to group like (most?) other groups. (see strc-itm.mklx) For instance if we switch to bold without grouping inside \(start|stop)item it cascades through. \startitemize[circle] \startitem \bf First \stopitem \startitem Second \stopitem \startitem Third \stopitem \startitem Fourth \stopitem \stopitemize In fact, you could just put the lefttoright call inside context.(bgroup| egroup): see p. 196 of the cld manual. (start...stop are anyway ConTeXt'ized versions of those). Best, Sreeram ___ 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] right item marks for associative questions? (śrīrāma)
Hi, > In function 'ListeAleatoireGauche' calling startitemize as below should > help: > context.startitemize ({"8","packed","random"}, {align="righttoleft"}) > > Further, I think you might also need to put the entry into stream in a > group: >context.start() context.lefttoright(t[k]) context.stop() > > Sreeram Many thanks, this solved my problems. I understand context.startitemize() is designed to get several vectors as arguments, something I didn't thought about. Could you explain the whereabouts of calling to context.(start|stop)()? Some expansion stuff? In my MWE, only the first item was left-to-right. Best regards, Damien Thiriet ___ 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] $\sin \theta$ behave differently in metafun
On 4/16/22 13:01, śrīrāma via ntg-context wrote: > Strangely, my attachments never make it to the list Sreeram, as you can check yourself, the list got your attachment (https://mailman.ntg.nl/pipermail/ntg-context/2022/105466.html). Just in case it might 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] $\sin \theta$ behave differently in metafun
On 4/16/22 4:00 PM Bruce Horrocks wrote: > The MWE works fine[1] in > system > ConTeXt ver: 2022.01.10 08:36 LMTX fmt: 2022.1.13 int: > english/english if that helps track down when the breaking change was made. > > [1] Caveat: since the OP doesn't actually describe what is going wrong I may > be mistaken. Strangely, my attachments never make it to the list. Trying again: attached an image of the output of the tiny MWE – \starttext \startMPcode draw textext("\m{\max_i x_i}"); \stopMPcode \stoptext Sreeram___ 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] $\sin \theta$ behave differently in metafun
> On 16 Apr 2022, at 05:56, śrīrāma via ntg-context wrote: > > Hi Hans and Mikael (and others on the list), > > I can confirm that even with the newest LMTX [2022.04.15 20:20] the above > might > actually be a bug. mfunctions inside MP strings are not properly rendred. A > tiny MWE: > > \starttext >\startMPcode >draw textext("\m{\max_i x_i}"); >\stopMPcode > \stoptext > > Could trace it down to '\math_function_handle_label' [math-ini] but not sure > what MP is doing. Also looked into mp-mlib, mlib-pps but could not figure it > out. I request you to kindly look into it. The MWE works fine[1] in system > ConTeXt ver: 2022.01.10 08:36 LMTX fmt: 2022.1.13 int: english/english if that helps track down when the breaking change was made. [1] Caveat: since the OP doesn't actually describe what is going wrong I may be mistaken. — 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] new upload
On 4/15/22 20:24, Hans Hagen via ntg-context wrote: > Hi, > > I uploaded a new lmtx. Apart from a experimental intersection feature in > the mp library (and metafun, more will be revealed when MS an I are okay > with it) there is not that much news. Many thanks for the new upload, Hans. I’m afraid I get compilation error with your sample: lua error: callback error: .../base/mkxl/typo-ada.lmt:78: attempt to call a nil value (upvalue 'traverseleader') stack traceback: .../base/mkxl/typo-ada.lmt:78: in upvalue 'nodes_adaptive_handle' [string "local tonut = nodes.tonut..."]:10: in function <[string "local tonut = nodes.tonut..."]:7> (...tail calls...) .../base/mkxl/typo-bld.lmt:208: in function <.../base/mkxl/typo-bld.lmt:204> I got the same error message with a brand new installation. Just in case it might 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 ___