Re: [NTG-context] Custom color schemes in t-vim
On Sun, 17 May 2020, Nicola wrote: 2. The wiki has no mention of \startcolorscheme... \stopcolorscheme or \setups. An example of two would be very welcome! Added documentation: https://github.com/adityam/filter/blob/dev/vim-README.md Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] What does the exporter try to tell me.
Hi [Inline Response to message by Christoph Hintermüller, So, 2020-05-17 18:32 +0200: Answers and comments below corresponding cited paragraphs.] > Hi > I'm trying to improove the T-vim module such that it is also working > properly in xml export setup. > > In the current ConTeXt standalone the exporter tries to tell me > something when reporting "possible paragraph mixup" at any character > followoing the first paragraph. And no output from the code block > between start<>stop. I got that far that it has to do something with > the redefinitoin of end of line chars or alike in the code behind and > between the package specific start<> and stop<> commands. But i do > not > catch what the exporter trying to yell at me. > > So what additoinal trackers exempt the ones registered by the > exporter > do i have to activate to see what the exporter has to process on? > What documentation should i read before continueing? > What hast to be done inside the start stop, `\obeyline` etc macros to > ensure the exporter is provided with a proper document > sturcuture/tree > which can be properly and flawlessly processed. > > All tex commands which should be reflected in the xml output by tags > include inside their code `\starttagged` and `\stoptagged` commands > but > my impression is that something important the exporter needs to have > any chance to gnereate porper clean output is missing and I'm missign > any clue what and where to startoff. > Sorry. What i forgot. For developing the improovements of the t-vim module i use a fresh pulled standalone lastest mtx-context | ConTeXt Process Management 1.03 mtx-context | mtx-context | main context file: /home/nother/bin/context/tex/texmf- context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2020.05.12 16:17 mtx-context | main context file: /home/nother/bin/context/tex/texmf- context/tex/context/base/mkiv/context.mkxl mtx-context | current version: 2020.05.12 16:17 and in case relevant at all: This is LuaTeX, Version 1.11.2 (TeX Live 2020/dev) Execute 'luatex --credits' for credits and version details. There is NO warranty. Redistribution of this software is covered by the terms of the GNU General Public License, version 2 or (at your option) any later version. For more information about these matters, see the file named COPYING and the LuaTeX source. LuaTeX is Copyright 2019 Taco Hoekwater and the LuaTeX Team. a not so fresh version of my changes can be found on https://github.com/hernot/filter/tree/complete-tagging The line 336 of t-syntax-groups.vim file has to be commented to work with latest context version mentioned above. It was a hack for an older version (2018 release). I do not want to commit the chaos found on my local working tree cause i do not consider it more confusing for others than helpful. Best Xristoph (hernot) ___ 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 is required to make \setuplayout work?
Gerben Wierda schrieb am 17.05.2020 um 22:24: I’ve been trying to define a layout that just has a 5mm no-printing edge around the paper and has all the rest for \textwidth and \textheight. No header, footer, pagenumber, etc. Just as much space as I can get out of a standard A4. But the following (following the manual and ConTeXtgarden): \setuplayout[leftedge=5mm,top=5mm,rightedge=5mm,bottom=5mm, leftmargin=0mm,rightmargin=0mm, margindistance=0mm,edgedistance=0mm, topdistance=0mm,headerdistance=0mm,footerdistance=0mm,bottomdistance=0mm] \showlayoutcomponents % doesn’t seem to do anything \showframe % this works \starttext \input knuth \stoptext Doesn’t seem to change the layout. What am I missing? You're changing the wrong values. What you have to change are the backspace, topspace, header and footer values. \setuplayout [backspace=5mm, width=middle, topspace=5mm, height=middle, header=0pt, footer=0pt] \showframe[text] \starttext \page[dummy] \stoptext Can you also use the predefined page layout which sets all values to 0pt and uses all available space, to get margin increase the backspace and topspace values. \setuplayout [page] [backspace=5mm, topspace=5mm] \setuplayout [page] \showframe[text] \starttext \page[dummy] \stoptext Another even short setup is when you use the predefined tight layout which has a default value of 5mm for all margins. \setuplayout [tight] \showframe[text] \starttext \page[dummy] \stoptext 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 ___
[NTG-context] What is required to make \setuplayout work?
I’ve been trying to define a layout that just has a 5mm no-printing edge around the paper and has all the rest for \textwidth and \textheight. No header, footer, pagenumber, etc. Just as much space as I can get out of a standard A4. But the following (following the manual and ConTeXtgarden): \setuplayout[leftedge=5mm,top=5mm,rightedge=5mm,bottom=5mm, leftmargin=0mm,rightmargin=0mm, margindistance=0mm,edgedistance=0mm, topdistance=0mm,headerdistance=0mm,footerdistance=0mm,bottomdistance=0mm] \showlayoutcomponents % doesn’t seem to do anything \showframe % this works \starttext \input knuth \stoptext Doesn’t seem to change the layout. What am I missing? G___ 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 \vfill in extreme table
On 5/17/2020 5:00 PM, Wolfgang Schuster wrote: Bruce Horrocks schrieb am 17.05.2020 um 13:47: If I want the words Top and Bottom at the top and bottom of a page then "Top \vfill Bottom" works as expected. If I use the same in an extreme table I get an error and I don't know why. What's the 'official' way to align top and bottom in an xrow? MWE \setuppapersize [A4] [A4] \starttext \startxtable[width=\textwidth] \startxrow[height=150mm] \startxcell[align=middle] Top \vfill Bottom \stopxcell \stopxrow \stopxtable \stoptext It's not a real fix but you can you exclude the \vfill command when ConTeXt does its cell calculations. \starttext \startxtable[align=middle,width=\textwidth,height=15cm] \startxrow \startxcell Top \doifnotmode{*trialtypesetting}{\vfill} Bottom \stopxcell \stopxrow \stopxtable \stoptext Neat! Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Custom list layout with PDF bookmarks
> Am 17.05.2020 um 13:38 schrieb Bruce Horrocks : > > >> On 16 May 2020, at 12:02, Henning Hraban Ramm wrote: >> >>> >>> Am 16.05.2020 um 08:30 schrieb Wolfgang Schuster >>> : >>> >>> Bruce Horrocks schrieb am 16.05.2020 um 00:47: When I customise the table of contents layout I lose the automatic hyperlinks. Is there a simple configuration option that I have missed or do I need to create my own links somehow? > [snip] >>> alternative=command : Cutsom TOC without hyperlinks >>> >>> alternative=interactive : Custom TOC with hyperlinks >> >> Thank you! Wikified: https://wiki.contextgarden.net/Command/setuplist > > Thank-you Wolfgang for the quick reply and also Hraban for beating me to it > on the Wiki - I was going to (honest!) I was interested in the subject anyway and used the opportunity to add a section about list alternatives to my ConTeXt book (now at 260 pages, and still no end in sight). Best, Hraban ___ 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] does font expansion break -char.width?
Dear list, in this sample for underscore hyphenation (which comes from Hans), font expansion breaks char.width and displaces the underscore: \startluacode function document.addfunnyhyphen(tfmdata) local underscore = utf.byte("_") local char = tfmdata.characters[underscore] if not char then return end tfmdata.characters[0xFE000] = { width= 0, height = 0, depth= 0, commands = { { "right", -char.width }, { "down", char.depth }, { "slot", 1, underscore }, } } end utilities.sequencers.appendaction("aftercopyingcharacters", "after","document.addfunnyhyphen") \stopluacode \definehyphenationfeatures [underscore] [righthyphenchar="FE000] \setuphyphenation [method=traditional] \unexpanded\def\sha#1% {\begingroup\tt \sethyphenationfeatures[underscore]% #1% \endgroup} \definefontfeature[default][default][expansion=quality] \setupalign[hanging, hz] \definefontfamily[mainface][tt][Cousine][scale=0.85] \setupbodyfont[mainface] \starttext \hsize\zeropoint \sha{\dorecurse{25}{asdfasdfasdfaeasfae}} \stoptext I’m using latest from 2020.05.12 16:21. Have I hit a bug or am I missing something? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Building a page based on exact location of graphical elements (PDF)
What is the simplest way to build a page based on positioning of external images? Some of these images are page-sized (so take up an entire page, though I might want to overlay some other text boxes and MP graphics). I’ve been trying to find a good explanation/introduction into layers (which I think ConTeXtgarden says I should use) but haven’t found one. G ___ 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] Styling of included buffers or files
On Sun, 17 May 2020 18:16:13 +0200 "Jan U. Hasecke" wrote: > I am currently writing a text where I want to include text snippets > either by including files or including buffers. > > What is the best way to style all these included buffers? > > I know that I can do something like this: > > \startcolumns > \getbuffer[Muenchen] > \stopcolumns > > Or do something with \defineparagraph > > Is it somehow possible to apply styles to all buffers that gets > included via \getbuffer by defining a special getbuffer-style? \setupbuffer has before and after keys which can be used. Example: \setupbuffer [before=\blank\blackrule\startnarrower\BufferStyle, after=\stopnarrower\blackrule\blank] %% alternatively define custom buffers \definebuffer [foobar] \setupblackrules [width=1cm, height=1pt, color=gray] \definehighlight [BufferStyle] [style=smallitalic, color=blue] \startbuffer \samplefile{knuth} \stopbuffer \starttext \samplefile{knuth} \getbuffer \samplefile{knuth} \stoptext Marco ___ 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] Building a page based on exact location of graphical elements (PDF)
Gerben Wierda schrieb am 17.05.2020 um 16:52: What is the simplest way to build a page based on positioning of external images? Some of these images are page-sized (so take up an entire page, though I might want to overlay some other text boxes and MP graphics). I’ve been trying to find a good explanation/introduction into layers (which I think ConTeXtgarden says I should use) but haven’t found one. I recommend the following manuals: - details.pdf - metafun-p.pdf 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 ___
[NTG-context] What does the exporter try to tell me.
Hi I'm trying to improove the T-vim module such that it is also working properly in xml export setup. In the current ConTeXt standalone the exporter tries to tell me something when reporting "possible paragraph mixup" at any character followoing the first paragraph. And no output from the code block between start<>stop. I got that far that it has to do something with the redefinitoin of end of line chars or alike in the code behind and between the package specific start<> and stop<> commands. But i do not catch what the exporter trying to yell at me. So what additoinal trackers exempt the ones registered by the exporter do i have to activate to see what the exporter has to process on? What documentation should i read before continueing? What hast to be done inside the start stop, `\obeyline` etc macros to ensure the exporter is provided with a proper document sturcuture/tree which can be properly and flawlessly processed. All tex commands which should be reflected in the xml output by tags include inside their code `\starttagged` and `\stoptagged` commands but my impression is that something important the exporter needs to have any chance to gnereate porper clean output is missing and I'm missign any clue what and where to startoff. Best Xristoph (Hernot) ___ 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] Styling of included buffers or files
Hi all, I am currently writing a text where I want to include text snippets either by including files or including buffers. What is the best way to style all these included buffers? I know that I can do something like this: \startcolumns \getbuffer[Muenchen] \stopcolumns Or do something with \defineparagraph Is it somehow possible to apply styles to all buffers that gets included via \getbuffer by defining a special getbuffer-style? TIA juh ___ 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] Custom color schemes in t-vim
On Sun, 17 May 2020, Nicola wrote: On 2020-05-17, Aditya Mahajan wrote: Since I already map the minor groups to preferred groups in `t-vim`, I think that a good compromise is to enable the minor groups by default. I can do that by adding statements similar to those above in `2context.vim`. This will not have any visual impact on any existing code, but will allow those who want to tweak the highlighting of minor groups to define their own syntax highlighting. Uploaded a new version with a fix. Thanks for looking into it. I will download and test that soon. A couple of remarks: 1. In one of my old documents, I had this command inside the colorscheme block: \setups{vim-minor-groups} Was that to achieve the same purpose? Yes. This setup maps the minor groups to preferred groups. 2. The wiki has no mention of \startcolorscheme... \stopcolorscheme or \setups. An example of two would be very welcome! OK. I will add that. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with \vfill in extreme table
Bruce Horrocks schrieb am 17.05.2020 um 13:47: If I want the words Top and Bottom at the top and bottom of a page then "Top \vfill Bottom" works as expected. If I use the same in an extreme table I get an error and I don't know why. What's the 'official' way to align top and bottom in an xrow? MWE \setuppapersize [A4] [A4] \starttext \startxtable[width=\textwidth] \startxrow[height=150mm] \startxcell[align=middle] Top \vfill Bottom \stopxcell \stopxrow \stopxtable \stoptext It's not a real fix but you can you exclude the \vfill command when ConTeXt does its cell calculations. \starttext \startxtable[align=middle,width=\textwidth,height=15cm] \startxrow \startxcell Top \doifnotmode{*trialtypesetting}{\vfill} Bottom \stopxcell \stopxrow \stopxtable \stoptext 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 ___
[NTG-context] Problem with \vfill in extreme table
If I want the words Top and Bottom at the top and bottom of a page then "Top \vfill Bottom" works as expected. If I use the same in an extreme table I get an error and I don't know why. What's the 'official' way to align top and bottom in an xrow? MWE \setuppapersize [A4] [A4] \starttext \startxtable[width=\textwidth] \startxrow[height=150mm] \startxcell[align=middle] Top \vfill Bottom \stopxcell \stopxrow \stopxtable \stoptext The error message is: > tex error > tex error on line 4 in file virtual://buffer.x_table_1.2: ! > Missing } inserted > > > } > > \vfill > l.4 \vfill > Version: This is LuaTeX, Version 1.12.0 (TeX Live 2020) -- 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 ___
Re: [NTG-context] Custom list layout with PDF bookmarks
> On 16 May 2020, at 12:02, Henning Hraban Ramm wrote: > >> >> Am 16.05.2020 um 08:30 schrieb Wolfgang Schuster >> : >> >> Bruce Horrocks schrieb am 16.05.2020 um 00:47: >>> When I customise the table of contents layout I lose the automatic >>> hyperlinks. Is there a simple configuration option that I have missed or do >>> I need to create my own links somehow? [snip] >> alternative=command : Cutsom TOC without hyperlinks >> >> alternative=interactive : Custom TOC with hyperlinks > > Thank you! Wikified: https://wiki.contextgarden.net/Command/setuplist Thank-you Wolfgang for the quick reply and also Hraban for beating me to it on the Wiki - I was going to (honest!) -- 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 ___
Re: [NTG-context] Custom color schemes in t-vim
On 2020-05-17, Nicola wrote: > On 2020-05-17, Aditya Mahajan wrote: >> Uploaded a new version with a fix. I have tried the latest beta and, indeed, it now seems to work as expected. Thanks! Nicola ___ 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] Custom color schemes in t-vim
On 2020-05-17, Aditya Mahajan wrote: >> Since I already map the minor groups to preferred groups in `t-vim`, I think >> that a good compromise is to enable the minor groups by default. I can do >> that by adding statements similar to those above in `2context.vim`. This will >> not have any visual impact on any existing code, but will allow those who >> want to tweak the highlighting of minor groups to define their own syntax >> highlighting. > > Uploaded a new version with a fix. Thanks for looking into it. I will download and test that soon. A couple of remarks: 1. In one of my old documents, I had this command inside the colorscheme block: \setups{vim-minor-groups} Was that to achieve the same purpose? 2. The wiki has no mention of \startcolorscheme... \stopcolorscheme or \setups. An example of two would be very welcome! Nicola ___ 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] Arithmetic Overflow error in MetaFun
Thanks for your help Hans and the pointer to the extended math library. Lots more to explore now. Best Wishes Keith On Sat, 16 May 2020, 20:46 Hans Hagen, wrote: > On 5/16/2020 4:48 PM, Keith McKay wrote: > > Answering my own problem here. > > > > I've just searched through the mailing list archives and it seems that > > if I add [instance=doublefun] I do not get the Arithmetic Overflow > > error. Joy! > fwiw, we have also instance=decimalfun > > concerning arithmic: > > in metapost we have > > scaled : upto 4K bp > double : 64 bit floats > decimal : configurable accuracy > complex : dual doubles (only in luametafun) > > in lmtx lua we have: > > integer : lua tries to be clever but mixing leads to double > float: lua tries to be clever > decimal : userdata arbitrary precision (only in lmtx) > complex : userdata dual doubles (only in lmtx) > > (in lmtx we have an extended math library and these function are also > available in luametafun) > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Custom color schemes in t-vim
Since I already map the minor groups to preferred groups in `t-vim`, I think that a good compromise is to enable the minor groups by default. I can do that by adding statements similar to those above in `2context.vim`. This will not have any visual impact on any existing code, but will allow those who want to tweak the highlighting of minor groups to define their own syntax highlighting. Uploaded a new version with a fix. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___