Re: [NTG-context] LMTX isn't typesetting math correctly with Pagella

2021-01-15 Thread Otared Kavian
Hi Jack,I tested your example both with Pagella and Lucida OT: indeed typesetting with the latest LMTX, with Pagella the math italic « f » runs into the right bar of « |f| ».However the result with mkiv is correct.I am attaching the PDF output with LMTX.Best regards: Otared

bar-distance-f.pdf
Description: Adobe PDF document
On 15 Jan 2021, at 13:33, Jack Hill  wrote:
  


  
  Hi,I've been having some trouble with ConTeXt not typesetting math
  correctly when using the Pagella font (I do not know if the same
  issue occurs with other fonts as I haven't tested them).If I compile with LMTX, the spacing between letters becomes very
  small so that when I type "|f|", for example, the second "|"
  intersects the f and looks rather ugly. However, compiling with
  the --luatex switch fixes these issues and the math looks nice
  again.Can anybody else replicate this issue, and does anybody know why
  it is happening?This the code I used to test:

\setupbodyfont[pagella]

\starttext
\startformula
|f| = \sqrt{\int_0^1 |f(t)|^2 \text{d}t}
\stopformula
\stoptext
Jack

  

___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-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : http://contextgarden.net__
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Randomize order of blocks

2021-01-06 Thread Otared Kavian
Following up my previous message, here is an example:

%% begin shuffled list of exercises
\setuprandomize[2021]

\startluacode
function shuffle(tableau)
local maxsize, t, tt
maxsize = #tableau
tt = {}
t = {}
for i = 1, maxsize do
t[i] = {}
t[i]["columnOne"] = tableau[i]
t[i]["columnTwo"] = math.random(1,100*maxsize)
end
table.sort(t, function(a,b) return a.columnTwo < b.columnTwo 
end)
for i = 1, maxsize do
tt[i] = t[i]["columnOne"]
end
return tt
end
\stopluacode

% We define three arrays
% with the names, the functions and their derivatives
% One could also add a ListOfVariables...

\startluacode

ListOfNames = {
"f",
"g",
"h",
"u",
"v",
"F",
"G",
"H",
}

ListOfFunctions = {
"\\cos(x^2)",
"x\\sin(x)",
"\\tan(x)",
"x^3 - 3x^2 + 1",
"\\frac{1}{1 + x^2}",
"\\sin(\\log(x))",
}

ListOfDerivatives = {
"-2x\\sin(x^2)",
"x\\cos(x) + \\sin(x)",
"1 + \\tan(x)^2",
"3x^2 - 6x",
"\\frac{-2x}{(1 + x^2)^2}",
"\\frac{\\cos(\\log(x))}{x}",
}

\stopluacode

\starttext

% We define a buffer and a shuffled list of integers

\startbuffer[test-derivatives]
\startluacode
ShuffledList = shuffle({1,2,3,4,5,6})
\stopluacode

Let $\cldcontext{ListOfNames[ShuffledList[\recurselevel]]}(x) := 
\cldcontext{ListOfFunctions[ShuffledList[\recurselevel]]}$. Prove that
\startformula
\cldcontext{ListOfNames[ShuffledList[\recurselevel]]}'(x) = 
\cldcontext{ListOfDerivatives[ShuffledList[\recurselevel]]}
\stopformula
\stopbuffer

\dorecurse{6}{\blank[medium]{\bf Exercise #1.}
\getbuffer[test-derivatives]
}

\stoptext

%% end shuffled list of exercises


> On 6 Jan 2021, at 09:41, Otared Kavian  wrote:
> 
> Hi Jairo,
> 
> One can indeed make quizzes and exams with randomized order of problems, 
> randomized values and even randomized names of functions and variables.
> I have some examples which I have been using for several years (they are 
> useful especially in these days of giving exams online…): I can send them to 
> you as they are, or if you tell me what kind of problems you want, then I can 
> adapt my examples before sending them to you.
> 
> Best regards: Otared 
> 
>> On 5 Jan 2021, at 17:18, Jairo A. del Rio  wrote:
>> 
>> Hi, list.
>> 
>> Some time ago I realized ConTeXt has "blocks" which allow one to make 
>> quizzes, exams and related with ease. However, I want to know if there's an 
>> option to randomize their order when printed. Thank you in advance.
>> 
>> Jairo
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
> 

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Randomize order of blocks

2021-01-06 Thread Otared Kavian
Hi Jairo,

One can indeed make quizzes and exams with randomized order of problems, 
randomized values and even randomized names of functions and variables.
I have some examples which I have been using for several years (they are useful 
especially in these days of giving exams online…): I can send them to you as 
they are, or if you tell me what kind of problems you want, then I can adapt my 
examples before sending them to you.

Best regards: Otared 

> On 5 Jan 2021, at 17:18, Jairo A. del Rio  wrote:
> 
> Hi, list.
> 
> Some time ago I realized ConTeXt has "blocks" which allow one to make 
> quizzes, exams and related with ease. However, I want to know if there's an 
> option to randomize their order when printed. Thank you in advance.
> 
> Jairo
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] dutch calendars 3 months

2021-01-05 Thread Otared Kavian
Best wishes for the new year !

Talking of calendars, this one is even more compact: each year is shown on one 
page, and when changing the year only the three lines where the months are 
shown will change:

http://www.professores.im-uff.mat.br/hjbortol/c1p/?fbclid=IwAR3EkoYjcxA2MCkfWU8J-KqaEReMluNaQ1DPkDNM8dxtWEwnGZ0mXsvQ640

Best regards: Otared

> On 5 Jan 2021, at 11:46, luigi scarso  wrote:
> 
> I guess this is a challenge for Willi :
> a module to typeset "dutch calendars"
> as in 
> https://www.calendari.it/ 
> (I am not involved at all with the site, it's the first I have found )
> 
> I like the slim version, with 3 months, the saint(s) of the day, the moon 
> phases, the week number,
> the day from the beginning and to the end of the year 
> 
> 
> -- 
> luigi
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Math align not working

2020-12-29 Thread Otared Kavian
Hi Johann,

The example you sent works fine here with LMTX version 2020.12.28 01:41.
Which version of ConTeXt are you using ?

Best regards: Otared

> On 29 Dec 2020, at 14:36, Johann Birnick  wrote:
> 
> Hi there,
> 
> I noticed that Math align is not working properly. In particular I mean the
> alignment. For example, the following code
> 
> 
> \starttext
>  
> 
> \startformula \startalign[m=2,distance=8em,n=5,
> align={right,middle,middle,middle,left}]
> \NC 0 \NC < \NC 2x + 5y \NC < \NC 10
> \NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR
> \NC 3 \NC < \NC 2y + 3z \NC < \NC 15
> \NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR
> \stopalign \stopformula
> 
> \stoptext
> 
> 
> is copied from https://dl.contextgarden.net/myway/mathalign.pdf but doesn't
> produce the intended result.
> 
> What's wrong?
> 
> Best regards,
> Johann
> 
> ___
> 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] Metafun: dotlabel issue in latest LMTX

2020-12-27 Thread Otared Kavian
Hi Hans,

The following (due to you and Aditya, discussed a few days ago) used to work 
with LMTX until version 2020-12-10, but it does not work anymore with LMTX 
version 2020-12-24 17:30. I wonder whether this is due to some changes you have 
made recently.

%% begin squaredot-test.tex
\startMPdefinitions
newpath mydotlabelshape ;
mydotlabelshape := fullcircle ;
mydotlabeldiam := 12 pt ;

vardef mydotlabel@#(expr s,z) text t_ =
label@#(s,z) t_ ;
fill (mydotlabelshape scaled 2mydotlabeldiam) shifted z t_;
enddef ;
\stopMPdefinitions

\starttext
\startMPcode
newpath p ; 
p := (2cm, 3cm) -- (3cm, 5cm);

mydotlabeldiam := 15pt;
mydotlabelshape := fullsquare ;

draw p ;

mydotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p) 
withcolor transparent("exclusion",.5,red) ;
mydotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p) 
withcolor transparent("exclusion",.5,red) ;

\stopMPcode
\stoptext
%% end squaredot-test.tex

I get an error message, which is obscure to me, saying:

%-- begin error message excerpt

metafun > log > error: Isolated expression
metafun > log >
metapost> log > 
metapost> log >  
metapost> log >;
metapost> log > <*> newpath mydotlabelshape ;
metafun > log >
metafun > log > I couldn't find an '=' or ':=' after the expression 
that is shown above this
error message, so I guess I'll just ignore it and carry on.
metafun > log >
metapost> log >   mydotlabelshape := 
fullcircle ; mydotlabeldiam := 12 pt ; vardef mydotlabel@##(expr s,z) text t_ = 
label@##(s,z) t_ ; fill (mydotlabelshape scaled 2mydotlabeldiam) shi...

%-- end error message excerpt

Best regards: Otared

___
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] freedotlabel not defined in LMTX ?

2020-12-26 Thread Otared Kavian
Hi Hans,

When I was testing your example with freelabel in another thread, I noticed 
that freedotlabel does not work in LMTX.
Here is the code from the Metafun manual which works with ConTeXt version 
2020.06.25 10:55 MKIV, but not with ConTeXt version 2020.12.24 17:30 LMTX.

%% begin freedotlabel.tex
\setupbodyfont[pagella]

\starttext

\startMPcode
pair destination ;
for whereto = "up", "down", "left", "right" :
destination := scantokens(whereto) * 1cm ;
freedotlabel(whereto, destination, origin) ;
drawarrow origin -- destination
withpen pencircle scaled .25mm withcolor .625 red ;
endfor ;
\stopMPcode

\stoptext
%% end freedotlabel.tex

Best regards: Otared
___
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] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-23 Thread Otared Kavian
Hi Garulfo,

Thank you for sharing your nice example: it typesets correctly with mkiv, but 
it seems to me that with LMTX the text does not appear (at least on my 
installation of the latest LMTX).

Best regards: Otared

