Re: [NTG-context] Metafun hexagons aren't hexagons
On Wed, 20 Jul 2022 15:26:53 -0600 Max Chernoff via ntg-context wrote: > The recently added Metafun hexagons seem to be producing octagons > instead: > >\startMPpage >fill fullhexagon scaled 100; >draw unithexagon scaled 50 withcolor white; >\stopMPpage Of course, for an MP circle is defined by 8 points. draw textext(decimal length unitcircle) ; Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] If a Font Has Ligature Glyphs But No Feature?
> On 20 Jul 2022, at 22:11, Henning Hraban Ramm via ntg-context > wrote: > > Am 20.07.22 um 21:40 schrieb Bruce Horrocks via ntg-context: > >> \definefontfeature [venetian-301-demi-ligatures] [v1=yes,v3=yes] >> \definefontfeature [venetian-301-BT-ligatures] [v2=yes,v3=yes] >> Note that the names v1, v2 and v3 are entirely arbitrary. Also, the >> \starttypescript section sets the font features to be just those I've >> defined - potentially losing whatever 'default' would provide. But since the >> font doesn't seem to have a lot of features in the first place I've so far >> not noticed any problems. I'm sure a real expert could tell you how to >> retain 'default' and add the ligatures, if needed. > > Hi Bruce, you can simply inherit your feature sets from default: > > \definefontfeature [venetian-301-demi-ligatures][default][v1=yes,v3=yes] > \definefontfeature [venetian-301-BT-ligatures][default][v2=yes,v3=yes] > > I’d like to borrow your example for my book, if you don’t object. Thank-you for the tip, and please feel free to use my example in your book. — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Metafun hexagons aren't hexagons
Hi, The recently added Metafun hexagons seem to be producing octagons instead: \startMPpage fill fullhexagon scaled 100; draw unithexagon scaled 50 withcolor white; \stopMPpage -- Max ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] If a Font Has Ligature Glyphs But No Feature?
Am 20.07.22 um 21:40 schrieb Bruce Horrocks via ntg-context: \definefontfeature [venetian-301-demi-ligatures] [v1=yes,v3=yes] \definefontfeature [venetian-301-BT-ligatures] [v2=yes,v3=yes] Note that the names v1, v2 and v3 are entirely arbitrary. Also, the \starttypescript section sets the font features to be just those I've defined - potentially losing whatever 'default' would provide. But since the font doesn't seem to have a lot of features in the first place I've so far not noticed any problems. I'm sure a real expert could tell you how to retain 'default' and add the ligatures, if needed. Hi Bruce, you can simply inherit your feature sets from default: \definefontfeature [venetian-301-demi-ligatures][default][v1=yes,v3=yes] \definefontfeature [venetian-301-BT-ligatures][default][v2=yes,v3=yes] I’d like to borrow your example for my book, if you don’t object. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] If a Font Has Ligature Glyphs But No Feature?
> On 20 Jul 2022, at 05:31, Michael Urban via ntg-context > wrote: > > Aside from purchasing a real font product from Linotype at enormous expense > and hoping it is better equipped, is there a way to coerce ConTeXt into using > the ligature glyphs for fi and fl? Yes - I had to do the same for a font called Venetian 301 for which I found these 4 files: FilenameName as it appears to MacOS -- Venetian301BT-Roman.otf Venetian 301 Regular Venetian301BT-Italic.otfVenetian 301 Italic Venetian301BT-Bold.otf Venetian 301 Bold venetian-301-demi-bt.ttfVenetian Dm BT Demi They each had the fi and fl ligatures, but at different character positions depending on which file, and they weren't recognised by default. So I used the following code to add them (and add en and em dash substitution as well). %% start \startluacode fonts.handlers.otf.addfeature { name = "v1",-- these character substitutions will be applied to venetian-301-demi-bt type = "ligature", data = { [0xF001] = { "f", "i" }, [0xF002] = { "f", "l" }, } } fonts.handlers.otf.addfeature { name = "v2",-- these character substitutions will be applied to Venetian301BT type = "ligature", data = { [0xFB01] = { "f", "i" }, [0xFB02] = { "f", "l" }, } } fonts.handlers.otf.addfeature { name = "v3",-- these character substitutions will be applied to both type = "ligature", data = { [0x2013] = { "-", "-" }, -- en dash [0x2014] = { "-", "-", "-" }, -- em dash } } \stopluacode \definefontfeature [venetian-301-demi-ligatures] [v1=yes,v3=yes] \definefontfeature [venetian-301-BT-ligatures] [v2=yes,v3=yes] \starttypescript [serif] [myBookFont] \definefontsynonym [Serif] [file:venetian-301-demi-bt] [features=venetian-301-demi-ligatures] \definefontsynonym [SerifBold] [file:Venetian301BT-Bold] [features=venetian-301-BT-ligatures] \definefontsynonym [SerifItalic] [file:Venetian301BT-Italic] [features=venetian-301-BT-ligatures] \stoptypescript %% end Note that the names v1, v2 and v3 are entirely arbitrary. Also, the \starttypescript section sets the font features to be just those I've defined - potentially losing whatever 'default' would provide. But since the font doesn't seem to have a lot of features in the first place I've so far not noticed any problems. I'm sure a real expert could tell you how to retain 'default' and add the ligatures, if needed. Regards, — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How to setup a headertext in a doublesided document in a cld?
Hi Wolfgang, Thanks for your respons! Tonight I prepared a simplified version of the issue. It appears, that the header as I set it up in my previous mail works correclty on odd and even pages. However the struggle is, that after setting up the header on a odd page, there follows a table which is split over two pages. Now on the even page there is no header. So the question is how to convince cld to setup the header when the table is split …. I attach my “minimal” example, which shows the problem. Kind regards Willi test.tex Description: Binary data > On 18 Jul 2022, at 22:05, Wolfgang Schuster via ntg-context > wrote: > > Willi Egger via ntg-context schrieb am 16.07.2022 um 17:03: >> Hello! >> >> I tried to setup a headertext in a context-lua-document. — No problem for >> the singlesided version, however hoe to pass the info for a double sided >> version? >> Unfortunately the cld-mkiv manual contains an example for a singlesided >> document. >> >> It ried >> >> context.setupheadertexts({ >> function() >> context("\\bf”) >> context.labeltext(monthname) >> context("\\hfill”) >> context(year) >> end}, >> {function() >>context("\\bf”) >>context.labeltext(monthname) >>context("\\hfill”) >>context(year) >> end}) >> >> but this is apparently not the good approach. >> >> Does someone of you have experience how to do this correctly? > > What is the desired layout/content for the header? > > You're using monthname and year in your example but do they come from, a > proper minimal example can help here. > > Is it even necessary to set the header with Lua or can't you use a regular > TeX file and load it afterwards as environment file when you process your > document (context --environment=mystyle.tex mydocument.cld). > > Wolfgang > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] m-graph label
On Sat, 16 Jul 2022 13:21:06 -0400 John Kitzmiller via ntg-context wrote: > The horizontal axis label of mwe below has 0.0 (showing tenths; pdf > attached; filename is mwe.tex). > > I expected it to show -1, 0, 1, 2, 3, (integers only). Can this be > formatted? > > % -1 1 > % 0 1 > % 0 2 > % 1 1 > % 2 1 > % 2 2 > % 2 3 > % 2 4 > % 3 1 > % 3 2 > > \usemodule[m-graph] > \startMPpage[instance=graph, offset=5mm] > labeloffset:=3mm; > draw begingraph(8cm,4cm); > setrange(-1.5,0.5,3.5,5); > picture symbol ; > symbol := image(draw fullcircle scaled 5mm withcolor red;); > gdata("mwe.tex", v, > clearxy; > glabel(symbol,v1,v2) ; >); > frame.bot shifted(0,-2mm) ; > autogrid(otick.bot,) shifted(0,-2mm); > endgraph; > \stopMPpage > > Thanks! John % Autoform is the format string used by autogrid % Autoform_X, Autoform_Y if defined, are used instead string Autoform ; Autoform = "%g"; % string Autoform_X ; Autoform_X := "@.0e" ; % string Autoform_Y ; Autoform_Y := "@.0e" ; ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] the system not working on Linux 32 with Context-lmtx
Hi, I had/have a very similar problem on FreeBSD with TeXLive 2021, with the same context.lua not found message, which I posted about a while ago. I “resolved” it by setting TEXMF to point to my texmf-dist directory, in my case /usr/local/share/texmf-dist. It would be nice for it to work without setting TEXMF. Without setting TEXMF, running "mtxrun —generate” guesses a little differently, then attempts to scan all of /usr, and then fails when parts have no read permission. I suspect it is working when you are in /usr/share/texmf-dist because the “collapsepath” function in mtxrun is collapsing “/../..” from /usr/bin to “.” instead of “/“. (Which seems like a bug, but I’m not sure.) If I run “TEXMF=/usr/local/share/texmf-dist context file.tex” things run correctly, and a ~/.texlive2021 directory is created. Running “TEXMF=/usr/local/shared/texmf-dist mtxrun —generate” runs without error but also doesn’t generate a ~/.texlive2021 directory. The real problem seems to be that mtxrun doesn’t deal well with the filesystem layout case of “/top-level/bin/mtxrun” and “/top-level/share/texmf-dist”. Regards, Jan M. > On 29 Jun 2022, at 11:13, Alain Delmotte via ntg-context > wrote: > > Le 27/06/2022 à 22:32, Pablo Rodriguez via ntg-context a écrit : >> On 6/27/22 20:00, Henning Hraban Ramm via ntg-context wrote: >>> Am 27.06.22 um 19:10 schrieb Alain Delmotte via ntg-context: […] When I run from the console: context sanstitre-2.tex mtxrun | unknown script 'context.lua' or 'mtx-context.lua' […] What should I do? >>> […] >>> Try to rebuild the database: mtxrun --generate >> Hi Alain, >> >> as Hraban points out, "mtxrun --generate" is your friend. >> >> I can simply reproduce you error with: >> >> mtxrun --scripts cache --erase >> >> So I get: >> >> $ context >> mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua' >> >> Everything works fine again after I run: >> >> mtxrun --generate. >> >> Before the first run after installation, this command is mandatory to >> build the database. >> >> I hope it helps, >> >> Pablo > > Hi Pablo and Haram, > > When I was running mtxrun --generate, there was an interference with TeX > Live, so I uninstalled it, then it worked. I do not know if that time I did > run mtxrun. But under TeXworks when I selected context as program it kept > electing luametatex, and it didn't work; so I manually wrote "context" and it > worked!! > > Thanks for your help, > > Alain > > ___ > 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 / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] If a Font Has Ligature Glyphs But No Feature?
On 7/20/2022 6:31 AM, Michael Urban via ntg-context wrote: I downloaded something that purports to be Century Expanded from fontsgeek.com. Although the font has fi and fl ligature glyphs, it does not have a ligature font feature and ConTeXt does not use those glyphs. Aside from purchasing a real font product from Linotype at enormous expense and hoping it is better equipped, is there a way to coerce ConTeXt into using the ligature glyphs for fi and fl? you can define your own ligature feature (examples in test suite and elsewhere) but personally i'd not spend money on a font that is half done (some t1 font converted to ot?); or maybe it does have a feature but it's script / language dependent 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 / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] number of chapters
Am 20.07.22 um 09:47 schrieb Taco Hoekwater: Ok, I can access the wiki via Tor and found \somenamedheadnumber{chapter}{current} \somenamedheadnumber{chapter}{last} These are expandable \someheadnumber[chapter][current] \someheadnumber[chapter][last] These are not \definecolor[MyChapterColor][h={\the\numexpr 360*\somenamedheadnumber{chapter}{current}/\somenamedheadnumber{chapter}{last}\relax},s=1,v=1] Thank you! It’s now in https://wiki.contextgarden.net/Command/somenamedheadnumber Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] number of chapters
> On 20 Jul 2022, at 09:40, Henning Hraban Ramm via ntg-context > wrote: > > Am 20.07.22 um 09:06 schrieb Henning Hraban Ramm via ntg-context: >> Hi, >> how do I access the current chapter number and the number of chapters >> (including appendixes; after the first run)? >> I’d like to setup a chapter color like >> \definecolor[ChapterColor][ >> s=1,v=1, >> h=360*\namedstructurevariable{chapter}{number}/\numberofchapters, >> ] >> and use it for a thumb index... >> (I can’t access the wiki ATM; downforeveryoneorjustme.com says it would be >> just me.) > > Ok, I can access the wiki via Tor and found > > \somenamedheadnumber{chapter}{current} > \somenamedheadnumber{chapter}{last} These are expandable > > or > > \someheadnumber[chapter][current] > \someheadnumber[chapter][last] These are not > > What’s the difference? > > And even if I use \definecolor within a setup, I get the same color for every > chapter – how and where must I delay expansion? > > \usemodule[visual] > > \startsetups[MyChapterSetup] > \definecolor[MyChapterColor][h={360*\somenamedheadnumber{chapter}{current}/\somenamedheadnumber{chapter}{last}},s=1,v=1] \definecolor[MyChapterColor][h={\the\numexpr 360*\somenamedheadnumber{chapter}{current}/\somenamedheadnumber{chapter}{last}\relax},s=1,v=1] Best wishes, Taco — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] number of chapters
Am 20.07.22 um 09:06 schrieb Henning Hraban Ramm via ntg-context: Hi, how do I access the current chapter number and the number of chapters (including appendixes; after the first run)? I’d like to setup a chapter color like \definecolor[ChapterColor][ s=1,v=1, h=360*\namedstructurevariable{chapter}{number}/\numberofchapters, ] and use it for a thumb index... (I can’t access the wiki ATM; downforeveryoneorjustme.com says it would be just me.) Ok, I can access the wiki via Tor and found \somenamedheadnumber{chapter}{current} \somenamedheadnumber{chapter}{last} or \someheadnumber[chapter][current] \someheadnumber[chapter][last] What’s the difference? And even if I use \definecolor within a setup, I get the same color for every chapter – how and where must I delay expansion? \usemodule[visual] \startsetups[MyChapterSetup] \definecolor[MyChapterColor][h={360*\somenamedheadnumber{chapter}{current}/\somenamedheadnumber{chapter}{last}},s=1,v=1] \definecolor[fakerulecolor][MyChapterColor] \setuphead[chapter][color=MyChapterColor] \stopsetups \unexpanded\def\MyChapter#1{ \setup{MyChapterSetup} \color[MyChapterColor]{#1} } \setuphead[chapter][page=no,textcommand=\MyChapter] \starttext \dorecurse{20}{ \chapter{\fakewords{1}{5}} \fakewords{10}{50} } \stoptext Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] number of chapters
Hi, how do I access the current chapter number and the number of chapters (including appendixes; after the first run)? I’d like to setup a chapter color like \definecolor[ChapterColor][ s=1,v=1, h=360*\namedstructurevariable{chapter}{number}/\numberofchapters, ] and use it for a thumb index... (I can’t access the wiki ATM; downforeveryoneorjustme.com says it would be just me.) Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___