Re: [NTG-context] XML/MathML namespace handling bug
> in x-math.mkiv search for > >\startxmlsetups mml:apply > > and replace this bit: > > \edef\mmlapplyaction{\xmlfilter{#1}{/*/tag()}} > \doifelsesetups {mml:apply:mml:\mmlapplyaction} { > \xmlsetup{#1}{mml:apply:mml:\mmlapplyaction} > } { > \xmlsetup{#1}{mml:\mmlapplyaction} > } > > (btw, isn't content mathml more fun than presentation mathml?) Works nicely. For I also had to change this part from name() to tag(): \startxmlsetups mml:relation \edef\mmlapplyaction{\xmlfilter{#1}{/*/tag()}} \MMLcreset \xmlsetup{#1}{mml:relation:\xmlattdef{#1}{align}{\MMLrelationalign}} \stopxmlsetups ___ 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] metafun / patterns
On Thu, 25 Mar 2021, Hans Hagen wrote: > Hi, > > As I'm still in metafun (and svg) mode I decided to support patterns > (that are already supported at the tex end) also in metafun. As there > has never been demands I suppose it's not that interesting but it sort > of fits in. > > There are some tricky aspectx involved so the interface might evolve a > bit (some more control options) but here are some examples anyway: This is nice! I have used something like this in the past (but with "manual clipping", which is always cumbersome for irregular shapes). Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] injectors not working in LMTX?
Hans, the following sample (from https://pragma-ade.com/general/manuals/workflows-mkiv.pdf#search=resort) doesn’t get right output with LMTX (current latest from 2021.03.25 14:04): \showinjector \setinjector[register][3][\column] \setinjector[list][2][{\blank[3*big]}] \starttext \placelist[section][criterium=text] \blank[3*big] \placeregister[index][criterium=text] \page \startsection[title=Alpha] first \index{first} \startsection[title=Beta] second \index{second} \startsection[title=Gamma] third \index{third} \startsection[title=Delta] fourth \index{fourth} \stoptext MkIV compiles this source fine, so I think this might be a bug. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] metafun / patterns
Sorry for the noise, my fault: Thunderbird replaced some semicolon combinations with emojis, so they were missing when I copied and pasted them in a source file. Massi Il 25/03/21 15:14, mf ha scritto: Il 25/03/21 14:11, Hans Hagen ha scritto: \startMPpage[offset=1cm] draw (fullcircle scaled 5cm shifted (0cm,0cm)) withpattern image (fill fullcircle scaled 1cm withcolor "darkblue" ;) withpatternscale (1/10,1/10) ; draw (fullcircle scaled 5cm shifted (5cm,0cm)) withpattern image (fill fullcircle scaled 5mm withcolor "darkred" ;) withpatternscale (1/20,1/20) ; draw (fullcircle scaled 5cm shifted (10cm,0cm)) withpattern image (fill fullcircle scaled 5mm withcolor "darkgreen" ;) withpatternscale (1/40,1/40) ; draw (fullcircle scaled 5cm shifted (0cm,5cm)) withpattern image (fill fullcircle scaled 1cm withcolor "darkcyan" ;) withpatternscale (1/10,1/20) ; draw (fullcircle scaled 5cm shifted (5cm,5cm)) withpattern image (fill fullcircle scaled 5mm withcolor "darkmagenta" ;) withpatternscale (1/20,1/40) ; draw (fullcircle scaled 5cm shifted (10cm,5cm)) withpattern image (fill fullcircle scaled 5mm withcolor "darkyellow" ;) withpatternscale (1/40,1/80) ; \stopMPpage \startMPpage[offset=1cm] fill fullcircle scaled 11cm withcolor "darkyellow" ; draw fullcircle scaled 10cm withpattern image (fill fullcircle scaled 1cm withcolor "darkblue" ;) ; draw fulldiamond scaled 8cm withpattern image (fill fulldiamond scaled 4mm withcolor "darkgreen" ;) rotated 15 ; draw fulltriangle scaled 9cm withpattern image (fill fulltriangle scaled 3mm withcolor "white" ;) rotated 45 ; draw fullcircle scaled 10cm withpattern image (draw textext("!") withcolor "middlegray" ;) rotated 45 ; draw fullcircle scaled 10cm withpen pencircle scaled 1mm withcolor "darkgray" ; \stopMPpage Those first two pages appear 20x20mm and blank. Page 3 and 4 show patterns instead. Massi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] metafun / patterns
Il 25/03/21 14:11, Hans Hagen ha scritto: \startMPpage[offset=1cm] draw (fullcircle scaled 5cm shifted (0cm,0cm)) withpattern image (fill fullcircle scaled 1cm withcolor "darkblue" ;) withpatternscale (1/10,1/10) ; draw (fullcircle scaled 5cm shifted (5cm,0cm)) withpattern image (fill fullcircle scaled 5mm withcolor "darkred" ;) withpatternscale (1/20,1/20) ; draw (fullcircle scaled 5cm shifted (10cm,0cm)) withpattern image (fill fullcircle scaled 5mm withcolor "darkgreen" ;) withpatternscale (1/40,1/40) ; draw (fullcircle scaled 5cm shifted (0cm,5cm)) withpattern image (fill fullcircle scaled 1cm withcolor "darkcyan" ;) withpatternscale (1/10,1/20) ; draw (fullcircle scaled 5cm shifted (5cm,5cm)) withpattern image (fill fullcircle scaled 5mm withcolor "darkmagenta" ;) withpatternscale (1/20,1/40) ; draw (fullcircle scaled 5cm shifted (10cm,5cm)) withpattern image (fill fullcircle scaled 5mm withcolor "darkyellow" ;) withpatternscale (1/40,1/80) ; \stopMPpage \startMPpage[offset=1cm] fill fullcircle scaled 11cm withcolor "darkyellow" ; draw fullcircle scaled 10cm withpattern image (fill fullcircle scaled 1cm withcolor "darkblue" ;) ; draw fulldiamond scaled 8cm withpattern image (fill fulldiamond scaled 4mm withcolor "darkgreen" ;) rotated 15 ; draw fulltriangle scaled 9cm withpattern image (fill fulltriangle scaled 3mm withcolor "white" ;) rotated 45 ; draw fullcircle scaled 10cm withpattern image (draw textext("!") withcolor "middlegray" ;) rotated 45 ; draw fullcircle scaled 10cm withpen pencircle scaled 1mm withcolor "darkgray" ; \stopMPpage Those first two pages appear 20x20mm and blank. Page 3 and 4 show patterns instead. Massi ___ 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] PDF custom properties
Many thanks, Pablo. That does indeed help. I now have the metadata that I want. And, as I have discovered, I will need to get PDFPen Pro to access more than just the Document info panel. Until then, I will rely on Acrobat Reader to ensure that it is available. Very best, Alan On Wed, Mar 24, 2021 at 2:57 PM Pablo Rodriguez wrote: > On 3/23/21 10:12 PM, Alan Bowen wrote: > > Hi, Pablo— > > > > My inquiry concerns the possibility of getting *custom* properties that > > I could specify using \setupinteraction in a way that would output in > > the PDF file (under Document Info or Document Properties) as: > > > > Editor (not Author) editors names > > > > Title title of work > > Subtitle (not Subject)the subtitle of the work > > Subject the subject of the work > > Keywordkeywords > > > > See https://wiki.contextgarden.net/Interaction PDF Header and Custom > > Properties. > > Hi Alan, > > it seems that the key field cannot contain spaces. So it should read: > > \pdfbackendsetinfo{key}{ Text } > > Otherwise, Acrobat Reader (both latest DC in Windows and version 9.5 in > Linux) cannot open the document. > > And the information is displayed in the custom tab from document > properties, not in the description tab. > > Here is an image of the dialog: > > > https://community.adobe.com/legacyfs/online/1160244_PDF%20Document%20Properties%20Example.JPG > > Acrobat Reader version 9.5 doesn’t contain that tab and it cannot > display the field. > > I hope it helps now, > > Pablo > -- > http://www.ousia.tk > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] metafun / patterns
Hi, As I'm still in metafun (and svg) mode I decided to support patterns (that are already supported at the tex end) also in metafun. As there has never been demands I suppose it's not that interesting but it sort of fits in. There are some tricky aspectx involved so the interface might evolve a bit (some more control options) but here are some examples anyway: \starttext \startMPpage[offset=1cm] draw (fullcircle scaled 5cm shifted (0cm,0cm)) withpattern image (fill fullcircle scaled 1cm withcolor "darkblue" ;) withpatternscale (1/10,1/10) ; draw (fullcircle scaled 5cm shifted (5cm,0cm)) withpattern image (fill fullcircle scaled 5mm withcolor "darkred" ;) withpatternscale (1/20,1/20) ; draw (fullcircle scaled 5cm shifted (10cm,0cm)) withpattern image (fill fullcircle scaled 5mm withcolor "darkgreen" ;) withpatternscale (1/40,1/40) ; draw (fullcircle scaled 5cm shifted (0cm,5cm)) withpattern image (fill fullcircle scaled 1cm withcolor "darkcyan" ;) withpatternscale (1/10,1/20) ; draw (fullcircle scaled 5cm shifted (5cm,5cm)) withpattern image (fill fullcircle scaled 5mm withcolor "darkmagenta" ;) withpatternscale (1/20,1/40) ; draw (fullcircle scaled 5cm shifted (10cm,5cm)) withpattern image (fill fullcircle scaled 5mm withcolor "darkyellow" ;) withpatternscale (1/40,1/80) ; \stopMPpage \startMPpage[offset=1cm] fill fullcircle scaled 11cm withcolor "darkyellow" ; draw fullcircle scaled 10cm withpattern image (fill fullcircle scaled 1cm withcolor "darkblue" ;) ; draw fulldiamond scaled 8cm withpattern image (fill fulldiamond scaled 4mm withcolor "darkgreen" ;) rotated 15 ; draw fulltriangle scaled 9cm withpattern image (fill fulltriangle scaled 3mm withcolor "white" ;) rotated 45 ; draw fullcircle scaled 10cm withpattern image (draw textext("!") withcolor "middlegray" ;) rotated 45 ; draw fullcircle scaled 10cm withpen pencircle scaled 1mm withcolor "darkgray" ; \stopMPpage \startMPpage[instance=doublefun] draw closedcurve(unitsquare xyscaled (200,200) shifted (0,-200)) withpattern image (fill closedcurve((fullcircle scaled 40 shifted (25,-25))) withcolor "darkgray" withopacity .5) withpatternscale (1,1) ; draw closedcurve(unitsquare xyscaled (200,200) shifted (0,-200)) withpattern image (fill closedcurve((fullcircle scaled 40 shifted (25,-25))) withcolor "darkred" withopacity .5) withpatternscale (1/2,1/2) ; draw closedcurve(unitsquare xyscaled (200,200) shifted (0,-200)) withpattern image (fill closedcurve((fullcircle scaled 40 shifted (25,-25))) withcolor "darkgreen" withopacity .5) withpatternscale (1/3,1/3) ; draw closedcurve(unitsquare xyscaled (200,200) shifted (0,-200)) withpattern image (fill closedcurve((fullcircle scaled 40 shifted (25,-25))) withcolor "darkblue" withopacity .5) withpatternscale (1/4,1/4) ; \stopMPpage % \startTEXpage \page \startMPcode{doublefun} draw closedcurve(unitsquare xyscaled (200,200) shifted (0,-400)) withpattern image (fill closedcurve((fullcircle scaled 40 shifted (25,-25 withpatternscale (1/8,1/8) ; \stopMPcode \blank \startMPcode{doublefun} draw closedcurve(unitsquare xyscaled (200,200) shifted (0,-400)) withpattern image (fill closedcurve((fullcircle scaled 40 shifted (25,-25 withpatternfloat true withpatternscale (1/8,1/8) ; \stopMPcode \page % \stopTEXpage % \startMPpage[instance=doublefun] % draw closedcurve(unitsquare xyscaled (200,200) shifted (0,-200)) % withpattern image ( fill closedcurve(unitsquare xyscaled (50,50) shifted (0,-50)) withcolor svgcolor(0.529,0.808,0.922) ; fill closedcurve(unitsquare xyscaled (25,25) shifted (0,-25)) withshademethod "linear" % withshadecenteronefraction (0,1) % withshadecentertwofraction (0,0) % withshadestep ( withshadefraction 0.05 withshadecolors (svgcolor(1,0,0),svgcolor(1,0,0)) ) % withshadestep ( withshadefraction 0.95 withshadecolors (svgcolor(1,0,0),svgcolor(1,0.5,0)) ) ; fill closedcurve((fullcircle scaled 40 shifted (25,-25))) withshademethod "linear" % withshadestep ( withshadefraction 0.05 withshadecolors (svggray(1),svggray(1)) ) % withshadestep ( withshadefraction 0.95 withshadecolors (svggray(1),svgcolor(0,0,1)) ) withopacity 0.5 ; ) % withpatternscale(1/4,1/4) % ; % \stopMPpage % \startTEXpage % \externalfigure[test.svg][conversion=mp,xobject=no] % \stopTEXpage \stoptext - Hans Hagen | PRAGMA A
[NTG-context] Grid typesetting, blockquotes in smaller font across pagebreaks
Hi, I'm playing around with grid typesetting. Consider the following example: -- \setuppapersize[A5][A5] \setupbodyfont[10pt] \setuplayout[grid=yes] \showgrid \setupdelimitedtext[blockquote] [ style=\tfx, %style=\tfx\setupinterlinespace, % this breaks grid snapping spacebefore=halfline, indentnext=no, leftmargin=no, rightmargin=no, ] \starttext \dorecurse{5}{ \dorecurse{5}{Some text on a grid. } \startblockquote \dorecurse{10}{A quotation in a smaller font. } \stopblockquote \dorecurse{5}{This should be on the grid again. }} \stoptext -- With style=\tfx it kind of works as long as the quotations don't run over page boundaries. With style=\tfx\setupinterlinespace paragraphs after quotations don't snap back to the grid. Spacebefore=line is somewhat better, but also only if I use \tfx without \setupinterlinespace. Any hints? (But maybe I'm approaching the problem from the wrong direction anyway... I need the have pages end consistently at the same baseline, and I thought grid typesetting might be an option here. But maybe that was a wrong assumption in the first place... Or there are better solutions.) Best, Denis ___ 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] Summing up ligature prevention tests
On 3/24/2021 11:43 PM, denis.ma...@ub.unibe.ch wrote: So, what's the general recommendation? Which approach is the best in your opinion? (In case it's the \replaceword approach: do you think you'll have time to look into this?) I've seen in an older thread that the best way to deal with this would be in the hyphenator. What do you think about this now, a couple of years later? And, while we're at it: how do you deal with words like "begrifflich" where you'll want the ff ligature, but not the ffl ligature. I've tried this \replaceword[ligs][begrifflich][begri{ffl}ich] But this breaks the ligature completely. \replaceword[ligs][begrifflich][begrif{fl}ich] is not correct either (doesn't do anything). Or with exceptions: \startexceptions[de] begri{ff-}{l}{ffl}(ff\zwnj l)ich \stopexceptions But that also breaks the ligature completely. only in lmtx ... i'll check it (probably some interference with compact fonts mode) 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] Summing up ligature prevention tests
> -Ursprüngliche Nachricht- > Von: Hans Hagen > Gesendet: Donnerstag, 25. März 2021 11:02 > An: Maier, Denis Christian (UB) ; ntg- > cont...@ntg.nl > Betreff: Re: AW: [NTG-context] Summing up ligature prevention tests > > On 3/24/2021 11:43 PM, denis.ma...@ub.unibe.ch wrote: > > So, what's the general recommendation? Which approach is the best in > > your opinion? (In case it's the \replaceword approach: do you think > > you'll have time to look into this?) > > > > I've seen in an older thread that the best way to deal with this would be in > the hyphenator. What do you think about this now, a couple of years later? > > > > And, while we're at it: how do you deal with words like "begrifflich" where > you'll want the ff ligature, but not the ffl ligature. > > I've tried this > > \replaceword[ligs][begrifflich][begri{ffl}ich] > > But this breaks the ligature completely. > > \replaceword[ligs][begrifflich][begrif{fl}ich] is not correct either > > (doesn't do > anything). > > > > Or with exceptions: > > \startexceptions[de] > > begri{ff-}{l}{ffl}(ff\zwnj l)ich > > \stopexceptions > > > > But that also breaks the ligature completely. > Todays secret: > > \starttext > > \registerhyphenationpattern[nl][e1ë/e=e] > \registerhyphenationpattern[nl][a9atje./a=t,1,3] > \registerhyphenationpattern[en][eigh1tee/t=t,5,1] > \registerhyphenationpattern[de][c1k/k=k] > \registerhyphenationpattern[de][schif1f/ff=f,5,2] > > \starthyphenation[traditional] > \starttabulate[|||] > \NC reëel \NC \language[nl]\hyphenatedcoloredword{reëel} > \NC \NR > \NC omaatje\NC \language[nl]\hyphenatedcoloredword{omaatje} > \NC \NR > \NC eighteen \NC > \language[en]\hyphenatedcoloredword{eighteen} \NC \NR > \NC Zucker \NC \language[de]\hyphenatedcoloredword{Zucker} > \NC \NR > \NC Schiffahrt \NC > \language[de]\hyphenatedcoloredword{Schiffahrt} \NC \NR > \stoptabulate > \stophyphenation > > \stoptext > > I think only Pablo ever used this variant. And yes, it's actually documented > in > a manual. But it's old code thay I might want to update to be more lmtx-ish. > > Hans Yes, that's in the "languages" manual. But I don't understand how this will help with the ligatures? \registerhyphenationpattern[de][.begriff1l/ff=l,6,3] Gives me correct hyphenation of begrifflich, but has no effect on ligatures (see below). Denis \starttext \registerhyphenationpattern[de][.begriff1l/ff=l,6,3] \starthyphenation[traditional] \language[de] begrifflich \hyphenatedcoloredword{begrifflich} \stophyphenation \language[de] begrifflich \hyphenatedcoloredword{begrifflich} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Summing up ligature prevention tests
On 3/24/2021 11:43 PM, denis.ma...@ub.unibe.ch wrote: So, what's the general recommendation? Which approach is the best in your opinion? (In case it's the \replaceword approach: do you think you'll have time to look into this?) I've seen in an older thread that the best way to deal with this would be in the hyphenator. What do you think about this now, a couple of years later? And, while we're at it: how do you deal with words like "begrifflich" where you'll want the ff ligature, but not the ffl ligature. I've tried this \replaceword[ligs][begrifflich][begri{ffl}ich] But this breaks the ligature completely. \replaceword[ligs][begrifflich][begrif{fl}ich] is not correct either (doesn't do anything). Or with exceptions: \startexceptions[de] begri{ff-}{l}{ffl}(ff\zwnj l)ich \stopexceptions But that also breaks the ligature completely. Todays secret: \starttext \registerhyphenationpattern[nl][e1ë/e=e] \registerhyphenationpattern[nl][a9atje./a=t,1,3] \registerhyphenationpattern[en][eigh1tee/t=t,5,1] \registerhyphenationpattern[de][c1k/k=k] \registerhyphenationpattern[de][schif1f/ff=f,5,2] \starthyphenation[traditional] \starttabulate[|||] \NC reëel \NC \language[nl]\hyphenatedcoloredword{reëel} \NC \NR \NC omaatje\NC \language[nl]\hyphenatedcoloredword{omaatje} \NC \NR \NC eighteen \NC \language[en]\hyphenatedcoloredword{eighteen} \NC \NR \NC Zucker \NC \language[de]\hyphenatedcoloredword{Zucker} \NC \NR \NC Schiffahrt \NC \language[de]\hyphenatedcoloredword{Schiffahrt} \NC \NR \stoptabulate \stophyphenation \stoptext I think only Pablo ever used this variant. And yes, it's actually documented in a manual. But it's old code thay I might want to update to be more lmtx-ish. 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 ___