Re: [NTG-context] Negative width vrule ignored in LuaMETATeX
On 4/24/2020 4:42 PM, SAO Ocean wrote: Hi, As I'm beginning to use ConTeXt LMTX, I experimented with it a little and noticed some of my old documents different. After some examination I found the following example: \starttext a\vrule width -5pt height 0pt depth 0pt b \stoptext In LMTX, the result looks as if there is no `\vrule' between `a' and `b'. And if I run with `context --engine=luatex', the expected result is back. I have checked the luametatex manual but it doesn't seem to mention the difference. My luametatex version is mkiv lua stats > used engine: luametatex version: 2.0502, functionality level: 20200413, format id: 493, compiler: clang. Is the behaviour expected? Or shall I use other method to get non-discardable negative space? no, but i must admit that it's kind of a border case ... i'll fix it but also wonder if *no* visual rule showing up is intended (i would then also expect an engine to show a rule .. could be an interesting new (luametatex) option as it saves kerns in some cases) see Wolfgangs mail for a better solution using kerns 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] Negative width vrule ignored in LuaMETATeX
On 4/24/2020 7:44 PM, Ao Shen wrote: Thanks for your timely reply! Hans Hagen 于2020年4月24日周五 下午11:38写道: no, but i must admit that it's kind of a border case ... i'll fix it but also wonder if *no* visual rule showing up is intended (i would then also expect an engine to show a rule .. could be an interesting new (luametatex) option as it saves kerns in some cases) My use cases of negative vrule is a little tricky. I'm trying to comply with W3C's [Requirements for Japanese Text Layout](https://www.w3.org/TR/jlreq/). It states that In principle, closing brackets (cl-02), commas (cl-07) or full stops (cl-06) at the line end have a half em space after them (see Fig. 3.20). This half em space can be deleted for line adjustment. However, the possibilities are only half em space or solid. Other spaces, such as a quarter em space should not be used. The tricky part is that I also want the opening fullwidth bracket at the beginning of the line to be solid, i.e., without half em sidebearing on the left to make the left margin visually more aligned (this is one but not the only way of line begining handling shown in jlreq). To achieve this, in the scripts handler I use the following injector between 'full_width_close' and 'full_width_open': \hskip -0.5em \penalty 100 \hskip 0.5em minus 0.5em \vrule width -0.5em height 0pt ^^^(a)^^^(b) If line is broken here, the only broken points are (a) before the glue or (b) at the penalty point. With the vrule the sidebearing of the opening bracket at beginning of next line is eliminated. In this particular case, a kern is not applicable because it won't survive the line break. And here a vrule showing nothing is intended. How about something ... \startluacode local classes = fonts.protrusions.classes local vectors = fonts.protrusions.vectors classes.myown = { vector = 'myown', factor = 1, } vectors.myown = table.merged (vectors.quality, { [0x0028] = { 1, 0 }, -- ( [0x0029] = { 0, 1 }, -- ) }) \stopluacode \starttext \showframe \definefontfeature[whatever][default][protrusion=myown] \definedfont[Serif*whatever] \setupalign[hanging] \dorecurse{100}{(#1) } \stoptext of course you need to define the cjk fences etc. 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] extracting pages using luacode
On 4/25/2020 4:17 PM, Floris van Manen wrote: I'm trying to extract pages from an existing pdf using lua. But this approach to extract pages 11 and 30 does not work: \starttext \startluacode for i, blz in ipairs({11, 30}) do context.startTEXpage() context.externalfigure("my_pdf.pdf", page=blz) context.stopTEXpage() end \stopluacode \stoptext Where am I missing the point? the syntax ... context.externalfigure( { "my_pdf.pdf" }, { page = blz } ) - 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] register entries in footnotes
On 4/26/2020 4:35 PM, Thomas A. Schmitz wrote: A similar question has been asked three years ago, and Rik Kabel posted a partial solution, adapted here: \defineprocessor [Footnote] [right={ n}] \define[1] \fnindex{\index[Footnote->]{#1}} \starttext This is a sentence with a term in the index: cat\index{cat}. This sentence also has an indexed term, dog\index{dog}, as well as a footnote.\footnote{The footnote also contains an indexed term, mouse.\fnindex{mouse}} \page \placeregister [index] \stoptext And about a year ago, Hans made a different suggestion to my own question; however, I didn't realize then that it was not what I was looking for: \starttext Test1: \index{cat}cat. \footnote{Test2: \index{mouse}mouse.} \footnote[note:cat]{Test3: \index[cat]{cat in \in{note}[note:cat]}cat.} \page \placeregister [index] \stoptext This creates two index entries for cat, which is not the intended result. My questions are: 1. I would like to have the footnote number appear in the index, so it says something like "cat 1 n. 1." Is that possible? 2. Is it necessary to define an extra command for index entries in footnotes? Is context clever enough to know that it's processing a footnote, so one could write a condition such as (pseudocode): \define [1] \myindex {\infinfootnoteelse {\index[Footnote]->{#1}} {\index{#1}}} Thanks a lot, have a good Sunday! You probably know intuitively that there is an answer, don't you? \unexpanded\def\doifelseinnote {\ifconditional\processingnote \expandafter\firstoftwoarguments \else \expandafter\secondoftwoarguments \fi} 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] Using \startuseMPgraphic inside a textext() in METAPOST?
On 4/27/2020 10:47 AM, Gerben Wierda wrote: I am in METAPOST which is inside TeX and I’d like (in METAPOST, not in TeX) to let a string follow a path. Adapting from the MetaFun manual around page 250, I tried this: \starttext \startMPpage[instance=doublefun] pic p; p := textext("\startuseMPgraphic[instance=doublefun]{followtokens}path RotPath ; RotPath := fullcircle ;\stopuseMPgraphic\followtokens{I am creating a line of text here}"); draw pic; \stopMPpage \stoptext But that does not work. Is there a way I can from within my METAPOST code get string (TeX code) to follow a path I have? In my case, I cannot escape outside the \startMPpage- -\stopMPpage environment, as the actual path is constructed there and the text following the path should be on that page. search for lmt_followtext in the luametafun manual 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] Unicode normalization and Hebrew in ConTeXt
On 4/28/2020 1:59 PM, Joey McCollum wrote: \definefontfeature[f:pointedhebrew][default][ ccmp=yes, mark=yes, script=hebr ] \definefontfamily[hebrew] [rm] [SBL Hebrew] [features=f:pointedhebrew] %Set the body font: \setupbodyfont[hebrew] %Set up right-to-left alignment: \setupalign[r2l] \starttext %Characters after normalization, in Unicode canonical order (bet + segol + dagesh + final nun): בֶּן %A word with characters in typographically recommended order (bet + dagesh + segol + final nun): בֶּן \stoptext \startluacode fonts.handlers.otf.addfeature { name= "normalizehebrew", type= "chainsubstitution", prepend = 1, lookups = { { type = "multiple", data = { [0x5B6] = { 0x5BC, 0x5B6 }, }, }, }, data = { rules = { { current = { { 0x5B6 }, { 0x5BC } }, lookups = { 1, 0 }, }, }, }, } \stopluacode \definefontfeature [f:pointedhebrew] [hebrew] [normalizehebrew=yes] \definefontfamily[hebrew] [rm] [SBL Hebrew] [features=f:pointedhebrew] \setupbodyfont[hebrew] \setupalign[r2l] \starttext בֶּן \quad בֶּן \par \stoptext How many such reorderings are there? (I saw some document about that font and it sounds like a bit messy wrt all these input variants.) (there are several mechanisms in context to deal with such issues, it's all about getting specs from users i.e. tex is all about control so in principle it should be doable) 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] Right-to-left pagecolumns and markings in ConTeXt
On 4/28/2020 2:09 PM, Joey McCollum wrote: Is there some way I can improve my syntax to avoid this issue, or is it just a bug that needs to be fixed? I've tried fetching other marks (e.g., first and last), but the only marks that ConTeXt seems to find are the ones for the left column. column:top etc - 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] Fwd: Unicode normalization and Hebrew in ConTeXt
On 4/28/2020 6:16 PM, Joey McCollum wrote: Thank you for the prompt and thorough response! If the reorderings have to be done for each pair of characters in different combining classes that are not in the expected typographical order, then there will be a lot (probably hundreds) of substitution rules. I am not very familiar with coding in Lua, but if there is a way to add substitution features for specific classes of points, then that would require a lot fewer cases. don't worry about that now, the lua part is normally the easy part (a where-it-makes-most-sense-hooking-into could take more thinking) (i have been thinking of some additional feature mechanisms but have to find back some code i played with long ago) Unicode's canonical ordering of Hebrew marks is based on their combining classes, with characters in higher combining classes being sorted after those with lower combining classes in canonical order. The typographically recommended ordering of certain characters is found in Table 1 (p. 12) of https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf. The So how official is that? Or is this something specific for this font? 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] Fwd: Unicode normalization and Hebrew in ConTeXt
On 4/28/2020 6:16 PM, Joey McCollum wrote: https://raw.githubusercontent.com/michal-h21/uninormalize/master/char-def-with-ccc.lua), looks like an ancient copy of char-def.lua (we actually do have a combining entry) 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] Right-to-left pagecolumns and markings in ConTeXt
On 4/28/2020 2:09 PM, Joey McCollum wrote: I am trying to typeset a two-column text in a right-to-left language using ConTeXt. Because I want footnotes in this text to be set ragged-bottom, I am using pagecolumns instead of standard columns. I also want to track the first and last textual division markers on each page using markings. Combining all of these ingredients seems to create a problem in ConTeXt: when the pagecolumns are set in right-to-left order, the top and bottom marks fetched are always the top and bottom marks in the left column, while the true top mark should be the top mark of the right column. I've observed this behavior using text in an actual right-to-left language, but the following minimal (non-)working example with an English sample text demonstrates the same behavior: ``` %Create a new markset to use: \definemarking[TestMark] %Setup header to reflect top and bottom marks: \setupheadertexts[top: {\fetchmark[TestMark][top]}][bottom: {\fetchmark[TestMark][bottom]}][top: {\fetchmark[TestMark][top]}][bottom: {\fetchmark[TestMark][bottom]}] %even left, even right, odd left, odd right %Setup the columns layout: \definepagecolumns [example] [ n=2, %number of columns direction=reverse, %does not work if ending comma is removed! ] \starttext \startpagecolumns[example] \marking[TestMark]{1}(1) \input knuth\par \marking[TestMark]{2}(2) \input knuth\par \marking[TestMark]{3}(3) \input knuth\par \marking[TestMark]{4}(4) \input knuth\par \marking[TestMark]{5}(5) \input knuth\par \marking[TestMark]{6}(6) \input knuth\par \marking[TestMark]{7}(7) \input knuth\par \marking[TestMark]{8}(8) \input knuth\par \stoppagecolumns \stoptext ``` I typeset this using ConTeXt version 2020.03.10, as released with TeXLive 2020. As my comment in the MWE points out, there also seems to be a bug in the key-value parsing of \definepagecolumns that causes it not to parse the direction=reverse input unless it is followed by a comma. Is there some way I can improve my syntax to avoid this issue, or is it just a bug that needs to be fixed? I've tried fetching other marks (e.g., first and last), but the only marks that ConTeXt seems to find are the ones for the left column. what if you prefix with column:, like column:top and so - 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] two additional pagenumber series
On 4/29/2020 2:00 PM, Pablo Rodriguez wrote: Dear list, for one of the documents I share with others, I need to add five pagenumber series. I’m already using realpage, userpage and subpage. I have just tried to use \definecounter, but it doesn’t work. \setuppapersize[A9] \definecounter[ncounter] [way=bychapter] \starttext \rawcountervalue[ncounter]\page \incrementcounter[ncounter][1] \page \lastcountervalue[ncounter] \chapter{} \lastcountervalue[ncounter] \stoptext I don’t know how to link any page increment to the defined counter. Although method is page, this seems to be related to a different issue. My question is: how could I get new pagenumber series using \definecounter? \setuppapersize[A8] \setupheadertexts[] \setupcounter[subpage][way=bychapter] \starttext \chapter{what} \rawsubcountervalue[subpage][1]\page \rawsubcountervalue[subpage][1]\page \rawsubcountervalue[subpage][1]\page \chapter{what} \rawsubcountervalue[subpage][1]\page \rawsubcountervalue[subpage][1]\page \rawsubcountervalue[subpage][1]\page \stoptext - 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] Unicode normalization and Hebrew in ConTeXt
On 4/28/2020 1:59 PM, Joey McCollum wrote: > ... My question is, can ConTeXt with LuaTeX handle the same situation correctly? In the following minimal example, ConTeXt typesets pointed Hebrew correctly when the characters are in the typographically recommended order, but not when they are in Unicode canonical order: We (Joey and I) figured out how to best deal with this. As a result the predefined hebrew feature now will do the right thing for fonts that assume some specific ordering. So, this should work okay: \definefontfamily[hebrew] [rm] [SBL Hebrew] [features=hebrew] in the most recent upload. Maybe there should be a wiki page that summarizes tests with hebrew fonts (but I leave that up to Joey). 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] image across 2 page spread
On 4/30/2020 2:05 AM, jbf wrote: Hi list, With 99% of work complete on a book, including single page images, I now find myself confronted with a final problem: how to run one image across facing pages or in other words, one image (plus its caption) across a two-page spread, such that there is no gap. I have tried a number of fairly crass attempts (obviously too simple) to see if I could get somewhere near what I want, e.g. \externalfigure[plate12.jpg][width=\paperwidth, height=.7\paperheight, frame=none] {\tfx \sc Plates 12, 13. \tfx Twenty trucks from the Netherlands setting off} \externalfigure[plate13.jpg][width=\paperwidth, height=.7\paperheight, frame=none] {\tfx for their first mission amongst the German diaspora.} My thinking here was that \paperwidth might help extend the image to the inner edge on the left-hand page, but it doesn't work that way for the right-hand page, since there it extends to the outer edge, not the inner edge! The .7\paperheight was to provide room for the caption. But all in all, this is no solution! If it is any help, the setup dimensions for the book are US Digest: \definepapersize [ACN][width=5.5in,height=8.5in] % w140mm x h216mm I then looked up how one might do it in LaTeX, and found the following link: https://tex.stackexchange.com/questions/23860/how-to-include-a-picture-over-two-pages-left-part-on-left-side-right-on-right How much of that would be transferable to ConTeXt? (I am thinking particularly of the |\newcommand*{\twopagepicture}[4]| bit. There are explanations for how to do this in InDesign, and since it is something someone might often want to do (e.g. in magazines), I also thought it might be easier to find reference to it on Contextgarden, yet haven't found anything there. But I am sure ConTeXt has a way to do this. Could someone point me in the right direction with this please? \setuppagenumbering [alternative=doublesided] \starttext \dorecurse{3}{\input tufte \par} \startpostponing \setuppagenumbering[state=stop] \startspread \startplacefigure[location=here,title={This is a cow!}] \externalfigure[cow.pdf][height=\textheight]% \stopplacefigure \stopspread \setuppagenumbering[state=start] \stoppostponing \dorecurse{10}{\input tufte \par} \stoptext - 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] Unicode normalization and Hebrew in ConTeXt
On 4/30/2020 4:28 PM, Joey McCollum wrote: Thanks so much, Hans! I should be able to add a wiki page summarizing the tests before the end of the week. For reference purposes, do you know which version of ConTeXt has (or will have) this update included? todays upload - 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] Problem including svg files with Inkscape 1.0~rc1-4
On 4/30/2020 3:15 PM, mf wrote: Il 30/04/20 14:09, Romain Diss ha scritto: Hi, The last release candidat of Inkscape (1.0~rc1-4 on my Debian sid) doesn't provide the `--export-pdf=` option anymore. So context can not convert svg files into the corresponding `m_k_i_v_*` pdf. It seems that the `--export-filename=` option does the job. Thank in advance. The command line syntax has changed in version 1. See this: http://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#Command_Line So it's --export-filename in Inkscape 1.00, and --export-pdf in previous versions. I tried to specify both options with Inkscape 0.92 hoping the wrong one would be ignored, without success; you get only a warning, not an error, but the conversion fails anyway. To make ConTeXt work with both versions, it should run "inkscape --version" before doing the actual conversion, to decide the right option. If the conversion you need is done by tex/texmf-context/scripts/context/ruby/graphics/inkscape.rb you should edit that file and replace "--export-pdf" with "--export-filename". There are two other files where that option is used: tex/texmf-context/tex/generic/context/luatex/luatex-fonts-merged.lua tex/texmf-context/tex/context/base/mkiv/font-ocl.lua it's font-related code; if you need it, do the same replacement of "--export-pdf" in those two files and then remake the format with context --make and the export to pdf will work with Inkscape 1.00. But it won't work with Inkscape 0.92. As I don't wan to waste code for testing the version, when do we change this? Now? I downloaded version 1 so it is available for all platforms. there's one more file: grph-con.lua ... (the merged file is not relevant as it is for generic but no one uses that one for fonts (like emoji) that use svg and the merged file is generated from other files anyway) Here I also need to adapt the font-ocl replacement file (font-ocm) which reminds me that i need to add some already long pending code to the luatex binary one of these days. 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] Problem including svg files with Inkscape 1.0~rc1-4
On 4/30/2020 3:15 PM, mf wrote: Il 30/04/20 14:09, Romain Diss ha scritto: Hi, The last release candidat of Inkscape (1.0~rc1-4 on my Debian sid) doesn't provide the `--export-pdf=` option anymore. So context can not convert svg files into the corresponding `m_k_i_v_*` pdf. It seems that the `--export-filename=` option does the job. Thank in advance. The command line syntax has changed in version 1. See this: http://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#Command_Line So it's --export-filename in Inkscape 1.00, and --export-pdf in previous versions. I tried to specify both options with Inkscape 0.92 hoping the wrong one would be ignored, without success; you get only a warning, not an error, but the conversion fails anyway. To make ConTeXt work with both versions, it should run "inkscape --version" before doing the actual conversion, to decide the right option. If the conversion you need is done by tex/texmf-context/scripts/context/ruby/graphics/inkscape.rb you should edit that file and replace "--export-pdf" with "--export-filename". There are two other files where that option is used: tex/texmf-context/tex/generic/context/luatex/luatex-fonts-merged.lua tex/texmf-context/tex/context/base/mkiv/font-ocl.lua it's font-related code; if you need it, do the same replacement of "--export-pdf" in those two files and then remake the format with context --make and the export to pdf will work with Inkscape 1.00. But it won't work with Inkscape 0.92. As I don't wan to waste code for testing the version, when do we change this? Now? I downloaded version 1 so it is available for all platforms. there's one more file: grph-con.lua ... (the merged file is not relevant as it is for generic but no one uses that one for fonts (like emoji) that use svg and the merged file is generated from other files anyway) Here I also need to adapt the font-ocl replacement file (font-ocm) which reminds me that i need to add some already long pending code to the luatex binary one of these days. 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] Problem including svg files with Inkscape 1.0~rc1-4
On 4/30/2020 5:35 PM, Romain Diss wrote: Hi, Il 30/04/20 14:09, Romain Diss ha scritto: Hi, The last release candidat of Inkscape (1.0~rc1-4 on my Debian sid) doesn't provide the `--export-pdf=` option anymore. So context can not convert svg files into the corresponding `m_k_i_v_*` pdf. The command line syntax has changed in version 1. See this: http://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#Command_Line So it's --export-filename in Inkscape 1.00, and --export-pdf in previous versions. If the conversion you need is done by tex/texmf-context/scripts/context/ruby/graphics/inkscape.rb you should edit that file and replace "--export-pdf" with "--export-filename". Thanks for this workaround but I suppose I'll need to edit that file again after each context update… However, the change in `inkscape.rb` has no effect, even after updating the format with `context --make`… Any idea ? Hi, just wondering ... do you need that script when you use mkiv? 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] Problem including svg files with Inkscape 1.0~rc1-4
On 4/30/2020 6:06 PM, mf wrote: Il 30/04/20 17:21, Hans Hagen ha scritto: On 4/30/2020 3:15 PM, mf wrote: Il 30/04/20 14:09, Romain Diss ha scritto: Hi, The last release candidat of Inkscape (1.0~rc1-4 on my Debian sid) doesn't provide the `--export-pdf=` option anymore. So context can not convert svg files into the corresponding `m_k_i_v_*` pdf. It seems that the `--export-filename=` option does the job. Thank in advance. The command line syntax has changed in version 1. See this: http://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#Command_Line So it's --export-filename in Inkscape 1.00, and --export-pdf in previous versions. I tried to specify both options with Inkscape 0.92 hoping the wrong one would be ignored, without success; you get only a warning, not an error, but the conversion fails anyway. To make ConTeXt work with both versions, it should run "inkscape --version" before doing the actual conversion, to decide the right option. If the conversion you need is done by tex/texmf-context/scripts/context/ruby/graphics/inkscape.rb you should edit that file and replace "--export-pdf" with "--export-filename". There are two other files where that option is used: tex/texmf-context/tex/generic/context/luatex/luatex-fonts-merged.lua tex/texmf-context/tex/context/base/mkiv/font-ocl.lua it's font-related code; if you need it, do the same replacement of "--export-pdf" in those two files and then remake the format with context --make and the export to pdf will work with Inkscape 1.00. But it won't work with Inkscape 0.92. As I don't wan to waste code for testing the version, when do we change this? Now? I downloaded version 1 so it is available for all platforms. 1.0 is a release candidate. Romain is using the unstable version of Debian (sid), so he's using Inkscape 1.00rc. Anyway Inkscape 0.92 will be around for some time, so a better solution would be defaulting to the export option of the current version of Inkscape unless the user sets an environment variable (INKSCAPE_VERSION?). So a test of an environment variable instead of spawning a process to run "inkscape --version". hm, we can have for a while \enabledirectives[graphics.inkscape.oldversion] and use new as default (and of course you will wikify that, okay?) 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] Trouble setting PDF boxes
On 4/30/2020 5:51 PM, Jack Steyn wrote: Hello, I'm happy to report that I got this working after much trawling through the source and documentation. The code below produces a pdf with the MediaBox, CropBox, BleedBox and TrimBox all in the places I specified in my original message. I hope it helps illustrate how to set these PDF boxes using Lua. I would much appreciate any feedback on how the Lua code can be cleaned up or made more flexible (the bleed is hard-coded in because I didn't know how to obtain the user-specified bleedoffset, for example), or made better in any other way. can you try this \setuplayout [cropoffset=30pt, bleedoffset=20pt, trimoffset=10pt] \setupinteractionscreen [width=max,height=max] - 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] How do I get an empty line in a \framed[align=flushleft]{} item?
On 5/1/2020 1:44 AM, Gerben Wierda wrote: { ‘\n', ‘\\strut' }, often a \zwj or \zwno also works ok (has zero dimensions, contraty to strut; you could also try \crlf 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] How do I get an empty line in a \framed[align=flushleft]{} item?
On 5/1/2020 10:21 AM, Gerben Wierda wrote: code it back to a \ ? E.g. something like { ‘\U{XXX}', '\' }, \utfchar{100} \Uchar 100 - 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] Reverse traversing of xml.collected()?
On 5/1/2020 11:31 AM, Gerben Wierda wrote: I’d like to travese the contents of an xml.collected() in a reverse order. I have for connectionFromXML in xml.collected(viewFromXML,"/connection") do parseXMLConnection( rootFromXML, connectionFromXML, viewFromXML, rootFromOverrideXML) end I tried: local relationTable = xml.collected(viewFromXML,"/connection") for i=#relationTable, 1, -1 do connectionFromXML = relationTable[i] parseXMLConnection( rootFromXML, connectionFromXML, viewFromXML, rootFromOverrideXML) end But apparently my lua knowledge is lacking (severely, I might say) as this ends with “attempt to get length of a function value“ it's an iterator What is the correct way to do it? xml.all - 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] How do I get an empty line in a \framed[align=flushleft]{} item?
On 5/1/2020 1:45 PM, Gerben Wierda wrote: On 1 May 2020, at 13:28, Hans Hagen wrote: On 5/1/2020 10:21 AM, Gerben Wierda wrote: code it back to a \ ? E.g. something like { ‘\U{XXX}', '\' }, \utfchar{100} \Uchar 100 Yes, but the question was: how do I code this in the XML and get it through my XML-lua-METAPOST-textext() path so that e.g. or in the XML end up as \ in my textext() string? E.g. a in XML becomes a \n when lmtx XML handling has read the XML (so gets transformed on read). I’ve been thinking about the route -> \r -> \ (so, misusing \r to code a TeX-\ in the XML, but that would probably not robust. The question is more: what is a good UTF8 character to use (the first 32 would be good candidates if they would work and end in the strings that xml.foo() of lmtx produces). did you try the attached approach? (a recent lmtx) 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 - strings-001.tex Description: Binary data ___ 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] How do I get an empty line in a \framed[align=flushleft]{} item?
On 5/1/2020 1:45 PM, Gerben Wierda wrote: On 1 May 2020, at 13:28, Hans Hagen wrote: On 5/1/2020 10:21 AM, Gerben Wierda wrote: code it back to a \ ? E.g. something like { ‘\U{XXX}', '\' }, \utfchar{100} \Uchar 100 Yes, but the question was: how do I code this in the XML and get it through my XML-lua-METAPOST-textext() path so that e.g. or in the XML end up as \ in my textext() string? E.g. a in XML becomes a \n when lmtx XML handling has read the XML (so gets transformed on read). I’ve been thinking about the route -> \r -> \ (so, misusing \r to code a TeX-\ in the XML, but that would probably not robust. The question is more: what is a good UTF8 character to use (the first 32 would be good candidates if they would work and end in the strings that xml.foo() of lmtx produces). you could try \xmltexentity{foo}{[overloaded foo]} - 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] supp-ran.lua makes code unable to work in ConTeXt
On 5/1/2020 6:12 AM, Jairo A. del Rio wrote: I've adapted the following code to make mazes in LuaLaTeX and ConTeXt: https://www.rosettacode.org/wiki/Maze_generation#Lua I defined a modified version to make content visible to TeX and I saved in a file named maze.lua: function make_maze_tex(w, h, m) w = w or 16 h = h or 8 local map = initialize_grid(w*2+1, h*2+1) function walk(x, y) map[y][x] = false local d = { 1, 2, 3, 4 } shuffle(d) for i, dirnum in ipairs(d) do local xx = x + dirs[dirnum].x local yy = y + dirs[dirnum].y if map[yy] and map[yy][xx] then map[avg(y, yy)][avg(x, xx)] = false walk(xx, yy) end end end walk(math.random(1, w)*2, math.random(1, h)*2) tex.print([[\bgroup]]) tex.print([[\baselineskip ]]..m) local s = {} for i = 1, h*2+1 do --table.insert(s, [[\hbox{]]) tex.print([[\hbox{]]) for j = 1, w*2+1 do -- table.insert(s, [[\hbox{]]) if (j == 1 and i == 2) or (j == 2*w + 1 and i == 2*h) then tex.print([[\hskip ]]..m) elseif map[i][j] then --table.insert(s, [[\vrule width ]]..m..[[ height ]]..m) tex.print([[\vrule width ]]..m..[[ height ]]..m) else --table.insert(s, [[\hskip ]]..m) tex.print([[\hskip ]]..m) end -- table.insert(s, [[}]].."\n") end --table.insert(s, [[}]]) tex.print([[}]]) end --tex.print(table.concat(s)) tex.print([[\egroup]]) end And I executed the folowing in LuaLaTeX and ConTeXt: %\documentclass{article} %\usepackage{luacode} %\begin{document} \starttext %\begin{luacode*} \startluacode mz = dofile("maze.lua") local count = 0 for i=10,109 do count = count + 1 tex.print([[\subject{Laberinto ]]..count..[[}]]) mz.make_maze_tex(i, i, [[\dimexpr\textwidth/]]..(2*i+1)..[[\relax]]) tex.print([[\pagebreak]]) end %\end{luacode*} \stopluacode %\end{document} \stoptext Whereas it works very fast in LuaLaTeX it crashes on ConTeXt and outputs the following: btw, fast is relative ... no problem making the code twice as fast it is actually a nice example for the cld manual ... attached some output from a first 'improvement' (that version runs some 50-60% faster so you have a challenge ... actually, it could be a nice challenge for others on this list: how to make this one contextish and so, maybe we should have a challenge every few weeks) token call, execute: ...ext/tex/texmf-context/tex/context/base/mkiv/supp-ran.lua:30: C stack overflow Why does it happen? I guess it has something to do with math.randomseed, but I don't know how to avoid this error message. no, it's just lua running out of stack space so it depends on the binary (and als the initial random value) luatex 1.13 uses lua 5.3 which has a large stack but depending on the compiler/linker settings and platform (it's 100 but depending on the situatation you get a message or crash when that doesn't work out) luajittex has a limited stack of 8000 so it will also crash luametatex uses lua 5.4 which uses a bit different stack model and can't go that high (it has a default of 2000 but i will bnump that to 6000 which still seems to work ok, that way i get upto a 120 maze) (new lmtx upload later this weekend) 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 - mazecontext.pdf Description: Adobe PDF document ___ 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] module article-basic interferes with \definebodyfont?
On 5/1/2020 1:58 PM, Gerben Wierda wrote: But my guess is that if I had used ss instead of rm everywhere in my code it would have worked as well. or define the ss first and don't use \rm (first defined is default) - 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] module article-basic interferes with \definebodyfont?
On 5/1/2020 6:19 PM, Gerben Wierda wrote: mm should be modern anyway, I think (not that I need it, I only want the ss form anyway). use pagella math with optima, not modern - 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] supp-ran.lua makes code unable to work in ConTeXt
On 5/1/2020 11:38 PM, Aditya Mahajan wrote: On Fri, 1 May 2020, Hans Hagen wrote: On 5/1/2020 6:12 AM, Jairo A. del Rio wrote: I've adapted the following code to make mazes in LuaLaTeX and ConTeXt: https://www.rosettacode.org/wiki/Maze_generation#Lua I defined a modified version to make content visible to TeX and I saved in a file named maze.lua: function make_maze_tex(w, h, m) w = w or 16 h = h or 8 local map = initialize_grid(w*2+1, h*2+1) function walk(x, y) map[y][x] = false local d = { 1, 2, 3, 4 } shuffle(d) for i, dirnum in ipairs(d) do local xx = x + dirs[dirnum].x local yy = y + dirs[dirnum].y if map[yy] and map[yy][xx] then map[avg(y, yy)][avg(x, xx)] = false walk(xx, yy) end end end walk(math.random(1, w)*2, math.random(1, h)*2) ...ext/tex/texmf-context/tex/context/base/mkiv/supp-ran.lua:30: C stack overflow Why does it happen? I guess it has something to do with math.randomseed, but I don't know how to avoid this error message. no, it's just lua running out of stack space so it depends on the binary (and als the initial random value) But why is it running out of stack? Isn't the walk function tail recursive, in which case it should not cause a stack overflow (https://www.lua.org/pil/6.3.html). not really tail recursive: that is only true when it's the last action and return is used and it nests very deep function foo(...) ... return foo(...) end versus function foo(...) ... if something then foo(...) end end 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] module article-basic interferes with \definebodyfont?
On 5/1/2020 11:33 PM, Gerben Wierda wrote: use pagella math with optima, not modern Zo? \definetypeface [optima] [mm] [math] [pagella] [default] Ik gok, want documentatie die dat helder maakt heb ik niet. Er is geen uitleg in de manuals die bij de standalone context komen en op ContextGarden vond ik voora l mkii zaken die niet meer geldig/juist zijn. er is een dikke font manual en verder is er wolfgangs module (met documentatie, ook op de wiki) maar meestal is een font setup vrij simple: ik zelf pak gewoon een type-imp-* file, copieer wat regels en vul dan de font file namen in; er zit ook allerhande font spul in de test suite (dutch answer to dutch question) 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] module article-basic interferes with \definebodyfont?
On 5/1/2020 1:15 PM, Gerben Wierda wrote: The following code: \enabletrackers[context.trace] %\usemodule[article-basic] \starttypescript [sans] [optima] \setups[font:fallback:sans] \definefontsynonym [Sans] [file:Optima.ttc(Optima Regular)] [features=default] \definefontsynonym [SansBold] [file:Optima.ttc(Optima Bold)] [features=default] \definefontsynonym [SansItalic] [file:Optima.ttc(Optima Italic)] [features=default] \definefontsynonym [SansBoldItalic] [file:Optima.ttc(Optima Bold Italic)] [features=default] \stoptypescript \definetypeface [optima] [ss] [sans] [optima] [default] \definetypeface [optima] [rm] [sans] [optima] [default] \definetypeface [optima] [tt] [mono] [dejavu] \setupbodyfont [optima] \starttext \startMPpage[instance=doublefun] picture pic; pic := textext("\definebodyfont[14.9pt][rm][default=Regular at 14.9pt]\switchtobodyfont[14.9pt]\setupinterlinespace[16.9pt]\framed[align=center,frame=off,offset=none,width=335.350bp]{\colored[r=0.000, g=0.000, b=0.000]{\rm (Artifact)\\}}"); draw pic scaled 1.13; \stopMPpage \stoptext Produces nice Optima at 14.9pt without \usemodule[article-basic] (as above), but with \usemodule[article-basic] included, the output becomes some serif (modern?) font, /but only if I use nonstandard font sizes/. Took me some time to hunt this one down. I actually don’t know what article-basic does for me (I started out with an example given to me by Hans) and I don’t need it now, but I might need it later in combination with my own stuff G ___ 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] Placing number in \sqrt
On 5/4/2020 8:47 AM, cont...@vivaldi.net wrote: Hello, compare placing "3" in the following examples: \starttext $\sqrt[3]{5}$ % (1) \par $\sqrt[3~]{5}$ % (2) \stoptext In the first case, the "3" is placed naturally by ConTeXt and placed more in the centre of "V" part of the square sign. In the second example, the "3" is shifted manually by adding "~" and the final placement seems to me a bit better. What is your opinion - is the case (1) OK/intended and user should avoid any manual shifting? Or manual shifting is OK? Or is there a way to affect this placement globally in ConTeXt, e.g. setting an internal variable? The placement is driven by the font so kind of part of the design. There is a whole bunch of parameters that drives placement and there is one that deals with the spacing after the degree. Here are some examples. \starttext \def\R {\Umathradicaldegreeafter\textstyle0pt} \def\RR{\Umathradicaldegreeafter\textstyle\dimexpr \Umathradicaldegreeafter\textstyle+.1em\relax} \def\RRR{\frozen\Umathradicaldegreeafter\textstyle\dimexpr \Umathradicaldegreeafter\textstyle+.2em\relax} $\sqrt[3]{5} \RR\sqrt[3]{5} \sqrt[3]{5} $\par $\sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par $ \RR\sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par {\R $\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par {\RR $\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par {\RRR$\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par \stoptext Changing these parameters inside math is kind of pseudo global: the value at the end of the first pass is used for the whole formula. However, in lmtx you can cheat by using the \frozen prefix to make it behave local. If we can come up with a proper name for a parameter we can make it a setting. One of these things that Aditya and I will to discuss when we have time and are in math mood. (There is much more in math we could control if needed, but often in the end that control is not that much needed at all.) 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] lmt_followtext crashes while standard followtext itself works
On 5/3/2020 11:47 PM, Gerben Wierda wrote: The following example has been extracted from my automatically generated MP code. \starttext \startMPpage string texstring; texstring := "{\colored [r=0.00, g=0.00, b=0.00]{\definebodyfont [9.0pt][rm][default=Regular at 9.0pt]\switchtobodyfont [9.0pt]\setupinterlinespace [9.9pt]\tf E.g. publish/ subscribe}}"; path parpath; parpath := (238,-167.00010681152344)..controls (238,-167.00010681152344) and (238,-167.00010681152344) ..(238,-167.00010681152344)..controls (238,-166.60010673470143) and (238,-166.20010665787942) ..(238,-165.80010658105741)..controls (238,-165.40010643392299) and (238,-165.00010628678857) ..(238,-164.60010613965414)..controls (238,-164.2001060472048) and (238,-163.80010595475545) ..(238,-163.40010586230611)..controls (238,-155.56353466513065) and (231.9683162849897,-149) ..(224.2552179837387,-149)..controls (223.85521783436539,-149) and (223.45521768499208,-149) ..(223.05521753561877,-149)..controls (222.65521740514737,-149) and (222.255217274676,-149) ..(221.8552171442046,-149)..controls (221.45521705001735,-149) and (221.0552169558301,-149) ..(220.65521686164286,-149)..controls (220.25521665589685,-149) and (219.85521645015083,-149) ..(219.45521624440482,-149)..controls (219.05521631807508,-149) and (218.65521639174534,-149) ..(218.2552164654156,-149)..controls (217.85521724037432,-149) and (217.45521801533303,-149) ..(217.05521879029175,-149)..controls (216.6552203077878,-149) and (216.25522182528385,-149) ..(215.85522334277991,-149)..controls (215.45522405083273,-149) and (215.05522475888554,-149) ..(214.65522546693836,-149)..controls (214.25522550518758,-149) and (213.8552255434368,-149) ..(213.45522558168602,-149)..controls (213.0552253720042,-149) and (212.65522516232238,-149) ..(212.25522495264056,-149)..controls (211.8552248680295,-149) and (211.45522478341843,-149) ..(211.05522469880736,-149)..controls (210.65522456100436,-149) and (210.25522442320135,-149) ..(209.85522428539835,-149)..controls (209.45522414149036,-149) and (209.05522399758237,-149) ..(208.65522385367439,-149)..controls (200.95716230583835,-149) and (195,-155.63452868682958) ..(195,-163.48966401016395)..controls (195,-163.88966411101083) and (195,-164.28966421185771) ..(195,-164.68966431270459)..controls (195,-165.08966445890775) and (195,-165.4896646051109) ..(195,-165.88966475131406)..controls (195,-166.25981210471718) and (195,-166.62995945812031) ..(195,-167.00010681152344); picture pic; pic := lmt_followtext [ text = texstring, path = parpath, spread = false, ]; \stopMPpage \stoptext lmt_followtext crashes on this code with: metapost log > ! angle(0,0) is taken as zero. metapost log > ...0)]shifted(-wid/2,0)rotated(angle(ad)) metapost log > shifted.ap;draw.pic[(EXPR0... metapost log > ...caled0.5pt.withcolor.green;fi;endfor metapost log > ;if((autoscaleupfollowtext... metapost log > metapost log > image->...ture;currentpicture:=nullpicture;(TEXT3) metapost log > ;currentpicture.if.str(SUF... metapost log > metapost log > followtext->...b_n;setbounds.currentpicture.to.b;) metapost log > endgroup metapost log > ...parameter"path"),getparameter"text") metapost log > ;popparameters; metapost log > image->...ture;currentpicture:=nullpicture;(TEXT3) metapost log > ;currentpicture.if.str(SUF... metapost log > metapost log > lmt_do_followtext->...meter"text");popparameters;) metapost log > endgroup metapost log > lmt_do_followtext metapost log > metapost log > <*> ...exstring, path = parpath, spread = false, ] metapost log > ; ; When I adapt the parameters that create parpath in my code, other uses of lmt_followtext crash. The same combinations of text and path so far haven’t crashed basic followtext(). I’ve run into comparable situations in my own code where I had to add code to handle the existence of a (0,0) direction (e.g. when I had two identical points on a path, but that is not the case here). The above minimal example triggers the failure. we can patch this if ad <> origin : rotated(angle(ad)) fi in mp-blob.mpiv but I expect you to test if all still works then Hans - Hans Hagen | PRAGMA ADE
Re: [NTG-context] --silent and so on
On 5/4/2020 3:19 PM, Taco Hoekwater wrote: On 4 May 2020, at 13:35, Thierry Horsin wrote: Hi everybody I am a current context user since now many years and in particular I use it with automatic compilation with a bash script detecting any modifications of the .tex file. In order for this to work I used with previous versions the --nonstopmode --batchmode --silent --noconsole options Now with the last version appears a single page pdf file with ERROR written on it. Is there a way to have something similar as before ? I am also eager to find a way to get rid of that ERROR page. i'll add a --nodummy switch to the context script (but keep in mind that when a file is open in a viewer that can confuse a viewer when there is an error) 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] Retrieving original value of enviroment variable HOME
On 5/6/2020 5:43 PM, cont...@vivaldi.net wrote: Hello, before I run ConTeXt, I set a (new) variable "HOME" to point to a particular directory. ConTeXt changes its value during startup - it sets its value to %USERPROFILE% - I guess it is to unify environment somehow for all platforms ConTeXt supports; probably here: data-ini.lua, ln. ~86 do local homedir = osgetenv(ostype == "windows" and 'USERPROFILE' or 'HOME') or '' if not homedir or homedir == "" then homedir = char(127) -- we need a value, later we wil trigger on it end homedir = file.collapsepath(homedir) ossetenv("HOME", homedir) -- can be used in unix cnf files <<<<<<<<<<<<<< HERE ossetenv("USERPROFILE",homedir) -- can be used in windows cnf files environment.homedir = homedir end But anyway - would it be possible to store the original value of HOME environment variable (if set) before it gets changed during initialization - e.g. to a Lua table? - I would need to work with the original value in run-time (Win7 / WinX; ConTeXt MkIV). I'll add environment.oldhome being the original one (but no testing done here) 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] sunny friday afternoon update
Hi, I uploaded a new version of lmtx and there are some experimental features that users cna play with so that we can think about related interfacing. (I won't mention soem in the lua department that I'm still exploring myself.) When you use a math symbol its class property determines the spacing. One can use \mathopen etc to wrap such a character an dmake it behave different. There is a new mechanism to overload that property in a different way: \startlines $x\mathopen {!}+123+\mathclose {!}x$ $x\tomathopen ! +123+\tomathclose ! x$ $x\mathclose {!}+123+\mathopen {!}x$ $x\tomathclose ! +123+\tomathopen ! x$ $x ! +123+ ! x$ \stoplines It uses a low level primitive, for the open case: \Umathclass 4 with the number being the desired class. A more experimental features concerns native prescripts. Consider the following input \blank \hbox{$ {\tf X}^1_2^^3__4 \quad {\tf X}^1 ^^3\quad {\tf X} _1 __4 \quad {\tf X}^^3\quad {\tf X} __4 \quad {\tf X}^^3__4 $} \blank or with the control sequence variants: \blank \hbox{ \ruledhbox{${\tf X}\Usuperscript{a} $} \ruledhbox{${\tf X}\Usubscript{b} $} \ruledhbox{${\tf X}\Usuperscript{a}\Usubscript{b} $} \ruledhbox{${\tf X}\Usuperscript{a} \Usuperprescript{c} $} \ruledhbox{${\tf X}\Usubscript{b} \Usubprescript{d}$} \ruledhbox{${\tf X}\Usuperscript{a}\Usubscript{b}\Usuperprescript{c}\Usubprescript{d}$} \ruledhbox{${\tf X} \Usuperprescript{c} $} \ruledhbox{${\tf X} \Usubprescript{d}$} \ruledhbox{${\tf X} \Usuperprescript{c}\Usubprescript{d}$} } \blank A few days ago there was a discussion about tweaking some math parameters, like the radical spacing. I made a macro that deals with it: $\mathopenupparameter\Umathradicalvgap{10.5}\sqrt[3]{x}$ (this one is also in mkiv, be it slightly less efficient because in lmtx we can use \Umathparameter to query the state of a variable) Already present was a variant on \over which normally is used like {{1}\over{2}} i.e. the only time when tex looks back and needs to tweak styles. The alternative is: $\Uover{1}{2}$ etc which looks forward but is otherwise compatible, apart from supporting an optional keyword $\Uover style \scriptscriptstyle{1}{2}$ etc $\Uover style \textstyle{1}{2}$ etc At some point I will adapt some context code to this. Anyway, these are things that low level math users might like to play with. There are few more things but those will probably go unnoticed. 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] Retrieving original value of enviroment variable HOME
On 5/7/2020 12:30 PM, cont...@vivaldi.net wrote: Hello Hans, - I would need to work with the original value in run-time (Win7 / WinX; ConTeXt MkIV). I'll add environment.oldhome being the original one (but no testing done here) would be great, thank you! I guess it will be available over the night (= ConTeXt latest)? You can check it. Btw, when you're using lmtx there should be no real differences between for instance unix and windows, although on windows lmtx does support wide characters in environment variables, command line arguments, filenames, filelinks etc. (not that that matters much as one will seldom use more than ascii). Specific environment variables like HOME are a bit tricky on windows as they come in variants, so let me know if some more magic is needed. 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] error during the installation of luametatex
On 5/9/2020 4:50 AM, Jeong Dal wrote: Hi, I tried to update luametatex which was running well(it was installed following the process in the wiki>installation> MacOsX catalina), but I got the following error after all the files are downloaded. resolvers > lua > loading file '/Users/graph/ConTeXtL/tex/texmf-context/tex/context/base/mkiv/math-spa.lua' succeeded tex error > tex error on line 2960 in file math-ini.mkxl: ! Undefined control sequence l.2960 \normalsupmarkmode \plusone % 2 also disable ^[^+] in text mode The control sequence at the end of the top line of your error message was never \def'ed. You can just continue as I'll forget about whatever was undefined. looks like a wrong binary .. should be 2.06.02 .. can you try this binary: http://dl.contextgarden.net/build/luametatex/x86_64-darwin/ (the farm generates two binaries for osx and it looks like the legacy machine has gone off line which happens when osx updates itself and gets stuck half way, i'll look into 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] error during the installation of luametatex
On 5/9/2020 3:27 PM, Rik Kabel wrote: On 5/9/2020 02:52, Hans Hagen wrote: looks like a wrong binary .. should be 2.06.02 .. can you try this binary: http://dl.contextgarden.net/build/luametatex/x86_64-darwin/ (the farm generates two binaries for osx and it looks like the legacy machine has gone off line which happens when osx updates itself and gets stuck half way, i'll look into it) Hans I have the following update log entries (left column is EDT), indicating a roll-back of the binary: 2020-05-07T10:59:03 ConTeXt updated from 2020.04.30T11:15 to 2020.05.07T11:03 2020-05-07T10:59:03 LuaMetaTeX updated from 2.05.01 to 2.06.01 2020-05-07T10:59:03 LuaMetaTeX functionality updated from 20200402 to 20200506 2020-05-07T10:59:03 2020-05-08T15:14:26 ConTeXt updated from 2020.05.07T11:03 to 2020.05.08T20:50 2020-05-08T15:14:26 LuaMetaTeX downdated from 2.06.01 to 2.05.01 2020-05-08T15:14:26 LuaMetaTeX functionality downdated from 20200506 to 20200402 2020-05-08T15:14:26 2020-05-09T09:19:39 ConTeXt updated from 2020.05.08T20:50 to 2020.05.09T08:55 2020-05-09T09:19:39 LuaMetaTeX unchanged at 2.05.01 2020-05-09T09:19:39 LuaMetaTeX functionality unchanged at 20200402 2020-05-09T09:19:39 Perhaps there is an problem with the installation files? no, i uploaded a new lmtx only (not sure why the date is old then) what version does the binary report? - 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] \mathopen, \Uover and friends
On 5/9/2020 6:29 PM, Otared Kavian wrote: Hi Hans, Thanks for the quick fix of today's upload. I could typeset your examples with \mathopen, \mathclose and these are great features in order to fine tune the spacing in math mode. Regarding the new command \Uover, I thought maybe it would be more consistent to have the usual structure ${1} \Uover {2}$ like the more friendly ${1} \over {2}$ instead of having That would involve backtracking and be a psin in the butt wrt control. One can't have it all. $\Uover{1}{2}$ which is more like the \frac structure. Watch out: these are low level primitives (it is actually a set of primitives that put stuff on top of each other). The \frac is the interfaced variant. Also a structure like $\Uover style \textstyle{1}{2}$ seems a little bit far from the usual ConTeXt atmposphere… Would it not be possible to have ${1} \Uover[style=textstyle] {2}$ instead? That is what we have frac for (and one can define veriants that have set styles). In any case, thanks a lot for the constant addition of cute features… Some of these engine level extensions have been on my list for a while and eventually make implementing the user interfaced wrappers nicer (and sometimes more robust). Some is actually possible because some engine internals are a bit reorganized. 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] error during the installation of luametatex
On 5/9/2020 6:26 PM, Giulio Bertellini wrote: >> >>>> sh-3.2# context metafun Ha, I admit that I never tried that yet with lmtx. (The reason is that I then have to enter updating mode for all these new features. More something for end-of-the-year dark evenings with a stack of new cd's.) >> mkiv lua stats> lua properties: engine: lua 5.4, used memory: 179 MB, >> ctx: 166 MB, max: 168 MB, hash chars: min(64,40), symbol mask: utf (τεχ) >> >> mkiv lua stats> runtime: 20.702 seconds, 392 processed pages, 392 >> shipped pages, 18.936 pages/second Ok, that is not bad (I think on my already old machine one run took some 18 seconds for luatex and of course in mkii with pdftex I could watch a movie while processing the file.) The memory footprint also looks ok, especially given all these graphics. (in most cases lmtx has a smaller memory footprint.) >> Please consider that this mac mini is quite old and I am running mac >> OS Catalina on an external SSD. This was the first installation on >> Mac of Context today. I am quite happy with the results. because in the meantime even a raspberry pi has become useable, I wonder how this new microsoft arm (running at 3G) laptop will perform. >> I also installed the same LMTX Context release on the Linux Subsystem >> for Microsoft Windows 10 and on different versions of Arch Linux. >> with the same excellent results. Good. >> Thanks again for the excellent work, Thanks. 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] error during the installation of luametatex
On 5/9/2020 9:15 PM, Rik Kabel wrote: So, I did a clean install. It fails to properly install, reporting: l.2982 \normalsupmarkmode If this is not user error (mine), perhaps this is a win64 build problem? I can't imagine, as I compile these win binaries here using the mingw cross compiler under WLS (1). I also compile native binaries (a little slower than the cross compiled but a smaller file) and clang binaries (much slower and larger). The farm also has a windows set up now for luametatex but I just use the ones I make here. So, what gets shipped, the mingw ones, should work ok. (The native ones are part of the the backup plan, as on enevrr knows what will happen with mingw, not that the compilation is demanding.) 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] Retrieving original value of enviroment variable HOME
On 5/10/2020 2:33 PM, cont...@vivaldi.net wrote: I've just renewed the Ctx Beta installation, but 'environment.oldhome' seems be unavailable. are you ser HOME is set? \ctxlua{print("1",environment.homedir)} \ctxlua{print("2",environment.oldhome)} \ctxlua{print("3",os.getenv("HOME"))} \ctxlua{print("4",os.getenv("USERPROFILE"))} gives 4 values here 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] Retrieving original value of enviroment variable HOME
Hi, system > ConTeXt ver: 2020.01.30 14:13 MKIV beta fmt: 2020.5.10 int: english/english Did I updated ConTeXt correctly? Well, you made a fresh format, but use a version from january, so ... 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] Retrieving original value of enviroment variable HOME
On 5/11/2020 5:57 PM, cont...@vivaldi.net wrote: d:\Lukas\ConTeXt\Test\EnvHome> - I'm still getting: 1 C:/Users/u×ivatel 2 C:/Users/u×ivatel 3 C:/Users/u×ivatel 4 C:/Users/u×ivatel whilst HOME environment has been set to "DummyHome" (see "echo %HOME%"). What's wrong? I don't know ... maybe it pick up HOME from someplace else (the outer process space or so) you can insert prints (say os.getenv('HOME')) and see what happens 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] ConTeXt doesn't recognize source on network drive?
On 5/11/2020 5:26 PM, cont...@vivaldi.net wrote: Hello, after I've updated ConTeXt to the latest version, a new problem appeared - see the steps: (Note that "X:" is a network drive mapped as "\\192.168.112.xxx\px" - if it was of importance.) i have no problem here running from a mapped drive (nothing changed in that areas either) and i would have noticed it as i have several network drives (i'm talking windows 10) 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] Retrieving original value of enviroment variable HOME
On 5/12/2020 11:36 AM, cont...@vivaldi.net wrote: And - once I "inject" an extra debug info - do I have to call "context.exe --make --generate" (or similar)? You need to remake the fomat (and make sure you have the right mtxrun/context scripts). 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] new lmtx upload
Hi, The tex engine has at most 65K dimen and count registers and these can be local and global (although mixing these two models for the same variable can be inefficient). Anyway, in the current upload there is a mechanism for using way more variables, global ones, that are managed by lua: \luadimen test 100pt \scratchdimen = .25 \luadimen test \the\scratchdimen \the\luadimen test So, they act as normal dimensions and counters wrt assignment and serialization and such. There are also floats and booleans (in addition to integers and cardinals). Then, as another experiment, there are one/two dimensional arrays of variables. Think of: \newarray name whatever type integer nx 100 ny 500 \arrayvalue whatever 20 30 1024 \the\arrayvalue whatever 10 30 \the\arrayvalue whatever 20 30 \the\arrayvalue whatever 30 30 Some more info can be found in the last chapoter of the evenmore.pdf document. The question is: do we need this, and if so, do we need more of that. It's a bit chicken-egg case: we can have lua and can pipe back to tex, and we can stay at the tex end. This is a lmtx only feature. Just for the record: these are macros, not primitives, but they are rather efficient and have hardly any overhead. The floats can be in 1.23 format, 1.23e45 format and also in 0x12p34 format, while integers can be in 123 format and 0x123 format; the hex float format is lua's way of being roundtrip. Hopefully there are no side effects. 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] Arithmetic Overflow error in MetaFun
On 5/16/2020 4:36 PM, Keith McKay wrote: Colleagues I'm having problems with an Arithmetic Overflow error when calculating the x and y values for functions of the form: y = ax^4 + bx^3 + cx^2 + dx + e to which I then add a bit of randomness and other embellishments. I have had a look in the Metafun and Metafont manuals but nothing jumps out at me. In the minimum working example below, this Arithmetic Overflow occurs when xord =13.5 but I can get the calculation to work if I separate out the equation and then add together, since it seems to be failing on the pow(xord,4) instruction. Is there a switch in MetaFont that should be set or a better way of getting round this Arithmetic Overflow error? \startMPpage[instance=doublefun] - 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] Arithmetic Overflow error in MetaFun
On 5/16/2020 4:48 PM, Keith McKay wrote: Answering my own problem here. I've just searched through the mailing list archives and it seems that if I add [instance=doublefun] I do not get the Arithmetic Overflow error. Joy! fwiw, we have also instance=decimalfun concerning arithmic: in metapost we have scaled : upto 4K bp double : 64 bit floats decimal : configurable accuracy complex : dual doubles (only in luametafun) in lmtx lua we have: integer : lua tries to be clever but mixing leads to double float: lua tries to be clever decimal : userdata arbitrary precision (only in lmtx) complex : userdata dual doubles (only in lmtx) (in lmtx we have an extended math library and these function are also available in luametafun) 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] Problem with \vfill in extreme table
On 5/17/2020 5:00 PM, Wolfgang Schuster wrote: Bruce Horrocks schrieb am 17.05.2020 um 13:47: If I want the words Top and Bottom at the top and bottom of a page then "Top \vfill Bottom" works as expected. If I use the same in an extreme table I get an error and I don't know why. What's the 'official' way to align top and bottom in an xrow? MWE \setuppapersize [A4] [A4] \starttext \startxtable[width=\textwidth] \startxrow[height=150mm] \startxcell[align=middle] Top \vfill Bottom \stopxcell \stopxrow \stopxtable \stoptext It's not a real fix but you can you exclude the \vfill command when ConTeXt does its cell calculations. \starttext \startxtable[align=middle,width=\textwidth,height=15cm] \startxrow \startxcell Top \doifnotmode{*trialtypesetting}{\vfill} Bottom \stopxcell \stopxrow \stopxtable \stoptext Neat! 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] Minimal code for exporting custom tags
On 5/18/2020 9:09 AM, Aditya Mahajan wrote: Hi, What is needed to enable export of user defined macros? Consider the following example: ``` \def\startmycommand{\dostarttagged{mycommand}\empty} \def\stopmycommand {\dostoptagged} \setupbackend[export=xml, level=0] \starttext \startsection[title={Sample document}] \startparagraph This is a paragraph \stopparagraph \startmycommand This is mycommand \stopmycommand \stopsection \stoptext ``` If I compile using `context --trackers=structures.tags filename`, I get ``` backend > tags > U+0031:1 => U+0031:1 : 4 document>1 section>1 sectioncaption>1 sectionnumber>1 backend > tags > U+0053:S => U+0074:t : 5 document>1 section>1 sectioncaption>1 sectiontitle>1 backend > tags > U+0054:T => U+0068:h : 7 document>1 section>1 sectioncontent>1 paragraph>1 backend > tags > U+0054:T => U+0064:d : 8 document>1 section>1 sectioncontent>1 mycommand>1 ``` so the tag is applied. I can also verify this by looking at the PDF which contains ``` << /K 27 0 R /ParentTree 2 0 R /RoleMap << /document /Div /mycommand /Span /paragraph /P /section /Sect /sectioncaption /Div /sectioncontent /Div /sectionnumber /H /sectiontitle /H >> /Type /StructTreeRoot >> ``` and the tag `mycommand` is used at appropriate location. However, the exported xml file contains no tag: ``` file="test-tag" language="en" version="0.35" xmlns:m="http://www.w3.org/1998/Math/MathML";> 1 Sample document This is a paragraph ``` What am I missing in order to pass user-defined macros to the exporter? you're probably missing documentation + a high level define command This registers (extra) elements: \setelementbackendtag[mycommand] \setelementnature[mycommand][mixed] after that you can use \startelement[mycommamd] \starttext \startsection[title={Sample document}] \startparagraph This is a paragraph \stopparagraph \startelement[mycommand] This is mycommand \stopelement \stopsection \stoptext - 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] two superscript versions with Garamond Libre
On 5/18/2020 5:18 PM, Pablo Rodriguez wrote: Dear list, I’m accesing superscript glyphs for Garamond Libre with the OT feature and the character with the following sample: \definefontfeature[sups][script=latn, sups=yes] \definefontfamily[twoface][rm][GaramondLibre] \definefontfamily[mainface][rm][EB Garamond 12] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1ex] {\feature[+][sups]1}¹{\feature[+][sups]2}²{\feature[+][sups]3}³% {\feature[+][sups]8}⁸{\feature[+][sups]9}⁹{\feature[+][sups]0}⁰\\ \setupbodyfont[twoface] {\feature[+][sups]1}¹{\feature[+][sups]2}²{\feature[+][sups]3}³% {\feature[+][sups]8}⁸{\feature[+][sups]9}⁹{\feature[+][sups]0}⁰\\ \stopTEXpage \stoptext Typeface is available at https://github.com/dbenjaminmiller/garamond-libre/releases/latest. Sorry, but I’m a bit thick now. Does anyone know why characters and OT sups provide differently sized glyphs? I think there might be a bug in the typeface, but I need to know first what to report. designers decisions ... i guess ... features are just tags and afaik nothing really prescribes how to implement them (relative to each other) 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] LMTX not working in Windows 10
On 5/19/2020 1:41 AM, Jairo A. del Rio wrote: Hi everyone! I've tried installing LMTX on Windows 10 (x64) (I use Ubuntu, but my PC isn't available now). Whatever. When I try to execute context.exe the following appears: ! Parameters must be numbered consecutively. 0 l.214 \def\gobbleoneargument #0 then your binary is not updated an din sync with the rest of the tex code - 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] LMTX not working in Windows 10
On 5/19/2020 6:46 PM, Rik Kabel wrote: On 5/19/2020 12:12, Pablo Rodriguez wrote: On 5/19/20 5:55 PM, Wolfgang Schuster wrote: Pablo Rodriguez schrieb am 19.05.2020 um 16:42: [...] I’m getting exactly the same error on Windows (x64). Where could we get the latest binary? You can download the binary from the following link but only the 32bit version for Windows is up-to-date. http://dl.contextgarden.net/build/luametatex/ Wolfgang, many thanks for the information. Pablo -- http://www.ousia.tk ___ Hallelulah! I now have a working LMTX again. The version at http://dl.contextgarden.net/build/luametatex/x86_64-w64-mingw32/luametatex.exe, when put into place, did the job. Normally the installer should have the right one, not sure why that failed as I make those bins here. Anyway, there is some new low level stuff so hopefully nothing gets broken. And some more coming, even more fundamental (and so tricky that first wolfgang need to check that). 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] \pagewidth undefined?
On 5/19/2020 5:37 PM, Wolfgang Schuster wrote: Gerben Wierda schrieb am 19.05.2020 um 13:42: OK. I just noticed in lmtx documentation that \paperheight and \paperwidth primitives have been removed, but there is no information what rteplaces them. So, all the documentation that contains them has been invalidated (e.g. examples in details.pdf) I can't find \pagewidth in the current versison of details.pdf. As Pablo wrote you can use \paperwidth (or \printpaperwidth) or one of the following methods. begin example \setupexternalfigures[location=default] \setuplayout[tight] \showframe \starttext \centerbox{\externalfigure[mill.png][width=\textwidth]} \page \centerbox{\externalfigure[mill.png][width=\paperwidth]} \page \centerbox{\externalfigure[mill.png][factor=max]} \page \centerbox{\externalfigure[mill.png][factor=min]} \stoptext end example \pagewidth etc were low level engine primitives that were never meant to be used directly (backend related, and even then very sensitive for confusion); as Wolfgang indicated, these were never supposed to be used directly 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] \read segfaults in lmtx
On 5/20/2020 2:39 AM, Marcel Fabian Krüger wrote: Hi, using \read on any existing file seems to trigger a segfault on lmtx. For example, take the document \starttext \newread\myread \openinputfile\myread{test} \read\myread to \abc \closeinputfile\myread \stoptext where test.tex is any file (It doesn't matter if the file is empty or not). On my system (linux x64, latest lmtx) this results in mtx-context | fatal error: return code: 139 hm, looks like i close the file too soon (these read files are autoclosed on read) .. i'll fix 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] paperformat=landscape not working
On 5/20/2020 10:34 AM, Peter Münster wrote: Hi, When the PDF-document is in landscape format, this does not work: context --extra=select --selection=X --paperformat=A4,landscape*A4,landscape file.pdf This patch helps: --- mtx-context-select.tex~ 2020-05-20 10:28:42.702314061 +0200 +++ mtx-context-select.tex 2020-05-20 10:28:53.730225887 +0200 @@ -31,8 +31,8 @@ \input mtx-context-common.tex \setuppapersize - [\getdocumentargumentdefault{paperformat_from}{A4}] - [\getdocumentargumentdefault{paperformat_to}{A4}] + [\getdocumentargumentdefault{paperformat_paper}{A4}] + [\getdocumentargumentdefault{paperformat_print}{A4}] \setuppaper [offset=\getdocumentargumentdefault{paperformat_to}{0pt}] shouldn't that one then become \setuppaper [offset=\getdocumentargumentdefault{paperformat_print}{0pt}] With LMTX, --extra=select is not working at all. I get this error: mtx-context | processing extra: mtx-context-select.tex mtx-context | redirect luametatex -> luatex: luatex --luaonly "/opt/context-lmtx/tex/texmf-linux-64/bin/mtxrun.lua" --script mtx-context --extra=select --selection=2 file.pdf --redirected mtx-context | processing extra: mtx-context-select.tex mtx-context | warning: lua mismatch (luv: 0 <> bin: 5.2), forcing remake /usr/share/texmf/scripts/context/lua/mtx-context.lua:1176: attempt to index field 'instance' (a nil value) that's not lmtx, but mkiv that you call 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] \read segfaults in lmtx
On 5/20/2020 12:36 PM, Marcel Fabian Krüger wrote: On Wed, May 20, 2020 at 12:13:01PM +0200, Hans Hagen wrote: On 5/20/2020 2:39 AM, Marcel Fabian Krüger wrote: Hi, using \read on any existing file seems to trigger a segfault on lmtx. For example, take the document \starttext \newread\myread \openinputfile\myread{test} \read\myread to \abc \closeinputfile\myread \stoptext where test.tex is any file (It doesn't matter if the file is empty or not). On my system (linux x64, latest lmtx) this results in mtx-context | fatal error: return code: 139 hm, looks like i close the file too soon (these read files are autoclosed on read) .. i'll fix it Which file is closed here? Experiments with a custom format suggest that the read files are opened through the `open_data_file` callback, so even if they are closed they probably should be closed by calling the `.close` member of the returned table. But that never happens (This might be a related bug: In my experiments, even for files loaded with `\input`, the close function is never called.) and the issue seems to occur even if there is no real file opened for this. So I don't see why LuaMetaTeX should call fclose here at all. But anyway, thanks for looking into this. end_file_reading is always called but has to close selectively, dependent on what has been opened, eep in mind that a token list or so is also an input stream 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] paperformat=landscape not working
On 5/20/2020 2:46 PM, Wolfgang Schuster wrote: Peter Münster schrieb am 20.05.2020 um 14:01: On Wed, May 20 2020, Hans Hagen wrote: [offset=\getdocumentargumentdefault{paperformat_to}{0pt}] shouldn't that one then become \setuppaper [offset=\getdocumentargumentdefault{paperformat_print}{0pt}] Yes, I guess. I think this is better. \setuppaper [offset=\getdocumentargumentdefault{paperoffset}{0pt}] indeed, you got me there, 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] Proposal to update the "Manuals" wiki page
On 5/19/2020 3:22 PM, Garulfo wrote: Hi, I hope you're all doing well. Please, you will find a proposal to update the Manuals page on the wiki: https://wiki.contextgarden.net/ManualsGallery 2 objectives: 1/ to make something more visual, to help the user identify the different documents, their organization, their date of release. 2/ to gather all the updated documents in one place Sources were : - http://www.pragma-ade.com/overview.htm - https://wiki.contextgarden.net/Manuals, and wiki snippets here and there. - https://github.com/hmenke/context-examples/blob/master/GUIDE.md Depending on your comments, and if there is an interest, I would be happy to improve it (correct errors, change document segmentation, better colors choice, additional data such as authors, number of pages). It's mainly built from cvs table + script. Finally, if you approve this update, I can arrange to clean up some pages of the wiki about the manuals. Nicely done. 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] Proposal to update the "Manuals" wiki page
On 5/20/2020 4:55 PM, cont...@vivaldi.net wrote: 2. Could you add a "download all manuals" hlink/button next to each (sub)title to download appropriate manuals as .zip, so to get: most manuals are in the distribution - 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] Emoji color fonts not working on LMTX/Context MKIV
On 5/20/2020 9:31 PM, Pablo Rodriguez wrote: On 5/20/20 12:26 PM, Jairo A. del Rio wrote: [...] Only Twemoji Mozilla and Segoe UI Emoji worked for me, so, what am I doing wrong? Hi Jairo, using latest ConTeXt with the following sample, I get these results: \definefontfamily[emoj][rm][Twemoji Mozilla][features={color}] \setupbodyfont[emoj] \starttext 🤦🇬🇧 \stoptext MkIV (2020.01.30 14:13) displays colored icons. LMTX (2020.05.18 16:50) displays only black and white icons. I think this might be a bug in LMTX. Could you confirm the issue? what if you wipe the cache - 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] Emoji color fonts not working on LMTX/Context MKIV
On 5/20/2020 10:26 PM, Jairo A. del Rio wrote: I did. It turns out that installing graphicsmagick does the trick (pun intended) for Noto Color Emoji. However, the issue persists for SVG fonts and the same message appears, despite of having cleaned the cache (I've used mtxrun --script cache --erase). Using the code Pablo sent, with EmojiOne Color instead of Twemoji Mozilla, I get the following error messages: So, what version do you use? 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] Emoji color fonts not working on LMTX/Context MKIV
On 5/20/2020 10:18 PM, Pablo Rodriguez wrote: On 5/20/20 9:39 PM, Hans Hagen wrote: [...] LMTX (2020.05.18 16:50) displays only black and white icons. I think this might be a bug in LMTX. Could you confirm the issue? what if you wipe the cache Many thanks for your reply, Hans. icons are black and white, no color after wiping the cache. Made no difference with a brand-new install either. Just accidentally, I discovered this is an issue in Evince. LMTX should handle color in LMTX with other PDF code than in MkIV. won't happen ... actually, at some point mkiv will use a similar method as lmtx MuPDF displays colorful. So do acroread for Linux, xpdf, SumatraPDF and even Okular. Sorry for the noise, since Evince seems to be the culprit. for me acrobat and mupdf based viewers (sumatra also uses it, actually a rather old version) are the reference .. it makes no sense to cripple context because of an issue with a viewer 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] context --purgeall filename does not delete all temporary files
On 5/21/2020 10:43 AM, Aditya Mahajan wrote: On Thu, 21 May 2020, Aditya Mahajan wrote: Hi, `context --purgeall filename` behaves differently from `context --purgeall`. `context --purgeall` deletes all files with the name `*-temp-*`. I would have thought that `context --purgeall filename` will delete all files with the name `\jobname-temp-*` but it does not. Is there a way to delete the `\jobname-temp-*` files without requiring an extra `context --purgeall` run? This is needed for deleting extra files by `t-filter` module or deleting extra files generated by automatic EPS to PDF conversion (with figures.cachepaths.prefix="\jobname-temp"), etc. As an aside, I also noticed that in both mkiv and lmtx, mtx-context.lua has local extra_runfiles = { "^l_m_t_x_.-%.pdf$", } but graph-inc.lua has local defaultprefix = "m_k_i_v_" So, the default generated files are never deleted. i can add it ... originally that was for the temporary pdf jobname i think 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] Getting width of text to be typeset
On 5/22/2020 11:22 AM, cont...@vivaldi.net wrote: Hello, is it possible to get somehow the width of the "material" (box?) of the current line which is "ready" to be typeset? See the case: \starttext some text pqrs % Here I need to get width (or content) of the text from the begin of the current line, % i.e. width of the text "pqrs". % (Depending of the width I will decide what to do later.) \stoptext I am too laical to know how to "inject" TeX workflow or whether to access LuaTeX internals (nodes?) to get the desired information. - Is it possible somehow? Too easy ... \startluacode function document.whatever() context(nodes.hpack(tex.getnest().head.next).width) end \stopluacode \unexpanded\def\widthuptohere{\dimexpr\ctxlua{document.whatever()}sp\relax} \starttext \dorecurse {10} { snippet #1\scratchdimen\widthuptohere\ has \the\scratchdimen\ width\par } \stoptext but still you have to wikify it ... maybe i'll make it a low level helper (but than you also need to wikify that because i have no clue where to explain 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] Wiki - Proposal to update the Welcome page
On 5/22/2020 11:42 PM, Garulfo wrote: Hi all, thanks for your encouraging feedbacks. 1/ Concerning the Manuals Page - As proposed, "obsolete banners" are added to thumbnails of the oldest manuals. - About providing zips of manuals per topics: maybe we could just add a index.html in the distribution structure, to provide the user with a browsing system similar to the wiki's one. - If the admistrators wish, I can now replace the current page. probbaly no one knows this but there is real old feature >mtxrun --launch --pattern=luametafun.pdf mtxrun | launching: c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals/luametafun.pdf i could probably extend that with a list option (there is actually a xml file that describes the manuals as on the website ... it's used in generating the website which happens every update - from also rather ancient xml files) 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] Getting width of text to be typeset
On 5/23/2020 12:03 AM, Hans Hagen wrote: On 5/22/2020 11:22 AM, cont...@vivaldi.net wrote: Hello, is it possible to get somehow the width of the "material" (box?) of the current line which is "ready" to be typeset? See the case: \starttext some text pqrs % Here I need to get width (or content) of the text from the begin of the current line, % i.e. width of the text "pqrs". % (Depending of the width I will decide what to do later.) \stoptext I am too laical to know how to "inject" TeX workflow or whether to access LuaTeX internals (nodes?) to get the desired information. - Is it possible somehow? Too easy ... \startluacode function document.whatever() context(nodes.hpack(tex.getnest().head.next).width) end \stopluacode \unexpanded\def\widthuptohere{\dimexpr\ctxlua{document.whatever()}sp\relax} \starttext \dorecurse {10} { snippet #1\scratchdimen\widthuptohere\ has \the\scratchdimen\ width\par } \stoptext but still you have to wikify it ... maybe i'll make it a low level helper (but than you also need to wikify that because i have no clue where to explain it) Actually, one needs to flush a bit \startluacode function document.whatever() local h = nodes.hpack(tex.getnest().head.next) local w = h.width h.list = nil nodes.free(h) context(w) end \stopluacode \unexpanded\def\widthuptohere{\dimexpr\ctxlua{document.whatever()}sp\relax} \starttext \dorecurse {10} { snippet #1\scratchdimen\widthuptohere\ has \the\scratchdimen\ width\par } \stoptext not that it matters much, because it's unlikely that you leak more than a dozen nodes in a run. 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] Is it possible to have a rotated label in Metafun?
On 5/24/2020 10:41 AM, Otared Kavian wrote: Hi all, In a graph which I am trying to draw with LuaMetafun, I have a variable the values of which I want to show on the graph rotated 90 degrees (or whatever other value). Is it possible to do that? An example is: numeric a, u ; u := 10mm ; a := 4.5 ; label.bot(a, (10,-0.1) scaled u) % I would like to have printed 4.5 rotated 90 degrees for instance. label.bot(textext(a) rotated 45, (10,-0.1) scaled u); - 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] Anyone managed a tabulated table of contents
On 5/25/2020 2:40 PM, Bruce Horrocks wrote: I can't be the first to have wanted to try something like this. Is it possible to use tabulate (or any of the table types) to customise the layout of the table of contents? I'd like 4 columns - title, subject, author and page - where subject and author will (eventually) be additional parameters supplied to \startchapter. Bonus points if it works in interactive mode as well. Minimum non-working example below. This generates the 4 column values per chapter heading but they run together into a single paragraph as if the table formatting was not present. %%% Begin %%% \setuppapersize [A4] [A4] \setupinteraction [state=start] \setuplist [chapter] [ alternative=command, %interactive command=\myTOCrow, before=\myTOCbefore, after=\myTOCafter ] % #1 == Section number; #2 == text; #3 == page number \define[3]\myTOCrow{\NC #2 \NC dummy \NC John Doe \NC #3 \NC\NR } \define\myTOCbefore{ \starttabulate[|pw(8.75cm)|l|lw(4.2cm)|r|] \NC \underbars{Title} \NC \underbars{Subject} \NC \underbars{Author} \NC \underbars{Page} \NC\NR } \define\myTOCafter{% \stoptabulate } \starttext \title{Tabulated Table of Contents} \placelist[chapter] \startchapter[title=Tufte 1] \input tufte \stopchapter \startchapter[title=Tufte 2] \input tufte \stopchapter \stoptext %%% End %%% It's hard. Maybe I need to make a more low level accessor for that but multipass etc gets in the way. When you knwo the dimensions you can do this: \usemodule[article-basic] \definelistalternative [whatever] [renderingsetup=whatever] \setuplist [chapter] [alternative=whatever] \startsetups whatever \framed [offset=overlay,frame=off] { \framed [width=25mm,align=flushleft,frame=off,offset=0pt] { number: \currentlistentrynumber } \framed [width=4cm,align=normal,frame=off,offset=0pt] { title: \currentlistentrytitle } \framed [width=4cm,align=normal,frame=off,offset=0pt] { author: \structurelistuservariable{author} } \framed [width=2cm,align=flushright,frame=off,offset=0pt] { page: \currentlistentrypagenumber } } \stopsetups \starttext \starttitle[title={Tabulated Table of Contents}] \placelist[chapter] \stoptitle \dorecurse {3} { \startchapter[title=Covid 9][author=Cuomo] \input cuomo \stopchapter } \stoptext 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] About Latex compatibility module
On 5/24/2020 1:43 AM, Jairo A. del Rio wrote: Hi everyone! I was reading some old posts on TeX.SX about LaTeX support on ConTeXt and I found the following: https://web.archive.org/web/20110822085249/https://modules.contextgarden.net/LaTeX However, not only the module seems to be deprecated, but there's no more info about the module now (links are broken and the like). Btw the test file (latextest.tex) included fails to compile: > tex error on line 165 in file t-ltmsen.tex: ! Undefined control sequence >> \newskip\@rightskip \@rightskip \z@skip looks like someplace one has to define \z@skip to be 0pt (in this case it's actually redundant code because a newskip is likely to be zero) Is it possible to make it work? I think it would be nice if some minimal LaTeX macros were supported. Thank you in advance! Depends. It's not that hard to define some basic 'handle some latex cases' module but the question is "for what purpose?". When I look at those decade old files in that archive I see a lot of messy code that one needs to isolate and even then we can assume that users use more than a few commands. When they only use the top-ten commands, no problem, but when they start setting lengths or so ... why use context then. I have no problem mapping a few commands so that new users can cut-n-paste some code as a starter but somehoen has to come up with the list of commands and minimal test files then. Apart from the (probably a bit boring) challenge I think it doesn't pay off. Also, the systems are conceptually too different I think. 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] \setupbackend in MkIV
Rik Kabel schrieb am 25.05.2020 um 21:50: I cannot get a PDF/A document produced with the latest MkIV beta 2020.05.18 16:46 (LMTX works without issue). Using the example from the wiki (https://wiki.contextgarden.net/PDF/A) I get the error stating: ... \p_file {\backendparameter {xmpfile}}\ifempty \p_file \else \clf_setxmpf... \setup_backend ...end [#1]\the \everysetupbackend l.11 ...ISO coated v2 300\letterpercent\space (ECI)] mtx-context | fatal error: return code: 1 Removing either of the \setupbackend instructions still results in the same error. Same issue for PDF/X. Is it a bug, or is it me? It's a bug, there is a check in the MkIV version of the code which should be only in the LMTX version. I uploaded new versions. We're also redoing some low level support macros; these were (and have been) okay so there is no real need to replace them but by using some new features they could be done a bit nicer and they even became a bit faster cq. have less imprint on memory usage, but that will only be noticed in extreme documents that rely on them, like maybe thomas 1000 page natural tables or Massi's configuration extensive applications; we'll see. Wolfgang and I are checking these modules and related core code which will take a while (the test suite runs ok) but any issues, if any, will be solved fast. In due time it might bring some additional options. 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] Issue with latest LMTX version 2020-05-25
On 5/26/2020 11:29 AM, Joseph wrote: Dear list, With following MWE : %%% \startluacode \stopluacode \appendtoks\ctxlua{userdata.font_switch(\fontid\font)}\to \everyfontswitch \setupbodyfont[mainfont, 9pt] \starttext Foo. \stoptext %%% I get following error (commenting out the \appendtoks line makes the error to disappear) : I get nothing because you rmwe is really minimal in the sense that font_switch is not defined. Anyway, what you need to do it this: \number\fontid\font which will work in mkiv and lmtx or \the\fontid\font which also works in lmtx. I changed a couple of these 'internal quantities' to behave like number tokens which has some advantages (for instance, such a token doesn't need to have a space or \relax as sentinel in situations where a lookahead can spoil your game). There is a whole bunch of these quantities and some were numbers and some serialized numbers and i just made that consistent across the repertoire. It's anyway good practice to put something \number in front when you wonder of what you get is a number. Just consider it progress. (there's also \setfontid so maybe you don't need the lua code at all) 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] Issue with latest LMTX version 2020-05-25
On 5/26/2020 11:29 AM, Joseph wrote: \appendtoks\ctxlua{userdata.font_switch(\fontid\font)}\to \everyfontswitch btw, using font.current() is more natural at the lua end 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] RE : Re: Issue with latest LMTX version 2020-05-25
On 5/26/2020 12:43 PM, Joseph wrote: Thanks Hans, prefixing with \the seems to fix the problem. I’ll have a look to other suggestions you made. I also see that \ifindentation is also gone now. What’d be a replacement for it please? it was never reliable i think, maybe just check for parindent ... we should have a proper mode for it (or maybe a conditional in context speak) the question is: what do you want to check? if there is an indentation? if it already happened? if it will happen? the old test let that in the middle 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] RE : Re: RE : Re: Issue with latest LMTX version 2020-05-25
On 5/26/2020 2:28 PM, Joseph wrote: I want to check if current paragraph is being indented. I'll add \doifelseindented to lmtx ... which you will then document on the wiki. 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] issue with environment and Lua
On 5/26/2020 8:24 PM, Pablo Rodriguez wrote: I have added an \xmlflushcontext to a non-minimal environment file and it crashes again and again. then you probably use the wrong command I get the following errors: lua error > lua error on line 8 in file cont-yes.mkiv: function call [560]: ...ext/tex/texmf-context/tex/context/base/mkiv/lxml-tex.lua:918: bad argument #2 to 'lpegmatch' (string expected, got table) mtx-context | fatal error: return code: 256 Is there any way to be able to know which XML code outputs a table instead of the string ConTeXt expects and complaints about? hard to say as in xml there can be strings as well as tables so it all depends on what you do .. normally ther eis checking but not for cases where we're sure wat to expect (no need for overhead) I already spent three hours and I got nothing. In cases like that, it would be useful that ConTeXt could translate XML + environments to ConTeXt sources. \enabletrackers[context*] in the xml setups that you use, something \xmlshow{#1} will give you a clue of what you're dealing with 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] Change hyphenation mark
On 5/26/2020 10:17 PM, Marc Trius wrote: I would like to use a different hyphenation mark (־, U+05be) in Yiddish, as it is the standard in that language. It's my understanding from reading the wiki that this is currently impossible—I am wondering if there is a hack that could accomplish this. It would be pretty bad if we couldn't do that ... but you need to define yiddish first (maybe more needs to be setup ... but that's up to you tolet us know, labels, what patterns and such). \installlanguage [yiddish] [righthyphenchar="05BE, righthyphenchar=`*, % for testing default=en] \starttext \input tufte \language[yiddish] \input tufte \stoptext - 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] Change hyphenation mark
On 5/26/2020 11:30 PM, Marc Trius wrote: Thank you! It makes a big difference. I distinctly remember reading somewhere that the hyphen character can't be replaced... But it was last year so I couldn't tell you where. hm, i think it always could be changed, but afaik only luatex can do that per language within a paragraph as it stores language properties with the characters I have an environment that provides the first ten Hebrew numerals, which I am using for the front matter: \def\hebrewnumber#1% {\ifcase#1 \or א \or ב \or ג \or ד \or ה \or ו \or ז \or ח \or ט \or י \else -\fi} \defineconversion[hebrewnumerals][\hebrewnumber] I assume that the right way to do it, that would allow for more numbers, is in Lua, the way that Roman numerals are done. Unfortunately I couldn't quite figure out how to do it. Right now I don't have more than ten pages of front matter, but if you are willing to help with implementation, I can explain how Hebrew numerals work. Ok, let's do that off-list then - 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] lmtx: rotation problem with float numbers
On 5/27/2020 5:30 PM, Wolfgang Schuster wrote: Peter Rolf schrieb am 27.05.2020 um 16:38: Hi, this used to work, but wants a dimension now In which way? Did you get the desired result or was there just no error message. \starttext \rotate[rotation=-0.2]{Rotation} \stoptext No such problems with integer rotation numbers. ConTeXt expects a integer for the rotation value and decimals are only possible for a dimension. can you test with: \clf_analyzerotate % rather accurate \p_rotation_rotation\space in grph-trf.mkiv 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] bug in \doifinset
On 5/27/2020 10:39 PM, Wolfgang Schuster wrote: Pablo Rodriguez schrieb am 27.05.2020 um 22:31: Hi Hans, the following sample: \starttext \startTEXpage[offset=1em] \doifinsetelse{i7}{i4, i5, i7} {yes}{no} \stopTEXpage \stoptext outputs "yes" with latest from 2020.05.18 16:50, but "no" with latest from 2020.05.25 23:39. I think this may be a bug, since the sample above would only get "yes" with { i7}. No spaces are allowed in these lists. Older versions of the command removed the spaces before the entries but the current version is stricter. we can use the old one, so only the raw variants then ignore the space; best to be downward compatible, even if this was never the formal spec (more a side effect) it's only 20% slower and internally we we often use the raw one 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] Checking existence of a macro (control sequence) by Lua
On 5/28/2020 12:49 AM, luigi scarso wrote: On Thu, May 28, 2020 at 12:43 AM <mailto:cont...@vivaldi.net>> wrote: Off-topic: your email are always marked as spam by my gmail . Are you sure that your address setup is ok ? also, a reply to that vivaldi address always bounces (same for gmx accounts, so don't expect answers to those adresses) 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] Checking existence of a macro (control sequence) by Lua
On 5/28/2020 12:42 AM, cont...@vivaldi.net wrote: Hello, is it possible to check whether a macro exists (or - is it a non-\undefined control sequence) with Lua? Suppose: \starttext \def\MyMacro{Ahoj} \def\MyMac#1#2{Something} \startluacode IsDefined = function(ctl_seq) print("CS " .. ctl_seq .. (tex.IsCS(ctl_seq) -- Or what to come here? "is defined" or "is unknown") .. ".") end -- So the function should print to the console: IsDefined("MyMacro") --> "CS MyMacro is defined." IsDefined("MyMac") --> "CS MyMac is defined." IsDefined("bf") --> "CS bf is defined." IsDefined("dummy") --> "CS dummy is unknown." \stopluacode \stoptext Is it possible? A lot is possible. Take this: \def\MyMacroA{Ahoj A} \unexpanded\def\MyMacroB{Ahoj B} \frozen\def\MyMacroC{Ahoj C} % in lmtx % \def\MyMacroC{Ahoj C} % barks At the tex end you can check for several properties: \ifusercmd \hbox Y\else N\fi % in lmtx \iffrozen \hbox Y\else N\fi % in lmtx \ifusercmd \MyMacroA Y\else N\fi % in lmtx \iffrozen \MyMacroA Y\else N\fi % in lmtx \iffrozen \MyMacroC Y\else N\fi % in lmtx At the Lua end you can check for being defined: \startluacode local function whatever(s) context.type("\\" .. s) context(" is %s", tokens.defined(s) and "defined" or "undefined") context.par() end whatever("MyMacroA") whatever("MyMacroD") whatever(" ") whatever("-") \stopluacode alternatively you can say: \startluacode local t = token.create("MyMacro") print(t.cmdname == "undefined_cs") \stopluacode which is less efficient unless you want to access more properties. 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] LMTX: different output if dots are used in the file name
On 5/28/2020 2:49 PM, Marco Patzer wrote: Hi! LMTX and MkIV behave differently if dots are used in the file name. Example: printf '%s\n' '\starttext\null\stoptext' > foo.10.tex && context foo.10.tex MkIV: → foo.10.pdf LMTX: → foo.pdf Is this intentional? consider it to be so 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] \Umathcodenum and get...dir in lmtx
On 5/28/2020 4:03 PM, Marcel Fabian Krüger wrote: Hi, I had two issues with luametatex: The manual documents getters and setters for the directions: The direction states can be queried and set with: tex.gettextdir() tex.getpardir() tex.setmathdir() tex.getlinedir() tex.settextdir() tex.setpardir() tex.getmathdir() tex.setlinedir() While there is no problem with the set...dir commands, the get...dir commands don't actually exists. (They can be implemented using tex.get, but it would be nice if either they were added to luametatex or if they were removed from te documentation to avoid confusion.) they're cheap to add (but linedir is just text dir and boxdir can be get otherwise as with all these other box properties) Additionally the scanning variant of \Umathcodenum seems broken: Take the example document \starttext \directlua{ print('gettextdir:', tex.gettextdir) } \the\Umathcodenum`a \stoptext It works in ConTeXt mkiv, but in lmtx it shown a (non-informative) error: gettextdir: nil tex error > tex error on line 5 in file ./contfail.tex: ! This can't happen (scan char) the scanning part is ok, but the serializer ignores that one (i'll add it) l.5 \the\Umathcodenum`a 1 \starttext 2 \directlua{ 3 print('gettextdir:', tex.gettextdir) 4 } 5 >> \the\Umathcodenum`a 6 \stoptext 7 I'm broken. Please show this to someone who can fix me. mtx-context | fatal error: return code: 256 (\Umathcodenum`a=123 seems to work though) Also especially these "This can't happen" errors a a it of pain debug without having the option to look into the source which I can't find normally can't happens are not supposed to show up in a run as they indicate a not-yet-taken-care-of situation (which can happen when one adds a primitive) anywhere. Has that been released? Is it still planned to make it available at some point? sure, when we have organized the repositories which is part of a larger reorganization effort which takes time (and motivation) which is kind of fuzzy this year (i originally planned early this year, then around bt, now we're somewhat later .. we'll see when) 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] LMTX: different output if dots are used in the file name
On 5/28/2020 5:59 PM, Marco Patzer wrote: On Thu, 28 May 2020 17:33:19 +0200 Hans Hagen wrote: On 5/28/2020 2:49 PM, Marco Patzer wrote: Hi! LMTX and MkIV behave differently if dots are used in the file name. Example: printf '%s\n' '\starttext\null\stoptext' > foo.10.tex && context foo.10.tex MkIV: → foo.10.pdf LMTX: → foo.pdf Is this intentional? consider it to be so That's unfortunate. 1) The editor workflow with simple suffix replacement .tex → .pdf to open the corresponding PDF file doesn't work any more with lmtx. New logic is needed to find the correct pdf file name. 2) A project (of mine) that uses item numbers as file names (containing dots) compile to the same pdf: MkIV (everything's predictable and fine): 10.10.10.tex → 10.10.10.pdf 10.10.11.tex → 10.10.11.pdf 11.10.11.tex → 11.10.11.pdf LMTX: 10.10.10.tex → 10.10 (not even a PDF suffix) 10.10.11.tex → 10.10 (file 10.10 is over-written) 11.10.11.tex → 11.10 (no suffix) MkIV is way more predictable and consistent in that regard. I'll look at it but not today ... first I need to play with some other (neat) stuff and run tests. 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] Checking existence of a macro (control sequence) by Lua
On 5/28/2020 11:24 PM, cont...@vivaldi.net wrote: Hello, one more question - why macros \Undefined and \DoNothing show "defined" although I (tried to) undefine them? \starttext \def\MyMacro{Ahoj} \def\MyMac#1#2{Something} \def\Undefined{} \let\Undefined\undefined \def\DoNothing{} \let\DoNothing\donothing \startluacode local str = { [true] = "defined", [false] = "undefined" } local function whatever(s) context.type("\\" .. s) context(" is " .. (tokens.defined(s) and "defined" or "undefined")) --% Hans' way context(" and is " .. str[token.is_defined(s)] .. ".") --% Henri's way context.par() end whatever("MyMacro") whatever("MyMacroD") whatever(" ") whatever("-") whatever("Undefined") whatever("DoNothing") \stopluacode %\Undefined % Causes "! Undefined control sequence" \stoptext Gives: " \MyMacro is defined and is defined. \MyMacroD is undefined and is undefined. \ is defined and is defined. \- is defined and is defined. \Undefined is defined and is defined. \DoNothing is defined and is defined. " Because the macro actually *is* defined: as soon as tex sees \foo it reserves the name and gives it the meaning undefined, so even \undefined is defined. Anyway, that is why we have \ifdefined that does a different kind of checking. In retrospect, that is a better one, so I'll adapt that in lmtx. \starttext \let\MyMacroA\undefined \startluacode local function whatever(s) context.type("\\" .. s) context(" is " .. (tokens.defined(s,true) and "defined" or "undefined")) --% Hans' way context(" and has meaning " .. (tokens.defined(s) and "defined" or "undefined")) --% Hans' way context.par() end whatever("MyMacroA") whatever("MyMacroB") \stopluacode \stoptext \MyMacroA is defined and has meaning undefined \MyMacroB is undefined and has meaning undefined You can do this in current luatex/mkiv: if CONTEXTLMTXMODE == 0 then local d = tokens.defined local c = tokens.create function tokens.defined(s,b) if b then return d(s) else return c(s).cmd_name == "undefined_cmd" end end end 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] Unicode chars and \insertpages (Win7)
On 5/28/2020 9:49 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \startext \insertpages[ξ_file.pdf] \stoptext Using latest on Linux, it works perfectly fine. On Windows (I’m still on Win7), it doesn’t work unless I replace "ξ" with an ASCII character. Could this be fixed or is it really a limiatation of Windows? It depends on the version and engine. For luatex we also depends on the interfacing that the texlive ecosystem provides. As Akira mentions, there have been some developments in that area but I didn't test that yet (no files with utf names here) but I trust his (always done) testing of context. That will trickle into future binaries (which is somewhat tricky as we have experimental as well as current). In luametatex things are different. There all windows specific operations have wide-character support, that is, the utf8 goes via utf16 and codepages and such: filenames, environment variables, command line arguments, whatever. That said: I never use non-ascii non-spacy names ... it's the most portable. 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] LMTX: different output if dots are used in the file name
On 5/28/2020 8:31 PM, Marco Patzer wrote: On Thu, 28 May 2020 18:18:51 +0200 Hans Hagen wrote: MkIV (everything's predictable and fine): 10.10.10.tex → 10.10.10.pdf 10.10.11.tex → 10.10.11.pdf 11.10.11.tex → 11.10.11.pdf LMTX: 10.10.10.tex → 10.10 (not even a PDF suffix) 10.10.11.tex → 10.10 (file 10.10 is over-written) 11.10.11.tex → 11.10 (no suffix) MkIV is way more predictable and consistent in that regard. I'll look at it but not today ... first I need to play with some other (neat) stuff and run tests. OK, thanks. No hurry. The production projects run on some oldish 2019 MkIVs anyway. I'm trying to get my feet wet with lmtx and run it on some projects to check how usable and compatible it is. It should be compatible, although at some point there will be functionality that is only in lmtx. Okay, metapost is an exception, because there is a lot in lmtx that is not in mkiv, but that's a separate subsystem anyway. 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] About the use of command handlers
On 5/29/2020 6:29 AM, Jairo A. del Rio wrote: Hello list! I was reading the following: https://wiki.contextgarden.net/Style_Alternatives I wanted to figure out how to make a simple module. However, there's a point in the example below which I don't understand % macros=mkvi \startmodule[look] \unprotect \writestatus{loading}{ConTeXt User Module / look} \installnamespace {look} \installcommandhandler \look {look} \look \appendtoks \setuevalue{\currentlook}{\do_look{\currentlook}} \to \everydefinelook \unexpanded\def\do_look#id{% \edef\currentlook{#id}% \dosingleempty\do_do_look% } \def\do_do_look[#parms]#content{% \begingroup \iffirstargument\setupcurrentlook[#parms]\fi %This handles style and color \uselookstyleandcolor\c!style\c!color% #content% \endgroup% } \protect %% \stopmodule What have I to do if, instead of "color" or "style", I want to use another keyword, as "dummy" and get its value? Something like \definelook[lol][dummy = blabla] \lol{words} %e.g. words \emph{blabla} or something similar so "lol" is a word, a number or whatever. I've read something about command handlers, but I'm having a hard time trying to understand them. Thank you in advance! % macros=mkvi \unprotect \installnamespace {look} \installcommandhandler \look {look} \look \appendtoks \setuevalue{\currentlook}{\module_look_do{\currentlook}} \to \everydefinelook \unexpanded\def\module_look_do#id% {\edef\currentlook{#id}% \dosingleempty\module_look_do_do} \def\module_look_do_do[#parms]#content% {\dontleavehmode \begingroup \iffirstargument \setupcurrentlook[#parms]% \fi \doifsomething{\lookparameter{title}} {\begingroup \uselookstyleandcolor\c!headstyle\c!headcolor \lookparameter{title}% \lookparameter{separator}% \endgroup}% \uselookstyleandcolor\c!style\c!color #content% \endgroup} \protect \starttext \setuplook[separator={: }] \definelook[lol][color=red,headcolor=green] \lol[title=blabla]{words} \stoptext ----- 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] Unicode chars and \insertpages (Win7)
On 5/30/2020 6:49 PM, Pablo Rodriguez wrote: On 5/29/20 9:45 AM, Hans Hagen wrote: On 5/28/2020 9:49 PM, Pablo Rodriguez wrote: [...] \insertpages[ξ_file.pdf] Using latest on Linux, it works perfectly fine. On Windows (I’m still on Win7), it doesn’t work unless I replace "ξ" with an ASCII character. Could this be fixed or is it really a limiatation of Windows? It depends on the version and engine. [...] In luametatex things are different. There all windows specific operations have wide-character support, that is, the utf8 goes via utf16 and codepages and such: filenames, environment variables, command line arguments, whatever. Hans, sorry for the late reply. I reported this because I use LuaMetaTeX and I thought Unicode was fully available for Windows. That said: I never use non-ascii non-spacy names ... it's the most portable. This was my first file with an exception to that rule. ah, i see, i need to enable something (i never came to doing that because it's a new feature of the pdf lib) it needs testign but i can't send you a test file because your mail host doesn't accept our mails (bounce) and i'm not going to waste time figuring that out 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] Unicode chars and \insertpages (Win7)
On 5/31/2020 12:16 PM, Pablo Rodriguez wrote: On 5/30/20 7:38 PM, Hans Hagen wrote: On 5/30/2020 6:49 PM, Pablo Rodriguez wrote: On 5/29/20 9:45 AM, Hans Hagen wrote: [...] That said: I never use non-ascii non-spacy names ... it's the most portable. This was my first file with an exception to that rule. ah, i see, i need to enable something (i never came to doing that because it's a new feature of the pdf lib) it needs testign but i can't send you a test file because your mail host doesn't accept our mails (bounce) and i'm not going to waste time figuring that out Sorry, Hans, I don’t know why GMX rejects messages from xs4all.nl (without reading the bounce message). I wonder whether the test file might be sent to the list in this case. you'll have to wait till the update ... i'm not going to send large source files to the list 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] MKIV to LMTX (enumerations)
On 5/31/2020 10:59 AM, Wolfgang Schuster wrote: There is nothing you can do here except waiting for a fix but I noticed I assume you come up with the fix 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] MKIV to LMTX (enumerations)
On 5/31/2020 10:59 AM, Wolfgang Schuster wrote: There is nothing you can do here except waiting for a fix but I noticed the location key for framedtext has a not existing value (no paragraph option exists) in your example. Indeed an engine issue. Fixed in next upload. 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] Numbers inside \sqrt are small
On 6/6/2020 5:45 PM, Otared Kavian wrote: Hi Mikael, Thanks to your message I discovered that in all my recent documents typeset with lmtx the \sqrt has a bug… Indeed the argument under the square root is too small. (The version I have right now is 2020.05.25 23:39, after running sh install.sh). It may be that it is related to the recent changes discussed in anther thread about the square root and friends. I hope Hans will have time to fix the issue… put this in cont-new.mkiv \unexpanded\def\styledrootradical#1#2% {\normalexpanded{\rootradical {\normalunexpanded{#1}}% {\noexpand\triggermathstyle{\number\normalmathstyle}% \normalunexpanded{#2 no updates today 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] Updating lmtx
On 6/7/2020 11:34 AM, Otared Kavian wrote: Hi all, When I run sh install.sh in order to update my installation of LuaMetaTeX, I keep getting version 2020.05.25 23:39. Is this the latest version, or have I an issue with the install script? There have been no updates last week ... there are couple of new mechanisms coming and i'm making the low level token interface a bit more abstract and user friendly so updating now is kind of tricky (and before I do I'd like Wolfgang also has to do some checking as he know what's going on deep down). 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] wiki update - status
On 6/8/2020 12:05 AM, Garulfo wrote: Hi all, New source browser is nice ! Thanks a lot. After level 1 (Main Page / Download and Install / Documentation / Mailing lists), I mostly finished a review of level 2 (and some level 3) pages. Several tweaks all over the place like: - Fonts: full update for newcomers, - Try to be responsive "enough" for smartphone - More homogeneous style / theme - Old Content category and tag pages, update dead links - Layout: - do the todo, like merging content of paper setup + paper sizes pages - complete the flow with imposition - rework the "Further reading section", add PDF links and so on - Programming & DB: - Gather "Calling Lua from TeX" and "Calling TeX from Lua" (section +links) in a same page - Tools: - segregate "core tools" and "additional tools" - highlight existence of mtxrun and context scripts pages - Remove former "manually made links bar" at the top of the pages current structure should be enough now have an easier understanding of the wiki structure. Thanks for your help Taco, Hans, Aditya, Hraban, Tomáš. I hope that this will help to improve the reception of users and their willingness to contribute. I'm really impressed by all the progress that has been made! 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] start/stop executed conditionally on mode ?
On 6/8/2020 9:53 PM, Fabrice L wrote: Le 7 juin 2020 à 23:19, Aditya Mahajan <mailto:adit...@umich.edu>> a écrit : On Sun, 7 Jun 2020, Fabrice L wrote: Dear List, I would like to insert a page using (ideally) start/stop instructions. The problem is that this page should be inserted only in a certain mode. Consulting the mailing list, I thought the following code was working, but it’s not ! The code is executed in the mode as expected, but the following instructions ("Some other text... » in the exemple) is not typeset. Here is a minimal (not working!) example: % \unexpanded\def\StartQuestionsList{ \startmode[ClassRoom] \page[yes] Here are some questions: \blank } \unexpanded\def\StopQuestionsList{ \page[yes] \stopmode } \definestartstop[Questions][ before=\StartQuestionsList, after=\StopQuestionsList ] \startQuestions Question A…. Question B…. \stopQuestions Some other text... % One of the oldest mechanism available ... blocks: \enablemode[classroom] % comment this \defineblock[Question] \doifmode {classroom} { \keepblocks[Question] } \starttext Text A \beginQuestion Question A…. \endQuestion Text B \beginQuestion Question B…. \endQuestion \page \doifnotmode {classroom} { \useblocks[Question] } \stoptext - 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] About vertical typesetting in ConTeXt
On 6/10/2020 7:49 AM, Jairo A. del Rio wrote: Hi list! I'm curious about vertical typesetting in ConTeXt. As far as I know, LuaTeX supports four text directions, but LTL is broken for Manchu script (letters are displayed unjoined in LTL mode) and LuaMetaTeX does not support vertical directions anymore, at least as primitives. I found the following solution: https://tex.stackexchange.com/a/140972/193767 I reproduce the code (in XeLaTeX), just in case |% !TEX TS-program = xelatex\documentclass{scrartcl}\usepackage{fontspec}\newfontfamily{\dcw}[]{DaicingWhite}%\begin{document}\noindentLine above\\% to demonstrate that the lines are being stacked as normal\rotatebox{-90}{%\XeTeXupwardsmode1\\% successive lines will be stacked upwards instead of downwards\begin{minipage}{4em}% this will be the vertical length of the Mongolian section{\dcw% Font: Daicing White1 ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ\\% direct Unicode input of Manchu letters2 ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ }% End font\end{minipage}\XeTeXupwardsmode0 }% End rotatebox\noindentLine underneath \end{document}| and I see XeTeX uses the primitive |\XeTeXupwardsmodeand some other tricks to get the proper display of Manchu text, so maybe MKII can do the magic using XeTeX as an engine. How would one use ConTeXt MKIV for this task? Is it possible to emulate \XeTeXupwardsmode in ConTeXt as a first step? Thank you very much. I admit that I have no clue about what xetex does in that departmentbut you're right that in lmtx the vertical directions are not supported. The main reason is that it didn't really integrates well in the way pages are constructed. Vertical typesetting (afaiks) involves two things: one character wide columns and rotated glyphs. The first can be handled by the macro package and the second by a combination of engine and macro package. Already for quite a while there are the basics for a more advanced vertical subsystem but it's typically one of these things that I explore and then set aside till some users show up who need it and are willing to spend time on discussing and testing intertfaces. After all, most of this tex stuff is kind of a hobby and it's easy to find new interesting experiments. Anyway, you can get some ideas in chapter 6 of: http://www.pragma-ade.com/general/manuals/followingup.pdf but as said, probably no one ever read that. The question isnot so much if it can be done, but how to integrate it. (There's more stuff waiting for being used but we leave that for users to run into and demand support for.) 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] start/stop executed conditionally on mode ?
On 6/10/2020 8:42 AM, Jan Willem Flamma wrote: Dear list, I have seen the use of blocks mechanism with and without a start/stop combination. It is not clear to me in which cases it is required to also include a start/stop combination in this mechanism. \beginquestion \startquestion Question A \stopquestion \endquestion \beginanswer \startanswer Answer A \stopanswer \endanswer the begin/end are used for marking blobs of content (kind of buffers) that can be mixed in, reused, moved, while start/stop is for structure so, begin/end is independent it is an already old mechanism that was made for educational material where one source had to result in teacher, student, examns, extra, materials but it's there to stay ... 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 ___