> On 24 Dec 2020, at 00:14, Garulfo  wrote:
> 
> Thanks Taco,
> 
> I made some progress :
> https://wiki.contextgarden.net/Talk:Cover_Pages
> 
> I now have two additional questions ... ;-)
> 
> - How can I deal with "space" characters (because current solution
>  requires to explicitly add the ~ character)
> 
> - What would be the work to do in order to make this mechanism directly
>  usable in metapost / metafun, within \startMPpage \stopMPpage,
>  - to avoid switching between \start\stopMPdrawing and TeX
>  - to have something like "draw followtext" in mp-blob.mpiv ?
> 
> 
> 
> %--
> 
> \setuppapersize  [A4]
> 
> %--
> 
> \def\MyFont{\definedfont[name:%
> texgyrepagellabold%
> %exo2black%
> %agaramondprobold%
> *default at 55pt]}
> 
> %--
> 
> \startluacode
> 
> function document.outlinepaths(character)
>local chardata  = fonts.hashes.characters[true] -- by unicode
>local shapedata = fonts.hashes.shapes[true] -- by index
>local c = chardata[character]
>if c and c.index and shapedata then
>local shapeglyphs = shapedata.glyphs or { }
>local glyph   = shapeglyphs[c.index]
>if glyph and (glyph.segments or glyph.sequence) then
>local units  = shapedata.units or 1000
>local factor = 100/units
>return fonts.metapost.paths(glyph,factor)
>end
>end
>return { }
> end
> 
> function document.defineoutline(char,target)
>local outlines = document.outlinepaths(char)
>local nofpaths = #outlines
>context("\\startMPdrawing") -- ADDED by garulfo
>context("path %s[] ;",target)
>context("numeric %sn ; %sn := %s ;",target,target,nofpaths)
>for i=1,nofpaths do
>context("%s[%i] := %s ; ",target,i,outlines[i])
>end
>context("\\stopMPdrawing")  -- ADDED by garulfo
> end
> 
> \stopluacode
> 
> %--
> 
> \def\mpdefineoutlines#1#2{\ctxlua{document.defineoutline(\number`#1,"#2")}}
> 
> %--
> 
> \def\EmptyLetters#1%
> {%
> \resetMPdrawing
> \MPtoks={}
> %
> \startMPdrawing
>  picture pic[], pictA ;
>  numeric wid[], len[], pos[], n ;
>  wid[0] := len[0] := pos[0] := n := 0 ;
>  numeric scaling;
>  path pictB , frame ;
>  pair shiftB ;
>  picture monImageA; monImageA := nullpicture;
>  picture monImageB; monImageB := nullpicture;
>  color colorframe;  colorframe := 0.6white;
> %
> \stopMPdrawing
> %
> \MyFont\handletokens#1\with\whatever
> %
> \startMPdrawing
>  frame :=  unitsquare
>  xscaled ( (xpart urcorner monImageB - xpart llcorner monImageB) + 
> 5mm )
>  yscaled ( (ypart urcorner monImageB - ypart llcorner monImageB) + 
> 5mm );
>  frame := frame shifted (center monImageB - center frame);
>  addto monImageB contour
>frame
>withpostscript "evenodd"
>withcolor transparent (1,1.,colorframe);
>  draw monImageB ;
>  draw monImageA ;
> \stopMPdrawing
> %
> \MPdrawingdonetrue
> \getMPdrawing}
> 
> %--
> 
> \def\whatever#1%
>  {\appendtoks#1\to\MPtoks
>   \setbox\MPbox=\hbox{\MyFont\the\MPtoks}%
>   %
>   \startMPdrawing
> n := n + 1 ; len[n] := \the\wd\MPbox ;
>   \stopMPdrawing
>   %
>   \mpdefineoutlines{M}{MaLettre}
>   %
>   \startMPdrawing
>   pictA := textext.drt("\MyFont M") ;
>   pictB := MaLettre[1];
>   scaling := bbheight pictA / bbheight pictB;
>   \stopMPdrawing
>   %
>   \doifinstringelse{~}{#1}{}{%HOW TO PROPERLY COPE WITH 
> SPACES ?
>   \mpdefineoutlines{#1}{MyGlyph}
>   %
>   \startMPdrawing
> string sb; sb := "i";
> pic[n] := textext.drt("\MyFont\setstrut\strut#1") ;
> %
> shiftB := - llcorner pic[n];
> pic[n] := pic[n] shifted shiftB ;
> %
> wid[n] := abs(xpart urcorner pic[n] - xpart llcorner pic[n]) ;
> pos[n] := len[n]-wid[n] ;
> %
> addto monImageB contour
>   ((MyGlyph[1] scaled scaling)
>   shifted ( (pos[n],0) +  shiftB))
>   withpostscript "collect";
> %
> if MyGlyphn > 1 :
>for ind=2 upto MyGlyphn :
>if (((xpart llcorner MyGlyph[ind]) > (xpart llcorner MyGlyph[1])) 
> and
>((ypart llcorner MyGlyph[ind]) > (ypart llcorner MyGlyph[1])) 
> and
>((xpart urcorner MyGlyph[ind]) < (xpart urcorner MyGlyph[1])) 
> and
>((ypart urcorner MyGlyph[ind]) < (ypart 

Re: [NTG-context] Problem with \Caps

2020-12-21 Thread Otared Kavian
Hi Joaquín,

Actually it depends on the font you are using, but on th eother hand it seems 
that \Caps is broken in LMTX.
The following gives a correct result in mkiv but results in an error in LMTX:

\setupbodyfont[lucidaot] 

\starttext

Test {\sc Test} {\Caps Test}

{\smallcaps Test}

\meaning\Caps

\stoptext

Best regards: Otared

> On 20 Dec 2020, at 18:59, Joaquín Ataz López  wrote:
> 
> 
> Good day to everyone. I have a problem that may be very simple to solve, but 
> for which I have not found an answer in the wiki.
> 
> Until relatively recently I was using the January 2020 version of ConTeXt 
> Standalone, recently I have updated it to the December 18th version, and when 
> I compile a file that I used to compile well, an error is generated because 
> the \Caps macro is not recognized.
> 
> I can't get the desired effect with \sc, it has to be with \Caps.
> 
> I have tried to compile it with LMTX but there too is considered that \Caps 
> is an undefined control sequence.
> 
> 
> -- 
> Joaquín Ataz López
> Derecho Civil
> Universidad de Murcia
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Title in enumeration not working?

2020-12-21 Thread Otared Kavian
Hi Mikael,

Indeed you are right about the fact that 

> \startexample[title={Title}]
> ...
> \stopexample

is more logical and also more convenient. 
Sorry for not having checked your example in mkiv, where this structure works 
as intended.
So it might be a small buglet in LMTX.

Best regards: Otared

> On 21 Dec 2020, at 14:06, Mikael Sundqvist  wrote:
> 
> Hi Otared,
> 
> Thank you for your suggestion. I would say yes and no.
> 
> I want the result one gets from what you write, but I prefer the syntax
> 
> \startexample[title={Title}]
> ...
> \stopexample
> 
> and that has been working before. Reading in setup-en.pdf, it also looks to 
> me as if that should work.
> 
> Best,
> 
> Mikael
> 
> On Mon, Dec 21, 2020 at 11:47 AM Otared Kavian  <mailto:ota...@gmail.com>> wrote:
> Hi Mickael,
> 
> Maybe this is what you want:
> 
> \defineenumeration[example]
> [text=Example,
> title=yes,
> titleleft=,
> titleright={.},
> ]
> 
> \starttext
> \startexample{Title} 
> This is a test.
> \stopexample
> \stoptext
> 
> Of course is you say
> text=,
> then you get only « Title » and a number in front of it.
> 
> Best regards: OK
> 
> > On 21 Dec 2020, at 11:05, Mikael Sundqvist  > <mailto:mic...@gmail.com>> wrote:
> > 
> > Hi,
> > 
> > Has anything changed with titles and enumerations? I expected a title 
> > "Title" with the following setup.
> > 
> > \defineenumeration[example][
> >   text=Example,
> >   title=yes,
> > ]
> > 
> > \starttext
> > \startexample[title={Title}]
> > This is a test.
> > \stopexample
> > \stoptext
> > 
> > But it does not show up.
> > 
> > /Mikael
> > 
> > 
> > ___
> > If your question is of interest to others as well, please add an entry to 
> > the Wiki!
> > 
> > maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
> > http://www.ntg.nl/mailman/listinfo/ntg-context 
> > <http://www.ntg.nl/mailman/listinfo/ntg-context>
> > webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
> > http://context.aanhet.net <http://context.aanhet.net/>
> > archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> > <https://bitbucket.org/phg/context-mirror/commits/>
> > wiki : http://contextgarden.net <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 <mailto:ntg-context@ntg.nl> / 
> http://www.ntg.nl/mailman/listinfo/ntg-context 
> <http://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
> http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> <https://bitbucket.org/phg/context-mirror/commits/>
> wiki : http://contextgarden.net <http://contextgarden.net/>
> ___
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Title in enumeration not working?

2020-12-21 Thread Otared Kavian
Hi Mickael,

Maybe this is what you want:

\defineenumeration[example]
[text=Example,
title=yes,
titleleft=,
titleright={.},
]

\starttext
\startexample{Title} 
This is a test.
\stopexample
\stoptext

Of course is you say
text=,
then you get only « Title » and a number in front of it.

Best regards: OK

> On 21 Dec 2020, at 11:05, Mikael Sundqvist  wrote:
> 
> Hi,
> 
> Has anything changed with titles and enumerations? I expected a title "Title" 
> with the following setup.
> 
> \defineenumeration[example][
>   text=Example,
>   title=yes,
> ]
> 
> \starttext
> \startexample[title={Title}]
> This is a test.
> \stopexample
> \stoptext
> 
> But it does not show up.
> 
> /Mikael
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] upload / metafun

2020-12-15 Thread Otared Kavian
Hi Hans,

Thanks for the new upload. 
With your comments, I understand that, following the discussion with Aditya, 
when using the new version I should not define in Metafun a new function named
dotlabel
in order to have a square dot… Actually I called it mydotlabel in order to be 
able to change the shape of the dot, so I will be on the safe side when I can 
download the new version.

However after running install. sh on MacOS, I still get current version: 
2020.12.10 22:26, even after removing the .tma files.
So I guess I have to wait a little bit for the new version to be upoaded.

Best regards: Otared



> On 15 Dec 2020, at 10:35, Hans Hagen  wrote:
> 
> Hi,
> 
> I uploaded a new lmtx. This time some work has been done at the metafun end.
> 
> At the tex end we're working on some overload protection mechanism which 
> involves tagging many macro so that will take a while (most tagging is done 
> but checking left over cases take time).
> 
> So, I wondered if we can do something similar in metapost: flag macros and 
> variables in order to issue a warnings when a dangerous overload happens.
> 
> The current lmtx has this as an experiment: primitives, permanent, immutable 
> and mutable (so far); you can look at the *.mpxl files to get an idea. If you 
> say for instance
> 
>path fullcircle;
> 
> there will be a warning
> 
>   metapost> overloading immutable 'fullcircle'
> 
> or when
> 
>   \enabledirectives[metapost.overloadmode=error]
> 
> has been given you get an error.
> 
> The implementation is rather simple and non intrusive and differs from
> the one in tex. There it is tightly integrated for all kind of reasons 
> (millions of macro definitions per run so efficiency matters). Also, in 
> metapost variables (tags) can have complex name constructions and we only 
> test the top level. When a overload happens (overloadmode internal <> 0) a 
> lua callback takes care of it.
> 
> A side effect is that we can query all hash entries and check for consistency 
> which is what i've done and am doing now. Of course that can introduce issues 
> ... just that you know.
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] issue with link and margin in LMTX

2020-12-12 Thread Otared Kavian
Hi Pablo, 

I don't know which kind of problems you are having with your example, but it 
seems to me that I get the same result with mkiv and LMTX.

Best regards: Otared

> On 11 Dec 2020, at 19:00, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> I have the following sample:
> 
>  \setuppapersize[A9]
>  \setupinteraction[state=start]
>  \enabledirectives[references.border]
>  \unexpanded\def\MyURL#1%
>{\bgroup\goto{{\tt\hyphenatedurl{#1}}}[url(#1)]\egroup}
>  \starttext
>  \startitemize
>  \dorecurse{2}{\item \MyURL{a.b\\/c.d\letterhash e}}
>  \stopitemize
>  \stoptext
> 
> I’m afraid that the link has problems with margin in MkXL (MkIV doesn’t
> have any problems with it).
> 
> Could anyone confirm the issue?
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Otared Kavian
Hi Aditya,
Thank you very much !
That's great indeed, you gave me an elegant solution.
 
One more question, in order for me to understand a little more: when defining a 
new dotlabel as you do, might it not conflict with the internal definitions of 
dotlabel in Metafun in some other place?
Maybe it is safer for me to call it something like  « dotshapelabel » ?

Best regards and agin many thanks: Otared

> On 10 Dec 2020, at 18:44, Aditya Mahajan  wrote:
> 
> On Thu, 10 Dec 2020, Otared Kavian wrote:
> 
>> Hi all,
>> 
>> In Metafun when representing a point I woul dlike to have some dots 
>> represented by a square (or even by another scalable symbol): for instance 
>> in the following I would like the dot at the point B to be a square:
>> 
>> \starttext
>> \startMPcode
>> draw (2cm,3cm) -- (3cm,5cm) ;
>> dotlabel(textext("\switchtobodyfont[8pt]" & "A"), (2cm,3cm)) 
>>  withpen pencircle scaled 12pt 
>>  withcolor transparent("exclusion",.5,red) ;
>> 
>> dotlabel(textext("\switchtobodyfont[8pt]" & "B"), (3cm,5cm)) 
>>  withpen pencircle scaled 12pt 
>>  withcolor transparent("exclusion",.5,red) ;
>> \stopMPcode
>> \stoptext
>> 
>> I wonder whether it is possible to define something like « drawsquaredot » 
>> or « squaredotlabel » in order to do this.
> 
> dotlabel uses a pen to draw the dot, and I am not sure why it uses that 
> rather than a path. Here is a (to me) simpler definition, where you can 
> change the shape:
> 
> \startMPdefinitions
> newpath dotlabelshape;
> 
> dotlabelshape := fullcircle;
> 
> vardef dotlabel@#(expr s,z) text t_ =
>label@#(s,z) t_ ;
>fill (dotlabelshape scaled 2dotlabeldiam) shifted z t_;
> enddef ;
> \stopMPdefinitions
> 
> \starttext
> \startMPcode
> newpath p ; 
> p := (2cm, 3cm) -- (3cm, 5cm);
> dotlabeldiam := 12pt;
> 
> % Default
> draw p;
> dotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p) 
>withcolor transparent("exclusion",.5,red) ;
> 
> dotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p) 
>withcolor transparent("exclusion",.5,red) ;
> 
> % Using a square "dot"
> p := p shifted (5cm, 0);
> dotlabelshape := fullsquare;
> 
> draw p;
> dotlabel(textext("\switchtobodyfont[8pt]" & "A"), point 0 of p) 
>withcolor transparent("exclusion",.5,red) ;
> 
> dotlabel(textext("\switchtobodyfont[8pt]" & "B"), point 1 of p) 
>withcolor transparent("exclusion",.5,red) ;
> \stopMPcode
> \stoptext
> 
> These types of macros are also a good candidate for the new LMTX syntax, 
> where we can make all components configurable via a key-value interface 
> (labeldistance etc. as well).
> 
> Aditya
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Otared Kavian
Hi all,

In Metafun when representing a point I woul dlike to have some dots represented 
by a square (or even by another scalable symbol): for instance in the following 
I would like the dot at the point B to be a square:

\starttext
\startMPcode
draw (2cm,3cm) -- (3cm,5cm) ;
dotlabel(textext("\switchtobodyfont[8pt]" & "A"), (2cm,3cm)) 
withpen pencircle scaled 12pt 
withcolor transparent("exclusion",.5,red) ;

dotlabel(textext("\switchtobodyfont[8pt]" & "B"), (3cm,5cm)) 
withpen pencircle scaled 12pt 
withcolor transparent("exclusion",.5,red) ;
\stopMPcode
\stoptext

I wonder whether it is possible to define something like « drawsquaredot » or « 
squaredotlabel » in order to do this.
If I use for B the command
withpen pensquare scaled 12pt
then the dot is a square, but the label B is drawn in a strange way.

Thanks for any help: Otared
___
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] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Thanks Aditya!
One can learn a lot with your answers !
In the Metafun manual I see enlonged but I did not know to use it.

Best regards: Otared

> On 9 Dec 2020, at 21:38, Aditya Mahajan  wrote:
> 
> On Wed, 9 Dec 2020, Otared Kavian wrote:
> 
>> Hi Aditya,
>> 
>> Thanks for the alternative method, which comes handy if one wishes to extend 
>> the straight line by a different amount at either end:
>> 
>> \starttext
>> \startMPcode
>>   z1 = (1cm,3cm) ;
>>   z2 = (5cm, 9cm) ;
>>   z3 = 1cm * dir(angle (z2 - z1)) shifted z2 ;
>>   z4 = -.5cm*dir(angle(z2 - z1)) shifted z1 ;
>>   draw z1 -- z3 ; 
>>   draw z4 -- z1 ;
>>   draw z1 -- z2 withcolor red ;
>> \stopMPcode
>> \stoptext
> 
> Or just redefine shortened to accept a pair! 
> 
> \startMPdefinitions
> primarydef p shortened d =
>reverse ( ( reverse (p enlonged -xpart paired(d)) ) enlonged -ypart 
> paired(d) )
> enddef ;
> \stopMPdefinitions
> 
> 
> 
> \starttext
> \startMPpage
> z1 = (1cm,3cm) ;
> z2 = (5cm, 9cm) ;
> draw (z1--z2) shortened (-1cm,-2cm)  withcolor blue ;
> draw (z1--z2) withcolor red ;
> 
> \stopMPpage
> \stoptext
> 
> Now that if you really want to shorten a path, then cutends works better than 
> shortened
> 
> \startMPdefinitions
> primarydef p shortened d =
>reverse ( ( reverse (p enlonged -xpart paired(d)) ) enlonged -ypart 
> paired(d) )
> enddef ;
> \stopMPdefinitions
> 
> 
> \starttext
> \startMPpage
> z1 = (1cm,3cm) ;
> z2 = (5cm, 9cm) ;
> path p, q;
> p := z1 {up} .. {right} z2;
> q := p shifted (6cm, 0);
> 
> draw p withcolor red ;
> draw p shortened (1cm,2cm)  withcolor blue ;
> 
> draw q withcolor green ;
> draw q cutends (1cm,2cm)  withcolor blue ;
> 
> \stopMPpage
> \stoptext
> 
> Aditya
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Hi Aditya,

Thanks for the alternative method, which comes handy if one wishes to extend 
the straight line by a different amount at either end:

\starttext
\startMPcode
   z1 = (1cm,3cm) ;
   z2 = (5cm, 9cm) ;
   z3 = 1cm * dir(angle (z2 - z1)) shifted z2 ;
   z4 = -.5cm*dir(angle(z2 - z1)) shifted z1 ;
   draw z1 -- z3 ; 
   draw z4 -- z1 ;
   draw z1 -- z2 withcolor red ;
\stopMPcode
\stoptext

Best regards: Otared

> On 9 Dec 2020, at 18:37, Aditya Mahajan  wrote:
> 
> On Wed, 9 Dec 2020, Otared Kavian wrote:
> 
>> Thanks a lot ! Indeed that does the job, which shows how wonderful Metafun 
>> is !
> 
> Or, if you want to use high school algebra:
> 
> \starttext
> \startMPcode
>z1 = (1cm,3cm) ;
>z2 = (5cm, 9cm) ;
>z3 = 1cm * dir(angle (z2 - z1)) shifted z2;
>draw z1 -- z3 ; 
>draw z1 -- z2 withcolor red;
> \stopMPcode
> \stoptext
> 
> Aditya
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Hi Fabrice,

Thanks a lot ! Indeed that does the job, which shows how wonderful Metafun is !

Best regards: Otared

> On 9 Dec 2020, at 17:19, Fabrice L  wrote:
> 
> Hi,
> 
>> Le 9 déc. 2020 à 10:57, Otared Kavian  a écrit :
>> 
>> Hi,
>> 
>> I have a silly question: given two points in the plane
>>  z1 = (1cm,3cm) ;
>>  z2 = (5cm, 9cm) ;
>> the command
>>  draw z1 -- z2 withpen pencircle scaled .5pt ;
>> draws the line segment joining z1 and z2. How could I draw the line segment 
>> which goes a little further (say 1cm) than both the end points of this 
>> segment (that is in this example, a point before z1 and a point after z2 on 
>> the straight line) .
>> Indeed it is possible to write the equation of the line and then compute by 
>> hand the coordinates of the new end points, but I think there is a simpler 
>> way in Metafun to do this.
> 
> The shortened operation is the solution ! See MetaFun manual section 1.18
> 
> \starttext
> \startMPpage
> z1 = (1cm,3cm) ;
> z2 = (5cm, 9cm) ;
> draw (z1--z2) shortened -1cm  withcolor blue ;
> draw (z1--z2) withcolor red ;
> 
> \stopMPpage
> \stoptext
>   
> Fabrice.
> 
>> 
>> Thanks for any help: Otared
>> 
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Hi,

I have a silly question: given two points in the plane
z1 = (1cm,3cm) ;
z2 = (5cm, 9cm) ;
the command
draw z1 -- z2 withpen pencircle scaled .5pt ;
draws the line segment joining z1 and z2. How could I draw the line segment 
which goes a little further (say 1cm) than both the end points of this segment 
(that is in this example, a point before z1 and a point after z2 on the 
straight line) .
Indeed it is possible to write the equation of the line and then compute by 
hand the coordinates of the new end points, but I think there is a simpler way 
in Metafun to do this.

Thanks for any help: Otared


___
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] basic issues with formulas

2020-12-03 Thread Otared Kavian
Hi Pablo,

You may use \text in math formulas as in:

 \startitemize[packed]
 \item Valor actual neto: $\text{beneficios} - \text{costes}$.
 \item Beneficio por euro: $\frac{\text{beneficios}}{\text{costes}}$.
 \item Beneficio obtenido el primer año.
 \stopitemize

Best regards: Otared

> On 3 Dec 2020, at 20:48, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> math is all Greek to me and I’m experiencing issues when typesetting the
> most basic inline formulas.
> 
>  \starttext
>  \startitemize[packed]
>  \item Valor actual neto: $beneficios - costes$.
>  \item Beneficio por euro: $\frac{beneficios}{costes}$.
>  \item Beneficio obtenido el primer año.
>  \stopitemize
> 
>  \startitemize[packed]
>  \item Valor actual neto: $beneficios - costes$.
>  \item Beneficio por euro: $beneficios - costes$.
>  \item Beneficio obtenido el primer año.
>  \stopitemize
> 
>  \startitemize[packed, columns, two]
>  \item Valor actual neto: $beneficios - costes$.
>  \item Beneficio por euro: $\frac{beneficios}{costes}$.
>  \item Beneficio obtenido el primer año.
>  \stopitemize
> 
>  \startitemize[packed, columns, two]
>  \item Valor actual neto: $beneficios - costes$.
>  \item Beneficio por euro: $beneficios - costes$.
>  \item Beneficio obtenido el primer año.
>  \stopitemize
>  \stoptext
> 
> The issues I’m experiencing are:
> 
> 1. Kernings around ligatures (fi) are wrong.
> 
> 2. Is there a way to enable ligatures?
> 
> 3. Packed works fine with fractions, but packed columns is wrong with
> them. It adds too much space.
> 
> Again, formulas are totally foreign to my work with ConTeXt.
> 
> I don’t know whether they are bugs in latest (2020.01.30 14:13) or there
> is a way to avoid the issues.
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Getting the filename which is being typeset

2020-12-01 Thread Otared Kavian
Hi Wolfgang,

Thank you for your explanations: I am wondering whether this kind of 
information could go into the wiki, and if yes what would be an appropriate 
title for that page (of course I'll do it).

However the two commands 

\inputfilesuffix
\jobfilesuffix

put inside the file « myfile.tex » do not give the suffix « tex »: shoul dthey 
give « tex » or am I misintrepreting these commands?

Best regards: Otared



> On 1 Dec 2020, at 18:23, Wolfgang Schuster 
>  wrote:
> 
> Otared Kavian schrieb am 01.12.2020 um 18:10:
>> Thanks Hraban, this might be also useful and I'll keep it somewhere on my 
>> mind, but for the project I was asking my question \jobname is enough.
>> 
>> Best regards: Otared
>>> On 1 Dec 2020, at 17:33, Henning Hraban Ramm  wrote:
>>>> Am 01.12.2020 um 16:20 schrieb Otared Kavian :
>>>> 
>>>> Thanks Tomás! Indeed \jobname does the job :-)
>>> In case you need the current component file in a project environment: 
>>> \currentcomponent
> 
> In some case \inputfilename is the better choice, e.g. when you process xml 
> files with a environment file for the style and processing settings.
> 
> context --environment=myxmlstyle myfile.xml
> 
> The following example shows the output of all commands:
> 
> \starttext
> \starttabulate [|T|T|]
> \NC \type{\jobname}   \NC \jobname   \NC\NR
> \NC \type{\jobfilename}   \NC \jobfilename   \NC\NR
> \NC \type{\jobfilesuffix} \NC \jobfilesuffix \NC\NR
> \NC \type{\inputfilename} \NC \inputfilename \NC\NR
> \NC \type{\inputfilebarename} \NC \inputfilebarename \NC\NR
> \NC \type{\inputfilesuffix}   \NC \inputfilesuffix   \NC\NR
> \NC \type{\outputfilename}\NC \outputfilename\NC\NR
> \NC \type{\operatingsystem}   \NC \operatingsystem   \NC\NR
> \stoptabulate
> \stoptext
> 
> Wolfgang
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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] Context install for Apple Silicon M1 mac mini

2020-12-01 Thread Otared Kavian
Hi Keith,

You may try to copy to your new machine the whole folder where you have 
installed LMTX on your old machine, and then run 
context --make
there. Indeed if this works for your current LMTX folder you'll need someone to 
prepare a whole working folder of updated LMTX. As long as I have a PowerBook 
with the old chip (and running MacOS 14), I may do this for you and then put a 
zip file on Dropbox. However I may be too pushed to get a new M1 PowerBook in 
the future.

Best regards: Otared K.

> On 1 Dec 2020, at 13:01, Keith McKay  wrote:
> 
> Hi,
> 
> I have recently retired my 2012 mac mini in favour of a new Apple silicon M1 
> mac mini on which I would like to install ConTeXt. I know that their are no 
> ARM binaries yet for ConTeXt but Apple say that intel binaries can be run on 
> an ARM using the Rosetta emmulation software. I tried to download the intel 
> binaries using the install.sh that comes with the context-osx-64.zip file but 
> of course it does not recognise the ARM chip and suggests contacting the 
> mailing list. In some previous emails to the list, in which I was a 
> participent, (see the post "new upload" of 26/11/2020) their was some 
> discussion on how Context could be set up to work on these machines by 
> building binaries using Xcode. I am afraid this is well above my skillset so 
> I was wondering how I could get the Intel binaries and then set up ConTeXt 
> running with the Rosetta emulation software. I should be able to do that. If 
> this is possible, I would be very happy to do some testing and report back my 
> experiences to the list.
> 
> Best Wishes
> 
> Keith McKay
> 
> Scotland, UK
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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 the filename which is being typeset

2020-12-01 Thread Otared Kavian
Thanks Hraban, this might be also useful and I'll keep it somewhere on my mind, 
but for the project I was asking my question \jobname is enough.

Best regards: Otared

> On 1 Dec 2020, at 17:33, Henning Hraban Ramm  wrote:
> 
> 
> 
>> Am 01.12.2020 um 16:20 schrieb Otared Kavian :
>> 
>> Thanks Tomás! Indeed \jobname does the job :-)
> 
> In case you need the current component file in a project environment: 
> \currentcomponent
> 
> Hraban
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Getting the filename which is being typeset

2020-12-01 Thread Otared Kavian
Thanks Tomás! Indeed \jobname does the job :-)

Best regards: Otared

> On 1 Dec 2020, at 15:25, Tomas Hala  wrote:
> 
> Hi Otared,
> 
> try \jobname.
> 
> Best wishes,
> 
> Tomáš 
> 
> 
> Tue, Dec 01, 2020 ve 02:45:18PM +0100 Otared Kavian napsal(a):
> # Hi everyone,
> # 
> # I have to typeset a few files which get each an input file named in a 
> certain way. For instance, a file named « myfile.tex » in which another file 
> named « myfile-buffer.tex » is used as an \input file, as in
> # 
> # % content of myfile.tex
> # %
> # \starttext
> # This is a test.
> # 
> # \input myfile-buffer.tex
> # \stoptext
> # %
> # 
> #  When typesetting « myfile.tex » I wonder whether it is possible to get the 
> name of the file without its suffix, that is to get « myfile », with a 
> command such as
> # \getNameOfCurrentFile
> # and then be able to replace the above snippet by:
> # 
> # % desired content of myfile.tex
> #  %
> # \starttext
> # This is a test.
> # 
> # \input \getNameOfCurrentFile-buffer.tex
> # \stoptext
> # %
> # 
> # Best regards and thanks for any hint: Otared K.
> # 
> ___
> # If your question is of interest to others as well, please add an entry to 
> the Wiki!
> # 
> # maillist : ntg-context@ntg.nl / 
> http://www.ntg.nl/mailman/listinfo/ntg-context
> # webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> # archive  : https://bitbucket.org/phg/context-mirror/commits/
> # wiki : http://contextgarden.net
> # 
> ___
> 
> Tomáš Hála
> 
> Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
> Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
> 
> http://akela.mendelu.cz/~thala
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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] Getting the filename which is being typeset

2020-12-01 Thread Otared Kavian
Hi everyone,

I have to typeset a few files which get each an input file named in a certain 
way. For instance, a file named « myfile.tex » in which another file named « 
myfile-buffer.tex » is used as an \input file, as in

% content of myfile.tex
%
\starttext
This is a test.

\input myfile-buffer.tex
\stoptext
%

 When typesetting « myfile.tex » I wonder whether it is possible to get the 
name of the file without its suffix, that is to get « myfile », with a command 
such as
\getNameOfCurrentFile
and then be able to replace the above snippet by:

% desired content of myfile.tex
 %
\starttext
This is a test.

\input \getNameOfCurrentFile-buffer.tex
\stoptext
%

Best regards and thanks for any hint: Otared K.
___
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] mathmatrix and internal lines

2020-11-29 Thread Otared Kavian
Great! Well done. 
I'll ask Taco about LMTX on the wiki.

Best regards: Otared

> On 29 Nov 2020, at 19:59, Jean-Philippe Rey 
>  wrote:
> 
> I added some details and examples to the wiki, however, as you said, they are 
> not typeset correctly.
> 
>> Le 29 nov. 2020 à 08:48, Otared Kavian > <mailto:ota...@gmail.com>> a écrit :
>> 
>>> On 26 Nov 2020, at 23:23, Hans Hagen >> <mailto:j.ha...@xs4all.nl>> wrote:
>>> […]
>>> A bit more code needed but the next upload will have it. Of course you have 
>>> to wikify it.
>>> 
>>> Hans
>> 
>> Hi,
>> I created a page on the wiki:
>>  https://wiki.contextgarden.net/Matrix_in_maths 
>> <https://wiki.contextgarden.net/Matrix_in_maths>
>> However the LMTX code is not typeset on the wiki. I'll see with taco whether 
>> it is possible to have lmtx mode on the wiki.
>> 
>> Best regards: Otared K.
> 
> -- 
> Jean-Philippe Rey
> jean-philippe@centralesupelec.fr 
> <mailto:jean-philippe@centralesupelec.fr>
> 91192 Gif-sur-Yvette Cedex - France
> Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] mathmatrix and internal lines

2020-11-28 Thread Otared Kavian
> On 26 Nov 2020, at 23:23, Hans Hagen  wrote:
> […]
> A bit more code needed but the next upload will have it. Of course you have 
> to wikify it.
> 
> Hans

Hi,
I created a page on the wiki:
https://wiki.contextgarden.net/Matrix_in_maths 

However the LMTX code is not typeset on the wiki. I'll see with taco whether it 
is possible to have lmtx mode on the wiki.

Best regards: Otared K.___
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] mathmatrix and internal lines

2020-11-27 Thread Otared Kavian
Hi Hans,

Thanks for your insight!
Indeed I'll wikify what you explained, once I have tested it with the next 
upload. Would  \HL and \VL be also available in mkiv ?

Best regards: Otared

