Re: [NTG-context] Wiki Down?
All good now Taco. Thanks for the advice. Keith McKay On 16/06/2023 12:33, Taco Hoekwater wrote: Hi Keith, On 16 Jun 2023, at 13:04, Keith McKay via ntg-context wrote: I am getting "safari can't find server" for the wiki so I checked on isitdownrightnow.com and it confirms it is down. Must have been some transport issue. The server is up and has not been down today at all. If it keeps appearing to be down, try a traceroute tool to see where the problem is, e.g. https://ping.eu/traceroute/ 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 ___
[NTG-context] Wiki Down?
I am getting "safari can't find server" for the wiki so I checked on isitdownrightnow.com and it confirms it is down. Best Wishes Keith McKay ___ 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] Help with typesetting footnotes in an HTML document
Hi Denis, Thanks for the code, I shall give this a try. To get the html file I convert a docx file using a wordpress multisite app called Pressbooks, a book content management system for book publishing in various formats such as the web, pdf, epub and various xml flavours (see pressbooks.com). My interest was that docx files could be imported into pressbooks, edited and then exported as html which I then used in ConTeXt to produce pdf. Pressbooks has an open source option and they give instructions on how to self-host on a local web server, which is what I have done (see pressbooks.org). It is, I suppose, like using a sledgehammer to crack a nut, and the html files produced are quite complicated. I'm still in the experimental stage with it. Before trying out Pressbooks, I had previously produced two books(novels) by converting docx files to epub using an epub extension to Libre Office, then edit/clean-up the epub using Sigil epub editor. Finally I extract the individual xhtml files and input into ConTeXt. That was much easier and the files much less complicated, however those books did not have footnotes so I shall have to check that out in Sigil. I'm still experimenting to get a simple workflow for the conversion of docx files to simple (x)html files. Thanks again for the code. Best Wishes Keith On 12/04/2023 09:05, denis.ma...@unibe.ch wrote: Hey Keith, the code below should get you started. Obviously, the links in the footnotes don't appear as there are no setups for the elements yet. By the way, where is the HTML coming from? The dual structure for footnotes looks a bit odd and a bit too complicated for me. == \startxmlsetups xml:initialize \xmlsetsetup{\xmldocument}{*}{-} \xmlsetsetup{\xmldocument}{html|body|p|}{xml:*} %\xmlsetsetup{#1}{span[@class="data-fnref"]}{xml:footnote} % data-fnref is not a class; also -> the element won't be seen if the parent span is not treated in some way. \xmlsetsetup{#1}{span[@class="footnote"]}{xml:footnote-wrapper} \xmlsetsetup{#1}{span[@class="footnote-indirect"]}{xml:footnote} \xmlsetsetup{#1}{div[@class="footnotes"]}{xml:nothing} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:html \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:body \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \xmlflush{#1}\par \stopxmlsetups \startxmlsetups xml:footnote-wrapper \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:footnote \footnote % {\xmlfirst{test}{div[@class="footnotes"]/div/div[@id="\xmlatt{#1}{id}"]}} -> test is not the document name nor the name of the node to be processed>; div/div nesting was wrong; for some reason I can't get it to work with xmlfirst. But \xmlfilter works {\xmlfilter{\xmldocument}{div[@id='\xmlrefatt{#1}{data-fnref}']/command(xml:test)}} \stopxmlsetups \startxmlsetups xml:test \xmlflush{#1} \stopxmlsetups \starttext \xmlprocessfile{initialise}{footnoteTest.html}{} \stoptext = -Ursprüngliche Nachricht- Von: Keith McKay Gesendet: Dienstag, 11. April 2023 17:53 An: Maier, Denis Christian (UB) ; ntg- cont...@ntg.nl Betreff: Re: AW: [NTG-context] Help with typesetting footnotes in an HTML document Fair comment Denis. I decided to try the lookup based approach on pages 85 - 86 of the xml manual and my setups are based on those pages. I have to admit that I find the xml manual a wee bit difficult in places since xml is outside my expertise. I attach my tex and html files which should save some copy and pasting. Thanks Keith McKay On 11/04/2023 14:51, denis.ma...@unibe.ch wrote: Hard to tell, if you don't show us what you've tried so far. In one of my setups I use the lua based approach described on page 86/87. But again, we'll probably need more information to figure it out. -----Ursprüngliche Nachricht- Von: ntg-context Im Auftrag von Keith McKay via ntg-context Gesendet: Montag, 10. April 2023 17:30 An: mailing list for ConTeXt users Cc: Keith McKay Betreff: [NTG-context] Help with typesetting footnotes in an HTML document Hi, I have been puzzling over how to typeset footnotes in a HTML document, most elements have been relatively easy to typeset but I'm stumped with footnotes. I have been studying the the xml manual in particular Chapter 7.4 Cross Referencing, but I'm still struggling to get xmlsetups which come anywhere near working. Any hints to a solution would be greatly appreciated. Best Wishes Keith McKay %%% Here is a snippet of the HTML document with footnotes http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;> http://www.w3.org/1999/xhtml; xml:lang="en"> ‘What is a weed? A plant whose virtues have not been discovered,’ wrote Ralph Waldo Emerson. Those delicate crucifers with their manifold faces of four pink or lilac petals striated w
Re: [NTG-context] Help with typesetting footnotes in an HTML document
Fair comment Denis. I decided to try the lookup based approach on pages 85 - 86 of the xml manual and my setups are based on those pages. I have to admit that I find the xml manual a wee bit difficult in places since xml is outside my expertise. I attach my tex and html files which should save some copy and pasting. Thanks Keith McKay On 11/04/2023 14:51, denis.ma...@unibe.ch wrote: Hard to tell, if you don't show us what you've tried so far. In one of my setups I use the lua based approach described on page 86/87. But again, we'll probably need more information to figure it out. -Ursprüngliche Nachricht- Von: ntg-context Im Auftrag von Keith McKay via ntg-context Gesendet: Montag, 10. April 2023 17:30 An: mailing list for ConTeXt users Cc: Keith McKay Betreff: [NTG-context] Help with typesetting footnotes in an HTML document Hi, I have been puzzling over how to typeset footnotes in a HTML document, most elements have been relatively easy to typeset but I'm stumped with footnotes. I have been studying the the xml manual in particular Chapter 7.4 Cross Referencing, but I'm still struggling to get xmlsetups which come anywhere near working. Any hints to a solution would be greatly appreciated. Best Wishes Keith McKay %%% Here is a snippet of the HTML document with footnotes http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;> http://www.w3.org/1999/xhtml; xml:lang="en"> ‘What is a weed? A plant whose virtues have not been discovered,’ wrote Ralph Waldo Emerson. Those delicate crucifers with their manifold faces of four pink or lilac petals striated with veins of deeper lavender are the perfect introduction to flowers for children. So delicate and yet hardy. I spend some of April abroad, travelling by road from an unseasonably snowy Austria (‘dieses Wetter ist verrückt!’ as an elderly lady exclaimed to me) to northern France, and when I come home, it’s to a landscape responding to substantially increased light levels and temperatures. This was the early sixties. Like many thousands, we were rehoused from Maryhill in the heart of urban Glasgow to this peripheral housing scheme which completely changed the character of what had been a village. Within a decade those glasshouses were abandoned, glass broken in the frames, and a row of shops that included a chippy and a betting shop soon replaced them, betting ‘off’ licensed race-tracks having become legal in 1961. Emerson, R.W. (1878) Fortune of the Republic, p.3 quoted in Oxford Dictionary of Quotations, Rev Fourth Edition (1996). ‘Crazy weather!’ http://www.independent.co.uk/sport/racing/our-national-love-affair- a-history-of-the-betting-shop-804966.html" data-url="http://www.independent.co.uk/sport/racing/our-national-love- affair-a-history-of-the-betting-shop-804966.html">http://www.independent.co.uk/sport/racing/our- national-love-affair-a-history-of-the-betting-shop-804966.html [accessed 11 Dec 2017] %% __ _ 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 __ _ FootnoteTest.tex Description: TeX document ‘What is a weed? A plant whose virtues have not been discovered,’ wrote Ralph Waldo Emerson. Those delicate crucifers with their manifold faces of four pink or lilac petals striated with veins of deeper lavender are the perfect introduction to flowers for children. So delicate and yet hardy. I spend some of April abroad, travelling by road from an unseasonably snowy Austria (‘dieses Wetter ist verrückt!’ as an elderly lady exclaimed to me) to northern France, and when I come home, it’s to a landscape responding to substantially increased light levels and temperatures. This was the early sixties. Like many thousands, we were rehoused from Maryhill in the heart of urban Glasgow to this peripheral housing scheme which completely changed the character of what had been a village. Within a decade those glasshouses were abandoned, glass broken in the frames, and a row of shops that included a chippy and a betting shop soon replaced them, betting ‘off’ licensed race-tracks having become legal in 1961. Emerson, R.W. (1878) Fortune of the Republic, p.3 quoted in Oxford Dictionary of Quotations, Rev Fourth Edition (1996). ‘Crazy weather!’ http://www.independent.co.uk/sport/racing/our-national-love-affair-a-history-of-the-betting-shop
[NTG-context] Help with typesetting footnotes in an HTML document
Hi, I have been puzzling over how to typeset footnotes in a HTML document, most elements have been relatively easy to typeset but I'm stumped with footnotes. I have been studying the the xml manual in particular Chapter 7.4 Cross Referencing, but I'm still struggling to get xmlsetups which come anywhere near working. Any hints to a solution would be greatly appreciated. Best Wishes Keith McKay %%% Here is a snippet of the HTML document with footnotes http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;> http://www.w3.org/1999/xhtml; xml:lang="en"> ‘What is a weed? A plant whose virtues have not been discovered,’ wrote Ralph Waldo Emersonclass="footnote">data-fnref="53-1">. Those delicate crucifers with their manifold faces of four pink or lilac petals striated with veins of deeper lavender are the perfect introduction to flowers for children. So delicate and yet hardy. I spend some of April abroad, travelling by road from an unseasonably snowy Austria (‘dieses Wetter ist verrückt!’data-fnref="53-2"> as an elderly lady exclaimed to me) to northern France, and when I come home, it’s to a landscape responding to substantially increased light levels and temperatures. This was the early sixties. Like many thousands, we were rehoused from Maryhill in the heart of urban Glasgow to this peripheral housing scheme which completely changed the character of what had been a village. Within a decade those glasshouses were abandoned, glass broken in the frames, and a row of shops that included a chippy and a betting shop soon replaced them, betting ‘off’ licensed race-tracks having become legal in 1961.class="footnote-indirect" data-fnref="75-1"> Emerson, R.W. (1878) Fortune of the Republic, p.3 quoted in Oxford Dictionary of Quotations, Rev Fourth Edition (1996). ‘Crazy weather!’ href="http://www.independent.co.uk/sport/racing/our-national-love-affair-a-history-of-the-betting-shop-804966.html; data-url="http://www.independent.co.uk/sport/racing/our-national-love-affair-a-history-of-the-betting-shop-804966.html;>class="import-Hyperlink">http://www.independent.co.uk/sport/racing/our-national-love-affair-a-history-of-the-betting-shop-804966.html [accessed 11 Dec 2017] %% ___ 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] Absolute positioning of \startcombination... \stopcombination
Thanks for your reply Pablo. I didn't see it till just now because for some reason it ended up in my junk folder, along with a number of other ConTeXt messages. You will probably have seen my reply to the list with the three solutions, now we have four! Yep, I know that A4 is the default page size and I always start with that but sometimes I play about with page sizes when typesetting and so can just change when coding. In the document I'm working on, some pages will only contain images and/or combination of images so I went down the Layers route since this also allows me to absolutely position these images on the page. Thanks again for your help! Best Wishes Keith McKay On 16/03/2023 17:58, Pablo Rodriguez via ntg-context wrote: On 3/16/23 17:59, Keith McKay via ntg-context wrote: Hi, I would like to position a combination of images where the centre of the combination coincides with the centre of the text area of a page. Hi Keith, I think the following sample might achieve what you want: \showframe \setupexternalfigures[location={default}] \setuplayout [backspace=2.5cm, topspace=1cm, height=28cm, width=17cm, header=0cm, footer=0.75cm, ] \definelayer[test3] %[x=.5\paperwidth, y=.5\paperheight] [x=.5\textwidth, y=.5\textheight] %\setupbackgrounds[page] \setupbackgrounds[text] [background=test3] \starttext \setlayer[test3][location={middle}] \framed[offset=overlay]{{\startcombination[nx=3,ny=1,distance=15mm] {\externalfigure[cow][width=15mm]}{} \rotate[rotation=90]{\externalfigure[cow][width=15mm]}{} {\externalfigure[cow][width=15mm]}{} \stopcombination}} \null \stoptext BTW, A4 portrait is the default page size. \setupbackgrounds is the standard way to place layers. Page and text centering would require different positions (I have commented out the option for page centering). I hope it helps (since I’m not sure I’m getting your point here), Pablo ___ 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] Absolute positioning of \startcombination... \stopcombination
Hi, I've experimented this morning with the solutions suggested by Wolfgang and Alan in reply to my post. The solution is really quite simple as suggested by Wolfgang i.e. \centerbox{..}. I have applied this to the code and I now have three different solutions to my initial problem. The Joy of ConTeXt! Thanks again Wolfgang and Alan. Best Wishes Keith McKay Here is the code showing the three solutions which others may find useful. \setuppapersize[A4,portrait]%[A4,portrait] \setuplayout [backspace=2.5cm, topspace=1cm, height=28cm, width=17cm, header=0cm, footer=0.75cm, ] \setuppagenumbering[state=start,alternative=doublesided,location=margin] \useMPlibrary [dum] \starttext %%% Me %%% \showframe [text] [text] \definelayer[test3] \setlayer[test3][] \centerbox{ {\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle] {\externalfigure[dummy]}{} \rotate[rotation=90]{\externalfigure[dummy]}{} {\externalfigure[dummy][]}{} \stopcombination} } \flushlayer[test3] \page %%% Wolfgang %%% \centerbox {\bTABLE[frame=off,offset=7.5mm,align={middle,lohi}] \bTR \bTD \externalfigure[dummy] \eTD \bTD \rotate[rotation=90]{\externalfigure[dummy]} \eTD \bTD \externalfigure[dummy] \eTD \eTR \eTABLE} \page %%% Alan %%% \centerbox{ \startparagraph [align=middle] \startframed [frame=off,offset=\zeropoint] \startcombination [nx=3,ny=1,distance=15mm,after=,location=middle] {\externalfigure[dummy]}{} \rotate[rotation=90]{\externalfigure[dummy]}{} {\externalfigure[dummy][]}{} \stopcombination \stopframed \stopparagraph } \stoptext On 16/03/2023 19:50, Keith McKay wrote: Thanks Wolfgang and Alan! I will experiment with them tomorrow. Best Wishes Keith McKay ___ 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] Absolute positioning of \startcombination... \stopcombination
Thanks Wolfgang and Alan! I will experiment with them tomorrow. Best Wishes Keith McKay On Thu, 16 Mar 2023, 18:07 Alan Braslau, wrote: > On Thu, 16 Mar 2023 18:27:53 +0100 > Wolfgang Schuster via ntg-context wrote: > > > Keith McKay via ntg-context schrieb am 16.03.2023 um 17:59: > > > > > > Hi, > > > > > > I would like to position a combination of images where the centre > > > of the combination coincides with the centre of the text area of a > > > page. In the example below I have made the combination into a layer > > > thinking that this would be the easiest way to position it where I > > > wanted. However to position in the centre of the page I would need > > > to know the size of the combination and use this to calculate the x > > > and y values for positioning of the layer. I have looked at the > > > Wiki page on image size of combinations but still cant figure out > > > how to do it. Any suggestions on how to go about this or is their a > > > better way? > > > > > > Wiki Page reference: > > > https://wiki.contextgarden.net/Combinations#Image_Width > > > > > > Thanks > > > > > > Keith McKay > > > > > > %%% example %%% > > > > > > \setuppapersize[A4,portrait]%[A4,portrait] > > > > > > \setuplayout > > > > > > [backspace=2.5cm, > > > > > > topspace=1cm, > > > > > > height=28cm, > > > > > > width=17cm, > > > > > > header=0cm, > > > > > > footer=0.75cm, > > > > > > ] > > > > > > \useMPlibrary [dum] > > > > > > \starttext > > > > > > \definelayer[test3] > > > > > > \setlayer[test3][x=2cm,y=15cm] > > > > > > {\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle] > > > > > > {\externalfigure[dummy]}{} > > > > > > \rotate[rotation=90]{\externalfigure[dummy]}{} > > > > > > {\externalfigure[dummy][]}{} > > > > > > \stopcombination} > > > > > > \flushlayer[test3] > > > > > > \stoptext > > > > > > > \useMPlibrary [dum] > > > > \showframe [text] [text] > > > > \setuplayout [tight] > > > > \starttext > > > > \centerbox > > {\bTABLE[frame=off,offset=7.5mm,align={middle,lohi}] > > \bTR > > \bTD > > \externalfigure[dummy] > > \eTD > > \bTD > > \rotate[rotation=90]{\externalfigure[dummy]} > > \eTD > > \bTD > > \externalfigure[dummy] > > \eTD > > \eTR > > \eTABLE} > > > > \stoptext > > > > Wolfgang > > Or you could put the combination in a frame: > > \startparagraph [align=middle] > \startframed [frame=off,offset=\zeropoint] > \startcombination [nx=3,ny=1] > {first} {} > {second}{} > {third} {} > \stopcombination > \stopframed > \stopparagraph > > 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 ___
[NTG-context] Absolute positioning of \startcombination... \stopcombination
Hi, I would like to position a combination of images where the centre of the combination coincides with the centre of the text area of a page. In the example below I have made the combination into a layer thinking that this would be the easiest way to position it where I wanted. However to position in the centre of the page I would need to know the size of the combination and use this to calculate the x and y values for positioning of the layer. I have looked at the Wiki page on image size of combinations but still cant figure out how to do it. Any suggestions on how to go about this or is their a better way? Wiki Page reference: https://wiki.contextgarden.net/Combinations#Image_Width Thanks Keith McKay %%% example %%% \setuppapersize[A4,portrait]%[A4,portrait] \setuplayout [backspace=2.5cm, topspace=1cm, height=28cm, width=17cm, header=0cm, footer=0.75cm, ] \useMPlibrary [dum] \starttext \definelayer[test3] \setlayer[test3][x=2cm,y=15cm] {\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle] {\externalfigure[dummy]}{} \rotate[rotation=90]{\externalfigure[dummy]}{} {\externalfigure[dummy][]}{} \stopcombination} \flushlayer[test3] \stoptext ___ 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] Printing problem
Sent from my phone to a HP Color LaserJet MFP M283 printer. Perfect print. Keith McKay On Thu, 16 Mar 2023, 11:51 Mikael Sundqvist via ntg-context, < ntg-context@ntg.nl> wrote: > Hi all, > > I have had some printing problems lately, and it is not perfectly > clear to me (or to Hans, we have discussed this a bit) whether it is > the printer that has a lack of memory or if the pdf files are somehow > corrupted. It might have to do with type3 fonts. > > I attach a pdf file that does not print on our printer at work. Or > well, it prints almost all of the page, but stops at the word > "negativa" (or was it "egenvärden", I do not have the printout here > right now). Then the printer also prints an error report about some > "offending command". > > So, a request: If you have an easy access to a printer, can you print > this page and report back if all of it comes out, or what is > happening? > > Thanks > > /Mikael > > ___ > 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] Problem with \setuplayout parameters being ignored
Many thanks Wolfgang. Useful tips indeed. Best Wishes Keith McKay On Sun, 5 Mar 2023, 17:24 Wolfgang Schuster, < wolfgang.schuster.li...@gmail.com> wrote: > Keith McKay schrieb am 05.03.2023 um 18:10: > > > > Thank you so much Wolfgang! I should have realised that. It's what I > > get for trying to write readable code. > > > You can use the = to align keys and values, e.g. > > \setuplayout >[backspace=2.5cm, >margin=0.5cm, > width=16cm, >header=1cm, >footer=1cm] > > Another useful method is to put large settings into a setups-blocks and > pass the block to a setup-command. > > \startsetups [apage] > \startMPcode > StartPage; > ... > StopPage; > \stopMPcode > \stopsetups > > \defineoverlay[apage][\directsetup{apage}] > > 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 ___
Re: [NTG-context] Problem with \setuplayout parameters being ignored
Thank you so much Wolfgang! I should have realised that. It's what I get for trying to write readable code. Best Wishes Keith McKay On 05/03/2023 16:58, Wolfgang Schuster wrote: Keith McKay via ntg-context schrieb am 05.03.2023 um 17:54: Hi I'm having a strange problem with the \setuplayout command with the parameters being ignored. In the code below the only parameter which does get setup is the backspace parameter, the header, footer, width, and margin parameters are setup differently according to the log. I'm probably missing something fairly obvious so hints would be helpful. The document I'm trying to setup will probably be a maximum of 50 pages and I would like to reduce the space at the top and bottom of the page. Best Wishes Keith McKay % Code so far %%% \setuppapersize[A4] \setuplayout[ backspace = 2.5cm, margin = 0.5cm, width = 16cm, header = 1cm, footer = 1cm, ] Remove the spaces before and after = in the settings. While LaTeX ignores spaces around = ConTeXt doesn't. 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 ___
[NTG-context] Problem with \setuplayout parameters being ignored
Hi I'm having a strange problem with the \setuplayout command with the parameters being ignored. In the code below the only parameter which does get setup is the backspace parameter, the header, footer, width, and margin parameters are setup differently according to the log. I'm probably missing something fairly obvious so hints would be helpful. The document I'm trying to setup will probably be a maximum of 50 pages and I would like to reduce the space at the top and bottom of the page. Best Wishes Keith McKay % Code so far %%% \setuppapersize[A4] \setuplayout[ backspace = 2.5cm, margin = 0.5cm, width = 16cm, header = 1cm, footer = 1cm, ] \setupbackgrounds[state=repeat] \defineoverlay[apage][ {\startMPcode StartPage; definecolor[ name = "MyColor1", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; definecolor[ name = "MyColor2", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; draw lmt_shade [ path = Page, direction = "down", alternative = "linear", colors = { "MyColor2", "MyColor1" }, ] ; draw lmt_shade [ path = Field[Text][Text], direction = "down", alternative = "linear", colors = { "MyColor1", "MyColor2" }, ] ; StopPage; \stopMPcode} ] \showframe \setupbackgrounds[page][background=apage] \setupbackgrounds[footer][text] [background=color, backgroundcolor=blue] \setupbackgrounds[header][text] [background=color, backgroundcolor=red] \setuppagenumbering[state=start,alternative=doublesided,location=footer] \showlayout \starttext \showsetups \dorecurse{10}{ Page \recurselevel \page } \stoptext ___ 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] Lettrine module not working?!
Would state=start within \setupinitial[...] help? Best Wishes Keith McKay On 20/02/2023 09:39, G.C.H.M. Verhaag via ntg-context wrote: Hi, Thanks for your suggestion Alan! I've been using lettrine all the time, without knowing it was actually obsolete, sorry! I'm now trying the \placeinitial command but coloring like: *\definecolor[MyColor] [r=.76,g=.72,b=.48]** **\setupinitial[color=\MyColor,font=Bold sa 4,distance=0pt,n=3]* doesn't seem to work! Is this as expected behaviour or a possible issue? Regards, Gerard Verhaag ___ 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 ___
[NTG-context] How to buy a copy of NTG MAPS 52 (2022.1)
Colleagues Can someone point me as to where I can purchase a copy of MAPS 52 (2022.1) published by the Nederlandstalige TeX Gebruikersgroep last year? I am not a member of the NTG and it is too early for it to be freely available for viewing on their site, but I would like to read the article by Fabrice Larribe "MetaFun for generative art (English)" within that volume. The article was also mentioned in Chapter 7 of the manual "On Target". Best Wishes Keith McKay ___ 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] Help test a LMTX bug fix: tweaks in PDF generation
Hi, I printed the file from my Apple mac mini M1 wirelessly to my HP Color LaserJet MFP M283fdw from Thunderbird, Adobe Acrobat DC, Skim and Texshop. The latter three were essentially identical and clear but that from Thunderbird was fuzzy and not as sharp as the others. Best Wishes Keith McKay On 09/10/2022 16:33, Leah Neukirchen via ntg-context wrote: Hi, last week we had a long thread about non-printing PDF on this list and together with Hans I tracked down the issue and we found a fix. Since it changes some details of how PDFs are generated by LMTX, we'd like to test this change first on a wide range of software and printers. So please: Try to preview and then try to print the attached PDF; and report back if either preview or printout does not look like the attached reference PNG image (i.e. something is missing, the fonts look different, or have wrong relative size.) If you use other PDF tools in your workflow, please also check they continue to work as before (and just as well as with MKIV-generated PDFs). Thank you very much, ___ 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] setupexternalfigures and resoĺution
Thanks for this code Hraban. I tried this last night and it worked really well. I did have one stumbling block when I noticed that those image files with a space in their names were not found, however renaming without a space solved the problem. Is this a bug or a feature? Thanks Keith McKay On Thu, 1 Sep 2022, 09:52 Henning Hraban Ramm via ntg-context, < ntg-context@ntg.nl> wrote: > Am 01.09.22 um 10:44 schrieb juh+ntg-context--- via ntg-context: > > > > Hi, > > > > what is resolution meant to do? > > > > Whatever I insert as resolution, I get no change. > > > > \setupexternalfigure[location={default,local},resolution=30] > > \starttext > > \externalfigure[hacker] > > \stoptext > > > > What am I missing? > > The resolution parameter is still not used by default ConTeXt, sorry. > > But you can use it with the attached lua file like: > > > \loadluafile[grph-downsample] > \doifmodeelse{print}{% > \def\Resolution{300} > }{% > \def\Resolution{96} > }% > > \setupexternalfigures[ >%directory={./Logos,img}, >conversion=lowres.jpg, >resolution=\Resolution, > ] > > > 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 > > ___ > ___ 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] Graded Transparency in MetaFun
Hi all I'm trying to create graded transparency over an area similar to the effect produced using lmt_shade, where one colour goes to another colour over a continuum, but with graded transparency we would go from say 0 to 1 transparency, for a single colour. See the MWE below. I have tried this by creating a loop which draws a linear path, yshifted the thickness of the pen, with transparency calculated for each step over the a predetermined height on the page. I have also tried a similar way for a circular path but in this case the path is repeatedly drawn scaled in a loop. The MWE below works OK but when I zoom into the graded transparency areas lines begin to appear which would suggest that their is a better way to do what I want. This is borne out if you zoom into a lmt-shade area, one colour smoothly becomes another colour. I've put examples of this in the MWE. I'm guessing the way lmt_shade areas are drawn is the way to go. Is this likely to be easy to code for what I want to do? Best Wishes Keith McKay %%%MWE%% \setuppapersize[A4,portrait] \usecolors[crayola] \starttext \startMPpage %page 1 StartPage; numeric maxTransp;% Must be between 0 and 1 numeric opHeight; % Opaque area height on page path t; string p[]; p[5] = "RadicalRed"; p[10] = "LemonYellow"; p[15] = "MiddleGreen"; p[20] = "CadetBlue"; p[25] = "white"; maxTransp := 1; opHeight := 2.5; %cm for k= 5, 10, 15, 20, 25: draw lmt_text [ text = "opaque", color = "black", style = "bold", anchor = "lft", position = (-1mm,2mm), ] xsized .95TextWidth ysized 7cm shifted(22cm,(k - 2)*cm); t := (1cm, k*cm) -- (20cm, k*cm); %Square opaque area draw t withpen pensquare scaled .25pt withcolor p[k] withtransparency("normal",maxTransp); for i = 0 step 0.25until (opHeight*72/2.54): r := (i/(opHeight*72/2.54))*maxTransp; %calculate transparency draw t yshifted (-i-.25)*pt withpen pensquare scaled .25pt withcolor p[k] withtransparency("normal",(maxTransp-r)); draw t yshifted (i+.25)*pt withpen pensquare scaled .25pt withcolor p[k] withtransparency("normal",(maxTransp-r)); endfor; endfor; draw lmt_shade [ path = fullsquare xyscaled(19cm,2cm), direction = "up", alternative = "linear", colors = { "red", "blue" }, ] shifted(10.5cm,1.5cm); StopPage; \stopMPpage \page \startMPpage %page 2 StartPage; numeric maxTransp;% Must be between 0 and 1 numeric opHeight; % Opaque area height path t, u; string p[]; p[5] = "RadicalRed"; p[10] = "LemonYellow"; p[15] = "MiddleGreen"; p[20] = "CadetBlue"; p[25] = "white"; maxTransp := 1; opHeight := 2.5; %centimeters opHeightpt := (opHeight /2.54)*72.27; draw lmt_text [ text = "\rotate{opaque}", color = "black", style = "bold", anchor = "lft", position = (-1mm,2mm), ] xsized .25TextHeight shifted(12cm,10cm); for k= 5, 10, 15, 20, 25: t := (1cm, k*cm)--(20cm, k*cm) ; %Square opaque area draw t withpen pensquare scaled .25pt withcolor p[k] withtransparency("normal",maxTransp); for i = 0 step 0.25 until opHeightpt: r := (i/(opHeight*72.27/2.54))*maxTransp; draw t yshifted (i+0.25)*pt withpen pensquare scaled 0.25pt withcolor p[k] withtransparency("normal",(maxTransp-r)); draw t yshifted (-i-0.25)*pt withpen pensquare scaled .25pt withcolor p[k] withtransparency("normal",(maxTransp-r)); endfor; endfor; draw lmt_shade [ path = fullsquare xyscaled(19cm,2cm), direction = "up", alternative = "linear", colors = { "red", "blue" }, ] shifted(10.5cm,1.5cm) ; StopPage; \stopMPpage \page \startMPpage %page 3 StartPage; draw lmt_text [ text = "opaque", color = "black", style = "bold", anchor = "lft", position = (-1mm,2mm), ] xsized .95TextWidth ysized 7cm shifted(22cm,13cm); draw lmt_text [ text = "opaque", color = "black", style = "bold", anchor = "lft", position = (-1mm,2mm), ] xsized .95TextWidth ysized 7cm shifted(22cm,3cm); path t, u; t := (11cm, 15cm) -- (20cm, 15cm); %Square opaque area u := fullcircle scaled 5cm shifted (5cm,16cm); %Circular opaque area for j = (5*72.27/2.54) step -0.25 until 1: r := (j/(5*72.27/2.54)) *0.5; s := -r + 0.5; draw fullcircle scaled (j*pt) shifted (5cm,16cm) withpen pencircle scaled 0.25pt withcolor ("RadicalRed") withtransparency ("normal",s); endfor; fill fullcircle scaled .25pt shifted (5cm,16cm) withpen pencircle scaled 0.25pt withcolor ("RadicalRed") withtransparency ("normal",s); for i = 0.0001 step 0.25 until (10*72.27/2.54): r := (i/(10*72.27/2.54)); draw t yshifted -i*pt withpen pensquare scaled 0.25pt withcolor ("SpringGreen") withtransparency ("lighten",(1-r)); draw t yshifted i*pt withpen pensquare scaled 0.25pt withcolor ("RadicalRed") withtransparency ("lighten",(1-r)); endfor; draw lmt_shade [ path = fullcircle scaled 5cm, alternative = "circular", colors = { "red", "blue" }, ]
Re: [NTG-context] arm osx
Hi Steffen I have TeXshop setup on my mac mini M1 but I rarely use it. I've just ran it on a file I have been working on and it runs OK. Here is my engine: %% #!/bin/bash export PATH=$PATH:/Users/pothole/data/contextmacosarm64/tex/texmf-osx-arm64/bin /Users/pothole/data/contextmacosarm64/tex/texmf-osx-arm64/bin/mtxrun --autogenerate --script context --directives="system.error" --autopdf "$1" The only difference I can see is --directives="system.error" . Don't know if this helps. I'm running: system > ConTeXt ver: 2022.05.09 17:24 LMTX fmt: 2022.5.11 int: english/english Best Wishes Keith McKay On 29/05/2022 19:35, Steffen Wolfrum via ntg-context wrote: Hi, the first, clean install of MacOS ARM64bits I downloaded fromhttps://wiki.contextgarden.net/Installation Next I followed the thread below (exchanging texmf-osx-64/bin to texmf-osx-arm64/bin) and everything works like a charm (ConTeXt ver: 2022.01.21 20:13 LMTX) ! Today I wanted to update, using sh install.sh After that, running the same TeXShop engine as before gives an error: Users/steffen/Library/TeXShop/Engines/ConTeXt LMTX_ARM.engine: line 3: 19971 Killed: 9 /Users/steffen/context-osx-arm64/tex/texmf-osx-arm64/bin/mtxrun --autogenerate --script context --autopdf "$1" What did I do wrong? Steffen Am 25.04.2021 um 18:52 schrieb Keith McKay: Great! I'm glad it worked OK! Best Wishes Keith On Sun, 25 Apr 2021, 09:59 Charles Doherty, wrote: Dear Keith and Mojca, I followed the information provided buy Keith below and everything is working just fine. Mojca I directed my request to Keith in the first instance since I felt it was most likely my lack of knowledge of how to get things going that was the problem (as usual). So thank you for your quick response and offer to test. And thank you Keith for your example below it did the trick. Very best wishes, Charlie On 23 Apr 2021, at 15:53, Keith McKay wrote: Sorry. I put a typo in the engine file in my reply. It should be #!/bin/bash export PATH=/Users/pothole/data/contextarm64/tex/texmf-osx-64/bin:/Users/pothole/data/contextarm64/tex/texmf-osx-64/bin /Users/pothole/data/contextarm64/tex/texmf-osx-64/bin/mtxrun --autogenerate --script context --autopdf "$1" Best Wishes Keith *** CHARLES DOHERTY 13 BANCROFT ROAD TALLAGHT DUBLIN D24 YH2V home: +353 1 2447483 Mobile: +353 863868629 charles.dohe...@icloud.com ___ 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 ___ ___ 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] Mark IV or LuaMetaTeX?
Tomaso I think there is a problem with synctex in TeXworks, which is probably why I never use it. Best Wishes Keith McKay On Thu, 26 May 2022, 18:03 Tommaso Gordini via ntg-context, < ntg-context@ntg.nl> wrote: > Thank you, Keith! > > Everything works fine, except Synctex. > > So, between MkIV and LMTX you recommend LMTX. Perfect. > > Tommaso > > Il gio 26 mag 2022, 17:55 Keith McKay via ntg-context > ha scritto: > >> Hi Tommaso >> >> I use TeXworks with ConText stand alone LMTX. To set it up to run >> context do the following. >> >> Open TexWorks and then click on TexWorks in the menu bar then >> Preferences. The TexWorks Preference window will open up. >> >> Click on the Typesetting tab and you will see two panes. One marked >> "Paths for TeX and related Programs" and another marked "Processing Tools". >> >> Next to Processing Tools is a + button. Click on this and a "Tool >> Configuration" window appears. This is where you enter the details for >> processing by ConTeXt and this is how I have set this up on my mac mini M1. >> >> Name: LMTX >> >> % Here you need to use the Browse button to get to the mtxrun. On my mac >> it is the path to the directory tex which contains the file mtxrun as >> shown below. Yours may be different. Since mtxrun is an alias for >> luametatex it substitutes luametatex. I edited this to, mtxrun. >> >> Program: >> /Users/HomeDirectory/data/contextmacosarm64/tex/texmf-osx-arm64/bin/mtxrun >> >> % Next enter the arguments as follows using the + button. >> >> Arguments: --autogenerate >> >> --script >> >> context >> >> --autopdf >> >> $fullname >> >> Click OK. This takes you back to the TeXworks Prefences window (which has >> stayed open anyway). You may have to enter some more paths to the Paths >> pane. I added >> /Users/HomeDirectory/data/contextmacosarm64/tex/texmf-osx-arm64/bin just to >> be on the safe side but it may not be needed. >> >> If I have made any mistakes I'm sure the great and the good in the >> ConTeXt community will correct me. >> >> I also use TeXshop but prefer TeXworks but to be honest with with you >> there is not much of a difference between the two in my ConTeXt use. I'm >> experimenting with atom but that is a wee bit more complicated since I have >> to use the console to run context. >> >> Hope this helps >> >> Best Wishes >> >> Keith McKay >> >> On 26/05/2022 13:53, Tommaso Gordini via ntg-context wrote: >> >> Hello list, >> forgive me if my question is too general and trivial and without a >> minimum code. >> >> In the current state of ConTeXt development, which engine do you >> recommend to use *definitively*? ConTeXt MkIV or LMTX? >> >> I use macOS 10.15.7, on which I have MacTeX-2022, ConTeXt Standalone and >> ConTeXt LMTX. My editor is TeXShop 4.72 (the last one), even if Synctex >> doesn't work too well: source to PDF is almost OK, but PDF to source is >> still very inaccurate, not to mention that to activate the direct and >> reverse search you have to write such a thing as >> >> %! TEX TS-program = ConTeXt2021 >> %! TEX useAlternatePath >> %! TEX useConTeXtSyncParser >> >> \setupsynctex [state=start, method=min] >> >> \starttext >> ... >> \stoptext >> >> I also have the latest TeXworks on board, but I don't understand how to >> set it up. If you think that for ConTeXt is better than TeXShop and you >> want to teach me how to set it up, thank you. >> >> Tommaso >> >> ___ >> 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/listin
Re: [NTG-context] Mark IV or LuaMetaTeX?
Hi Tommaso I use TeXworks with ConText stand alone LMTX. To set it up to run context do the following. Open TexWorks and then click on TexWorks in the menu bar then Preferences. The TexWorks Preference window will open up. Click on the Typesetting tab and you will see two panes. One marked "Paths for TeX and related Programs" and another marked "Processing Tools". Next to Processing Tools is a + button. Click on this and a "Tool Configuration" window appears. This is where you enter the details for processing by ConTeXt and this is how I have set this up on my mac mini M1. Name: LMTX % Here you need to use the Browse button to get to the mtxrun. On my mac it is the path to the directory tex which contains the file mtxrun as shown below. Yours may be different. Since mtxrun is an alias for luametatex it substitutes luametatex. I edited this to, mtxrun. Program: /Users/HomeDirectory/data/contextmacosarm64/tex/texmf-osx-arm64/bin/mtxrun % Next enter the arguments as follows using the + button. Arguments: --autogenerate --script context --autopdf $fullname Click OK. This takes you back to the TeXworks Prefences window (which has stayed open anyway). You may have to enter some more paths to the Paths pane. I added /Users/HomeDirectory/data/contextmacosarm64/tex/texmf-osx-arm64/bin just to be on the safe side but it may not be needed. If I have made any mistakes I'm sure the great and the good in the ConTeXt community will correct me. I also use TeXshop but prefer TeXworks but to be honest with with you there is not much of a difference between the two in my ConTeXt use. I'm experimenting with atom but that is a wee bit more complicated since I have to use the console to run context. Hope this helps Best Wishes Keith McKay On 26/05/2022 13:53, Tommaso Gordini via ntg-context wrote: Hello list, forgive me if my question is too general and trivial and without a minimum code. In the current state of ConTeXt development, which engine do you recommend to use /definitively/? ConTeXt MkIV or LMTX? I use macOS 10.15.7, on which I have MacTeX-2022, ConTeXt Standalone and ConTeXt LMTX. My editor is TeXShop 4.72 (the last one), even if Synctex doesn't work too well: source to PDF is almost OK, but PDF to source is still very inaccurate, not to mention that to activate the direct and reverse search you have to write such a thing as %! TEX TS-program = ConTeXt2021 %! TEX useAlternatePath %! TEX useConTeXtSyncParser \setupsynctex [state=start, method=min] \starttext ... \stoptext I also have the latest TeXworks on board, but I don't understand how to set it up. If you think that for ConTeXt is better than TeXShop and you want to teach me how to set it up, thank you. Tommaso ___ 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] Problem with a defined colour in MetaFun
Hi Wolfgang, Thank you for your reply. I did as you suggested but it still never worked. However it did make me delve further into the Metafun, LuaMetaFun and the Colouring ConTeXt manuals where I found examples of the *resolvedcolor* helper which I used as follows: definecolor [name = "myColor", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1)]; for loop.. fill unitsquare xscaled 5cm yscaled .5cm shifted (7cm,i*cm) withcolor(r[resolvedcolor("myColor"), white]); endfor; I also found the *namedcolor* helper and I could use it as follows: fill unitsquare xscaled 5cm yscaled .5cm shifted (1cm,(2*i)*cm) withcolor namedcolor("myColor2") ; However, for some reason it did not work in: fill unitsquare xscaled 5cm yscaled .5cm shifted (7cm,i*cm) withcolor(r[namedcolor("myColor"), white]); // Thanks again for your suggestion// Best Wishes Keith// On 28/04/2022 16:04, Wolfgang Schuster wrote: Keith McKay via ntg-context schrieb am 28.04.2022 um 12:05: Hi, In the MWE below I define an rgb colour, myColor1, using random numbers for the r, g and b components. I then use it to fill a unitsquare the size of the page, which works as expected. In the loop that follows I then use the defined colour, myColor1, along with white and the variable r to create shades of myColor1 as in the MWE below. However, myColor1 is not recognised in the loop and seems to be replaced by black, although if I use a predefined colour, in this case BurntSienna from the crayola collection, it works as expected. I have tried a number of ways to get this to work as shown in the code but without success. I would be grateful for any suggestions. Best Wishes Keith McKay MWE% \setuppapersize[A4,portrait] \usecolors[crayola] \starttext \dorecurse{10}{ \startMPpage StartPage; \definecolor[name="myColor1", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; Remove the backslash in front of the definecolor command. Wolfgang ___ 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 a defined colour in MetaFun
Hi Fabrice Thank you for your reply. It works the way I wanted. Wolfgang also replied and this has lead me to an alternative method. See my reply to him in this mailing list. Best Wishes Keith On 28/04/2022 13:45, Fabrice L wrote: Sorry, I was a little too enthusiastic, here here is the code : Le 28 avr. 2022 à 08:41, Fabrice L a écrit : Hi Keith, Le 28 avr. 2022 à 06:05, Keith McKay via ntg-context a écrit : Hi, In the MWE below I define an rgb colour, myColor1, using random numbers for the r, g and b components. I then use it to fill a unitsquare the size of the page, which works as expected. In the loop that follows I then use the defined colour, myColor1, along with white and the variable r to create shades of myColor1 as in the MWE below. However, myColor1 is not recognised in the loop and seems to be replaced by black, although if I use a predefined colour, in this case BurntSienna from the crayola collection, it works as expected. I have tried a number of ways to get this to work as shown in the code but without success. I would be grateful for any suggestions. Best Wishes Keith McKay MWE% \setuppapersize[A4,portrait] \usecolors[crayola] \starttext \dorecurse{10}{ \startMPpage StartPage; \definecolor[name="myColor1", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; fill unitsquare xscaled PaperWidth yscaled PaperHeight withcolor "myColor1"; for i =2 step 2 until 10: r := i/10; fill unitsquare xscaled 5cm yscaled .5cm shifted (1cm,i*cm) withcolor(r[\MPcolor{BurntSienna},white]); fill unitsquare xscaled 5cm yscaled .5cm shifted (7cm,i*cm) withcolor(r[\MPcolor{myColor1}, white]); fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) withcolor(r[\MPcolor{"myColor1"}, white]); %fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) withcolor(r[myColor1 , white]); This line causes an error. endfor; StopPage; \stopMPpage } \stoptext %%%end MWE%%% Here is a solution, with works here, defining in another way the color « myColor »: \setuppapersize[A4,portrait] \usecolors[crayola] \starttext \dorecurse{2}{ \startMPpage StartPage; color myColor ; myColor := (uniformdeviate(1),uniformdeviate(1),uniformdeviate(1)); fill unitsquare xscaled PaperWidth yscaled PaperHeight withcolor myColor; for i =2 step 2 until 10: r := i/10; fill unitsquare xscaled 5cm yscaled .5cm shifted (1cm,i*cm) withcolor(r[\MPcolor{BurntSienna},white]); fill unitsquare xscaled 5cm yscaled .5cm shifted (7cm,i*cm) withcolor(r[\MPcolor{myColor1}, white]); fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) withcolor(r[\MPcolor{"myColor1"}, white]); %fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) withcolor(r[myColor1 , white]); This line causes an error. endfor; StopPage; \stopMPpage } \stoptext I forgot to remove « myColor1 » from the others parts of the code. \setuppapersize[A4,portrait] \usecolors[crayola] \starttext \dorecurse{10}{ \startMPpage StartPage; color myColor ; myColor := (uniformdeviate(1),uniformdeviate(1),uniformdeviate(1)); fill unitsquare xscaled PaperWidth yscaled PaperHeight withcolor myColor; for i =2 step 2 until 10: r := i/10; fill unitsquare xscaled 5cm yscaled .5cm shifted (1cm,i*cm) withcolor(r[\MPcolor{BurntSienna},white]); fill unitsquare xscaled 5cm yscaled .5cm shifted (7cm,i*cm) withcolor(r[myColor, white]); fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) withcolor(r[myColor, white]); %fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) withcolor(r[myColor1 , white]); This line causes an error. endfor; StopPage; \stopMPpage } \stoptext Fabrice. ___ 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] Problem with a defined colour in MetaFun
Hi, In the MWE below I define an rgb colour, myColor1, using random numbers for the r, g and b components. I then use it to fill a unitsquare the size of the page, which works as expected. In the loop that follows I then use the defined colour, myColor1, along with white and the variable r to create shades of myColor1 as in the MWE below. However, myColor1 is not recognised in the loop and seems to be replaced by black, although if I use a predefined colour, in this case BurntSienna from the crayola collection, it works as expected. I have tried a number of ways to get this to work as shown in the code but without success. I would be grateful for any suggestions. Best Wishes Keith McKay MWE% \setuppapersize[A4,portrait] \usecolors[crayola] \starttext \dorecurse{10}{ \startMPpage StartPage; \definecolor[name="myColor1", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; fill unitsquare xscaled PaperWidth yscaled PaperHeight withcolor "myColor1"; for i =2 step 2 until 10: r := i/10; fill unitsquare xscaled 5cm yscaled .5cm shifted (1cm,i*cm) withcolor(r[\MPcolor{BurntSienna},white]); fill unitsquare xscaled 5cm yscaled .5cm shifted (7cm,i*cm) withcolor(r[\MPcolor{myColor1}, white]); fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) withcolor(r[\MPcolor{"myColor1"}, white]); %fill unitsquare xscaled 5cm yscaled .5cm shifted (13cm,i*cm) withcolor(r[myColor1 , white]); This line causes an error. endfor; StopPage; \stopMPpage } \stoptext %%%end MWE%%% I am running: system > system > ConTeXt ver: 2022.04.20 19:18 LMTX fmt: 2022.4.26 int: english/english system > system > 'cont-new.mkxl' loaded ___ 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] Setting up zint on a mac with macOS Montery Version 12.3.1
Hi All I created the symbolic link as suggested by Bruce and Luis and still got the error message optional> unable to locate library 'libzint' in my text editor. I use TeXworks. However, I thought I would try running from the Terminal app and it worked. It found libzint and output the pdf with both barcodes and the qrcode. I have no idea why it works in the Terminal and not TexWorks, I'm guessing I have a path issue which I need to investigate. Notes 1) My machine is a mac-mini-M1 with macos Monterey and I'm running the latest ConTeXt version 2) Bruce noted that my Homebrew was installed in a non-standard location so I checked on the Hombrew website and it is installed in opt/homebrew for Apple Silicon i.e the M1 chip. Maybe Bruce's homebrew was installed on an earlier version. Thanks to Luis and Bruce for their suggestions. Best Wishes Keith McKay On 10/04/2022 22:26, Bruce Horrocks wrote: Hi Keith, On 10 Apr 2022, at 14:49, Keith McKay via ntg-context wrote: Hi All I have been struggling today trying to setup and use the Barcode module zint in ConTeXt and failed. I have followed the instructions on the wiki (https://wiki.contextgarden.net/Barcodes ) but with some changes as follows. Which maybe why I failed. 1) I downloaded Zint using Homebrew since I'm using macOS, and installed it according to the instructions. 2) Since I'm using LMTX I looked for the file libzint.dylib and found it in /opt/homebrew/Cellar/zint/2.10.0/lib . This is different from the path given on the wiki. The directory contained three files, two of which were aliases, libzint.2.10.dylib and libzint.dylib, and an exe file libzint.2.10.0.0.dylib You have Hombrew installed in a non-standard location. Mine is in /usr/local/Cellar with the executables linked into /usr/local/bin. But, assuming other Homebrew commands work when run from Terminal then you might still be okay. 3) I created the path $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint and copied libzint.2.10.0.0.dylib into but replaced dylib with 'so' as suggested on the wiki instructions. So I basically added lib/luametatex/zint to texmf-osx-64/bin . "Yes" to creating the path but "no" to copying. Create a symbolic link instead. So, in Terminal: $ cd $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint # In my case I used the following: $ ln -s /usr/local/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so # For you with Homebrew in a different location, try: $ ln -s /opt/homebrew/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so Then steps 4 and 5 as below. I ran the MWE below: the ISBN worked, the ISBNX didn't, the QR code did. This is on Monterey. 4) I ran mtxrun --generate to update the database. 5) I ran the MWE below but no barcode appeared. The console output shows: modules > using user prefixed file 'libs-imp-zint' modules > 'zint' is loaded however further down the output it gives: optional> unable to locate library 'libzint' I have tried renaming libzint2.10.0.0.so to libzint.so, but still no barcode. Is their something I am missing? Tips or hints appreciated. Best Wishes Keith McKay %% MWE \usemodule[zint] \starttext \barcode[alternative=isbn,text=9783865419026,width=4cm] \barcode[alternative=isbnx, text=9783865419026, width=4cm] \barcode[alternative=qrcode, text={https://wiki.contextgarden.net}, width=3cm] \stoptext — 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 / 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] Setting up zint on a mac with macOS Montery Version 12.3.1
Hi All I have been struggling today trying to setup and use the Barcode module zint in ConTeXt and failed. I have followed the instructions on the wiki ( https://wiki.contextgarden.net/Barcodes ) but with some changes as follows. Which maybe why I failed. 1) I downloaded Zint using Homebrew since I'm using macOS, and installed it according to the instructions. 2) Since I'm using LMTX I looked for the file libzint.dylib and found it in /opt/homebrew/Cellar/zint/2.10.0/lib . This is different from the path given on the wiki. The directory contained three files, two of which were aliases, libzint.2.10.dylib and libzint.dylib, and an exe file libzint.2.10.0.0.dylib 3) I created the path $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint and copied libzint.2.10.0.0.dylib into but replaced dylib with 'so' as suggested on the wiki instructions. So I basically added lib/luametatex/zint to texmf-osx-64/bin . 4) I ran mtxrun --generate to update the database. 5) I ran the MWE below but no barcode appeared. The console output shows: /modules > using user prefixed file 'libs-imp-zint'/ // /modules > 'zint' is loaded/ however further down the output it gives: /optional > unable to locate library 'libzint'/ // I have tried renaming libzint2.10.0.0.so to libzint.so, but still no barcode. Is their something I am missing? Tips or hints appreciated. Best Wishes Keith McKay %% MWE \usemodule[zint] \starttext \barcode[alternative=isbn,text=9783865419026,width=4cm] \barcode[alternative=isbnx, text=9783865419026, width=4cm] \barcode[alternative=qrcode, text={https://wiki.contextgarden.net}, width=3cm] \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] What’s wrong with installation?
Hi, I had the same issue on an old laptop running Ubuntu 21.04, but after the server reboot the update was successful. Running context -version now gives: mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /myPath/context-linux-64/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2022.01.21 20:13 mtx-context | main context file: /myPath/context-linux-64/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2022.01.21 20:13 Best Wishes Keith McKay On 08/03/2022 13:03, Hans Hagen via ntg-context wrote: On 3/8/2022 12:55 PM, Stephen Gaito via ntg-context wrote: Hans, I am having the same problem on an XUbuntu 21.10 : hm, maybe the server has some issue ... i rebooted the machine 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 ___ ___ 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] Radius attribute and scaling in lmt_shade[ ]
Thanks Hans. Something else I've learned. Best Wishes Keith On Sun, 9 Jan 2022, 22:26 Hans Hagen, wrote: > On 1/9/2022 4:53 PM, Keith McKay via ntg-context wrote: > > Since "a picture paints a thousand words", I attach a pdf showing the > > results of the execution of the code. > > > > Are these bugs or... ? > more interplay between parameters ... > > draw lmt_shade [ > trace = true, > path= r shifted - center r, > direction = "up", > alternative = "circular", > radius = k*cm, > colors = { "MyColor1", "MyColor2" }, > ] scaled 4 shifted((k *12)*cm,12*cm); > > > > - >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] Radius attribute and scaling in lmt_shade[ ]
Since "a picture paints a thousand words", I attach a pdf showing the results of the execution of the code. Are these bugs or... ? Best Wishes Keith On 06/01/2022 15:57, Keith McKay wrote: Hi In the code below you will see that I have created a closed path and performed scaling, and shading on the path with lmt_shade [ ]. I have noticed a few features which may or may not be bugs depending on whether scaled is applied to the path within the square brackets or outside. 1) Applying scaled to the path within the square brackets and incrementing the radius key I can see the shaded areas changing, however the first two shapes show incorrect scaling and have ragged edges. 2) When scaled is applied outside the square brackets all shapes are the same size and no ragged edges, however the shading is not showing correctly with increasing radius. Am I missing something? Best Wishes Keith McKay ***MWE* \setuppapersize[A4, landscape] \starttext \dorecurse{10}{ \startMPpage StartPage; width := 27; height := 18; path r; r := (0.25cm,0cm)--(0cm,1.5cm)..(0.25cm,1.75cm)..(0.5cm,1.5cm) -- cycle; definecolor [ name = "MyColor1", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; definecolor [ name = "MyColor2", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; for k = 0.5 step 0.25 until 2: draw lmt_shade [ path = r , direction = "up", alternative = "circular", radius = k*cm, colors = { "MyColor1", "MyColor2" }, ] scaled 4.5 shifted((k *12)*cm,12*cm); draw lmt_shade [ path = r scaled 4.5, direction = "up", alternative = "circular", radius = k*cm, colors = { "MyColor1", "MyColor2" }, ] shifted((k *12)*cm,1cm); endfor; StopPage; \stopMPpage } \stoptext RS4 copy.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 ___
[NTG-context] Radius attribute and scaling in lmt_shade[ ]
Hi In the code below you will see that I have created a closed path and performed scaling, and shading on the path with lmt_shade [ ]. I have noticed a few features which may or may not be bugs depending on whether scaled is applied to the path within the square brackets or outside. 1) Applying scaled to the path within the square brackets and incrementing the radius key I can see the shaded areas changing, however the first two shapes show incorrect scaling and have ragged edges. 2) When scaled is applied outside the square brackets all shapes are the same size and no ragged edges, however the shading is not showing correctly with increasing radius. Am I missing something? Best Wishes Keith McKay ***MWE* \setuppapersize[A4, landscape] \starttext \dorecurse{10}{ \startMPpage StartPage; width := 27; height := 18; path r; r := (0.25cm,0cm)--(0cm,1.5cm)..(0.25cm,1.75cm)..(0.5cm,1.5cm) -- cycle; definecolor [ name = "MyColor1", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; definecolor [ name = "MyColor2", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; for k = 0.5 step 0.25 until 2: draw lmt_shade [ path = r , direction = "up", alternative = "circular", radius = k*cm, colors = { "MyColor1", "MyColor2" }, ] scaled 4.5 shifted((k *12)*cm,12*cm); draw lmt_shade [ path = r scaled 4.5, direction = "up", alternative = "circular", radius = k*cm, colors = { "MyColor1", "MyColor2" }, ] shifted((k *12)*cm,1cm); endfor; StopPage; \stopMPpage } \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 ___