Re: [NTG-context] Setupheadertexts with if-condition
\doifelsemarking or \doifelsetext Thanks, that worked. My final solution (just for the archive, it seems to be more suitable than the solution in the wiki): \define\CustomHeader{% \cap{ \doifelsetext{\getmarking[chapter]}% {Kapitel \getmarking[chapternumber]: \getmarking[chapter]}% {\doifelsetext{\getmarking[section]} {\getmarking[section]} {} }% } } \setupheadertexts[][\CustomHeader{}{~\|~}\pagenumber][\pagenumber][] Huseyin Özoguz E-Mail: h.oezo...@mmnetz.de Am 10.04.2019 um 13:26 schrieb Hans Hagen: \doifelsemarking or \doifelsetext - 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 ___
Re: [NTG-context] gnuplot-module broken under lmtx
On 4/10/2019 4:34 PM, Christian Prim wrote: Hi It's little off-topic as there are officially no modules included in lmtx. But when I used the modules from a mkiv-installation, there was little to no problem. But with the gnuplot-module I can't fix the error myself. not off-topic .. as modules should also work ok in lmtx fixed in next beta (probably tommorrow an upload) Hans MWE: \usemodule[gnuplot] \startGNUPLOTscript[sin] plot sin(x) \stopGNUPLOTscript \starttext \placefigure[here]{Sine Test}{\useGNUPLOTgraphic[sin]} \stoptext Under mkiv everything is fine. mkiv creates a file gnuplot-gnuplot-1.plt, sends this file to gnuplot and uses the output gnuplot-gnuplot-1-ctx.tex. Under lmtx only the files gnuplot-gnuplot-1.tmp and gnuplot-gnuplot-inclusions.tmp are created. When I copy the correct .plt file from a mkiv-run, no gnuplot-gnuplot-1-ctx.tex is generated. If I copy the correct -ctx.tex file from a mkiv-run, I still get an error. Relevant part from the logfile of a working mkiv-run: modules > 'gnuplot' is loaded open source > level 3, order 4, name '/home/user/context/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/home/user/context/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 4, order 5, name '/home/user/context/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 3, order 5, name '/home/user/context/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded open source > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' close source > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' metapost > initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost > loading 'metafun' as '/home/user/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' using method 'default' metapost > initializing number mode 'scaled' floatblocks > '1' placed (here) from a lmtx-run (no .plt-file and -ctx.tex given): modules > 'gnuplot' is loaded open source > level 3, order 4, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 3, order 5, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded mtxrun | mtxrun | executing: gnuplot gnuplot-gnuplot-1.plt mtxrun | mtxrun | /home/user/lmtx/tex/texmf-linux-64/bin/mtxrun.lua:26166: attempt to call a nil value (field 'exec') aaa > mtxrun --direct gnuplot gnuplot-gnuplot-1.plt floatblocks > no block given floatblocks > '1' placed (here) lmtx with given .plt and -ctx.tex-file: modules > 'gnuplot' is loaded open source > level 3, order 4, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source > level 3, order 5, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded mtxrun | mtxrun | executing: gnuplot gnuplot-gnuplot-1.plt mtxrun | mtxrun | /home/user/lmtx/tex/texmf-linux-64/bin/mtxrun.lua:26166: attempt to call a nil value (field 'exec') aaa > mtxrun --direct gnuplot gnuplot-gnuplot-1.plt open source > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' close source > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' metapost > initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost > loading 'metafun' as '/home/user/lmtx/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' using method 'default' metapost > initializing number mode 'scaled' floatblocks > '1' placed (here) tex error > tex error on line 1 in file gnuplot-gnuplot-1-ctx.tex: ! Undefined control sequence \GNUPLOTfile -ctx.tex \fourthoffivearguments #1#2#3#4#5->#4 set output "\@@GNUPLOTresult " }\endw
Re: [NTG-context] Text in the margin
Fabrice Couvreur schrieb am 10.04.2019 um 11:58: Hi, Wolfgang suggested this to put text in the margin but since some updates it does not work anymore : \setuplayout [width=12cm, rightmargin=5cm] \defineuserdata [margintext] [alternative=margintext] \defineuserdataalternative [margintext] [renderingsetup=userdata:margintext] \startsetups [userdata:margintext] \margindata [inright] [%style=\smallbodyfont, style={\switchtobodyfont[9pt]}, width=\rightmarginwidth, align={flushleft,broad}] {{\bf Exemple — }\getinlineuserdata} \stopsetups \starttext \startuserdata[margintext] \input ward \stopuserdata \stoptext Put text (\dontleavehmode works also because it starts a paragraph) after \stopuserdata to flush the content of the margin block. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Strange behavior in math mode: < and minus sign give leftarrow
On 4/10/2019 2:19 PM, Aditya Mahajan wrote: On Wed, 10 Apr 2019, Hans Hagen wrote: On 4/10/2019 9:40 AM, Mikael P. Sundqvist wrote: On Wed, Apr 10, 2019 at 9:21 AM Otared Kavian wrote: Hi Hans, While testing old documents with lmtx, I noticed that with recent versions of mkiv, as well as LuaMetaTeX, there is a strange behavior in math mode: when the characters < and - follow each other one gets \leftarrow… This is embarrassing when one writes inequalities for negative numbers. So one has to separate them in order to obtain with curly braces. Can this be fixed or is it intended ? \starttext $\alpha < -1$ $\alpha \leftarrow 1$ $\alpha < {-1}$ $\alpha {<} - 1$ \stoptext Best regards: OK Hi! I asked about this before, and it is a feature. It can be switched off with \setupmathematics[ collapsing=1, ] Hope it helps! Indeed. Aditya is in charge of decisions about these defaults so if you want it differently you need to convince him. (I'm not sure how many users depend on it.) We can turn it off by default. But it might be better to have a more versbose interface: \setupmathematics[collapsing=yes|no] with the default value being collapsing=no. we already have "none" and th enumbers represent: 1 specials 2 specials + mathlist 3 mathlist + specials Now that Alan is entering his math in unicode symbols we can default to 'none'. 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 ___
[NTG-context] Request for xml.filter explanation!
Hi, I've the following xml file: * a paragraph of text 40.2 another paragraph of text 10.7 still another paragraph! 20.5 * And want to calculate the total value of all the objects: like so: *\startxmlsetups xml:example:base \xmlsetsetup{#1}{content|object}{xml:example:*} \stopxmlsetups \xmlregisterdocumentsetup{example}{xml:example:base} \startxmlsetups xml:example:content totalvalue: \xmlfunction{#1}{totalvalue} \xmlflush{#1} \endgraf \stopxmlsetups \startxmlsetups xml:example:object attribute : \xmlatt{#1}{mid} \par \stopxmlsetups % LUA \startluacode function xml.functions.totalvalue(root) local score = 0 for e in xml.collected(root,"/object") do tex.write('Okay!') --score = score + xml.filter(e,"xml:///value/number()") or 0 end tex.write(score) end \stopluacode \starttext \xmlprocessfile{example}{content.xml}{} \stoptext* * * When I run this example I get: *totalvalue: Okay!Okay!Okay!0 attribute : a attribute : b attribute : c* That looks allright! But when I incorporate the line: *score = score + xml.filter(e,"xml:///value/number()") or 0* the following Lua error is thrown: ** *! LuaTeX error [string "\directlua "]:5: attempt to perform arithmetic on a nil value* Has anybody any idea what I'm doing wrong here? The manual *xml-mkiv.pdf* doesn't give any clue about this! Regards, Gerard -- ___ 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] DIN lang folder with crop marks
Benjamin Koppe schrieb am 10.04.2019 um 20:33: Hallo, I'm new to ConTeXt and am crazy enough to start with something nonstandard. Of course I got stuck pretty fast. I started out with this: https://wiki.contextgarden.net/DIN_lang_folder and then found some info on crop marks here: https://wiki.contextgarden.net/PaperSetup#Crop_marks I tried different options (marked=on, market=colour, marked=color..., something with \setuplayout[location={middle,middle}]...) Some times the crop marks don't show at all, sometimes they are set off a bit so they don't fit with the actual document. I added the whole file as I really do not knwo (yet) how to reduce things... When you increase the size of the printed paper \definepapersize [A4-flyer] [width=\dimexpr297mm+10\measured{bleed}\relax, height=\dimexpr210mm+10\measured{bleed}\relax] and center the arranged pages \setuplayout [marking=on, location=middle] you can see the shifting moves everything away from the marks. BTW: You forgot the = for the marking settings in \startttitle. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] DIN lang folder with crop marks
Hallo, I'm new to ConTeXt and am crazy enough to start with something nonstandard. Of course I got stuck pretty fast. I started out with this: https://wiki.contextgarden.net/DIN_lang_folder and then found some info on crop marks here: https://wiki.contextgarden.net/PaperSetup#Crop_marks I tried different options (marked=on, market=colour, marked=color..., something with \setuplayout[location={middle,middle}]...) Some times the crop marks don't show at all, sometimes they are set off a bit so they don't fit with the actual document. I added the whole file as I really do not knwo (yet) how to reduce things... Thanks for any help De Benny %% This is a template for a Din lang Folder. %% The folded page of such a flyer is shorter (97mm) than the other pages (100mm) %% This measure shows how much shorter the folded page is. \definemeasure [shortfold] [3mm] %% The bleed measure is necessary if you have colored page backgrounds %% or images in the bleed. %% Different print shops need different bleeds. \definemeasure [bleed] [3mm] %% This is the pagesize of the final PDF. %% The bleed size is added two times to width and height. \definepapersize [A4-flyer] [width=\dimexpr297mm+2\measured{bleed}\relax, height=\dimexpr210mm+2\measured{bleed}\relax] %% The size of a normal page. \definepapersize [flyer-page] [width=100mm, height=210mm] %% The size of the folded page. \definepapersize [flyer-page-small] [width=\dimexpr100mm-\measure{shortfold}\relax, height=210mm] %% Imposition: With the following two commands we arrange the six pages %% on the final PDF print sheet. %% The flyerpages are imposed on the printed sheet. \setuppapersize [flyer-page] [A4-flyer] %% The pages are arranged as a tryptichon. \setuparranging [TRYPTICHON] %% Because of the shorter folded page and the bleed the pages has %% to be shifted horizontally on the printed sheet. %% The values are calculated here. \definepageshift [flyer] [horizontal] [\dimexpr\measure{bleed}-\measured{shortfold}\relax, \measure{bleed}, \measure{bleed}, \dimexpr2\measured{shortfold}+\measured{bleed}\relax, \measure{bleed}, \dimexpr\measure{bleed}-\measured{shortfold}\relax ] %% The vertical pageshift is simple. \definepageshift [flyer] [vertical] [\measure{bleed}] \setuppageshift [paper] [flyer] %% We define some measures to construct the page layout. \definemeasure [small] [3mm] \definemeasure [big] [\measure{small}*2] %% Each page has a slightly different page layout. %% The named layouts (1. bracket) inherit values from other layouts %% which are assigned in the second bracket. \definelayout [first] [page] [page=flyer-page, topspace=2\measured{big}, backspace=2\measured{small}, width=\dimexpr\paperwidth-4\measured{small}\relax, height=\dimexpr\paperheight-4\measured{big}\relax] \definelayout [second] [first] [topspace=2\measured{big}, backspace=2\measured{big}, width=\dimexpr\paperwidth-3\measured{big}\relax] \definelayout [thirdandfourth] [second] [backspace=\measure{big}, width=\dimexpr\paperwidth-2\measured{big}\relax] \definelayout [fifthandsixth] [first] [backspace=\measure{big}, width=\dimexpr\paperwidth-2\measured{big}\relax] %% We assign the layouts to the pages. \definelayout [1] [first] \definelayout [2] [second] \definelayout [3] [thirdandfourth] \definelayout [4] [thirdandfourth] \definelayout [5] [fifthandsixth] \definelayout [6] [fifthandsixth] %% Some setups \setupmakeup [doublesided=no] \setupbodyfont [mainface,10pt] \setuptolerance [verytolerant] \setuplayout[marking=color] %% We want to see page and layout borders. %% COMMENT THIS OUT BEFORE YOU PRINT! \showframe \starttext \starttitle[title={First page},marking{ }] \input lorem \stoptitle \starttitle[title={Second page},marking{ }] \input lorem \stoptitle \starttitle[title={Third page},marking{ }] \input lorem \stoptitle \starttitle[title={Fourth page},marking{ }] \setuppapersize [flyer-page-small] [A4-flyer] \input lorem \stoptitle \starttitle[title={Fifth page},marking{ }] \input lorem \stoptitle \starttitle[title={Sixth page},marking{ }] \setuppapersize [flyer-page] [A4-flyer] \input lorem \stoptitle \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] Strange behavior in math mode: < and minus sign give leftarrow
On Wed, 10 Apr 2019 10:09:31 +0200 Otared Kavian wrote: > The problem of such an usual default is also with newcomers who would not > know about this feature in ConTeXt: when one writes maths one would not guess > that typing an inequality like $n < -1$ would end up in $n \leftarrow 1$. And > writing such inequalities is very common… while \leftarrow is used seldom in > a mathematical text. > So I think having the default collapsing=1 would be more logical, and more in > line with the spirit of TeX. > > I hope Aditya will be convinced… And since we have utf-8 input, such "features" are anachronistic and should not be on by default. ← Alan ___ 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] gnuplot-module broken under lmtx
Hi It's little off-topic as there are officially no modules included in lmtx. But when I used the modules from a mkiv-installation, there was little to no problem. But with the gnuplot-module I can't fix the error myself. MWE: \usemodule[gnuplot] \startGNUPLOTscript[sin] plot sin(x) \stopGNUPLOTscript \starttext \placefigure[here]{Sine Test}{\useGNUPLOTgraphic[sin]} \stoptext Under mkiv everything is fine. mkiv creates a file gnuplot-gnuplot-1.plt, sends this file to gnuplot and uses the output gnuplot-gnuplot-1-ctx.tex. Under lmtx only the files gnuplot-gnuplot-1.tmp and gnuplot-gnuplot-inclusions.tmp are created. When I copy the correct .plt file from a mkiv-run, no gnuplot-gnuplot-1-ctx.tex is generated. If I copy the correct -ctx.tex file from a mkiv-run, I still get an error. Relevant part from the logfile of a working mkiv-run: modules > 'gnuplot' is loaded open source > level 3, order 4, name '/home/user/context/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/home/user/context/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 4, order 5, name '/home/user/context/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 3, order 5, name '/home/user/context/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded open source > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' close source> level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' metapost> initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as '/home/user/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' using method 'default' metapost> initializing number mode 'scaled' floatblocks > '1' placed (here) from a lmtx-run (no .plt-file and -ctx.tex given): modules > 'gnuplot' is loaded open source > level 3, order 4, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 3, order 5, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded mtxrun | mtxrun | executing: gnuplot gnuplot-gnuplot-1.plt mtxrun | mtxrun | /home/user/lmtx/tex/texmf-linux-64/bin/mtxrun.lua:26166: attempt to call a nil value (field 'exec') aaa > mtxrun --direct gnuplot gnuplot-gnuplot-1.plt floatblocks > no block given floatblocks > '1' placed (here) lmtx with given .plt and -ctx.tex-file: modules > 'gnuplot' is loaded open source > level 3, order 4, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' loading > Gnuplot module open source > level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 4, order 5, name '/home/user/lmtx/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 3, order 5, name '/home/user/lmtx/tex/texmf-modules/tex/context/third/gnuplot/t-gnuplot.mkiv' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded mtxrun | mtxrun | executing: gnuplot gnuplot-gnuplot-1.plt mtxrun | mtxrun | /home/user/lmtx/tex/texmf-linux-64/bin/mtxrun.lua:26166: attempt to call a nil value (field 'exec') aaa > mtxrun --direct gnuplot gnuplot-gnuplot-1.plt open source > level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' close source> level 3, order 6, name 'gnuplot-gnuplot-1-ctx.tex' metapost> initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as '/home/user/lmtx/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' using method 'default' metapost> initializing number mode 'scaled' floatblocks > '1' placed (here) tex error > tex error on line 1 in file gnuplot-gnuplot-1-ctx.tex: ! Undefined control sequence \GNUPLOTfile -ctx.tex \fourthoffivearguments #1#2#3#4#5->#4 set output "\@@GNUPLOTresult " }\endwrite \shipoutscratchbox \page_shipout_box #1->\clf_shipoutpage #1 \relax \global \setbox #1\emptybox ... ...l.8 \stoptext 1 >> % Written by ConTeXt terminal for
Re: [NTG-context] Strange behavior in math mode: < and minus sign give leftarrow
On Wed, 10 Apr 2019, Hans Hagen wrote: On 4/10/2019 9:40 AM, Mikael P. Sundqvist wrote: On Wed, Apr 10, 2019 at 9:21 AM Otared Kavian wrote: Hi Hans, While testing old documents with lmtx, I noticed that with recent versions of mkiv, as well as LuaMetaTeX, there is a strange behavior in math mode: when the characters < and - follow each other one gets \leftarrow… This is embarrassing when one writes inequalities for negative numbers. So one has to separate them in order to obtain with curly braces. Can this be fixed or is it intended ? \starttext $\alpha < -1$ $\alpha \leftarrow 1$ $\alpha < {-1}$ $\alpha {<} - 1$ \stoptext Best regards: OK Hi! I asked about this before, and it is a feature. It can be switched off with \setupmathematics[ collapsing=1, ] Hope it helps! Indeed. Aditya is in charge of decisions about these defaults so if you want it differently you need to convince him. (I'm not sure how many users depend on it.) We can turn it off by default. But it might be better to have a more versbose interface: \setupmathematics[collapsing=yes|no] with the default value being collapsing=no. Aditya ___ 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] Setupheadertexts with if-condition
On 4/10/2019 12:29 PM, Huseyin Özoguz wrote: Hello mailing list, I want to use an simple if-condition for this code: \setupheadertexts [][][][{\tfx\bf\getmarking[chapternumber] – \getmarking[chapter]}] My problem: In my case the document dont begin with a chapter but with a section. So at the first pages there is not chapter and chapternumber and the "–" is printed alone. So I want something like this: \if\getmarking[chapternumber] {\getmarking[chapternumber] – \getmarking[chapter]} \fi \doifelsemarking or \doifelsetext - 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 ___
Re: [NTG-context] Referencing the page on which an endnote was generated
Hi, you can always set *\pagereference[bla] *into the text and reference to the pagenumber of the reference with *\at[bla]*. Is that what you wanted? Huseyin Özoguz -- Huseyin Özoguz E-Mail: h.oezo...@mmnetz.de ___ 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] Setupheadertexts with if-condition
Hello mailing list, I want to use an simple if-condition for this code: \setupheadertexts [][][][{\tfx\bf\getmarking[chapternumber] – \getmarking[chapter]}] My problem: In my case the document dont begin with a chapter but with a section. So at the first pages there is not chapter and chapternumber and the "–" is printed alone. So I want something like this: \if\getmarking[chapternumber] {\getmarking[chapternumber] – \getmarking[chapter]} \fi That is of course no valid code. How to implement that if-condition? Thanks! -- Huseyin Özoguz E-Mail: h.oezo...@mmnetz.de ___ 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] Text in the margin
Hi, Wolfgang suggested this to put text in the margin but since some updates it does not work anymore : \setuplayout [width=12cm, rightmargin=5cm] \defineuserdata [margintext] [alternative=margintext] \defineuserdataalternative [margintext] [renderingsetup=userdata:margintext] \startsetups [userdata:margintext] \margindata [inright] [%style=\smallbodyfont, style={\switchtobodyfont[9pt]}, width=\rightmarginwidth, align={flushleft,broad}] {{\bf Exemple — }\getinlineuserdata} \stopsetups \starttext \startuserdata[margintext] \input ward \stopuserdata \stoptext Thank you. 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 ___
Re: [NTG-context] Difference in right justification in LMTX
On 4/10/2019 12:07 AM, Joseph Canedo wrote: Dear list. Given the following MWE (could not reproduce with smaller example). \setuppapersize[A5][A5] \definefontfeature[base][mode=node, protrusion=quality, expansion=quality] \definefontfamily[mainfont][serif][EBGaramond][features=base] \setupalign[hanging, lesshyphenation, hz] \setupbodyfont[mainfont, 9pt] \showframe \starttext les bestes/ & sus toute la terre/ & sus tout reptile qui bouge sur surete sur la {\righttoleft terre. Dieu} donc crea l'homme a son image. \stoptext I notice that LMTX seems to add some small gap at right margin in the 1st typeset line. I attach the pdf I get with luatex and lmtx. The showframe directive makes it more visible. i uploaded a new version 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 ___
Re: [NTG-context] Strange behavior in math mode: < and minus sign give leftarrow
Thanks Hans for your attention! The problem of such an usual default is also with newcomers who would not know about this feature in ConTeXt: when one writes maths one would not guess that typing an inequality like $n < -1$ would end up in $n \leftarrow 1$. And writing such inequalities is very common… while \leftarrow is used seldom in a mathematical text. So I think having the default collapsing=1 would be more logical, and more in line with the spirit of TeX. I hope Aditya will be convinced… Best regards: OK > On 10 Apr 2019, at 09:53, Hans Hagen wrote: > > On 4/10/2019 9:40 AM, Mikael P. Sundqvist wrote: >> On Wed, Apr 10, 2019 at 9:21 AM Otared Kavian wrote: >>> [… > Indeed. Aditya is in charge of decisions about these defaults so if you want > it differently you need to convince him. (I'm not sure how many users depend > on it.) > > Hans ___ 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] Strange behavior in math mode: < and minus sign give leftarrow
Hi Mikael, Thanks for your quick reply. Indeed I did not know about this feature, and setting collapsing=1 solves my problem… Best regards: OK > On 10 Apr 2019, at 09:40, Mikael P. Sundqvist wrote: > > On Wed, Apr 10, 2019 at 9:21 AM Otared Kavian wrote: >> […] > > Hi! > > I asked about this before, and it is a feature. > > It can be switched off with > > \setupmathematics[ > collapsing=1, > ] > > Hope it helps! > > /Mikael ___ 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] Strange behavior in math mode: < and minus sign give leftarrow
On 4/10/2019 9:40 AM, Mikael P. Sundqvist wrote: On Wed, Apr 10, 2019 at 9:21 AM Otared Kavian wrote: Hi Hans, While testing old documents with lmtx, I noticed that with recent versions of mkiv, as well as LuaMetaTeX, there is a strange behavior in math mode: when the characters < and - follow each other one gets \leftarrow… This is embarrassing when one writes inequalities for negative numbers. So one has to separate them in order to obtain with curly braces. Can this be fixed or is it intended ? \starttext $\alpha < -1$ $\alpha \leftarrow 1$ $\alpha < {-1}$ $\alpha {<} - 1$ \stoptext Best regards: OK ___ 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 ___ Hi! I asked about this before, and it is a feature. It can be switched off with \setupmathematics[ collapsing=1, ] Hope it helps! Indeed. Aditya is in charge of decisions about these defaults so if you want it differently you need to convince him. (I'm not sure how many users depend on it.) 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 ___
Re: [NTG-context] SyncTeX and Skim/TeXShop
Hi Nicola, I do use ConTeXt with TeXShop on MacOS, and I use extensively synctex. Indeed there has been a big change in synctex a few years ago, since the « classic » synctex code by Jérôme Laurens was changed, and more or less at the same time Hans introduced independently a new synctex setup (and code) for ConTeXt. Richard Koch added a special syntex code in TeXShop in order to use the changes introduced by Hans. Richard added also a special menu item in the Macros menu of TeXShop which adds the line % !TEX useOldSyncParser in your source file. Now, that being said, in order to use synctex in TeXShop and ConTeXt, you have to add the following two lines at the top of your source file: % !TEX useOldSyncParser \setupsynctex[state=start,method=min] % or method=max Then you typeset your file and you can get the usual synctex behaviour (however, for some unknown reason it may happen that the first time you typeset your file with the above two lines, you don't get the synctex working: you have to quit TeXShop and open again your file and then synctex works fine…). Best regards: OK > On 9 Apr 2019, at 19:23, Nicola Vitacolonna wrote: > > Hi, > is anyone using ConTeXt with Skim, or TeXShop, on macOS? > > SyncTeX used to work fine with ConTeXt in both apps. Now, it seems that > ConTeXt has started to generate a .synctex file rather than a .synctex.gz, > and the format seems to have changed (?). As I haven’t followed recent (or > perhaps not so recent) developments in this area, do you have any suggestions > to make SyncTeX work again? > > I am using Skim, but any PDF viewer would be fine if Skim cannot be used for > the purpose any longer. > > Thanks in advance, > Nicola > ___ > 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] Strange behavior in math mode: < and minus sign give leftarrow
On Wed, Apr 10, 2019 at 9:21 AM Otared Kavian wrote: > > Hi Hans, > > While testing old documents with lmtx, I noticed that with recent versions of > mkiv, as well as LuaMetaTeX, there is a strange behavior in math mode: when > the characters < and - follow each other one gets \leftarrow… This is > embarrassing when one writes inequalities for negative numbers. > So one has to separate them in order to obtain with curly braces. Can this be > fixed or is it intended ? > > \starttext > $\alpha < -1$ > > $\alpha \leftarrow 1$ > > $\alpha < {-1}$ > > $\alpha {<} - 1$ > \stoptext > > Best regards: OK > ___ > 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 > ___ Hi! I asked about this before, and it is a feature. It can be switched off with \setupmathematics[ collapsing=1, ] Hope it helps! /Mikael ___ 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] Strange behavior in math mode: < and minus sign give leftarrow
Hi Hans, While testing old documents with lmtx, I noticed that with recent versions of mkiv, as well as LuaMetaTeX, there is a strange behavior in math mode: when the characters < and - follow each other one gets \leftarrow… This is embarrassing when one writes inequalities for negative numbers. So one has to separate them in order to obtain with curly braces. Can this be fixed or is it intended ? \starttext $\alpha < -1$ $\alpha \leftarrow 1$ $\alpha < {-1}$ $\alpha {<} - 1$ \stoptext Best regards: OK ___ 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] Missing modules crossref and pararef
Am 2019-04-08 um 19:15 schrieb Zenlima : >> Interesting, I never heard of these modules. But they were for MkII anyway >> and long gone; their wiki pages are from 2012, and I don’t know the user >> Zenlima. >> What do you want to achieve? It’s probably possible without those modules. > > In general: If you dont know something does not mean just delete it. My > suggestion is to contact the developer of that modules first and ask for > changes or updates. I am pretty sure that if you provided own work to the OSS > world you are proud of it and does not want it be deleted respectlessly. I’m sorry, I reacted on the fact that the link was dead (as are all wiki links to modules, unfortunately) and that the pages were from 2012, while the latest versions of your modules seem to be from 2016, which is fine of course. I didn’t check if anything works. As lonely wiki pages your module documentation gets overlooked, you might have linked them in https://wiki.contextgarden.net/References. I’m documenting all modules at the moment that come installed with --modules=all, so I assumed I would know all available modules. 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] SyncTeX and Skim/TeXShop
On 4/9/2019 7:23 PM, Nicola Vitacolonna wrote: Hi, is anyone using ConTeXt with Skim, or TeXShop, on macOS? SyncTeX used to work fine with ConTeXt in both apps. Now, it seems that ConTeXt has started to generate a .synctex file rather than a .synctex.gz, and the format seems to have changed (?). As I haven’t followed recent (or perhaps not so recent) developments in this area, do you have any suggestions to make SyncTeX work again? - there is no benefit in a foo.synctex.gz file over a foo.synctex file; context generates relative efficient synctex files - context generates synctex code that is suits the way it works (for tex as well as xml input); in context lmtx i still need to add some lines to the context code (not done yet as i don't use synctex myself) - the synctex file format has changes recently so mayb that is your problem; unfortunately syntex support in viewers is via a library anod not via a "call to a command that returns file and position in file" which would have made that feature future proof (mtxrun --script synctex could provide that) I am using Skim, but any PDF viewer would be fine if Skim cannot be used for the purpose any longer. Thanks in advance, Nicola ___ 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 ___ -- - 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 ___
Re: [NTG-context] serial letters
Am 2019-04-09 um 21:38 schrieb Wolfgang Schuster : > Henning Hraban Ramm schrieb am 08.04.2019 um 15:26: >> How would you approach serial letters, e.g. to all members of a club? >> (Actually I need to send out donation receipts.) >> >> I’d like to use the letter module, since my usual letter design is using it. >> >> I can export the addresses to CSV, JSON, Lua tables or whatever or transfer >> them to a SQLite db. >> Would it make more sense to read them in Lua and combine this data with a >> buffer, or to write a single tex file for every letter? >> I know how to do the latter, but I’d like to learn a more ConTeXt-ish way. >> Would it make sense to use the bibliographies module? > > You can use the letter module when you drop the normal letter-environment > which is to limited in this case because it uses the buffer mechanism to > store the content. > > To have more control over the content for the opening etc. you can switch to > the setups alternative (even the content can be set in this way instead of > the default buffer) and set all texts with a setups-block. > > The letter itself can be flushed with the \placeletter command, below is a > simple example where I flush the letter after each variables setting but you > should be able to do the same with a lua table or csv file. Thank you very much! I’ll try to come up with a solution (and document it). Grüßlinge, 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 ___