> On 26 Nov 2020, at 23:23, Hans Hagen  wrote:
> 
> On 11/26/2020 8:43 PM, Otared Kavian wrote:
>> Hi Jean-Philippe,
>> A few weeks ago I saw briefly the discussion about Hans' message regarding 
>> \noalign and the the new definitions of \HR and \VR that you are sending. 
>> Indeed your solution works great !
>> Just for the case other people may have the same question about writing 
>> block matrix, I copy below the whole example which can be found later in the 
>> mail archive.
>> (For mkiv, I don't know how to do the same thing…).
> 
> The \noaligned permits a \protected definition. Otherwise one has to do 
> something
> 
> \def\VR{\noalign\bgroup
>   
> that command then does the rule and ends the noalign. Also, that one cannot 
> be \protected (a pitty in case one uses \expanded or so)
> 
> So ... a multistep approach. Plenty of that in mkiv.
> 
>> %%% begin block-matrix.tex
>> % in LMTX defining \HR and \VR to create block matrices:
>> \pushoverloadmode
>> \noaligned\tolerant\protected\def\HR[#1]{\noalign{\hrule #1}}
>> \popoverloadmode
>> \def\VR{\dosingleempty\doVR}
>> \def\doVR[#1]{\NC \hskip-0.5em \vrule #1 \hskip-0.5em \NC}
> 
> given the \HR definition that should be
> 
> \tolerant\protected\def\VR[#1]{\NC ...\NC}
> 
>> \definemathmatrix[mymatrix]
>>  [left={\left(\,},
>>  right={\, \right)}]
>> \starttext   
>> \startformula
>>  \startmymatrix
>>  \NC A \VR  B \NR
>>  \HR
>>  \NC C \VR  D \NR
>>  \stopmymatrix
>> \stopformula
>> \stoptext
> 
> Anyway, a feature like this should be in sync with other table mechanisms, so
> 
> \definemathmatrix
>  [mymatrix]
>  [left={\left\lparent\thinspace},
>   right={\thinspace\right\rparent}]
> 
> \starttext
> 
> \startformula
>   \startmymatrix
>   \NC A \VL  B \NR
>   \HL
>   \NC C \VL  D \NR
>   \stopmymatrix
> \stopformula
> 
> \startformula
>   \startmymatrix
>   \NC A \VL[3,green]  B \NR
>   \HL[10,red]
>   \NC C \VL  D \NR
>   \stopmymatrix
> \stopformula
> 
> \stoptext
> 
> A bit more code needed but the next upload will have it. Of course you have 
> to wikify it.
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] mathmatrix and internal lines

2020-11-26 Thread Otared Kavian
Hi Jean-Philippe,

A few weeks ago I saw briefly the discussion about Hans' message regarding 
\noalign and the the new definitions of \HR and \VR that you are sending. 
Indeed your solution works great !
Just for the case other people may have the same question about writing block 
matrix, I copy below the whole example which can be found later in the mail 
archive.
(For mkiv, I don't know how to do the same thing…).

%%% begin block-matrix.tex
% in LMTX defining \HR and \VR to create block matrices:
\pushoverloadmode
\noaligned\tolerant\protected\def\HR[#1]{\noalign{\hrule #1}}
\popoverloadmode

\def\VR{\dosingleempty\doVR}
\def\doVR[#1]{\NC \hskip-0.5em \vrule #1 \hskip-0.5em \NC}

\definemathmatrix[mymatrix]
[left={\left(\,},
right={\, \right)}]

\starttext  

\startformula
\startmymatrix
\NC A \VR  B \NR
\HR
\NC C \VR  D \NR
\stopmymatrix
\stopformula

\stoptext
%%% end block-matrix.tex

Best regards: Otared K.

> On 26 Nov 2020, at 19:46, Jean-Philippe Rey 
>  wrote:
> 
> Hi Otared,
> 
> Thank you very much.
> 
> I used your example to write the following macros. They are far from perfect 
> but suit my needs.  A few days ago, Hans warned not to use \noalign in LMTX, 
> so I used the trick he gave to the list even if I don't really understand it.
> 
> === LMTX version 
> %D \macros{HR, VR}
> %D \type{\HR} draws a horizontal rule between two rows of a matrix
> %D \type{\VR} is used in place of \type{\NC} to draw a vertical rule between 
> two columns of a matrix
> %D each macro takes an optional parameter giving the rule dimensions
> %D Example
> %D  \type{\startmatrix \NC A \VR[depth 2mm] B \NR \HR[height 0.6pt] \NC C \VR 
> D \NR \stopmatrix}
>  
> \pushoverloadmode
> \noaligned\tolerant\protected\def\HR[#1]{\noalign{\hrule #1}}
> \popoverloadmode
> 
> \def\VR{\dosingleempty\doVR}
> \def\doVR[#1]{\NC \hskip-0.5em \vrule #1 \hskip-0.5em \NC}
> ===
> 
> === MkIV version 
> %D \macros{HR, VR}
> %D \type{\HR} draws a horizontal rule between two rows of a matrix
> %D \type{\VR} is used in place of \type{\NC} to draw a vertical rule between 
> two columns of a matrix
> %D it takes an optional parameter giving the rule dimensions
> %D Example
> %D  \type{\startmatrix \NC A \VR[depth 2mm] B \NR \HR \NC C \VR D \NR 
> \stopmatrix}
>  
> \def\HR{\noalign{\hrule}}
> 
> \def\VR{\dosingleempty\doVR}
> \def\doVR[#1]{\NC \hskip-0.5em \vrule #1 \hskip-0.5em \NC}
> ===
> 
> For the MkIV version I haven't been able to add an optional parameter to \HR 
> the code
> 
> \def\HR{\dosingleempty\doHR}
> \def\doHR[#1]{\noalign{\hrule #1}}
> 
> complains about "Misplaced \noalign"
> 
> Best regards,
> 
> 
> 
>> Le 26 nov. 2020 à 13:40, Otared Kavian  a écrit :
>> 
>> Hi Jean-Philippe,
>> 
>> The following is better than the one I sent earlier:
>> 
>> \definemathmatrix[mymatrix]
>>  [left={\left(\,},
>>  right={\ \right)}]
>>  
>> \starttext
>> \startformula
>>  \startmymatrix
>>  \NC A \NC\hskip-.5em \vrule  \NC\hskip-.5em B \NR
>>  \noalign{\hrule}
>>  \NC C \NC \hskip-.5em\vrule \NC \hskip-.5em D \NR
>>  \stopmymatrix
>> \stopformula
>> \stoptext
>> 
>> Best regards: Otared K.
>> 
>>> On 26 Nov 2020, at 10:19, Jean-Philippe Rey 
>>>  wrote:
>>> 
>>> Dear list,
>>> 
>>> I would like to draw matrices with internal lines as can be done with LaTeX 
>>> (cf pdf output) :
>>> 
>>> 
>>> \documentclass{article}
>>> \begin{document}
>>> $M =\left( \begin{array}{c|c}
>>> A & B \\
>>> \hline
>>> C & D \\
>>> \end{array} \right)$
>>> \end{document}
>>> 
>>> 
>>> I didn't find out how to use mathmatrix to achieve this. My best result to 
>>> date is 
>>> 
>>> 
>>> \starttext
>>> $M = \left( \bTABLE[frame=off]
>>> \bTR
>>> \bTD[rightframe=on, bottomframe=on] $A$ \eTD
>>> \bTD[bottomframe=on] $B$ \eTD
>>> \eTR\bTR
>>> \bTD[rightframe=on] $C$ \eTD
>>> \bTD $D$ \eTD
>>> \eTR
>>> \eTABLE \right)$
>>> \stoptext
>>> 
>>> 
>>> The code is rather ugly, and I get a spurious space at the bottom of the 

Re: [NTG-context] mathmatrix and internal lines

2020-11-26 Thread Otared Kavian
Hi Jean-Philippe,

The following is better than the one I sent earlier:

\definemathmatrix[mymatrix]
[left={\left(\,},
right={\ \right)}]

\starttext
\startformula
\startmymatrix
\NC A \NC\hskip-.5em \vrule  \NC\hskip-.5em B \NR
\noalign{\hrule}
\NC C \NC \hskip-.5em\vrule \NC \hskip-.5em D \NR
\stopmymatrix
\stopformula
\stoptext

Best regards: Otared K.

> On 26 Nov 2020, at 10:19, Jean-Philippe Rey 
>  wrote:
> 
> Dear list,
> 
> I would like to draw matrices with internal lines as can be done with LaTeX 
> (cf pdf output) :
> 
> 
> \documentclass{article}
> \begin{document}
> $M =\left( \begin{array}{c|c}
> A & B \\
> \hline
> C & D \\
> \end{array} \right)$
> \end{document}
> 
> 
> I didn't find out how to use mathmatrix to achieve this. My best result to 
> date is 
> 
> 
> \starttext
> $M = \left( \bTABLE[frame=off]
> \bTR
>   \bTD[rightframe=on, bottomframe=on] $A$ \eTD
>   \bTD[bottomframe=on] $B$ \eTD
> \eTR\bTR
>   \bTD[rightframe=on] $C$ \eTD
>   \bTD $D$ \eTD
> \eTR
> \eTABLE \right)$
> \stoptext
> 
> 
> The code is rather ugly, and I get a spurious space at the bottom of the 
> table.
> 
> Any hints?
> 
> Thank you,
> 
> -- 
> Jean-Philippe Rey
> jean-philippe@centralesupelec.fr
> 91192 Gif-sur-Yvette Cedex - France
> Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] mathmatrix and internal lines

2020-11-26 Thread Otared Kavian
Hi Jean-Philippe,

For a simple case like the one you sent, a rather not optimal solution can be 
this:

\definemathmatrix[mymatrix]
[left={\left(\,},
right={\ \right)}]

\starttext
\startformula
\startmymatrix
\NC A \hskip .5em |\hskip-.5em  \NC B \NR
\noalign{\hrule}
\NC C \hskip .5em |\hskip-.5em \NC D \NR
\stopmymatrix
\stopformula
\stoptext

However I think I have seen sometime ago a more elegant solution, but I could 
not find it right now…

Best regards: Otared K.

> On 26 Nov 2020, at 10:19, Jean-Philippe Rey 
>  wrote:
> 
> Dear list,
> 
> I would like to draw matrices with internal lines as can be done with LaTeX 
> (cf pdf output) :
> 
> 
> \documentclass{article}
> \begin{document}
> $M =\left( \begin{array}{c|c}
> A & B \\
> \hline
> C & D \\
> \end{array} \right)$
> \end{document}
> 
> 
> I didn't find out how to use mathmatrix to achieve this. My best result to 
> date is 
> 
> 
> \starttext
> $M = \left( \bTABLE[frame=off]
> \bTR
>   \bTD[rightframe=on, bottomframe=on] $A$ \eTD
>   \bTD[bottomframe=on] $B$ \eTD
> \eTR\bTR
>   \bTD[rightframe=on] $C$ \eTD
>   \bTD $D$ \eTD
> \eTR
> \eTABLE \right)$
> \stoptext
> 
> 
> The code is rather ugly, and I get a spurious space at the bottom of the 
> table.
> 
> Any hints?
> 
> Thank you,
> 
> -- 
> Jean-Philippe Rey
> jean-philippe@centralesupelec.fr
> 91192 Gif-sur-Yvette Cedex - France
> Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] upload

2020-11-23 Thread Otared Kavian
Hi Hans,

On MacOS X I obtain the same error when doing:
context --make --all
(or mtxrun --make --all).
The error is

csname overload > fatal error, protection level 4, control sequence 
'textcontrolspace', properties 'immutable', file 'enco-ini.mkxl', line 315


Best regards: Otared

> On 23 Nov 2020, at 19:29, Christian Prim  wrote:
> 
> Hi
> 
> on linux I get:
> csname overload > fatal error, protection level 4, control sequence 
> 'textcontrolspace', properties 'immutable', file 'enco-ini.mkxl', line 315
> 
> wiped cache; run mtxrun --generate without problems; but context --make has 
> this error.
> 
> Do I miss something?
> 
> Thanks
> Christian
> 
> Am Mo., 23. Nov. 2020 um 18:56 Uhr schrieb Hans Hagen :
> Hi,
> 
> I uploaded a next iteration of lmtx. From now on there are dedicated sub 
> directories for mklx and mpxl, which is an indication that we're on the 
> way to a full code split.
> 
> Hans
> 
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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] \noindentation not working

2020-11-20 Thread Otared Kavian
Hi Pablo,

I can confirm that with LMTX version 2020.11.19 11:28, the behaviour is as the 
one you report (the behaviour is correct with mkiv version 2020.06.25 10:55).

Best regards: Otared

> On 20 Nov 2020, at 17:41, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> I have the following MWE:
> 
>  \showframe\showgrid
>  \setupindenting[yes, always, big]
>  \starttext
>  \noindentation
>  a
> 
>  a
>  \stoptext
> 
> Using LMTX (2020.11.19 11:28), I get indentation with \noindentation.
> 
> Could anyone confirm this?
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Piecewise margin line

2020-11-19 Thread Otared Kavian
Hi Johann,

Here is an example (extracted from one of my files…) which might give what you 
want: you can change some of the specifications easily.

% begin proclaim-leftbar.tex
%%%
\startuseMPgraphic{mpos:region:leftbar}
draw_multi_pars;
draw_multi_side;
\stopuseMPgraphic

\definetextbackground[leftbartext]
[location=paragraph,
mp=mpos:region:leftbar,
width=broad,
frame=off,
framecolor=darkred,
rulethickness=2pt,
frameoffset=1.25em,
topoffset=-2ex,
bottomoffset=-2ex,
background=color,
backgroundcolor=white,
]
%%%
\defineenumeration[proclaim]
[text=,
before={\starttextbackground[leftbartext]}, 
after={\stoptextbackground}, 
style=slanted,
title=yes,
titleleft=,
titleright={.},
alternative=hanging,
width=fit,
right={~},
way=bysection,
prefix=yes,
prefixsegments={chapter:section}]
%%%

\starttext

\startchapter[title={Topologie des nombres réels},reference=chap:R]

\startproclaim[lem:Q-Archimedien]{Proposition}
L'ensemble ${\Bbb Q}$ est {\bi archimédien}\index{archimédien}, c'est-à-dire 
que si $\epsilon \in {\Bbb Q}$ et $\epsilon > 0$, pour tout $R \in {\Bbb Q}$ 
tel que $R > 0$ il existe un entier $n \in {\Bbb N}$ tel que $n\epsilon > R$. 

Plus précisément il existe un unique entier $m \geq 0$ tel que $m\epsilon \leq 
R < (m+1)\epsilon$~: cet entier $m$ est appelé partie entière de $R/\epsilon$ 
et souvent noté $m = \lfloor R/\epsilon \rfloor$ (et l'entier $(m+1)$ est noté 
$m+1 = \lceil R/\epsilon \rceil$).
\stopproclaim

\stopchapter
\stoptext
%%%
% end proclaim-leftbar.tex

Best regards: Otared

> On 20 Nov 2020, at 02:06, Johann Birnick  wrote:
> 
> On Thu, 2020-11-19 at 11:25 +0100, mf wrote:
>> Il 19/11/20 10:39, Johann Birnick ha scritto:
>>> Hello,
>>> 
>>> I want to setup some fancy theorem style for my math notes. For this I want
>>> to
>>> have a colored margin line next to my theorems. It should look like this:
>>> 
>>> https://i.ibb.co/F6L59pD/idea.png
>>> 
>>> The line should stretch over the whole theorem, not just the first line.
>>> (But the latter would be a beginning, though.)
>>> 
>>> Important to note is that the line should be *on the margin*, not in the
>>> text.
>>> 
>>> So do you have an idea on how I could do that? I would greatly appreciate
>>> your
>>> answer. Thank you!
>>> 

>> Look for \startsidebar \stopsidebar and \setupsidebar.
>> 
>> \setupsidebar [...,...] [..,..=..,..]
>>1   2
>>   OPT
>> 1 NAME
>> 2 rulethickness  = DIMENSION
>>rulecolor  = COLOR
>>alternative= NUMBER
>>topoffset  = DIMENSION
>>bottomoffset   = DIMENSION
>>distance   = DIMENSION
>>leftmargindistance = DIMENSION
>>level  = NUMBER
>> 
>> Massi
> 
> Thank you! I have two more questions:
> 
> 1. Where can I find a documentation for this command? Even Google finds 
> nothing.
> 
> 2. Unfortunately, adding \startsidebar and \stopsidebar into the `before` and
> `after` options of my enumeration messes up whitespace at the end. Here is a
> screenshot:
> 
> https://s12.directupload.net/images/201120/lfmwp5lh.png
> 
> The theorem is a normal enumeration. Like this:
> 
> \defineenumeration[Theorem][before=\startsidebar, after=stopsidebar]
> 
> I would greatly appreciate your help.
> 
> Thank you!
> Johann
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] new upload

2020-11-19 Thread Otared Kavian
Hi Hans,

Thanks for the new upload and the fix for the install script: it works again 
also for MacOS.

Best regards: OK

> On 19 Nov 2020, at 11:35, Hans Hagen  wrote:
> 
> Hi,
> 
> A new upload. Hopefully with the linux install fixed.
> 
> Hans
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Fatal error 11

2020-11-14 Thread Otared Kavian
Hi Hans,

With the latest LMTX (current version: 2020.11.13 19:13), a project (which used 
to typeset correctly until last week) cannot be typeset anymore.
I did try to typeset smaller parts of my files but this did not help:  I keep 
getting

fatal error: return code: 11

and no PDF output. Somewhere in the log I have also

error in line 35, namespace 'mathfences', instance 'curly', key 'curly,'

where in my file \curly is defined as 

\definemathfence[curly][brace][command=yes,factor=auto]

However this command works fine with LMTX when I use it in a minimal example. 
How can I get a more clear error message so that I can localize what the new 
LMTX does not like ?

Of course I can stay with mkiv where my file can be typeset without problem, 
but it would be useful to have error messages which help really the user.

Best regards: Otared K.

___
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

2020-11-07 Thread Otared Kavian
Hi Pablo,

I had the same issue as the one you were reporting (on MacOS 10.14.6).
I removed the three files 

texmf-context.tma
texmf-osx-64.tma
texmf.tma

before issuing the command 
sh install.sh

Now I am getting 

fetching 'http://lmtx.pragma-ade.com/install-lmtx//texmf-context.zip

on my Terminal window and I think I will get the new version uploaded by Hans 
(my internet connection is very slow…).

Thank you for the hint…

Best regards: Otared

> On 7 Nov 2020, at 00:12, Pablo Rodriguez  wrote:
> 
> On 11/7/20 12:02 AM, mf wrote:
>> [...]
>> I can confirm that on my Debian 10 64bit: no update until I removed
>> 
>> texmf-context.tma
>> texmf-linux-64.tma
>> texmf.tma
>> 
>> in the tex subdir.
> 
> I had to remove these files to update from LMTX from 2020.10.20 to
> version from 2020.11.05.
> 
> But I had to remove these files again to upgrade from 2020.11.05 to
> 2020.11.06.
> 
> I wonder whether the same happens in Windows (I haven’t checked it yet).
> 
> Just in case it helps,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] cannot update LMTX

2020-11-04 Thread Otared Kavian
Hi Pablo,

For some unknown reason despite having tried to update lmtx several times, I 
still have version 2020.09.20 23:02.
Indeed I do a backup before any update in order to be able to go back to a 
working version…

What did you do in order to get version 2020.11.04 09:40 ?

Best regards: Otared

> On 4 Nov 2020, at 16:38, Pablo Rodriguez  wrote:
> 
> On 11/4/20 4:18 PM, Otared Kavian wrote:
>> Hi Pablo,
>> 
>> I get the same result as you. I think the reason is that Hans has not
>> yet issued a newer version (he said in a message a few days ago that
>> by mistake he might have uploaded a new version, but that we should
>> be careful not to update yet…).
> 
> Hi Otared,
> 
> current latest is from today (2020.11.04 09:40).
> 
> I read the message and this is why I checked a version newer than
> 2020.10.30 (in both Linux and Windows) before asking about the issue.
> 
> I perform a backup before updating ConTeXt, so experimental versions
> should be no problem for me.
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] cannot update LMTX

2020-11-04 Thread Otared Kavian
Hi Pablo,

I get the same result as you. I think the reason is that Hans has not yet 
issued a newer version (he said in a message a few days ago that by mistake he 
might have uploaded a new version, but that we should be careful not to update 
yet…).

Best regards: Otared

> On 4 Nov 2020, at 16:10, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> after latest from 2020.09.20, I afraid I get this error when running
> install.sh on Linux or install.bat on Windows (both 64bit):
> 
> mtx-install | updating tex/texmf, 1541 files
> mtx-install | updating tex/texmf-context, 3757 files
> mtx-install | changed  :   0 % :24110 :
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> trying again:
> mtx-install | changed  :   0 % :24110 :
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> trying again:
> mtx-install | changed  :   0 % :24110 :
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> trying again:
> mtx-install | changed  :   0 % :24110 :
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> trying again:
> mtx-install | changed  :   0 % :24110 :
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua
> mtx-install |
> tex/texmf-context/context/data/scite/context/lexers/data/scite-context-data-context.lua,
> try again later:
> 
> If you want to run ConTeXt everywhere, you need to adapt the path, like:
> 
> I don’t know what has changed to prevent the update.
> 
> Could anyone confirm this issue with current LMTX?
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] index entries postponed if sections are empty

2020-10-31 Thread Otared Kavian
Hi Hraban,

Maybe you can add some « virtual » text in the section with an invisible color 
such as
\startcolor[white] a \stopcolor
I don't know whether the following can solve your problem, but the entries of 
the index appear correctly:

\usemodule[visual]

\starttext

\dorecurse{5}{%
\startchapter[title={\recurselevel}]

\dorecurse{5}{%
\startsection[title={\fakewords{3}{5}}]
\startcolor[white] a \stopcolor
\index{Something}\index{A\recurselevel}

}

\stopchapter
}

\completeindex

\stoptext

Best regards: OK

> On 31 Oct 2020, at 17:56, Henning Hraban Ramm  wrote:
> 
> Hi,
> I‘m despairing about my index – some sections contain only an image 
> (\externalfigure), but I need to set several index entries for the image 
> contents.
> The index entries get postponed until after the next chapter.
> I guess the problem is that there’s no (text) content, but \par and \strut 
> didn’t help.
> 
> The MWE shows that index entries in empty sections are ignored, i.e. 
> “Something” is supposedly only on p.6:
> 
> 
> \usemodule[visual]
> 
> \starttext
> 
> \dorecurse{5}{%
> \startchapter[title={\recurselevel}]
> 
> \dorecurse{5}{%
> \startsection[title={\fakewords{3}{5}}]
> 
> \index{Something}\index{A\recurselevel}
> 
> }
> 
> \stopchapter
> }
> 
> \completeindex
> 
> \stoptext
> 
> 
> What can I do?
> 
> Hraban
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Is synctex broken in lmtx ?

2020-10-18 Thread Otared Kavian
Hi Hans,

It seems that 
\setupsynctex[state=start]
does not have any effect in LMTX version 2020.09.20 23:02, while it works fine 
with mkiv version 2020.06.25 10:55.

Best regards: Otared
___
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] Modules installation in a ConTeXt LMTX distribution

2020-10-18 Thread Otared Kavian
Hi Tommaso,

I met the same problem at the beginning of LMTX and I used a workaround: I 
copied manually the folder (in MacOS speaking, or directory) 

context-minimal/tex/texmf-modules

in my ConTeXt standalone mkiv directory, to the corresponding location in my 

/context-osx-64/tex/

Another possibility is to make a symlink in /context-osx-64/tex/ to the folder 
context-minimal/tex/texmf-modules

Best regards: Otared

> On 18 Oct 2020, at 19:25, Tommaso Gordini  wrote:
> 
> Hello everybody,
> 
> on my computers (a MacBook Pro with macOS 10.13.6 and a Mac mini with macOS 
> 10.15) I have installed a ConTeXt Standalone distribution and a ConTeXt LMTX 
> distribution.
> 
> However, while following the directions contained here
> 
> https://wiki.contextgarden.net/Modules#ConTeXt_LMTX
> 
> the procedure to install the modules in the LMTX is not successful.
> 
> Are the indications correct? Do any of you want to write them here?
> 
> Thank you very much!
> Tommaso
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \dorecurse{}{} problem

2020-09-21 Thread Otared Kavian

> On 21 Sep 2020, at 16:42, Aditya Mahajan  wrote:
> 
> On Mon, 21 Sep 2020, Wolfgang Schuster wrote:
> 
>> Aditya Mahajan schrieb am 21.09.2020 um 16:35:
>>> […]
> 
> You gave the same reply 11 years ago :-) which is also listed in the blog 
> post.

… Which shows that some things don't change in ConTeXt :-)

Kidding aside, why is there a difference between the tabulate mechanism and the 
xtable mechanism?

Best regards: Otared K.
___
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] Math fonts for Nimbus fonts

2020-09-21 Thread Otared Kavian


> On 21 Sep 2020, at 16:45, Wolfgang Schuster 
>  wrote:
> 
> Otared Kavian schrieb am 21.09.2020 um 15:30:
> […]
> I don't understand your problem because you tell ConTeXt to use upright 
> letters (normal = upright) in math mode with the following setup.
> 
>> \setupmathematics[integral=nolimits,lcgreek=normal,default=normal]

Oops… indeed. I was stupid to copy-paste \setupmathematics from another test 
file, without paying attention to « default=normal ».
The resaon for which I did this copy-paste was that with 
\definefontfamily [mainface] [mm] [STIX Math] [rscale=1.10]
the upper bound of the integral is misplaced and I don't know how to fix it.
In the archives I saw that there is « mathnolimitsmode » which can be added as 
a font feature, but its values and how to set it up are far from being clear to 
me.

Thank you so much for your help: Otared K.
___
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] \dorecurse{}{} problem

