Re: [NTG-context] [luatex-plain] disappearing math-on node
On 4/5/2014 3:12 PM, Philipp Gesang wrote: · On 4/3/2014 6:29 PM, Dohyun Kim wrote: This is a bug report based on the issue discussed at https://github.com/lualatex/luaotfload/issues/212 \font\tenrm{file:lmroman10-regular.otf:mode=node;script=latn}\tenrm \setbox0\vbox{% x\penalty-1 $a$x$a$ } \unvbox0 \setbox0\lastbox \unhbox0 \end The plain tex code shown above fails with a lua error: luatex-fonts-merged.lua:9616: attempt to index local 'current' (a nil value) My guess is: as math-on (math-off too) is a "discardable" item after a linebreak, the first math-on node has gone away. So the math-on/math-off pair has become broken, by which the behavior of "node.end_of_math" is confused. mtxrun --script plain test.tex runs ok here so i need an example that fails with context or luatex-plain It fails with the luatex-plain format from the minimals as of yesterday and Luatex 4972: error: .../context/tex/texmf-context/tex/context/base/font-ota.lua:144: attempt to index local 'current' (a nil value) . \bye ^^@-\par \vfill \supereject \end l.17 \bye Though the issue arises only in node mode. normally the font callback is called on a hlist and there are always paired math nodes (what is line 9616 in the current beta?) Line 9626 with yesterday’s code. Attached are patches for font-ota.lua and luatex-fonts-otn.lua that guard all invocations of end_of_math() with checks for the subtype. I think that the removed math node is a bad thing so that will change in a next luatex release (i tested a patch but it will not go in the tl release). (Just like the math node at the end of a line it will have zero surround in order to make the backend happy.) In order to avoid the 'current' issue I'll use an overload of end_of_math in the generic code. The real solution is to make the built-in end_of_math more strict (trivial patch ready and tested so that can end up in the next luatex). In the context code i won't intercept it because end_of_math will do that at some point. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Possible bug: definetextbackground and grid layout
On 2014-04-05 17:11, Thangalin wrote: http://wiki.contextgarden.net/TextBackground The first example works. ___ First, thank you for pointing to the documentation. Second, the first example works as presented, but fails when the line \setuplayout[grid=yes] is added and it is run (with MKIV). It can be made to work by removing either that line or one of the following two lines. location=paragraph, topoffset=.5\bodyfontsize,bottomoffset=.5\bodyfontsize, That is my complaint. -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Line numbering in columns broken
Confirmed to work in version 2014.01.03 00:40. ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Possible bug: definetextbackground and grid layout
http://wiki.contextgarden.net/TextBackground The first example works. ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Preparing a weird index.
On 4/5/2014 9:42 PM, john Culleton wrote: I have a customer that uses a publisher that has truly weird requirements. The weirdness is that the locaters are not page numbers but paragraph numbers. And some paragraph numbers start with the prefix 'BO' and others with the chapter number. so a correct sequence would be BO.15 3.2 A finished sequence would be goddess @@ BO.15 3.2 3.5 The sort order has to be letter by letter, as defined in the Chicago Manual of Style. Can Context sort and summarize these locaters? You can use the "BO.15 3.2 3.5" as subentry and it will probably be sorted all right; you can then disable page numbers. This kind of indexing happens in critical editions. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [fontloader] does base mode support combining substitutions?
On 4/5/2014 9:58 PM, Philipp Gesang wrote: · On 4/5/2014 4:37 PM, Philipp Gesang wrote: Hi Hans, when combining e.g. certain number substitutions like onum and pnum or tnum and lnum, node mode seems to work fine. However, those do have value in math mode as well which node mode does not currently support. For comparison, here is a test file: https://bitbucket.org/phg/lua-la-tex-tests/raw/93745dba31e23febb02191c039dea2de743ce77a/cnt-features-8-combined-num.tex Is there a way to define a font with the combination of, say tnum and lnum that will work in math mode? If not, are there plans to implement it in the future? basemode will always be limited because there we create static glyph sets; so. for complex substitutions node mode is the method to use what do you mean with math mode in this case; in math a digit is different from a digit in text mode; i think that if one uses *num digits we're talking text mode I’m just relaying a question of a user who wishes to use those combined lnum+tnum digits in math mode. of course in context we can support whatever we want because we're not bound to rules, but the question is: does it make sense; Ultimately I can’t judge that, the problem description does seem valid though: http://tex.stackexchange.com/q/165238/14066 In math mode characters are organized in categories, e.g. letters are grouped in alphabets. Now imagine that we start applying font features, does that mean that a 'a' should become a small caps 'A'? And when are features applied? Math is a tree and not per se sequential, so how about ligatures? Ok, digits might be something special but even then, just swapping one '1' for another one that is not math aware and then is combined with other math characters (lik ein scripts) can have weird side effects. This is not something generic. So, the only way to deal with that properly is to define a font where certain rendering is replaced by another but in the same slot. Even then one really needs to know if the font is suitable for it. I guess that such oldstyle thingies are mostly for simple math that stays close to text, but even then. In context I'd certainly not deal with that by features directly also because the *num properties are not always implemented the same (we have a mechanism for combining fonts anyway). If someone realy wants features applied to math (maybe after the math is processed, then i can imagine that the node font handler is hooked into the mlist_to_hlist callback so that they are applied afterwards. In any case it's very macro package dependent. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [fontloader] does base mode support combining substitutions?
· > On 4/5/2014 4:37 PM, Philipp Gesang wrote: > > Hi Hans, > > > > when combining e.g. certain number substitutions like onum and > > pnum or tnum and lnum, node mode seems to work fine. However, > > those do have value in math mode as well which node mode does not > > currently support. For comparison, here is a test file: > > > > > > https://bitbucket.org/phg/lua-la-tex-tests/raw/93745dba31e23febb02191c039dea2de743ce77a/cnt-features-8-combined-num.tex > > > > Is there a way to define a font with the combination of, say tnum > > and lnum that will work in math mode? If not, are there plans to > > implement it in the future? > > basemode will always be limited because there we create static glyph > sets; so. for complex substitutions node mode is the method to use > > what do you mean with math mode in this case; in math a digit is > different from a digit in text mode; i think that if one uses *num > digits we're talking text mode I’m just relaying a question of a user who wishes to use those combined lnum+tnum digits in math mode. > of course in context we can support whatever we want because we're not > bound to rules, but the question is: does it make sense; Ultimately I can’t judge that, the problem description does seem valid though: http://tex.stackexchange.com/q/165238/14066 Philipp pgp3Iv5PkWB60.pgp Description: PGP signature ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [fontloader] does base mode support combining substitutions?
On 4/5/2014 4:37 PM, Philipp Gesang wrote: Hi Hans, when combining e.g. certain number substitutions like onum and pnum or tnum and lnum, node mode seems to work fine. However, those do have value in math mode as well which node mode does not currently support. For comparison, here is a test file: https://bitbucket.org/phg/lua-la-tex-tests/raw/93745dba31e23febb02191c039dea2de743ce77a/cnt-features-8-combined-num.tex Is there a way to define a font with the combination of, say tnum and lnum that will work in math mode? If not, are there plans to implement it in the future? basemode will always be limited because there we create static glyph sets; so. for complex substitutions node mode is the method to use what do you mean with math mode in this case; in math a digit is different from a digit in text mode; i think that if one uses *num digits we're talking text mode of course in context we can support whatever we want because we're not bound to rules, but the question is: does it make sense; Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Preparing a weird index.
I have a customer that uses a publisher that has truly weird requirements. The weirdness is that the locaters are not page numbers but paragraph numbers. And some paragraph numbers start with the prefix 'BO' and others with the chapter number. so a correct sequence would be BO.15 3.2 A finished sequence would be goddess @@ BO.15 3.2 3.5 The sort order has to be letter by letter, as defined in the Chicago Manual of Style. Can Context sort and summarize these locaters? I can even change the BO sequence to 0 (zero) and then change it back later on. The key is can Context sort by paragraph number rather than page number for an index. I have looked into Xindy for this job but the learning curve is pretty steep and the documentation pretty opaque. makeindex won't handle decimals for locators. I don't mind doing a little reformatting along the way (I already have for this project) but I don't want to rewrite makeindex or xindy just for this job. -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html PDF e-book: "Create Book Covers with Scribus" available at http://www.booklocker.com/books/4055.html ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] [fontloader] does base mode support combining substitutions?
Hi Hans, when combining e.g. certain number substitutions like onum and pnum or tnum and lnum, node mode seems to work fine. However, those do have value in math mode as well which node mode does not currently support. For comparison, here is a test file: https://bitbucket.org/phg/lua-la-tex-tests/raw/93745dba31e23febb02191c039dea2de743ce77a/cnt-features-8-combined-num.tex Is there a way to define a font with the combination of, say tnum and lnum that will work in math mode? If not, are there plans to implement it in the future? Best regards, Philipp pgp1MFd4ggd88.pgp Description: PGP signature ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metapost: I only need a little bit padding
Hi Jan, Am 05.04.2014 15:48, schrieb Jan Heinen: > \startuseMPgraphic{rotatedHeadline} > % Text "Headline" in a box which is rotated > draw btex {\strut\tfd Headline} etex; setbounds currentpicture to boundingbox currentpicture enlarged 2mm; The following code is based on the boundingbox, so just make it bigger beforehand. > > % rectangle with rounded corners > path p; > p := llcorner currentpicture+(0mm,3mm){down}..{right}llcorner > currentpicture+(3mm,0mm)-- > lrcorner currentpicture+(-3mm,0mm){right}..{up}lrcorner > currentpicture+(0mm,3mm)-- > urcorner currentpicture+(0mm,-3mm){up}..{left}urcorner > currentpicture+(-3mm,0mm)-- > ulcorner currentpicture+(3mm,0mm){left}..{down}ulcorner > currentpicture+(0mm,-3mm)--cycle; > pickup pencircle scaled 0.5pt; > clip currentpicture to p; > draw p; > currentpicture := currentpicture rotated 90; > \stopuseMPgraphic > > > \starttext > \useMPgraphic{rotatedHeadline} > \stoptext Best wishes, Peter ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Metapost: I only need a little bit padding
I want to have a rectangle (box) with a word in it (i.g. "Headline). And all should be rotated 90°. Below I found a solution I am quite happy with. How can I get a little bit more padding around the text in the box? You can copy the example to http://live.contextgarden.net/ - it is running: \startuseMPgraphic{rotatedHeadline} % Text "Headline" in a box which is rotated draw btex {\strut\tfd Headline} etex; % rectangle with rounded corners path p; p := llcorner currentpicture+(0mm,3mm){down}..{right}llcorner currentpicture+(3mm,0mm)-- lrcorner currentpicture+(-3mm,0mm){right}..{up}lrcorner currentpicture+(0mm,3mm)-- urcorner currentpicture+(0mm,-3mm){up}..{left}urcorner currentpicture+(-3mm,0mm)-- ulcorner currentpicture+(3mm,0mm){left}..{down}ulcorner currentpicture+(0mm,-3mm)--cycle; pickup pencircle scaled 0.5pt; clip currentpicture to p; draw p; currentpicture := currentpicture rotated 90; \stopuseMPgraphic \starttext \useMPgraphic{rotatedHeadline} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [luatex-plain] disappearing math-on node
· > On 4/3/2014 6:29 PM, Dohyun Kim wrote: > > This is a bug report based on the issue discussed at > > https://github.com/lualatex/luaotfload/issues/212 > > > > \font\tenrm{file:lmroman10-regular.otf:mode=node;script=latn}\tenrm > > \setbox0\vbox{% > >x\penalty-1 > >$a$x$a$ > > } > > \unvbox0 > > \setbox0\lastbox > > \unhbox0 > > \end > > > > The plain tex code shown above fails with a lua error: > > luatex-fonts-merged.lua:9616: attempt to index local 'current' (a nil value) > > > > My guess is: as math-on (math-off too) is a "discardable" item after a > > linebreak, the first math-on node has gone away. So the > > math-on/math-off pair has become broken, by which the behavior of > > "node.end_of_math" is confused. > > mtxrun --script plain test.tex > > runs ok here so i need an example that fails with context or luatex-plain It fails with the luatex-plain format from the minimals as of yesterday and Luatex 4972: error: .../context/tex/texmf-context/tex/context/base/font-ota.lua:144: attempt to index local 'current' (a nil value) . \bye ^^@-\par \vfill \supereject \end l.17 \bye Though the issue arises only in node mode. > normally the font callback is called on a hlist and there are always > paired math nodes > > (what is line 9616 in the current beta?) Line 9626 with yesterday’s code. Attached are patches for font-ota.lua and luatex-fonts-otn.lua that guard all invocations of end_of_math() with checks for the subtype. Best, Philipp --- luatex-fonts-otn.lua.orig 2014-04-05 15:02:34.711828352 +0200 +++ luatex-fonts-otn.lua 2014-04-05 15:02:36.955171990 +0200 @@ -2375,7 +2375,7 @@ end end start = start.next -elseif id == math_code then +elseif id == math_code and start.subtype == 0 then start = end_of_math(start).next else start = start.next @@ -2567,7 +2567,7 @@ end end start = start.next -elseif id == math_code then +elseif id == math_code and start.subtype == 0 then start = end_of_math(start).next else start = start.next --- font-ota.lua.orig 2014-04-05 14:55:53.789969704 +0200 +++ font-ota.lua 2014-04-05 14:59:32.487654509 +0200 @@ -137,7 +137,7 @@ last[a_state] = s_fina end first, last, n = nil, nil, 0 -if id == math_code then +if id == math_code and current.subtype == 0 then current = end_of_math(current) end end @@ -423,7 +423,7 @@ if first or last then first, last = finish(first,last) end -if id == math_code then +if id == math_code and current.subtype == 0 then current = end_of_math(current) end end pgpCSlyjCsqyV.pgp Description: PGP signature ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bugs in linenumbering ?
Le Thu, 03 Apr 2014 23:02:41 -0400, Rik Kabel a écrit : > On 2014-04-03 20:15, Stéphane Goujet wrote: > >Here is what I have done so far. Not too bad a result, but there > > are still 2 main problems: > > -- when the quotation begins after the beginning of the paragraph, > > the whole paragraph is affected by *narrower*; > > -- when the text continues after the end of the quotation, it is > > impossible to insert the *\par* that, as Hans noticed and told us, > > is needed to have *narrower* work, so it is as if there was no > > *narrower* and the whole line numbering of the paragraph is messed > > up. > That is the big one for me. As the example png I posted shows, I need > to have support for multiple quoted sections and unquoted text at the > end. Same for me. I understand that it makes little sense (or perhaps no sense at all) for line numbering to deal with such situations; this is why in first post concerning our quotation matter, I was asking whether linenumbering would be the way to go or not. Goodbye, Stéphane. ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] links to external documents
Hi, Hans-- The LinkTest file does not work with either ConTeXt ver: 2014.04.04 or my backup installation, ConTeXt ver: 2014.02.14. Do I things properly encoded? Alan On Thu, Apr 3, 2014 at 10:49 AM, Alan Bowen wrote: > Hi, Hans-- > > The new beta now processes without interruption but does not actually > collect and display the reference. > > All I get right now is: > > page note > > rather than > > page 1 note 1 > > The setup (revised)-- > > > %testA.tex > > \starttext > > > text text.\reference[firstpage]{} > > > text text.\footnote[fnote]{A note.} > > > \stoptext > > > %LinkTest.tex > > \setupinteraction[state=start] > > > \useexternaldocument[testA.tex] > > \usereferences[testA.tex] > > > \starttext > > > \at{page}[testA::firstpage] > > > \in{note}[testA::fnote] > > > \stoptext > > > Alan > > > > > On Thu, Apr 3, 2014 at 6:25 AM, Alan Bowen wrote: > >> Thanks, Hans--for the new beta *and* the tip about the filename. >> >> Alan >> >> >> On Thu, Apr 3, 2014 at 4:47 AM, Hans Hagen wrote: >> >>> On 4/2/2014 9:11 PM, Alan Bowen wrote: >>> I am exploring the feasibility of presenting two interacting PDF files side by side. Thus far my experiments with \usereferences have managed only to produce a lua error: >>> >>> fixed in next beta (there can be more issues for a while as i'm cleanign >>> up that code) >>> >>> btw, no .tex in: >>> >>> \at{page}[testA::firstpage] >>> >>> >>> >>> >>> -- >>> >>> - >>> Hans Hagen | PRAGMA ADE >>> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >>> tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com >>> | 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://tex.aanhet.net >>> archive : http://foundry.supelec.fr/projects/contextrev/ >>> wiki : http://contextgarden.net >>> >>> ___ >>> >> >> > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___