Re: [NTG-context] optical bounds with hanging diacritics
On 11/24/2018 10:02 PM, Pablo Rodriguez wrote: Hans, I added lfbd values for GFS Didot (attached) to get hanging diacritics in Greek. The attached PDF document is the optput from the following code: \showframe \setuplayout[topspace=1cm, height=middle, footer=0cm, header=0cm] \definefontfeature[default][default] [protrusion=quality, opbd=yes, script=grek] \definefontfamily[mainface][rm][GFS Didot] \setupbodyfont[mainface, 325pt] \setupalign[hanging] \starttext Α\\Ἀ\\Α\\Ἁ\\Α\\Ἂ\\Α\\Ἃ\\Α\\Ἄ\\Α\\Ἅ\\Α\\Ἆ\\Α\\Ἇ Ἐ\\Ε\\Ἑ\\Ε\\Ἒ\\Ε\\Ἓ\\Ε\\Ἔ\\Ε\\Ἕ\\Ε Ἠ\\Η\\Ἡ\\Η\\Ἢ\\Η\\Ἣ\\Η\\Ἤ\\Η\\Ἥ\\Η\\Ἦ\\Η\\Ἧ\\Η Ἰ\\Ι\\Ἱ\\Ι\\Ἲ\\Ι\\Ἳ\\Ι\\Ἴ\\Ι\\Ἵ\\Ι\\Ἶ\\Ι\\Ἷ\\Ι Ὀ\\Ο\\Ὁ\\Ο\\Ὂ\\Ο\\Ὃ\\Ο\\Ὄ\\Ο\\Ὅ\\Ο Ρ\\Ῥ Ὑ\\Υ\\Ὓ\\Υ\\Ὕ\\Υ\\Ὗ\\Υ Ὠ\\Ω\\Ὡ\\Ω\\Ὢ\\Ω\\Ὣ\\Ω\\Ὤ\\Ω\\Ὥ\\Ω\\Ὦ\\Ω\\Ὧ\\Ω \stoptext BTW, to get pure lfbd values, I had to replace line 361 from font-imp-quality lua with: local p = d/1000 two issues: - no 1000 but units - we need to be able to go less extreme, so we keep factor so something local p = lfactor * d/units Raw lfbd and rtbd values from the font could be set with protrusion=opentype (or a similar option). I hope it is clear now why raw values from the font are needed. fwiw it looks a bit too excessive to me (i'm not sure if graphical elements like those accents which are part of the character needs that much protrusion) Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- - 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] Grammar to parse TeX input?
On 11/26/2018 3:19 PM, Joseph Canedo wrote: \startluacode function zzz_function(text) - How to process ‘text’ to get bits which are macros, groups etc… ? Eventually expanded ? end \stopluacode \definebuffer[ZZZBuffer] \def\StartZZZ{\grabbufferdata[ZZZBuffer][StartZZZ][StopZZZ]} \def\StopZZZ{\ctxlua{zzz_function(buffers.getcontent('ZZZBuffer'))}} \StartZZZ \input knuth \StopZZZ context.processbuffer { "ZZZBuffer" } - 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] Problems with setups module
Hi Tommaso, I sent a fix to the dev list and the problem should be fixed in a new beta. Wolfgang Tommaso Gordini schrieb am 26.11.18 um 11:08: Hi everyone. The following code gives different results by commenting and decommending the indicated lines. Could it be a problem with the setups module? Thanks in advance Tommy \usemodule [setups] \starttext %\startbuffer %\framed [width=3cm,height=1cm] {testo} %\stopbuffer % %\typebuffer %\getbuffer \cmdfullsetup [setuppapersize] \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Grammar to parse TeX input?
Dear list, I use a buffer to make some text processing. That text contains TeX macros etc… and I’d like to know if there is some feature in lua to parse the text to extract bits which macros, normal text etc… ? Thanks Best regards Joseph Example of pseudo MWE follows. \startluacode function zzz_function(text) - How to process ‘text’ to get bits which are macros, groups etc… ? Eventually expanded ? end \stopluacode \definebuffer[ZZZBuffer] \def\StartZZZ{\grabbufferdata[ZZZBuffer][StartZZZ][StopZZZ]} \def\StopZZZ{\ctxlua{zzz_function(buffers.getcontent('ZZZBuffer'))}} \StartZZZ \input knuth \StopZZZ ___ 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] Problems with setups module
Sorry, the correct code is the following: \usemodule [setups] \starttext \startbuffer \framed [width=3cm,height=1cm] {testo} \stopbuffer \typebuffer \getbuffer \cmdfullsetup [setuppapersize] \startbuffer[foo] \framed [width=3cm,height=1cm] {testo} \stopbuffer \typebuffer[foo] \getbuffer[foo] \cmdfullsetup [setuppapersize] \stoptext Il giorno lun 26 nov 2018 alle ore 11:08 Tommaso Gordini < illinguista1...@gmail.com> ha scritto: > Hi everyone. > > The following code gives different results by commenting and decommending > the indicated lines. > > Could it be a problem with the setups module? > > Thanks in advance > Tommy > > \usemodule [setups] > > > \starttext > > > %\startbuffer > > %\framed [width=3cm,height=1cm] {testo} > > %\stopbuffer > > % > > %\typebuffer > > %\getbuffer > > > \cmdfullsetup [setuppapersize] > > > \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 ___
[NTG-context] Problems with setups module
Hi everyone. The following code gives different results by commenting and decommending the indicated lines. Could it be a problem with the setups module? Thanks in advance Tommy \usemodule [setups] \starttext %\startbuffer %\framed [width=3cm,height=1cm] {testo} %\stopbuffer % %\typebuffer %\getbuffer \cmdfullsetup [setuppapersize] \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] Subformula numbering
On Mon, Nov 26, 2018 at 8:40 AM adrien Licari wrote: > Hi everyone, > > I can't get cases subformula to work properly. My MWE, inspired from the > wiki and the My Way "Using \startalign and friends" by Aditya Mahajan, is : > > \starttext\placeformula\startformula > \startcases > \NC x = a \NR[+] > \NC y = b \NR[+] > \stopcases\stopformula\stoptext > > This only prints (2) on the right of the whole cases system. If I use > \placesubformula, the behavior remains exactly the same. It also yields > the same output with live ConTeXt. The ConTeXt version I am using is > 2018.01.19 13:42 > > Has there been a change in the behavior since the documents were written ? > I asked on stackexchange, and since the document is 12 years old and the > wiki consistent with it, they suggested me to ask the mailing list. > Thanks in advance, > > \starttext \startbuffer \placeformula \startformula \startcases \NC 2 \NC $ y > 0 $ \NR \NC 7 \NC $ x = 7 $ \NR[+] \NC 4 \NC otherwise \NR \stopcases \stopformula \stopbuffer \typebuffer \getbuffer \startbuffer \placeformula \startformula x \startcases \NC 2 \NC $ y > 0 $ \NR[+] \NC 7 \NC $ x = 7 $ \NR \NC 4 \NC otherwise \NR \stopcases \stopformula \stopbuffer \typebuffer \getbuffer \startbuffer \placeformula \startformula \startcases \NC 2 \NC $ y > 0 $ \NR \NC 7 \NC $ x = 7 $ \NR \NC 4 \NC otherwise \NR \stopcases \stopformula \stopbuffer \typebuffer \getbuffer \startbuffer \placeformula \startformula x \startcases \NC 2 \NC $ y > 0 $ \NR \NC 7 \NC $ x = 7 $ \NR \NC 4 \NC otherwise \NR \stopcases \stopformula \stopbuffer \typebuffer \getbuffer %% your example \placeformula \startformula \startcases \NC x = a \NR[+] \NC y = b \NR[+] \stopcases \stopformula \stoptext What I see is (more or less) 1 \placeformula \startformula \startcases \NC 2 \NC $ y > 0 $ \NR \NC 7 \NC $ x = 7 $ \NR[+] \NC 4 \NC otherwise \NR \stopcases \stopformula {2 푦 > 0 ⎧ ⎨ 7 푥=7(1) { ⎩ 4 otherwise \placeformula \startformula x \startcases \NC 2 \NC $ y > 0 $ \NR[+] \NC 7 \NC $ x = 7 $ \NR \NC 4 \NC otherwise \NR \stopcases \stopformula {2 푦 > 0 ⎧ 푥⎨7 푥 = 7 (2) { ⎩ 4 otherwise \placeformula \startformula \startcases \NC 2 \NC $ y > 0 $ \NR \NC 7 \NC $ x = 7 $ \NR \NC 4 \NC otherwise \NR \stopcases \stopformula {2 푦 > 0 ⎧ ⎨ 7 푥=7(3) { ⎩ 4 otherwise \placeformula \startformula x \startcases \NC 2 \NC $ y > 0 $ \NR \NC 7 \NC $ x = 7 $ \NR \NC 4 \NC otherwise \NR \stopcases \stopformula {2 푦 > 0 ⎧ 푥⎨7 푥 = 7 (4) { ⎩ 4 otherwise 푥=푎 { (6) 푦=푏 -- luigi ___ 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 ___