2020-09-21 Thread Otared Kavian
Hi Dalyoung,

I don't know why \recurselevel returns 0 inside a tabulate environment, but the 
following works fine:

\starttext
\startxtable[frame=off,bottomframe=on,width=1cm,align={middle,lohi}]
\startxrow\startxcell \stopxcell\stopxrow % just to have a line on the top of 
the first row
\dorecurse{8}
   {\startxrow\startxcell \recurselevel \stopxcell\stopxrow}
\stopxtable
\stoptext

Best regards: Otared K.

> On 21 Sep 2020, at 16:07, Jeong Dal  wrote:
> 
> Hi,
> 
> I tried to make a table using \dorecurse or \doloop as in the example.
> There is no error but \recurselevel is not increased, all are 0 in the first 
> example and only two rows are created with the \recurselevel 0 and 2 only in 
> the second example.
> 
> Does the tabulate cause the error?
> What is wrong in this MWE?
> 
> Thank you for reading.
> 
> Best regards,
> 
> Dalyoung
> 
> *
> \startbuffer[AdjacencyList1]
> \starttabulate[|c|cw(2cm)|]
> \HL
> \dorecurse{8}
>{\NC \recurselevel \NC \NC\NR \HL}
> \stoptabulate
> \stopbuffer
> 
> \startbuffer[AdjacencyList2]
> \starttabulate[|c|cw(2cm)|]
> \HL
> \doloop{
>\ifnum \recurselevel=7
>   \exitloop
>\fi
>\NC \recurselevel \NC \NC\NR \HL
> }
> \stoptabulate
> \stopbuffer
> 
> \starttext
> \getbuffer[AdjacencyList1]
> 
> \getbuffer[AdjacencyList2]
> \stoptext
> 
>> 2020. 9. 21. 오후 10:50, ntg-context-requ...@ntg.nl 작성:
>> 
>> Send ntg-context mailing list submissions to
>>  ntg-context@ntg.nl
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>>  https://mailman.ntg.nl/mailman/listinfo/ntg-context
>> or, via email, send a message with subject or body 'help' to
>>  ntg-context-requ...@ntg.nl
>> 
>> You can reach the person managing the list at
>>  ntg-context-ow...@ntg.nl
>> 
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of ntg-context digest..."
>> 
>> 
>> Today's Topics:
>> 
>>   1. Parallel text support (Denis Maier)
>>   2. Re: Parallel text support (Taco Hoekwater)
>>   3. Re: ZapfDingbats Unicode differences MKIV vs LMTX
>>  (Christoph Reller)
>>   4. Re: ZapfDingbats Unicode differences MKIV vs LMTX (Hans Hagen)
>>   5. Math fonts for Nimbus fonts (Otared Kavian)
>>   6. Re: 2020 Meeting recordings? (Taco Hoekwater)
>> 
>> 
>> --
>> 
>> Message: 1
>> Date: Mon, 21 Sep 2020 12:21:37 +0200
>> From: Denis Maier 
>> To: ntg-context@ntg.nl
>> Subject: [NTG-context] Parallel text support
>> Message-ID: <780fe43c-f2c3-6ea1-04f5-d4d5c22e7...@mailbox.org>
>> Content-Type: text/plain; charset=utf-8; format=flowed
>> 
>> Hi,
>> 
>> I'm trying to typeset a parallel text that should appear in columns. The 
>> sources are XML, and there I have to use tables for this. So, I thought 
>> the easiest way is to use extreme tables for this:
>> 
>> =
>> \starttext
>> 
>> \dorecurse{3}{\input knuth}
>> 
>> \startxtable[split=yes,frame=off]
>> \startxrow
>> \startxcell Text \stopxcell
>> \startxcell Übersetzung \stopxcell
>> \stopxrow
>> \startxrow
>> \startxcell \input ward \stopxcell
>> \startxcell \input tufte \stopxcell
>> \stopxrow
>> \stopxtable
>> 
>> \stoptext
>> =
>> 
>> However, as it turns out, split only seems to mean that the table is 
>> split between rows, individual rows stay on the same page.
>> 
>> Is there a better approach? I've found the page-streams, but that seems 
>> to be too much...
>> 
>> Best,
>> Denis
>> 
>> 
>> --
>> 
>> Message: 2
>> Date: Mon, 21 Sep 2020 13:58:11 +0200
>> From: Taco Hoekwater 
>> To: mailing list for ConTeXt users 
>> Subject: Re: [NTG-context] Parallel text support
>> Message-ID: 
>> Content-Type: text/plain;charset=utf-8
>> 
>> 
>> 
>>> On 21 Sep 2020, at 12:21, Denis Maier  wrote:
>>> 
>>> 
>>> However, as it turns out, split only seems to mean that the table is split 
>>> between rows, individual rows stay on the same page.
>>> 
>>> Is there a better approach? I've found the page-streams, but that seems to 
>>> be too much…
>> 
>> \starttabulate
>> 
>> 
>> 
>> --
>> 
>> Message: 3
>> Date: Mon, 21

[NTG-context] Math fonts for Nimbus fonts

2020-09-21 Thread Otared Kavian
Hi,

I wish to use the Nimbus fonts, but since I didn't know which Math fonts is 
best adapted to this family, I tried several fonts such as Stix Math, TeX Gyre 
Math, and so on, but doing this the math-italic does not appear in these fonts: 
does this mean that I have to set explicitely math-italic in definefontfamily?

Also what is the best math font adapted for Nimbus?

Below is my definition of a fontfamily for Nimbus fonts.

Thanks in advance for any help: Otared K

%% begin definefontfamily-nimbus.tex
\definefontfamily [mainface] [rm] [Nimbus Roman No9 L]
\definefontfamily [mainface] [ss] [Nimbus Sans L] [rscale=0.85]
\definefontfamily [mainface] [tt] [Nimbus Mono] [features=none,rscale=0.95]
\definefontfamily [mainface] [mm] [STIX Math]

%\definefontfamily [mainface] [mm] [Asana Math]
%\definefontfamily [mainface] [mm] [Lucida Bright Math OT]
%\definefontfamily [mainface] [mm] [TeX Gyre Termes Math]
%\definefontfamily [mainface] [mm] [XITSMath]

\setupmathematics[integral=nolimits,lcgreek=normal,default=normal]


\setupbodyfont[mainface]

\starttext

{\rm\tf Regular \it Italic \bf Bold \bi BoldItalic}

{\ss\tf Regular \it Italic \bf Bold \bi BoldItalic}

{\tt\tf Regular \it Italic \bf Bold \bi BoldItalic}

And here are a few math formulas $\alpha^2 + \beta^2 + \gamma^2 = x^2 + y^2 + 
t^2$.
\startformula
\int_{0}^{2\pi} \sin(x)dx = 0, 
\qquad {\rm e}^{{\rm i}\pi} + 1 = 0, 
\qquad \sum_{n=1}^{\infty}{1 \over n^2} = {\pi^2 \over 6}.
\stopformula

\stoptext
%% end definefontfamily-nimbus.tex
___
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] \startstructurelevel

2020-09-20 Thread Otared Kavian
Hi Denis,

Does 

\startstructurelevel[title={Bibliography},number=no]

\stopstructurelevel

give what you want?

Best regards: Otared K.

> On 20 Sep 2020, at 10:39, Denis Maier  wrote:
> 
> Hi,
> 
> I'm using \startstructurelevel so I can nest sections without having to worry 
> about where I am at the moment. (Actually I'm typesetting JATS XML, and 
> there's only one  tag, and using \startstructurelevel makes the mapping 
> easier.)
> Now, for the bibliography, I need an unnumbered heading. How can I get that?
> 
> Browsing through the source I came across this: 
> https://source.contextgarden.net/tex/context/base/mkiv/strc-lev.mkvi?search=startstructurelevel#l65
> 
> So, it seems that \startstructurelevel is just an alias for 
> \startsectionlevel. Right?
> Unnumbered headings can be produced with \startsubjectlevel
> 
> So, is there a way to let \startstructurelevel the unnumbered variant, or 
> should I just use \startsubjectlevel instead?
> 
> By the way, is there a reason for the existence \startstructurelevel next to 
> \startsectionlevel? What's the exact purpose of this?
> 
> Best,
> Denis
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Error setting up ConTeXt in MacTeX 2020

2020-09-18 Thread Otared Kavian
Hi Felix,

Some time ago I encountered the same problem and we had a thread on this list 
about this:

https://www.mail-archive.com/ntg-context@ntg.nl/msg95355.html

The problem on my Mac came from the fact that a directory
/opt/local/etc/texmf/
existed (installed by MacPorts, without me knowing it…) where ConTeXt tries to 
find a format, while there is none.
I removed that directory and then I could use ConTeXt from MacTex 2020.

Best regards: Otared


> On 18 Sep 2020, at 09:41, Felix Krause  wrote:
> 
> Hi all,
> 
> with MacTeX 2020 on a newly installed Mac, I have the problem that ConTeXt 
> doesn't work anymore:
> 
> $ context file.tex
> mtx-context | warning: no format found, forcing remake (commandline 
> driven)
> […] snip lots of lines
> resolvers   | formats | changing to format path 
> '/var/folders/rj/hfjmjx796q102y4v23vh038cgp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex'
> resolvers   | formats | unable to change to format path 
> '/var/folders/rj/hfjmjx796q102y4v23vh038cgp/T/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex'
> mtx-context | error, no format found with name: cont-en, aborting
> system  | total runtime: 5.315 seconds
> The ConTeXt docs  say that I 
> should run mtxrun --generate, which seems to run successfully, and context 
> --make, which finishes with the same „unable to change format path“ error (I 
> believe this is what context automatically does when compiling my file, 
> hinted by the „no format found. forcing remake“ message). I tried explicitly 
> running context --make cont-en which yields the same result. The given path 
> does exist on my hard drive.
> 
> I don't even know if the „unable to change format path“ message is actually 
> an error, but I have no other indicator of what goes wrong. The only line 
> that explicitly says „error“ is the one I get when trying to process the file.
> 
> Interestingly, I have another Mac where I upgraded from MacTeX 2019 to MacTeX 
> 2020 and everything works there.
> 
> I made sure that everything is up-to-date with the TeX Live Utility.
> 
> How can I fix this problem?
> 
> Regards,
> Felix
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] latest lmtx

2020-09-05 Thread Otared Kavian
Hi Alan,

Where did you install LuaMetaTeX? 
For instance my LuaMetaTeX.engine contains the following three lines:

#!/bin/bash

export 
PATH=/context-osx-64/tex/texmf-osx-64/bin:/context-osx-64/bin:/context-osx-64/tex/texmf-osx-64/bin

/context-osx-64/tex/texmf-osx-64/bin/mtxrun --autogenerate --script context 
--directives="system.showerror" --autopdf "$1" --purgeall

where I am invoking the file 
/context-osx-64/tex/texmf-osx-64/bin/mtxrun
which is in the folder context-osx-64 where I installed LuaMetaTeX by running 
sh install.sh

Therefore your LuaMetaTeX.engine file should contain the correct path.

Best regards: Otared

> On 5 Sep 2020, at 17:19, Alan Bowen  wrote:
> 
> No, Hraban, and I have never had a directory  /Users/bowen1/context-osx-64. 
> Does Luametatex 2.10 (Context 2020.09.03) now require one?
> 
> Alan
> 
> On Sat, Sep 5, 2020 at 10:26 AM Henning Hraban Ramm  wrote:
> 
> 
> > Am 05.09.2020 um 16:08 schrieb Alan Bowen :
> > 
> > When I process
> > \starttext
> > Hello, world!
> > \stoptext
> > I get the following error message:
> > 
> > /Users/bowen1/Library/TeXShop/Engines/LuaMetaTeX.engine:9: no such file or 
> > directory: /Users/bowen1/context-osx-64/tex/texmf-osx-64/bin/mtxrun
> > 
> > resolvers   | formats | executing runner 'run luametatex format': 
> > /Applications/LuaMetaTeX/tex/texmf-osx-64/bin/luametatex 
> > --jobname="Version" 
> > --fmt=/Applications/LuaMetaTeX/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
> >  
> > --lua=/Applications/LuaMetaTeX/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
> >  cont-yes.mkiv --c:autogenerate --c:currentrun=1 --c:file-line-error 
> > --c:fulljobname="./Version.tex" --c:input="./Version.tex" --c:kindofrun=1 
> > --c:maxnofruns=9 --c:synctex="1" 
> > --c:texmfbinpath="/Applications/LuaMetaTeX/tex/texmf-osx-64/bin"
> > mtx-context | fatal error: return code: 11
> > 
> > There is definitely a file 
> > /Users/bowen1/Library/TeXShop/Engines/LuaMetaTeX.engine.
> > Previous versions of lmtx process without any problem. 
> 
> The message doesn’t ask for the engine file, but for the mtxrun script 
> mentioned in line 9 of the engine.
> 
> Is /Users/bowen1/context-osx-64/tex/texmf-osx-64/bin/mtxrun still valid in 
> your installation?
> 
> Hraban
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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] defining font family for several options

2020-09-01 Thread Otared Kavian
Hi Julian,

What Aditya means is that you define two (or more) font families: one is named 
mainface as yu have already done, the other named mychapterfont (for instance) 
where you attribute whatever fonts you wish to sans serif and else. Then when 
you want to use the special font in some of the titles you use

{\switchtobodyfont[mychapterfont]\ss my text}

You can use also

\start \switchtobodyfont[mychapterfont] \ss my text \stop

in case the braces are not convenient for a longer text.

Best regards: Otared

> On 2 Sep 2020, at 01:22, jbf  wrote:
> 
> I presume you mean, {\switchtobodyfont[itcavantgarde]\ss My text} for the 
> case I mentioned?
> 
> Because at no point in the example I gave of \definefontfamily[mainface] had 
> I defined ss as an AvanteGarde typeface, and that is the heart of my 
> question. Can I somehow define two kinds of sans serif for different uses?
> 
> It was earlier suggested (Hraban) I might be able to do away with the serif 
> font or use calligraphy, but I need the rm and I don't need cg (though, was 
> the suggestion that I could use the initials cg but set up the typeface in 
> fact as a sans serif, in this case AvantGarde? Is that possible? In which 
> case I could also use hw as well for a different typeface as well?). As you 
> can see, I am trying to get to grips with this whole typeface issue which I 
> find a bit complicated.
> 
> Julian
> 
> 
> On 2/9/20 9:08 am, Aditya Mahajan wrote:
>> On Tue, 1 Sep 2020, jbf wrote:
>> 
>>> Perhaps someone can assist me with the following query. I have a
>>> situation where I need to use more than one sans serif fonts (especially
>>> within complicated chapter heads). I currently have the following:
>>> 
>>> \definefontfamily [mainface] [rm] [alegreya]
>>> \definefontfamily [mainface] [ss] [dax][tf=file:dax-regular]
>>> \definefontfamily [mainface] [mm] [alegreya]
>>> \setupbodyfont[mainface]
>>> \setupbodyfont[11pt]
>>> 
>>> But what if I need to have, in addition to the Dax sans serif typeface,
>>> an additional sans serif typeface such as ITCAvantGarde? How do I
>>> declare that? Do I just give it another name, e.g.
>>> \definefontfamily[chapter][itcavantgarde] etc? If I did that, how then
>>> do I refer to it? Obviously not just as {\ss my text} since that would
>>> call in the dax font.
>> {\switchtobodyfont[chapter]\ss my text}
>> 
>> I tried to improve the explanation on the wiki: 
>> https://wiki.contextgarden.net/Font_Switching#Switching_typefaces
>> 
>> Aditya
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Overriding the number on a float

2020-08-24 Thread Otared Kavian
Hi,

If there are a few special numberings of floats, and one wants floats numbered 
1.6a and 1.6b, the following seems to work:

Best regards: Otared

%%% begin ownnumber-in-floats.tex
\useMPlibrary[dum]

\starttext

\startsection[title=One]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\startsection[title=Two]
\startplacefigure[title=Test]
\externalfigure[dummy]
\stopplacefigure
\stopsection

\setcounter[figure][5] % next figure is no.6

\startsection[ownnumber=10,title={A section}] 
\start
\setupcaptions[numberstopper={a}]
\startplacefigure[title=Test figure]
\externalfigure[dummy]
\stopplacefigure
\stop
\stopsection

\setcounter[figure][5]

\startsection[ownnumber=11,title={Another section}] % ownnumber doesn’t work
\start
\setupcaptions[numberstopper={b}]
\startplacefigure[title=Test another figure]
\externalfigure[dummy]
\stopplacefigure
\stop

\startplacefigure[title=Test another figure]
\externalfigure[dummy]
\stopplacefigure

\stopsection

\stoptext
%%% end ownnumber-in-floats.tex

> On 24 Aug 2020, at 19:37, Henning Hraban Ramm  wrote:
> 
> 
> 
>> Am 24.08.2020 um 17:36 schrieb Wolfgang Schuster 
>> :
>> 
>> Henning Hraban Ramm schrieb am 24.08.2020 um 15:29:
 Am 23.08.2020 um 11:25 schrieb Duncan Hothersall :
 
 I think there was a question on this very recently but I don;t think it 
 got an answer and I can't find it to reply to, so apologies for the extra 
 noise. I have a large text with floats numbered sequentially by chapter 
 and then figure/table number, but at the last minute I've had a request 
 for two figures in a particular chapter to become 27.1a and 27.1b instead 
 of 27.1 and 27.2. It's not a combination - they are separate figures on 
 different pages.
 
 I've experimented with the options I can see, but it's not obvious if 
 there is a facility to override the numbering of two figures in a stream 
 of normally numbered figures like this. I was thinking of the equivalent 
 of the old \sym{symbol} command that used to work as a way to override a 
 single item in an otherwise sequential list.
 
 I guess there's a brute force method of setting up a new type of figure 
 with the label "Figure 27.1" and having them numbered as lowercase alpha, 
 but if there's an easier way that would be great.
