[NTG-context] Re: Combine lua and btx setup, was: Re: Customize citation format of a bibliography (use the short form as reference format)
ril 2024, 15:44:12 MESZ schrieb Gerion Entrup: > > Hi, > > > > > The APS style is an example of a number-based citation system. As you > > > are looking for a tag-based citation, it might be better to start with > > > something like the APA style. > > > > I'm kind of satisfied with the publication-list layout of the APS style so > > I chose > > this as a base. If it is simpler to start with the APA style, I can do that. > > > > My hope is that it is possible to just change the "label" that is used for > > referencing and keep everything else as is. > > > > > Is there some specification for your short tag-based citation style? > > > > biblatex implements this with the "alphabetic" style. I'm not aware of > > a specification, though. Does the "short" form in ConTeXt exist for a > > specific reason? :) > > > > Gerion > > > > > On Tue, 16 Apr 2024 06:04:35 +0200 > > > Gerion Entrup wrote: > > > > > > > Hi, > > > > > > > > I'm trying to customize a cite format in a bibliography. Currently, > > > > I'm using the aps style which fits so far, except of the plain number > > > > as reference. In concrete, I want to change the following: > > > > - Use the first letter of the last name and the year as reference > > > > (this should be exactly the short form). It is more less also > > > > described here [1]. > > > > - Highlight publications of a certain author with an extra char (e.g. > > > > '>') > > > > > > > > Here is a minimal example (lets assume, every occurrence of Knuth > > > > should be highlighted): ``` > > > > \setupinteraction[state=start] > > > > > > > > \startbuffer[testdata] > > > > @Book{knuth1, > > > > author = {Donald E. Knuth}, > > > > title = {TEX and METAFONT. New directions in typesetting}, > > > > year = {1979}, > > > > publisher = {Addison-Wesley}, > > > > } > > > > @Article{someother, > > > > author = {Some Person and Some Otherperson}, > > > > title = {Another title}, > > > > year = {1900}, > > > > } > > > > \stopbuffer > > > > > > > > % enable tracing > > > > \enabletrackers[publications, publications.crossref, > > > > publications.details, publications.cite, publications.strings] > > > > > > > > \usebtxdataset[main][testdata.buffer] > > > > \usebtxdefinitions[aps] > > > > \setupbtx[dataset=main] > > > > \definebtxrendering[bibrendering][aps][dataset=main] > > > > > > > > % this seems to have no effect? > > > > \setupbtx[alternative=short] > > > > > > > > \starttext > > > > > > > > Knuth developed \TeX \cite[knuth1]. > > > > Several persons said something \cite[someother]. > > > > > > > > \placelistofpublications[bibrendering] > > > > > > > > \stoptext > > > > ``` > > > > > > > > It should be rendered as: > > > > ``` > > > > Knuth developed TeX [>Knu79]. > > > > Several persons said something [PO00]. > > > > > > > > [Knu79] D.E. Knuth, TEX and METAFONT. New directions in > > > > typesetting (Addison-Wesley, 1979). [PO00] S. Person and S. > > > > Otherperson, Another title, (1900). ``` > > > > > > > > How can I achieve that \cite[something] always renders in the short > > > > form by default? How can I customize that references to Knuth contain > > > > this extra '>'? How can I customize the APS style to also use the > > > > short form in the list of publications instead of numbers? > > > > > > > > Best > > > > Gerion > > > > > > > > [1] > > > > https://tex.stackexchange.com/questions/295444/citation-style-with-first-letters-of-authors-lastname > signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Combine lua and btx setup, was: Re: Customize citation format of a bibliography (use the short form as reference format)
Here is a solution for the first part of my question. This is based on https://www.mail-archive.com/ntg-context@ntg.nl/msg101156.html and try and error based on publ-imp-aps.mkvi and publ-imp-apa.mkvi: It display now the citation _and_ numbering labels in the short form: ``` \setupinteraction[state=start] \startbuffer[testdata] @Book{knuth1, author = {Donald E. Knuth}, title = {TEX and METAFONT. New directions in typesetting}, year = {1979}, publisher = {Addison-Wesley}, } @Article{someother, author = {Some Person and Some Otherperson}, title = {Another title}, year = {1900}, } \stopbuffer % enable tracing \enabletrackers[publications, publications.crossref, publications.details, publications.cite, publications.strings] \usebtxdataset[main][testdata.buffer] \usebtxdefinitions[aps] \setupbtx[dataset=main] \definebtxrendering[bibrendering][aps][dataset=main, numbering=short] \setupbtxlist[aps][ alternative=b, distance=.5em, ] \setupbtx[aps:cite][alternative=short] \starttext Knuth developed \TeX \cite[knuth1] Several persons said something \cite[someother]. \placelistofpublications[bibrendering] \stoptext ``` The remaining part now is to mark publications of Knuth in a different way. I have tried this and failed. Here is my code so far: ``` \startluacode function render_cite(short, author) print(author) if author:lower():find("knuth") then context("[>" .. short .. "]") else context("[" .. short .. "]") end end \stopluacode \definebtx[aps:cite:special][aps:cite] \startsetups btx:aps:cite:special \btxcitereference \ctxlua{render_cite([==[\btxflush{year}]==], [==[\btxflush{author}]==])} \stopsetups % use it with \cite[special][knuth1] ``` This has several problems: - \btxflush{short} does not work as I expected that. How can I get the short form? - \btxflush to pass arguments to lua does not work as intended. On the lua side the variable "author" resolves to "\btxflushauthor{author}" and not to "D. E. Knuth". How can I pass the data? I use Lua only because I find it more convenient as a programming language. If a plain tex solution is simpler, I'm happy to use that. Another question that came up while studying the source code: What effect have \c!, \s!, and \v!? These commands exist a lot in the above cited files. Gerion Am Mittwoch, 17. April 2024, 15:44:12 MESZ schrieb Gerion Entrup: > Hi, > > > The APS style is an example of a number-based citation system. As you > > are looking for a tag-based citation, it might be better to start with > > something like the APA style. > > I'm kind of satisfied with the publication-list layout of the APS style so I > chose > this as a base. If it is simpler to start with the APA style, I can do that. > > My hope is that it is possible to just change the "label" that is used for > referencing and keep everything else as is. > > > Is there some specification for your short tag-based citation style? > > biblatex implements this with the "alphabetic" style. I'm not aware of > a specification, though. Does the "short" form in ConTeXt exist for a > specific reason? :) > > Gerion > > > On Tue, 16 Apr 2024 06:04:35 +0200 > > Gerion Entrup wrote: > > > > > Hi, > > > > > > I'm trying to customize a cite format in a bibliography. Currently, > > > I'm using the aps style which fits so far, except of the plain number > > > as reference. In concrete, I want to change the following: > > > - Use the first letter of the last name and the year as reference > > > (this should be exactly the short form). It is more less also > > > described here [1]. > > > - Highlight publications of a certain author with an extra char (e.g. > > > '>') > > > > > > Here is a minimal example (lets assume, every occurrence of Knuth > > > should be highlighted): ``` > > > \setupinteraction[state=start] > > > > > > \startbuffer[testdata] > > > @Book{knuth1, > > > author = {Donald E. Knuth}, > > > title = {TEX and METAFONT. New directions in typesetting}, > > > year = {1979}, > > > publisher = {Addison-Wesley}, > > > } > > > @Article{someother, > > > author = {Some Person and Some Otherperson}, > > > title = {Another title}, > > > year = {1900}, > > > } > > > \stopbuffer > > > > > > % enable tracing > > > \enabletrackers[publications, publications.crossref, > > > publications.details, publications.cite, publications.strings]
[NTG-context] Re: Customize citation format of a bibliography (use the short form as reference format)
Hi, > The APS style is an example of a number-based citation system. As you > are looking for a tag-based citation, it might be better to start with > something like the APA style. I'm kind of satisfied with the publication-list layout of the APS style so I chose this as a base. If it is simpler to start with the APA style, I can do that. My hope is that it is possible to just change the "label" that is used for referencing and keep everything else as is. > Is there some specification for your short tag-based citation style? biblatex implements this with the "alphabetic" style. I'm not aware of a specification, though. Does the "short" form in ConTeXt exist for a specific reason? :) Gerion > On Tue, 16 Apr 2024 06:04:35 +0200 > Gerion Entrup wrote: > > > Hi, > > > > I'm trying to customize a cite format in a bibliography. Currently, > > I'm using the aps style which fits so far, except of the plain number > > as reference. In concrete, I want to change the following: > > - Use the first letter of the last name and the year as reference > > (this should be exactly the short form). It is more less also > > described here [1]. > > - Highlight publications of a certain author with an extra char (e.g. > > '>') > > > > Here is a minimal example (lets assume, every occurrence of Knuth > > should be highlighted): ``` > > \setupinteraction[state=start] > > > > \startbuffer[testdata] > > @Book{knuth1, > > author = {Donald E. Knuth}, > > title = {TEX and METAFONT. New directions in typesetting}, > > year = {1979}, > > publisher = {Addison-Wesley}, > > } > > @Article{someother, > > author = {Some Person and Some Otherperson}, > > title = {Another title}, > > year = {1900}, > > } > > \stopbuffer > > > > % enable tracing > > \enabletrackers[publications, publications.crossref, > > publications.details, publications.cite, publications.strings] > > > > \usebtxdataset[main][testdata.buffer] > > \usebtxdefinitions[aps] > > \setupbtx[dataset=main] > > \definebtxrendering[bibrendering][aps][dataset=main] > > > > % this seems to have no effect? > > \setupbtx[alternative=short] > > > > \starttext > > > > Knuth developed \TeX \cite[knuth1]. > > Several persons said something \cite[someother]. > > > > \placelistofpublications[bibrendering] > > > > \stoptext > > ``` > > > > It should be rendered as: > > ``` > > Knuth developed TeX [>Knu79]. > > Several persons said something [PO00]. > > > > [Knu79] D.E. Knuth, TEX and METAFONT. New directions in > > typesetting (Addison-Wesley, 1979). [PO00] S. Person and S. > > Otherperson, Another title, (1900). ``` > > > > How can I achieve that \cite[something] always renders in the short > > form by default? How can I customize that references to Knuth contain > > this extra '>'? How can I customize the APS style to also use the > > short form in the list of publications instead of numbers? > > > > Best > > Gerion > > > > [1] > > https://tex.stackexchange.com/questions/295444/citation-style-with-first-letters-of-authors-lastname signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Customize citation format of a bibliography (use the short form as reference format)
Hello, The APS style is an example of a number-based citation system. As you are looking for a tag-based citation, it might be better to start with something like the APA style. Is there some specification for your short tag-based citation style? Alan On Tue, 16 Apr 2024 06:04:35 +0200 Gerion Entrup wrote: > Hi, > > I'm trying to customize a cite format in a bibliography. Currently, > I'm using the aps style which fits so far, except of the plain number > as reference. In concrete, I want to change the following: > - Use the first letter of the last name and the year as reference > (this should be exactly the short form). It is more less also > described here [1]. > - Highlight publications of a certain author with an extra char (e.g. > '>') > > Here is a minimal example (lets assume, every occurrence of Knuth > should be highlighted): ``` > \setupinteraction[state=start] > > \startbuffer[testdata] > @Book{knuth1, > author = {Donald E. Knuth}, > title = {TEX and METAFONT. New directions in typesetting}, > year = {1979}, > publisher = {Addison-Wesley}, > } > @Article{someother, > author = {Some Person and Some Otherperson}, > title = {Another title}, > year = {1900}, > } > \stopbuffer > > % enable tracing > \enabletrackers[publications, publications.crossref, > publications.details, publications.cite, publications.strings] > > \usebtxdataset[main][testdata.buffer] > \usebtxdefinitions[aps] > \setupbtx[dataset=main] > \definebtxrendering[bibrendering][aps][dataset=main] > > % this seems to have no effect? > \setupbtx[alternative=short] > > \starttext > > Knuth developed \TeX \cite[knuth1]. > Several persons said something \cite[someother]. > > \placelistofpublications[bibrendering] > > \stoptext > ``` > > It should be rendered as: > ``` > Knuth developed TeX [>Knu79]. > Several persons said something [PO00]. > > [Knu79] D.E. Knuth, TEX and METAFONT. New directions in > typesetting (Addison-Wesley, 1979). [PO00] S. Person and S. > Otherperson, Another title, (1900). ``` > > How can I achieve that \cite[something] always renders in the short > form by default? How can I customize that references to Knuth contain > this extra '>'? How can I customize the APS style to also use the > short form in the list of publications instead of numbers? > > Best > Gerion > > [1] > https://tex.stackexchange.com/questions/295444/citation-style-with-first-letters-of-authors-lastname -- Alan Braslau 816 West Mountain Avenue Fort Collins, CO 80521 USA mobile: (970) 237-0957 Conserve energy! ;-) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Customize citation format of a bibliography (use the short form as reference format)
Hi, I'm trying to customize a cite format in a bibliography. Currently, I'm using the aps style which fits so far, except of the plain number as reference. In concrete, I want to change the following: - Use the first letter of the last name and the year as reference (this should be exactly the short form). It is more less also described here [1]. - Highlight publications of a certain author with an extra char (e.g. '>') Here is a minimal example (lets assume, every occurrence of Knuth should be highlighted): ``` \setupinteraction[state=start] \startbuffer[testdata] @Book{knuth1, author = {Donald E. Knuth}, title = {TEX and METAFONT. New directions in typesetting}, year = {1979}, publisher = {Addison-Wesley}, } @Article{someother, author = {Some Person and Some Otherperson}, title = {Another title}, year = {1900}, } \stopbuffer % enable tracing \enabletrackers[publications, publications.crossref, publications.details, publications.cite, publications.strings] \usebtxdataset[main][testdata.buffer] \usebtxdefinitions[aps] \setupbtx[dataset=main] \definebtxrendering[bibrendering][aps][dataset=main] % this seems to have no effect? \setupbtx[alternative=short] \starttext Knuth developed \TeX \cite[knuth1]. Several persons said something \cite[someother]. \placelistofpublications[bibrendering] \stoptext ``` It should be rendered as: ``` Knuth developed TeX [>Knu79]. Several persons said something [PO00]. [Knu79] D.E. Knuth, TEX and METAFONT. New directions in typesetting (Addison-Wesley, 1979). [PO00] S. Person and S. Otherperson, Another title, (1900). ``` How can I achieve that \cite[something] always renders in the short form by default? How can I customize that references to Knuth contain this extra '>'? How can I customize the APS style to also use the short form in the list of publications instead of numbers? Best Gerion [1] https://tex.stackexchange.com/questions/295444/citation-style-with-first-letters-of-authors-lastname signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Wiki - question about Command/ pages which start with a space character
Hi all, Is it on purpose that 128 pages "https://wiki.contextgarden.net/Command/ " start with a space character ? I didn't find an explanation in https://wiki.contextgarden.net/Command For example, these two pages exist : - https://wiki.contextgarden.net/Command/startbuffer - https://wiki.contextgarden.net/Command/_startbuffer If it is on purpose: - What is the purpose, and which page should contain which documentation? If it is not: - Is there a way to automatically merge the content of the couple of pages, and to remove the "wrong" pages, or should it be done manually ? Thanks for your help. List : Command/ attachment Command/ background Command/ bar Command/ beginblock Command/ button Command/ characterkerning Command/ comment Command/ completecombinedlist Command/ completelistoffloats Command/ completelistofsorts Command/ completelistofsynonyms Command/ completeregister Command/ copylabeltext Command/ ctxfunction Command/ ctxfunctiondefinition Command/ currentlabel Command/ delimitedtext Command/ description Command/ enumeration Command/ fence Command/ fraction Command/ framed Command/ framedtext Command/ getbuffer Command/ hbox Command/ help Command/ high Command/ highlight Command/ label Command/ labellanguage Command/ labeltext Command/ labeltexts Command/ language Command/ leftlabeltext Command/ linenote Command/ low Command/ lowhigh Command/ lowmidhigh Command/ margindata Command/ mathcommand Command/ mathdoubleextensible Command/ mathextensible Command/ mathframed Command/ mathmatrix Command/ mathornament Command/ mathoverextensible Command/ mathovertextextensible Command/ mathradical Command/ mathtriplet Command/ mathunderextensible Command/ mathundertextextensible Command/ mathunstacked Command/ nextparagraphs Command/ note Command/ ornament Command/ paragraphs Command/ placecombinedlist Command/ placefloat Command/ placelistoffloats Command/ placelistofsorts Command/ placelistofsynonyms Command/ placement Command/ placepairedbox Command/ placeregister Command/ presetlabeltext Command/ referenceformat Command/ register Command/ rightlabeltext Command/ script Command/ section Command/ seeregister Command/ setupcombinedlist Command/ setupitemgroup Command/ setuplabeltext Command/ setuppairedbox Command/ setupregister Command/ shift Command/ sorting Command/ startattachment Command/ startbackground Command/ startbuffer Command/ startcolumnset Command/ startcomment Command/ startdelimitedtext Command/ startdescription Command/ starteffect Command/ startenumeration Command/ startfittingpage Command/ startfloattext Command/ startformula Command/ startframedtext Command/ starthelp Command/ startindentedtext Command/ startitemgroup Command/ startlabeltext Command/ startlinenote Command/ startlines Command/ startmakeup Command/ startmathalignment Command/ startmathcases Command/ startmathmatrix Command/ startmixedcolumns Command/ startnarrower Command/ startnote Command/ startpagecolumns Command/ startparagraphs Command/ startparallel Command/ startplacefloat Command/ startplacepairedbox Command/ startsection Command/ startsectionblock Command/ startstartstop Command/ startstop Command/ startstyle Command/ starttabulate Command/ starttextbackground Command/ starttyping Command/ startviewerlayer Command/ startxtable Command/ stoplinenote Command/ style Command/ synonym Command/ textbackground Command/ textnote Command/ tooltip Command/ type Command/ typebuffer Command/ unit ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \intertext and highlighting with \alignhere/\breakhere
On 3/13/2024 12:26 PM, Mikael Sundqvist wrote: Hi, On Wed, Mar 13, 2024 at 11:37 AM Max Chernoff wrote: Hi Hans, On Tue, 2024-03-12 at 15:21 +0100, Hans Hagen wrote: the next upload will support the attached ... so no ugly hacky code needed "\texthere[inbetween]" looks perfect, thanks! The "\definebar[...][inlined]" doesn't look quite right though -- the issue that I'm having is that I can't figure out how to highlight across both sides of an \alignhere without any questionable hacks. Unless the new "inlined" does work across an \alignhere and I'm just not seeing it in the example. Thanks again, -- Max I can confirm that it works over \alignhere. Hans is doing some black magic, but I guess he did not want to show off by including the whole line. Indeed, no need to show of the obvious \definebar [mybar] [backgroundbar] [height=\strutht,depth=\strutdp,offset=.250ex,color=red] \definebar [yourbar] [backgroundbar] [height=\strutht,depth=\strutdp,offset=.125ex,color=blue] \definebar [ourbar] [backgroundbar] [height=\strutht,depth=\strutdp,offset=.125ex,color=green] \starttext \startTEXpage[width=4cm] \startformula a \alignhere= b + c \breakhere \mybar {d + \yourbar{e \alignhere=} f \breakhere g \alignhere \ourbar{=} h} + i \stopformula \stopTEXpage \stoptext Especially when it would not pass the rigourous accessibility check (esp wrt color) of your university, 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 - inter-001.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 / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \intertext and highlighting with \alignhere/\breakhere
Hi, On Wed, Mar 13, 2024 at 11:37 AM Max Chernoff wrote: > > Hi Hans, > > On Tue, 2024-03-12 at 15:21 +0100, Hans Hagen wrote: > > the next upload will support the attached ... so no ugly hacky code needed > > "\texthere[inbetween]" looks perfect, thanks! > > The "\definebar[...][inlined]" doesn't look quite right though -- the > issue that I'm having is that I can't figure out how to highlight across > both sides of an \alignhere without any questionable hacks. Unless the > new "inlined" does work across an \alignhere and I'm just not seeing it > in the example. > > Thanks again, > -- Max I can confirm that it works over \alignhere. Hans is doing some black magic, but I guess he did not want to show off by including the whole line. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \intertext and highlighting with \alignhere/\breakhere
Hi Hans, On Tue, 2024-03-12 at 15:21 +0100, Hans Hagen wrote: > the next upload will support the attached ... so no ugly hacky code needed "\texthere[inbetween]" looks perfect, thanks! The "\definebar[...][inlined]" doesn't look quite right though -- the issue that I'm having is that I can't figure out how to highlight across both sides of an \alignhere without any questionable hacks. Unless the new "inlined" does work across an \alignhere and I'm just not seeing it in the example. Thanks again, -- Max ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \intertext and highlighting with \alignhere/\breakhere
On 3/12/2024 8:57 AM, Max Chernoff wrote: Hi all, Often I want to include a sentence/paragraph in the middle of a long multipart formula. With the old \startalign/\stopalign formulas, I could use \intertext{...} to do this, but this doesn't work with the new \alignhere/\breakhere formulas. I've managed to find a "solution" for this, although I'd prefer something a bit less hacky. Any ideas? Also, is there a way to highlight an equation across an \alignhere? Once again, I've found a "solution", but like before, it's pretty hacky. Example files are attached. the next upload will support the attached ... so no ugly hacky code needed 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 - inter-001.pdf Description: Adobe PDF document \definebar[mybar][inlined][offset=.25ex,color=red] \starttext \startformula a \alignhere= b + c \breakhere \mybar {d + e} \alignhere= f \breakhere g \alignhere= h + i \stopformula \page \samplefile{knuth} \startformula \text{something} + \text{really} + \text{really} + \text{long} \alignhere= \sqrt{x} \numberhere \texthere[inbetween]{\input{knuth}} d \alignhere= e + f \numberhere \breakhere g \alignhere= h + i \breakhere j \alignhere= k + l \stopformula \samplefile{knuth} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \intertext and highlighting with \alignhere/\breakhere
On 3/12/2024 8:57 AM, Max Chernoff wrote: Hi all, Often I want to include a sentence/paragraph in the middle of a long multipart formula. With the old \startalign/\stopalign formulas, I could use \intertext{...} to do this, but this doesn't work with the new \alignhere/\breakhere formulas. I've managed to find a "solution" for this, although I'd prefer something a bit less hacky. Any ideas? Also, is there a way to highlight an equation across an \alignhere? Once again, I've found a "solution", but like before, it's pretty hacky. Example files are attached. maybe \starttexdefinition protected newintertext #1 \leftparbox [global] { \vadjust pre \bgroup \forgetall \vskip.5\strutdp % needs to be more clever in the end \dontleavehmode\vtop\bgroup #1 \egroup \egroup } \breakhere \stoptexdefinition but i need to discuss it with Mikael as we might integrate something better and then it needs to be documented (in the upcoming manual) as well Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] \intertext and highlighting with \alignhere/\breakhere
Hi all, Often I want to include a sentence/paragraph in the middle of a long multipart formula. With the old \startalign/\stopalign formulas, I could use \intertext{...} to do this, but this doesn't work with the new \alignhere/\breakhere formulas. I've managed to find a "solution" for this, although I'd prefer something a bit less hacky. Any ideas? Also, is there a way to highlight an equation across an \alignhere? Once again, I've found a "solution", but like before, it's pretty hacky. Example files are attached. Thanks, -- Max \setupindenting[yes, 3em] \setuphead[section][page=yes] \unprotect \newbox\intertext_tmp_box \newdimen\intertext_tmp_dimen \starttexdefinition protected newintertext #1 \texthere[left]{ \setbox\intertext_tmp_box=\hbox{ \startframedtext[ offset=none, width=\hsize, frame=off, ] \parindent = \v_spac_indentation_normal \noindent #1 \stopframedtext } \global\intertext_tmp_dimen = \ht\intertext_tmp_box \vbox to 0pt{ \vskip\dimexpr 1ex - \baselineskip \relax \box\intertext_tmp_box \vss } \aftergrouped{ \aftergrouped{ \vadjust{ \penalty 1 \vskip\dimexpr \intertext_tmp_dimen - \baselineskip \relax } } } } \breakhere \stoptexdefinition \protect \starttext \section{Old alignment} \samplefile{knuth} \placeformula\startformula\startalign \NC \text{something} + \text{really} + \text{really} + \text{long} \NC= \sqrt{x} \NR[+] \intertext{\samplefile{knuth}} \NC d \NC= e + f \NR[+] \NC g \NC= h + i \stopalign\stopformula \samplefile{knuth} \section{“I expect to see \tex{noalign} only after the \tex{cr} of an alignment.”} \starttyping \samplefile{knuth} \startformula \text{something} + \text{really} + \text{really} + \text{long} \alignhere= \sqrt{x} \numberhere \breakhere \intertext{\samplefile{knuth}} d \alignhere= e + f \numberhere \breakhere g \alignhere= h + i \stopformula \samplefile{knuth} \stoptyping \section{Alignment not kept} \samplefile{knuth} \startformula \text{something} + \text{really} + \text{really} + \text{long} \alignhere= \sqrt{x} \numberhere \stopformula \samplefile{knuth} \startformula d \alignhere= e + f \numberhere \breakhere g \alignhere= h + i \stopformula \samplefile{knuth} \section{My hack} \samplefile{knuth} \startformula \text{something} + \text{really} + \text{really} + \text{long} \alignhere= \sqrt{x} \numberhere \breakhere \newintertext{\samplefile{knuth}} d \alignhere= e + f \numberhere \breakhere g \alignhere= h + i \stopformula \samplefile{knuth} \stoptext \unprotect \newbox\hightlight_tmp_box \definemathframed[_highlight][ location=mathematics, frame=off, background=color, backgroundcolor=lightred, backgroundoffset=0.25ex, ] \tolerant\def\highlighthere#1\alignhere#2#3\breakhere{% \setbox\hightlight_tmp_box=\hbox{% \m{% \forcedisplaymath% #1#2\null% }% }% \alignhere% \phantom{% \null#2\null% }% \mskip -8mu% \hskip -\wd\hightlight_tmp_box% \lower 1ex \hbox{% \_highlight[ loffset=\wd\hightlight_tmp_box, location=keep ]{% \hskip -\wd\hightlight_tmp_box% \forcedisplaymath% #1#2#3% }% }% \breakhere% } \protect \starttext \startformula a \alignhere= b + c \breakhere \highlighthere d + e \alignhere= f \breakhere g \alignhere= h + i \stopformula \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: vim syntax highlighting bug?
Thanks for your effort! I have the same problem in Neovim and linked the pull request there: https://github.com/neovim/neovim/issues/26966 Best, Gerion Am Montag, 8. Januar 2024, 12:16:14 CET schrieb Vincent Hennebert: > I was in touch with the maintainer of the context.vim syntax file about > this. It turns out to be an issue with the lua.vim file that is included > in the context one. Lua.vim highlights trailing parentheses as errors, > but that’s done in a way that doesn’t work well when the file is > included by other syntax files. It somehow steals the syntax context and > makes Vim stay in Lua mode when it should go back to ConTeXt mode (I’m > not too savvy of the details). > > The maintainer came up with a workaround [1] to force returning to > ConTeXt mode, although the parenthesis remains highlighted as an error. > > That highlight bothers me, so my own workaround is to copy the lua.vim > file in my own .vim/syntax folder and comment out the ‘syn match > luaParenError ")"’ line (l.61 in my Vim version). > > Maybe playing with the ‘contained’ keyword (in lua.vim) could lead to a > proper solution, but I’m happy enough with my workaround that I haven’t > felt the need to investigate this issue any further. > > Hope that helps, > Vincent > > [1] https://github.com/vim/vim/pull/13778 > > On 06/01/2024 12:28, Damien Thiriet via ntg-context wrote: > > Hello, > > > > > > Happy New Year! > > > > I got into a bug in my Vim syntax highlighting version. > > Highlight stays in lua mode after ctxlua macro is closed. > > Here is a MWE, where «this should not be highlitghted as > > a comment indeed is. > > > > \starttext > > > > Hello! > > \ctxlua{context("does the parser work?")} > > > > -- this should not be highlighted as a comment > > > > \stoptext > > > > Do other Vim users come into this? > > Is my syntax file outdated? > > > > I am using this Vim version on OpenBSD 7.3 -stable: > > VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep 6 2023 08:55:14) > > Included patches: 1-1876 > > > > Best regards, > > > > Damien Thiriet signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: vim syntax highlighting bug?
I was in touch with the maintainer of the context.vim syntax file about this. It turns out to be an issue with the lua.vim file that is included in the context one. Lua.vim highlights trailing parentheses as errors, but that’s done in a way that doesn’t work well when the file is included by other syntax files. It somehow steals the syntax context and makes Vim stay in Lua mode when it should go back to ConTeXt mode (I’m not too savvy of the details). The maintainer came up with a workaround [1] to force returning to ConTeXt mode, although the parenthesis remains highlighted as an error. That highlight bothers me, so my own workaround is to copy the lua.vim file in my own .vim/syntax folder and comment out the ‘syn match luaParenError ")"’ line (l.61 in my Vim version). Maybe playing with the ‘contained’ keyword (in lua.vim) could lead to a proper solution, but I’m happy enough with my workaround that I haven’t felt the need to investigate this issue any further. Hope that helps, Vincent [1] https://github.com/vim/vim/pull/13778 On 06/01/2024 12:28, Damien Thiriet via ntg-context wrote: Hello, Happy New Year! I got into a bug in my Vim syntax highlighting version. Highlight stays in lua mode after ctxlua macro is closed. Here is a MWE, where «this should not be highlitghted as a comment indeed is. \starttext Hello! \ctxlua{context("does the parser work?")} -- this should not be highlighted as a comment \stoptext Do other Vim users come into this? Is my syntax file outdated? I am using this Vim version on OpenBSD 7.3 -stable: VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep 6 2023 08:55:14) Included patches: 1-1876 Best regards, Damien Thiriet ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: vim syntax highlighting bug?
Hello on my installation, it's working: [image: image.png] But I'm on an old version on debian: VIM - Vi IMproved 8.2 (2019 Dec 12 kompiliert am Oct 01 2021 01:51:08) Inklusive der Patches: 1-2434 Extra Patches: 8.2.3402, 8.2.3403, 8.2.3409, 8.2.3428 Perhaps something has changed in version 9.0... Hope it helps Christian Am Sa., 6. Jan. 2024 um 13:04 Uhr schrieb Damien Thiriet via ntg-context < ntg-context@ntg.nl>: > Hello, > > > Happy New Year! > > I got into a bug in my Vim syntax highlighting version. > Highlight stays in lua mode after ctxlua macro is closed. > Here is a MWE, where «this should not be highlitghted as > a comment indeed is. > > \starttext > > Hello! > \ctxlua{context("does the parser work?")} > > -- this should not be highlighted as a comment > > \stoptext > > Do other Vim users come into this? > Is my syntax file outdated? > > I am using this Vim version on OpenBSD 7.3 -stable: > VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep 6 2023 08:55:14) > Included patches: 1-1876 > > Best regards, > > Damien Thiriet > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] vim syntax highlighting bug?
Hello, Happy New Year! I got into a bug in my Vim syntax highlighting version. Highlight stays in lua mode after ctxlua macro is closed. Here is a MWE, where «this should not be highlitghted as a comment indeed is. \starttext Hello! \ctxlua{context("does the parser work?")} -- this should not be highlighted as a comment \stoptext Do other Vim users come into this? Is my syntax file outdated? I am using this Vim version on OpenBSD 7.3 -stable: VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep 6 2023 08:55:14) Included patches: 1-1876 Best regards, Damien Thiriet ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Enable interaction on custom apa cite variant
Hi, I would like a variant of cite per the APA specification that removes the bracket when quoted in mathematical definitions, theorems, etc. I could of course do it manually for reach using right= and left= but I didn't want to do it every time. I have come up with this MWE: \startbuffer[ref] @book{burago2022course, title={A course in metric geometry}, author={Burago, Dmitri and Burago, Yuri and Ivanov, Sergei}, volume={33}, year={2022}, publisher={American Mathematical Society} } \stopbuffer \setupinteraction[state=start, color=blue] \setupcolors[state=start] \usebtxdataset[ref.buffer] \usebtxdefinitions[apa] \definebtx [apa:cite:theorem] [apa:cite] \startsetups btx:apa:cite:theorem \btxflushauthorname{author} \btxcomma \btxflush{year} \fastsetup{btx:cite:righttext} \stopsetups \setupenumeration[ before={\blank[medium]}, after={\blank[medium]}, alternative=serried, right=, headcommand=\groupedcommand{}{.}, distance=0.5em, width=fit, headstyle=bold, titlestyle=bold, way=bytext, conversion=numbers, prefix=chapter, list=all, title=yes, indentnext=no, ] \defineenumeration[definition][ text=Defintion, style=normal, number=no, ] \starttext \startdefinition{\cite[righttext={{ p.\nbsp 1}}, alternative=theorem][burago2022course]} This is something \stopdefinition \startsubject[title={References}] \placelistofpublications \startsubject \stoptext The problem with this is that the citation is not interactive like it would be if I used apa:cite:authoryear and just removed the parentheses in the options. How do I get it to highlight blue and be interactive like the default behaviour when you turn on interaction? Also this is probably overkill so if there is a better way to achieve this... Jethro ___ 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] Re: Custom highlight ConTeXt syntax in AUCTEX
It does not highlight e.g \starttext keyword by default. The colorscheme seems adapted to LaTeX mode so I managed to fix this now for all \start - \stop commands with this code put in ~/.emacs.d/init.el (add-hook ’ConTeXt-mode-hook (lambda () (font-lock-add-keywords nil ’((”\\(start\\w*\\)\\>” 1 font-lock-function-name-face t) (”\\(stop\\w*\\)\\>” 1 font-lock-function-name-face t) And the regexp was done with help from interactive inbuilt function re-builder in emacs The next goal is to highlight variabels like \textwidth for example Thanks for feedback /Jan-erik Skickat från min iPhone > 19 juli 2023 kl. 17:20 skrev Henning Hraban Ramm : > > Am 19.07.23 um 15:38 schrieb Jan-Erik Hägglöf: >> Dear All! >> I've been using emacs AUCTEX for quite a while and found it very convenient >> to work with. >> One issue is the lack of syntax highlighting. > > https://wiki.contextgarden.net/Text_Editors says, Emacs has ConTeXt support > including syntax highlighting. > > I don’t use Emacs, so I don’t know how to activate/configure it. > Maybe it expects a different file extension, like .ctx? > > 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] Re: Custom highlight ConTeXt syntax in AUCTEX
Am 19.07.23 um 15:38 schrieb Jan-Erik Hägglöf: Dear All! I've been using emacs AUCTEX for quite a while and found it very convenient to work with. One issue is the lack of syntax highlighting. https://wiki.contextgarden.net/Text_Editors says, Emacs has ConTeXt support including syntax highlighting. I don’t use Emacs, so I don’t know how to activate/configure it. Maybe it expects a different file extension, like .ctx? Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Custom highlight ConTeXt syntax in AUCTEX
Dear All! I've been using emacs AUCTEX for quite a while and found it very convenient to work with. One issue is the lack of syntax highlighting. I've tried some elisp code and added the following hook when I'm in ConTeXt-mode: (add-hook 'ConTeXt-mode-hook (lambda () (font-lock-add-keywords nil '(("\\(starttext\\)\\>" 1 font-lock-warning-face t) ("\\(stoptext\\)\\>" 1 font-lock-warning-face t) and it seems to highlight the start-stop text keyword. So my question is: Is there a way to accomplish a similar way of highlighting all other keywords that belongs to the ConTeXt typesetting syntax? Maybe a REGEXP (I'm not good at writing those) can do this in some way without manually write every start-stop sequence that exists. Have anyone, using AUCTEX, already did some customizing already who wants to share it with me. Many thanks in advance /Jan-Erik ___ 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] ConTeXt features in pandoc 3
Hello, a new version of pandoc, the universal document converter, was released two days ago; pandoc 3 comes with new ConTeXt-related features on which we've spend a good bit of time: - *Syntax highlighting*: Pandoc makes use of the syntax definitions and styles created by the KDE project to highlight source code. This already worked with HTML, LaTeX, and formats like docx, and is now also supported for ConTeXt. - *Inline code*: older versions of pandoc had some weird behavior wrt inline code in ConTeXt, switching between `\type` and `\mono`, which made it difficult to customize the output. This has been fixed. - *Tagging-focused output*: Calling pandoc with `--to=context+tagging` creates markup that is geared towards the creation of tagged PDFs. This can be combined with `-V pdfa=3a` to produce accessible PDFs from various input sources. - *Unlisted/unnumbered headings*: Headings with class "unnumbered" are not numbered; those with class "unlisted" get omitted from the ToC. - *Figures*: We have improved support for figures considerably, and now also support subfigures. This is currently most noticeable when converting from HTML to ConTeXt. Downloads and full changelog: https://github.com/jgm/pandoc/releases/tag/3.0 I'm grateful for any and all feedback, including tips on how to improve pandoc further. Cheers, Albert -- Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 ___ 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] bottlenecks
Am 16.12.22 um 18:10 schrieb Hans Hagen via ntg-context: So the challenge is how to determine bottlenecks. Are there users on this list that have document runs of more than 10 seconds (as reference: the luametatex manual takes < 9 seconds for 350 pages and loads plenty fonts and has many tables) or have many (small) runs and are annoyed by the runtime? And if so, what does one guess are the bottlenecks? (1) This is my 366 page ConTeXt book: mkiv lua stats > used config file: home:texmf/web2c/texmfcnf.lua;selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path: /Users/hraban/lmtx/tex/texmf-cache/luametatex-cache/context/c821363a6b068765c2a3bbfe3917fcf5 mkiv lua stats > resource resolver: loadtime 0.046 seconds, 1 scans with scantime 0.037 seconds, 0 shared scans, 165 found files, scanned paths: /Users/hraban/texmf mkiv lua stats > stored bytecode data: 507 modules (0.378 sec), 106 tables (0.017 sec), 613 chunks (0.395 sec) mkiv lua stats > traced context: maxstack: 3112, freed: 1448, unreachable: 1664 mkiv lua stats > cleaned up reserved nodes: 202 nodes, 22 lists of 517 mkiv lua stats > node memory usage: 1137 attribute, 46 dir, 559 glue, 82 gluespec, 177 glyph, 236 hlist, 3 kern, 647 mathspec, 48 penalty, 2 submlist, 2 temp mkiv lua stats > node list callback tasks: 13 unique task lists, 180 instances (re)created, 216502 calls mkiv lua stats > h-node processing time: 2.544 seconds including kernel mkiv lua stats > synctex tracing: 46 referenced files, 22 files ignored, 41808 objects flushed, logfile: prd_de.synctex mkiv lua stats > attribute processing time: 0.201 seconds front- and backend mkiv lua stats > driver time: 5.265 seconds mkiv lua stats > used backend: pdf mkiv lua stats > jobdata time: 0.271 seconds saving, 0.056 seconds loading mkiv lua stats > callbacks: file: 26780, saved: 405242, direct: 524, function: 281755, value: 2288, message: 0, bytecode: 613, late 0, total: 717202 (1960 per page) mkiv lua stats > randomizer: resumed with value 0.57895496379132 mkiv lua stats > v-node processing time: 1.464 seconds mkiv lua stats > loaded tex modules: 10 requested, all found (*-filter *-libs-imp-zint *-module-catcodes *-s-fonts-show *-s-symbols-show *-scite *-syntax-groups *-syntax-highlight *-vim *-visual) mkiv lua stats > loaded patterns: de::3 en::1, load time: 0.000 mkiv lua stats > xml load time: 0.002 seconds, 1 files, 1 converted mkiv lua stats > lxml preparation time: 0.000 seconds, 0 nodes, 31 lpath calls, 4 cached calls mkiv lua stats > interactive elements: 2536 references, 2870 destinations mkiv lua stats > margin data: 295 entries, 1 pending mkiv lua stats > loaded fonts: 31 files: latinmodern-math.otf, lmmono10-italic.otf, lmmono10-regular.otf, lmmonocaps10-regular.otf, lmmonolt10-bold.otf, lmmonolt10-boldoblique.otf, lmmonoltcond10-regular.otf, lmmonoslant10-regular.otf, lmroman10-bold.otf, lmroman10-italic.otf, lmroman10-regular.otf, lmromancaps10-regular.otf, lmsans10-oblique.otf, lmsans10-regular.otf, cc-icons.ttf, dejavusansmono.ttf, marvosym.ttf, font awesome 5 brands-regular-400.otf, font awesome 5 free-regular-400.otf, font awesome 5 free-solid-900.otf, cambria.ttc, cambriab.ttf, cambriai.ttf, cambriaz.ttf, segoe ui bold italic.ttf, segoe ui bold.ttf, segoe ui italic.ttf, segoe ui.ttf, segoepr.ttf, symbola.otf, unifrakturmaguntia.ttf (suspicious x height) mkiv lua stats > font engine: otf 3.131, afm 1.513, tfm 1.000, 193 instances, 157 shared in backend, 11 common vectors, 146 common hashes, load time 15.349 seconds mkiv lua stats > body font sizes: defined: 10pt 11pt 12pt 14.4pt 17.3pt 20.7pt 4pt 5pt 6pt 7pt 8pt 9pt, undefined: 11.2pt 14pt 16.8pt mkiv lua stats > visualization time: 0.154 seconds mkiv lua stats > metapost: 0.678 seconds, loading: 0.092, execution: 0.651, n: 528, average: 0.003, instances: 2, luacalls: 37745 (file: 31092, text: 0, script: 3507, log: 3146), memory: 8.825 M mkiv lua stats > math tweaking time: 8.659 seconds, 116 math goodie tables mkiv lua stats > math processing time: 0.012 seconds mkiv lua stats > graphics processing time: 2.885 seconds including tex, 247 processed images, 69 unique asked, 42 bad names mkiv lua stats > pdf annotations: 2536 links (2535 unique), 0 special mkiv lua stats > font embedding time: 0.084 seconds, 31 fonts mkiv lua stats > result saved in file: prd_de.pdf, compresslevel 1, objectcompresslevel 0 mkiv lua stats > positions: 6786 collected, 3635 deltas, 6678 shared partials, 46 partial entries mkiv lua stats > used platform: osx-64, type: unix, binary subtree: texmf-osx-64 mkiv lua stats > used engine: luametatex version: 2.1004, functionality level: 20221208, format id: 678, compiler: clang mkiv lua stats > tex properties: 740852 hash slots used of 2097152, 59643 control sequences, approximate m
Re: [NTG-context] synctex problem
Hi Alan, I have an almost identical set-up (M1, MacOS12.6, TexShop, useAlternatePath, useConTeXtSyncParser). One important difference, I use sync method: SyncTeX (TeX ≥ 2010) I’d recommend trying that. There are some other differences in my setup that probably are not important. At the beginning of my files (products and components)I only use the two lines % !TEX useAlternatePath % !TEX useConTeXtSyncParser not the root and TS-program lines, but I don’t think that matters for your SynchTeX issue. Here is the engine I use for LMTX, just in case it has something helpful for you. #!/bin/zsh # # This engine uses TeXShop's "Alternate Path", which is the variable "$3" below. # Set the TeXShop's alternate path to your ConTeXt installation in # TeXShop's Preferences -> Engine -> Alternate Path # Start ConTeXt source files with the lines: # % !TEX useAlternatePath # % !TEX useConTeXtSyncParser export OSFONTDIR=/Library/Fonts/:/System/Library/Fonts:$HOME/Library/Fonts export PATH="$3":$PATH mtxrun --autogenerate --script context --synctex "$1” I put that long comment in the engine because I share it with collaborators. Hope that helps! Gavin > On Oct 15, 2022, at 12:00 PM, Alan Bowen via ntg-context > wrote: > > At the top of a single source file, I have the lines: > % !TEX root = prd_Aestimatio-0301.tex % the root file > % !TEX TS-program = ConTeXt2021 > % !TEX useAlternatePath > % !TEX useConTeXtSyncParser >\setupsynctex[state=start, method=max] > > Syncing works well enough—though I can see no difference between method =min > and method=max, both highlight only a few words and not the entire text to be > synced, but perhaps my expectations are out of line. > > When I have these lines at the top of a component file and typeset the > product file, I get a rootfile.synctex file, but syncing itself goes awry. > Nothing happens when I sync from the PDf file to the component file, and when > I sync from the component file to the product PDF, I get the correct page but > no highlighting. > > I am using TeXShop ver. 5.03— > sync method: Both Pdf Sync and Search > Alternative Path: > /Users/bowen1/Applications/LuaMetaTeX/tex/texmf-osx-arm64/bin > > and also the latest ConteXt (ver. 2022.10.15 10:37 LMTX) under macOS 12.6 > (Apple M1 Pro chip) > > Note: the product file has only one component file for now. > > I suspect that I am missing something but am not sure where to look or what > to do now. Any guidance will be much appreciated. > > 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 > ___ ___ 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] synctex problem
At the top of a single source file, I have the lines: % !TEX root = prd_Aestimatio-0301.tex % the root file % !TEX TS-program = ConTeXt2021 % !TEX useAlternatePath % !TEX useConTeXtSyncParser \setupsynctex[state=start, method=max] Syncing works well enough—though I can see no difference between method =min and method=max, both highlight only a few words and not the entire text to be synced, but perhaps my expectations are out of line. When I have these lines at the top of a component file and typeset the product file, I get a rootfile.synctex file, but syncing itself goes awry. Nothing happens when I sync from the PDf file to the component file, and when I sync from the component file to the product PDF, I get the correct page but no highlighting. I am using TeXShop ver. 5.03— sync method: Both Pdf Sync and Search Alternative Path: /Users/bowen1/Applications/LuaMetaTeX/tex/texmf-osx-arm64/bin and also the latest ConteXt (ver. 2022.10.15 10:37 LMTX) under macOS 12.6 (Apple M1 Pro chip) Note: the product file has only one component file for now. I suspect that I am missing something but am not sure where to look or what to do now. Any guidance will be much appreciated. Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Quick way to proofread / check index entries?
> On 3 Sep 2022, at 19:51, Bruce Horrocks via ntg-context > wrote: > > My own fault for not thinking head :-) but I have a largeish text with a lot > of \index{...} entries. To make life easier for the proofreader I would like > to temporarily redefine \index to wrap it or replace it with something that > will highlight indexed items in the text where they occur, e.g. change their > colour. > > I could do this with a global find and replace (across many files) to replace > \index with \MyIndex, say, and then define a \MyIndex that understands the > various parameter options but this is a hassle. Before I do this, is there > anything already pre-built? > > The ultimate aim is to enable a proofreader to see each indexed term where it > appears in order to judge whether the term deserves to be in the index at > all. (Working backwards from the index itself is possible but clicking a page > number, trying to find the term on the page, then reading the context to make > a decision is quite hard work - much easier to read through and deal with the > terms as they appear.) Thanks for the suggestions Richard and Mikael. For the benefit of the list I went with the following quick'n'dirty™ approach which will be good enough: \def\index{\dosingleempty\debugIndex} \def\debugIndex[#1]#2{% \iffirstargument \null% Ignore it for now \else \inmargin[color=blue,stack=yes,style=ssxx]{#2}% \fi } \def\startregister{\dotripleempty\debugStartRegister} \def\debugStartRegister[#1][#2][#3]#4{% \inmargin[color=darkgreen,stack=yes,style=ssxx]{↓ #2}% } \def\stopregister[#1][#2]{\inmargin[color=darkred,stack=yes,style=ssxx]{↑ #2}} — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Quick way to proofread / check index entries?
Den sön 4 sep. 2022 08:59Richard Mahoney via ntg-context skrev: > Bruce, > > Did something of the sort a while back: redefined the index command to > something short, in capitals; then adjusted the syntax highlighting to pick > up the code. This was for emacs + auctex, so it was just a case of > adjusting one of the stock auctex files. I think Scite may let one do > something similar. > > Richard > > > -- > *T* +6433121699 *M* +64210640216 > rmaho...@indica-et-buddhica.org > https://indica-et-buddhica.org/ > > *Indica et Buddhica* > Littledene Bay Road Oxford NZ > NZBN: 9429041761809 > > > - Original message - > From: Bruce Horrocks via ntg-context > To: ntg-context mailing list > Cc: Bruce Horrocks > Subject: [NTG-context] Quick way to proofread / check index entries? > Date: Sunday, 4 September 2022 06:51 > > My own fault for not thinking head :-) but I have a largeish text with a > lot of \index{...} entries. To make life easier for the proofreader I would > like to temporarily redefine \index to wrap it or replace it with something > that will highlight indexed items in the text where they occur, e.g. change > their colour. > > I could do this with a global find and replace (across many files) to > replace \index with \MyIndex, say, and then define a \MyIndex that > understands the various parameter options but this is a hassle. Before I do > this, is there anything already pre-built? > > The ultimate aim is to enable a proofreader to see each indexed term where > it appears in order to judge whether the term deserves to be in the index > at all. (Working backwards from the index itself is possible but clicking a > page number, trying to find the term on the page, then reading the context > to make a decision is quite hard work - much easier to read through and > deal with the terms as they appear.) > > — > Bruce Horrocks > Hampshire, UK > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > > > > ___ > 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 > > ___ > Not by the computer, so cannot test, but I found these in an old document of mine: \enabletrackers[nodes.destinations] \enabletrackers[nodes.references] \usemodule[references-show] I hope it helps. /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 ___
Re: [NTG-context] Quick way to proofread / check index entries?
Bruce, Did something of the sort a while back: redefined the index command to something short, in capitals; then adjusted the syntax highlighting to pick up the code. This was for emacs + auctex, so it was just a case of adjusting one of the stock auctex files. I think Scite may let one do something similar. Richard -- *T* +6433121699 *M* +64210640216 rmaho...@indica-et-buddhica.org https://indica-et-buddhica.org/ *Indica et Buddhica* Littledene Bay Road Oxford NZ NZBN: 9429041761809 - Original message - From: Bruce Horrocks via ntg-context To: ntg-context mailing list Cc: Bruce Horrocks Subject: [NTG-context] Quick way to proofread / check index entries? Date: Sunday, 4 September 2022 06:51 My own fault for not thinking head :-) but I have a largeish text with a lot of \index{...} entries. To make life easier for the proofreader I would like to temporarily redefine \index to wrap it or replace it with something that will highlight indexed items in the text where they occur, e.g. change their colour. I could do this with a global find and replace (across many files) to replace \index with \MyIndex, say, and then define a \MyIndex that understands the various parameter options but this is a hassle. Before I do this, is there anything already pre-built? The ultimate aim is to enable a proofreader to see each indexed term where it appears in order to judge whether the term deserves to be in the index at all. (Working backwards from the index itself is possible but clicking a page number, trying to find the term on the page, then reading the context to make a decision is quite hard work - much easier to read through and deal with the terms as they appear.) — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ 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] Quick way to proofread / check index entries?
My own fault for not thinking head :-) but I have a largeish text with a lot of \index{...} entries. To make life easier for the proofreader I would like to temporarily redefine \index to wrap it or replace it with something that will highlight indexed items in the text where they occur, e.g. change their colour. I could do this with a global find and replace (across many files) to replace \index with \MyIndex, say, and then define a \MyIndex that understands the various parameter options but this is a hassle. Before I do this, is there anything already pre-built? The ultimate aim is to enable a proofreader to see each indexed term where it appears in order to judge whether the term deserves to be in the index at all. (Working backwards from the index itself is possible but clicking a page number, trying to find the term on the page, then reading the context to make a decision is quite hard work - much easier to read through and deal with the terms as they appear.) — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] MetaPost label font size
On 7/6/2022 1:36 PM, Henning Hraban Ramm via ntg-context wrote: Am 06.07.22 um 12:45 schrieb Hans Hagen via ntg-context: On 7/6/2022 12:19 PM, fv leung via ntg-context wrote: My stupid way to get labels of different sizes: \starttext \startMPcode label("normal label", (0, 0)); label("\setsmallbodyfont small label", (0, 18)); label("\setbigbodyfont big label", (0, -18)); \stopMPcode \stoptext nothing stupid about that ... it's how i would do it Okay. So there’s really no possibility to adapt whatever defines the label font size except defaultfontsize inbetween? Strange. My solution so far was to split the picture and re-combine it afterwards. well, if there would be another way you would find it strange there if that would interfere with whatever else goes into a label text because we support arbitrary tex ... no way to figure out what struts, line distances, spacing, either of not adapt to current situation, delayed vs immediate inclusion, etc ... you can't have both worlds if course you can make some macro (or define a highlight) and use that in the labels 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 ___
[NTG-context] textbackground for text of different size
Dear List, the red highlight block in the following example is not covering the two 40pt characters: \definetextbackground[important][frame=no,background=color,backgroundcolor=red] \starttext abc\important{123{\switchtobodyfont[40pt]45}xy}z \stoptext Is there an option that fixes this? Thanks! Best, Sylvain ___ 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] A not so short introduction to ConTeXt - French version - progress report.
I think it's a fantastic reorganization of the material. And I am proud to have been, in a way, its promoter. But I understand that the fairest thing to do is to remove my name from the authorship of the text, to put the name of the real author, and, if anything, in the credits and copyright page, to indicate that it is inspired by a text written by me. I am not saying this because I don't like the text, on the contrary. I say it because I don't deserve to be attributed the authorship of something that someone else has written and that implies more knowledge about ConTeXt than I have. In fact I am going to study it carefully. Thank you very much, Garulfo. It would be desirable that through initiatives of this type we manage to generate a good introductory literature to this fantastic text composition system that is ConTeXt. El 14/7/21 a las 23:51, Garulfo escribió: Hi all, concerning the fr version of "not so short introduction to ConTeXt" I have just finished an attempt to reorganise the content. It is in "fr2" directory in the Github repository https://github.com/contextgarden/not-so-short-introduction-to-context It results from many many "copy/paste". I still have to review all the pages and flow between each section … (and after to switch to the french interface of ConTeXt commands …). New Table of Content Part 1 - source code basics --- - source file - syntax - file organization Part 2 - Markup --- - Chapter 2.1 - Main information flow Mostly linear flow From micro to more "structured + macro" items - Paragraphes - Emphase de mots - Emphase de paragraphes - Encadrement - Lignes et traits - Citations - Listes structurées - Description et énumération - Textes tabulés - Tableaux - Images et Combinaisons - Objets flottants - Sections - Macro-structure - Page de couverture et de titre - Mathématiques - Colonnes - Autres éléments spécialisés - Chapter 2.2 - Complements to the main information flow Much less linear, it brings links, connexions - Table des matières - Abréviations et glossaire - Notes de bas de page - Notes marginales - Pièces jointes - Références internes - Références externes - Références bibliographiques - Listes des images, tableaux... - Index Part 3 - Typesetting "overall" - - Page layout - En-tête et pied de page - Polices - Couleurs - Langue - Interactivité Part 4 - Typesetting "specific" - - mirror of Part 2 3 principles for this new organization : 1/ clearly split "markup" and "typesetting/formatting" in order to - help the reader to tidy up concepts / ideas - deal with the markup (part 2) in as few as possible pages - <60 pages - one topic = 1 or 2 pages - no - prepare user to use env files - limit digression as much as possible 2/ clearly split "main flow" and "complements to main flow" in order to - again help the reader to tidy up concepts / ideas - highlight the fact that complements are usually used to enrich the main flow with "non-linearity" 3/ clearly split "general/global" and "specific/local" typesettings in order to - again help the reader to tidy up concepts / ideas - prepare user to organise his env files You can find a one page summary here : https://raw.githubusercontent.com/contextgarden/not-so-short-introduction-to-context/main/fr2/introCTX_fra.pdf#page=11 The 8 following pages provide a quick visual overview of the 28 topics that will be detailed in "part 2" and "part 4". Links help the reader to go on the associated pages (markup or typesetting) Any comment or idea is welcome. ___ 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 ___ -- Joaquín Ataz López Derecho C
[NTG-context] A not so short introduction to ConTeXt - French version - progress report.
Hi all, concerning the fr version of "not so short introduction to ConTeXt" I have just finished an attempt to reorganise the content. It is in "fr2" directory in the Github repository https://github.com/contextgarden/not-so-short-introduction-to-context It results from many many "copy/paste". I still have to review all the pages and flow between each section … (and after to switch to the french interface of ConTeXt commands …). New Table of Content Part 1 - source code basics --- - source file - syntax - file organization Part 2 - Markup --- - Chapter 2.1 - Main information flow Mostly linear flow From micro to more "structured + macro" items - Paragraphes - Emphase de mots - Emphase de paragraphes - Encadrement - Lignes et traits - Citations - Listes structurées - Description et énumération - Textes tabulés - Tableaux - Images et Combinaisons - Objets flottants - Sections - Macro-structure - Page de couverture et de titre - Mathématiques - Colonnes - Autres éléments spécialisés - Chapter 2.2 - Complements to the main information flow Much less linear, it brings links, connexions - Table des matières - Abréviations et glossaire - Notes de bas de page - Notes marginales - Pièces jointes - Références internes - Références externes - Références bibliographiques - Listes des images, tableaux... - Index Part 3 - Typesetting "overall" - - Page layout - En-tête et pied de page - Polices - Couleurs - Langue - Interactivité Part 4 - Typesetting "specific" - - mirror of Part 2 3 principles for this new organization : 1/ clearly split "markup" and "typesetting/formatting" in order to - help the reader to tidy up concepts / ideas - deal with the markup (part 2) in as few as possible pages - <60 pages - one topic = 1 or 2 pages - no - prepare user to use env files - limit digression as much as possible 2/ clearly split "main flow" and "complements to main flow" in order to - again help the reader to tidy up concepts / ideas - highlight the fact that complements are usually used to enrich the main flow with "non-linearity" 3/ clearly split "general/global" and "specific/local" typesettings in order to - again help the reader to tidy up concepts / ideas - prepare user to organise his env files You can find a one page summary here : https://raw.githubusercontent.com/contextgarden/not-so-short-introduction-to-context/main/fr2/introCTX_fra.pdf#page=11 The 8 following pages provide a quick visual overview of the 28 topics that will be detailed in "part 2" and "part 4". Links help the reader to go on the associated pages (markup or typesetting) Any comment or idea is welcome. ___ 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] weekend upload
Dear Aditya, Thank you for your code and an explanation. > Let's assume that the last MPpage was a \startuseMPgraphic{boxes} > \stopuseMPgraphic. Suppose I wanted to use these pictures in a presentation. > On the first slide, I can use > >\useMPgraphic[stacking=0]{boxes} > > to show the three boxes, and on the next slide, I can use > >\useMPgraphic[stacking={-1,0}]{boxes} > I tried to reproduce your example using \startuseMPgraphic{boxes} … \stopuseMPgraphic, and useMPgraphic[stacking=0]{boxes} . A modified one of your code is below. There is no error message but no output at all. Would you please tell me what is wrong in here? Best regards, Dalyoung \startMPdefinitions input boxes; primarydef a +- b = a -- (xpart a, ypart b) -- b enddef ; primarydef a -+ b = a -- (xpart b, ypart a) -- b enddef ; \stopMPdefinitions \defineframed [boxframed] [ width=6em, height=2\lineheight, align={middle,lohi}, background=color, backgroundcolor=blue, foregroundcolor=white, forefroundstyle=bold, ] \startuseMPgraphic[offset=2mm]{boxes} boxit.A("\boxframed{Box A}"); boxit.B("\boxframed{Box B}"); boxit.C("\boxframed{Box C}"); defaultdx := 0pt; defaultdy := 0pt; A.c = origin; B.w - A.e = (1cm, 0); 0.5[ A.s, B.s ] - C.n = (0, 1cm); stacking := 0; drawunboxed(A,B,C); stacking := 1; drawarrow A.s +- C.w ; drawarrow B.s +- C.e ; newpath highlight; highlight := (A.sw -- B.se -- B.ne -- A.nw) enlarged EmWidth; fill highlight withcolor "darkgray" withstacking -1; \stopuseMPgraphic \starttext \useMPgraphic[stacking={0}]{boxes} \useMPgraphic[stacking={0,1}]{boxes} \useMPgraphic[stacking=-1]{boxes} \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] weekend upload
On 7/12/2021 12:12 PM, Floris van Manen wrote: with the latest version not everything gets drawn as intended. $ context --version mtx-context | ConTeXt Process Management 1.04 mtx-context | current version: 2021.07.10 21:51 On 12/07/2021 10:07, Hans Hagen wrote: I need to ckeck if the range checked does negative numbers ... anyway, you can do this \startMPpage[offset=2mm, stacking={1,2,3,4}] boxit.A("\boxframed{Box A}"); boxit.B("\boxframed{Box B}"); boxit.C("\boxframed{Box C}"); defaultdx := 0pt; defaultdy := 0pt; A.c = origin; B.w - A.e = (1cm, 0); 0.5[ A.s, B.s ] - C.n = (0, 1cm); draw image (drawunboxed(A,B,C)) withstacking 2; drawarrow A.s +- C.w withstacking 3 ; drawarrow B.s +- C.e withstacking 4 ; newpath highlight; highlight := (A.sw -- B.se -- B.ne -- A.nw) enlarged EmWidth; fill highlight withcolor "darkgray" withstacking 1; \stopMPpage indeed, that why i mentioned that the next version will do (but no upload today) 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] weekend upload
with the latest version not everything gets drawn as intended. $ context --version mtx-context | ConTeXt Process Management 1.04 mtx-context | current version: 2021.07.10 21:51 On 12/07/2021 10:07, Hans Hagen wrote: I need to ckeck if the range checked does negative numbers ... anyway, you can do this \startMPpage[offset=2mm, stacking={1,2,3,4}] boxit.A("\boxframed{Box A}"); boxit.B("\boxframed{Box B}"); boxit.C("\boxframed{Box C}"); defaultdx := 0pt; defaultdy := 0pt; A.c = origin; B.w - A.e = (1cm, 0); 0.5[ A.s, B.s ] - C.n = (0, 1cm); draw image (drawunboxed(A,B,C)) withstacking 2; drawarrow A.s +- C.w withstacking 3 ; drawarrow B.s +- C.e withstacking 4 ; newpath highlight; highlight := (A.sw -- B.se -- B.ne -- A.nw) enlarged EmWidth; fill highlight withcolor "darkgray" withstacking 1; \stopMPpage ___ 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] weekend upload
On 7/12/2021 5:31 AM, Aditya Mahajan wrote: On Sun, 11 Jul 2021, Bruce Horrocks wrote: On 9 Jul 2021, at 17:29, Hans Hagen wrote: This weekend upload has something new for metapost animation lovers: Forgive my ignorance but what exactly am I supposed to be seeing here? I run the example and get two rows of ten boxes. They don't move so it's not like an animated GIF was put into the PDF and they don't appear to be consecutive frames that could be joined into an animated GIF. For me, this feature provides the same capability as 'layers' in a graphical program. Consider the diagram shown in page 1 of the attached PDF. Suppose I want to "highlight" boxes A and B by drawing a square around them. That is easy; simply determine the bounding box of A, B (I do that manually here), and expand it a bit and draw it. Simple. See page 2. Now, suppose I want to fill this highlighted box. Suddenly, we have a problem. The highlight box needs to be "behind" the other boxes. How do we do it. We determine the location of boxes A, B, and C, but do not draw them. Determine the highlight box. Now draw the highlight box first and then draw the boxes. Suddenly the code became an order of magnitude more complicated. With the new stacking mechanism, I can just put the highlight box on "stack -1", and everything works well. See page 4. What's also super cool is that I can control what gets shown by changing the stacking key. Let's assume that the last MPpage was a \startuseMPgraphic{boxes} \stopuseMPgraphic. Suppose I wanted to use these pictures in a presentation. On the first slide, I can use \useMPgraphic[stacking=0]{boxes} to show the three boxes, and on the next slide, I can use \useMPgraphic[stacking={-1,0}]{boxes} to show the boxes and the highlight. Drawing such "conditional" graphics was cumbersome in the past. Now, it is easier. If you show a bunch of such "conditional" graphics in a sequence, you get an animation (or you could wrap around the animation module). Aditya PS: Hans, stacking doesn't completely work with the boxes macro. drawunboxed is always drawn on stack 0, which the bpath is drawn on the right stack. That is the reason I use stack = -1 to put the highlight in the "background". in a netx upload this will work ok \startMPpage[offset=2mm, stacking={1,2}] draw fullsquare scaled 4cm withstacking 2 withcolor "red" ; draw image ( draw fullsquare scaled 2cm withstacking 3 withcolor "green" withstacking 3 ; draw fullsquare scaled 1cm withstacking 4 withcolor "blue" withstacking 4 ; ) withstacking 2 withcolor "cyan"; drawarrow llcorner currentpicture .. origin withstacking 3; \stopMPpage - 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] weekend upload
On 7/12/2021 5:31 AM, Aditya Mahajan wrote: On Sun, 11 Jul 2021, Bruce Horrocks wrote: On 9 Jul 2021, at 17:29, Hans Hagen wrote: This weekend upload has something new for metapost animation lovers: Forgive my ignorance but what exactly am I supposed to be seeing here? I run the example and get two rows of ten boxes. They don't move so it's not like an animated GIF was put into the PDF and they don't appear to be consecutive frames that could be joined into an animated GIF. For me, this feature provides the same capability as 'layers' in a graphical program. Consider the diagram shown in page 1 of the attached PDF. Suppose I want to "highlight" boxes A and B by drawing a square around them. That is easy; simply determine the bounding box of A, B (I do that manually here), and expand it a bit and draw it. Simple. See page 2. Now, suppose I want to fill this highlighted box. Suddenly, we have a problem. The highlight box needs to be "behind" the other boxes. How do we do it. We determine the location of boxes A, B, and C, but do not draw them. Determine the highlight box. Now draw the highlight box first and then draw the boxes. Suddenly the code became an order of magnitude more complicated. With the new stacking mechanism, I can just put the highlight box on "stack -1", and everything works well. See page 4. What's also super cool is that I can control what gets shown by changing the stacking key. Let's assume that the last MPpage was a \startuseMPgraphic{boxes} \stopuseMPgraphic. Suppose I wanted to use these pictures in a presentation. On the first slide, I can use \useMPgraphic[stacking=0]{boxes} to show the three boxes, and on the next slide, I can use \useMPgraphic[stacking={-1,0}]{boxes} to show the boxes and the highlight. Drawing such "conditional" graphics was cumbersome in the past. Now, it is easier. If you show a bunch of such "conditional" graphics in a sequence, you get an animation (or you could wrap around the animation module). Aditya PS: Hans, stacking doesn't completely work with the boxes macro. drawunboxed is always drawn on stack 0, which the bpath is drawn on the right stack. That is the reason I use stack = -1 to put the highlight in the "background". I need to ckeck if the range checked does negative numbers ... anyway, you can do this \startMPpage[offset=2mm, stacking={1,2,3,4}] boxit.A("\boxframed{Box A}"); boxit.B("\boxframed{Box B}"); boxit.C("\boxframed{Box C}"); defaultdx := 0pt; defaultdy := 0pt; A.c = origin; B.w - A.e = (1cm, 0); 0.5[ A.s, B.s ] - C.n = (0, 1cm); draw image (drawunboxed(A,B,C)) withstacking 2; drawarrow A.s +- C.w withstacking 3 ; drawarrow B.s +- C.e withstacking 4 ; newpath highlight; highlight := (A.sw -- B.se -- B.ne -- A.nw) enlarged EmWidth; fill highlight withcolor "darkgray" withstacking 1; \stopMPpage but only the first edge in an image picture is adapted ... (i actually know that i need to fix that in mplib because i noticed the same issue with color etc (some old issue) 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] weekend upload
On Sun, 11 Jul 2021, Bruce Horrocks wrote: > > On 9 Jul 2021, at 17:29, Hans Hagen wrote: > > > > This weekend upload has something new for metapost animation lovers: > > Forgive my ignorance but what exactly am I supposed to be seeing here? I run > the example and get two rows of ten boxes. They don't move so it's not like > an animated GIF was put into the PDF and they don't appear to be consecutive > frames that could be joined into an animated GIF. For me, this feature provides the same capability as 'layers' in a graphical program. Consider the diagram shown in page 1 of the attached PDF. Suppose I want to "highlight" boxes A and B by drawing a square around them. That is easy; simply determine the bounding box of A, B (I do that manually here), and expand it a bit and draw it. Simple. See page 2. Now, suppose I want to fill this highlighted box. Suddenly, we have a problem. The highlight box needs to be "behind" the other boxes. How do we do it. We determine the location of boxes A, B, and C, but do not draw them. Determine the highlight box. Now draw the highlight box first and then draw the boxes. Suddenly the code became an order of magnitude more complicated. With the new stacking mechanism, I can just put the highlight box on "stack -1", and everything works well. See page 4. What's also super cool is that I can control what gets shown by changing the stacking key. Let's assume that the last MPpage was a \startuseMPgraphic{boxes} \stopuseMPgraphic. Suppose I wanted to use these pictures in a presentation. On the first slide, I can use \useMPgraphic[stacking=0]{boxes} to show the three boxes, and on the next slide, I can use \useMPgraphic[stacking={-1,0}]{boxes} to show the boxes and the highlight. Drawing such "conditional" graphics was cumbersome in the past. Now, it is easier. If you show a bunch of such "conditional" graphics in a sequence, you get an animation (or you could wrap around the animation module). Aditya PS: Hans, stacking doesn't completely work with the boxes macro. drawunboxed is always drawn on stack 0, which the bpath is drawn on the right stack. That is the reason I use stack = -1 to put the highlight in the "background". background.pdf Description: Adobe PDF document background.tex Description: TeX 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 ___
Re: [NTG-context] t-vim module: no highlighting for custom filetypes
On 2021-05-27, Aditya Mahajan wrote: > On Thu, 27 May 2021, Nicola wrote: > >> On 2021-05-24, Aditya Mahajan wrote: >> > On Fri, 21 May 2021, Nicola wrote: >> > >> >> I have only a minor annoyance: I have just noticed that -- is typeset as >> >> an en-dash in LMTX (but not in MKIV, as documented). Could you look into >> >> that? >> > >> > Fixed in the new release. >> >> Thanks. I have updated to version 2021.05.23 and run `mtxrun >> --generate`. Syntax highlighting is fine, but with LMTX I'm still >> getting an en-dash. Below, a MWE. > > Can you test if the file tests/vim/21-en-dash.tex works fine at your end: > > https://github.com/adityam/filter/blob/dev/tests/vim/21-en-dash.tex No, I get an en-dash with that, too. Log included below. Nicola fonts > beware: no fonts are loaded yet, using 'lm mono' in box system > system > ConTeXt ver: 2021.05.27 14:15 LMTX fmt: 2021.5.27 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/Users/me/Applications/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 1, order 1, name '/Users/me/Applications/context-osx-64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname 'en-dash', input './en-dash', result 'en-dash' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './en-dash.tex' modules > 'vim' is loaded open source > level 2, order 3, name '/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/vim/t-vim.tex' loading > Vim syntax highlighting (ver: 2021.05.23) modules > 'filter' is loaded open source > level 3, order 4, name '/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv' loading > Filter (ver: 2020.06.29) modules > 'module-catcodes' is loaded open source > level 4, order 5, name '/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.mkiv' loading > Module Catcodes (ver: 2018.04.16) close source> level 4, order 5, name '/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.mkiv' close source> level 3, order 5, name '/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv' modules > 'syntax-highlight' is loaded open source > level 3, order 6, name '/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/vim/t-syntax-highlight.mkxl' loading > Code syntax highlighting (ver: 2021.05.24) modules > 'syntax-groups' is loaded open source > level 4, order 7, name '/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/vim/t-syntax-groups.mkiv' loading > Syntax highlighting groups (ver: 2021.05.23) modules > 'module-catcodes' is already loaded close source> level 4, order 7, name '/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/vim/t-syntax-groups.mkiv' modules > 'filter' is already loaded close source> level 3, order 7, name '/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/vim/t-syntax-highlight.mkxl' suggestion > use \withcedilla instead of \c close source> level 2, order 7, name '/Users/me/Applications/context-osx-64/tex/texmf-modules/tex/context/third/vim/t-vim.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded open source > level 2, order 8, name 'en-dash-temp-LUA-0.vimout' close source> level 2, order 8, name 'en-dash-temp-LUA-0.vimout' backend > xmp > using file '/Users/me/Applications/context-osx-64/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml' pages > flushing realpage 1, userpage 1, subpage 1 close source> level 1, order 8, name './en-dash.tex' system > start used files system > text: en-dash system > stop used files system > start used files system >1: filename=char-prv.lua filetype=tex format=tex foundname=/Users/me/Applications/context-osx-64/tex/texmf-context/tex/context/base/mkiv/char-prv.lua fullname=/Users/me/Applications/context-osx-64/tex/texmf-context/tex/context/base/mkiv/char-prv.lua usedmethod=database system >2: filename=lmmono10-regular filetype=otf format=otf foundname=/Users/me/Applications/context-osx-64/tex/texmf/fonts/opentype/public
Re: [NTG-context] [formatting verbatim text]
On 26/04/2021 10:59, Hans Hagen wrote: \starttext \starttyping[escape=/] one two three four /btex/bgroup/red five /egroup/etex six seven eight nine \stoptyping \stoptext That works indeed! Thanks. Are there restriction on what context commands can be given inside the bgroup? e.g. I tried to include a highlight definition with white font on black background with an inframed, but that doesn't seem to work (in my definitions that is) ___ 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] [formatting verbatim text]
On 4/26/2021 10:25 AM, Floris van Manen wrote: What is the easiest way, if possible, to highlight some sections of verbatim text? given: \starttyping one two three four five six seven eight nine \stoptyping i'd like to color the word 'five' in red, or italic. \starttext \starttyping[escape=/] one two three four /btex/bgroup/red five /egroup/etex six seven eight nine \stoptyping \stoptext - 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 ___
[NTG-context] [formatting verbatim text]
What is the easiest way, if possible, to highlight some sections of verbatim text? given: \starttyping one two three four five six seven eight nine \stoptyping i'd like to color the word 'five' in red, or italic. .Floris ___ 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] Bug in generating the highlight colour in the rules-mkiv document
Hi all, When compiling the rules-mkiv.tex (context/sources/general/manuals/rules) file, the highlight lines that use mp graphics are rendered in black instead of the colour defined by the file. This is visible on the three test sentences on the top of the third page "test test me and test or grep". The versions I've tested where this is broken are: context from the current TexLive 2020 distribution mtx-context | ConTeXt Process Management 1.03 mtx-context | mtx-context | main context file: texmf-dist/tex/context/base/mkiv/ context.mkiv mtx-context | current version: 2020.03.10 14:44 mtx-context | main context file: texmf-dist/tex/context/base/mkiv/ context.mkxl mtx-context | current version: 2020.03.10 14:44 context installed via first-setup.sh mtx-context | ConTeXt Process Management 1.03 mtx-context | mtx-context | main context file: tex/texmf-context/tex/context/base/mkiv/ context.mkiv mtx-context | current version: 2020.01.30 14:13 mtx-context | main context file: tex/texmf-context/tex/context/base/mkiv/ context.mkxl mtx-context | current version: 2020.01.30 14:13 context from TexLive 2019 distribution mtx-context | ConTeXt Process Management 1.02 mtx-context | mtx-context | main context file: texmf-dist/tex/context/base/mkiv/ context.mkiv mtx-context | current version: 2019.03.21 21:39 The latest version I found to be working: context installed with TexLive 2018 mtx-context | ConTeXt Process Management 1.02 mtx-context | mtx-context | main context file: texmf-dist/tex/context/base/mkiv/ context.mkiv mtx-context | current version: 2018.04.04 00:51 Cheers, Ivan -- dr Ivan Čukić MATF, i...@math.rs, https://cukic.co, http://poincare.math.rs/~ivan gpg key fingerprint: 8FE4 D32F 7061 EA9C 8232 07AE 01C6 CE2B FF04 1C12 ___ 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] Unexpected underbar behaviour in sections
On Tue, 24 Nov 2020, Bruce Horrocks wrote: > The following is giving me a section title with triple underbars instead of > single. > > \definehead [Heading] [section] > \setuphead [Heading] [style={\underbar}] Change this to: \setuphead [Heading] [textcommand={\underbar}, numbercommand=\underbar] > \starttext > \Heading{First level section heading} > \underbar{This is single underlined as expected} > \stoptext > > (Same with \startHeading .. \stopHeading and for subsections, which is where > I first noticed it.) > > It looks quite attractive in its own way - and certainly acts as a visual > highlight - just not quite what I was expecting. ;-) Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Unexpected underbar behaviour in sections
The following is giving me a section title with triple underbars instead of single. \definehead [Heading] [section] \setuphead [Heading] [style={\underbar}] \starttext \Heading{First level section heading} \underbar{This is single underlined as expected} \stoptext (Same with \startHeading .. \stopHeading and for subsections, which is where I first noticed it.) It looks quite attractive in its own way - and certainly acts as a visual highlight - just not quite what I was expecting. ;-) version 2020.11.24 00:41 -- 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] Hyperref-style borders around clickable links
Ok, found a (partial) solution myself in Pablo's question from yesterday... \setupinteraction[state=start] \enabledirectives[references.border] does that. But how do I configure the borders? Color? Style and so? Couldn't find anything on the Wiki. Best, Denis Am 08.10.2020 um 10:34 schrieb Denis Maier: Hi, I prefer links to be styled as normal text, but I'd nevertheless to highlight them somehow on screen. The LaTeX package Hyperref adds red frames to clickable content. Is something like that possible with ConTeXt? Best, Denis ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ 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] Hyperref-style borders around clickable links
Hi, I prefer links to be styled as normal text, but I'd nevertheless to highlight them somehow on screen. The LaTeX package Hyperref adds red frames to clickable content. Is something like that possible with ConTeXt? Best, Denis ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bar within math (amended)
> Am 11.06.2020 um 13:41 schrieb Axel Kielhorn : > >> Am 09.06.2020 um 20:41 schrieb Wolfgang Schuster >> : >> >> Use a textbackground to highlight parts of your text. >> >> \definetextbackground >> [Highlight] >> [frame=off, >> background=color, >> backgroundcolor=yellow] >> >> \starttext >> >> \m{1 + 2 = \unit{3 kilo newton}} >> >> \m{1 + 2 = \Highlight{\unit{3 kilo newton}}} >> >> \stoptext >> >> Wolfgang >> > > Is there a way to highlight just the words and leave the space white? > Something like \overstrikes? Wolfgang or whoelse, when would you advise to use textbackgrounds and when bars? E.g. if I need a “marker” highlighting. 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 ___
Re: [NTG-context] Bar within math (amended)
> Am 09.06.2020 um 20:41 schrieb Wolfgang Schuster > : > > Use a textbackground to highlight parts of your text. > > \definetextbackground > [Highlight] > [frame=off, > background=color, > backgroundcolor=yellow] > > \starttext > > \m{1 + 2 = \unit{3 kilo newton}} > > \m{1 + 2 = \Highlight{\unit{3 kilo newton}}} > > \stoptext > > Wolfgang > Is there a way to highlight just the words and leave the space white? Something like \overstrikes? Greetings Axel ___ 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] Bar within math (amended)
Lukas/ConTeXt schrieb am 09.06.2020 um 20:28: Hello, it seems that bar (even with option 'continue=yes') is not rendered in place of '~' within math. See the sample: \definebar[MyBar][color=green,rulethickness=2.8,order=background,offset=1.5,continue=yes] \starttext 1 + 2 = \startbar[MyBar]3~kN\stopbar % OK $1 + 2 = \startbar[MyBar]3~\text{kN}\stopbar$ % No background behind space $1 + 2 = \inframed[frame=off,background=color,backgroundcolor=green,offset=0pt,]{3~\text{kN}}$ % OK! \stoptext In the sample 'kN' is a unit, which should be separated by space from the result (here: 3); I am used to put the unit into the math environment and enclose it into \text{...}. Is there a way to make the bar be rendered in places of blanks within math, too (like if it was inside $ ... $ - as the first line of the sample)? - Note that I can use \inframed to get background filled fully, but anyway - how about usage of "bar" for this? Use a textbackground to highlight parts of your text. \definetextbackground [Highlight] [frame=off, background=color, backgroundcolor=yellow] \starttext \m{1 + 2 = \unit{3 kilo newton}} \m{1 + 2 = \Highlight{\unit{3 kilo newton}}} \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 ___
Re: [NTG-context] wiki update - status
So much better! Thank you very much for the effort! Greetings Marcus Vinicius On Sun, Jun 7, 2020, 19:05 Garulfo wrote: > Hi all, > > New source browser is nice ! Thanks a lot. > > After level 1 (Main Page / Download and Install / Documentation / > Mailing lists), I mostly finished a review of level 2 (and some level 3) > pages. > > Several tweaks all over the place like: > > - Fonts: full update for newcomers, > - Try to be responsive "enough" for smartphone > - More homogeneous style / theme > - Old Content category and tag pages, update dead links > - Layout: >- do the todo, like merging content of paper setup + paper sizes pages >- complete the flow with imposition >- rework the "Further reading section", add PDF links and so on > - Programming & DB: >- Gather "Calling Lua from TeX" and "Calling TeX from Lua" > (section +links) in a same page > - Tools: >- segregate "core tools" and "additional tools" >- highlight existence of mtxrun and context scripts pages > - Remove former "manually made links bar" at the top of the pages >current structure should be enough now have an easier understanding of >the wiki structure. > > Thanks for your help Taco, Hans, Aditya, Hraban, Tomáš. > > I hope that this will help to improve the reception of users and their > willingness to contribute. > > Bye. > > ___ > 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] wiki update - status
On 6/8/2020 12:05 AM, Garulfo wrote: Hi all, New source browser is nice ! Thanks a lot. After level 1 (Main Page / Download and Install / Documentation / Mailing lists), I mostly finished a review of level 2 (and some level 3) pages. Several tweaks all over the place like: - Fonts: full update for newcomers, - Try to be responsive "enough" for smartphone - More homogeneous style / theme - Old Content category and tag pages, update dead links - Layout: - do the todo, like merging content of paper setup + paper sizes pages - complete the flow with imposition - rework the "Further reading section", add PDF links and so on - Programming & DB: - Gather "Calling Lua from TeX" and "Calling TeX from Lua" (section +links) in a same page - Tools: - segregate "core tools" and "additional tools" - highlight existence of mtxrun and context scripts pages - Remove former "manually made links bar" at the top of the pages current structure should be enough now have an easier understanding of the wiki structure. Thanks for your help Taco, Hans, Aditya, Hraban, Tomáš. I hope that this will help to improve the reception of users and their willingness to contribute. I'm really impressed by all the progress that has been made! 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 ___
[NTG-context] wiki update - status
Hi all, New source browser is nice ! Thanks a lot. After level 1 (Main Page / Download and Install / Documentation / Mailing lists), I mostly finished a review of level 2 (and some level 3) pages. Several tweaks all over the place like: - Fonts: full update for newcomers, - Try to be responsive "enough" for smartphone - More homogeneous style / theme - Old Content category and tag pages, update dead links - Layout: - do the todo, like merging content of paper setup + paper sizes pages - complete the flow with imposition - rework the "Further reading section", add PDF links and so on - Programming & DB: - Gather "Calling Lua from TeX" and "Calling TeX from Lua" (section +links) in a same page - Tools: - segregate "core tools" and "additional tools" - highlight existence of mtxrun and context scripts pages - Remove former "manually made links bar" at the top of the pages current structure should be enough now have an easier understanding of the wiki structure. Thanks for your help Taco, Hans, Aditya, Hraban, Tomáš. I hope that this will help to improve the reception of users and their willingness to contribute. Bye. ___ 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
Marco Patzer schrieb am 17.05.2020 um 19:04: 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] [...] \definehighlight [BufferStyle] [style=smallitalic, color=blue] Use the highlight-environment or create a new startstop-environment to apply style and color settings to the buffer. \definestartstop [BufferStyle] [style=smallitalic, color=blue] \setupbuffer [before={... \startBufferStyle ...}, after={... \stopBufferStyle ...}] 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] Custom color schemes in t-vim
On Sat, 16 May 2020, Aditya Mahajan wrote: On Sat, 16 May 2020, Nicola wrote: On 2020-05-16, Aditya Mahajan wrote: On Sat, 16 May 2020, Aditya Mahajan wrote: Moreover, if you comment line line 126 of `2context.vim` "let s:id = synIDtrans (s:id) [If you make a local copy of 2context.vim, then you need to run the file with `--mode=dev-vim` to ensure that the local copy is used] Then the ruby example generates the following file: \SYNBOL{}\SYN[rubyComment]{# Ruby program listing}\SYNEOL{} \SYNBOL{}\SYN[rubyDefine]{def}\SYN[rubyMethodBlock]{ }\SYN[rubyMethodName]{foobar}\SYNEOL{} \SYNBOL{}\SYN[rubyMethodBlock]{ print(}\SYN[rubyStringDelimiter]{"}\SYN[rubyString]{Hello World}\SYN[rubyStringDelimiter]{"}\SYN[rubyMethodBlock]{)}\SYNEOL{} \SYNBOL{}\SYN[rubyDefine]{end}\SYNEOL{} So, if you are willing to define wrappers for all ruby syntax blocks, then I can provide a configuration option so that `2context` does not apply that line. That might provide a finer control over the highlighting, but the main issue here seems to be that the generated file has Identifier instead of Function, Special instead of Delimiter and Constant instead of String. Looking at 2context.vim, AFAICS s:id_name seems computed correctly. Maybe, the script does not set the appropriate filetype? filetype is set correctly (since we get `ruby` options), but something weird is happening even with 2html.vim. Here is a minimal example: Figured out what is happening. From `:he syntax` "The names marked with * are the preferred groups; the others are minor groups. For the preferred groups, the "syntax.vim" file contains default highlighting. The minor groups are linked to the preferred groups, so they get the same highlighting. You can override these defaults by using ":highlight" commands after sourcing the "syntax.vim" file." All three `Function`, `Delimiter` and `String` are minor groups, so they get mapped to the preferred groups, which are `Identifier`, `Special`, and `Constant`, respectively. Most colorschemes define colors for minor groups as well, but since we are not loading any colorscheme, the minor groups are mapped to preferred groups, and we only get the preferred groups in the output. Now that I know what is happening, it is relatively easy to fix. ``` \definecolor[colorone][r=0.251, g=0.349, b=0.322] \definecolor[colortwo][r=0.612, g=0.608, b=0.478] \definecolor[colorthree] [r=1.0, g=0.827, b=0.576] \definecolor[colorfour] [r=1.0, g=0.592, b=0.310] \definecolor[colorfive] [r=0.960, g=0.310, b=0.161] \definecolor[nearlywhite] [r=0.988, g=0.988, b=0.988] \setupinteraction[state=start] \setupcolors[textcolor=colorone] \setupbackgrounds[page][background=color,backgroundcolor=nearlywhite] \usemodule[vim] \startvimrc[name=minor-groups] hi Function cterm=NONE hi Stringcterm=NONE hi Delimiter cterm=NONE \stopvimrc \startcolorscheme[oceansunset] \definesyntaxgroup[Comment] [color={colorfive},style=italic] \definesyntaxgroup[Function][color={colorfive},style=italic] \stopcolorscheme \definevimtyping[RUBY] [ syntax=ruby, alternative=oceansunset, escape=on, %NOTE, the comma was missing in your test file % Without the comma, the option is not set extras=minor-groups, ] \starttext \startRUBY # Ruby program listing def foobar print("Hello World") end \stopRUBY \stoptext ``` 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. 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] Custom color schemes in t-vim
On Sat, 16 May 2020, Aditya Mahajan wrote: On Sat, 16 May 2020, Nicola wrote: On 2020-05-14, Aditya Mahajan wrote: On Thu, 14 May 2020, Nicola wrote: Quick question: Is \startcolorscheme... \stopcolorscheme (still) supported by t-vim? It is supposed to work. If it doesn't, then it is a bug. Could you provide a complete MWE. Please find a MWE at the bottom of this post. The expected behaviour is that the keyword `function` in the JavaScript snippet and `foobar` in the Ruby snippet should be colored and in italics, as comments are. The respective Vim highlight groups are `javaScriptFunction` and `rubyMethodName`, which both resolve to `Function`. The reason that there is no highlighting is because the generated `.vimout` does not contain any `\SYN[rubyMethodName]` or `\SYN[javaScriptFunction]` for the following reason: Vim has the concept of a hierarchy of names for the syntax highlighting regions. For example, $VIMRUNTIME/syntax/ruby.rb contains the following lines: hi def link rubyMethodName rubyFunction hi def link rubyFunction Function So, `rubyMethodName` maps to `rubyFunction`, which in turn maps to `Function`. Now, a vim colorscheme first checks if a highlighting style is available for `rubyMethodName`; if not it tries `rubyFunction`; and if not it tries `Function`. Although something similar might have been possible in 2context.vim, I follow the `TOHtml` function of vim, and simply created a single tag for each syntax highlighting element, which in this case is `Function`. So, there is no tag generated for `rubyMethodName` and that is why changing the syntaxhighlight for that doesn't change anything. Moreover, if you comment line line 126 of `2context.vim` "let s:id = synIDtrans (s:id) [If you make a local copy of 2context.vim, then you need to run the file with `--mode=dev-vim` to ensure that the local copy is used] Then the ruby example generates the following file: \SYNBOL{}\SYN[rubyComment]{# Ruby program listing}\SYNEOL{} \SYNBOL{}\SYN[rubyDefine]{def}\SYN[rubyMethodBlock]{ }\SYN[rubyMethodName]{foobar}\SYNEOL{} \SYNBOL{}\SYN[rubyMethodBlock]{ print(}\SYN[rubyStringDelimiter]{"}\SYN[rubyString]{Hello World}\SYN[rubyStringDelimiter]{"}\SYN[rubyMethodBlock]{)}\SYNEOL{} \SYNBOL{}\SYN[rubyDefine]{end}\SYNEOL{} So, if you are willing to define wrappers for all ruby syntax blocks, then I can provide a configuration option so that `2context` does not apply that line. 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] Custom color schemes in t-vim
On Sat, 16 May 2020, Nicola wrote: On 2020-05-14, Aditya Mahajan wrote: On Thu, 14 May 2020, Nicola wrote: Quick question: Is \startcolorscheme... \stopcolorscheme (still) supported by t-vim? It is supposed to work. If it doesn't, then it is a bug. Could you provide a complete MWE. Please find a MWE at the bottom of this post. The expected behaviour is that the keyword `function` in the JavaScript snippet and `foobar` in the Ruby snippet should be colored and in italics, as comments are. The respective Vim highlight groups are `javaScriptFunction` and `rubyMethodName`, which both resolve to `Function`. The reason that there is no highlighting is because the generated `.vimout` does not contain any `\SYN[rubyMethodName]` or `\SYN[javaScriptFunction]` for the following reason: Vim has the concept of a hierarchy of names for the syntax highlighting regions. For example, $VIMRUNTIME/syntax/ruby.rb contains the following lines: hi def link rubyMethodName rubyFunction hi def link rubyFunction Function So, `rubyMethodName` maps to `rubyFunction`, which in turn maps to `Function`. Now, a vim colorscheme first checks if a highlighting style is available for `rubyMethodName`; if not it tries `rubyFunction`; and if not it tries `Function`. Although something similar might have been possible in 2context.vim, I follow the `TOHtml` function of vim, and simply created a single tag for each syntax highlighting element, which in this case is `Function`. So, there is no tag generated for `rubyMethodName` and that is why changing the syntaxhighlight for that doesn't change anything. Now, as I was looking into this, I noticed that `foobar` gets mapped to `Identifier` rather than `Function`. I am not sure why that is happening and I will look into 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] Custom color schemes in t-vim
On 2020-05-14, Aditya Mahajan wrote: > On Thu, 14 May 2020, Nicola wrote: > >> Quick question: Is \startcolorscheme... \stopcolorscheme (still) >> supported by t-vim? > It is supposed to work. If it doesn't, then it is a bug. Could you > provide a complete MWE. Please find a MWE at the bottom of this post. The expected behaviour is that the keyword `function` in the JavaScript snippet and `foobar` in the Ruby snippet should be colored and in italics, as comments are. The respective Vim highlight groups are `javaScriptFunction` and `rubyMethodName`, which both resolve to `Function`. The actual behaviour is that comments are highlighted correctly, but I do not get any syntax highlighting for functions. Thanks for t-vim, btw: I can't express in words how nice an idea it is! Nicola \setupcolors[state=start] \definecolor[colorone][r=0.251, g=0.349, b=0.322] \definecolor[colortwo][r=0.612, g=0.608, b=0.478] \definecolor[colorthree] [r=1.0, g=0.827, b=0.576] \definecolor[colorfour] [r=1.0, g=0.592, b=0.310] \definecolor[colorfive] [r=0.960, g=0.310, b=0.161] \definecolor[nearlywhite] [r=0.988, g=0.988, b=0.988] \setupinteraction[state=start] \setupcolors[textcolor=colorone] \setupbackgrounds[page][background=color,backgroundcolor=nearlywhite] \usemodule[vim] \unprotect \startcolorscheme[oceansunset] \definesyntaxgroup[Comment][\c!color={colorfive},\c!style=italic] \definesyntaxgroup[Function][\c!color={colorfive},\c!style=italic] % \definesyntaxgroup[rubyMethodName][\c!color={colorfive},\c!style=italic] % \definesyntaxgroup[javaScriptFunction][\c!color={colorfive},\c!style=italic] \stopcolorscheme \protect \definevimtyping[JAVASCRIPT][ syntax=javascript, alternative=oceansunset, escape=on ] \definevimtyping[RUBY][ syntax=ruby, alternative=oceansunset, escape=on ] \starttext \startJAVASCRIPT // JavaScript program listing function foobar() { print("Hello World"); } \stopJAVASCRIPT \startRUBY # Ruby program listing def foobar print("Hello World") end \stopRUBY \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] left protruding quotations
When I start a paragraph with a \quote or a \quotation the left quotemark does not protrude, but when I use Unicode quotes it does. I would prefer to use the commands. Any suggestions on how I can achieve proper left protrusion without resorting to Unicode characters? Cheers, Michael % Setup hanging punctuation, less severe style \definefontfeature [default] [default] %%[protrusion=quality,expansion=quality] [protrusion=punctuation,expansion=quality] \setupalign[hz,hanging] % Setup white space between paragraphs \setupwhitespace[medium] % Choose a font \setupbodyfont[pagella,11pt] \setupbodyfontenvironment[default][em=italic] \showframe \starttext \input tufte \quotation{We thrive in information||thick worlds} because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the chaff and separate the sheep from the goats. “We thrive in information||thick worlds” because of our marvelous and everyday capacity to select, edit, single out, structure, highlight, group, pair, merge, harmonize, synthesize, focus, organize, condense, reduce, boil down, choose, categorize, catalog, classify, list, abstract, scan, look into, idealize, isolate, discriminate, distinguish, screen, pigeonhole, pick over, sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk, average, approximate, cluster, aggregate, outline, summarize, itemize, review, dip into, flip through, browse, glance into, leaf through, skim, refine, enumerate, glean, synopsize, winnow the wheat from the chaff and separate the sheep from the goats. \stoptext hangit.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 ___
Re: [NTG-context] Quotation dash issues with semantic markup
Hans Hagen schrieb am 30.12.2019 um 10:19: On 12/30/2019 5:03 AM, Sam May wrote: \setuplanguage[en] [leftquotation=\quotedash~, rightquotation=~\quotedash, leftsentence=\removeunwantedspaces~\endash\space, midsentence=\removeunwantedspaces~\endash\space, % leftsentence=\endash~, % midsentence=~\endash, rightsentence=~\endash] \define\quotedash{\emdash\endash} %\setupbackend[export=yes] \starttext \startsection[title=Introduction] Any of you able to help me get my quotation dashes into line when automatically inserted by the semantic commands? I'm sure a number of you look at this style and cringe, but \cap{A.} I'm not looking for grammatical input, and \cap{B.} I'm intending this for a non-English language where the quotation dash (though still not most common) isn't as out of place. \stopsection \startsection[title=Desired rendering] \quotedash~Speech should always have a dash at the start, but none at the end of a paragraph. \quotedash~Dialog asides should not duplicate dashes,~\endash\ he said.~\quotedash\ Also, this doesn't reflect the spacing mentioned in section \in[extra]. \quotedash~nor, as above, add ones at the end of paragraphs. \endash~he continued. \stopsection \startsection[title=Actual output] \speech{Speech should always have a dash at the start, but none at the end of a paragraph.} \speech{Dialog asides should not duplicate dashes, \aside{he said.}} Also, note the spacing isn't removed despite \type{\removeunwantedspaces}, but instead duplicated. \speech{nor, as above, add ones at the end of paragraphs. \aside{he continued.}} \stopsection \startsection[title=Additional considerations and observations,reference=extra] It would also be nice if a quote ending in a period carried the \quote{broad} spacing to the other side of the (ending) quote dash |=| the dash before \quote{Also} above would be packed on the left and broad on the right. I know this might be a lot trickier to code, and only consider it a bonus. The issue with \type{\removeunwantedspaces} only seems to affect the command forms. When inserted directly |<| as here |>| the spacing acts as desired in the \cap{PDF} (as expected, the \cap{XML} doesn't understand the order). Also, the right \type{|>|} doesn't require either of the explicit spacing instructions (beyond being non-breaking) while the others do; try switching the commented lines and re-rendering. The quotation dash itself only \emph{looks} as I want it; when I highlight and copy the text or export it to the \cap{XML} backend, it's still two dashes next to each other. Instead, I'd like it to be the Unicode bar U+2015. I'm not sure if \TEX/\LUATEX\ allows that difference between appearance and interaction (I do know \cap{PDF} does), so if there's some way of adding a new glyph to the font |<| one that mimics the other dashes even if the font changes |>| I'd love to actually use the proper codepoint. As is, that doesn't work in the standard font(s): [\char"2015]. \stopsection \stoptext I bet that Wolfgang has the answers to the speech setup so I'll do the font part. It's possible to use leaders to remove multiple dashes and also dashes at the end of a paragraph but this will only work for the PDF. A limitation is that you can't use the existing \speech and \aside commands because they use groups which prevents the removal of unwanted dashes. \unprotect \def\speech_dash {\setbox\scratchbox\hbox{\texthorizontalbar\space}% \leaders\copy\scratchbox\hskip\wd\scratchbox} \def\speech_left {\ifhmode \removeunwantedspaces \else \dontleavehmode \fi \space\speech_dash} \def\speech_right {\removeunwantedspaces \space\speech_dash} %\define[1]\speech % {\speech_left#1\speech_right} \unexpanded\def\speech {\speech_left \bgroup \aftergroup\speech_right \let\next=} \def\aside_dash {\setbox\scratchbox\hbox{\endash\space}% \leaders\copy\scratchbox\hskip\wd\scratchbox} \def\aside_left {\ifhmode \removeunwantedspaces \else \dontleavehmode \fi \space\aside_dash} \def\aside_right {\space\aside_dash} %\define[1]\aside % {\aside_left#1\aside_right} \unexpanded\def\aside {\aside_left \bgroup \aftergroup\aside_right \let\next=} \protect \setupbodyfont[pagella] \starttext \speech{first speech} \speech{second speech} \speech{first speech} no speech \speech{second speech} \speech{first speech\aside{aside}} \speech{second speech} \speech{speech \aside{aside}} no speech \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 ___
Re: [NTG-context] Quotation dash issues with semantic markup
On 12/30/2019 5:03 AM, Sam May wrote: \setuplanguage[en] [leftquotation=\quotedash~, rightquotation=~\quotedash, leftsentence=\removeunwantedspaces~\endash\space, midsentence=\removeunwantedspaces~\endash\space, % leftsentence=\endash~, % midsentence=~\endash, rightsentence=~\endash] \define\quotedash{\emdash\endash} %\setupbackend[export=yes] \starttext \startsection[title=Introduction] Any of you able to help me get my quotation dashes into line when automatically inserted by the semantic commands? I'm sure a number of you look at this style and cringe, but \cap{A.} I'm not looking for grammatical input, and \cap{B.} I'm intending this for a non-English language where the quotation dash (though still not most common) isn't as out of place. \stopsection \startsection[title=Desired rendering] \quotedash~Speech should always have a dash at the start, but none at the end of a paragraph. \quotedash~Dialog asides should not duplicate dashes,~\endash\ he said.~\quotedash\ Also, this doesn't reflect the spacing mentioned in section \in[extra]. \quotedash~nor, as above, add ones at the end of paragraphs. \endash~he continued. \stopsection \startsection[title=Actual output] \speech{Speech should always have a dash at the start, but none at the end of a paragraph.} \speech{Dialog asides should not duplicate dashes, \aside{he said.}} Also, note the spacing isn't removed despite \type{\removeunwantedspaces}, but instead duplicated. \speech{nor, as above, add ones at the end of paragraphs. \aside{he continued.}} \stopsection \startsection[title=Additional considerations and observations,reference=extra] It would also be nice if a quote ending in a period carried the \quote{broad} spacing to the other side of the (ending) quote dash |=| the dash before \quote{Also} above would be packed on the left and broad on the right. I know this might be a lot trickier to code, and only consider it a bonus. The issue with \type{\removeunwantedspaces} only seems to affect the command forms. When inserted directly |<| as here |>| the spacing acts as desired in the \cap{PDF} (as expected, the \cap{XML} doesn't understand the order). Also, the right \type{|>|} doesn't require either of the explicit spacing instructions (beyond being non-breaking) while the others do; try switching the commented lines and re-rendering. The quotation dash itself only \emph{looks} as I want it; when I highlight and copy the text or export it to the \cap{XML} backend, it's still two dashes next to each other. Instead, I'd like it to be the Unicode bar U+2015. I'm not sure if \TEX/\LUATEX\ allows that difference between appearance and interaction (I do know \cap{PDF} does), so if there's some way of adding a new glyph to the font |<| one that mimics the other dashes even if the font changes |>| I'd love to actually use the proper codepoint. As is, that doesn't work in the standard font(s): [\char"2015]. \stopsection \stoptext I bet that Wolfgang has the answers to the speech setup so I'll do the font part. Assuming that you use context lmtx (the luametatex branch), you can use some of the new metafun magic. \startMPcalculation{simplefun} vardef QuotationDash = draw image ( interim linecap := squared ; save l ; l := 0.2 ; draw (l/2,2) -- (15-l/2,2) withpen pencircle scaled l ; ) enddef ; lmt_registerglyphs [ name = "symbols", units= 10, usecolor = true, width= 15, height = 2.1, depth= 0, ] ; lmt_registerglyph [ category = "symbols", unicode = "0x2015", code = "QuotationDash ;" ] ; \stopMPcalculation \definefontfeature[default][default][metapost=symbols] % \showglyphs \starttext \startlines xx\endashxx xx\emdashxx xx\endash\emdash xx xx\char"2015 xx \stoplines \stoptext Keep in mind that when you use for instance pagella, that there already that glyph. 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 ___
[NTG-context] Quotation dash issues with semantic markup
Any of you able to help me get my quotation dashes into line when automatically inserted by the semantic commands? I'm sure a number of you look at this style and cringe, but A. I'm not looking for grammatical input, and B. I'm intending this for a non-English language where the quotation dash (though still not most common) isn't as out of place. See attachment for actual examples, but I'm looking for a dash at each side of the quotation, /except/ at the very end of a paragraph. I additionally want dialogue tags (via \aside, and located within quotations) to not print their surrounding decoration if they're directly next to the larger dash of the quotation. Unfortunately, the only way I can think of doing the first is by checking if the next token's \par, and that gets thrown off by the internal logic of \quotation; I'm not at all sure how to start going about the asides. It would also be nice if a quote ending in a period carried the 'broad' spacing to the other side of the (ending) quote dash -- the dash before 'Also' in the examples would be packed on the left and broad on the right. I know this might be a lot trickier to code, and only consider it a bonus. An additional issue with \removeunwantedspaces only seems to affect the command forms. When inserted directly, the spacing acts as desired in the PDF (as expected, the XML doesn't understand the order). Also, the right |>| doesn't require either of the explicit spacing instructions (beyond being non-breaking) while the others do. The quotation dash itself only /looks/ as I want it; when I highlight and copy the text or export it to the XML backend, it's still two dashes next to each other. Instead, I'd like it to be the Unicode bar U+2015. I'm not sure if TEX/LUATEX allows that difference between appearance and interaction (I do know PDF does), so if there's some way of adding a new glyph to the font -- one that mimics the other dashes even if the font changes -- I'd love to actually use the proper codepoint. As is, that doesn't work in the standard font(s). Thanks for the help! I know it's quite a bit of an ask. Sam exmp-dialogue.tex Description: TeX document signature.asc Description: PGP signature ___ 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] radiobuttons
On 8/13/2019 8:01 PM, Henning Hraban Ramm wrote: Regardless of my other mails, I’d appreciate to have this bug fixed. I wasted the whole day on trying all kind of tricks and comparing pdf's made with acronbat and context etc etc just to find out that the preference is the problem ... forms -> highlight color -> show border hover color it badly interfering with these widgets ... there seems to be no way to turn that off (forms made with acrobat suffer a bit less because they use a funny mix of appearances and border settings and ... because they make these buttons from dingbats (i think) anyway, it's bad in the latest reader as well as in acrobat x which shows it's an old issue and as it's that old one can fear it has become a feature ... (of that no one cares) so, the only solution seems to be to check the prefs (mupdf is doing it right) Hans --- test file --- \setupinteraction [state=start] \definesymbol[yes][1] \definesymbol[nop][0] \setupfield[whatever][width=20mm,height=20mm,frame=off] \definefield[what][radio][whatever][whatone,whattwo][whatone] \definesubfield[whatone][][yes,nop] \definesubfield[whattwo][][yes,nop] \startuniqueMPgraphic{0} fill fullcircle scaled 1cm withcolor red ; \stopuniqueMPgraphic \startuniqueMPgraphic{1} fill fullcircle scaled 1cm withcolor green ; \stopuniqueMPgraphic \definesymbol[YES][\uniqueMPgraphic{1}] \definesymbol[NOP][\uniqueMPgraphic{0}] \setupfield[WHATEVER][width=20mm,height=20mm,frame=off] \definefield[WHAT][radio][WHATEVER][WHATONE,WHATTWO][WHATONE] \definesubfield[WHATONE][][YES,NOP] \definesubfield[WHATTWO][][YES,NOP] \starttext \startTEXpage[offset=2cm] \field[whatone]\space\field[whattwo] \field[WHATONE]\space\field[WHATTWO] \field[WHATONE]\space\field[WHATTWO] \stopTEXpage \startTEXpage[offset=2cm] \field[whatone]\space\field[whattwo] \field[WHATONE]\space\field[WHATTWO] \field[WHATONE]\space\field[WHATTWO] \stopTEXpage \stoptext - 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] radiobuttons
Henning Hraban Ramm schrieb am 05.08.2019 um 15:10: Of course the behaviour depends on the PDF viewer… :-( In Acrobat Pro 9 the radiobuttons work while I highlight form fields; if I switch that off, all options are checked. In Adobe Reader DC you can’t switch off form field highlighting. Preview.app only highlights on mouseover and checks all radiobuttons. PDF Studio (that I try to establish as a cheap alternative to Acrobat Pro) sometimes shows an error after asking if I’d like to activate JavaScript and won’t open my form document at all. Since I need also a non-interactive version for printout, and since ConTeXt doesn’t reserve the space of form fields if I switch off interaction, I used to remove form fields with Acrobat. In previous versions (I can prove 2018-11) ConTeXt used its own frames for radiobuttons and checkboxes. Now it seems to use options of the PDF form fields that look different in viewers and disappear if I delete the field… Custom symbols of radiobuttons and checkboxes are displayed constantly (that used to work only in MkII 10 years before or so, probably due to changes in Acrobat), and it’s not possible to use different symbols for checkend and unchecked Hraban Am 2019-08-05 um 10:03 schrieb Henning Hraban Ramm : Hi, coming back to an old form project I find that something changed WRT to form fields. For one, some fields appear smaller and shifted upwards – I managed to fix that with setups. What I can’t change is behaviour of radiobuttons: if I click one, all rbs of one group activate, and I can’t deactivate them any more. In my project all of the fields are duplicated on other pages, and while all other fields’ contents get copied, it doesn’t work for radiobuttons; my minimal example unfortunately can’t show that. \setupinteraction[state=start] \setupfield[MMradio][ option=printable, frame=overlay, corner=round, height=1em, width=1em, align=bottom, ] Use (with "framed" in the second optional argument) \setupfield [MMradio] [framed] [..,..=..,..] to get normal framed fields. 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] radiobuttons
Of course the behaviour depends on the PDF viewer… :-( In Acrobat Pro 9 the radiobuttons work while I highlight form fields; if I switch that off, all options are checked. In Adobe Reader DC you can’t switch off form field highlighting. Preview.app only highlights on mouseover and checks all radiobuttons. PDF Studio (that I try to establish as a cheap alternative to Acrobat Pro) sometimes shows an error after asking if I’d like to activate JavaScript and won’t open my form document at all. Since I need also a non-interactive version for printout, and since ConTeXt doesn’t reserve the space of form fields if I switch off interaction, I used to remove form fields with Acrobat. In previous versions (I can prove 2018-11) ConTeXt used its own frames for radiobuttons and checkboxes. Now it seems to use options of the PDF form fields that look different in viewers and disappear if I delete the field… Custom symbols of radiobuttons and checkboxes are displayed constantly (that used to work only in MkII 10 years before or so, probably due to changes in Acrobat), and it’s not possible to use different symbols for checkend and unchecked Hraban > Am 2019-08-05 um 10:03 schrieb Henning Hraban Ramm : > > Hi, coming back to an old form project I find that something changed WRT to > form fields. > > For one, some fields appear smaller and shifted upwards – I managed to fix > that with setups. > > What I can’t change is behaviour of radiobuttons: if I click one, all rbs of > one group activate, and I can’t deactivate them any more. > > In my project all of the fields are duplicated on other pages, and while all > other fields’ contents get copied, it doesn’t work for radiobuttons; my > minimal example unfortunately can’t show that. > > > \setupinteraction[state=start] > > \setupfield[MMradio][ > option=printable, > frame=overlay, corner=round, > height=1em, width=1em, > align=bottom, > ] > > \definefield[chooseTeX][radio][MMradio][rbContext,rbLatex,rbOther][rbContext] > \definesubfield[rbContext][][] > \definesubfield[rbLatex][][] > \definesubfield[rbOther][][] > > \starttext > > I want to use \field[rbContext] \CONTEXT\ \field[rbLatex] \LaTeX\ > \field[rbOther] other. > > \page > > Just to confirm: > I want to use \field[rbContext] \CONTEXT\ \field[rbLatex] \LaTeX\ > \field[rbOther] other. > > > \stoptext > > > Greetlings, 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 > ___ ___ 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] pretty printers
Wed, May 08, 2019 ve 10:59:18PM +0200 Wolfgang Schuster napsal(a): # # # Tomas Hala schrieb am 08.05.2019 um 22:42: # >Wed, May 08, 2019 ve 10:14:45PM +0200 Wolfgang Schuster napsal(a): # ># Tomas Hala schrieb am 08.05.2019 um 21:58: # ># >Hi all, # ># > # ># >according to our wiki, there are pretty printers in ConTeXt # ># >implemented only for TEX, LUA, XML and MP. # ># > # ># >I am searching now for PHP pretty printer but I did not find # ># >anything on the net (only C and Java). I would like to ask # ># >whether is something for PHP (or for other programming languages) # ># >available. # ># # ># 1. Use the scite module which provides additional styles (e.g. cpp # ># or json) but php is still missing. # ># # ># 2. Use Aditya's vim module which uses vim to highlight source code. # ># # ># Wolfgang # > # >Maybe it is a misunderstanding but how can use these modules # >in ConTeXt? I had in mind typesetting the code in ConTeXt # >like \startTEX etc. # # 1. Scite module # # \usemodule [scite] # # \starttext # # \startCPP # #include # # using namespace std; # # int main() # { # cout << "Hello World\n"; # return 0; # } # \stopCPP # # \stoptext # # # 2. Vim module # # See Aditya's mail. # # Wolfgang Thank you once more. Tomáš ___ 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] pretty printers
Wed, May 08, 2019 ve 04:55:41PM -0400 Aditya Mahajan napsal(a): # On Wed, 8 May 2019, Tomas Hala wrote: # # >Wed, May 08, 2019 ve 10:14:45PM +0200 Wolfgang Schuster napsal(a): # ># Tomas Hala schrieb am 08.05.2019 um 21:58: # ># >Hi all, # ># > # ># >according to our wiki, there are pretty printers in ConTeXt # ># >implemented only for TEX, LUA, XML and MP. # ># > # ># >I am searching now for PHP pretty printer but I did not find # ># >anything on the net (only C and Java). I would like to ask # ># >whether is something for PHP (or for other programming languages) # ># >available. # ># # 1. Use the scite module which provides additional styles (e.g. # >cpp # ># or json) but php is still missing. # ># # 2. Use Aditya's vim module which uses vim to highlight source # >code. # ># # Wolfgang # > # >Maybe it is a misunderstanding but how can use these modules # >in ConTeXt? I had in mind typesetting the code in ConTeXt # >like \startTEX etc. # # Here is an example with the vim module: # # \usemodule[vim] # \definevimtyping[HTML][syntax=html] # \definevimtyping[PHP] [syntax=php] # # \starttext # # \startHTML # # # Hello World # # # # # # # \stopHTML # # \startPHP # # \stopPHP # # \stoptext # # See https://github.com/adityam/filter/blob/master/vim-README.md for # more details. Oh, this is new dimension for me, now I understand what Wolgang wrote. Thank you both very much. The best, Tomáš # 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 # ___ Tomáš Hála Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky Zemědělská 1, CZ-613 00 Brno, tel. +420 545 13 22 28 http://akela.mendelu.cz/~thala ___ 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] pretty printers
Tomas Hala schrieb am 08.05.2019 um 22:42: Wed, May 08, 2019 ve 10:14:45PM +0200 Wolfgang Schuster napsal(a): # Tomas Hala schrieb am 08.05.2019 um 21:58: # >Hi all, # > # >according to our wiki, there are pretty printers in ConTeXt # >implemented only for TEX, LUA, XML and MP. # > # >I am searching now for PHP pretty printer but I did not find # >anything on the net (only C and Java). I would like to ask # >whether is something for PHP (or for other programming languages) # >available. # # 1. Use the scite module which provides additional styles (e.g. cpp # or json) but php is still missing. # # 2. Use Aditya's vim module which uses vim to highlight source code. # # Wolfgang Maybe it is a misunderstanding but how can use these modules in ConTeXt? I had in mind typesetting the code in ConTeXt like \startTEX etc. 1. Scite module \usemodule [scite] \starttext \startCPP #include using namespace std; int main() { cout << "Hello World\n"; return 0; } \stopCPP \stoptext 2. Vim module See Aditya's mail. 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] pretty printers
On Wed, 8 May 2019, Tomas Hala wrote: Wed, May 08, 2019 ve 10:14:45PM +0200 Wolfgang Schuster napsal(a): # Tomas Hala schrieb am 08.05.2019 um 21:58: # >Hi all, # > # >according to our wiki, there are pretty printers in ConTeXt # >implemented only for TEX, LUA, XML and MP. # > # >I am searching now for PHP pretty printer but I did not find # >anything on the net (only C and Java). I would like to ask # >whether is something for PHP (or for other programming languages) # >available. # # 1. Use the scite module which provides additional styles (e.g. cpp # or json) but php is still missing. # # 2. Use Aditya's vim module which uses vim to highlight source code. # # Wolfgang Maybe it is a misunderstanding but how can use these modules in ConTeXt? I had in mind typesetting the code in ConTeXt like \startTEX etc. Here is an example with the vim module: \usemodule[vim] \definevimtyping[HTML][syntax=html] \definevimtyping[PHP] [syntax=php] \starttext \startHTML Hello World \stopHTML \startPHP \stopPHP \stoptext See https://github.com/adityam/filter/blob/master/vim-README.md for more details. 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] pretty printers
Wed, May 08, 2019 ve 10:14:45PM +0200 Wolfgang Schuster napsal(a): # Tomas Hala schrieb am 08.05.2019 um 21:58: # >Hi all, # > # >according to our wiki, there are pretty printers in ConTeXt # >implemented only for TEX, LUA, XML and MP. # > # >I am searching now for PHP pretty printer but I did not find # >anything on the net (only C and Java). I would like to ask # >whether is something for PHP (or for other programming languages) # >available. # # 1. Use the scite module which provides additional styles (e.g. cpp # or json) but php is still missing. # # 2. Use Aditya's vim module which uses vim to highlight source code. # # Wolfgang Maybe it is a misunderstanding but how can use these modules in ConTeXt? I had in mind typesetting the code in ConTeXt like \startTEX etc. Tomáš ___ 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] pretty printers
Tomas Hala schrieb am 08.05.2019 um 21:58: Hi all, according to our wiki, there are pretty printers in ConTeXt implemented only for TEX, LUA, XML and MP. I am searching now for PHP pretty printer but I did not find anything on the net (only C and Java). I would like to ask whether is something for PHP (or for other programming languages) available. 1. Use the scite module which provides additional styles (e.g. cpp or json) but php is still missing. 2. Use Aditya's vim module which uses vim to highlight source code. 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] New logo proposal
Hello, thanks Paul for the nice job! The colorful hexa-shaped logo seems much prettier. One point/suggestion - if the letters "TEX" shared the same background - be it e.g. light gray - it might be cleaner how to read ("discover") the word "ConTeXt"; it would also keep the hexagonal shape, associating chemistry; and it would also indicate or highlight relation to "TeX". But keep my notion or feeling just personal; the new logo is "nice enough" as published on wiki. Best regards, Lukas On Tue, 29 Jan 2019 19:58:40 +0100, Paul Schalck wrote: Hello, thanks for your feedback. Again, I don't want to impose or dismiss anything. I wanted to share this because I believed somebody else in the ConTeXt community could be interested. @Taco: Actually, I stumbled upon the nice ConTeXt group logo recently and was wondering who made it. To answer your questions: I tried to avoid any logic or rainbow-type color sequence to create something more unique. The first square had to be in blue and the middle area in a warm color. (I played around a lot with the color combinations.) Regarding the outside circle: I tried different variations, with and without a surrounding circle or round background, with and without rounded squares, and was most pleased with this solution. It's true, "clean and simple" can easily lead to "too informal". @Clyde J: Valid point. I use the logotype with the subscript 'E' whenever I can in inline text. @Floris vM: Font, spacing, overall appealingness. No Helvetica/Nimbus Sans, which has less meaning to me for ConTeXt than a DIN-ish/technical one. Colors are fun. If you don't see it this way, it's perfectly fine. @Alan B: I've uploaded MetaPost files of the main version. Yes, the horizontal version is not very exciting nor very TeX-aware. I made this one primarily because I wanted something small for a little GUI script. Now I think it's just superfluous. Greetings! Paul -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: nrpt3sn | IČO: 40763439 Bezová 1658 147 14 Praha 4 Mob.: +420 702 033 396 ___ 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] style=underbar output in export
Rik Kabel schrieb am 04.10.18 um 00:01: List, With recent betas, since a fix for tagged elements in tables, underbar processing seems to have changed (or perhaps I just noticed it after that fix). Previously, the following highlight definition worked for both pdf and export outputs: \definehighlight [Term][style={{\underbar}}] \definehighlight [Term] [style={\setbar[underbar]}] 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] style=underbar output in export
List, With recent betas, since a fix for tagged elements in tables, underbar processing seems to have changed (or perhaps I just noticed it after that fix). Previously, the following highlight definition worked for both pdf and export outputs: \definehighlight [Term][style={{\underbar}}] With the current betas (2018-10-02 and 2018-10-03) this no longer works for all output formats. I have tried a few variants, and the results are as follows: Using [style={{\underbar}}], the pdf output now shows no underlining, while the html export has the expected underlining. Using [style={\underbar}] or [style=\underbar] or [style=underbar], the pdf output shows the expected underlining, while the html export may show continuous underlining after the first use, and in any case eventually loses all formatting. In a large enough document, an error is generated in the html, but not in the log as far as I can tell: ...eXt/tex/texmf-context/tex/context/base/mkiv/lxml-tab.lua:1192: backtrack stack overflow (current limit is 1000) A test harness: xxx.css: highlight[detail="Term"], div.highlight.Term { display : inline ; font-style : inherit ; font-variant : inherit ; font-weight : inherit ; font-family : inherit ; color : inherit ; text-decoration : underline ; } xxx.tex: \setupbackend[export=yes] \setupexport[cssfile=xxx.css] \definehighlight[Term][style=underbar]% pdf ok, html bad %\definehighlight[Term][style={{\underbar}}]% pdf bad, html ok \starttext \dorecurse{200}{% \startparagraph \samplefile{ward} \Term{pollakis legomenon} \samplefile{bryson} \stopparagraph} \stoptext The html output of the above shows the text as a single long line and when displayed the last paragraph are run together with no formatting. For a larger recurse (250 does it for me) the error described above is triggered. As a work-around, I can enable one variant or the other based on the output mode, but clearly there is an issue here. -- Rik ___ 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] vim \page highlight
Hello list, Do you know what should I add to my ftplugin/context.vim to have \page highlighted when using ViM ? I tried to understand context.vim color syntax but this is magic to me (mapping is ok, but offtopic). Thanks, Damien Thiriet ___ 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] Emacs + latest beta
df (backend for directly generating pdf > > output) > > mkiv lua stats > jobdata time: 0.001 seconds saving, 0.000 seconds > loading > > mkiv lua stats > callbacks: internal: 177, file: 180, direct: 2, late: > 2, > > function 534, total: 895 > > mkiv lua stats > randomizer: resumed with value 0.55005725985393 > > mkiv lua stats > loaded patterns: en::2, load time: 0.000 > > mkiv lua stats > result saved in file: vladimir.pdf, compresslevel 3, > > objectcompresslevel 3 > > mkiv lua stats > loaded fonts: 4 files: latinmodern-math.otf, > > lmroman10-bold.otf, lmroman10-regular.otf, lmroman12-regular.otf > > mkiv lua stats > font engine: otf 3.104, afm 1.513, tfm 1.000, 9 > > instances, 3 shared in backend, 3 common vectors, 0 common hashes, load > > time 0.221 seconds > > mkiv lua stats > metapost: 0.001 seconds, loading: 0.018, execution: > > 0.001, n: 1, average: 0.019, instances: 1, luacalls: 8, memory: 2.635 M > > mkiv lua stats > used platform: linux-64, type: unix, binary subtree: > > texmf-linux-64 > > mkiv lua stats > used engine: luatex version 1.08 with functionality > level > > 6731, banner: this is luatex, version 1.08.0 (tex live 2018) > > mkiv lua stats > control sequences: 46536 of 65536 + 10 > > mkiv lua stats > lua properties: engine: lua 5.3, used memory: 86 MB > (ctx: > > 85 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ) > > mkiv lua stats > runtime: 0.536 seconds, 1 processed pages, 1 shipped > > pages, 1.866 pages/second > > mtx-context | purged files: vladimir.log, vladimir.tuc > > system | total runtime: 2.525 seconds > > > > > > TeX Output finished at Wed Aug 29 11:54:03 > > So no error this time, how about the resulted PDF file? > > >> Could you show in full your ~/.emacs file? Do you use AUCTeX or bare > >> Emacs ? > > > I use AUCTEX but I d not know bare Emacs > > I assumed that you installed auctex package, like > > $ sudo pacman -S auctex > > and do > > (load "auctex") > > in your ~/.emacs file. If you do not use auctex or not load it the Emacs > will use it's own (builtin) support for LaTeX and ConTeXt file (a > limited one). > > > (custom-set-variables > > ;; custom-set-variables was added by Custom. > > ;; If you edit it by hand, you could mess it up, so be careful. > > ;; Your init file should contain only one such instance. > > ;; If there is more than one, they won't work right. > > '(ConTeXt-Mark-version "IV") > > '(ConTeXt-engine "luatex") > > '(TeX-command-extra-options "-shell-escape") > > '(ansi-color-faces-vector > >[default default default italic underline success warning error]) > > '(ansi-color-names-vector > >["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#66" "#ccaa8f" > > "#f6f3e8"]) > > '(custom-enabled-themes (quote (leuven))) > > '(package-selected-packages > >(quote > > (yasnippet-snippets auto-complete-auctex context-coloring nova-theme > > auctex))) > > '(tab-width 4)) > > (custom-set-faces > > ;; custom-set-faces was added by Custom. > > ;; If you edit it by hand, you could mess it up, so be careful. > > ;; Your init file should contain only one such instance. > > ;; If there is more than one, they won't work right. > > ) > > > > ;; SERVER Download (MELPA): > > > > (when (>= emacs-major-version 24) > > (require 'package) > > (add-to-list > >'package-archives > >'("melpa" . "http://melpa.org/packages/;) > >t)) > > > > > > (eval-after-load "context" > > '(setq TeX-command-list > >(cons '("ConTeXt" > > "PATH=/home/aragorn/context/tex/texmf-linux-64/bin:$PATH context > --purgeall > > %s" > > TeX-run-command nil t :help "Run context (MarkIV)") > > TeX-command-list)) > > ) > > > > > > ;;(add-hook 'ConTeXt-mode-hook > > ;;(lambda() > > ;; (setq TeX-command-default "ConTeXt Full"))) > > > > (setq-default cursor-type 'bar) > > > > (set-cursor-color "#ff") > > > > > > (setq TeX-view-program-list '(("Evince" "evince %o")) > > TeX-view-program-selection '((output-pdf "Evince"))) > > > > (setq make-backup-files nil) ; stop creating backup~ files > > (setq auto-save-default nil) ; stop creating #autosave# files > > > > ;; auto close bracket insertion. New in emacs 24 > > (electric-pair-mode 1) > > > > ;; turn on highlight matching brackets when cursor is on one > > (show-paren-mode 1) > > > > > > (setq inhibit-startup-screen t) > > > > > > (add-to-list 'load-path > "/home/aragorn/texlive/2018/texmf-dist/asymptote") > > (autoload 'asy-mode "asy-mode.el" "Asymptote major mode." t) > > (autoload 'lasy-mode "asy-mode.el" "hybrid Asymptote/Latex major mode." > t) > > (autoload 'asy-insinuate-latex "asy-mode.el" "Asymptote insinuate > LaTeX." t) > > (add-to-list 'auto-mode-alist '("\\.asy$" . asy-mode)) > > > > (setq column-number-mode t) > > > > (setq line-number-mode t) > > > > > > (setq py-install-directory "~/.emacs.d/site-lisp/python-mode.el-6.1.1") > > > > (add-to-list 'load-path py-install-directory) > > > > (require 'python-mode) > > > > ;;(add-hook 'ConTeXt-mode-hook > > ;;(lambda () > >;; (setq indent-tabs-mode t > > ;; indent-line-function 'indent-relative))) > > > > (add-hook 'LaTeX-mode-hook > > (lambda() > > (add-to-list 'TeX-command-list '("LuaTeX" > "%`lualatex%(mode)%' > > %t" TeX-run-TeX nil t)) > > (setq TeX-command-default "LuaTeX") > > (setq TeX-save-query nil) > > (setq TeX-show-compilation t))) > > > > > > (setq-default TeX-engine 'luatex > > TeX-PDF-mode t) > > These settings looks good. Hope you resolved your problem. > > P.S. Why you install auctex as MELPA and don't use Archlinux package? > > > Thanks > > Fabrice > > [...] > > --- > WBR, Vladimir Lomov > > -- > A memorandum is written not to inform the reader, but to protect the > writer. > -- Dean Acheson > > ___ > 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] Emacs + latest beta
orn/vladimir.tex' > system > synctex functionality is enabled, expect 5-10 pct runtime > overhead! > fonts > preloading latin modern fonts (second stage) > fonts > 'fallback modern-designsize rm 12pt' is loaded > structure > sectioning > chapter @ level 2 : 0.1 -> First chapter > metapost> initializing instance 'metafun:1' using format 'metafun' > and method 'default' > metapost> loading 'metafun' as > '/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' > using method 'default' > metapost> initializing number mode 'scaled' > open source > level 3, order 4, name > '/home/aragorn/context/tex/texmf-context/tex/context/sample/common/ward.tex' > close source> level 3, order 4, name > '/home/aragorn/context/tex/texmf-context/tex/context/sample/common/ward.tex' > backend > xmp > using file > '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml' > pages > flushing realpage 1, userpage 1, subpage 1 > close source> level 2, order 4, name '/home/aragorn/vladimir.tex' > close source> level 1, order 4, name > '/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv' > > mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua > mkiv lua stats > used cache path: > /home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e > mkiv lua stats > resource resolver: loadtime 0.007 seconds, 1 scans with > scantime 0.000 seconds, 0 shared scans, 31 found files, scanned paths: > /home/aragorn/texmf > mkiv lua stats > stored bytecode data: 437 modules (0.217 sec), 93 tables > (0.015 sec), 530 chunks (0.232 sec) > mkiv lua stats > traced context: maxstack: 1328, freed: 5, unreachable: > 1323 > mkiv lua stats > cleaned up reserved nodes: 58 nodes, 9 lists of 455 > mkiv lua stats > node memory usage: 2 glue, 2 kern, 2 penalty, 14 > attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined > mkiv lua stats > node list callback tasks: 8 unique task lists, 6 > instances (re)created, 55 calls > mkiv lua stats > synctex tracing: 2 referenced files, 5 files ignored, 3 > objects flushed, logfile: vladimir.synctex > mkiv lua stats > used backend: pdf (backend for directly generating pdf > output) > mkiv lua stats > jobdata time: 0.001 seconds saving, 0.000 seconds loading > mkiv lua stats > callbacks: internal: 177, file: 180, direct: 2, late: 2, > function 534, total: 895 > mkiv lua stats > randomizer: resumed with value 0.55005725985393 > mkiv lua stats > loaded patterns: en::2, load time: 0.000 > mkiv lua stats > result saved in file: vladimir.pdf, compresslevel 3, > objectcompresslevel 3 > mkiv lua stats > loaded fonts: 4 files: latinmodern-math.otf, > lmroman10-bold.otf, lmroman10-regular.otf, lmroman12-regular.otf > mkiv lua stats > font engine: otf 3.104, afm 1.513, tfm 1.000, 9 > instances, 3 shared in backend, 3 common vectors, 0 common hashes, load > time 0.221 seconds > mkiv lua stats > metapost: 0.001 seconds, loading: 0.018, execution: > 0.001, n: 1, average: 0.019, instances: 1, luacalls: 8, memory: 2.635 M > mkiv lua stats > used platform: linux-64, type: unix, binary subtree: > texmf-linux-64 > mkiv lua stats > used engine: luatex version 1.08 with functionality level > 6731, banner: this is luatex, version 1.08.0 (tex live 2018) > mkiv lua stats > control sequences: 46536 of 65536 + 10 > mkiv lua stats > lua properties: engine: lua 5.3, used memory: 86 MB (ctx: > 85 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ) > mkiv lua stats > runtime: 0.536 seconds, 1 processed pages, 1 shipped > pages, 1.866 pages/second > mtx-context | purged files: vladimir.log, vladimir.tuc > system | total runtime: 2.525 seconds > > > TeX Output finished at Wed Aug 29 11:54:03 So no error this time, how about the resulted PDF file? >> Could you show in full your ~/.emacs file? Do you use AUCTeX or bare >> Emacs ? > I use AUCTEX but I d not know bare Emacs I assumed that you installed auctex package, like $ sudo pacman -S auctex and do (load "auctex") in your ~/.emacs file. If you do not use auctex or not load it the Emacs will use it's own (builtin) support for LaTeX and ConTeXt file (a limited one). > (custom-set-variables > ;; custom-set-variables was added by Custom. > ;; If you edit it by hand, you could mess it up, so be careful. > ;; Your init file should contain only one such instance. > ;; If there is more than one, they won't work right. > '(ConTeXt-Mark-version "IV"
Re: [NTG-context] Emacs + latest beta
xt: maxstack: 1328, freed: 5, unreachable: 1323 mkiv lua stats > cleaned up reserved nodes: 58 nodes, 9 lists of 455 mkiv lua stats > node memory usage: 2 glue, 2 kern, 2 penalty, 14 attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined mkiv lua stats > node list callback tasks: 8 unique task lists, 6 instances (re)created, 55 calls mkiv lua stats > synctex tracing: 2 referenced files, 5 files ignored, 3 objects flushed, logfile: vladimir.synctex mkiv lua stats > used backend: pdf (backend for directly generating pdf output) mkiv lua stats > jobdata time: 0.001 seconds saving, 0.000 seconds loading mkiv lua stats > callbacks: internal: 177, file: 180, direct: 2, late: 2, function 534, total: 895 mkiv lua stats > randomizer: resumed with value 0.55005725985393 mkiv lua stats > loaded patterns: en::2, load time: 0.000 mkiv lua stats > result saved in file: vladimir.pdf, compresslevel 3, objectcompresslevel 3 mkiv lua stats > loaded fonts: 4 files: latinmodern-math.otf, lmroman10-bold.otf, lmroman10-regular.otf, lmroman12-regular.otf mkiv lua stats > font engine: otf 3.104, afm 1.513, tfm 1.000, 9 instances, 3 shared in backend, 3 common vectors, 0 common hashes, load time 0.221 seconds mkiv lua stats > metapost: 0.001 seconds, loading: 0.018, execution: 0.001, n: 1, average: 0.019, instances: 1, luacalls: 8, memory: 2.635 M mkiv lua stats > used platform: linux-64, type: unix, binary subtree: texmf-linux-64 mkiv lua stats > used engine: luatex version 1.08 with functionality level 6731, banner: this is luatex, version 1.08.0 (tex live 2018) mkiv lua stats > control sequences: 46536 of 65536 + 10 mkiv lua stats > lua properties: engine: lua 5.3, used memory: 86 MB (ctx: 85 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ) mkiv lua stats > runtime: 0.536 seconds, 1 processed pages, 1 shipped pages, 1.866 pages/second mtx-context | purged files: vladimir.log, vladimir.tuc system | total runtime: 2.525 seconds TeX Output finished at Wed Aug 29 11:54:03 Could you show in full your ~/.emacs file? Do you use AUCTeX or bare > Emacs > ? > I use AUCTEX but I d not know bare Emacs (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(ConTeXt-Mark-version "IV") '(ConTeXt-engine "luatex") '(TeX-command-extra-options "-shell-escape") '(ansi-color-faces-vector [default default default italic underline success warning error]) '(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#66" "#ccaa8f" "#f6f3e8"]) '(custom-enabled-themes (quote (leuven))) '(package-selected-packages (quote (yasnippet-snippets auto-complete-auctex context-coloring nova-theme auctex))) '(tab-width 4)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) ;; SERVER Download (MELPA): (when (>= emacs-major-version 24) (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/;) t)) (eval-after-load "context" '(setq TeX-command-list (cons '("ConTeXt" "PATH=/home/aragorn/context/tex/texmf-linux-64/bin:$PATH context --purgeall %s" TeX-run-command nil t :help "Run context (MarkIV)") TeX-command-list)) ) ;;(add-hook 'ConTeXt-mode-hook ;;(lambda() ;; (setq TeX-command-default "ConTeXt Full"))) (setq-default cursor-type 'bar) (set-cursor-color "#ff") (setq TeX-view-program-list '(("Evince" "evince %o")) TeX-view-program-selection '((output-pdf "Evince"))) (setq make-backup-files nil) ; stop creating backup~ files (setq auto-save-default nil) ; stop creating #autosave# files ;; auto close bracket insertion. New in emacs 24 (electric-pair-mode 1) ;; turn on highlight matching brackets when cursor is on one (show-paren-mode 1) (setq inhibit-startup-screen t) (add-to-list 'load-path "/home/aragorn/texlive/2018/texmf-dist/asymptote") (autoload 'asy-mode "asy-mode.el" "Asymptote major mode." t) (autoload 'lasy-mode "asy-mode.el" "hybrid Asymptote/Latex major mode." t) (autoload 'asy-insinuate-latex "asy-mode.el" "Asymptote insinuate LaTeX." t) (add-to-list 'auto-mode-alist '("\\.asy$" . asy-mode)) (setq column-number-mode t) (setq line-number-mode t) (setq py-install-directory "~/.emacs.d/site-lisp/python-mode
[NTG-context] Fwd: Problem of compiling a file with Emacs
> >> > >> 2018-07-30 16:02 GMT+02:00 Lizardo Reyna >> <mailto:far...@disroot.org>>: > >> > >> > >> I had a similar issue in emacs few months ago. I use an > >> Ubuntu based > >> GNU/Linux distribution. > >> > >> My solution was start a new terminal to execute the > >> commands in .bashrc > >> file. When it works, a message will appear in the top of > >> the terminal. > >> "Setting "/home/farliz/context/tex" as ConTeXt root." > >> > >> Then execute emacs from that terminal typing $ emacs &. > >> This was the > >> only way I got run conTeXt from emacs. > >> > >> I'm not advanced GNU/Linux user, but there are three > >> configuration > >> files when login; .bashrc, .bash_profile, and .profile. I > >> don't know why > >> this files were not execute automatically when I login, so > >> the path to > >> conTeXt bin is not added and setuptex file is not execute. > >> For this > >> reason it was necessary to start a new terminal. > >> > >> I have my system upgraded and now I don't have problem > >> with that. > >> > >> Regards > >> > >> > >> On 30/07/18 05:45, Fabrice Couvreur wrote: > >> > Hi, > >> > I made the changes that you recommend, but it does not > work > >> > > >> > ./emacs > >> > > >> > > >> > (custom-set-variables > >> > ;; custom-set-variables was added by Custom. > >> > ;; If you edit it by hand, you could mess it up, so be > >> careful. > >> > ;; Your init file should contain only one such instance. > >> > ;; If there is more than one, they won't work right. > >> > '(ConTeXt-Mark-version "IV") > >> > '(ConTeXt-engine "luatex") > >> > '(custom-enabled-themes (quote (leuven))) > >> > '(package-selected-packages (quote (nova-theme auctex > >> > (custom-set-faces > >> > ;; custom-set-faces was added by Custom. > >> > ;; If you edit it by hand, you could mess it up, so be > >> careful. > >> > ;; Your init file should contain only one such instance. > >> > ;; If there is more than one, they won't work right. > >> > ) > >> > > >> > ;; SERVER Download (MELPA): > >> > (when (>= emacs-major-version 24) > >> > (require 'package) > >> > (add-to-list > >> >'package-archives > >> >'("melpa" . "http://melpa.org/packages/;) > >> >t) > >> > (package-initialize)) > >> > > >> > ;;(setenv "PATH" > >> "/home/aragorn/context/tex/texmf-linux-64/bin/:$PATH" t) > >> > > >> > > >> > (setq ConTeXt-mode-hook > >> > (lambda () (setq TeX-command-extra-options > >> "--purgeall"))) > >> > > >> > (setq-default cursor-type 'bar) > >> > > >> > (set-cursor-color "#ff") > >> > > >> > > >> > (setq TeX-view-program-list '(("Evince" "evince %o")) > >> > TeX-view-program-selection '((output-pdf "Evince"))) > >> > > >> > (setq make-backup-files nil) ; stop creating backup~ files > >> > (setq auto-save-default nil) ; stop creating #autosave# > >> files > >> > > >> > ;; auto close bracket insertion. New in emacs 24 > >> > (electric-pair-m
Re: [NTG-context] Problem of compiling a file with Emacs
> >> > >> > (custom-set-variables >> > ;; custom-set-variables was added by Custom. >> > ;; If you edit it by hand, you could mess it up, so be >> careful. >> > ;; Your init file should contain only one such instance. >> > ;; If there is more than one, they won't work right. >> > '(ConTeXt-Mark-version "IV") >> > '(ConTeXt-engine "luatex") >> > '(custom-enabled-themes (quote (leuven))) >> > '(package-selected-packages (quote (nova-theme auctex >> > (custom-set-faces >> > ;; custom-set-faces was added by Custom. >> > ;; If you edit it by hand, you could mess it up, so be >> careful. >> > ;; Your init file should contain only one such instance. >> > ;; If there is more than one, they won't work right. >> > ) >> > >> > ;; SERVER Download (MELPA): >> > (when (>= emacs-major-version 24) >> > (require 'package) >> > (add-to-list >> > 'package-archives >> > '("melpa" . "http://melpa.org/packages/;) >> > t) >> > (package-initialize)) >> > >> > ;;(setenv "PATH" >> "/home/aragorn/context/tex/texmf-linux-64/bin/:$PATH" t) >> > >> > >> > (setq ConTeXt-mode-hook >> > (lambda () (setq TeX-command-extra-options >> "--purgeall"))) >> > >> > (setq-default cursor-type 'bar) >> > >> > (set-cursor-color "#ff") >> > >> > >> > (setq TeX-view-program-list '(("Evince" "evince %o")) >> > TeX-view-program-selection '((output-pdf "Evince"))) >> > >> > (setq make-backup-files nil) ; stop creating backup~ files >> > (setq auto-save-default nil) ; stop creating #autosave# >> files >> > >> > ;; auto close bracket insertion. New in emacs 24 >> > (electric-pair-mode 1) >> > >> > ;; turn on highlight matching brackets when cursor is on one >> > (show-paren-mode 1) >> > >> > >> > (setq inhibit-startup-screen t) >> > >> > >> > ./bashrc >> > >> > export >> PATH=$PATH:/home/aragorn/context/tex/texmf-linux-64/bin >> > source ~/context/tex/setuptex >> > export TEXROOT=/home/aragorn/context/tex >> > export >> PATH=$PATH:/home/aragorn/texlive/2018/bin/x86_64-linux >> > >> > >> > >> > >> > 2018-07-30 4:16 GMT+02:00 Lizardo M. Reyna Bowen >> mailto:far...@disroot.org> >> > <mailto:far...@disroot.org <mailto:far...@disroot.org>>>: >> > >> > I understand that you can not compile the document >> with C-c C-c in >> > Emacs. >> > >> > I have the following setup of my .bashrc and .init >> files. >> > >> > BASH: >> > >> > export >> PATH=$PATH:/home/farliz/context/tex/texmf-linux-64/bin >> > source ~/context/tex/setuptex >> > export OSFONTDIR="~/.fonts" >> > export TEXROOT=~/context/tex >> > >> > >> > EMACS: >> > >> > (custom-set-variables >> > '(ConTeXt-Mark-version "IV") >> > '(ConTeXt-engine "luatex")) >> > >> > Using this setup I compile all documents with C-c >> C-c (AucTex mode). >> > >> > >> > Cheers >> > >> > -- >> > >> > Dr. Lizardo M. Reyna Bowen >> > Docente >> > Facultad de Ingeniería Agrícola | Universidad >> Técnica de Manabí >> > [Dirección] Lodana, Santa Ana, Manabí, Ecuador >> > [Móvil] +593 982924637 >> > PGP Key: 0xa35a15b90ee64e8d >> > >> > >> > >> >> -- >> Dr. Lizardo M. Reyna Bowen >> Profesor >> Facultad de Ingeniería Agrícola | Universidad Técnica de >> Manabí >> [Dirección] Lodana, Santa Ana, Manabí, Ecuador >> [Móvil] +593 982924637 >> PGP Key: 0xa35a15b90ee64e8d >> >> >> > > -- > Dr. Lizardo M. Reyna Bowen > Docente > Facultad de Ingeniería Agrícola | Universidad Técnica de Manabí > [Dirección] Lodana, Santa Ana, Manabí, Ecuador > [Móvil] +593 982924637 > PGP Key: 0xa35a15b90ee64e8d > > -- Dr. Lizardo M. Reyna Bowen Profesor Facultad de Ingeniería Agrícola | Universidad Técnica de Manabí [Dirección] Lodana, Santa Ana, Manabí, Ecuador [Móvil] +593 982924637 PGP Key: 0xa35a15b90ee64e8d ___ 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 of compiling a file with Emacs
I tested the file and conTeXt works well from emacs. The problem seems to be related with your conTeXt standalone installation. when the file is compiled, emacs create a log buffer *... output*. You could post that information to look the possible error. Have you tried reinstalling conTeXt? attached test.pdf On 07/31/2018 04:43 AM, Fabrice Couvreur wrote: > With (setenv "PATH" > "/home/aragorn/texlive/2018/bin/x86_64-linux/context:$PATH" t) It > works properly with C-c C-c > > > With (setenv "PATH" > "/home/aragorn/context/tex/texmf-linux-64/bin:$PATH" t) It does not > work with C-c C-c > > The compilation is however correct by using a terminal without Emacs > from the standalone version > Fabrice > > 2018-07-31 10:18 GMT+02:00 Fabrice Couvreur > mailto:fabrice1.couvr...@gmail.com>>: > > Hello, > I did the same thing as you, but nothing changes. Have you tested > the file? The expected result is to have the title of the chapter > with the chapter number in large and light gray color. All > compiles except the macro that allows to have the chapter number; > I get a small rectangle instead. > Fabrice > > 2018-07-30 16:02 GMT+02:00 Lizardo Reyna <mailto:far...@disroot.org>>: > > > I had a similar issue in emacs few months ago. I use an Ubuntu > based > GNU/Linux distribution. > > My solution was start a new terminal to execute the commands > in .bashrc > file. When it works, a message will appear in the top of the > terminal. > "Setting "/home/farliz/context/tex" as ConTeXt root." > > Then execute emacs from that terminal typing $ emacs &. This > was the > only way I got run conTeXt from emacs. > > I'm not advanced GNU/Linux user, but there are three > configuration > files when login; .bashrc, .bash_profile, and .profile. I > don't know why > this files were not execute automatically when I login, so the > path to > conTeXt bin is not added and setuptex file is not execute. For > this > reason it was necessary to start a new terminal. > > I have my system upgraded and now I don't have problem with that. > > Regards > > > On 30/07/18 05:45, Fabrice Couvreur wrote: > > Hi, > > I made the changes that you recommend, but it does not work > > > > ./emacs > > > > > > (custom-set-variables > > ;; custom-set-variables was added by Custom. > > ;; If you edit it by hand, you could mess it up, so be careful. > > ;; Your init file should contain only one such instance. > > ;; If there is more than one, they won't work right. > > '(ConTeXt-Mark-version "IV") > > '(ConTeXt-engine "luatex") > > '(custom-enabled-themes (quote (leuven))) > > '(package-selected-packages (quote (nova-theme auctex > > (custom-set-faces > > ;; custom-set-faces was added by Custom. > > ;; If you edit it by hand, you could mess it up, so be careful. > > ;; Your init file should contain only one such instance. > > ;; If there is more than one, they won't work right. > > ) > > > > ;; SERVER Download (MELPA): > > (when (>= emacs-major-version 24) > > (require 'package) > > (add-to-list > > 'package-archives > > '("melpa" . "http://melpa.org/packages/;) > > t) > > (package-initialize)) > > > > ;;(setenv "PATH" > "/home/aragorn/context/tex/texmf-linux-64/bin/:$PATH" t) > > > > > > (setq ConTeXt-mode-hook > > (lambda () (setq TeX-command-extra-options "--purgeall"))) > > > > (setq-default cursor-type 'bar) > > > > (set-cursor-color "#ff") > > > > > > (setq TeX-view-program-list '(("Evince" "evince %o")) > > TeX-view-program-selection '((output-pdf "Evince"))) > > > > (setq make-backup-files nil) ; stop creating backup~ files > > (setq auto-save-default nil) ; stop creating #autosave# files > > > > ;; auto close bracket insertion. New in emac
Re: [NTG-context] future versions
On 7/25/2018 6:18 PM, Alan Braslau wrote: On Wed, 25 Jul 2018 09:50:58 -0400 Rik Kabel wrote: On 7/25/2018 04:19, Henning Hraban Ramm wrote: Am 2018-07-25 um 03:29 schrieb Rik Kabel : I would ask for more stylistic or semantic tagging to be added to the XML export. A good example is that of bibliographies, where font styles carry significant semantic meaning (depending on the standard used: italic for book titles, ibold or talic for volume and issue numbers, and so on.) The xml output reflects none of this. I do not know whether one would want stylistic tagging (italic, bold, ...) or semantic (booktitle, issue number). In either case, they could be implemented as highlights or tagged elements, both of which are currently carried through, and the user could then apply the appropriate styling with css or other transformation mechanisms. Generally, you get stylistic tagging by using \definehighlight. I replaced \em and \bf by \emph{} and \strong{} in my projects. Didn’t try real bibliographies or xml input yet, but I guess you can change the setup to use those. \definehighlight does not (by default) nest. You can handle this to some degree in css or xslt for XML exports, but it is not an acceptable replacement for font switches with pdf output. And since the syntax for highlights ( \highlight{text} ) differs from that for font switches ( {\highlight text} ), it is not simply a matter of different environments for each output format, although perhaps \groupedcommand might help (I have not tried this). But that is in some ways beside the point. A user should not have to find and modify every instance in the source where such setups occur. When exports or tagging are enabled, it would be good if this were automatically done. Do you know about \savebtxdataset [default] [bibliography.xml] [alternative=xml, criterium=all] You can thus save your bibliography data for use, rather than or in addition to the rendered list. I'll upload a beta with - tagged publications - embedded bib data in xml format and bibtex format that should be enough for postprocessing magic. Of course we cannot catch cases where users mess around with specific setups which is no big deal as fo rexporting purposes one can use a simple standard style. 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] future versions
On Wed, 25 Jul 2018 09:50:58 -0400 Rik Kabel wrote: > On 7/25/2018 04:19, Henning Hraban Ramm wrote: > > Am 2018-07-25 um 03:29 schrieb Rik Kabel > > : > >> I would ask for more stylistic or semantic tagging to be added to > >> the XML export. A good example is that of bibliographies, where > >> font styles carry significant semantic meaning (depending on the > >> standard used: italic for book titles, ibold or talic for volume > >> and issue numbers, and so on.) The xml output reflects none of > >> this. > >> > >> I do not know whether one would want stylistic tagging (italic, > >> bold, ...) or semantic (booktitle, issue number). In either case, > >> they could be implemented as highlights or tagged elements, both > >> of which are currently carried through, and the user could then > >> apply the appropriate styling with css or other transformation > >> mechanisms. > > Generally, you get stylistic tagging by using \definehighlight. > > I replaced \em and \bf by \emph{} and \strong{} in my projects. > > > > Didn’t try real bibliographies or xml input yet, but I guess you > > can change the setup to use those. > > \definehighlight does not (by default) nest. You can handle this to > some degree in css or xslt for XML exports, but it is not an > acceptable replacement for font switches with pdf output. And since > the syntax for highlights ( \highlight{text} ) differs from that for > font switches ( {\highlight text} ), it is not simply a matter of > different environments for each output format, although perhaps > \groupedcommand might help (I have not tried this). > > But that is in some ways beside the point. A user should not have to > find and modify every instance in the source where such setups occur. > When exports or tagging are enabled, it would be good if this were > automatically done. > Do you know about \savebtxdataset [default] [bibliography.xml] [alternative=xml, criterium=all] You can thus save your bibliography data for use, rather than or in addition to the rendered list. Alan ___ 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] future versions
On 7/25/2018 3:50 PM, Rik Kabel wrote: On 7/25/2018 04:19, Henning Hraban Ramm wrote: Am 2018-07-25 um 03:29 schrieb Rik Kabel : I would ask for more stylistic or semantic tagging to be added to the XML export. A good example is that of bibliographies, where font styles carry significant semantic meaning (depending on the standard used: italic for book titles, ibold or talic for volume and issue numbers, and so on.) The xml output reflects none of this. I do not know whether one would want stylistic tagging (italic, bold, ...) or semantic (booktitle, issue number). In either case, they could be implemented as highlights or tagged elements, both of which are currently carried through, and the user could then apply the appropriate styling with css or other transformation mechanisms. Generally, you get stylistic tagging by using \definehighlight. I replaced \em and \bf by \emph{} and \strong{} in my projects. Didn’t try real bibliographies or xml input yet, but I guess you can change the setup to use those. \definehighlight does not (by default) nest. You can handle this to some degree in css or xslt for XML exports, but it is not an acceptable replacement for font switches with pdf output. And since the syntax for highlights ( \highlight{text} ) differs from that for font switches ( {\highlight text} ), it is not simply a matter of different environments for each output format, although perhaps \groupedcommand might help (I have not tried this). font switches using 'style' are bound to a structural element But that is in some ways beside the point. A user should not have to find and modify every instance in the source where such setups occur. When exports or tagging are enabled, it would be good if this were automatically done. you can't expect reliable structure from non-structured input so if you want an export that is ok, the penalty is proper structuring 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] future versions
On 7/25/2018 04:19, Henning Hraban Ramm wrote: Am 2018-07-25 um 03:29 schrieb Rik Kabel : I would ask for more stylistic or semantic tagging to be added to the XML export. A good example is that of bibliographies, where font styles carry significant semantic meaning (depending on the standard used: italic for book titles, ibold or talic for volume and issue numbers, and so on.) The xml output reflects none of this. I do not know whether one would want stylistic tagging (italic, bold, ...) or semantic (booktitle, issue number). In either case, they could be implemented as highlights or tagged elements, both of which are currently carried through, and the user could then apply the appropriate styling with css or other transformation mechanisms. Generally, you get stylistic tagging by using \definehighlight. I replaced \em and \bf by \emph{} and \strong{} in my projects. Didn’t try real bibliographies or xml input yet, but I guess you can change the setup to use those. \definehighlight does not (by default) nest. You can handle this to some degree in css or xslt for XML exports, but it is not an acceptable replacement for font switches with pdf output. And since the syntax for highlights ( \highlight{text} ) differs from that for font switches ( {\highlight text} ), it is not simply a matter of different environments for each output format, although perhaps \groupedcommand might help (I have not tried this). But that is in some ways beside the point. A user should not have to find and modify every instance in the source where such setups occur. When exports or tagging are enabled, it would be good if this were automatically done. -- Rik ___ 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] More spurious problems in exports
On 7/18/2018 10:56, Hans Hagen wrote: On 7/18/2018 4:59 AM, Rik Kabel wrote: List, Another oddity with elements in XML / xhtml / html export: With a defined highlight, a break is inserted if the highlight is the first item in an environment. If it is not the first item in the environment, no break is inserted. Most of the other odd breaks can be dealt with in css. These are more difficult to tame -- for example, in the startlines environment in the example below, there is not enough information preserved to know if the tagged item is supposed to be a single line or not. (Tests using 2018-07-17 beta on Win64.) You get this, with the numbers representing the paragraph number: \starttext % foo \startparagraph \emIt{x 1} a 1 \stopparagraph \startparagraph {\emIt x 2} a unset \stopparagraph \stoptext of this: \starttext foo 1 \startparagraph \emIt{x 2} a 2 \stopparagraph \startparagraph {\emIt x 3} a 1 \stopparagraph \stoptext so, when the par number is effectively set inside a group you end up with bad tags which will force that break because it's a different paragraph .. no way to intercept or chaneg that The best I can do is issue a warning like export > fuzzy paragraph: a (U+00061) [space] - (U+0002D) 2 (U+00032) 1 (U+00031) 4 (U+00034) 7 (U+00037) 4 (U+00034) 8 (U+00038) 3 (U+00033) 6 (U+00036) 4 (U+00034) 7 (U+00037) backend > x so that one can fix the source. Changing from a font switch – {\emIt text} – to a command – \emit{text} – resolves the issue for these cases. I will add a note to the wiki that, when changing from font switches to highlighting, one should change the syntax. -- Rik ___ 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] More spurious problems in exports
On 7/18/2018 4:59 AM, Rik Kabel wrote: List, Another oddity with elements in XML / xhtml / html export: With a defined highlight, a break is inserted if the highlight is the first item in an environment. If it is not the first item in the environment, no break is inserted. Most of the other odd breaks can be dealt with in css. These are more difficult to tame -- for example, in the startlines environment in the example below, there is not enough information preserved to know if the tagged item is supposed to be a single line or not. (Tests using 2018-07-17 beta on Win64.) You get this, with the numbers representing the paragraph number: \starttext % foo \startparagraph \emIt{x 1} a 1 \stopparagraph \startparagraph {\emIt x 2} a unset \stopparagraph \stoptext of this: \starttext foo 1 \startparagraph \emIt{x 2} a 2 \stopparagraph \startparagraph {\emIt x 3} a 1 \stopparagraph \stoptext so, when the par number is effectively set inside a group you end up with bad tags which will force that break because it's a different paragraph .. no way to intercept or chaneg that The best I can do is issue a warning like export > fuzzy paragraph: a (U+00061) [space] - (U+0002D) 2 (U+00032) 1 (U+00031) 4 (U+00034) 7 (U+00037) 4 (U+00034) 8 (U+00038) 3 (U+00033) 6 (U+00036) 4 (U+00034) 7 (U+00037) backend > x so that one can fix the source. Has anyone dealt with this before? Is there a way to control the insertion of the breaks? MWE: \setupbackend [export=yes] \definehighlight [emIt] [style=italic] \starttext \startparagraph {\emIt Taa} aaa aa a aa aaa aa aa aa. Taa a, a aa a a. \stopparagraph \startparagraph Taa {\emIt aaa} aa a aa aaa aa aa aa. Taa a, a aa a a. \stopparagraph \startlines {\emIt Xyz} abcdefg Xyz {\emIt abcdefg} \stoplines \stoptext XML output snip: http://www.w3.org/1998/Math/MathML;> Taa aaa aa a aa aaa aa aa aa. Taa a, a aa a a. Taa aaa aa a aa aaa aa aa aa. Taa a, a aa a a. Xyz abcdefg Xyz abcdefg Rendered in Firefox: -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] More spurious problems in exports
On 7/18/2018 4:59 AM, Rik Kabel wrote: List, Another oddity with elements in XML / xhtml / html export: With a defined highlight, a break is inserted if the highlight is the first item in an environment. If it is not the first item in the environment, no break is inserted. Most of the other odd breaks can be dealt with in css. These are more difficult to tame -- for example, in the startlines environment in the example below, there is not enough information preserved to know if the tagged item is supposed to be a single line or not. (Tests using 2018-07-17 beta on Win64.) Has anyone dealt with this before? Is there a way to control the insertion of the breaks? MWE: \setupbackend [export=yes] \definehighlight [emIt] [style=italic] \starttext \startparagraph {\emIt Taa} aaa aa a aa aaa aa aa aa. Taa a, a aa a a. \emIt{Taa} \stopparagraph \startparagraph Taa {\emIt aaa} aa a aa aaa aa aa aa. Taa a, a aa a a. \stopparagraph \startlines {\emIt Xyz} abcdefg Xyz {\emIt abcdefg} \stoplines \stoptext XML output snip: http://www.w3.org/1998/Math/MathML;> Taa aaa aa a aa aaa aa aa aa. Taa a, a aa a a. Taa aaa aa a aa aaa aa aa aa. Taa a, a aa a a. Xyz abcdefg Xyz abcdefg Rendered in Firefox: -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] More spurious problems in exports
List, Another oddity with elements in XML / xhtml / html export: With a defined highlight, a break is inserted if the highlight is the first item in an environment. If it is not the first item in the environment, no break is inserted. Most of the other odd breaks can be dealt with in css. These are more difficult to tame -- for example, in the startlines environment in the example below, there is not enough information preserved to know if the tagged item is supposed to be a single line or not. (Tests using 2018-07-17 beta on Win64.) Has anyone dealt with this before? Is there a way to control the insertion of the breaks? MWE: \setupbackend [export=yes] \definehighlight [emIt] [style=italic] \starttext \startparagraph {\emIt Taa} aaa aa a aa aaa aa aa aa. Taa a, a aa a a. \stopparagraph \startparagraph Taa {\emIt aaa} aa a aa aaa aa aa aa. Taa a, a aa a a. \stopparagraph \startlines {\emIt Xyz} abcdefg Xyz {\emIt abcdefg} \stoplines \stoptext XML output snip: http://www.w3.org/1998/Math/MathML;> Taa aaa aa a aa aaa aa aa aa. Taa a, a aa a a. Taa aaa aa a aa aaa aa aa aa. Taa a, a aa a a. Xyz abcdefg Xyz abcdefg Rendered in Firefox: -- Rik ___ 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] highlighting in registers (index)
According to http://wiki.contextgarden.net/Registers#Processors, processors are the MkIV way of highlighting within index entries. If there are highlighted and not-highlighted entries, the normal version wins. If there is a highlighted version with subentry, the subentry becomes highlighted and is sorted unter the normal main entry, if there doesn’t exist a normal entry with the same subentry. (These are just observations, I wouldn’t know how it should be different.) But: Is there a way to highlight just subentries? e.g. \index{Sun+emph->rays} """ \defineprocessor[emph][style=italic] \starttext \index{Sun} \index{Sun->rays} \index{emph->Sun} \index{Sun+emph->rays} % doesn’t work \index{emph->Sun+rays} % rays upright \index{emph->Sun+beams} % beams italic \placeindex[n=1] \stoptext """ Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___ 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] roadmap
On 5/14/2018 9:36 PM, Henning Hraban Ramm wrote: Hi Hans, thank you so much! Am 2018-05-14 um 17:17 schrieb Hans Hagen <j.ha...@xs4all.nl>: - Get rid of inconsistencies in the user interface e.g. by introducing new commands with settings. +1 - Check what additional features users want (miss) and decide to what extent and with what priority we will put effort in this. We've reached a point where interference prevents more complex extensions. * Recently I had some difficulties with (foot)notes, you’ll remember the margin notes thread. There are still some things that don’t work/look as I’d like them to, and I hope also others would welcome more flexible/simpler placement options. Notes and margins will always be somewhat tricky esp used with other features because in the end tex has to make a choice .. in that respect i think that fully automated typesetting will never be ok. * User/list/structure variables: Probably it’s just me, but there are a few difficulties. hm, they're just data carried with whatever items that have accessors ... and thre tightly bound so real problems cannot happen there * References: see Massimiliano’s question, apparently there are options missing for code before/after the list of pages These hooks were added; adding a few more hooks is normally no big deal ... the main problem with such additions is that they seldom get documented (in fact that imo is also a it up to the one requesting such features). * ePub: I got requests for ePubs again and will look into what’s still wrong/difficult. Last time I checked, footnote markers were accumulating in strange places. Maybe some more default constructs could get a representation in export XML, e.g. \bf, \it It's hard to comment on that one without examples ... keep in mind that the xport is *not* meant as visual companion to the pdf but as a kind of representation of structure as seen by context ... any reordering due to typesetting can reflect that unless one does the obvious: for the expor make a special run with dedicated settings (like making notes end notes) ... notes (and other inserts) are a separate thing in the tex engine and have an asynchronous character. The better the input structure the better the export, and fro real robust multiple usage just code in xml. Visual properties (e.g. fonts) are not part of a structure, but you can just use highlights and such as these get tagged (with classes) so one then can relate them to e.g. fonts or colors. Keep in mind that \bf is not a construct, but a highlight named 'important' is. We can't make structure from non-structure. (FWIW: as long as we don't have projects that need this the priority for such features - the export basically started as a proof of concept - they get a low priority.) * There are a few things missing in image handling - when I wrote my placement macros I needed image size calculations that already exist in ConTeXt but were not easily accessible. hm, there's a lot available (actually also already in mkii) but i fear that there are too many variantions in demands .. there is a rather extensive plugin mechanism too (but not that documented) ... if some info is missing it can be added (although i don't think that there is more available in the engine that we expose) * Would it be possible (or is it already?) to place stuff on layers and let "everything else" run around it? E.g. for half-page images I’m having a hard time using the float placement, while I could simply place images on a layer. I'm not sure what you mean here but for the main flow we only hav eside floats. However, normally everything can be put on / moved to layers (iir the details manual shows some of that) but tex will never be loks dtp. Again, when i'd need that (given that I know what that means) for a project thaen i'd probably look into it. I've learned that much can be done in tex but not all without interference with other mechanisms. - Are there reasonable challenges left. * ePub the export + a (dedicated) css ... exports have to be generic ... i must admit that i gave away my ebook reader as i never use(d) it and bying a new one is not on the agenda/budget (now) * PDF/* (X, A, UA - probably only reasonable with external tools, but it seems like there’s not a lot that’s usable) we support various formats (to some extend the backend even adapts to it) ... tagged pdf ... already there for quite a while but i never had any demand for it so i never really check the current state (also because imo it's a it weird feature ... only there because publishers don't want to distribute sources that are suitable for rendering variations ... so we're stuck with some pseudo structure related to visuals) (i might upgrade tagging and exports as they closely relate but it's not easy to get motivated for something that one has no real use for so at most it will cold winter evening
Re: [NTG-context] Spurious space in \definestartstop
Henri Menke <mailto:henrime...@gmail.com> 30. Januar 2018 um 21:46 On Tue, 2018-01-30 at 21:24 +0100, Wolfgang Schuster wrote: Henri Menke 30. Januar 2018 um 21:12 On Tue, 2018-01-30 at 11:58 +0100, Hans Hagen wrote: On 1/30/2018 11:34 AM, Henri Menke wrote: On 01/30/2018 09:17 PM, Hans Hagen wrote: On 1/30/2018 2:54 AM, Henri Menke wrote: Dear list, the title says it all. Please add \ignorespaces in a place you deem appropriate. MWE is below. sometimes you will also add \removeuwantedspaces in the stop I'm confused. Does that mean there is going to be a fix? no, why should there be? spaces are never ignored after the last [...] that is checked for unless a command has an explicit \ignorespaces I'm not convinced. Both "before" and "commands" see a \relax and therefore \ignorespaces is dropped. I can put \removeunwantedspaces there but that deletes the space before \start. The \framed command correctly drops the space after the options. --- \definestartstop [spurious space a] [before=\ignorespaces, after=\removeunwantedspaces] \definestartstop [spurious space b] [before=\removeunwantedspaces, after=\removeunwantedspaces] \starttext Hello Foo Bar World Hello \start[spurious space a] Foo Bar \stop\ World % ^^^ neither space^^^ is skipped Hello \start[spurious space b] Foo Bar \stop\ World % ^^^ skips this space ^^^ instead of this Hello \startframed[offset=overlay] Foo Bar \stopframed\ World % That's the behaviour I'm looking for. \stoptext You assume \start[<...>] ... \stop is linked to \definestartstop but this isn’t the case, what the environment does is to generate a start-command with the argument but this works for every environment, e.g. \start[itemize] ... \stop does the same as \startitemize ... \stopitemize. I'm not asking to add \ignorespaces to the definition of \start. I'm rather asking, where I have to but \ignorespaces in the setup to eat the space after the options I pass to \start. Why do use insinst on the use of \start, when you create a new command/environment with \definestartstop you get additional commands for the instance where the space at the begin of the environment are gobbled. \definestartstop[Highlight][style=italic,color=red] \starttext Text \Highlight{Text} Text \blank \input ward\par \startHighlight \input ward \stopHighlight \input ward \stoptext To answer your question where you can add \ignorespace, there is no way to add it. 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] type and typing comments for TeX and Lua
On Tue, 26 Dec 2017, Pablo Rodriguez wrote: On 12/21/2017 10:53 PM, Aditya Mahajan wrote: [...] Can you post a minimal working example. I don't use XML so it is difficult for me to understand how these commands are used in practice. Aditya, many thanks for your reply and your help. A minimal sample would be: \startbuffer[demo] b pa/p !--comment-- \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{doc|p|code}{xml:*} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \startpar\xmlflush{#1}\stoppar \stopxmlsetups \startxmlsetups xml:code \xmlprettyprinttext{#1}{xml} \stopxmlsetups \starttext \xmlprocessbuffer{main}{demo}{} \stoptext But if this is too tricky to you, maybe it isn’t a good idea to extend the module to XML usage. There are (at least) two reasons for that: - I’m the only user who asked for this (too much trouble for a single user). - Easier alternatives would be to improve the ConTeXt core or the context-highlight module. It isn't too difficult to support this. See attached file. This will clutter your PWD with temp files. To avoid that, create a subdirectory called "output" and set \setupvimtyping[directory=output] Then all the temp files will be stored in the directory "output". test.tex Description: TeX 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 ___
Re: [NTG-context] type and typing comments for TeX and Lua
On 12/21/2017 10:16 PM, Christoph Reller wrote: > > My module does not come in standard context. You have to download it > from https://bitbucket.org/philexander/context-highlight. If general > interest is high enough I can ask to > add it. Christoph, could you enable issues in your Bitbucket repository? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] type and typing comments for TeX and Lua
You can try vim module. It supports all the formats that vim is able to support and it is a builtin module. \usemodule[t-vim] \definevimtyping [TEX] [syntax=context] \definevimtyping [XML] [syntax=xml] \definevimtyping [LUA] [syntax=lua] \starttext \startTEXpage[offset=2em] a \TEX\ inline comment: \inlineTEX{ag%befe} \Lua\ inline comment: \inlineLUA{agb --efe} \startTEX This is text. % a comment, not \comment \stopTEX \startXML This is text. \stopXML \startLUA if code=="code" then --this is a comment \stopLUA \stopTEXpage \stoptext > On 22 Dec 2017, at 4:16 AM, Pablo Rodriguez <oi...@gmx.es> wrote: > > On 12/21/2017 05:04 PM, Christoph Reller wrote: >> Dear Pablo, >> >> At least for XML you could use my module highlight-xml: >> >> \usemodule[highlight-xml] >> \definetype[xml][option=xml] >> [...] >> Note that even partial XML is highlighted correctly. > Dear Christoph, > > many thanks for your reply. > > Your module is really great fine. It supports both \setuptype and > \setuptyping options. > > It is really a pity that it lacks TeX, since I’m focused on ConTeXt yet > (after all, it would be a Spanish introduction to ConTeXt ;-)). XML will > come later. > > I’m afraid that XML comments are colored the same way with your module > and with standard ConTeXt. > > Comment marks in are colored as standard tags, I’m afraid. I mean, > "" are colored in blue as "". > > To show a comment as a whole, setting up both comment text and marks in > a single and unique color is required. > > This is why I thought that SnippetCommentMark and SnippetCommentText > would be a fine way to typeset full comments. > > Sorry for insisting. It isn’t perfectionism. My friends and family > members aren’t computer scientists. I have to explain what a comment is > from the very beginning. If colors are misleading, they are lost. > > This is why I have to solve this before resuming text composition. > > It would be great that you also offered a highlight-tex (with > SnippetCommentText and SnippetCommentMark). Or to ease the module > loading, it would be useful to have a context-highlight (or similar name). > > If your implementation could be latter added (if Hans agrees) to the > ConTeXt core. > > 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 > ___ ___ 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] type and typing comments for TeX and Lua
On 12/21/2017 10:53 PM, Aditya Mahajan wrote: > [...] > Can you post a minimal working example. I don't use XML so it is difficult > for me to understand how these commands are used in practice. Aditya, many thanks for your reply and your help. A minimal sample would be: \startbuffer[demo] b pa/p !--comment-- \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{doc|p|code}{xml:*} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \startpar\xmlflush{#1}\stoppar \stopxmlsetups \startxmlsetups xml:code \xmlprettyprinttext{#1}{xml} \stopxmlsetups \starttext \xmlprocessbuffer{main}{demo}{} \stoptext But if this is too tricky to you, maybe it isn’t a good idea to extend the module to XML usage. There are (at least) two reasons for that: - I’m the only user who asked for this (too much trouble for a single user). - Easier alternatives would be to improve the ConTeXt core or the context-highlight module. Many thanks for your help again, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] type and typing comments for TeX and Lua
On 12/21/2017 10:16 PM, Christoph Reller wrote: > On Thu, 21 Dec 2017 21:16:45 +0100, Pablo Rodriguez wrote: >> [...] >> It is really a pity that it lacks TeX, since I’m focused on ConTeXt yet >> (after all, it would be a Spanish introduction to ConTeXt ;-)). XML will >> come later. > > Maybe, if I find the time, I will add TeX and Lua to my module some time. Hi Christoph, sorry for not replying before. I was away for Christmas. I would love to be able to contribute the TeX highlighting, but this is far beyond my knowledge :-(. >> I’m afraid that XML comments are colored the same way with your module >> and with standard ConTeXt. > > That should not be the case. Could it be, that the highlight-xml > module fails to load? Please check your log file for a "module not > found" entry. I have attached the result of my earlier sample. You are right, I had to download and install the module. > My module does not come in standard context. You have to download it > from https://bitbucket.org/philexander/context-highlight. If general > interest is high enough I can ask to > add it. The module doesn’t come with the ConTeXt Suite, but it seems to be added to it: https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=82. Taco, sorry for bothering, but why is this module not distributed with the ConTeXt Suite? Many thanks for your help (both Christoph and Taco), Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] type and typing comments for TeX and Lua
On Thu, 21 Dec 2017 21:16:45 +0100, Pablo Rodriguez <oi...@gmx.es> wrote: > On 12/21/2017 05:04 PM, Christoph Reller wrote: >> Dear Pablo, >> >> At least for XML you could use my module highlight-xml: >> >> \usemodule[highlight-xml] >> \definetype[xml][option=xml] >> [...] >> Note that even partial XML is highlighted correctly. > > It is really a pity that it lacks TeX, since I’m focused on ConTeXt yet > (after all, it would be a Spanish introduction to ConTeXt ;-)). XML will > come later. Maybe, if I find the time, I will add TeX and Lua to my module some time. > I’m afraid that XML comments are colored the same way with your module > and with standard ConTeXt. That should not be the case. Could it be, that the highlight-xml module fails to load? Please check your log file for a "module not found" entry. I have attached the result of my earlier sample. My module does not come in standard context. You have to download it from https://bitbucket.org/philexander/context-highlight. If general interest is high enough I can ask to add it. Kind regards, Christoph ___ 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] type and typing comments for TeX and Lua
On 12/21/2017 05:04 PM, Christoph Reller wrote: > Dear Pablo, > > At least for XML you could use my module highlight-xml: > > \usemodule[highlight-xml] > \definetype[xml][option=xml] > [...] > Note that even partial XML is highlighted correctly. Dear Christoph, many thanks for your reply. Your module is really great fine. It supports both \setuptype and \setuptyping options. It is really a pity that it lacks TeX, since I’m focused on ConTeXt yet (after all, it would be a Spanish introduction to ConTeXt ;-)). XML will come later. I’m afraid that XML comments are colored the same way with your module and with standard ConTeXt. Comment marks in are colored as standard tags, I’m afraid. I mean, "" are colored in blue as "". To show a comment as a whole, setting up both comment text and marks in a single and unique color is required. This is why I thought that SnippetCommentMark and SnippetCommentText would be a fine way to typeset full comments. Sorry for insisting. It isn’t perfectionism. My friends and family members aren’t computer scientists. I have to explain what a comment is from the very beginning. If colors are misleading, they are lost. This is why I have to solve this before resuming text composition. It would be great that you also offered a highlight-tex (with SnippetCommentText and SnippetCommentMark). Or to ease the module loading, it would be useful to have a context-highlight (or similar name). If your implementation could be latter added (if Hans agrees) to the ConTeXt core. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] type and typing comments for TeX and Lua
On Tue, Mon, 18 Dec 2017 23:50:09 +0100, Pablo Rodriguez <oi...@gmx.es> wrote: > I have the following sample: > > \definetype[context][option=tex] > \definetype[lua][option=lua] > \starttext > \startTEXpage[offset=2em] > > a \TEX\ inline comment: \context{ag%befe} > > \Lua\ inline comment: \lua{agb --efe} > > \startTEX > This is text. % a comment, not \comment > \stopTEX > > \startXML > This is text. > \stopXML > > \startLUA > if code=="code" then --this is a comment > \stopLUA > \stopTEXpage > \stoptext > > Would it be possible that all comments in type and typing (at least, for > Lua, XML and TeX) would have the same formatting for the whole comment > contents, including the comment signs? Dear Pablo, At least for XML you could use my module highlight-xml: \usemodule[highlight-xml] \definetype[xml][option=xml] \starttext \startTEXpage[offset=2em] \xml{attr="value"}\crlf \xml{This is text.} \startXML This is text. \stopXML \stopTEXpage \stoptext Note that even partial XML is highlighted correctly. Cheers, Christoph ___ 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 ___