Re: [NTG-context] Problem with setuptagging and ebgaramond font
On 2016-11-19 20:58, Rik Kabel wrote: Hmmm, it does work (the hyphenation, at least) with TL2016. Both logs show the same font files and typescript files. Sorry, I did not mean to say the same files, but files identical in content. The TL files are all from the TL directory. The standalone files are from the standalone distribution and from my Windows font directory. The font files originally were not the same version; TL2015 has version 0.016+, while my Windows font directory had version 0.016. The typescript files are identical, one in the \ConTeXt directory, one in the TL2016 directory. When I installed the TL2016 version of the fonts as system fonts (and cleared the font cache) I still have the problem. So, identical files, but different locations. -- 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] Problem with setuptagging and ebgaramond font
On 2016-11-20 05:52, Hans Hagen wrote: On 11/20/2016 3:39 AM, Rik wrote: On 2016-11-19 20:58, Rik Kabel wrote: Hmmm, it does work (the hyphenation, at least) with TL2016. Both logs show the same font files and typescript files. Sorry, I did not mean to say the same files, but files identical in content. The TL files are all from the TL directory. The standalone files are from the standalone distribution and from my Windows font directory. The font files originally were not the same version; TL2015 has version 0.016+, while my Windows font directory had version 0.016. The typescript files are identical, one in the \ConTeXt directory, one in the TL2016 directory. When I installed the TL2016 version of the fonts as system fonts (and cleared the font cache) I still have the problem. So, identical files, but different locations. And the garden distribution? I see hyphens. Problem solved. Windows keeps multiple versions of a font file, even when it says it is replacing. A bit of file maintenance and all is well. Thank you for confirming that you see hyphens. -- 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] hsize changes unexpectedly
On 2016-11-20 12:16, Wolfgang Schuster wrote: Rik Kabel <mailto:cont...@rik.users.panix.com> 20. November 2016 um 17:49 Okay. What is the scope of local use? It’s used to change the width of a \vbox. \starttext \ruledvbox\bgroup \input ward \egroup \ruledvbox\bgroup \hsize.5\textwidth \input ward \egroup \stoptext It is different from grouping (as demonstrated by placing the middle two lines above in braces). Which example? Wolfgang Sorry, the example at the head of the thread. Originally: \starttext \hsize200pt \dorecurse{60}{\recurselevel: \the\hsize\ \the\textwidth\par} \stoptext And with the \hsize in a group : \starttext {\hsize200pt \dorecurse{60}{\recurselevel: \the\hsize\ \the\textwidth\par}} \stoptext I did not expect it to change the result, and it does not. So I was asking just what Hans meant by “local use.” -- 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] A better \definesymbol sought
On 2017-01-23 14:09, Rik Kabel wrote: On 2017-01-23 00:06, Alan Braslau wrote: > On Sun, 22 Jan 2017 22:39:53 -0500 Rik Kabel > wrote: > >> So, how can I make the inner glyph (‘?’ in the example below) >> transparent, so that the background shows through along with >> anything else that lives on a lower layer? I’ve seen a method for >> constructed shapes, but nothing that I can apply to text glyphs. >> Undraw doesn’t do it. > > Undraw is simply draw using the background color. > > Transparency is a MetaFun extension to MetaPost (so part of > ConTeXt). > > draw q withtransparency (1,0.5) ; % (method,transparency) > > Alan Hmmm. That does not work for me (with any of many method and transparency values). The ‘?’ is solid black. I do see a message in the log that looks related: mkiv lua stats > page group warning: transparencies are used but no pagecolormodel is set but adding \setcolors[state=start,cmyk=yes] does not change that; both the warning and the solid black glyph remain. Could this be an issue of the PDF viewer? Is it a font issue? Okay, I got a clean compile using \definecolor and referencing that in the MP page. \setupbackgrounds [page] [background=color,backgroundcolor=yellow] \definecolor[Transp][r=1,t=0,a=12] \definefont [DVSrB] [file:DejaVuSerif-Bold.ttf] \startuseMPgraphic{HeartTest 1} picture h,q ; h := "♥" infont "\truefontname{DejaVuSerif-Bold.ttf}" scaled 20 ; q := textext("{\DVSrB ?}") scaled 10 ; q := q shifted - (xpart center q, 12pt) ; draw h withcolor blue ; draw q withtransparency(12,0) ; draw q shifted (72pt,0) withtransparency(12,0) ; \stopuseMPgraphic \startuseMPgraphic{HeartTest 2} picture h,q ; h := "♥" infont "\truefontname{DejaVuSerif-Bold.ttf}" scaled 20 ; q := textext("\color[Transp]{\DVSrB ?}") scaled 10 ; q := q shifted - (xpart center q, 12pt) ; draw h withcolor blue ; draw q ; draw q shifted (72pt,0) ; \stopuseMPgraphic \starttext \useMPgraphic{HeartTest 1} \useMPgraphic{HeartTest 2} \stoptext Unfortunately, the result is not what I want. The result is that the “?” disappears, allowing the color directly behind it to show through. The example above shows that it works with \definecolor but not withwithtransparency. I have no idea why, and certainly realize it could be my error. What I want is that the background of the page (yellow in this case) should show through. That is what is done with fill / reverse / cycle, as in: \setupbackgrounds [page] [background=color,backgroundcolor=yellow] \startuseMPgraphic{CircleTest} path p,q ; p := fullcircle scaled 2cm ; q := fullcircle scaled 1cm ; fill p -- reverse q -- cycle withcolor blue; \stopuseMPgraphic \starttext \useMPgraphic{CircleTest} \stoptext where the background color (yellow) comes through the inner circle (path q). Can this be done with text characters? I suspect that the answer is that the glyphs have to be converted to paths and that it will only work when there are no islands (as in ‘P’). -- 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] \startlines not working in footnotes
On 2017-01-31 15:52, Alan Bowen wrote: I am trying to set some poetry in a footnote and have encountered a problem. \starttext Here is a footnote. \footnote{Some text: \startlines a b c d \stoplines And some more text.} \stoptext produces a b c d (a single line). Is this a wee bug or have I missed something? I am using the latest minimals. Alan Place that section into a buffer: \starttext Here is a footnote. \startbuffer[fn:abcd] \startlines a b c d \stoplines \stopbuffer \footnote{Some text: \getbuffer[fn:abcd] And some more text.} \stoptext -- 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] Problem with \seeindex and two + entries
ConTeXters, An index register entry with two + components does not get set properly. With the following example, the text “/see Mmm+Plus/” should be on a separate, indented line as “Plus /see Mmm+Plus/” but I see it on the first line as “Aaa /see Mmm+Plus/”. When there are zero or one + components, all is well. \starttext \seeindex{Aaa+Plus}{Mmm+Plus} \seeindex{Bbb+Plus}{Nnn, Comma} \seeindex{Ccc, Comma}{Ooo, Comma} \seeindex{Ddd, Comma}{Ppp+Plus} Some text. \index{Aaa+SecondPlus} \index{Bbb+SecondPlus} \index{Mmm+Plus} \index{Mmm+SecondPlus} \index{Ppp+Plus} \index{Ppp+SecondPlus} \index{Ooo, Comma} \index{Nnn, Comma} Some more text. \page \placeindex \stoptext -- 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] Altering footnotes via \setupfootnotes
On 2017-03-27 09:16, Procházka Lukáš Ing. wrote: Hello Henri, that's it - thank you for the solution! BTW - Your code seems to work even without \blank[-line]: \setupnote [footnote] [after={\switchtobodyfont[\noteparameter{bodyfont}]}] \setupnotation [footnote] [ after={\blank[line]}, indenting={yes,medium}, ] \starttext \input knuth\footnote{\input knuth } \input ward\footnote{\input ward } \stoptext Thank you anyway. Best regards, Lukas On Sat, 25 Mar 2017 03:43:54 +0100, Henri Menke wrote: Indenting is easy. For space in between I haven’t found anything useful. You can hack something with after. \setupnote [footnote] [after={\switchtobodyfont[\noteparameter{bodyfont}]\blank[-line]}] \setupnotation [footnote] [ after={\blank[line]}, indenting={yes,medium}, ] \starttext \input knuth\footnote{\input knuth } \input ward\footnote{\input ward } \stoptext The \blank[-line] in \setupnote is necessary. It acts to remove the final \blank[line] via \setupnotation. To see, process the file with and without an addeed \showframe. -- 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] Hyphens missing (again) with setupbackend[export
On 2017-07-24 05:51, Hans Hagen wrote: On 7/24/2017 3:51 AM, Rik Kabel wrote: Aditya came across this in 2011 ([NTG-context] export kills hyphen symbol <https://www.mail-archive.com/ntg-context@ntg.nl/msg58460.html>)[1] with the Fontin font. It wasn’t answered then. It is back if it ever left. Here is an example: \definefontfamily [TestFont] [rm] [Antykwa Torunska Cond] \setupbodyfont [TestFont] \setupbackend [export=maybe]% or yes, or no, or ... \setuppapersize [A7] \starttext \input ward \stoptext If the \setupbackend statement is removed, or an invalid key is used, all is well. It fails with a valid key and any value for that key. I am experiencing the problem of missing hyphens with this font even without \setupbackend, but cannot yet construct a working example. wipe your font cache, add this to the top of your file \enabledirectives[otf.checksofthyphen] Thank you. That resolves it. Is this an issue for all fonts that are missing a soft hyphen glyph at x00A0? -- 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] Problems with headers using margintext alternative
Bump. The problem persists two updates later. In the picture below, the green line represents the edge of the page. Does anyone else get the same result? -- Rik On 2017-07-23 15:48, Rik Kabel wrote: The following example demonstrates two problems with alternative=margintext in \setuphead: 1. When used with start/stop sectioning, text following the title may be set on the wrong line. 2. Without regard to the type of sectioning, margintext titles may spill over the left edge of the margin and beyond the page frame. \setuppapersize [letter] [letter,oversized] \setuplayout [location={middle,middle}] \showframe \setuphead [chapter] [number=no, alternative=inmargin] \setuphead [section] [ alternative=margintext, insidesection={\blank[-line]}, ] \starttext \starttitle [title={Problem description}] \bgroup \setupwhitespace[medium] \startparagraph This demonstrates two problems with \type{alternative=margintext} in \tex{setuphead}: \startitemize[packed,n] \startitem When used with start/stop sectioning, text following the title may be set on the wrong line. \stopitem \startitem Without regard to the type of sectioning, \type{margintext} titles may spill over the left edge of the margin and beyond the page frame. (Oddly, \tex{paperwidth} is less than the sum of \tex{makeupwidth} and the margin widths and distances for both letter and A4 paper.) \stopitem \stopitemize \stopparagraph \startparagraph With start/stop sectioning, the text following the section title may begin one line below the start of the title. That can be remedied if there is no whitespace between paragraphs with \type{insidesection={\blank[-line]}}, but the remedy fails when there is whitespace, and increasing the correction has no effect. With traditional sectioning, the text appears baseline|-|aligned with the heading, as expected. The the correction has no effect in any case with traditional sectioning. \stopparagraph \startparagraph It makes no difference in any test how the paragraphs are delimited—blank lines, \tex{bpar}/\tex{epar}, \tex{startparagraph}/\tex{stopparagraph}, or \tex{par}. \stopparagraph \startparagraph Tested with standalone beta 2017.07.17 00:20. \stopparagraph \egroup \page \startchapter [title={Start/stop sectioning}] \startsection[title={Mis\-cel\-la\-neous quo\-ta\-tions}] \startparagraph \input jojomayer \stopparagraph \startparagraph \input carrol \wordright{No indent no whitespace.} \stopparagraph \stopsection \bgroup \setupwhitespace[medium] \startsection[title={Miscellaneous quotations}] \startparagraph \input jojomayer \stopparagraph \startparagraph \input carrol \wordright{No indent medium whitespace.} \stopparagraph \stopsection \egroup \bgroup \setupindenting[yes,small] \startsection[title={Miscellaneous quotations}] \startparagraph \input jojomayer \stopparagraph \startparagraph \input carrol \wordright{Small indent no whitespace.} \stopparagraph \stopsection \egroup \bgroup \setupwhitespace[medium] \setupindenting[yes,small] \startsection[title={Miscellaneous quotations}] \startparagraph \input jojomayer \stopparagraph \startparagraph \input carrol \wordright{Small indent medium whitespace.} \stopparagraph \stopsection \egroup \stopchapter \chapter{Traditional sectioning} \section{Mis\-cel\-la\-neous quo\-ta\-tions} \input jojomayer \par \input carrol \wordright{No indent no whitespace.} \par No indent no whitespace. \par \bgroup \setupwhitespace[medium] \section{Miscellaneous quotations} \input jojomayer \par \input carrol \wordright{No indent medium whitespace.} \par \egroup \bgroup \setupindenting[yes,small] \section{Miscellaneous quotations} \input jojomayer \par \input carrol \wordright{Small indent no whitespace.} \par \egroup \bgroup \setupwhitespace[medium] \setupindenting[yes,small] \section{Miscellaneous quotations} \input jojomayer \par \input carrol \wordright{Small indent medium whitespace.} \par \egroup \showlayout \stoptext -- Rik
Re: [NTG-context] Problems with heads using margintext alternative
Willi, Pablo, and list, Willi, I understand that the overprint of the margin can be managed by changing the default layout. The left margin box displayed by \showframe using the default layout clearly shows the margin extending past the edge of the page. I would think that the default layout should be usable as is, which for this purpose means that the defined text areas are contained within the page boundary. If the default layout is not intended to be usable, it should be so documented. I will gladly update the wiki if this is the case, but first I would like authoritative confirmation that this is the case. Indeed, the extra line before the text occurs only when inter-paragraph whitespace is set and start/stop is used. This does indeed appear to be something that can be repaired. Pablo, The \inmargin commands do suffer from the same problem; you need simply change marg to marg marg marg to see it. The problem is not that text is set outside the margin. It is all set in the margin. The problem is that the left margin is laid out over the page edge, and text set in the part of the margin that is off the page is lost. -- Rik On 2017-07-29 13:10, Pablo Rodriguez wrote: On 07/23/2017 09:48 PM, Rik Kabel wrote: The following example demonstrates two problems with alternative=margintext in \setuphead: 1. When used with start/stop sectioning, text following the title may be set on the wrong line. Hi Rik, the issue comes with \startparagraph and sectioning commands (other margindata are fine): \setuphead [chapter] [alternative=margintext] \starttext \chapter{Chapter} \startparagraph\input jojomayer\stopparagraph \blank \inleft{marg}\startparagraph\input jojomayer\stopparagraph \blank \inright{marg}\startparagraph\input jojomayer\stopparagraph \blank \inouter{marg}\startparagraph\input jojomayer\stopparagraph \ininner{marg}\startparagraph\input jojomayer\stopparagraph \blank \inmargin{marg}\startparagraph\input jojomayer\stopparagraph \blank \inother{marg}\startparagraph\input jojomayer\stopparagraph \stoptext But \inmargin has no problem with margin 2. Without regard to the type of sectioning, margintext titles may spill over the left edge of the margin and beyond the page frame. I cannot align them either. I don’t know what we may be missing here. Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] About \setupheadertexts : simplify a code
On 2017-08-18 19:01, Fabrice Couvreur wrote: If I test this file, it does not work % macros=mkvi \startcomponent dm-1 \environment MyLayout \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m} \dorecurse{20}{\input knuth} \math{x^2+4x+5=0} \stopcomponent 2017-08-19 0:23 GMT+02:00 Rik Kabel <mailto:cont...@rik.users.panix.com>>: On 2017-08-18 18:14, Fabrice Couvreur wrote: Hi Rik, Can you clarify by editing my files ? Fabrice 2017-08-18 23:57 GMT+02:00 Rik Kabel mailto:cont...@rik.users.panix.com>>: On 2017-08-18 17:34, Fabrice Couvreur wrote: Hello, It's ok for me if I compile the Aditya file. I have another problem with a simple structure. I created the file MyLayout.tex containing the macro and I want to call this macro in the dm1.tex file, but it does not work. Thank you Fabrice # MyLayout.tex # % macros=mkvi \startenvironment MyLayout \setuplayout [header=3\lineheight, headerdistance=\lineheight] \setupbackgrounds [header] [text] [ frame=off, bottomframe=on, framecolor=darkgray, rulethickness=2pt, ] \defineframed[headerframed] [ frame=off, % For visualization set this to on height=fit, width=fit, location=bottom, boffset=\lineheight, ] \starttexdefinition MyHeader #where #day #month #year #title #number #time \setupheadertexts [{\headerframed[align=middle, foregroundstyle=bold, foregroundcolor=red] {#title n\high{o}\,#number}}] \setupheadertexts [{\headerframed[align=flushleft, foregroundstyle=\ssx] {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}] [{\headerframed[align=flushright, foregroundstyle=\ssx] {#where \\ {#time}}}] \stoptexdefinition \stopenvironment ## dm-1.tex ## \startcomponent dm-1 \environment MyLayout \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m} \input knuth \stopcomponent 2017-08-18 18:44 GMT+02:00 Otared Kavian mailto:ota...@gmail.com>>: Hi Aditya, Thanks for having sent the example file: indeed with your file I can typeset the example and see the expected result. I don’t know what happened when I copied and pasted the example from the e-mail… I think the command % macros = mkvi was not set correctly written at the first line, that is I had a space before the percent sign « % ». In fact %macros=mkvi or %macros = mkvi work as well. By the way, wouldn’t be more user friendly, and more in the spirit of ConTeXt, if we had a command saying \enablemode[mkvi] in order to tell ConTeXt that we are using %macros = mkvi ? Best regards: OK > On 18 Aug 2017, at 17:54, Aditya Mahajan mailto:adit...@umich.edu>> wrote: > > On Fri, 18 Aug 2017, Otared Kavian wrote: > >> Hi Aditya, >> >> I tried to typeset your example, but got an error: whether or not the command >> % macros=mkvi >> is present on the fist line, then ConTeXt complains saying that >> ! Illegal parameter number in definition of \MyHeader >> and stops typesetting pointing to the command \stoptexdefinition. > > I am attaching the file. It runs fine here with ConTeXt ver: 2017.08.14 23 :57. > > Aditya I believe you need to declare the use of MKVI macros as the first thing in your project file if they will be used by any components. -- Rik %macros=mkvi \startcomponent dm-1 … I was wrong, and (no surprise) Aditya was correct. The %macros=mkvi line is not needed in dm1.tex. It should be at the top of MyLayout.tex. You may then reference MyLayout.tex (note the addition of the extension) in dm1.tex, or you may rename the file to MyLayout.mkvi, where you can reference it as either MyLayout or as MyLayout.mkvi. Sorry for the noise. -- Rik ___ If
Re: [NTG-context] Is this a bug in header marking?
I have resolved the issue in a practical, but unsatisfactory, manner. I have resorted to creating an interlude, a new heading derived from title, setting it for left pages with no displayed head: \definehead[ChapterEpigraph][title] \setuphead [ChapterEpigraph][ page={yes,left}, insidesection=\vfill, aftersection={\vfill\vfill}, header=empty, placehead=no, ] Thus, \startChapterEpigraph can safely be placed before each \startchapter (and between the last \stopchapter of a part and the start of the next part) when that last chapter ends on a recto). This clears the chapter marking in the headings of the new verso. When there is an epigraph to set, it is placed in the ChapterEpigraph section. This is unsatisfactory because it implements an inaccurate semantic model of the document – the epigraphs belong to the following chapter, not the numberless, nameless interlude. And there is almost certainly a bug lurking here. I had considered adding the marking of the next chapter to the interlude to better tie the interlude to the place it belongs. When I made ChapterEpigraph derivative of chapter: \definehead[ChapterEpigraph][chapter] \setuphead [ChapterEpigraph][ page={yes,left}, insidesection=\vfill, aftersection={\vfill\vfill}, header=yes, number=no, placehead=no, ] and provided a marking: \startChapterEpigraph[marking={Same as next chapter marking}] The resulting page displayed the marking of the previous chapter, not the marking provided. This appears to be the same behavior as in the example below in my first note, although I can provide another working example using this apparatus if anyone wants it. Can we please have a \setuphead or \setupheads option to clear markings at the end of the level, and not simply override them when the next equivalent level starts? (Although perhaps, based on the observed issue described just above, there is some other logic at work here.) -- Rik On 2017-10-15 23:54, Rik Kabel wrote: As a followup to my query on suppressing header marking, I have prepared an example which clearly shows odd, if not buggy behavior. The book places chapter openings on recto pages which follow a verso that may have an epigraph. When there is no epigraph, the blank verso is properly unmarked by a header, but when there is an epigraph, the header from the previous chapter appears on the page. How can I eliminate this orphan header? \setuppagenumbering [alternative=doublesided,location=] \setupheadertexts [][{\it\getmarking[section]}] [{\it\getmarking[chapter]}][] \starttexdefinition unexpanded startSectionEpigraph \dostartbuffer [SectionEpigraph] [startSectionEpigraph][stopSectionEpigraph] \stoptexdefinition \setuphead [chapter][ beforesection=\setups{chapter:epigraph}] \startsetups chapter:epigraph \page[yes,left]% same result with yes,header,footer,left \doifelsebuffer{SectionEpigraph} {\getbuffer[SectionEpigraph] \resetbuffer[SectionEpigraph]} {\donothing} \page[yes,header,footer,right] \stopsetups \starttext \completecontent \startfrontmatter \startchapter[title=Preface] \startparagraph \input ward \stopparagraph \stopchapter \stopfrontmatter \startbodymatter \startchapter[title=Chapter First] \startparagraph \input ward \stopparagraph \stopchapter \startSectionEpigraph Why does this page have the heading from the previous chapter? \stopSectionEpigraph \startchapter[title=Chapter Second] \startparagraph \input ward \stopparagraph \stopchapter \startSectionEpigraph Look up! \stopSectionEpigraph \startchapter[title=Chapter Third] \startparagraph \input ward \stopparagraph \stopchapter \startchapter[title=Chapter Final] \startparagraph \input ward \stopparagraph \stopchapter \stopbodymatter \stoptext -- 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
Re: [NTG-context] Two requests for new btx subsystem
The most recent update (ConTeXt ver: 2017.10.29 15:44 MKIV beta fmt: 2017.10.30 int: english/english) has broken \cite processing. I now get the author name (poorly formatted) instead of the translator, and instead of the title, with the example document. If this is not the result of some misconfiguration or misuse of the macros on my part, can this part of the update be rolled back? -- Rik On 2017-10-21 19:00, Rik Kabel wrote: Two improvement requests for the new bibliography subsystem: 1. Tag titles (and subtitles) with the language explicitly provided in the bib entry. 2. Add editor and translator to fields supported in \cite[field][tag]. An example follows. It shows that the title generated by the \cite[title][tag] does not have an associated language, even though the bib entry specifies one and the publications manual indicates that this is intended for the rendering and hyphenation of the title. It is apparently used for that in the bibliography, but it is needed as well in the text. (And yes, /Formenwandlungen/ does have the same hyphenation points in both German and English; this was just a convenient example.) It also shows that [translator] is not inserted into the text. *NOTE* that when \cite[editor][tag] is attempted (and present in the bib entry) compilation halts with the Lua error no string to print, but continues to completion when allowed. \mainlanguage[en] \startbuffer[TestBib] @BOOK{Tschichold1953, author = {Jan Tschichold}, title = {Formenwandlungen der \&-Zeichen}, year = {1953}, publisher = {D. Stempelag}, address = {Frankfurt am Main}, language = {german}, } @BOOK{Plaat1957, author = {Jan Tschichold}, translator = {Frederick Plaat}, title = {The Ampersand: Its origin and development}, year = {1957}, publisher = {Woudhuysen}, address = {London}, note = {Translation by F.\ Plaat of \cite{Tschichold1953}.}, } \stopbuffer \loadbtxdefinitionfile[apa] \usebtxdataset [TestBib] [TestBib.buffer] \definebtxrendering [TestBib] [apa] [dataset=TestBib] \setupspellchecking [state=start, method=3] \definecolor [word:de] [r=.85] \starttext \startparagraph \cite[title][TestBib::Plaat1957] is a translation by \cite[translator][TestBib::Plaat1957] of \cite[title][TestBib::Tschichold1953] by \cite[author][TestBib::Tschichold1953]. \stopparagraph \startparagraph {\it The Ampersand: Its origin and development} is a translation by Frederick Plaat of {\it\de Formenwandlungen der \&-Zeichen} by Jan Tschichold. \stopparagraph \blank[big] \placebtxrendering[TestBib][method=dataset] \stoptext -- 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] Simplefonts (new) fallback issue with Linux Libertine O
Fallbacks (at least the range I tested) do not work with the roman face of Linux Libertine O in the new (core) simplefonts implementation. I first thought that this might be a Libertine issue, but further testing makes me suspect it may be a simplefonts issue. Or perhaps I have used the wrong syntax with the new implementation. Below are two MWEs, one based on the current standalone (current version: 2013.11.16 12:43), running on Windows 8.1 with the win64 bins, and the second based on an up-to-date TL13 (ConTeXt ver: 2013.05.28 00:36 MKIV) on the same system. Linux Libertine O is version When I run the standalone version, the fallback characters do not appear between the first angles, but do appear between the bf and it angles. They appear between angles in all cases with the TL13 MWE. I do not see the problem with my home-grown typescript for Libertine under either TL13 or the current standalone. I do not see the problem with Junicode, Gentium Book Basic, or Gentium Basic. I have not yet tried other fonts. Standalone MWE: \definefallbackfamily [libertine] [serif] [Gentium Plus] [range={0x02052-0x02058},force=yes] \definefontfamily [libertine] [serif] [Linux Libertine O] \setupbodyfont[libertine] \def\SDQP{⁓⁗}% Swung Dash Quad Prime U02053U02057 \starttext >\SDQP< >{\bf \SDQP}< >{\it \SDQP}< >{\bf{\it \SDQP}}< \stoptext TL13 MWE: \setupbodyfontenvironment [default][em=italic] \usemodule[simplefonts] \setmainfontfallback [Gentium Plus] [range={0x02052-0x02058},force=yes] \setmainfont [Linux Libertine O] \def\SDQP{⁓⁗}% Swung Dash Quad Prime U02053U02057 \starttext >\SDQP< >{\bf \SDQP}< >{\it \SDQP}< >{\bf{\it \SDQP}}< \stoptext -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Broken bibliographies in 2014-03-07 beta
Bibliographies are no longer generated. MWE is the example code at http://wiki.contextgarden.net/Bibliography_mkiv, which no longer generates an output file and shows the following in the blg file: I found no \citation commands---while reading file cite.aux I found no \bibdata command---while reading file cite.aux I found no \bibstyle command---while reading file cite.aux You've used 0 entries,... With the stable version, the same section reads: Database file #1: sample.bib You've used 4 entries, -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Movable code, was Re: starttexdefinition error in standalone, works in TL2013
On 2014-03-01 07:32, Wolfgang Schuster wrote: \unexpanded\def\startTranslation {\begingroup \dosingleempty\dostartTranslation} \def\dostartTranslation[#1]% {\iffirstargument \getrawparameters[Translation][setups=,language=en,#1]% \fi \grabbufferdata[Translation][startTranslation][stopTranslation]} \def\stopTranslation {\language[\Translationlanguage]% \Translationsetups (\,\getbufferdata[Translation]\removeunwantedspaces\,)% \endgroup} \starttext \startTranslation[language=nl] It betrays a slow-witted mentality to pursue the streams, but not to see the sources of things. \stopTranslation \stoptext Wolfgang Wolfgang (and list), The above code works fine with simple texts, but is not movable. Adding a footnote, as in the following, to the text section shows that: \starttext \startTranslation[language=en] It betrays a slow-witted mentality to pursue the streams, but not to see the sources of things.% \footnote{% \startTranslation[language=la] Tardi ingeni est rivulos consectari, fontes rerum non videre. \stopTranslation% } \stopTranslation \stoptext or even by: \starttext It betrays a slow-witted mentality to pursue the streams, but not to see the sources of things.% \footnote{% \startTranslation[language=la] Tardi ingeni est rivulos consectari, fontes rerum non videre. \stopTranslation% } \stoptext In LaTeX, this might be dealt with by a combination robust command definitions and \protected. When I wrote an endnotes routine in LaTeX, I used those and wrote the notes to a file which was then read back in at the appropriate time, but that does not help with pagenotes. I imagine that at the time the footnote is processed the Translationsetups and Translationlanguage macros are no longer defined, and I have no idea how one would reference the buffer contents, although it does look like they have stable names in the log file. Can this be made movable? Also, am I correct that the \iffirstargument test in the definition of dostarttranslation is redundant? My understanding is that \dosingleempty assures the presence of [#1]. -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Possible bug: definetextbackground and grid layout
On 2014-04-04 17:22, Rik Kabel wrote: On 2014-04-04 17:17, Rik Kabel wrote: The following example fails to compile, complaining "Missing { inserted." It compiles cleanly if one or more of the three marked lines are removed. This is the case with TL2013 and with recent standalone beta versions. I do not know if it ever worked. \setuplayout [grid=yes]%line one \definetextbackground[TB][ topoffset=.25em,bottomoffset=.25em,% line two location=paragraph,% line three ] \starttext \startTB prisca iuvent alios ego me nunc denique natum gratulor: haec aetas moribus apta meis. \stopTB \stoptext -- Rik Sorry for the noise. It needs alternative= instead of location= in the textbackground definition. Where can we find the command description? Perhaps I retracted too quickly. The background is not placed with alternative=paragraph. It looks like all I did using that was to remove one of the three problem lines. To be clear, this is an issue with MKIV. -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Unwanted whitespace for tables and enumerations after \inmargin headings
On 2014-04-19 04:55, Wolfgang Schuster wrote: \setuphead [section] [alternative=text, command=\SectionCommand, distance=0pt, insidesection={\blank[overlay]}] \define[2]\SectionCommand {\inmargin{#1 -- #2}} \setuplayout[backspace=4cm] \starttext \startsection[title={First}] \input ward \stopsection \startsection[title={Second}] \startitemize \item One \item Two \stopitemize \stopsection \startsection[title={Third}] \starttabulate \NC Knuth \NC \input{knuth} \NC\NR \NC Tufte \NC \input{tufte} \NC\NR \stoptabulate \stopsection \stoptext Wolfgang Thank you, Wolfgang. This works mostly, but not completely, for start/stop sectioning (not for classic sectioning). I do notice that there is still a problem with tabulations if you add a horizontal line (\HL or \FL) to the beginning of the table. New example, building on yours: \setuphead [section] [alternative=text, command=\SectionCommand, distance=0pt, insidesection={\blank[overlay]}] \define[2]\SectionCommand {\inmargin{#1 -- #2}} \setuplayout[backspace=4cm] \starttext \startsection[title={Okay with text here}] Text here \starttabulate \FL \NC Knuth \NC \input{knuth} \NC\NR \NC Tufte \NC \input{tufte} \NC\NR \stoptabulate \stopsection \startsection[title={Fails with no text}] \starttabulate \FL \NC Knuth \NC \input{knuth} \NC\NR \NC Tufte \NC \input{tufte} \NC\NR \stoptabulate \stopsection \stoptext -- RIk Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] linebreaks and cell width in xtables
On 2014-05-04 15:46, Pablo Rodriguez wrote: On 05/04/2014 08:27 PM, Rik Kabel wrote: Any of the following will work here. Which is or are idiomatic I will leave for others to say. This cell has multiple lines.\\ This cell has multiple lines.\par This cell has multiple lines.\blank[none] Many thanks for your reply, Rik. I’m afraid none of them works. Here is my sample: \starttext \startxtable[option=stretch] \startxrow \startxcell aaa\blank[none]aaa \stopxcell \startxcell \ConTeXt\ \contextversion \stopxcell \stopxrow \startxrow \startxcell This cell has multiple lines. Vertical spacing is wrong. \stopxcell \startxcell What am I missing? \stopxcell \stopxrow \stopxtable \stoptext I’m using latest beta (2014.04.28 23:24) and the issue happens when there is text before and after the break. Pablo Pablo, With your example, I get which shows a problem in row 2. When I add \\ to the first line of text in row 2 column 1, as shown here \starttext \startxtable[option=stretch] \startxrow \startxcell aaa\blank[none]aaa \stopxcell \startxcell \ConTeXt\ \contextversion \stopxcell \stopxrow \startxrow \startxcell This cell has multiple lines.\\ Vertical spacing is wrong. \stopxcell \startxcell What am I missing? \stopxcell \stopxrow \stopxtable \stoptext I get which perhaps has some faults in the vertical spacing, but is much better than the original. The spacing can be improved by specifying [align=lohi] for that cell. I get the same result with the other two methods I suggested. Is there a reason that you cannot use one of these methods in row 2 as you do in row 1? Perhaps we would all benefit from an obeylines alignment option? -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Using the margin for two purposes
On 2014-05-18 09:50, Matthias Weber wrote: Thanks Rik, that is very helpful. Now I am having some difficulties with coordinating the \inmargins with the marginrules. In the example below, I notice the oddity that \startmarginrule[2] is closer to the text than \startmarginrule[1] or \startmarginrule[3], which are at equal distance. I can live with that. There are only three things I'd like to improve: i) I'd like to put my default \inmargin arguments into the setup, but I can't figure out whether to use \setupinmargin or \setupinmargindata, and where to put the arguments. ii) Ideally I'd like to use a description to be able to write \startgreenline ... \stopgreenline, and I have tried this with \setupdescription, but failed. iii) Dream: Instead of solid margin rules I would love to have other options, like squiggly lines, dashed, dotted. Thanks! Matthias \setupmarginrule[rulethickness=.1pt] % works \setupmargindata[][align=middle,width=2cm] %??? \definedescription[greenline] % ??? [before={\setupmarginrule[rulecolor=green] \indenting[no] \startmarginrule[2]}, after={\stopmarginrule} ] \starttext \inmargin[method=first][frame=on,corner=round] {Read\\this\\first} \setupmarginrule[rulecolor=red] \indenting[no] \startmarginrule[1] \input{knuth} \stopmarginrule \inmargin[method=first][frame=on,corner=round,align=middle,width=2cm,offset=3pt] {Read\\this\\second} \setupmarginrule[rulecolor=green] \indenting[no] \startmarginrule[2] \input{tufte} \stopmarginrule \inmargin[][frame=on,corner=round,align=middle,width=2cm] {Read\\this\\third} \setupmarginrule[rulecolor=blue] \indenting[no] \startmarginrule[3] \input{knuth} \stopmarginrule \inmargin[][frame=on,corner=round,align=middle,width=2cm] {Read\\this\\fourth} \setupmarginrule[rulecolor=black] \indenting[no] \startmarginrule[4] \input{knuth} \stopmarginrule \startgreenline \input{tufte} \stopgreenline \stoptext I have been playing with this a bit. I think that the following does what you want as far as setting up the margin text and description. I am no help on the mp stuff that you will need for curly or other-dotted rules. As you probably saw, neither \setupmargindata nor \setupmarginframed are in the wiki. The list archive has some hints, but the source code, if you ignore a couple of misleading comments, suggested what I got to work. The problem you will run into with the description as you want to use it comes when you have multiple paragraphs. Without a start/stop mechanism, there is no way to mark the paragraphs to include within the scope of the line. As long as you are willing to enclose multiple paragraphs in braces (and provide a null description as I do here) you will be fine, but at that point you may as well use the start/stop. There is still a problem with the margin rule extending through the blank line that results from the implied \par at the end of the description block (and any explicit \par). It looks ugly and isn't matched by the behavior of the rule in the start/stop text. Perhaps someone else can find a way around it. Some of this is probably unnecessary for what you want; for example, instead of using optional arguments you may prefer to hardcode the choice of rule # and color. If you want to always use the same color with the same rule #, you can simplify in other ways. I did use MKVI syntax, simply because I have been trying to use it consistently in all my current work. It should be easily translated back to earlier syntax. % macros=mkvi \setupmarginrules[rulethickness=2pt,alternative=1] \setupmargindata [left] [location=left, style=\bfxx] \setupmarginframed[left] [frame=on, framecolor=darkgray, corner=round, offset=3pt, width=2cm, align=middle] \starttexdefinition startMtext \bgroup \dotripleempty\dostartMtext \stoptexdefinition \starttexdefinition dostartMtext [#RULE][#COLOR][#ORDER] \doifemptyelse{#RULE} {\def\Rule{2}}% default rule {\def\Rule{#RULE}} \doifemptyelse{#COLOR} {\def\Color{green}}%default color {\def\Color{#COLOR}} \ifthirdargument \inleft{Read\\this\\#ORDER} \fi \setupmarginrule[\Rule][rulecolor=\Color] \startmarginrule[\Rule] \stoptexdefinition \starttexdefinition stopMtext \stopmarginrule \egroup \stoptexdefinition \definedescription[greenline] [before={\setupmarginrules[rulecolor=green, alternative=0, rulethickness=0.5pt] \indenting[no] \startmarginrule[2]}, after={\stopma
Re: [NTG-context] Using the margin for two purposes
On 2014-05-19 19:24, Matthias Weber wrote: Thanks Hans, while I did experiment I had no chance at divining the correct dimension distance=-\dimexpr\textwidth+2mm below. So, with that, my bare bones marginbar in the right margin could look like the one in the file below. Where do I squeeze in the alternative=1 option to get dotted lines? When I put it into \definesidebar, the sidebar disappears, and when I write \startsidebar[oeps,alternative=1] it reverts to the default left sidebar (albeit dotted). Matthias Matthias, You can use distance= in \setupmarginrules to achieve the result you want. All of the other keys work with it. The sidebar commands, if not deprecated, are not described in the wiki or in the reference manual or the command arguments manual, and have not been discussed on the list for the last six years. -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] sections
pdf][width=2cm] \stopplacefigure \input{tufte} \section[title={Fails with figures traditional}] \placefigure[right][fig:2]{Caption} {\externalfigure[cow.pdf][width=2cm]} \input{tufte} \stoptext -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \MetaFont in 2014-06-05 MKIV
The following produces two lines with the Metafont logo when using TL13, but fails in the current MKIV with the identical complaint for either of the lines commented out: Type1: Could not understand Type1 font: C:/ConTeXt/tex/texmf/fonts/type1/hoekwater/mflogo/logo10.pfb \starttext \METAFONT \MetaFont \stoptext -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \useMPlibrary[dum] in 2014-06-05 MKIV
The following works fine in TL13, producing a PDF with the expected rectangle full of colored balls under the TL viewer, Sumatra PDF viewer, and Firefox, as it did under the prior MKIV beta (2014-06-01). Under the current MKIV, it produces a PDF that displays no image when viewed with Firefox or Sumatra PDF, but shows an irregular blob of colored balls (which might be cropped to the expected triangle) when viewed with the TL viewer or Chrome. \useMPlibrary[dum] \starttext \externalfigure[xxx] \stoptext So, I would suppose that something has changed in the way the image is put into the page. Can somebody suggest an option to reverse this behavior, either in ConTeXt or in the viewers? -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] First letter lost possible cause: \grabbfferdata
On 2014-06-25 16:07, Hans Hagen wrote: On 6/25/2014 10:03 PM, Rik Kabel wrote: On 2014-06-25 15:51, Rik Kabel wrote: Recently there have been reports of the first letter of a line of text being lost in the database and letter modules. I tracked down what appears to be the same problem and developed a work-around. The problem appears to be with the \grabbufferdata command. Something has changed in the way it works, and it now swallows the first token of the buffer that it grabs. It may also show up with other commands, but this is the only one I have found in my projects. And as soon as I post, I see that Hans has found the problem in the buffering code. but you're going to test it -) Indeed I have, but my tests mean little beyond what I can eyeball to see if it still looks okay. I might say that the issue is resolved for my small environment but I do not know what side-effects may result from the change. I have no library of edge cases, no integrated build environment, and only a single platform. That said, however, the issue disappears for my projects when I remake ConTeXt (and ConTeXtjit) with your patch. And clearly, the \ignorespaces that I used in my workaround was just a convenient no-op. I could have used {} or \relax to the same effect. -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] context works, contextjit fails with Junicode
On 2014-07-01 20:45, Hans Hagen wrote: On 7/2/2014 1:30 AM, Rik Kabel wrote: As I said, the not-in-time engine has no problem with the file. no problems here with luatex and luajittex and the sample code Hans Okay. I will look over my path settings and font libraries. Thank you for checking. Sorry for the noise. (but another issue is on the way) -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Leave out reference to page if on the same page?
On 2014-07-23 14:01, Otared Kavian wrote: In my ConTeXt archives I found the following example from a discussion on the mailing list: Wolfgang S. gave an answer which may help you: Best regards: OK ...some text elided... one can set conditional texts but these are internal macros (which can change) and meant for users. Wolfgang end test-ref.tex I suspect that Wolfgang meant to warn: ... internal macros (which can change) and /are not/ meant for users because that certainly appears to be the case. More specifically, the example (from 2011) fails, complaining about an undefined control sequence with \analyzecurrentreference. As others pointed out in related discussions, there is another serious shortcoming with this. References should be relative to the current page spread, which on doublesided layouts includes two pages, verso and recto. A reference to something on either of these pages is traditionally considered to be current, and above and below refer to previous and subsequent page spreads. There is a module, smartref, by Marco Patzer, that may address the needs of the original poster. It has some limitations, but generally addresses the issue quite well. See the list message at http://www.mail-archive.com/ntg-context%40ntg.nl/msg71889.html for more on smartref. (The primary limitation in my use is that it assumes that a following argument, as in \smartref{preceding}{following}[label], should follow the /at page number/ text, thus disabling the use of the following text to provide a subfigure label. Thus, one ends up with "see figure 6.4 at page 73a" instead of "see figure 6.4a at page 73".) -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Citation Sort Order
On 2014-08-07 13:20, Thangalin wrote: The documentation (http://www.ntg.nl/maps/26/12.pdf) suggests that the order of citations can be changed using "sorttype=cite". The example code below writes a 6 in the document. I thought by setting the sorttype to "cite" that the bibliography order would be determined based on the order that the "cite" macros occur in the document. If I have understood correctly, then the sample document should write a 1 in the document. Any idea why 6 is written instead of 1? Thank you. Reverse the order of the last two entries in your bib file and rerun the example. You will no longer have 6 and will now have a significant clue about why the 6 appeared the first time. Now change the line \completepublications[criterium=all] to \placepublications[criterium=text] rerun, and examine the result. -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \resetsetups
On 2014-08-14 14:35, Wolfgang Schuster wrote: Am 14.08.2014 um 20:23 schrieb Rik Kabel : I notice that, while the _contents_ of the setup are removed, and using the reset setup introduces nothing into the text, there is no error or warning generated. (This is also the case, I learned, with an undefined buffer.) I can see that this can be very useful in a number of situations. Can \resetsetups reset more than one setup in a single execution? When I try \resetsetups[setupA,setupB] it appears to reset neither. I only ask because of the plural name. It does not appear to be a burden to use multiple \resetsetups commands. No, you can only reset a single environment with the command. Are there equivalent commands to \resetsetups and \doifsetupelse for buffers? I could find nothing obvious. \resetbuffer[] and \doifelsebuffer{}{…}{…} Wolfgang Thank you again. I was looking for \doifbufferelse and \resetbuffers as analogous to the setups commands. While such consistency is nice, it is rare to find. While I appreciate learning about these from the list, I must echo recent comments about the state of documentation. If these are user commands, as these appear to be, one should be able to find them in at least the advanced documents. -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \preventmode does not work
At least in MKIV. I haven't tried MKII. The following example should demonstrate this. With no mode specified on the command line, this should enable mode three and prevent and disable the other modes. It seems that \preventmode is not only ineffective in what it is described as doing, but also disables the following \disablemode! Or perhaps I am misusing this or misunderstand what it should do. (2014-08-29 20:57 standalone) \definemode[one][keep] \definemode[two][keep] \definemode[three][keep] \define\ModeOne{nil} \define\ModeTwo{nil} \define\ModeThree{nil} \startmode[one] \define\Mode{one} \define\ModeOne{set} \disablemode[two,three] \stopmode \startmode[two] \define\Mode{two} \define\ModeTwo{set} \disablemode[one,three] \preventmode[one] \stopmode \startnotmode[one,two] \define\Mode{three} \define\ModeThree{set} \enablemode[three] \preventmode[one,two] \disablemode[one,two] \stopnotmode \starttext Mode is \Mode. ModeOne is \ModeOne. ModeTwo is \ModeTwo. ModeThree is \ModeThree. Mode \doifmode{one}{one}\doifmode{two}{two}\doifmode{three}{three} is active. \stoptext -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Slanted, double-quoted quotations
On 2014-10-15 17:06, Wolfgang Schuster wrote: Am 15.10.2014 um 21:03 schrieb Rik Kabel : I am not sure I understand the need for symstyle and symcolor. The issue is not that the symbols are not styled/colored, but that they do not appear at all when a non-normal style is specified. What I see with the example I posted is: and I assume that Sander saw a similar issue. Note that there are no square brackets present as defined for layer 2. I realize that style=normal for level 3 should perhaps be style=\tf, since normal is redefined to slanted within the scope of layer 2. With that change to my example, I get This still has the lack of square brackets, and now in addition lacks curly braces for level 3. If your fix is meant to repair that, all is well. If not, could you explain why “it's deliberate and has always been the case in mkiv”? When you use “location=text” context checks the value of the style key, when the value of the key is “normal” the left and right arguments are used but when you use a different value (e.g. slanted) context applies only the style and color values. Thank you, Wolfgang, for that explanation of what is being done. Can you explain why this is done? It would seem, given the name of the command, that the delimiter is more important than the styling, and so I suspect that there is some historical reason that this behavior was chosen. Styling can be done within the text, as can delimiters, but the benefit of the command is that it should be able to manage multiple levels automatically. -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Prevent page break in middle of paragraph
On 2014-10-17 12:18, Rik Kabel wrote: On 2014-10-16 16:03, Ben Moon wrote: Hi, I'm trying to get a thesis in a final shape and encounter a page break ("... Über 70 % der pagebreak") in the middle of a paragraph where there still seems to be plenty of space to finish that paragraph. If I add a few lines to the text it works ok. Also "\page[no]" doesn't work or "\vbox" and "\setpenalties\widowpenalties{100}\maxdimen" I couldn't get working neither. Though the last one got closest. Here's the minimal example I could come up with, sorry for it beeing a bit lengthy: With the current (2014-10-17) standalone beta the complete paragraph appears on page 2 and section 1.2 begins at the top of the next page. Perhaps there are some simple patches that Hans or others can supply for the version you are using, otherwise an update may be called for. Sorry, I should have added that I did reproduce your problem with TL14, which uses the same version you used, dated 20140521. The problem does not exist with the 20140622 beta and later versions I have. I do not know at what point the change was made, but it clearly was made very shortly after TL14. -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Slanted, double-quoted quotations
On 2014-10-20 10:08, Sander Maijers wrote: I am wondering likewise. Sander, The question has been mooted. The first beta (of two) on 2014-10-16 resolved the issue, and the result of your example is what the text in it describes. -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \hyphenatedurl problem
With versions from 20150325 and earlier, the following example code produced nicely wrapped URLs. With current betas, the URLs do not wrap. (Perhaps this is what Wolfgang meant when he wrote, in a reply in the thread _Turning off French character spacing_: The \url and \hyphenatedurl need to be fixed but I do not know that for sure.) \setupinteraction[state=start] \starttexdefinition href #1 \goto{\hyphenatedurl{#1}}[url(#1)] \stoptexdefinition \useURL[aUrl][https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable] \useURL[bUrl][https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable][][\hyphenatedurl{https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable}] \starttext goto href macro: \href{https://Some.awfullylong.net/url_with_lots_of_places_to.html?make=a_reasonable}\par useURL without hyphenatedurl \from[aUrl]\par useURL with hyphenatedurl \from[bUrl]\par \stoptext -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Caption location with vertical \startplacefigure
On 2015-04-16 23:12, Rik Kabel wrote: How can I get the caption for the vertical figures (figures 2 and 4 in the example) aligned below the figures with the caption width limited to the figure width? Sorry for the noise -- I am sure I am missing something simple, but I cannot find it at this point. (Running current beta and earlier versions, so it does not appear to be a regression.) Nevermind. A night's sleep and coffee in the AM, and all is well. -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] User-Defined Commands With Key-Value Options
On 2015-07-22 05:20, Joas Yannick wrote: On 7/20/2105 11:28 AM Joas Yannick wrote: > > > On 7/20/2105 0:50 AM Hans Hagen wrote: > > So how would you like to use lua? Is the data stored in lua? > > Yes, I imagine that the data (for instance, the value of > the keys "number", "name", "abbreviation", "title", etc.) > is stored somewhere when the compilation process reads, say, > "\startbiblebook", and that they are available to define the > the formatting done by "\startbiblebook". > > Thank you. I have found this wiki: http://wiki.contextgarden.net/Commands_with_KeyVal_arguments But since I do not know Lua, I would appreciate that someone gets me started with my example. Joas, Perhaps there some confusion here about how ConTeXt is used to create a document, and what role Lua plays in it. ConTeXt is a macro-based language that provides a level of abstraction over TeX, which is also a macro language. Documents can be completely specified with the use of ConTeXt. Lua is a traditional programming language that is used by some versions of ConTeXt to optimize and extend some of the internal capabilities of ConTeXt and TeX. There are very few situations, if any, in which a document writer /must/ resort to using Lua; ConTeXt almost always suffices. Only the first example you found in the ConTeXt wiki uses Lua, and that example is not really useful for your problem. The other examples on that page are coded in the ConTeXt macro language. You might also look at http://wiki.contextgarden.net/System_Macros/Handling_Arguments and http://wiki.contextgarden.net/Commands_with_optional_arguments for more examples, and on the mailing list. I would also recommend looking in the mailing list for discussions of the \getrawparameters and \getbufferdata and related commands (in particular http://www.mail-archive.com/ntg-context%40ntg.nl/msg78808.html). Here is some code I use to format verse. It provides default values for the language, margin inset and continuation line indents that can be overridden when needed: \starttexdefinition unexpanded startPoem \begingroup \dosingleempty\dostartPoem \stoptexdefinition \starttexdefinition dostartPoem [#SETUPS] \getrawparameters[Poem][inset=2em,indent=0em,before=,font=, language=en,#SETUPS] \grabbufferdata[Poem][startPoem][stopPoem] \stoptexdefinition \starttexdefinition stopPoem \obeylines \language[\Poemlanguage] \Poembefore \Poemfont \setupnarrower[left={\dimexpr\Poemindent+\Poeminset\relax}, right=\Poeminset, before=] \startnarrower[left,right] \startparagraph \setupindenting[-\Poemindent,yes] \inlinebuffer[Poem] \stopparagraph \stopnarrower \endgroup \blank[halfline] \stoptexdefinition This type of code can easily be used to deal with the names, numbers, and abbreviations you describe in your requirements. -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Register customization for backmatter page numbers
List, I have a book with frontmatter, bodymatter, and backmatter. The frontmatter is pagenumbered with lc roman, and the bodymatter and backmatter are numbered, all by block. The backmatter contain a glossary, pagenotes, bibliography, and an index. In addition to the frontmatter and the bodymatter, both the glossary and the pagenotes contain items that are indexed. I need to distinguish pagenumbers that appear in the index so that the reader can identify where in the book the page is located. For the frontmatter, that is not a problem. For items that appear in the bodymatter or backmatter, however, page numbers are not unique. One method that has been suggested is to prefix the pagenumber displayed in the index with a mark to indicate that the page is in the backmatter, or to italicize it, or to use an alternate font. I have looked at the defineconversionset and defineprocessor documentation and find no way to mark index entries appropriately. Can anyone suggest a way to do this, or some other method? Perhaps a pagecommand that compares the register item real page number to the highest real page number of the body? I would prefer a solution that does not require changing the register commands (\index) in the text. Continuous numbering across the frontmatter, bodymatter, and backmatter is not wanted, although as a last resort I might be able to argue for continuous numbering in the bodymatter and backmatter. -- Rik Kabel ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Oddity: \buildtextaccent shifts glyph right
I am using \buildtextaccent to create a couple of characters that have no Unicode equivalent. They are scribal abbreviations that made it into early typesetters works. In this case, the abbreviation are for Latin que, which looks like a q with a small ezh appended in a subscript position, and q with an acute accent, both of which are used in some 17th century works I am dealing with. An example of the abbreviation with the ezh and accent can be seen at https://books.google.com/books?id=hHNVcAAJ&pg=PA6#v=onepage&q&f=false in the sixth line of the paragraph beginning “Yea but”. It seems that \buildtextaccent\textacute q (or \buildtextaccent´q) moves the q to the right within the character’s bounding box. The following example (and attached resulting pdf) demonstrates this. Lines 1 and 2 show the string with and without the \buildtextaccent, and lines 4 and 6 repeat that in italic. The strings are the same width, but the q is moved right. Lines 3 and 6 show a manual kerning of the q to improve appearance. This happens with many fonts, but not all (I do not see it with Computer Modern). I am using Win 10Pro x64 with ConTeXt ver: 2015.09.04 11:00 MKIV beta fmt: 2015.9.5 int: english/english. I suspect that this is not intended, but I am not sure. I would also love to raise the accent a bit. Suggestions? I can live with it as it is and manually kern as needed. There are very few instances of these abbreviations that need to be dealt with. % macros=mkvi engine=luajittex \starttexdefinition boxWidth #STR \setbox0=\hbox{#STR}\the\wd0 \stoptexdefinition \starttexdefinition Dicitque Dicitq\kern-0.070em\low{ʒ}\autoinsertnextspace \stoptexdefinition \starttexdefinition DicitqueK Dicit\buildtextaccent\textacute q\kern-0.070em\low{ʒ}\autoinsertnextspace \stoptexdefinition \starttexdefinition DicitqueKK Dicit\kern-0.060em\buildtextaccent\textacute q\kern-0.070em\low{ʒ}\autoinsertnextspace \stoptexdefinition \starttexdefinition idque idq\autoinsertnextspace \stoptexdefinition \starttexdefinition idqueK id\buildtextaccent\textacute q\autoinsertnextspace \stoptexdefinition \starttexdefinition idqueKK id\kern-0.060em\buildtextaccent\textacute q\autoinsertnextspace \stoptexdefinition \setupbodyfont[ebgaramond,12pt] \starttext \startitemize[n,joinedup,packed] \item \Dicitque \qquad\boxWidth{\Dicitque}\par \item \DicitqueK \qquad\boxWidth{\DicitqueK}\par \item \DicitqueKK \qquad\boxWidth{\DicitqueKK}\par \it \item \Dicitque \qquad\boxWidth{\Dicitque}\par \item \DicitqueK \qquad\boxWidth{\DicitqueK}\par \item \DicitqueKK \qquad\boxWidth{\DicitqueKK}\par \stopitemize \startitemize[n,joinedup,packed] \item \idque \qquad\boxWidth{\idque}\par \item \idqueK \qquad\boxWidth{\idqueK}\par \item \idqueKK \qquad\boxWidth{\idqueKK}\par \it \item \idque \qquad\boxWidth{\idque}\par \item \idqueK \qquad\boxWidth{\idqueK}\par \item \idqueKK \qquad\boxWidth{\idqueKK}\par \stopitemize \stoptext -- Rik qAcute.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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Oddity: \buildtextaccent shifts glyph right
On 2015-09-06 11:52, Pablo Rodriguez wrote: On 09/06/2015 05:27 PM, Rik wrote: I am using \buildtextaccent to create a couple of characters that have no Unicode equivalent. Hi Rik, although they don’t seem to work as expected in ConTeXt, Unicode has combining diacritical marks (as you might know), such as: U+0301 COMBINING ACUTE ACCENT Just in case it might help, Pablo On 2015-09-06 12:20, Thomas A. Schmitz wrote: \buildtextaccent has to take some heuristics about horizontal and vertical placement and is sometimes wrong about it. Since your case is somewhat special, I would define a macro for the que symbol and adjust the boxes manually - but then, you'll have to adapt it to italic and upright (and bold) and different font sizes. Depends on how important typographical beauty is to you - either a medium-quality solution for all cases or better quality and manual fiddling... Something like \definefontfamily [test] [serif] [ebgaramond] \setupbodyfont [test,12pt] \define\que% {\bgroup \setbox0\hbox{q}% \setbox2\hbox to \wd0{\kern0.3em\switchtobodyfont[6pt] ʒ}% \setbox4\hbox to \wd0{\kern0.1em\textacute}% \hbox to \wd0 \bgroup \hss\copy0\hss \hskip-\wd0 \raise-0.45ex\copy2 \hskip-\wd0 \raise0.1ex\copy4 \egroup \egroup\autoinsertnextspace} \starttext {\it Dicit\que mihi} \stoptext (btw, the example you sent uses Latin Modern). Thomas Indeed, for the cases where there are combining accents that is a much better solution. I should have chosen a better example, that is, one that does not have a combining accent. Fortunately, there are very few that fall into that category, and unfortunately, there are some. Using this, together with Thomas’s code, I can get around these issues. Thank you both. (And yes, I had attached the wrong example, and then referred to the font therein by the wrong name.) -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \emptylines non-functional
\emptylines is not producing empty lines. Here is the example from the wiki <http://wiki.contextgarden.net/Command/emptylines>: \setuppapersize[A5] \startcolumns[n=3] With non-empty lines\crlf asdf\crlf asdf\crlf asdf\crlf asdf \column With\tex{emptylines[2]} \emptylines[2] asdf\crlf asdf \column With\tex{blank[2*big]} \blank[2*big] asdf\crlf asdf \stopcolumns and here is the output using the current MKIV beta: -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Regression with \doboundtext in \writetolist
On 2015-10-11 12:56, Wolfgang Schuster wrote: Is \limitatetext a option for you because unlike \doboundtext the command is unexpandable? \starttext \doboundtext {Thus, I came to the conclusion that the designer of a new system ...}{.5\textwidth}{...} \limitatetext{Thus, I came to the conclusion that the designer of a new system ...}{.5\textwidth}{...} \stoptext Is it an option of which I am aware, yes. Do I desire to use it, no. Will I use it? Perhaps, if \doboundtext cannot be repaired. The resulting page with \limitatetext has large rivers of white on the page. But more likely I will look for a hack to use \doboundtext to trim the text before writing it to the list, even though it loses the flexibility of computing the width dynamically. Can you point to what changed between the 20150325 version and TL15 to break this? -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Obtaining features from EBGaramond font in ConTeXt
On 2015-10-23 16:47, josephcan...@gmail.com wrote: At the moment, I use “\,” between word and question marks. Also “~” between word and “:”. I guess the \definecharacterspacing is more flexible and transparent from text input point of view (only write normal space). IIRC both \, and ~ also avoids line breaking at their location. Is there a way to specify this too please ? The characterspacing commands can take care of it. The following example demonstrates this (I used the value 2 just to make it clear what is happening). It appears that alternative=1 inhibits breaks, while alternative=0 (or leaving alternative= out completely) allows breaks. I have not seen documentation; what I know about it comes from tests like the example below. \definecharacterspacing[test] \setupcharacterspacing[test]["003A][left=2,alternative=1] % : \setupcharacterspacing[test]["003B][left=2,alternative=0] % ; \setupcharacterspacing[test]["00BF][right=2,alternative=0] % ¿ \starttext \hsize4cm x:\par x :\par ¿x;\par ¿ x ;\par \setcharacterspacing[test] x:\par x :\par ¿x;\par ¿ x ;\par \stoptext (Many ConTeXt commands have a \defineABC[somename] and a \setupABC[somename][options=…]. This can often, as is the case with characterspacing, be shortened into one command, \defineABC[somename][options=…], but I think not always.) -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Overriding / redefining / disabling standard commands
On 6/25/2018 17:52, Wolfgang Schuster wrote: \startmode[ebook] \setupbackend[export=yes] \stopmode \starttext \index{Knuth}\input knuth \index{Ward}\input ward \index{Zapf}\input zapf \startnotmode[*export] \completeregister[index] \stopnotmode \stoptext Unfortunately, this does not suppress generation of index references in the exported output. Here is a snippet of the -div.html file generated by the example you provided: Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large--scale user; the designer should also write the first user manual. and a snip of the output with the default css: Thus the request for a (simple) mechanism to redefine or disable standard commands. There are commands other than \index that might also benefit from similar treatment. -- 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] Custom tags, revisited
In September 2015 thread "Custom XML Export," Hans instructed us on how to create custom tags. The example he presented is: \setupbackend[export=yes] \definehighlight[this] \starttext \startelement[what] \this{that} \input ward \stopelement \stoptext When that example is run with the current (2018-06-25) beta or TL18, there is no html body: http://www.pragma-ade.com/context/export";> Rendering can be suboptimal because there is no default/fallback css loaded. Further experimentation suggests that \startelement is gobbling the output. (Adding \setupstructure does not change the result.) What is the proper way to add custom tags? -- 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] Disproportion in initializing user counters
On 7/15/2018 13:34, Pablo Rodriguez wrote: On 07/15/2018 07:20 PM, Wolfgang Schuster wrote: Hi Pablo, when you use the label mechanism to create a counter context ensures to print the right counter value in the table. Hi Wolfgang, would it be possible to provide me with a minimal sample? I don‘t use labels and I don’t know how to use them with counters in xtables. Many thanks for your help, Pablo Easier than counters: \definelabel [QQ][text=,headcolor=red] \starttext \startxtable \startxrow \startxcell one \stopxcell \startxcell two \QQ[there] \stopxcell \stopxrow \startxrow \startxcell alpha \QQ\stopxcell \startxcell beta \QQ[here] \stopxcell \stopxrow \stopxtable See entry \in[here]. \stoptext -- 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] Compilation problem with the latest version of standalone context(Metafun)
On 7/16/2018 10:24, Fabrice Couvreur wrote: % macros=mkvi \setuppagenumbering[location=footer] \startusableMPgraphic{NumberHead} draw outlinetext.f ("\bf\namedheadnumber{chapter}") (withcolor "lightgray") ysized 50pt ; \stopusableMPgraphic \unexpanded\def\processMPheadnumber#1% {\useMPgraphic{NumberHead}} \setuphead [chapter] [command=\HeadTitle, headstyle=\ss, numbercommand=\processMPheadnumber] \unexpanded\def\HeadTitle#1#2% {\framed [frame=off, bottomframe=on, width=broad, align={broad,nothyphenated,left}] {#1\blank[nowhite]#2}} \starttext \dorecurse{6}{\startchapter [title={Fist chapter}] \input knuth \stopchapter} \stoptext Using TL18 on Win64 it produces a large chapter number on the right side above the chapter name -- I do not know what it should look like, so I won't say it works. It clearly fails with the 2018-07-13 beta, producing an odd graphic where the MP-generated digit should be: and fails in the same manner with the 2018-07-17 beta. -- 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] How can I remove a blank leading line from a buffer
On 8/16/2018 10:55, Aditya Mahajan wrote: On Wed, 15 Aug 2018, Rik Kabel wrote: I suspect that the issue in the larger project has to do with quoting for the RE ("^\\relax") since compilation fails with: %% \stopAttribution ...getcontent("Attribution"),"^\\ %% relax","")))}\stopparagrap... Any pointers on such quoting would be appreciated. Please create a MWE. Aditya I cannot at this point, and may well have misinterpreted what I saw. -- 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] Questions and observations on the div html export
List, I have been wrestling with the div.html output produced by the export back end, and have a few questions. On the list, Hans has suggested defining elements with two commands, as: \setelementbackendtag [BlockItem] \setelementnature [BlockItem][display] \setelementbackendtag [InlineItem] \setelementnature [InlineItem][inline] These commands do not appear on the wiki or in i-context.pdf. In i-context.pdf, we find: 1 2 3 \setelementexporttag [...][...][...] OPT 1 NAME 2_export_ nature pdf 3 inline display mixed I have tried this latter command in many variations, and cannot understand just how to use it. For example, both of these: \setelementexporttag[BlockItem][display] \setelementexporttag[BlockItem][export][display] generate divs with class="display", when one wants class="BlockItem". But the pair \setelementbackendtag and \setelementnature works for that. Is there any documentation for any of these commands, beyond the syntax in i-convert for \setelementexporttag? The \startelement command takes one or two arguments. The first is the element name, and is required. What is the intended use of the second argument, a list of key/value pairs? Nothing seems to be passed via the back end to the div.html (or raw.xml) file. Next, the back end generates div elements for both block and inline scopes, while html calls for span elements as inline containers. Defined highlights, which are by nature inline containers, are also translated to divs instead of spans. The generated css does identify the divs with display: block and display: inline as appropriate, but that does not help with tools that work with html. (HTML Tidy, for example, will happily introduce extra whitespace because it inserts a newline before a div that should really be a span.) Finally, what is meant by mixed (with respect to inline and display)? If anyone else has figured out some of this stuff, please send some pointers. -- 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] issue loading fonts
On 10/23/2018 05:17, Arthur Reutenauer wrote: ... I can reproduce this. That means ConTeXt won’t let you use a regular-weight font face as the bold version of a font family, nor an upright font as an italic one, which in my opinion is rather a good thing. That is simply wrong. Not only will ConTeXt happily let you do that, it is sometimes a good thing to do. In a font with many weights, you have to select appropriate faces for the medium or printing method, and using a light face for the normal and a regular weight (whatever that means for the font) for bold emphasis. Or you may want change the way emphasis is used to make a point, and reverse bold and italic in one swell foop. The example on the wiki page for \definefontfamily shows some of this in action, but ConTeXt does not get in the way of doing even sillier things: \definefontfamily [reutenauer] [rm] [sourcecodepro] [tf=style:bolditalic, it=file:kabelblack.ttf, bf=style:normal, bi=file:comic.ttf] \setupbodyfont [reutenauer] \starttext tf: {\tf \fontname\font\ \samplefile{ward}}\par it: {\it \fontname\font\ \samplefile{ward}}\par bf: {\bf \fontname\font\ \samplefile{ward}}\par bi: {\bi \fontname\font\ \samplefile{ward}}\par \stoptext -- 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] \setuphead for a section block
On 10/23/2018 15:18, Pablo Rodriguez wrote: Dear list, imagine that I need a different setup for chapter in the bodymatter than in the frontmatter and appendices. The way to do it seems to be: \setuphead[chapter][style=\bf] \startsectionblockenvironment[bodypart] \setuphead[chapter][style=\em] \stopsectionblockenvironment \starttext \startfrontmatter \chapter{Introduction} \stopfrontmatter \startbodymatter \chapter{Chapter} \stopbodymatter \stoptext But wasn’t there a command similar to the following one for such purposes? \setuphead[bodypart:chapter][style=\em] I remember that there was something similar to that command to setup headings in a section block. Am I creating my memories or did a similar option exist? Many thanks for your help, Pablo \startsectionblockenvironment[bodypart] \setuphead [chapter][ style=\tfc\HeadFont ... -- 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] \setuphead for a section block
On 10/23/2018 15:23, Rik wrote: On 10/23/2018 15:18, Pablo Rodriguez wrote: Dear list, imagine that I need a different setup for chapter in the bodymatter than in the frontmatter and appendices. The way to do it seems to be: \setuphead[chapter][style=\bf] \startsectionblockenvironment[bodypart] \setuphead[chapter][style=\em] \stopsectionblockenvironment \starttext \startfrontmatter \chapter{Introduction} \stopfrontmatter \startbodymatter \chapter{Chapter} \stopbodymatter \stoptext But wasn’t there a command similar to the following one for such purposes? \setuphead[bodypart:chapter][style=\em] I remember that there was something similar to that command to setup headings in a section block. Am I creating my memories or did a similar option exist? Many thanks for your help, Pablo \startsectionblockenvironment[bodypart] \setuphead [chapter][ style=\tfc\HeadFont ... Sorry, I meant to delete, not send. -- 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] PDF/A output fails validation
Original message From: luigi scarso Date: 11/22/18 14:38 (GMT-05:00) To: mailing list for ConTeXt users Subject: Re: [NTG-context] PDF/A output fails validation On Thu, Nov 22, 2018 at 8:23 PM Rik Kabel wrote: Still fails here, using the code you posted, with: yes, the beta is not yet landed in the garden , still some issues with colored fonts-- luigiVery good. I can wait. I thought that you were reporting a could-not-reproduce situation.-- 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] (bug?) weird line break in firstlines-001.tex
On 11/28/2018 12:01, Pablo Rodriguez wrote: Dear list, the following code comes from firstlines-001.tex: \setupbodyfont [pagella] \setupfirstline [fancy] [n=3] \starttext \setupindenting[medium,yes] \setfirstline[fancy] \input ward \par \stoptext I’m afraid that the second and third lines have a weird line break. No hyphens involved, but “not“ and “packs” are broken as “n ot” and “p acks”. I think this may be a bug. Could anyone confirm this? Many thanks for your help, Pablo Confirmed here with both the current beta and TL18. -- 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] Problem with grid alignment and paragraph
On 12/14/2018 16:14, Luca Donetti wrote: Dear list, I am facing a problem with grid alignment when using paragraphs. I think it could be a bug because the MWE below produces lines which are correctly aligned to the grid with the context version included in texlive 2017, but it does not seem to work with the context in texlive 2018 and the current beta (ConTeXt ver: 2018.12.07 19:37 MKIV beta fmt: 2018.12.14). This is the MWE: \setuplayout[grid=yes] \defineparagraphs[twocols][n=2] \showgrid \starttext \starttwocols \input knuth \nexttwocols \input knuth \stoptwocols \stoptext Am I doing anything wrong? If not, I'll appreciate any suggestion or workaround. Thank you in advance for your help. LD ___ 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 ___ The result is properly aligned here on W10x64 both with the (same) current beta and with TL18. -- 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] Hyphentation/Linebreak after x characters inside \WORD?
On 4/23/2020 15:01, Benjamin Buchmuller wrote: Sorry, I have just realized that the problem might not be \WORD{} actually, so this one hyphenates: \define[2]\mycommand{ \startxrow \startxcell o#1 \stopxcell \startxcell \tt\WORD #2 \stopxcell \stopxrow } Whereas these ones don’t: \define[2]\mycommand{ \startxrow \startxcell o#1 \stopxcell \startxcell \tt\WORD #2-3' \stopxcell \stopxrow } \define[2]\mycommand{ \startxrow \startxcell o#1 \stopxcell \startxcell 5'-\tt\WORD #2 \stopxcell \stopxrow } Assuming that this has to do with the presence of “-“ which will be the preferred breakpoint. So, I guess the questions boils down to how to define the second argument of \definebreakpoint[mybreaks][][nright=12,nleft=12,type=1] in this case or how to “deactivate” the default \setbreakpoints[compound]? On 23 Apr 2020, at 20:46, Benjamin Buchmuller wrote: Hi again, I am reading a CSV file into ConTeXt which contains long DNA sequences (>> 40 characters) to place in xtables. So far, this works fine. However, I need to uppercase the entries and need to \tt them. When I do this inside \WORD however, they don’t hyphenate any more. I’m using: \defineseparatedlist [mylist] [ separator={,}, quotechar={"}, command=\mycommand ] \define[2]\mycommand{ \startxrow \startxcell o#1 \stopxcell \startxcell 5’-{\tt\WORD{#2}}-3' \stopxcell \stopxrow } Since I don’t have access to each entry, I cant place hyphenation marks directly. Is there a way to tell ConTeXt to hyphenate after say, 12 characters? Thanks for your help. Benjamin The following works for me: \define[2]\mycommanda{ \startxrow \startxcell o#1 \stopxcell \startxcell \tt\WORD #2 \stopxcell \stopxrow } \define[2]\mycommandb{ \startxrow \startxcell o#1 \stopxcell \startxcell \tt\WORD #2-3' \stopxcell \stopxrow } \define[2]\mycommandc{ \startxrow \startxcell o#1 \stopxcell \startxcell 5'-\tt\WORD #2 \stopxcell \stopxrow } \definebreakpoint[mybreaks][][nright=12,nleft=12,type=1] \setbreakpoints[mybreaks] \starttext \setupxtable[width=5cm] \startxtablex \mycommanda{A}{lsfkgjfkgshgkhigewhgajkdkfkalhfdklahfkhaakfakfh} \mycommandb{B}{lsfkgjfkgshgkhigewhgajkdkfkalhfdklahfkhaakfakfh} \mycommandc{C}{lsfkgjfkgshgkhigewhgajkdkfkalhfdklahfkhaakfakfh} \stopxtable \stoptext Producing: Indeed, it produces the same when nleft and nright are both set to 1 or 12 or 100, but not when setbreakpoints is removed. If you are trying to do something else, please provide an MWE. ___ 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] Hyphentation/Linebreak after x characters
On 4/23/2020 17:50, Wolfgang Schuster wrote: Benjamin Buchmuller schrieb am 23.04.2020 um 23:16: Hi Rik, Thanks for the fast reply! Your example works indeed nicely. However, within this solution my problem has shifted now (fully) towards breaking after the same number of characters, which seems to work for your sample string, but not for the sequences that I need to place. What I would like to achieve is something like: 5’-GATTGCTTACTCCTGGTTGG TCTTACATTCTGTCGCCTC CTACTAGAGCCGGCATATT CTAGAAGGGCCGCCTTCATGTGG etc. (There might be hyphens or not, this is not so much important to me.) But what I get is currently: 5'-GATTGCTTACTCCTG- GTTGGTCTTACATTCT- GTCGCCTCCTACTA- GAGCCGGCATATTCTA- GAAGGGCCGCCTTCATGTGGC- etc. Which looks ragged with \tt. Certainly, this is because ConTeXt applies the default hyphenation pattern. But I guess, there might be no “no language” pattern or is there? Also, I agree, it’s a bit odd that nright/nleft seem to make no difference towards the result. Hans posted a solution for a similar problem a few years ago [1] which can be adapted to your problem. \startluacode local shared = { start = 1, length = 1, before = nil, after = nil, left = false, right = false, } local all = table.setmetatableindex({ }, function(t,k) return shared end) languages.hyphenators.traditional.installmethod("dna", function(dictionary,word,n) return all end ) \stopluacode \definehyphenationfeatures [dna] [characters=all, alternative=dna] \starttext \startframedtext[width=6cm,style=mono] \sethyphenationfeatures[dna] \setuphyphenation[method=traditional] GATTGCTTACTCCTGGTTGG% TCTTACATTCTGTCGCCTC% CTACTAGAGCCGGCATATT% CTAGAAGGGCCGCCTTCATGTGG% \stopframedtext \stoptext [1] https://mailman.ntg.nl/pipermail/ntg-context/2017/089106.html Wolfgang And without lua, just two lines of ConTeXt with a bit of TeX: \define[1]\DNA{\handletokens #1\with\DNAspacer} \define[1]\DNAspacer{#1\hskip 2.3pt plus .1pt} \define[2]\mycommandc{ \startxrow \startxcell o#1 \stopxcell \startxcell {\tt\WORD{\DNA{5'-#2}}}\stopxcell \stopxrow } \starttext \setupxtable[width=5cm] \startxtable \mycommandc{C}{gattgcttactcctggttggtcttacattctgtcgcctcctactagagccggcatattctagaagggccgccttcatgtggcctagggcaccatcgcgtacgagggcaatgagtttaccgctgcgaagtctctacgtcacggccaaccacagtcctgctcccaacgaaatttagacgctgtcgtgaaacctgaattcgaggataagccgcgtcatgaagagtctactg} \stopxtable \stoptext Modify the skip as you see fit. -- 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] LMTX rollback?
My update script reports: 2020-04-27T12:40:53 ConTeXt updated from 2020.04.19T19:43 to 2020.04.26T19:59 2020-04-27T12:40:53 LuaMetaTeX updated from 2.05.02 to 2.05.01 2020-04-27T12:40:53 LuaMetaTeX functionality updated from 20200413 to 20200402 Is this an intentional rollback or a website issue? -- 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] Three-deep itemize fails on LMTX
List, The following example works with MkIV latest, but fails with LMTX latest (Win10 x64). The complaint is ! Missing math style, treated as \displaystyle. \starttext \startitemize \item Level 1 first \startitemize \item Level 2 first \startitemize \item Level 3 first \stopitemize \stopitemize \stopitemize \stoptext The culprit is the third level of itemize -- without that it is clean on both engines. I would appreciate knowing if other folks have the same problem, and if so, if there is a workaround until a fix can be posted. -- 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] Three-deep itemize fails on LMTX
On 5/4/2020 17:13, Wolfgang Schuster wrote: Rik Kabel schrieb am 04.05.2020 um 23:07: List, The following example works with MkIV latest, but fails with LMTX latest (Win10 x64). The complaint is ! Missing math style, treated as \displaystyle. \starttext \startitemize \item Level 1 first \startitemize \item Level 2 first \startitemize \item Level 3 first \stopitemize \stopitemize \stopitemize \stoptext The culprit is the third level of itemize -- without that it is clean on both engines. I would appreciate knowing if other folks have the same problem, and if so, if there is a workaround until a fix can be posted. It's a math problem. \starttext \m{} \stoptext Wolfgang Better MWE, still the same problem. Thank you for the confirmation. -- 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] how to interrupt doublesided in particular instance
On 5/6/2020 00:54, jbf wrote: So simple, Wolfgang. Thanks. I had got close amid all the varieties I was trying out to achieve the same result. Perhaps my closest was: \setuphead[chapter][pagebreak=chapterverso], but it couldn't quite cut it! Julian On 6/5/20 1:57 pm, Wolfgang Schuster wrote: jbf schrieb am 06.05.2020 um 01:31: Hi list, I have a document set up in a standard way (\setuppagenumbering[alternative=doublesided]) to ensure that new chapters always begin on a recto page, but in one particular instance only, I want the new chapter to start on the next (verso) page instead of creating a blank then starting on the recto side. I thought I might have been able to force that with \page[no] immediately after the previous chapter concluded or before \chapter{My new chapter}, but this command is ignored (and may well be the wrong command to achieve what I want). Is there a way to interrupt the setup so the new chapter in this case can start on the verso page? Create a new heading for chapters which can start on left/right pages. \setuppagenumbering[alternative=doublesided] \definehead[mychapter][chapter] \setuphead[mychapter][page=yes] \starttext \chapter{Right page} \chapter{Right page} \mychapter{New page} \chapter{Right page} \stoptext Wolfgang ___ You may want the new /mychapter/ head to appear in the TOC and pdf bookmarks as well, so take a look at /\setupcombinedlist/ and /\placebookmarks/. -- 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] error during the installation of luametatex
On 5/9/2020 02:52, Hans Hagen wrote: looks like a wrong binary .. should be 2.06.02 .. can you try this binary: http://dl.contextgarden.net/build/luametatex/x86_64-darwin/ (the farm generates two binaries for osx and it looks like the legacy machine has gone off line which happens when osx updates itself and gets stuck half way, i'll look into it) Hans I have the following update log entries (left column is EDT), indicating a roll-back of the binary: 2020-05-07T10:59:03 ConTeXt updated from 2020.04.30T11:15 to 2020.05.07T11:03 2020-05-07T10:59:03 LuaMetaTeX updated from 2.05.01 to 2.06.01 2020-05-07T10:59:03 LuaMetaTeX functionality updated from 20200402 to 20200506 2020-05-07T10:59:03 2020-05-08T15:14:26 ConTeXt updated from 2020.05.07T11:03 to 2020.05.08T20:50 2020-05-08T15:14:26 LuaMetaTeX downdated from 2.06.01 to 2.05.01 2020-05-08T15:14:26 LuaMetaTeX functionality downdated from 20200506 to 20200402 2020-05-08T15:14:26 2020-05-09T09:19:39 ConTeXt updated from 2020.05.08T20:50 to 2020.05.09T08:55 2020-05-09T09:19:39 LuaMetaTeX unchanged at 2.05.01 2020-05-09T09:19:39 LuaMetaTeX functionality unchanged at 20200402 2020-05-09T09:19:39 Perhaps there is an problem with the installation files? -- 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] error during the installation of luametatex
On 5/9/2020 09:33, Hans Hagen wrote: On 5/9/2020 3:27 PM, Rik Kabel wrote: On 5/9/2020 02:52, Hans Hagen wrote: looks like a wrong binary .. should be 2.06.02 .. can you try this binary: http://dl.contextgarden.net/build/luametatex/x86_64-darwin/ (the farm generates two binaries for osx and it looks like the legacy machine has gone off line which happens when osx updates itself and gets stuck half way, i'll look into it) Hans I have the following update log entries (left column is EDT), indicating a roll-back of the binary: 2020-05-07T10:59:03 ConTeXt updated from 2020.04.30T11:15 to 2020.05.07T11:03 2020-05-07T10:59:03 LuaMetaTeX updated from 2.05.01 to 2.06.01 2020-05-07T10:59:03 LuaMetaTeX functionality updated from 20200402 to 20200506 2020-05-07T10:59:03 2020-05-08T15:14:26 ConTeXt updated from 2020.05.07T11:03 to 2020.05.08T20:50 2020-05-08T15:14:26 LuaMetaTeX downdated from 2.06.01 to 2.05.01 2020-05-08T15:14:26 LuaMetaTeX functionality downdated from 20200506 to 20200402 2020-05-08T15:14:26 2020-05-09T09:19:39 ConTeXt updated from 2020.05.08T20:50 to 2020.05.09T08:55 2020-05-09T09:19:39 LuaMetaTeX unchanged at 2.05.01 2020-05-09T09:19:39 LuaMetaTeX functionality unchanged at 20200402 2020-05-09T09:19:39 Perhaps there is an problem with the installation files? no, i uploaded a new lmtx only (not sure why the date is old then) what version does the binary report? It reports what the log says. My update program simply scrapes the version report. The version report in full is: This is LuaMetaTeX, Version 2.05.01 Execute 'luametatex --credits' for credits and version details. There is NO warranty. Redistribution of this software is covered by the terms of the GNU General Public License, version 2 or (at your option) any later version. For more information about these matters, see the file named COPYING and the LuaTeX source. Functionality : level 20200402 Support : cont...@ntg.nl Copyright : The Lua(Meta)TeX Team(s) (2005-2020+) The LuaMetaTeX project is related to ConTeXt development. This macro package tightly integrates TeX and MetaPost in close cooperation with Lua. And the context version report is: mtx-context | ConTeXt Process Management 1.03 mtx-context | mtx-context | main context file: C:/LMTX/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2020.05.09 08:55 mtx-context | main context file: C:/LMTX/tex/texmf-context/tex/context/base/mkiv/context.mkxl mtx-context | current version: 2020.05.09 08:55 -- 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] error during the installation of luametatex
On 5/9/2020 12:26, Giulio Bertellini wrote: * * *about LuaMetaTeX, Version 2.06.02* On Mac OS Catalina 10.15.4 . Hope this may convey some useful information. On Mac OS Catalina 10.15.4 ( Mac mini late 2012, I5, 16GB RAM), using the current LMTX version just downloaded from Pragma Ade, I installed Context LMTX and tested the download by compiling the Metafun manual sources as indicated below: >>>> sh-3.2# context metafun resolvers | formats | executing runner 'run luametatex format': /System/Volumes/Data/opt/data/context/tex/texmf-osx-64/bin/luametatex --jobname="metafun" --fmt=/System/Volumes/Data/opt/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/System/Volumes/Data/opt/data/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./metafun" --c:input="./metafun" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/System/Volumes/Data/opt/data/context/tex/texmf-osx-64/bin" This is LuaMetaTeX, Version 2.06.02 open source > level 1, order 1, name 'cont-yes.mkiv' system> system> ConTeXtver: 2020.05.09 15:37 MKIV betafmt: 2020.5.9int: english/english system> system> 'cont-new.mkiv' loaded open source > level 2, order 2, name '/System/Volumes/Data/opt/data/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system> beware: some patches loaded from cont-new.mkiv close source> level 2, order 2, name '/System/Volumes/Data/opt/data/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv' system> files > jobname 'metafun', input './metafun', result 'metafun' * * *Final result of this compilation:* mkiv lua stats> used engine: luametatex version: 2.0602, functionality level: 20200508, format id: 498, compiler: clang mkiv lua stats> control sequences: 51925 of 65536 + 10 mkiv lua stats> lua properties: engine: lua 5.4, used memory: 179 MB, ctx: 166 MB, max: 168 MB, hash chars: min(64,40), symbol mask: utf (τεχ) mkiv lua stats> runtime: 20.702 seconds, 392 processed pages, 392 shipped pages, 18.936 pages/second system| total runtime: 113.221 seconds of 113.291 seconds Please consider that this mac mini is quite old and I am running mac OS Catalina on an external SSD. This was the first installation on Mac of Context today. I am quite happy with the results. I wish to express my appreciation for the outstanding work that Hans and the entire Context contributors team have carried out with focus and perseverance through the years. Hello to Otared and Luigi with whom I was in contact many years ago at the time of MKII . I also installed the same LMTX Context release on the Linux Subsystem for Microsoft Windows 10 and on different versions of Arch Linux. with the same excellent results. Thanks again for the excellent work, Giulio Giulio Bertellini On Sat, May 9, 2020 at 4:41 PM Rik Kabel <mailto:cont...@rik.users.panix.com>> wrote: On 5/9/2020 09:33, Hans Hagen wrote: On 5/9/2020 3:27 PM, Rik Kabel wrote: On 5/9/2020 02:52, Hans Hagen wrote: looks like a wrong binary .. should be 2.06.02 .. can you try this binary: http://dl.contextgarden.net/build/luametatex/x86_64-darwin/ (the farm generates two binaries for osx and it looks like the legacy machine has gone off line which happens when osx updates itself and gets stuck half way, i'll look into it) Hans I have the following update log entries (left column is EDT), indicating a roll-back of the binary: 2020-05-07T10:59:03 ConTeXt updated from 2020.04.30T11:15 to 2020.05.07T11:03 2020-05-07T10:59:03 LuaMetaTeX updated from 2.05.01 to 2.06.01 2020-05-07T10:59:03 LuaMetaTeX functionality updated from 20200402 to 20200506 2020-05-07T10:59:03 2020-05-08T15:14:26 ConTeXt updated from 2020.05.07T11:03 to 2020.05.08T20:50 2020-05-08T15:14:26 LuaMetaTeX downdated from 2.06.01 to 2.05.01 2020-05-08T15:14:26 LuaMetaTeX functionality downdated from 20200506 to 20200402 2020-05-08T15:14:26 2020-05-09T09:19:39 ConTeXt updated from 2020.05.08T20:50 to 2020.05.09T08:55 2020-05-09T09:19:39 LuaMetaTeX unchanged at 2.05.01 2020-05-09T09:19:39 LuaMetaTeX functionality unchanged at 20200402 2020-05-09T09:19:39 Perhaps there is an problem with the installation files? no, i uploaded a new lmtx only (not sure why the date is old then) what version does the binary report? It reports what the log says. My update program simply scrapes the version report. The version report in full is: This is L
Re: [NTG-context] left protruding quotations
On 5/14/2020 11:21, Wolfgang Schuster wrote: Michael Guravage schrieb am 14.05.2020 um 10:37: 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? \setupquotation [method=font] \setupquote [method=font] Interestingly, \setupquotation in this situation provides protrusion for both \quote and \quotation open marks, while \setupquote does so only for \quote open marks, so only one is needed if you want it for both, and neither works if you want it for only \setupquotation. Perhaps it is different with some other language-specific marks. -- 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] LMTX not working in Windows 10
On 5/19/2020 12:12, Pablo Rodriguez wrote: On 5/19/20 5:55 PM, Wolfgang Schuster wrote: Pablo Rodriguez schrieb am 19.05.2020 um 16:42: [...] I’m getting exactly the same error on Windows (x64). Where could we get the latest binary? You can download the binary from the following link but only the 32bit version for Windows is up-to-date. http://dl.contextgarden.net/build/luametatex/ Wolfgang, many thanks for the information. Pablo -- http://www.ousia.tk ___ Hallelulah! I now have a working LMTX again. The version at http://dl.contextgarden.net/build/luametatex/x86_64-w64-mingw32/luametatex.exe, when put into place, did the job. -- 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] output file name query
On 5/22/2020 11:39, Henning Hraban Ramm wrote: Am 22.05.2020 um 15:09 schrieb Wolfgang Schuster : Alan Bowen schrieb am 22.05.2020 um 14:33: In my project, I process a single product file by enabling various modes. What I would like to do is to vary the name of the output PDF file in each instance. So, in processing a file, how does one go directly from prd_filename.tex to myfilename.pdf rather than to prd_filename.pdf—assuming that it is possible? Any tips or pointers to what I should be reading will be greatly appreciated. 1. Drop the weird (sorry Hraban) naming system and use myfilename for your product. I force nobody to use that. 2. Use the result option on the command line, e.g. "context --result=myfilename prd_filename.tex". But that still produces a "prd_filename.*" first and then renames it, making it impossible to keep a "prd_filename.pdf". Or did that change recently? My workflows are adapted to that behaviour: "prd_*.pdf" is just the temporary version, none of those leaves my computer, but only nicely named PDFs (usually MyProductName_-mm-dd.pdf). 3. Ask Hans to add the result option to the first line of the document which is read by the context script before it creates the PDF. % result="myfilename" \starttext ... \stoptext That contradicts the mode approach. It would be nice if we could set (or can we?) the result from within the product, depending on a mode – since the product is renamed only later anyway, that could be viable. Best, Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net _ Why not simply wrap it in a script or use make? (I set up a makefile for each project, but scripts are fine for smaller stuff that has fewer dependencies. Make is available on Windows, so that is not an impediment.) -- 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] Getting width of text to be typeset
On 5/22/2020 18:18, Hans Hagen wrote: On 5/23/2020 12:03 AM, Hans Hagen wrote: On 5/22/2020 11:22 AM, cont...@vivaldi.net wrote: Hello, is it possible to get somehow the width of the "material" (box?) of the current line which is "ready" to be typeset? See the case: \starttext some text pqrs % Here I need to get width (or content) of the text from the begin of the current line, % i.e. width of the text "pqrs". % (Depending of the width I will decide what to do later.) \stoptext I am too laical to know how to "inject" TeX workflow or whether to access LuaTeX internals (nodes?) to get the desired information. - Is it possible somehow? Too easy ... \startluacode function document.whatever() context(nodes.hpack(tex.getnest().head.next).width) end \stopluacode \unexpanded\def\widthuptohere{\dimexpr\ctxlua{document.whatever()}sp\relax} \starttext \dorecurse {10} { snippet #1\scratchdimen\widthuptohere\ has \the\scratchdimen\ width\par } \stoptext but still you have to wikify it ... maybe i'll make it a low level helper (but than you also need to wikify that because i have no clue where to explain it) Actually, one needs to flush a bit \startluacode function document.whatever() local h = nodes.hpack(tex.getnest().head.next) local w = h.width h.list = nil nodes.free(h) context(w) end \stopluacode \unexpanded\def\widthuptohere{\dimexpr\ctxlua{document.whatever()}sp\relax} \starttext \dorecurse {10} { snippet #1\scratchdimen\widthuptohere\ has \the\scratchdimen\ width\par } \stoptext not that it matters much, because it's unlikely that you leak more than a dozen nodes in a run. Hans If the OP simply wants the width of a string, one can use \setwidthof#1\to#2. \define\String{pqrs} \setwidthof{\String}\to\Wdth \String\ is \Wdth\ wide. \setwidthof{{\tfb\em\String}}\to\Wdth {\tfb\em\String} is \Wdth\ wide. I do not know if that is different from the width of the same string unboxed from the paragraph. There may be some adjustments made in justification, expansion, and such that are not treated. -- 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] Getting width of text to be typeset
On 5/22/2020 19:49, Rik Kabel wrote: If the OP simply wants the width of a string, one can use \setwidthof#1\to#2. \define\String{pqrs} \setwidthof{\String}\to\Wdth \String\ is \Wdth\ wide. \setwidthof{{\tfb\em\String}}\to\Wdth {\tfb\em\String} is \Wdth\ wide. I do not know if that is different from the width of the same string unboxed from the paragraph. There may be some adjustments made in justification, expansion, and such that are not treated. Correcting my post (thank you, Floris), the format is a bit different than I had written. The following works: \starttext \define\String{pqrs} \setwidthof\String\to\WdthA {\String} is \WdthA\ wide. \define\String{\tfx\em pqrs} \setwidthof\String\to\WdthB {\String} is \WdthB\ wide. \define\String{\ss pqrs} \setwidthof\String\to\WdthC {\String} is \WdthC\ wide. \stoptext Giving: -- 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] How to define a font with an effect as a font with \definefont
On 5/23/2020 15:50, Gerben Wierda wrote: On 23 May 2020, at 20:06, Wolfgang Schuster <mailto:wolfgang.schuster.li...@gmail.com>> wrote: Pablo Rodriguez schrieb am 23.05.2020 um 20:02: On 5/23/20 11:52 AM, Gerben Wierda wrote: [] Actually, my setup is Optima with Helvetica used for Cyrillic: \definefallbackfamily [archimate] [ss] [Helvetica] [preset=range:cyrillic, tf=style:light, it=style:lightoblique, bf=style:regular, bi=style:oblique, force=yes, rscale=1.0] \definefontfamily [archimate] [ss] [Optima] \setupbodyfont[archimate] And I would like the effect to work on just the Optima font (which is a bit light for this use) Hi Gerben, this code may work for you: Don't forget to apply the "default" features to get ligatures and kerning. \definefontfeature [effect-widen] [effect={width=.2,delta=0.3}] \definefallbackfamily [archimate] [ss] [Helvetica] [preset=range:cyrillic, tf=style:light, it=style:lightoblique, bf=style:regular, bi=style:oblique, force=yes, features={effect-widen}] features={default,effect-widen}] \definefontfamily [archimate] [ss] [Optima] [features={effect-widen}] features={default,effect-widen}] Does this apply the effect only to Latin characters in Optima and not to Cyrcillic characters in Helvetica? I am trying to understand the syntax and if I read this it seems to get applied to cyrillic in this case. G Wolfgang ___ Well, you could try it. With one small correction (line 10 here), and effects exaggerated for demonstrations, it works just fine: \definefontfeature [effect-widen] [effect={width=4.2,delta=0.3}] \definefallbackfamily [archimate] [ss] [Calibri] [preset=range:cyrillic, force=yes, features=default] \definefontfamily` [archimate] [ss] [Calibri] [features={default,effect-widen}] \setupbodyfont[archimate] \starttext \doloopoverlist{\tf, \it, \bf, \bi}{ \recursestring{{\russian\hyphenatedword{Николаевич}\ \hyphenatedword{typography}}}\par} \stoptext Gives: (I don't have your fonts, but this illustrates more clearly the difference in handling for the two family definitions.) -- 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] \setupbackend in MkIV
I cannot get a PDF/A document produced with the latest MkIV beta 2020.05.18 16:46 (LMTX works without issue). Using the example from the wiki (https://wiki.contextgarden.net/PDF/A) I get the error stating: ... \p_file {\backendparameter {xmpfile}}\ifempty \p_file \else \clf_setxmpf... \setup_backend ...end [#1]\the \everysetupbackend l.11 ...ISO coated v2 300\letterpercent\space (ECI)] mtx-context | fatal error: return code: 1 Removing either of the \setupbackend instructions still results in the same error. Same issue for PDF/X. Is it a bug, or is it me? -- 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] Index formatting difference LMTX and MkIV
Hello list, I have an index which uses multilevel indexing (a+b+c) to insert entries which contain snips of text. LMTX behaves differently from MkIV when trimming that text, resulting in line wrapping which does not happen with MKiV. I am not sure when this began -- I just picked up work again on this project this week after a hiatus of a couple of months. This does not occur in every instance, but it happens often enough in this 20 page two-column index to add another full page, and it looks ugly in comparison (although perhaps no index looks good). The source is the same for both LMTX and MkIV. There is no explicitly conditional coding. With MkIV, I get: With LMTX, I get: I am struggling to prepare a MWE, but will try to do so if there is no obvious difference to those who ken the code. The problem may not be unique to register creation, but I have not noticed other appearances of the issue in the text. -- 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] Index formatting difference LMTX and MkIV redux
Hello list, About two months ago (2020-08-26) I described a difference between LMTX and MkIV in the setting of index registers entries, and more particularly, in the trimming of text to fit the available width therein. I have now created a smallish example to demonstrate the problem. I do notice that the problem is very sensitive to the width settings, and slight variations in width create different results with both engines. This ConTeXt input: \definepapersize [pinched crown quarto] [width=6.69in, height=9.61in] \setuppapersize [pinched crown quarto] \setuplayout [width=fit, backspace=1.4in, cutspace=1in, leftmargin=0.65in, rightmargin=0.65in] \setupregister [index] [n=2, balance=no, maxwidth=4cm] \starttext \startchapter[title={Index Test}] \index{Anonymous+Felix quem faciunt aliena pericula cautum} \index{{Diderot, Denis}+Et des boyaux du dernier prêtre, Serrons le cou du dernier roi} \index{{Dunne, Finley Peter}+Thrust ivrybody, but cut th’ ca-ards} \index{Eisenhower+Dwight D.+influence … by the military-industrial complex} \index{Eisenhower+Dwight D.+plundering, for our own ease and convenience, the precious resources of tomorrow} \placeindex \stopchapter \stoptext produces, with MkIV: and with LMTX: The example code shows one other instance as well, in the fourth indexed entry. Beside looking uglier, this results in a couple more pages for the same number of index entries. As I noted in my first description of the problem, this may not be unique to register processing, and perhaps it is an issue with limitatetext or doboundtext, or something else entirely. -- 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] Which version of MkIV should we use?
Hello all, I have noticed some differences between the MkIV installed as part of LMTX and the MkIV installed via first-setup. Which should be used going forward when one wants to use MkIV? (One difference: \contextkind is defined in file context.mkiv installed via first-setup. It is not defined in the file of the same name installed as part of LMTX. Another, more significant difference, is loading modules.) -- 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] Which version of MkIV should we use?
On 10/26/2020 04:37, Hans Hagen wrote: On 10/26/2020 12:09 AM, Rik Kabel wrote: Hello all, I have noticed some differences between the MkIV installed as part of LMTX and the MkIV installed via first-setup. Which should be used going forward when one wants to use MkIV? (One difference: \contextkind is defined in file context.mkiv installed via first-setup. It is not defined in the file of the same name installed as part of LMTX. Another, more significant difference, is loading modules.) mkiv works with luatex, lmtx needs luametatex currently the functionality is mostly the same but further development happens in lmtx so, if mkiv works for you, just keep using it .. you can try your document with lmtx and normally that should work ok there is a distinction between - core functionality (seldom changes) - tricky things (migh tbe done better in lmtx) - more radical new things hard to do in regular tex (will be in lmtx only) the luametatex engine is more advanced than luatex (which we cannot change any more in fundamental ways as it's also used outside context) but with luametatex we can do (maybe) crazy things; the luametatex enfine has all kind of improvements in the rendening, adds functionality that makes implementations somewhat cleaner, is faster and uses less memory, redesigns/organizes some internals (e.g. get rid of the sometimes fuzzy accumulated engine mix), adds more interfaces in lua, is self contained, etc ... see presentation(s) last ctx meeting. currently i'm applying some of the more drastic new thing: more advance macro argument parsing options, several levels of (macro) protection, etc which actually might lead to issues (simple to deal with as most are interface related, not functionality) so ... you can use mkiv and/or snapshot the current lmtx and/or try the latest greatest when it showsup 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 - Hans, Let me rephrase the question. With the following example: \starttext \contextkind \stoptext The standalone installation returns a document containing "beta" and context --luatex with the LMTX installation complains of an undefined control sequence. The file context.mkiv differs between the two installations. If the two are expected to differ, I am asking which is the reliable version. You had stated in an earlier email that the --luatex option provided to an LMTX installation will produce an MkIV result, but that does not seem to still be the case. -- 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] MkIV and LMTX difference in comma list expansion
Hello list, Another difference, perhaps the result of my lack of knowledge, but a difference. The following example produces different results for the fourth sequence, with the index being passed one item under MkIV and two items under LMTX. (The code is stripped out of a much more complex bit to show the issue.) % macros=mkvi \starttexdefinition unexpanded startBlockQuotation \dosingleempty\dostartBlockQuotation \stoptexdefinition \starttexdefinition dostartBlockQuotation [#SETUPS] \getrawparameters[BlockQuotation] [index=,#SETUPS] \expandafter\processcommalist \expandafter[\BlockQuotationindex]\doIndexIt{} \stoptexdefinition \starttexdefinition stopBlockQuotation \stoptexdefinition \starttexdefinition doIndexIt #INDEXTERM indexer sees #INDEXTERM\ \index{#INDEXTERM} \stoptexdefinition \starttext \startBlockQuotation[index=aaa] \startparagraph 1 \quad when indexing aaa. \stopparagraph \stopBlockQuotation \startBlockQuotation[index={aab}] \startparagraph 2 \quad when indexing \{aab\}. \stopparagraph \stopBlockQuotation \startBlockQuotation[index={aac, aad}] \startparagraph 3 \quad when indexing \{aac, aad\}. \stopparagraph \stopBlockQuotation \startBlockQuotation[index={{aae, aaf}}] \startparagraph 4 \quad when indexing \{\{aae, aaf\}\}. \stopparagraph \stopBlockQuotation \startBlockQuotation[index={{{aag, aah}}}] \startparagraph 5 \quad when indexing \{\{\{aag, aah\}\}\}. \stopparagraph \stopBlockQuotation \startBlockQuotation[index={{aai, aaj},{aak, aal}}] \startparagraph 6 \quad when indexing \{\{aai, aaj\},\{aak, aal\}\}. \stopparagraph \stopBlockQuotation \startBlockQuotation[index={{{aam, aan}},{{aao, aap}}}] \startparagraph 7 \quad when indexing \{\{\{aam, aan\}\},\{\{aao, aap\}\}\}. \stopparagraph \stopBlockQuotation \placeindex \stoptext Did I misuse the comma list processing, or is this a bug? -- 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] Which version of MkIV should we use?
On 10/26/2020 08:05, Rik Kabel wrote: Hans, Let me rephrase the question. With the following example: \starttext \contextkind \stoptext The standalone installation returns a document containing "beta" and context --luatex with the LMTX installation complains of an undefined control sequence. The file context.mkiv differs between the two installations. If the two are expected to differ, I am asking which is the reliable version. You had stated in an earlier email that the --luatex option provided to an LMTX installation will produce an MkIV result, but that does not seem to still be the case. My apologies to Hans and the list. My MkIV installation reverted to the 2020-01-30 release at some point in late September or early October. I have corrected that and now see no differences other than version strings in the source directory. -- 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] new upload
On 11/6/2020 16:03, Pablo Rodriguez wrote: On 11/6/20 8:42 PM, Hans Hagen wrote: Hi, Again a new lmtx upload. As these days are all about counting and numbers ... of the 19K visible macros some 14K are now flagged. Many thanks for the new release, Hans. I’m afraid that I cannot update unless I remove tex/texmf*.tma. I’m on Linux-64bit and I wonder whether I’m the only user affected by this issue. Question: do we really need all these 'named characters' or can we at some point ditch many .. I assume that users who key in greek and cyrillic use unicode nowdays (no hurry, just wondering). As for Greek enconding, I never used anything else than UTF-8. 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 ___ Same problem on WIndows 10. I have taken to simply doing a fresh install to get updates. Minor frustration. -- 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] fancybreak fails in LMTX
Hello all, The following example produces the expected output in MkIV, but fails in LMTX (both dated 2020-11-07). The modules directory was copied into the LMTX tree from the MkIV tree, and the log indicates that the module is loaded. It gives no other clues. The output has a blank line where the break should be, as shown in the included snips. \usemodule [fancybreak] \definesymbol [asterisms][*\qquad fancybreak\qquad *] \setupfancybreak[indentnext=no,symbol=asterisms] \starttext Before \fancybreak After \stoptext MkIV output: LMTX output: -- 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] Index formatting difference LMTX and MkIV redux
Bump. This is still a problem. Can anyone acknowledge that the problem exists outside my own installation? If so, is there a work-around? An explanation? On 10/21/2020 21:42, Rik Kabel wrote: Hello list, About two months ago (2020-08-26) I described a difference between LMTX and MkIV in the setting of index registers entries, and more particularly, in the trimming of text to fit the available width therein. I have now created a smallish example to demonstrate the problem. I do notice that the problem is very sensitive to the width settings, and slight variations in width create different results with both engines. This ConTeXt input: \definepapersize [pinched crown quarto] [width=6.69in, height=9.61in] \setuppapersize [pinched crown quarto] \setuplayout [width=fit, backspace=1.4in, cutspace=1in, leftmargin=0.65in, rightmargin=0.65in] \setupregister [index] [n=2, balance=no, maxwidth=4cm] \starttext \startchapter[title={Index Test}] \index{Anonymous+Felix quem faciunt aliena pericula cautum} \index{{Diderot, Denis}+Et des boyaux du dernier prêtre, Serrons le cou du dernier roi} \index{{Dunne, Finley Peter}+Thrust ivrybody, but cut th’ ca-ards} \index{Eisenhower+Dwight D.+influence … by the military-industrial complex} \index{Eisenhower+Dwight D.+plundering, for our own ease and convenience, the precious resources of tomorrow} \placeindex \stopchapter \stoptext produces, with MkIV: and with LMTX: The example code shows one other instance as well, in the fourth indexed entry. Beside looking uglier, this results in a couple more pages for the same number of index entries. As I noted in my first description of the problem, this may not be unique to register processing, and perhaps it is an issue with limitatetext or doboundtext, or something else entirely. -- 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] reusableMPgraphic not working
On 11/18/2020 08:11, Bruce Horrocks wrote: Just working through the Metafun manual and have hit a problem. In the following MWE the green circle appears but the blue one doesn't. Surely reusable graphics must be so commonly used that it has to be me that's doing something wrong? (Context version is: 2020.11.05 23:01) \starttext \startuseMPgraphic{name1} fill fullcircle scaled 100pt withcolor green ; \stopuseMPgraphic Green circle: \useMPgraphic{name1} \startreusableMPgraphic{name2} fill fullcircle scaled 100pt withcolor blue ; \stopreusableMPgraphic Blue circle:\reuseMPgraphic{name2} \stoptext Works as expected here, producing both circles. I am using 2020.11.17 12:39, both LMTX and MkIV. -- 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] LMTX fails with custom tags (MkIV continues to work)
Documents fail with an error when they include \startelement[tagname]. This started on or before the 2020.11.17T12:42 LMTX update, and continues with 2020.11.18 19:16 LMTX. MkIV continues to work as expected. Example: \setelementbackendtag[myTag] \setelementnature[myTag][mixed] \starttext \startelement[myTag] % <--- This works with MkIV but fails with LMTX, complaining: {\tt tex error on line 17 in file G:/extract.mkvi: The file ended when scanning an argument.} It works in LMTX when marked lines are removed, but\unknown \stopelement % <--- \stoptext -- 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] LMTX MkIV difference in expansion
Another LMTX/MkIV difference, this time with expansion: \define\Align{yes} \starttext \startalignment[\Align] This works with MkIV but fails with LMTX, complaining: {\tt tex error on line 3 in file G:/expand.mkvi: The file ended when scanning an argument.} \blank It works in both when \tex{def} or \tex{defineexpandable} is used instead of \tex{define}. \blank What changed? \stopalignment \stoptext It may well be that I have been abusing some laxity in MkIV and that LMTX is a bit stricter in what it accepts, but I would like to know if this is an expected difference. -- 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] LMTX MkIV difference in expansion
On 11/19/2020 17:03, Hans Hagen wrote: On 11/19/2020 9:41 PM, Wolfgang Schuster wrote: Rik Kabel schrieb am 19.11.2020 um 21:20: Another LMTX/MkIV difference, this time with expansion: \define\Align{yes} \starttext \startalignment[\Align] This works with MkIV but fails with LMTX, complaining: {\tt tex error on line 3 in file G:/expand.mkvi: The file ended when scanning an argument.} \blank It works in both when \tex{def} or \tex{defineexpandable} is used instead of \tex{define}. \blank What changed? \stopalignment \stoptext It may well be that I have been abusing some laxity in MkIV and that LMTX is a bit stricter in what it accepts, but I would like to know if this is an expected difference. You have to wait for Hans to get an answer but here is a minimal example. \starttext \protected\def\testparameter{test} %\def\testparameter{test} \def\test[#1]% {\expandafter\let\expandafter\testargumentlist\csname#1\endcsname} \test[\testparameter] \stoptext Often arguments to commands like \startsomething[xx] let the xx end up in some \(if)csname expansion. A protected (\unexpanded in context speak) macro doesn't expand inside for instance an \edef (or comparable expandable situation). Now, from that it makes perfect sense to also not let it expand inside a \csname or \ifcsname. One reason is that when it does expand, you can get a pretty wild (nested) sequence of nested expansions and one can be pretty sure that we then don't have a proper csname. This is why in luatex we have a catch for running wild csname checking. The original \ifcsname test was inherited from etex. The \protected feature also comes from etex. But \csname is a tex natural. In pdftex (and luatex) a protected macro inside an \(if)csname does expand which to makes no sense and smells like a bug. Or maybe it was tricky to catch (the implementation of protected a bit of a hack). In luametatex protected macros are native and in the process I also decided to *not* expand them in a \(if)csname where I expect (as said) protected macros to behave like in an edef. I nice side effect is that running wild no longer happens (but we still catch it) which can save quite some useless backup token list construction (needed because tex has to push back stuff in order to be able to report an error). So, when you still don't understand it (which I can understand) I'm sure Wolfgang can explain it better now. \starttext \def\foo{foo} \protected\def\oof{oof} \csname foo\endcsname \csname oof\endcsname \csname \foo\endcsname % error in luametatex, ok in pdftex/luatex: % \csname \oof\endcsname \ifcsname foo\endcsname yes\else nop\fi \ifcsname oof\endcsname yes\else nop\fi \ifcsname \foo\endcsname yes\else nop\fi % nop in luametatex (error intercepted), yes in pdftex/luatex \ifcsname \oof\endcsname yes\else nop\fi \stoptext Now, one can argue that if I consider it a but in the other engines, why I don't argue that it should be solved. Well, there is too much legacy code already that might use it as feature so it will not change. But in luametatex we can 'fix' these things. (We also use the csname in a rather predictable way in context so i don't expect issues in the core.) Hans You are right about not quite understand. Does this mean that I can have the same definitions in MkIV and LMTX (after some future update), or should I hunt down the \defines in both, or that I should fork (or mode test) my source environment files, one set for LMTX and one for MkIV? -- 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] Problem with setupcharacterspacing and comma
Hello all, Playing with define/setup/set characterspacing, I have come across some odd, perhaps buggy, behavior. This applies to both MkIV 2020.11.19 11:23 and LMTX 2020.11.19 11:28. The problem is that character spacing is not effected for the left side of the comma character. It is handled as expected for other characters that I have tested, but I have not performed extensive tests. Example code: \definecharacterspacing[Test] \setupcharacterspacing [Test] ["002C] [left =.25,right=1,alternative=1] % , \setupcharacterspacing [Test] ["0065] [left=0.5,right=1,alternative=1] % e \setupcharacterspacing [Test] ["003B] [left=0.5,right=1,alternative=1] % e \startTEXpage[offset=1em] abc; def, g \setcharacterspacing[Test]abc; def, g \stopTEXpage Output: -- 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] Problem with setupcharacterspacing and comma
On 11/21/2020 04:46, Hans Hagen wrote: On 11/21/2020 4:57 AM, Rik Kabel wrote: Hello all, Playing with define/setup/set characterspacing, I have come across some odd, perhaps buggy, behavior. This applies to both MkIV 2020.11.19 11:23 and LMTX 2020.11.19 11:28. The problem is that character spacing is not effected for the left side of the comma character. It is handled as expected for other characters that I have tested, but I have not performed extensive tests. Example code: \definecharacterspacing[Test] \setupcharacterspacing [Test] ["002C] [left =.25,right=1,alternative=1] % , \setupcharacterspacing [Test] ["0065] [left=0.5,right=1,alternative=1] % e \setupcharacterspacing [Test] ["003B] [left=0.5,right=1,alternative=1] % e \startTEXpage[offset=1em] abc; def, g \setcharacterspacing[Test]abc; def, g \stopTEXpage remove the space between "left" and "=" I should have know better than to copy as I did from the source code without analyzing it sufficiently! In typo-spa.mkiv I found: \setupcharacterspacing [frenchpunctuation] ["003A] [\c!left =.25,\c!alternative=1] % : ... I see (now) that the space disappears when the \c!left macro is processed. Mea culpa. I owe you a beer. -- 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] LMTX MkIV difference in expansion
On 11/21/2020 10:05, Wolfgang Schuster wrote: Rik Kabel schrieb am 20.11.2020 um 00:18: You are right about not quite understand. There are cases where you want to pass a command to another command as it is without replacing it with its content, e.g. when you store the \TeX logo in the table of content the \TeX command should be written in the register and not the content of the command. In the following example the first line prints the definition of the \TeX logo but in many cases you ant to preserve the command as in the second line. \starttext \tex{TeX} = \detokenize\expandafter{\TeX} \blank \tex{TeX} = \detokenize{\TeX} \stoptext To make it easier to keep the command eTeX added a new command \protected which can be used before \def to achieve this (ConTeXt provides the same thing under the name \unexpanded). The following example shows how you can use \protected\def to keep always the current meaning of \foo when you print the content of \bar. \starttext \def\foo{foo} \edef\bar{\foo} \def\foo{bar} \startlines bar=\bar foo=\foo \stoplines \blank \protected\def\foo{foo} \edef\bar{\foo} \protected\def\foo{bar} \startlines bar=\bar foo=\foo \stoplines \stoptext A problem in older TeX engines is that \csname ...\endcsname didn't respect this protection and replaced the protected command with its content, recently Hans changed this behavior in LMTX which lead to the error message in your document. Does this mean that I can have the same definitions in MkIV and LMTX (after some future update), or should I hunt down the \defines in both, or that I should fork (or mode test) my source environment files, one set for LMTX and one for MkIV? When you use \define to store arguments which are passed as arguments to other command you have to change this to \defineexpandable but its best to do this in MkIV and LMTX because protected commands are the wrong thing in this case. Even though it would work in MkIV in some cases you run into problems when you pass argument to Lua. Wolfgang Thank you, Wolfgang, for the explanation and examples. I have in fact already gone through and replaced the impacted occurrences of \define with \defineexpandable. LMTX made it easy to identify them. -- 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] RE : upload
On 11/23/2020 17:02, Hans Hagen wrote: On 11/23/2020 9:42 PM, Joseph wrote: After running install.bat I see error : new attempt The following works with the mkiv installation and with the lmtx install and context --luatex. It fails with an undefined control sequence error when run with context lmtx without the --luatex switch. \version[draft] \starttext Hi! \stoptext -- 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] Display reference number as Roman number
Hello all, What I thought should be a simple conversion escapes me. I have a reference (created originally via a label defined by \definelabel) that, when referenced as *\in[label]* or *\ref[number][label]* displays a number, and that is how I normally use it. However, I want to display it in one instance as a Roman numeral. *\**Romannumerals{\in[label]}* complains that it is not being fed a number. How can I display the label number in Roman number format in this one instance? -- 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] Another LMTX small issue
The following code generates an error message in the log under LMTX 2020.11.24 19:02 but compilation continues with no apparent issue. \starttext \framedtext{abc} \stoptext -- 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] framedtext is (still) broken in LMTX
With ConTeXt ver: 2020.11.28 13:18 LMTX fmt: 2020.11.29 the *\framedtext* output is consistently *0.8\textwidth*. MkiV gives the expected result. \starttext \framedtext{Fail}\par \framedtext[width=fit]{Fail}\par \framedtext[width=3cm]{Fail}\par \framedtext[width=0.8\textwidth]{Fine by accident}\par \framedtext[width=\textwidth]{Fail}\par \framed{Fine}\par \framed[width=fit]{Fine}\par \framed[width=3cm]{Fine}\par \framed[width=0.8\textwidth]{Fine}\par \framed[width=\textwidth]{Fine}\par \stoptext -- 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] framedtext is (still) broken in LMTX
On 11/29/2020 17:15, Hans Hagen wrote: On 11/29/2020 10:33 PM, Rik Kabel wrote: With ConTeXt ver: 2020.11.28 13:18 LMTX fmt: 2020.11.29 the *\framedtext* output is consistently *0.8\textwidth*. MkiV gives the expected result. \starttext \framedtext{Fail}\par \framedtext[width=fit]{Fail}\par \framedtext[width=3cm]{Fail}\par \framedtext[width=0.8\textwidth]{Fine by accident}\par \framedtext[width=\textwidth]{Fail}\par \framed{Fine}\par \framed[width=fit]{Fine}\par \framed[width=3cm]{Fine}\par \framed[width=0.8\textwidth]{Fine}\par \framed[width=\textwidth]{Fine}\par \stoptext fixed in next upload (tomorrow) Sadly, *\framedtext* still appears to have a problem with the default width, although with today's update one can now explicitly set the width. (Nothing I can find in the docs suggests that *\framedtext* has a different default width than *\framed*. Perhaps I missed it.) New overwrought example: \definelayer [HRule] [x=0mm,y=0pt,width=\textwidth,height=\textheight] \setlayer [HRule] [hoffset=0pt,voffset=10em] {\blackrule[color=green,height=1pt,width=10cm]} %setupframedtext [offset=0pt] \definelayer [VRule] [x=0mm,y=0pt,width=\textwidth,height=\textheight] \setlayer [VRule] [hoffset=0.75\textwidth,voffset=0pt] {\blackrule[color=red,height=10em,width=1pt]} \setupbackgrounds [text] [background={HRule,VRule}] \setupframedtext [offset=0pt] \starttext \framed{default width for \tex{framed} is {\tt fit}}\par \framedtext{default width for \tex{framedtext} is not {\tt fit}. It appears to be 0.75\tex{textwidth}}\par \framedtext[width=10cm]{explicit width for \tex{framedtext} now works}\par \framedtext[width=fit]{{\tt fit} width for \tex{framedtext} now works}\par \stoptext -- 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] framedtext is (still) broken in LMTX
On 11/30/2020 15:05, Wolfgang Schuster wrote: Rik Kabel schrieb am 30.11.2020 um 18:15: On 11/29/2020 17:15, Hans Hagen wrote: On 11/29/2020 10:33 PM, Rik Kabel wrote: With ConTeXt ver: 2020.11.28 13:18 LMTX fmt: 2020.11.29 the *\framedtext* output is consistently *0.8\textwidth*. MkiV gives the expected result. \starttext \framedtext{Fail}\par \framedtext[width=fit]{Fail}\par \framedtext[width=3cm]{Fail}\par \framedtext[width=0.8\textwidth]{Fine by accident}\par \framedtext[width=\textwidth]{Fail}\par \framed{Fine}\par \framed[width=fit]{Fine}\par \framed[width=3cm]{Fine}\par \framed[width=0.8\textwidth]{Fine}\par \framed[width=\textwidth]{Fine}\par \stoptext fixed in next upload (tomorrow) Sadly, *\framedtext* still appears to have a problem with the default width, although with today's update one can now explicitly set the width. (Nothing I can find in the docs suggests that *\framedtext* has a different default width than *\framed*. Perhaps I missed it.) There is nothing wrong with framedtext, the command always used a fixed width as default setting. Wolfgang Wikified. ___ 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] How do I get rid of the ct and st ligatures in EBGaramond?
On 12/2/2020 13:59, T. Kurt Bond wrote: Interesting. Here is a an example that sort of works, Variant 1: \definefontfamily[english] [rm] [ebgaramond] [features={default, dlig=no}] \setupbodyfont[english,10pt] \starttext Variant 1: Does this look like EBGaramond? fi fl ffi ffl ct st \stoptext However, it turns of *all* the ligatures. Here is an example that works as expected, Variant 2: \definefontfeature[english][dlig=no] \definefontfamily[ebgaramond] [rm] [EB Garamond] [features={default,english}] \setupbodyfont[ebgaramond,10pt] \starttext Variant 2: Does this look like EBGaramond? fi fl ffi ffl ct st \stoptext It turns off just the ct and st ligatures. I've attached the generated PDF files for both variants. No, it turns off other ligatures as well, so is not a generally workable solution. (Try *fj* and *ſi*, for two examples.) -- 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] How do I get rid of the ct and st ligatures in EBGaramond?
On 12/2/2020 13:34, Hans Hagen wrote: On 12/2/2020 5:54 PM, Joey McCollum wrote: If you're using Octavio Pardo's version of EB Garamond (https://github.com/octaviopardo/EBGaramond12 <https://github.com/octaviopardo/EBGaramond12>), then these ligatures are covered (along with the Th ligature) by the "dlig" (discretionary ligatures) feature, so you'll need to disable that. Unfortunately, this will also disable the Th ligature. This is a known, open issue for the font: https://github.com/octaviopardo/EBGaramond12/issues/20 <https://github.com/octaviopardo/EBGaramond12/issues/20>. One of these examples where opensource fails ... https://github.com/octaviopardo/EBGaramond12 https://github.com/georgd/EB-Garamond A while ago I replaced AB on my machine in oirdert to test some issue so now I have to replace it again? Which one is the real one? Which one is the original? Which one are we supposed to support / configure? \definefontfeature[whatever][default][rlig=yes] % \definefontfeature[whatever][default][rlig=yes,dlig=yes] % those st and ct ligs \definefontfamily [english] [rm] [EB Garamond] [features=whatever] \definefontfamily [english] [mm] [Stix Two Math] \setupbodyfont[english] \starttext fi fl ffi ffl ct st \stoptext Using the ones pointed from google fonts. Hans Hello all, I am the one who posted issue #20 for the font back in January 2018. The report simply states that there is no way to get dlig without also getting hlig, and includes an easily reproducible demonstration (using LibreOffice on the assumption that it is more accessible for testing). Since then, there has been a PR submitted. Crickets. No action. As to which version of the font should be used, Georg Duffner transferred stewardship of the font to Octavio Pardo in 2017 or so. Pardo added support for faces beyond roman and italic (bold, semibold, extrabold). Some work was done a couple of years ago to support variable fonts, but nothing that can be used has yet come out of that effort. To a casual observer, the development and maintenance appears to be abandoned. I am sure that many would be happy to see work on this font resume, but projects like this are difficult to take over and support is thin. So, if you can find that satisfies your requirements as it is, use it. The Duffner versions (pre-Pardo) do not have this particular issue, and if you do not need emboldened faces or other updates Pardo may have implemented, that should work. Or look elsewhere. Although the range and licensing of EB Garamond was certainly attractive, there are plenty of Garamonds in the world. -- 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] Uploaded LuaMetaTeX version
My update log says: 2020-12-04T11:32:59 ConTeXt updated from 2020.12.01T17:52 to 2020.12.03T19:02 2020-12-04T11:32:59 LuaMetaTeX downdated from 2.08.03 20201123 549 to 2.05.01 20200402 491 That is quite a change! On 12/4/2020 07:01, Hans Hagen wrote: On 12/4/2020 11:19 AM, Henning Hraban Ramm wrote: Hi, with latest LMTX, the size (width) of external figures is ignored in floats, while it works outside of floats and with MkIV. It also works with metapost figures (e.g. dum library). \setupexternalfigure[location=default] \starttext \startplacefigure[location=here] \externalfigure[cow][width=2cm] \stopplacefigure \stoptext (fixed in next upload) - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] thinrules width
Hello list, and developers in particular, I note that thinrules (and its setup, setupthinrules, and relatives thinrule and hairline) does not have a width setting, and always sets a rule (or rules) the full width of the text area (less any text set on the same line. No problem, but I do see (non-authoratative) references in the mailing list to such a parameter, and more problematically, I note that the default ConTeXt template for Pandoc includes the line: \setupthinrules[width=15em] % width of horizontal rules Before reporting an issue to the Pandoc team, I just want to confirm that this is, in fact, both the case (as reading the source and my testing indicate) and the intent (which I cannot attest). I would further suggest that Pandoc should be using setupblackrule with appropriate height, depth, rulethickness, and width. I suspect that Pandoc typography is not sensitive to control of the actual placement relative to the baseline, as ConTeXt supports, but a pointer to a clear explanation of the interaction of height, depth, and rulethickness would be welcome. -- 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] Display reference number as Roman number
On 11/24/2020 22:09, Rik Kabel wrote: Hello all, What I thought should be a simple conversion escapes me. I have a reference (created originally via a label defined by \definelabel) that, when referenced as \in[label] or \ref[number][label] displays a number, and that is how I normally use it. However, I want to display it in one instance as a Roman numeral. \Romannumerals{\in[label]} complains that it is not being fed a number. How can I display the label number in Roman number format in this one instance? -- Rik Okay, I have something that works. Perhaps not optimally, but it is functional. \definelabel[Qa] \definecounter[SAVE][numberconversion=R] \starttext This is labeled.\Qa\par This is labeled.\Qa[REF]\par \setcounter[SAVE][{\rawcountervalue[Qa]}] See \in[REF].\par See \ref[number][REF].\par See \in[REF].\par This is labeled.\Qa\par See \convertedcounter[SAVE].\par \stoptext If you can improve it, please do. A solution that lets me use the label name (Qa here) and convert the associated number would be nice. -- 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] Using \overloaded
Hans and all, Preparing my standard environments for future strict enforcement of overloading prevention, I have run into one issue. I had been using the following construction to change the formatting of URLs: \let\OrigHyphenatedurl\hyphenatedurl \starttexdefinition hyphenatedurl #URL \begingroup \URLfont\OrigHyphenatedurl{#URL} \endgroup \stoptexdefinition This results in the following warning about overloading \hyphenatedurl: csname overload > warning, protection level 3, control sequence 'hyphenatedurl', properties 'permanent protected', file 'env_layout.mkvi', line 1 I have tried adding \overloaded to indicate the intentional overloading, but \overloaded cannot be used with \starttexdefinition, so I rewrote it as: \let\OrigHyphenatedurl\hyphenatedurl \overloaded\define[1]\hyphenatedurl{% \begingroup% \URLfont\OrigHyphenatedurl{#1}% \endgroup}% but that (and also with \overloaded\def\hyphenatedurl#1...) gives the same (except for the line number) warning: csname overload > warning, protection level 3, control sequence 'hyphenatedurl', properties 'permanent protected', file 'env_layout.mkvi', line 822 So, what is the proper way to indicate intentional overloading? Or should this redefinition be done in another way? (Also, it is interesting that the line number in the first warning message does not point to the actual line.) -- 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] Using \overloaded
On 1/24/2021 04:33, Wolfgang Schuster wrote: Rik Kabel schrieb am 24.01.2021 um 05:13: Hans and all, Preparing my standard environments for future strict enforcement of overloading prevention, I have run into one issue. I had been using the following construction to change the formatting of URLs: \let\OrigHyphenatedurl\hyphenatedurl \starttexdefinition hyphenatedurl #URL \begingroup \URLfont\OrigHyphenatedurl{#URL} \endgroup \stoptexdefinition You can use a hook to change the font for \hyphenatedurl. \starttext \hyphenatedurl{https://wiki.contextgarden.net/Main_Page} \appendtoks \it \to \everyhyphenatedurl \hyphenatedurl{https://wiki.contextgarden.net/Main_Page} \stoptext This results in the following warning about overloading \hyphenatedurl: csname overload > warning, protection level 3, control sequence 'hyphenatedurl', properties 'permanent protected', file 'env_layout.mkvi', line 1 I have tried adding \overloaded to indicate the intentional overloading, but \overloaded cannot be used with \starttexdefinition, so I rewrote it as: \let\OrigHyphenatedurl\hyphenatedurl \overloaded\define[1]\hyphenatedurl{% \begingroup% \URLfont\OrigHyphenatedurl{#1}% \endgroup}% but that (and also with \overloaded\def\hyphenatedurl#1...) gives the same (except for the line number) warning: csname overload > warning, protection level 3, control sequence 'hyphenatedurl', properties 'permanent protected', file 'env_layout.mkvi', line 822 So, what is the proper way to indicate intentional overloading? Or should this redefinition be done in another way? The best solution is *to not* overload commands because there are either alternative ways to achieve the desired result or other commands which can be used. \overloadmode=4 \starttext \permanent\def\mycommand#1{[#1]} \mycommand{Old definition} \pushoverloadmode \aliased\let\originalmycommand\mycommand \permanent\def\mycommand#1% {{\it\originalmycommand{#1}}} \popoverloadmode \mycommand{New definition} \stoptext Wolfgang Thank you, Wolfgang (and Hans), The hook is perfect for this. I had avoided that construction for a long time thinking that it is too low-level, but looking at it again it seems to be the right thing here. I can find no information on \aliased and the push/pop for overloademode and such, so will leave documenting that in the wiki to somebody with a few more clues. -- 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] Change to wordright behavior?
Dear all, At some time in the last couple of years the behavior of \wordright seems to have changed, at least in the following situation. With the following example: \starttext \hsize3cm Aaa\wordright{Aaa}\par \sc{Bbb\wordright{Bbb}}\par {\sc Ccc\wordright{Ccc}}\par \sc{Ddd}\wordright{\sc{Ddd}}\par \stoptext Produces: The second and third lines with \wordright (Bbb and Ccc) each generate two lines. They previously produced one line each. Placing each part of the line in its own \sc addresses it here (Ddd), but it does seem that it should not be necessary to do that. Was this an intentional change? -- 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 ___