>>> I’m also interested in overriding automatical numbering, e.g. of chapters 
>>> or itemization items.
>>> E.g. in my songbook, I’d like to have the verses numbered but interrupted 
>>> by a chorus numbered as "C" (i.e. "R" in German).
>>> Similarly the paragraphs of some (by)laws that were changed a lot and use a 
>>> numbering like 1, 2, 3, 3a, 4, 7...
>>> Something like
>>> \startitem[number={R}]
>>> or
>>> \startsection[number={3a}]
>>> would be nice.
>>> If I set it to an integer, ConTeXt should set the counter accordingly, 
>>> otherwise continue counting from the previous calculated number. Would that 
>>> be possible?
>> 
>> 
>> You can set your own section numbers but the counter isn't stopped.
> 
> Thank you! I overlooked "ownnumber". It works for sections, but not for items 
> or floats.
> 
> \setnumber[section][10] doesn’t work, \setcounter the same (according to the 
> source they’re synonymous) – does section use a different counter name or is 
> it no counter at all?
> 
> \setnumber[figure][10] works (but only with integers, not some alphanumerical 
> stuff, sorry Duncan).
> 
> Hraban
> 
> 
> \useMPlibrary[dum]
> 
> \starttext
> 
> \startsection[title=One]
> \startplacefigure[title=Test]
> \externalfigure[dummy]
> \stopplacefigure
> \stopsection
> 
> \startsection[title=Two]
> \startplacefigure[title=Test]
> \externalfigure[dummy]
> \stopplacefigure
> \stopsection
> 
> \setcounter[figure][5] % next figure is no.6
> 
> \startsection[ownnumber=10,title=???] % ownnumber doesn’t work
> \startplacefigure[title=Test,ownnumber=10]
> \externalfigure[dummy]
> \stopplacefigure
> \stopsection
> 
> \setcounter[section][5] % doesn’t work
> 
> \startsection[title=Three]
> \startitemize[n]
>  \item one
>  \item two
>  \item three
>  \startitem[ownnumber=9] five\stopitem  % ownnumber doesn’t work
> \stopitemize
> \stopsection
> 
> \stoptext
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 

Re: [NTG-context] Chapter heading with rules

2020-08-21 Thread Otared Kavian
Hi Julian,

Indeed you can acchieve what you want, but it is better to define a command 
which takes care of the number and the title of the chapter at the same time 
(as in \ myChapterCommand below).

%% begin example.tex
\definefiller[ChapterRule]
[alternative=rule,
color=gray,
height=0.8ex,
depth=-0.6ex]

\definefiller[ChapterLeftRule]
[ChapterRule]
[left=\zerowidthnobreakspace,
right=\quad]

\definefiller[ChapterRightRule]
[ChapterRule]
[left=\quad,
right=\zerowidthnobreakspace]

\define[2]\myChapterCommand{%
\midaligned{{\filler[ChapterLeftRule]}#1.~#2{\filler[ChapterRightRule]}}
}

\setuphead[chapter]
[textstyle={\setcharactercasing[WORD]\ssa},
command=\myChapterCommand]

\starttext

\startchapter[title={My Chapter Title}]
\input knuth.tex
\stopchapter

\stoptext

%% end example.tex

Best regards: Otared K.

> On 21 Aug 2020, at 03:53, jbf  wrote:
> 
> Have achieved a Chapter title with rules either side (see below - not an 
> original invention!) but I want the chapter number to be part of 'My Chapter 
> Title'; instead, the following MWE means it comes before the ChapterLeftRule. 
> I know I can do it by actually putting the number before My Chapter title 
> (e.g. 1 My Chapter Title), since the proper numbered version still appears in 
> the TOC, but my preference would be to include a command in the \setuphead, 
> if possible (so long as it still allows the numbered chapter to appear in the 
> TOC of course). Possible?
> 
> \definefiller
>   [ChapterRule]
>   [alternative=rule,
>color=gray,
>height=0.8ex,
>depth=-0.6ex]
> 
> \definefiller
>   [ChapterLeftRule]
>   [ChapterRule]
>   [left=\zerowidthnobreakspace,
>right=\quad]
> 
> \definefiller
>   [ChapterRightRule]
>   [ChapterRule]
>   [left=\quad,
>right=\zerowidthnobreakspace]
> 
> \setuphead
>   [chapter]
>   [%align=middle,
>textstyle={\setcharactercasing[WORD]\ssa},
> textcommand=\groupedcommand{\filler[ChapterLeftRule]}{\filler[ChapterRightRule]}]
> 
> \starttext
> 
> \chapter{My Chapter Title}
> 
> \stoptext
> 
> Julian
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] memoir-style chapter heading

2020-08-18 Thread Otared Kavian
Hi Julian,

Indeed you can modify slightly what Aditya said to obtain what you want: you 
can put the overlay into a framed environment as in the following example. 
Though, to my taste the number is a little bit too low…

%% begin example
\setuppagenumbering[state=start,location=footer]
\setuphead[chapter]
[
numberstyle={\switchtobodyfont[48pt]},
numbercolor=gray,
alternative=command,
command=\MemoirChapter,
]

\define[2]\MemoirChapter
{\framed[frame=off,width=broad,align=middle]
{\startoverlay
{#1}
{#2}
\stopoverlay}
}

\starttext
\startchapter[title={This is a test}]
\input knuth.tex

\stopchapter

\stoptext
%% end example

Best regards: Otared

> On 18 Aug 2020, at 01:18, jbf  wrote:
> 
> I meant to include an example of what I mean, since at least it seems to work 
> (am including just the definition part of your example), So at least I can 
> get middle and right alignment.
> 
> \define[2]\MemoirChapter
>  {\midaligned{\startoverlay
>   {#1}
>   {#2}
> \stopoverlay}}
> 
> Julian
> 
> On 17/8/20 4:54 pm, Aditya Mahajan wrote:
>> On Mon, 17 Aug 2020, jbf wrote:
>> 
>>> Am completely new to using Metafun, which I presume I would need to use
>>> to achieve a Hansen Memoir-style Chapter heading (chapter title
>>> overlayed on a large lightgray number). Of course, I am assuming I would
>>> need to use Metafun to create this...
>>> 
>>> So my first question is to ask if I could achieve the same effect
>>> without Metafun?
>>> 
>>> I have read through the Metafun manual, and I think I can understand how
>>> to overlay text on a graphic (MP), but it would be currently beyond me
>>> to draw numbers of the kind we find in, say, the Memoir examples.
>>> 
>>> Has anyone created such an example? I was keenly looking for one in the
>>> manual and elsewhere, in terms of ConTeXt/Metafun commands, but could
>>> not find one. But I'd be quite prepared to 'have a go' at this, if I had
>>> some pointers of just where to start! I assume I would have to
>>> \defineoverlay[number] and then add text on top \framed (but without the
>>> frame borders). Am I at least correct about this?
>> You don't need metafun for something this simple. Here is a crude 
>> implementation:
>> 
>> \setuphead[chapter]
>>   [
>> numberstyle={\switchtobodyfont[48pt]},
>> numbercolor=gray,
>> alternative=command,
>> command=\MemoirChapter,
>>   ]
>> 
>> \define[2]\MemoirChapter%
>>   {\startoverlay
>>   {#1}
>>   {#2}
>> \stopoverlay}
>>   
>> \starttext
>> \startchapter[title={This is a test}]
>> \stopchapter
>> 
>> \stoptext
>> 
>> Overlays don't allow tuning the location...for that you need layers. See the 
>> chapter on ornaments in the details manual, which also explains an 
>> alternative method to set title of chapters (toward the end of that 
>> chapter), which is useful if you need absolute positioning.
>> 
>> Aditya
>> 
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How can I use ConTeXt from TeXLive2020 ?

2020-08-14 Thread Otared Kavian
Hi Mojca,

You are correct about not removing « by hands » parts of a package… 
The reason for which I wen to that extremity was that I wanted absolutely to be 
sure to be able to run ConTeXt from TeXLive2020 in order to convince a few 
colleagues to experiment it with TeXShop. 

If I type in the Terminal
port installed 'tex*'
the answer is:
None of the specified ports are installed.

I guess this is because after having solved the problem I met with installing 
MacTeX2020, I had done:
sudo port uninstall texlive-basic --follow-dependencies
in order to uninstall ant TeX related package from Macports (I don't know how 
thos packages were installed, maybe when I tried to use asymptote, and since I 
couldn't use it from within ConTeXt I gave up…).

Best regards: Otared




> On 13 Aug 2020, at 16:57, Mojca Miklavec  
> wrote:
> 
> Dear Otared,
> 
> On Thu, 13 Aug 2020 at 11:05, Otared Kavian wrote:
>> 
>> Indeed following your suugestion, I removed the
>>/opt/local/etc/texmf/
>> directory, as well as all other tex related directories and files in 
>> /opt/local/, and then installed again MacTeX2020.
> 
> There is usually an easier way: just ensure that path to MacTeX comes
> before /opt/local/bin.
> 
> What does
>port installed 'tex*'
> return?
> 
> It's usually a somewhat bad idea to randomly delete a subset of files
> installed by a package manager.
> 
> Mojca
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How can I use ConTeXt from TeXLive2020 ?

2020-08-13 Thread Otared Kavian
Dear Axel,

Thank you very much for your attention and your hints, which solved my problems 
with ConTeXt from TeXLive2020.

Indeed following your suugestion, I removed the 
/opt/local/etc/texmf/
directory, as well as all other tex related directories and files in 
/opt/local/, and then installed again MacTeX2020. 
In oder to be on the safe side, I rebuilt also the locate database, then 
rebooted my machine: after that I could  run
luatools --generate
and now with
context --version
 I have current version: 2020.03.10 14:44.

However I don't know why I had tex related files in /opt/local/, which is used 
by MacPorts…

I hope to be able to explain to my colleague how to run ConTeXt (LuaTeX) within 
TeXShop from MacTeX2020.

Thanks to eveyone!

Best regards: Otared

> On 12 Aug 2020, at 08:26, Axel Kielhorn  wrote:
> 
> 
> 
>> Am 11.08.2020 um 16:57 schrieb Otared Kavian :
>> 
>> I don't have these files at this place, but in
>>  /opt/local/etc/texmf/
>> I do have 
>>  /opt/local/etc/texmf/texmf.cnf
>>  /opt/local/etc/texmf/texmfcnf.lua
>> the first one being created automatically when I tried to do mtxrun 
>> --generate after installing TeXLive2020. Ir says its content should not be 
>> modified directly and that its content is based on of the file
>>  /opt/local/etc/texmf/texmf.cnf.d
>> The content of the above directory dates from 2019, and maybe that is why my 
>> logfile reports things being done with TeXLive2019. 
>> 
>> The content of the file 
>>  /opt/local/etc/texmf/texmfcnf.lua
>> is written by Hans in date = "2012-05-24" time = "12-12-12".
>> 
>> Replacing /opt/local/etc/texmf/texmf.cnf with some other texmf.cnf does not 
>> help, since it is overwritten when one does 
>>  mtxrun --generate
>> 
>> So the problem remains… Maybe I have to contact people who prepare 
>> MacTeX2020 and ask for help with them.
> 
> This looks like a Macports installation.
> 
> When I call the Macports version of context I get:
> 
> context --help
> resolvers   | caches | path '/Users/axel/.texlive2020/texmf-var' created
> mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'
> 
> If you want to use the Macports version of ConTeXt please install
> 
> port install textlive-context
> 
> after installing that I get:
> 
> context --help
> mtx-context | ConTeXt Process Management 1.03
> mtx-context |
> mtx-context | basic options:
> mtx-context |
> mtx-context | --run  process (one or more) files (default 
> action)
> mtx-context | --make create context formats
> mtx-context |
> mtx-context | --ctx=name use ctx file (process management 
> specification)
> mtx-context | --noctxignore ctx directives and flags
> mtx-context | --interfaceuse specified user interface 
> (default: en)
> mtx-context |
> mtx-context | --autopdf  close pdf file in viewer and start 
> pdf viewer afterwards
> mtx-context | --purgepurge files either or not after a 
> run (--pattern=...)
> mtx-context | --purgeall purge all files either or not after 
> a run (--pattern=...)
> mtx-context |
> mtx-context | --usemodule=list   load the given module or style, 
> normally part of the distribution
> mtx-context | --environment=list load the given environment file 
> first (document styles)
> mtx-context | --mode=listenable given the modes (conditional 
> processing in styles)
> mtx-context | --path=listalso consult the given paths when 
> files are looked for
> mtx-context | --arguments=list   set variables that can be consulted 
> during a run (key/value pairs)
> mtx-context | --randomseed=numberset the randomseed
> mtx-context | --result=name  rename the resulting output to the 
> given name
> mtx-context | --trackers=listset tracker variables (show list 
> with --showtrackers)
> mtx-context | --directives=list  set directive variables (show list 
> with --showdirectives)
> mtx-context | --silent=list  disable logcatgories (show list with 
> --showlogcategories)
> mtx-context | --stripstrip Lua code (only meant for 
> production where no errors are expected)
> mtx-context | --errors=list  show errors at the end of a run, 
> quit when in list (also when --silent)
> mtx-context | --htmlerrorpagegenerate html error page instead 
> (optional: =scite)
> mtx-context | --noconsoledisable logging 

Re: [NTG-context] How can I use ConTeXt from TeXLive2020 ?

2020-08-11 Thread Otared Kavian
Hi Hans,

Thanks for your explanations, which clarify why sometimes ConTeXt may not work 
straight of TeXLive.
Nevertheless I will contact the people who maintain MacTeX in order for them to 
be aware of the issue I encounter, so that hopefully in the future releases 
people would be able to use ConTeXt from MacTeX.

Best regards: Otared

> On 11 Aug 2020, at 17:25, Hans Hagen  wrote:
> 
> Hi,
> 
> A few remarks.
> 
> In a mkiv luatex setup there are (on a unix system):
> 
>  luatex  : binary
>  mtxrun  : a copy of mtxrun.lua
>  context : a shell script starting mtxrun
> 
> Now, the problem there is that these shebang lines are limited, i.e. there is 
> no way to pass an argument and we need to start luatex in lua mode. This is 
> why the program refered to is texlua which is a copy of or symlink to luatex 
> and when called with that name it knows that it has to start in lua mode.
> 
> On windows there are two small stubs: mtxrun.exe and context.exe an both will 
> start luatex (no need for texlua there) with the same script etc.
> 
> In a luametatex setup we have a uniform and simpler model.
> 
>  luametatex   : binary
>  mtxrun   : a copy of luametex or symlink to it
>  context  : a copy of luametex or symlink to it
>  mtxrun.lua   : used when mtxrun is started
>  context.lua  : used when context is started
> 
> So, here the 'context' link (or copy) from it's name knows to start in lua 
> mode and load context.lua (which actually loads mtxrun.lua + 
> mtx-context.lua). It's the same on all platforms.
> 
> Now, already long ago we ditched all other stubs simply because given the 
> amount of scripts in a tex live setup it's a recipe for clashes (scripts also 
> have to compete with programs / scripts  installed as part of the os and 
> other programs so even more opportunity for clashes). We just use
> 
>  mtxrun --script ...
> 
> instead (and texmfstart in a mkii setup).
> 
> These models cannot be mixed, which is why in a luametatex lmtx setup we use 
> "context --luatex" to start mkiv, where luametatex is the runner.
> 
> Hans
> 
> ps. I remember the times that context was considered bad because it needed a 
> runner, read: a script was part of the deal and a tex run should not have 
> such a depedency; the need to install perl or ruby was seen as a shortcoming. 
> We also used scripts to generate font metric files (context didn't depend on 
> other programs for toc and index generation and had just one auxiliary file). 
> But times have changed and scripts are now hip and modern in the tex 
> ecosysystem, which is why we basically limit ourselves to just 'context' and 
> 'mtxrun' and start all the other context related scripts indirectly.
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How can I use ConTeXt from TeXLive2020 ?

2020-08-11 Thread Otared Kavian
Hi Adam,

Thanks for your attention to my problem.

> On 11 Aug 2020, at 03:44, Adam Reviczky  wrote:
> 
> Hi Otared,
> 
> Not sure this will help at all, but I've seen similar errors when 
> "texmfcnf.lua" wasn't found (alongside texmf.cnf).
> 
> Although I am not using TeXLive2020, I have the following entries for 
> texmfcnf:
> -rw-r--r-- 1 root root 8272 Aug  9 13:19 
> /usr/share/texlive/texmf-dist/web2c/texmfcnf.lua
> -rw-r--r-- 1 root root 38841 Aug  9 13:19 
> /usr/share/texlive/texmf-dist/web2c/texmf.cnf

I don't have these files at this place, but in
/opt/local/etc/texmf/
I do have 
/opt/local/etc/texmf/texmf.cnf
/opt/local/etc/texmf/texmfcnf.lua
the first one being created automatically when I tried to do mtxrun --generate 
after installing TeXLive2020. Ir says its content should not be modified 
directly and that its content is based on of the file
/opt/local/etc/texmf/texmf.cnf.d
The content of the above directory dates from 2019, and maybe that is why my 
logfile reports things being done with TeXLive2019. 

The content of the file 
/opt/local/etc/texmf/texmfcnf.lua
is written by Hans in date = "2012-05-24" time = "12-12-12".

Replacing /opt/local/etc/texmf/texmf.cnf with some other texmf.cnf does not 
help, since it is overwritten when one does 
mtxrun --generate

So the problem remains… Maybe I have to contact people who prepare MacTeX2020 
and ask for help with them.

Thank you agin for your time and advices.
Best regards: Otared


> 
> and the symlinks to it from:
> lrwxrwxrwx 1 root root 43 Aug 11 02:05 /usr/share/texmf/web2c/texmfcnf.lua -> 
> ../../texlive/texmf-dist/web2c/texmfcnf.lua
> lrwxrwxrwx 1 root root 40 Aug 11 02:21 /usr/share/texmf/web2c/texmf.cnf -> 
> ../../texlive/texmf-dist/web2c/texmf.cnf
> 
> Now, if I remove the symlink (/usr/share/texmf/web2c/texmfcnf.lua) I get the 
> same error as you:
> mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'
> (With the symlink everything is fine of course.)
> 
> https://github.com/TeX-Live/texlive-source/blob/b5db9f9833e389f96a329553b9d6ac7037872b2d/texk/kpathsea/texmf.cnf
> % First writable tree here is used by Lua(La)TeX for the font cache.
> % LuaLaTeX uses the value here, while ConTeXt uses the same variable but
> % from texmfcnf.lua; therefore the two values should be kept in sync.
> % (As should everything else in texmf.cnf <-> texmfcnf.lua.)
> 
> I see from your output that context did find the texmfcnf.lua:
> resolvers   | resolving | found regular configuration file 
> '/opt/local/etc/texmf/texmfcnf.lua'
> 
> So maybe it is something completely different, but it does look like it's 
> something around those configs...
> 
> Have a look and if not, then sorry for the noise.
> 
> Regards,
> Adam
> 
> 
> On Mon, Aug 10, 2020 at 11:04 PM Otared Kavian  wrote:
> Hi Axel,
> 
> > On 10 Aug 2020, at 16:11, Axel Kielhorn  wrote:
> > […]
> > Well, one more suggestion:
> > Use TeX Live Manager to update TeX-Live.
> > I didn’t see any comments about context not working, but maybe the update 
> > fixes something.
> > (You can filter for context related packages.)
> > 
> > There has been one update to „context“ in June 2020.
> 
> I did update TeXLive with TeX Live Manager. But still I cannot run ConTeXt 
> from TeXLive2020 (neither from TeXShop nor from Terminal).
> 
> > […]
> > And another one:
> > Please look into the home directory for a local .texlive2020 folder.
> > There shouldn’t be any and it shouldn’t contain anything context related.
> 
> I checked for the existence of directories of the type .texlive2020: there is 
> no such directory in my home directory.
> There were three leftover directories .texlive2008, .texlive2010 and 
> .texlive2019, which I removed.
> Doing 
> mtxrun --generate
> creates a .texlive2019 directory which contains some other folders which are
> texmf-var/luatex-cache/context/88aacfe88c3cbee9a12d5f4bec4da90b/trees/
> and in the latter folder there are 10 files with suffixes .lua and .luc.
> Again 
> context test.tex
> results in 
> mtxrun | unknown script 'context.lua' or 'mtx-context.lua'
> 
> So the problem remains…
> 
> Best regards: Otared
> ___
> 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/c

Re: [NTG-context] How can I use ConTeXt from TeXLive2020 ?

2020-08-10 Thread Otared Kavian
Hi Axel,

> On 10 Aug 2020, at 16:11, Axel Kielhorn  wrote:
> […]
> Well, one more suggestion:
> Use TeX Live Manager to update TeX-Live.
> I didn’t see any comments about context not working, but maybe the update 
> fixes something.
> (You can filter for context related packages.)
> 
> There has been one update to „context“ in June 2020.

I did update TeXLive with TeX Live Manager. But still I cannot run ConTeXt from 
TeXLive2020 (neither from TeXShop nor from Terminal).

> […]
> And another one:
> Please look into the home directory for a local .texlive2020 folder.
> There shouldn’t be any and it shouldn’t contain anything context related.

I checked for the existence of directories of the type .texlive2020: there is 
no such directory in my home directory.
There were three leftover directories .texlive2008, .texlive2010 and 
.texlive2019, which I removed.
Doing 
mtxrun --generate
creates a .texlive2019 directory which contains some other folders which are
texmf-var/luatex-cache/context/88aacfe88c3cbee9a12d5f4bec4da90b/trees/
and in the latter folder there are 10 files with suffixes .lua and .luc.
Again 
context test.tex
results in 
mtxrun | unknown script 'context.lua' or 'mtx-context.lua'

So the problem remains…

Best regards: Otared
___
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 use ConTeXt from TeXLive2020 ?

2020-08-10 Thread Otared Kavian
Hi Hans and Taco,

Thanks for the help!
Doing 
context --make
results in
mtxrun | unknown script 'context.lua' or 'mtx-context.lua'

Doing 
mtxrun --generate
results in the lines (and much more):

resolvers   | resolving | variable 'SELFAUTOLOC' set to 
'/opt/local/libexec/texlive/binaries'
resolvers   | resolving | variable 'SELFAUTODIR' set to 
'/opt/local/libexec/texlive'
resolvers   | resolving | variable 'SELFAUTOPARENT' set to 
'/opt/local/libexec'
resolvers   | resolving | variable 'TEXMFCNF' set to ''
resolvers   | resolving | variable 'TEXMF' set to ''
resolvers   | resolving | variable 'TEXOS' set to 'texlive'
resolvers   | resolving |
resolvers   | resolving | using configuration specification 
'home:texmf/web2c;/opt/local/etc/texmf'
resolvers   | resolving |
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/kavian/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on weird path 
'/opt/local/etc/texmf' from specification '/opt/local/etc/texmf'
resolvers   | resolving | found regular configuration file 
'/opt/local/etc/texmf/texmfcnf.lua'

The directory
/opt/local/libexec/texlive/binaries
exists and contains  (among other things) « context » which is a symlink to 
/opt/local/share/texmf-texlive/scripts/context/stubs/unix/context
which does not exist…

Best regards: Otared

> On 10 Aug 2020, at 15:20, Hans Hagen  wrote:
> 
> On 8/10/2020 2:59 PM, Otared Kavian wrote:
>> Hi Alex,
>> Thank you and Taco for helping.
>> In order to help solve the problem of running ConTeXt from MacTeX, I 
>> installed MacTeX2020 (which is the same as TeXLive2020). Now if in a 
>> Terminal window I do
>>  which context
>> the answer is:
>>  /Library/TeX/texbin/context
>> And the answer to
>>  which pdflatex
>> is
>>  /Library/TeX/texbin/pdflatex
>> Also the answer to:
>>  which luatools
>> is
>>  /Library/TeX/texbin/luatools
>> So the binaries are in /Library/TeX/texbin, which is in fact an alias for
>>  /usr/local/texlive/2020/bin/x86_64-darwin
>> Now, as you and the « ConTeXt (LuaTeX) » engin suggest, if I do
>>  luatools --generate
>> then the answer is:
>>  mtxrun | unknown script 'base.lua' or 'mtx-base.lua'
>> It is possible that the version of mtxrun or luatools scripts in TeXLive are 
>> not working.
>> I don't remember what I did with TeXLive2019 to fix the issue, but my 
>> concern is that if including ConTeXt in TeXLive is intended for people to 
>> use it, then it SHOULD run without such tweakings which, even for someone 
>> who is a regular user of ConTeXt, are not easy to find.
>> The solution consisting of installing a standalone tree of ConTeXt, is not a 
>> real solution because many people do not know how to do it and, even if they 
>> could, then what would be the point of doing so much work for people who 
>> include a ConTeXt tree in TeXLive?
>> Anyway, I apologize for my acrimonius remarks, and I thank you again for 
>> your help.
> The luatools script was there to offer some kpse like functionality but it 
> has been obsolete for ages (the generate was in mtx-base at that time). Just 
> use
> 
>  mtxrun --generate
> 
> or
> 
>  context --make
> 
> which does a generate anyway (normally)
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How can I use ConTeXt from TeXLive2020 ?

2020-08-10 Thread Otared Kavian
Hi Alex,

Thank you and Taco for helping. 
In order to help solve the problem of running ConTeXt from MacTeX, I installed 
MacTeX2020 (which is the same as TeXLive2020). Now if in a Terminal window I do
which context
the answer is:
/Library/TeX/texbin/context
And the answer to
which pdflatex
is
/Library/TeX/texbin/pdflatex
Also the answer to:
which luatools 
is
/Library/TeX/texbin/luatools

So the binaries are in /Library/TeX/texbin, which is in fact an alias for
/usr/local/texlive/2020/bin/x86_64-darwin

Now, as you and the « ConTeXt (LuaTeX) » engin suggest, if I do
luatools --generate 
then the answer is:
mtxrun | unknown script 'base.lua' or 'mtx-base.lua'
It is possible that the version of mtxrun or luatools scripts in TeXLive are 
not working.

I don't remember what I did with TeXLive2019 to fix the issue, but my concern 
is that if including ConTeXt in TeXLive is intended for people to use it, then 
it SHOULD run without such tweakings which, even for someone who is a regular 
user of ConTeXt, are not easy to find.
The solution consisting of installing a standalone tree of ConTeXt, is not a 
real solution because many people do not know how to do it and, even if they 
could, then what would be the point of doing so much work for people who 
include a ConTeXt tree in TeXLive?

Anyway, I apologize for my acrimonius remarks, and I thank you again for your 
help.

Best regards: Otared


> On 10 Aug 2020, at 12:39, Axel Kielhorn  wrote:
> 
> 
> 
>> Am 10.08.2020 um 12:03 schrieb Otared Kavian :
>> 
>> Hi all,
>> 
>> I suggested to a friend, who is using plain TeX and LaTeX, to switch to 
>> ConTeXt, and since he is using TeXShop on MacOSX with a version of 
>> TeXLive2020 (named MacTeX2020), I thought he would just typeset a simple 
>> test document with the option « ConTeXt (LuaTeX) » from the menu in TeXShop, 
>> where it does appear.
>> 
>> Unfortunately when doing this all he gets in the log file is:
>> 
>> /sw/bin/init.csh: No such file or directory.
>> mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'
>> 
>> and I could not help him make the format (I do not have access to his 
>> machine, and I was trying to explain what to do on the phone).
> 
> The TeXshop engine file says:
> 
> # Before using this engine, you must run the following command once in 
> Terminal: luatools --generate
> 
> I probably did this when I installed TeXLive.
> 
> But I’m a little irritated by /sw/bin/.
> Is this a real MacTeX installation and not something like homebrew?
> 
> Let’s start with the simple things:
> 
> What is the result of:
> which context
> 
> it should be:
> /Library/TeX/texbin/context
> 
> If that doesn’t work try:
> 
> which pdflatex
> 
> The result is probably not
> 
> /Library/TeX/texbin/pdflatex
> 
> but should give some indication where to look.
> 
> There may be an old installation of MacTeX without Context somewhere in the 
> path.
> 
> If this is an old TeXShop installation, the Context engine may need an update 
> because it points to the old PATH.
> Simply copy the engine from ~/Library/TeXShop/Engines/inactive/ConTeXt to 
> ~/Library/TeXShop/Engines
> 
> Hope this helps
> Axel
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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] How can I use ConTeXt from TeXLive2020 ?

2020-08-10 Thread Otared Kavian
Hi all,

I suggested to a friend, who is using plain TeX and LaTeX, to switch to 
ConTeXt, and since he is using TeXShop on MacOSX with a version of TeXLive2020 
(named MacTeX2020), I thought he would just typeset a simple test document with 
the option « ConTeXt (LuaTeX) » from the menu in TeXShop, where it does appear.

Unfortunately when doing this all he gets in the log file is:

/sw/bin/init.csh: No such file or directory.
mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'

and I could not help him make the format (I do not have access to his machine, 
and I was trying to explain what to do on the phone).

He cannot (or does not want) to install a standalone version of ConTeXt, and he 
thinks that since ConTeXt exists in TeXLive2020 it should work out of the box, 
as do plain TeX and LaTeX. My opinion is that he is right… But since for the 
tim ebeing this is not the case, can anyone explain what to do in order to 
enable ConTeXt running from TeXLive2020?

Thanks in advance for any help: Otared K.

___
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] Defining \qed (was: Bug with \wordright...)

2020-08-08 Thread Otared Kavian
Hi Wolfgang,

Thanks for your explanations and the correct definition of the close symbol in 
an enumeration.
Following up the discussions with Hans, in order to put a close sympbol at the 
end of a formula, I have the following for the definition of \qed:

%% begin example-qed.tex
\showframe
\definesymbol[Fin][\mathematics{\square}]
\def\qed{%
\ifmmode
\inrightmargin{\hskip-7.5mm\symbol[Fin]} % --> attention here
\else
\dontleavehmode\wordright{\symbol[Fin]}
\fi}

\setupformulas[location=left]

\starttext

One sees that
\placeformula
\startformula
   a^2 + b^2 = c^2
\stopformula
which is the Pythagoras theorem. \qed

Another proof of Pythagors theorem is based on the figure below in which one 
sees that:
\placeformula
\startformula
(a+b)^2 = c^2 + 2ab \quad \imply \quad a^2 + b^2 = c^2. \qed
\stopformula

\stoptext
%% end example-qed.tex

Now how can I replace « \hskip-7.5mm » (which was found by trial and error…) in 
a robust manner so that the close symbols in the formulas are vertically 
aligned with the close symbols in the text?
In other terms can one compute automatically the amount of negative \hskip so 
that the definition is correct when one changes the font size and the layout?

Thanks in advance: Otared

> On 5 Aug 2020, at 21:15, Wolfgang Schuster 
>  wrote:
> […]
> 
> Below is a cleaner version to put a symbol at the end of each proof. The 
> \blank setting in the \PlaceProofSymbol definition moves the symbol back in 
> the math formula to avoid the vertical space between them, you can remove it 
> but I would at leas use \blank[back] to get rid of the empty line between the 
> formula and the symbol.
> 
> \define[1]\PlaceProofSymbol
>  {\blank[back,overlay]%
>   \dontleavehmode\wordright{#1}}
> 
> \defineenumeration
>  [proof]
>  [ closesymbol={\symbol[square]},
>   closecommand=\PlaceProofSymbol]
> 
> \starttext
> 
> \startproof
>  \startformula
>a^2 + b^2 = c^2
>  \stopformula
> \stopproof
> 
> \stoptext
> 
> Wolfgang
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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 with \wordright in LMTX version 2020-08-03 14:25

2020-08-04 Thread Otared Kavian
Hi Hans,

Thanks for the hint which consists in adding an \ifmmode to the definition of 
\qed.
However, as you suggest, one needs some other mechanism in math mode, since 
with your new definition of \qed the alignment of the formula changes when one 
adds this close symbol:

 begin-example-qed.tex
\definesymbol[Fin][\mathematics{\square}]
\def\qed{\ifmmode\quad\symbol[Fin]\else\strut\wordright{\symbol[Fin]}\fi}
\starttext
\startformula
a^2 + b^2 = c^2.
\stopformula
\startformula
a^2 + b^2 = c^2. \qed
\stopformula
One sees that\type{\qed} in the formula changes the alignment of the formula. 
\qed 
\stoptext
 end-example-qed.tex

Thanks a lot for everything: Otared

> On 4 Aug 2020, at 13:24, Hans Hagen  wrote:
> 
> On 8/4/2020 11:17 AM, Otared Kavian wrote:
>> Thanks Hans for your explanations.
>> The problem I encountered is that, the command \qed is used dozens of time 
>> in my text without any issue because it was preceded by something on th 
>> eline, but the only place where it was alone after a formula resulted in the 
>> error and it was not easy for me to isolate the issue…
>> By the way, in mkii it was possible to add \qed on the last line of a math 
>> formula, but that does not work anymore:
>> \definesymbol[Fin][\mathematics{\square}]
>> \def\qed{\strut\wordright{\symbol[Fin]}}
>> \starttext
>> \startformula
>> a^2 + b^2 = c^2. \qed
>> \stopformula
>> The above formula does not show the close symbol.\qed
>> \stoptext
>> Is there a way to have something like \qed work in math formulas?
> because that's now hwpo wordright works ...
> 
> \def\qed{\ifmmode\quad\symbol[Fin]\else\strut\wordright{\symbol[Fin]}\fi}
> 
> but we probably need something different, something that hooks into display 
> math
> 
> Hans
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Bug with \wordright in LMTX version 2020-08-03 14:25

2020-08-03 Thread Otared Kavian
Hi Hans,

A file which used to be typeset correctly with the previous versions of lmtx, 
now produces an error. Despite the error message being extremely cryptic:

Error  ! Missing number, treated as zero

I could guess the origin of the bug, which seems to be \wordright,  but 
although the following minimal example shows a bug it does not produce the same 
ERROR output page:

 the square ''end of proof''
\definesymbol[Fin][\mathematics{\square}]
\def\qed{\wordright{\symbol[Fin]}}

\starttext
\startformula
a^2 + b^2 = c^2
\stopformula
\qed % the problem is here
\stoptext

In the above example if one adds something before \qed, then the square 
end-of-proof appears. 
However in my real file ConTeXt ouputs an error page and says: Error   ! 
Missing number, treated as zero.

Best regards: Otared




___
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] margin notes (was: lmtx update)

2020-08-01 Thread Otared Kavian
Hi Hraban,

Thanks for the hint… indeed I did see that \ColWidth command but didn't think 
about its definition… Sorry!

Now with \ColWidth defined, your code works fine and it has the advantage that 
the text of the sidenote begins in the margin at the level where the \footnote 
command appears. However, it cannot control the overflow of a sidenote to the 
next page, whereas the code given by Hans can do that. I admit that this does 
not happen very often since a well designed text should not have too many long 
sidenotes…

In case other users would like to use your code, I put the whole example below.

Best regards: Otared
%%% sidenotes, or footnotes in the margin
%%% example given by Hraban:
%%% here the tweaking of the width of the sidenote is turned off
%%% remove the comment where there is \ColWidth
%%% in order to adapt to your layout
\showframe
\setuplayout
[cutspace=7cm,
width=middle,
margin=5cm,
margindistance=7mm]

%\def\ColWidth{57mm}
\setupmargindata[inmargin]
[location=right,
stack=continue,
align=flushright,
]

\setupmargindata[inouter]
[location=right,
stack=continue,
align=flushright,
]

\def\FNVOffset{0} % Negative vertical offset of footnotes in lines
% Manual tweaking was necessary for a while, when stacking didn’t work reliably.

\def\MarginNote#1{%
\inmargin[
voffset=\dimexpr-\FNVOffset\lineheight\relax,
%   width=\ColWidth,
align=flushleft,
]{%
\inframed[
%   width=\ColWidth,
align=right,
frame=off,
offset=overlay,
strut=yes,
]{#1}%
}%
}

\define\PlaceFootnote{%
\inmargin[
voffset=\dimexpr-\FNVOffset\lineheight\relax,
%   width=\ColWidth,
]{%
\vtop{\placelocalnotes[footnote][before=,after=]}}%
}



\def\FNo#1{{#1~}}
% I never managed to get number and text in consecutive lines without indented 
text
% or at least a constant whitespace after the number.


\setupnote[footnote]
[location=text,
bodyfont=,
indenting=no,
before={\noindentation},
next=\PlaceFootnote,
]

\setupnotation[footnote]
[way=bychapter,
align=flushleft,
indenting=no,
location=serried,
alternative=serried,
width=broad,
numbercommand=\FNo,
] % footnote text

\setuptexttexts[margin][]
[%
{\framed[
align={flushright,bottom},
frame=off,
height=\textheight,
%   width=\ColWidth,
]{%
\strut\vfill\placenotes[footnote]}}%
]

\starttext
 \dorecurse{6}{\input ward\expanded{\footnote{This is a footnote 
\recurselevel}} }
test
\dorecurse{10}{
test \footnote{\input ward }\input tufte.tex \par
test \footnote{This is a note about Ward, who says: \par \input 
ward.tex} \input ward.tex \par
test \footnote{This is a note about Donald Knuth.} \input knuth.tex \par
}
This is a last note. \footnote{This last note is here to see what happens in 
the next page\dots\par \input knuth.tex}
\par 
\dorecurse{3}{\input knuth.tex }

\stoptext

> On 1 Aug 2020, at 23:01, Henning Hraban Ramm  wrote:
> 
> 
>> Am 01.08.2020 um 22:36 schrieb Otared Kavian :
>> 
>> Hi Hraban,
>> 
>> Thank you for taking the time to send your code for sidenotes.
>> Unfortunately when I add
>> 
>> \starttext
>> test\footnote{A footnote in the margin.}
>> \stoptext
>> 
>> to your code, I get an error and unfortunately with recent versions of LMTX 
>> the error message 
>> !  Undefined control sequence
>> is not helpful to find the error… (LMTX considers \footnote as an undefined 
>> control sequence…).
>> 
> 
> Of course it’s not \footnote that is undefined but something else from my 
> code – I didn’t take the time to strip it of all the references to other 
> setups in the same environment, probably \ColWidth that was just a shortcut 
> for the column width:
> \def\ColWidth{57mm}
> 
> Hraban
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

_

Re: [NTG-context] margin notes (was: lmtx update)

2020-08-01 Thread Otared Kavian
Hi Hraban,

Thank you for taking the time to send your code for sidenotes.
Unfortunately when I add

\starttext
test\footnote{A footnote in the margin.}
\stoptext

to your code, I get an error and unfortunately with recent versions of LMTX the 
error message 
!  Undefined control sequence
is not helpful to find the error… (LMTX considers \footnote as an undefined 
control sequence…).

Best regards: Otared

> On 1 Aug 2020, at 19:19, Henning Hraban Ramm  wrote:
> 
> 
> 
>> Am 01.08.2020 um 18:57 schrieb Otared Kavian :
>> 
>> Hi Hraban,
>> 
>> Thank you for reminding me of the solution cooked up by Wolfgang for you a 
>> few years ago. That solution works fine when the notes are short enough, but 
>> in some cases the notes in the margin bump into each other (indeed it is not 
>> a good habit to have long notes, but in some cases one cannot avoid them).
> 
> One essential bit is missing in the wiki example:
> 
> \setupmargindata[inmargin][
>  location=right,
>  stack=continue, % !!
>  align=flushright,
> ]
> 
> The code I’m actually using for our German literature magazine “Kritische 
> Ausgabe” is much more elaborated, but also cluttered with obsolete stuff – I 
> need to sort that out some time...
> (I only deleted some styling.)
> 
> %%% Footnotes / Marginals
> 
> \setupmargindata[inmargin][
>  location=right,
>  stack=continue,
>  align=flushright,
> ]
> \setupmargindata[inouter][
>  location=right,
>  stack=continue,
>  align=flushright,
> ]
> 
> \def\FNVOffset{0} % Negative vertical offset of footnotes in lines
> % Manual tweaking was necessary for a while, when stacking didn’t work 
> reliably.
> 
> \def\MarginNote#1{%
> \inmargin[
>  voffset=\dimexpr-\FNVOffset\lineheight\relax,
>  width=\ColWidth,
>  align=flushleft,
> ]{%
>  \inframed[
>width=\ColWidth,
>align=right,
>frame=off,
>offset=overlay,
>strut=yes,
>]{#1}%
>  }%
> }
> 
> \define\PlaceFootnote{%
> \inmargin[
>  voffset=\dimexpr-\FNVOffset\lineheight\relax,
>  width=\ColWidth,
> ]{%
>  \vtop{\placelocalnotes[footnote][before=,after=]}}%
> }
> 
> \def\FNo#1{{#1~}}
> % I never managed to get number and text in consecutive lines without 
> indented text
> % or at least a constant whitespace after the number.
> 
> \setupnote[footnote][
>  location=text,
>  bodyfont=,
>  indenting=no,
>  before={\noindentation},
>  next=\PlaceFootnote,
> ]
> 
> \setupnotation[footnote][
>   way=bychapter,
>   align=flushleft,
>  indenting=no,
>  location=serried,
>  alternative=serried,
>  width=broad,
>  numbercommand=\FNo,
> ] % footnote text
> 
> \setuptexttexts[margin][][%
>  {\framed[
>align={flushright,bottom},
>frame=off,
>height=\textheight,
>width=\ColWidth,
>  ]{%
>\strut\vfill\placenotes[footnote]}}%
> ]
> 
> 
> 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
> ___

___
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 update

2020-08-01 Thread Otared Kavian
Hi Hraban,

Thank you for reminding me of the solution cooked up by Wolfgang for you a few 
years ago. That solution works fine when the notes are short enough, but in 
some cases the notes in the margin bump into each other (indeed it is not a 
good habit to have long notes, but in some cases one cannot avoid them).

Best regards: Otared 

> On 1 Aug 2020, at 18:41, Henning Hraban Ramm  wrote:
> 
> 
>> Am 01.08.2020 um 15:20 schrieb Otared Kavian :
>> 
>> Regarding footnotes, would it be possible to have a built-in support for 
>> writing the footnotes in the margin? (For instance, assuming that the layout 
>> is such that for instance the right margin takes 1/3 of the page width, then 
>> the footnotes would occupy the right margin, beginning at the top).
> 
> I wanted to have footnotes in the margin, possibly starting in the same line 
> as the marker.
> 
> Wolfgang came up with this:
> https://wiki.contextgarden.net/Footnotes#..._but_not_at_the_bottom
> 
> (Not related to LMTX.)
> 
> Hraban
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] lmtx update

2020-08-01 Thread Otared Kavian
> On 1 Aug 2020, at 16:17, Hans Hagen  wrote:
> 
> On 8/1/2020 3:20 PM, Otared Kavian wrote:
>>> On 31 Jul 2020, at 10:32, Hans Hagen  wrote:
>>> 
>>> […]
>>> 
>>> Other work in progress is: better columns in itemize, esp proper footnote 
>>> support (not that I ever need that but I know users do so ...), experiments 
>>> work ok, but I need to check spacing. In general, footnotes (will) behave a 
>>> bit better, especially those used nested in other mechanisms. A side effect 
>>> of more control is that we can do other tricks too and we're playing with 
>>> it (kind of fun).
>> Hi Hans,
>> Thanks for your explanations.
>> Regarding footnotes, would it be possible to have a built-in support for 
>> writing the footnotes in the margin? (For instance, assuming that the layout 
>> is such that for instance the right margin takes 1/3 of the page width, then 
>> the footnotes would occupy the right margin, beginning at the top).
> It depends on what you want. This works ok:
> […]

Hi Hans,

That's great! Thanks a lot!
I have two questions in order to adapt what you sent to my case.
I played a bit with your second solution, as in:

%%% begin sidenote-Hans.tex
\showframe
\setupinteraction[state=start]
\setuplayout
[cutspace=7cm,
width=middle,
margin=5cm,
margindistance=7mm]

\setuptexttexts
[margin]
[] [{\directsetup{notabene}}]

\newbox\MyNoteOverflow
\setupnotation[endnote]
[interaction=yes,
after={\blank[big]}]

\startsetups notabene
\setbox\scratchbox\vbox
\bgroup
\setupalign[tolerant]
\ifvoid\MyNoteOverflow 
\else
\unvbox\MyNoteOverflow
\fi
\placenotes[endnote][before=,after=]
\egroup
\scratchdimen\dimexpr\textheight-.5\lineheight\relax
\ifdim\ht\scratchbox>\scratchdimen
\global\setbox\MyNoteOverflow\box\scratchbox
\setbox\scratchbox\vsplit \MyNoteOverflow to \scratchdimen
\fi
\vbox
\bgroup
\topskipcorrection
\unvbox\scratchbox
\vfilll
\egroup
\stopsetups

\startsetups notaflush
\doloop {
\page
\ifvoid\MyNoteOverflow
\exitloop
\else
\null \page
\fi
}
\stopsetups

\starttext

\dorecurse{10}{
test \endnote{\input ward }\input tufte.tex \par
test \endnote{This is a note about Ward, who says: \par \input 
ward.tex} \input ward.tex \par
test \endnote{This is a note about Donald Knuth.} \input knuth.tex \par
}
This is a last note. \endnote{This last note is here to see what happens in the 
next page\dots\par \input knuth.tex}
\par \input knuth.tex
%\setups{notaflush}
\stoptext
%%% end sidenote-Hans.tex

The first question is why did you define a setups called notaflush, and why 
your example works fine without using it ?

The second question is: the side notes are vertically centered in the margin 
(one can see this when the notes do not cover all the margin), which is fine 
for me. But, out of curiosity, what can be changed in the setups notabene in 
order to have the notes to begin at the top of the margin ?
(When a note runs into the next page, as in the last note, then it would be 
nicer to begin on top of the margin).

Thanks again: Otared K.
___
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 update

2020-08-01 Thread Otared Kavian
> On 31 Jul 2020, at 10:32, Hans Hagen  wrote:
> 
> […]
> 
> Other work in progress is: better columns in itemize, esp proper footnote 
> support (not that I ever need that but I know users do so ...), experiments 
> work ok, but I need to check spacing. In general, footnotes (will) behave a 
> bit better, especially those used nested in other mechanisms. A side effect 
> of more control is that we can do other tricks too and we're playing with it 
> (kind of fun).

Hi Hans,

Thanks for your explanations.

Regarding footnotes, would it be possible to have a built-in support for 
writing the footnotes in the margin? (For instance, assuming that the layout is 
such that for instance the right margin takes 1/3 of the page width, then the 
footnotes would occupy the right margin, beginning at the top).

Best regards: Otared

___
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] Error with latest upload

2020-07-28 Thread Otared Kavian
Hi Hans,

After updating to  current version: 2020.07.28 23:04, typestting the minimal 
test:

\starttext
test
\stoptext

results in:

runtime error : input file 'page-mcl.mkxl' is not found, quitting.

Best regards: OK

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Bug in latest LMTX

2020-07-21 Thread Otared Kavian
Hi Hans,

It seems that \cap is not anymore defined in the latest LMTX: the following 
gives an error

\starttext
$A \cap B$
\stoptext

with current version: 2020.07.21 18:39.

Also, I would like to place a request about the reporting of errors: can we get 
back the nice reporting of errors we had a few months ago? 
Indeed while a few months ago the reporting of errors was extremeley clear and 
helpful, now one gets a cryptic message like this in the html file produced:

Error  ! Missing } inserted
File   chapitre-1.tex
Line   834

Of course there is no missing } error in that file and that line, and one has 
to spend a lot of time to find what the error would be. In this case I could 
guess that the error comes from the fact that \cap is not defined, but it 
wasn't easy (the file used to typeset correctly with version 2020.07.13, and it 
typesets correctly with mkiv).
In eralier versions, ConTeXt would tell the user 
undefined control sequence \cap
and one could fix things very quickly.

Best regards, and please pardon my early morning request…
Otared
___
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 with current latest (2020.07.20)

2020-07-20 Thread Otared Kavian
Hi,
 
As far as I can see the latest LMTX does not create the format, so on my 
machine, when typesetting a file I get

error loading file: mult-fmt.lua (aborting)resolvers 
.
mtx-context | error, no format found with name: cont-en, aborting

So the problem is before any issue with PDF files, at least on Mac OS 10.14.

Best regards: Otared

> On 21 Jul 2020, at 00:03, Pablo Rodriguez  wrote:
> 
> On 7/20/20 9:44 PM, Garulfo wrote:
>> I don't know if there is link with this thread, but after update I get
>> the following with "context --make" or "context --make fr"
>> 
>> resolvers   > lua > unknown file 'mult-fmt.lua'
>> error loading file: mult-fmt.lua (aborting)resolvers   | formats |
> 
> Hans and Garulfo,
> 
> I’m afraid the current latest doesn’t generate PDF documents.
> 
> Sample code:
> 
>\starttext
>\input zapf
>\stoptext
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Code lua in a table

2020-07-18 Thread Otared Kavian


> On 18 Jul 2020, at 23:35, Otared Kavian  wrote:
> 
> 
> 
>> On 18 Jul 2020, at 22:25, Fabrice Couvreur  
>> wrote:
>> 
>> Hi Wolfgang,
>> 
>> It works but why did you ask this question since I finally use context ?
>> Are you sure you want to use context(...) here?
>> How not to display the .0 ?

Or even better, you can return an integer in your Binom function:

return math.round((n*Binom(n-1,k-1))/k)

Best regards: Otared
___
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] Code lua in a table

2020-07-18 Thread Otared Kavian


> On 18 Jul 2020, at 22:25, Fabrice Couvreur  
> wrote:
> 
> Hi Wolfgang,
> 
> It works but why did you ask this question since I finally use context ?
> Are you sure you want to use context(...) here?
> How not to display the .0 ?

Besides what Wolfgang suggested, ou can also use 
context(math.round(Binom(i,j)))
to have integers instead of real numbers.

Best regards: Otared
___
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] Text around a figure

2020-07-16 Thread Otared Kavian
Hi Fabrice,

Maybe you can play with different settings of your textbackground, as in

\definetextbackground[fondpaille]
[background=color,
backgroundcolor=fondpaille,
frame=off,
location=paragraph, % or: text, always, paragraph
backgroundoffset=4pt] % change the value here

Best regards: Otared

> On 16 Jul 2020, at 11:10, Fabrice Couvreur  
> wrote:
> 
> Hi Otared and Wolfgang,
> Thanks for your help ; the result is almost what I want (the space between 
> the text and the figure is not colored) but it is likely that we could not do 
> better.
> Fabrice
> 
> Le mer. 15 juil. 2020 à 22:25, Otared Kavian  a écrit :
> Hi Fabrice,
> 
> I think what Wolfgang suggests is something like the following:
> 
> \useMPlibrary[dum]
> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
> \definetextbackground[fondpaille]
> [background=color,
> backgroundcolor=fondpaille,
> frame=off,
> location=always]
> 
> \starttext
> 
> \starttextbackground[fondpaille]
> \startplacefigure[number=no,location=right]
> \externalfigure[dummy]
> \stopplacefigure
> \startitemize[n]
> \dorecurse{3}{\startitem \input ward \stopitem}
> \stopitemize
> \stoptextbackground
> 
> \stoptext
> 
> Best regards: Otared K.
> 
> > On 15 Jul 2020, at 22:13, Wolfgang Schuster 
> >  wrote:
> > 
> > Fabrice Couvreur schrieb am 15.07.2020 um 19:54:
> >> Hello,
> >> I always encounter difficulties with the placement of figures in such a 
> >> way that the text envelops the figure.
> >> Thank you.
> >> Fabrice
> >> \useMPlibrary[dum]
> >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
> >> \starttext
> >> \startframedtext[width=max,background=color,backgroundcolor=fondpaille]
> >>  \placefloat[][right,none]{}
> >>{\externalfigure[dummy]}
> >>  \startitemize[n]
> >>\dorecurse{3}{\startitem \input ward \stopitem}
> >>  \stopitemize
> >>\stopframedtext
> >>\stoptext
> > 
> > 
> > Side floats don't work in frames, use the textbackground environment to add 
> > a colored box behind the text.
> > 
> > Wolfgang
> > ___
> > If your question is of interest to others as well, please add an entry to 
> > the Wiki!
> > 
> > maillist : ntg-context@ntg.nl / 
> > http://www.ntg.nl/mailman/listinfo/ntg-context
> > webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> > ___
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Text around a figure

2020-07-15 Thread Otared Kavian
Hi Fabrice,

I think what Wolfgang suggests is something like the following:

\useMPlibrary[dum]
\definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
\definetextbackground[fondpaille]
[background=color,
backgroundcolor=fondpaille,
frame=off,
location=always]

\starttext

\starttextbackground[fondpaille]
\startplacefigure[number=no,location=right]
\externalfigure[dummy]
\stopplacefigure
\startitemize[n]
\dorecurse{3}{\startitem \input ward \stopitem}
\stopitemize
\stoptextbackground

\stoptext

Best regards: Otared K.

> On 15 Jul 2020, at 22:13, Wolfgang Schuster 
>  wrote:
> 
> Fabrice Couvreur schrieb am 15.07.2020 um 19:54:
>> Hello,
>> I always encounter difficulties with the placement of figures in such a way 
>> that the text envelops the figure.
>> Thank you.
>> Fabrice
>> \useMPlibrary[dum]
>> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0]
>> \starttext
>> \startframedtext[width=max,background=color,backgroundcolor=fondpaille]
>>  \placefloat[][right,none]{}
>>{\externalfigure[dummy]}
>>  \startitemize[n]
>>\dorecurse{3}{\startitem \input ward \stopitem}
>>  \stopitemize
>>\stopframedtext
>>\stoptext
> 
> 
> Side floats don't work in frames, use the textbackground environment to add a 
> colored box behind the text.
> 
> Wolfgang
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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] Combining colors with matrices

2020-07-15 Thread Otared Kavian
Hi David,

Regarding matrices, below is an example. You can choose the names pmatrix, etc 
as you wish. There is even a module which allows you to compute the product of 
two matrices, etc (with \usemodule[m-matrix], see m-matrix.mkiv).

%% defining matrix with parentheses
\definemathmatrix[pmatrix]
[matrix:parentheses]
[simplecommand=pmatrix]

%% defining matrix with brackets
\definemathmatrix[bmatrix]
[matrix:brackets]
[simplecommand=bmatrix]
 
%% defining determinant with bars
\definemathmatrix[determinant]
[matrix:bars]
[simplecommand=thedeterminant]

\starttext
Let $A$ be the $3\times 3$ matrix defined by
\startformula
A := 
\startpmatrix
\NC 11 \NC 12 \NC 13 \NR
\NC 21 \NC 22 \NC 23 \NR
\NC 31 \NC 32 \NC 33 \NR
\stoppmatrix .
\stopformula
This matrix can also be dfined by the Matlab structure of a matrix:
\startformula
A := \pmatrix{11,12,13 ; 21, 22, 23 ; 31, 32, 33}
\stopformula
Compute the value of
\startformula
\alpha := \thedeterminant{11,12,13 ; 21, 22, 23 ; 31, 32, 33} = {\rm det}(A).
\stopformula
\stoptext

Best regards: Otared K.

> On 15 Jul 2020, at 15:38, David Eric Cox  wrote:
> 
> Can anyone direct me to either traditional ConTeXt math documentation on how 
> to produce matrices or tell me how to show a variable in bold red in MathML?  
> I am producing pdf files exclusively.
> 
> 
> Sent with ProtonMail Secure Email.
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Incorrect placement of a table with LMTX

2020-07-14 Thread Otared Kavian
Hi Fabrice,

You should enclose the table into \startplacetable... \stopplacetable as in:

\startplacetable[number=no]
% here put your xtable
\stopplacetable

Best regards: Otared


> On 14 Jul 2020, at 11:28, Fabrice Couvreur  
> wrote:
> 
> Hello,
> In my lessons, I often have to include tables, figures, ... in definitions, 
> theorems ...
> With the context engine it works fine but not with lmtx.
> Thanks for your help.
> Fabrice
> 
> \setupenumerations
>   [before={\blank},
>after={\blank},
>alternative=serried,
>title=yes,
>titleleft=,
>titleright=,
>prefix=yes,
>prefixsegments=chapter,
>way=bychapter,
>titlestyle=bold,
>width=broad]
> 
> \defineenumeration
>[definition]
>[text=Définition,
> number=yes,
> headcommand=\groupedcommand{}{.}, 
> style=italic]
> 
> \starttext
> 
> \startdefinition
>   \blank
>   \startxtable[align={lohi,middle},width=2cm,offset=0.8ex]
> \startxrow
>   \startxcell
> 1
>   \stopxcell
>   \startxcell
> 2
>   \stopxcell
> \stopxrow
> \startxrow
>   \startxcell
> 3
>   \stopxcell
>   \startxcell
> 4
>   \stopxcell
> \stopxrow
>   \stopxtable
> \stopdefinition
> 
> \stoptext
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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] Bad interaction between \setupinteraction and \defineenumeration

2020-07-07 Thread Otared Kavian
Thanks Wolfgang! 
Your patch seems to fix also another issue with the cross references in ConTeXt 
at least on MacOS and TeXShop. In principle a document typeset with TeXShop, in 
the resulting PDF when the pointer hovers above a link to a reference, TeXShop 
shows a small pop-up window where the reference is shown (for instance with the 
example sent by Jairo the text of Proposición is shown). This works fine with 
LaTeX documents typeset with TeXShop, but it didn't work at all with ConTeXt 
documents. After applying your patch and making the format, the feature works 
with some ConTeXt documents, such as the example sent by Jairo (but 
unfortunately the feature does not work in a large document where I tested it).

Best regards: Otared K.

> On 6 Jul 2020, at 20:48, Wolfgang Schuster 
>  wrote:
> […]
> 
> I'm not Hans but this fixed the problem for me (strc-con.mkiv):
> 
> \def\strc_constructions_register_yes[#1][#2]% #1=optional user data 
> #2=interfaced-settings
>  {\begingroup  % similar to structure so we might 
> generalize this
> ...
> \clf_setinternalreference
> -  prefix{\referenceprefix}%
> +  prefix{\currentconstructionreferenceprefix}%
>   reference {\currentconstructionreference}%
>   internal  \locationcount
>   view  {\interactionparameter\c!focus}%
> \relax
> ...
>   \fi}
> 
> Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Bad interaction between \setupinteraction and \defineenumeration

2020-07-06 Thread Otared Kavian
Hi Jairo,

If you remove
focus=standard
the interaction works fine.

Best regards: Otared K.

> On 6 Jul 2020, at 01:15, Jairo A. del Rio  wrote:
> 
> The following:
> 
> \setupinteraction[state=start,focus=standard,color=black,contrastcolor=black]
> \defineenumeration[proposition][alternative=top,text=Proposición,headalign=middle,numberconversion=R,headstyle=\WORDS,style=\emph,referenceprefix=prop]
> \starttext
> \startproposition[1]
> \dorecurse{10}{\input ward}
> \stopproposition
> \in[prop:1] 
> \stoptext 
> 
> works almost perfectly. However, the cross-reference does not work, even if 
> the number of the enumeration is displayed correctly. The example fails both 
> in LuaTeX and LuaMetaTeX. As I remember, the problem appeared as early as 
> 2019, so not a matter of a bad installation. Any ideas?
> 
> Cordially,
> 
> Jairo :)
> 
> ___
> 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] Converting a CSV file to a Lua table and Lua file

2020-07-04 Thread Otared Kavian
Hi all,

I have a bash script which converts a CSV file into a Lua table, which is then 
used in ConTeXt.
It works fine, but I wonder whether there is a code within LuaMetaTeX for doing 
this directly there (writing a new file which contains the Lua table). This 
would be more efficient and neater.

Thus a CSV file « example.csv » containing the lines:

X,Y,Z
0.05597,0.6612,0.8618
0.156804,0.8784,0.961
0.496804,0.8784,0.9324
0.176804,0.648,0.9643

would be converted and wriiten into a lua file « example.lua » containing the 
lines:

return{
--  {X,Y,Z},
{0.05597,0.6612,0.8618}
{0.156804,0.8784,0.961}
{0.496804,0.8784,0.9324}
{0.176804,0.648,0.9643}
}


Thanks in advance for any help: Otared K.
___
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 an array of pens

2020-06-22 Thread Otared Kavian
Thanks Taco!
I added this and Hans' explanations to the wiki:

https://wiki.contextgarden.net/variable_color

but could not set a better title for that page such as « Variable arrays of 
colors, pens, paths ». 

Best regards: Otared

> On 22 Jun 2020, at 09:28, Taco Hoekwater  wrote:
> 
> 
> 
>> On 22 Jun 2020, at 09:17, Otared Kavian  wrote:
>> 
>> Hi Hans,
>> 
>> After learning from you how to define an array of colors and paths, I would 
>> like to know how is it possible to define a variable pen size.
>> In the following working example below, I would like to replace 
>> 
>>  MyPens[j] := pencircle scaled 2pt ;
>> 
>> by something like
>> 
>>  MyPens[j] := pencircle scaled (2+j) pt ;
> 
> MyPens[j] := pencircle scaled ((2+j)*pt);
> 
> “pt” is just a multiplier variable in MetaPost. there is an
> implied multiplication operation, but that only works in
> bare-number cases. That is why you need 
> 
> (2+j)*pt
> 
> The outer parentheses are to prevent MetaPost from interpreting
> your line as 
> 
>  (pencircle scaled (2+j)) * pt;
> 
> Best wishes,
> Taco
> 
> 
> ___
> 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] How to define an array of pens

2020-06-22 Thread Otared Kavian
Hi Hans,

After learning from you how to define an array of colors and paths, I would 
like to know how is it possible to define a variable pen size.
In the following working example below, I would like to replace 

MyPens[j] := pencircle scaled 2pt ;

by something like

MyPens[j] := pencircle scaled (2+j) pt ;

but this does not work (neither do (2+j)*pt). 
Is it possible to specify the pen size according to the value of j, without 
using a structure like

if j == -1 :
MyPens[j] := pencircle scaled 1pt ;
elseif j == 0 :
MyPens[j] := pencircle scaled 2pt ;
else :
MyPens[j] := pencircle scaled 3pt ;
fi

(In my real example I have more than three values for j).

%% begin example-array.tex
\startMPpage
string MyColors[] ;
path   MyPaths [] ;
pen MyPens[] ;
for j = -1 step 1 until 1 :
MyPens[j] := pencircle scaled 2pt ; % I would like to say here 
(2+j) pt
endfor
MyPaths[-1] := (-1.5cm,1.5cm) -- (1.5cm,1.5cm) ; MyColors[-1] := 
"magenta" ; 
MyPaths[0] := (-2cm,2cm) -- (2cm,-2cm) ; MyColors[0] := "darkyellow" ;
MyPaths[1] := fullcircle scaled 3cm ; MyColors[1] := "darkred" ;
for j = -1 step 1 until 1 :
draw MyPaths[j] withpen MyPens[j] withcolor MyColors[j] ;
endfor
\stopMPpage
%% end example-array.tex

Best regards: Otared
___
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] How to define an array of colors in Metafun

2020-06-20 Thread Otared Kavian
Hi all,

I have a family of graphs to draw in Metapost and I would like to attribute a 
different color to each of them according to the value of a certain variable.
Assuming that the path mygraph(j) depends on the variable j, which is computed 
within a lua code and passed to Metapost, I wonder if it is possible to define 
an array of colors named mycolor, so that I could say

draw mygraph(j) withcolor mycolor(j) ;

Here the variable j takes integer values (say between 1 and 10), and one would 
have defined mycolor(1) through mycolor(10).

Thanks in advance for any help: Otared K.
___
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] Asymptote and lmtx

2020-06-13 Thread Otared Kavian
Hi all,

Recently I have been using (in a very elementary way) Metafun in order to 
visualize a small set of data in 2 dimensions, as a scattered set of labeled 
dots, and I wanted to do the same in 3 dimensions. Indeed one can write an 
analogous Metafun code for 3d, but I thought using Asymptote is more efficient. 
 
I saw that there is a module
m-asymptote.mkiv
in the distribution, but typesetting that file with lmtx or mkiv does not give 
the expected result.

Has anyone a working example of using Asymptote from within ConTeXt, from which 
I could begin to learn?

Thanks for any hint: Otared 
___
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] \startplacefigure and \startframedtext in lmtx

2020-06-10 Thread Otared Kavian
Hi,

I tried today's new version 2020.06.09, to see whether the issue I was 
reporting below is fixed.
Unfortunately it is not, and my fix with \dontleavehmode does not work anymore. 
Is there a way to fix the problem ?

Thanks in advance: Otared

> On 9 Jun 2020, at 11:04, Otared Kavian  wrote:
> 
> Hi all,
> 
> I just noticed that in lmtx, the commands \startplacefigure and 
> \startframedtext, when used together, do not behave in the same way as they 
> do in mkiv. 
> I wonder whether this is a permanent change or rather a buglet.
> 
> I found a fix around the issue, but since in my document I have a certain 
> number of cases where such combinations are used, I woul dlike to be sure to 
> not make a mistake by changing all the instances… Here is an example:
> 
> %% begin figure-framedtext.tex
> \useMPlibrary[dum]
> \defineexternalfigure[dummy] 
> 
> \starttext
> \startplacefigure[location=left,number=no,title={}]
>   \externalfigure[dummy][width=.45\textwidth]
> \stopplacefigure
> \dontleavehmode % if this is commented out then the text and the figure are 
> placed on top of each other
> \startframedtext[frame=off]
>   \input ward.tex
> \stopframedtext
> \stoptext
> %% end figure-framedtext.tex
> 
> In the above example the fix is to add \dontleavehmode between the figue and 
> the framedtext. If one comments out that line then the issue can be seen.
> 
> Thanks in advance for any help: Otared K.
> 

___
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] \startplacefigure and \startframedtext in lmtx

2020-06-09 Thread Otared Kavian
Hi all,

I just noticed that in lmtx, the commands \startplacefigure and 
\startframedtext, when used together, do not behave in the same way as they do 
in mkiv. 
I wonder whether this is a permanent change or rather a buglet.

I found a fix around the issue, but since in my document I have a certain 
number of cases where such combinations are used, I woul dlike to be sure to 
not make a mistake by changing all the instances… Here is an example:

%% begin figure-framedtext.tex
\useMPlibrary[dum]
\defineexternalfigure[dummy] 

\starttext
\startplacefigure[location=left,number=no,title={}]
\externalfigure[dummy][width=.45\textwidth]
\stopplacefigure
\dontleavehmode % if this is commented out then the text and the figure are 
placed on top of each other
\startframedtext[frame=off]
\input ward.tex
\stopframedtext
\stoptext
%% end figure-framedtext.tex

In the above example the fix is to add \dontleavehmode between the figue and 
the framedtext. If one comments out that line then the issue can be seen.

Thanks in advance for any help: Otared K.

___
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] Updating lmtx

2020-06-07 Thread Otared Kavian
Hi Hans,

Actually I was trying to fix the issue with \sqrt by updating to a newer 
version. But the patch you sent me in another message fixes the issue, so no 
need for an update today…
Thanks a lot!

Best regards: Otared

> On 7 Jun 2020, at 12:09, Hans Hagen  wrote:
> 
> On 6/7/2020 11:34 AM, Otared Kavian wrote:
>> Hi all,
>> When I run
>>  sh install.sh
>> in order to update my installation of LuaMetaTeX, I keep getting version 
>> 2020.05.25 23:39.
>> Is this the latest version, or have I an issue with the install script?
> There have been no updates last week ... there are couple of new mechanisms 
> coming and i'm making the low level token interface a bit more abstract and 
> user friendly so updating now is kind of tricky (and before I do I'd like 
> Wolfgang also has to do some checking as he know what's going on deep down).
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Updating lmtx

2020-06-07 Thread Otared Kavian
Hi all,

When I run
sh install.sh
in order to update my installation of LuaMetaTeX, I keep getting version 
2020.05.25 23:39. 
Is this the latest version, or have I an issue with the install script?

Thanks in advance for any help: Otared K.


___
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] Numbers inside \sqrt are small

2020-06-06 Thread Otared Kavian
Hi Mikael,

Thanks to your message I discovered that in all my recent documents typeset 
with lmtx the \sqrt has a bug… Indeed the argument under the square root is  
too small.  (The version I have right now is 2020.05.25 23:39, after running sh 
install.sh).
It may be that it is related to the recent changes discussed in anther thread 
about the square root and friends.

I hope Hans will have time to fix the issue…

Best regards: Otared K.

> On 2 Jun 2020, at 14:47, Mikael Sundqvist  wrote:
> 
> Hi,
> 
> \starttext
> $2+\sqrt{2}$
> \stoptext
> 
> The output is attached. This happened with a release that are a bit old, as 
> well as with the most recent upgrade. LMTX.
> 
> /Mikael
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Writing the caption above figures in combinations

2020-06-01 Thread Otared Kavian
Hi Tomáš,

Thank you very much for your answer: you solved my problem perfectly!
I didn't know that one could use several nested 
\startplacefigure...\stopplacefigure.

Best regards: Otared

> On 1 Jun 2020, at 21:05, Tomas Hala  wrote:
> 
> Hi Otared,
> 
> the question is how complicated structures you are going to have... 
> Try the following code, I guess it works.
> (I did not solve distances between objects.)
> 
> Tomáš 
> 
> %%%
> 
> \setuppapersize[A2][A2]
> \setupcombination[offset=0cc,location=top,distance=1cc]
> 
> \starttext
> 
> \startplacefigure
> {\startplacefigure[location=none]
>  \startcombination[2*1]%
>{\startcombination[1*2]%
>  {\framed[width=6cm]{a}}{\externalfigure[image-1.pdf][width=6cm]}{}{} 
> %{a}
>\stopcombination%
> % OR
> %   {\startcombination[1*2]%
> % 
> {\framed[width=6cm]{a}}{}{\externalfigure[image-1.pdf][width=6cm]}{} %{a}
> %   \stopcombination%
>}{}%
>{\startcombination[1*2]%
>  
> {\framed[width=10cm]{b}}{}{\externalfigure[image-2.pdf][width=10cm]}{} %{b}
>  
> {\framed[width=10cm]{c}}{}{\externalfigure[-image-3.pdf][width=10cm]}{} %{c}  
>\stopcombination%
>}{}%
>  \stopcombination
> \stopplacefigure}
> {\startplacefigure[location=none]
>\startcombination[1*2]%
>  
> {\framed[width=20cm]{d}}{}{\externalfigure[image-4.pdf][width=20cm]}{}%{d}
>  {}%
>  {\startcombination[2*1]
>
> {\framed[width=10cm]{e}}{\externalfigure[image-5.pdf][width=10cm]} %{e}
>
> {\framed[width=10cm]{f}}{\externalfigure[-image-6.pdf][width=10cm]} %{f}  
>   
>  \stopcombination}
>  {}%
>   \stopcombination
> \stopplacefigure}
> \stopplacefigure
> 
> \stoptext
> 
> %%
> 
> 
> Mon, Jun 01, 2020 ve 04:58:52PM +0200 Otared Kavian napsal(a):
> # Hi Tomás,
> # 
> # Thank you for your help. That works for the simple combination I sent to 
> the list, but it does not work for another case in my document where I have 
> several combinations, as in the following:
> # 
> # \startplacefigure[location=none]
> # \startcombination[1*2]
> # {\startcombination[2*1]
> # 
> {\framed[width=6cm]{a}}{\externalfigure[image-1.pdf][width=6cm]} %{a} 
> # {\startcombination[1*2]
> # 
> {\framed[width=10cm]{b}}{\externalfigure[image-2.pdf][width=10cm]} %{b}
> # 
> {\framed[width=10cm]{c}}{\externalfigure[-image-3.pdf][width=10cm]} %{c}
> # \stopcombination}{}
> # \stopcombination}{}
> # {\startcombination[1*2]
> # 
> {\framed[width=20cm]{d}}{\externalfigure[image-4.pdf][width=20cm]} %{d}
> # {\startcombination[2*1]
> # 
> {\framed[width=7cm]{e}}{\externalfigure[image-5.pdf][width=7cm]} %{e}
> # 
> {\framed[width=8cm]{f}}{\externalfigure[image-6.pdf][width=8cm]} %{f}
> # \stopcombination}{}
> # \stopcombination}{}
> # \stopcombination
> # \stopplacefigure
> # 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Writing the caption above figures in combinations

2020-06-01 Thread Otared Kavian
Hi Tomás,

Thank you for your help. That works for the simple combination I sent to the 
list, but it does not work for another case in my document where I have several 
combinations, as in the following:

\startplacefigure[location=none]
\startcombination[1*2]
{\startcombination[2*1]

{\framed[width=6cm]{a}}{\externalfigure[image-1.pdf][width=6cm]} %{a} 
{\startcombination[1*2]

{\framed[width=10cm]{b}}{\externalfigure[image-2.pdf][width=10cm]} %{b}

{\framed[width=10cm]{c}}{\externalfigure[-image-3.pdf][width=10cm]} %{c}
\stopcombination}{}
\stopcombination}{}
{\startcombination[1*2]

{\framed[width=20cm]{d}}{\externalfigure[image-4.pdf][width=20cm]} %{d}
{\startcombination[2*1]

{\framed[width=7cm]{e}}{\externalfigure[image-5.pdf][width=7cm]} %{e}

{\framed[width=8cm]{f}}{\externalfigure[image-6.pdf][width=8cm]} %{f}
\stopcombination}{}
\stopcombination}{}
\stopcombination
\stopplacefigure

Here the first group containing image-1 and image-2, image-3 is misplaced.

Maybe there is a right setup for this, even if I don't have a caption below the 
whole figure (in the above figure I can avoid a caption).

Thanks again: Otared

> On 1 Jun 2020, at 14:51, Tomas Hala  wrote:
> 
> Hi Otared,
> 
> maybe there is a better, more system solution, but the following works:
> 
> \setupcaptions[figure][location=bottom]
> \startplacefigure[title={A combination of three figures}] % this title 
> appears below the figure
>  \startcombination[3*1]
>{\framed[width=4cm]{a}}{\externalfigure[image-1.pdf][width=4cm]} % a 
> appears above image-1
>{\framed[width=4cm]{b}}{\externalfigure[image-2.pdf][width=4cm]} % b 
> appears above image-2
>{\framed[width=4cm]{c}}{\externalfigure[image-3.pdf][width=4cm]} % c 
> appears above image-3
>  \stopcombination}{}
> \stopplacefigure
> 
> Best wishes,
> 
> Tomáš
> 
> Mon, Jun 01, 2020 ve 02:30:49PM +0200 Otared Kavian napsal(a):
> # Hi all,
> # 
> # Is it possible to write the individual captions for each element of a 
> combination of floats above it, while the caption for the figure appears 
> below?
> # 
> # \startplacefigure[title={A combination of three figures}] % this title 
> appears below the figure
> # \startcombination[3*1]
> # {\externalfigure[image-1.pdf][width=4cm]}{a} % a appears above 
> image-1
> # {\externalfigure[image-2.pdf][width=4cm]}{b} % b appears above 
> image-2
> # {\externalfigure[image-3.pdf][width=4cm]}{c} % c appears above 
> image-3
> # \stopcombination}{}
> # \stopplacefigure
> # 
> # I tried to define a new float, say myfigure, which has captions below and 
> then I tried 
> # 
> # \setupcaptions[location=top] 
> # 
> # and 
> # 
> # \setupcombinations[location=top]
> # 
> # but this does not work…
> # 
> # Thanks for any help: Otared
> # 
> ___
> # If your question is of interest to others as well, please add an entry to 
> the Wiki!
> # 
> # maillist : ntg-context@ntg.nl / 
> http://www.ntg.nl/mailman/listinfo/ntg-context
> # webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> # archive  : https://bitbucket.org/phg/context-mirror/commits/
> # wiki : http://contextgarden.net
> # 
> ___
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Writing the caption above figures in combinations

2020-06-01 Thread Otared Kavian
Hi all,

Is it possible to write the individual captions for each element of a 
combination of floats above it, while the caption for the figure appears below?

\startplacefigure[title={A combination of three figures}] % this title appears 
below the figure
\startcombination[3*1]
{\externalfigure[image-1.pdf][width=4cm]}{a} % a appears above 
image-1
{\externalfigure[image-2.pdf][width=4cm]}{b} % b appears above 
image-2
{\externalfigure[image-3.pdf][width=4cm]}{c} % c appears above 
image-3
\stopcombination}{}
\stopplacefigure

I tried to define a new float, say myfigure, which has captions below and then 
I tried 

\setupcaptions[location=top] 

and 

\setupcombinations[location=top]

but this does not work…

Thanks for any help: Otared
___
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] Is it possible to have a rotated label in Metafun?

2020-05-24 Thread Otared Kavian
Hi all,

In a graph which I am trying to draw with LuaMetafun, I have a variable the 
values of which I want to show on the graph rotated 90 degrees (or whatever 
other value).
Is it possible to do that?

An example is:

numeric a, u ; u := 10mm ;
a := 4.5 ;
label.bot(a, (10,-0.1) scaled u) % I would like to have printed 4.5 
rotated 90 degrees for instance.

Thanks in advance for any help: Otared

___
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] \mathopen, \Uover and friends

2020-05-09 Thread Otared Kavian
Hi Hans,

Thanks for the quick fix of today's upload. 
I could typeset your examples with \mathopen, \mathclose and these are great 
features in order to fine tune the spacing in math mode.

Regarding the new command \Uover, I thought maybe it would be more consistent 
to have the usual structure 
${1} \Uover {2}$ 
like the more friendly ${1} \over {2}$ instead of having
$\Uover{1}{2}$ 
which is more like the \frac structure.

Also a structure like
$\Uover style \textstyle{1}{2}$
seems a little bit far from the usual ConTeXt atmposphere… Would it not be 
possible to have
${1} \Uover[style=textstyle] {2}$ 
instead?

In any case, thanks a lot for the constant addition of cute features…
Best regards: Otared K.
___
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] Use \unit for value and uncertainty

2020-05-09 Thread Otared Kavian
Hi Benjamin,

Thanks for sharing your nice code, which is very useful.
However I wanted to let you know that it seems it does not work correctly with 
LuaMetaTeX version 2020.04.30 11:10, even though it works fine with ConTeXt 
mkiv.

Best regards: Otared K.

> On 9 May 2020, at 12:39, Benjamin Buchmuller  
> wrote:
> 
> I know this is quite an old thread, but here is a minimal parser (\units with 
> an “s”) that wraps around \digits and \unit to produce an acceptable output. 
> 
> As I frequently need to write ranges (or measures of uncertainty), I find it 
> convenient to able to type
> 
> \units{4.0 to 5.0 centi meter} 
> 
> than 
> 
> \digits{4.0}\,to\,\unit{5.0 centi meter}.
> 
> Also, the parser will take care of exponents and bracket them accordingly. :D
> 
> ranges: keyword “to”: 4.0 – 5.0 cm
> SEM:keyword “se”: 4.5 ± 0.5 cm
> SD: keyword “sd”: 4.5 (0.5) cm
> 
> If no keyword is present, the default behaviour is \unit{…}.
> 
> The code is not perfect (and the level of abstraction potentially not yet 
> sufficient to make it part of the phys-dim.mkiv source), but maybe helpful.
> 
> \starttext
> 
> \startluacode
>   userdata = userdata or {}
>   
>   function userdata.units(input)
>   
>   tbl = string.explode(input)
>   
>   if tbl[2] == "to" then
>   context.digits(tbl[1])
>   context.phys_units_space()
>   context("--")
>   context.phys_units_space()
>   context.unit(table.concat(tbl, " ", 3))
>   elseif tbl[2] == "se" then
>   local sx1 = string.split(tbl[1], "e")
>   local sx2 = string.split(tbl[3], "e")
>   if (sx1[2] == sx2[2]) and not (sx1[2] == nil) then
>   context("(")
>   context.digits(sx1[1])
>   context.phys_units_space()
>   context("±")
>   context.phys_units_space()
>   context.digits(sx2[1])
>   context(")")
>   context.digits("e" .. sx1[2])
>   context.phys_units_space()
>   context.unit(table.concat(tbl, " ", 4))
>   else
>   context.digits(tbl[1])
>   context.phys_units_space()
>   context("±")
>   context.phys_units_space()
>   context.unit(table.concat(tbl, " ", 3))
>   end
>   elseif tbl[2] == "sd" then
>   local sx1 = string.split(tbl[1], "e")
>   local sx2 = string.split(tbl[3], "e")
>   if (sx1[2] == sx2[2]) and not (sx1[2] == nil) then
>   context.digits(sx1[1])
>   context.phys_units_space()
>   context("(")
>   context.digits(sx2[1])
>   context(")")
>   context.digits("e" .. sx1[2])
>   context.phys_units_space()
>   context.unit(table.concat(tbl, " ", 4))
>   else
>   context.digits(tbl[1])
>   context.phys_units_space()
>   context("(")
>   context.digits(tbl[3])
>   context(")")
>   context.unit(table.concat(tbl, " ", 4))
>   end
>   else
>   context.unit(table.concat(tbl, " "))
>   end
>   
>   end
> \stopluacode
> 
> \def\units#1{\ctxlua{userdata.units("#1")}}
> 
> Car 1 drives \units{4 to 5.2 kilo meter per hour}.
> 
> Car 2 drives \units{30.1 to 40.5 kilo meter per hour}.
> 
> Car 3 drives \units{40.= to 50.= kilo meter per hour}.
> 
> The average speed was \units{35,000 se 5000 meter per hour}.
> 
> The average speed was \units{35e3 se 0.5e3 meter per hour}.
> 
> The average speed was \units{35.2e3 se 5e2 meter per hour}.
> 
> \stoptext
> 
> The average speed was \units{35.2 se 5e2 meter per hour}.
> 
> The average speed was \units{_3.2 sd 5 meter per hour}.
> ___
> 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] Current version 2020.05.09 08:55 not working

2020-05-09 Thread Otared Kavian
Hi Hans,

I just updated to the latest version 2020.05.09 08:55 but when trying your 
examples with \mathopenup and friends noticed that ConTeXt is stuck with 

resolvers > lua > loading file 
'/context-osx-64/tex/texmf-context/tex/context/base/mkiv/math-spa.lua' succeeded

or with

context report > file: cont-en-status.html

and other such messages.

Actually even with a simple example like

\starttext
Test
\stoptext

one cannot run the latest version at least on MacOS X (I did remove the texmf 
cache).

When in a Terminal window I issue the commands

context --make -all

I see that there is an error message like:

tex error > tex error on line 2981 in file math-ini.mkxl: ! Undefined 
control sequence

l.2981 \normalsupmarkmode
 \plusone % 2 also disable ^[^+] in text mode 

 

The control sequence at the end of the top line of your error message 
was never \def'ed. You can just continue as I'll forget about whatever was 
undefined.

Best regards: OK
___
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] updating mkiv

2020-04-18 Thread Otared Kavian
Thanks Mojca!
After updating I have now
current version: 2020.04.08 14:34

Best regards: Otared

> On 18 Apr 2020, at 11:28, Mojca Miklavec  
> wrote:
> 
> On Sat, 18 Apr 2020 at 11:25, Mojca Miklavec wrote:
>> On Sat, 18 Apr 2020 at 11:00, Otared Kavian wrote:
>>> 
>>> Is the latest version of ConTeXt mkiv the following:
>>>current version: 2020.01.30 14:13
>>> 
>>> I am asking this because after running
>>>sh firstsetup.sh
>>> that is what I get.
>> 
>> Maybe I messed something up when the zip names changed.
>> Let me check.
> 
> ... until I fix it, running
>first-setup.sh --context=latest
> should be a viable workaround.
> 
> Mojca
> ___
> 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] updating mkiv

2020-04-18 Thread Otared Kavian
Hi all,

Is the latest version of ConTeXt mkiv the following:
current version: 2020.01.30 14:13

I am asking this because after running
sh firstsetup.sh
that is what I get.

Best regards: OK
___
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] Colors in lmt_surface and luametafun

2020-04-17 Thread Otared Kavian
Hi Hans,

On page 36 of luametafun.pdf there is the following example of using 
lmt_surface:

\startMPcode{doublefun}
draw lmt_surface [
preamble  = "local sin, cos = math.sin, math.cos",
code = "sin(x*x) - cos(y*y)",
color = "f, f/2, 1-f",
color = "f, f, 0",
xstep = .02,
ystep = .02,
xvector = {-0.4, -0.4},
height = 10cm,
lines = true,
] xsized .TextWidth ;
\stopMPcode

What is the meaning of « f » in « color = "f, f/5, 1-f" »?
Is it possible to specify other colors and how can it be done?

Thanks for your attention: Otared 
___
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
___


  1   2   3   4   5   6   7   8   9   10   >