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
___


Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Otared Kavian
Hi Dalyoung,

I tested your code: it works fine with both definitions of the variable tt in 
your code. I am using the current LMTX version 2020.04.08 14:38.

Best regards: Otared

> On 11 Apr 2020, at 14:32, Jeong Dal  wrote:
> 
> Dear all,
> 
> I draw Pascal’s triangle with the label of each point created by using lua 
> functions.
> As you see in the code below, I defined fact(n) and combi(n,r) using lua.
> For the calculation tt, I used two different methods.
> Both are working well when I run the given code.
> 
> But I got an error, when I added this code to a ConTeXt file composed product 
> and components,
> and using the second method, i.e. combi(n,r). The first method is still 
> working well.
> The error message is as following:
> 
> metapost log> loading metafun, including plain.mp version 1.004 for 
> metafun iv and xl
> metapost log> 
> luatex warning  > mplib: run script: [string "return mp.print(combi(0,0 
> ))"]:1: attempt to call a nil value (global 'combi')
> 
> metapost log> >> tt
> metapost log> >> vacuous
> metapost log> ! Equation cannot be performed (numeric=vacuous).
> metapost log>  
> metapost log>;
> metapost log>  ...(0)&","(EXPR0)&" ))");
> metapost log>   
> now:=start+(EXPR0)*right*d...
> metapost log>  now--(now+A);draw.now--(now+B);endfor
> metapost log>   ; ENDFOR
> metapost log> <*> ...now+A); draw now -- (now+B); endfor; endfor
> metapost log>   ;;
> 
> I don’t know why the same code treated differently.
> I think that I have to do something more in luacode which I don’t know.
> Comments are wellcome!
> 
> Best regards,
> 
> Dalyoung
> 
> %%%
> 
> \startluacode
> function fact (n)
>   if n <= 0 then
> return 1
>   else
> return n * fact(n-1)
>   end
> end
> function combi(n,r)
>return fact(n)/(fact(r)*fact(n-r))
> end
> \stopluacode
> \startbuffer[fig121]
> numeric n,r,s,u,dx,dy,tt; u := 1.8cm;
> path p, q;
> pair A,B,start,now;
> A := dir(210)*u;
> B := dir(-30)*u;
> dy := sind(30)*u;
> dx := 2*cosd(30)*u;
> for n=0 upto 4:
>start := n*dir(210)*u;
>for r=0 upto n:
>   s := n-r;
> % tt := lua("mp.print(fact(" & decimal n & ")/(fact(" & decimal r & 
> ")*fact(" & decimal s &" )))");
>   tt := lua("mp.print(combi(" & decimal n & "," &  decimal r & " ))");
>   
>   now := start+r*right*dx;
>   dotlabel.top(textext("$\displaystyle {" & decimal n & "\choose" & 
> decimal r & "} = "& decimal tt & "$"),now);
>   draw now -- (now+A);
>   draw now -- (now+B);
>endfor;
> endfor;
> \stopbuffer
> \starttext
> \switchtobodyfont[11pt]
> \processMPbuffer[fig121]
> \switchtobodyfont[12pt]
> \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] Exercise file with statements and correction

2020-03-17 Thread Otared Kavian
Hi Fabrice,Here is a model written with the help of Wolfgang Schuster.Let me know if you need more help.

interactive-question-hint-answer-2.tex
Description: TeX document


interactive-question-hint-answer-2.pdf
Description: Adobe PDF document
On 17 Mar 2020, at 21:14, Fabrice Couvreur  wrote:Hello,I would like to make files with statements of exercises and correction where it would be enough to click on "correction" to access the correction at the end of the file. I'm running out of time, does anyone have a model to share ?Thank you so much.Fabrice
___If your question is of interest to others as well, please add an entry to the Wiki!maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-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] Quizz

2020-03-16 Thread Otared Kavian

> On 16 Mar 2020, at 11:14, Hans Hagen  wrote:
> 
> On 3/15/2020 10:34 AM, Fabrice Couvreur wrote:
>> […]
> 
> there are some examples of form stuff in the test suite (widgets)
> 
> i'll send you a file from 2000 that does some mpc magic (including feedback 
> and score calculations) but it's mkii (so you need to run pdftex). Maybe I 
> should check it with mkiv too.

Could you please tell us where to find that file, even if it is only with mkii? 
(I need to prepare some material for my students, for the same reason as 
Fabrice…).

Thanks in advance: 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 do I set TeXShop to use mtxrun on a .tex file?

2020-02-29 Thread Otared Kavian
Hi Gerben,

There is a dedicated page for this:

https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_on_MacOS

Please have a look to the section 
Running LMTX from TeXShop

Best regards: OK

> On 29 Feb 2020, at 12:34, Gerben Wierda  wrote:
> 
> I’d like to use TeXShop.app for my development. How do I set TeXShop.app to 
> use my standalone ConTeXt?
> 
> G
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] margintext and floats in the margin

2020-01-29 Thread Otared Kavian
Hi,

Is it possible to put some short notes in the margin, together with a float?
Below is an example, which puts the float on top of the text in the margin.
The option « stack=yes » works fine for the margintext when there is no float, 
but it does not seems to be an option which puts the figure and margintext in a 
sort of stack.

Thanks for any advice: Otared K.

% begin margintext-float.tex
\setuppapersize[A4][A4]
\setuplayout[
width=120mm,
leftmargin=25mm,rightmargin=50mm]

\setupmargindata[margintext]
[align=raggedright,
stack=yes,
location=outer,
style={\rm}]

\showframe
\startbuffer[sine]
numeric u ; u = 5mm ;
draw function (1,"x","1.5*sin(x)",0,710/113,.01) scaled u 
withcolor transparent(1,.5,darkblue) 
withpen pencircle scaled 2pt ;
\stopbuffer

\starttext

This is some text.\margintext{This is a remark in the margin.}
This is some more text.\margintext{This text is also in the margin.}
\startplacefigure[location=outermargin,number=no]
\scale[width=\rightmarginwidth]{\processMPbuffer[sine]}
\stopplacefigure

\stoptext
% end margintext-float.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
___


[NTG-context] margintext and floats in the margin

2020-01-26 Thread Otared Kavian
Hi,

Is it possible to put some short notes in the margin, together with a float?
Below is an example, which puts the float on top of the text in the margin.
The option « stack=yes » works fine for the margintext when there is no float, 
but it does not seems to be an option which puts the figure and margintext in a 
sort of stack.

Thanks for any advice: Otared K.

% begin margintext-float.tex
\setuppapersize[A4][A4]
\setuplayout[
width=120mm,
leftmargin=25mm,rightmargin=50mm]

\setupmargindata[margintext]
[align=raggedright,
stack=yes,
location=outer,
style={\rm}]

\showframe
\startbuffer[sine]
numeric u ; u = 5mm ;
draw function (1,"x","1.5*sin(x)",0,710/113,.01) scaled u 
withcolor transparent(1,.5,darkblue) 
withpen pencircle scaled 2pt ;
\stopbuffer

\starttext

This is some text.\margintext{This is a remark in the margin.}
This is some more text.\margintext{This text is also in the margin.}
\startplacefigure[location=outermargin,number=no]
\scale[width=\rightmarginwidth]{\processMPbuffer[sine]}
\stopplacefigure

\stoptext
% end margintext-float.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] typing+framedtext: different behaviour between TL2017 and 2019

2020-01-17 Thread Otared Kavian
Hi Wolfgang,Indeed the sample sent by Tomas works fine with recent lmtx and mkiv, but with the mkiv version in TeXLive2019 one gets the result attached.This means that Tomas has to update to a newer version of ConTeXt…Best regards: OK

typing-and-framedtext.pdf
Description: Adobe PDF document
On 17 Jan 2020, at 19:40, Wolfgang Schuster  wrote:Tomas Hala schrieb am 17.01.2020 um 15:18:Hi all,if I compile the following (minimised) code with ConTeXt from TL2017,I receive expected result -- one framed gray box with correct width.\starttext\showframe\defineframedtext[MPT][background="" class="">\setuptyping[MP][before={\startMPT},after={\stopMPT},]\startMP bla \stopMP\stoptextNow I tried it with ConTeXt from TL2019 (TL2018 produces the same result as TL2019)and I have got _two_ boxes -- the outer one is correct and frames the typing environmentas in the past whereas the new box frames the text inside the typing.Your example works fine with the current beta and since you don't show the differences between the different installations there is nothing which can be done.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-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
___


[NTG-context] Historic ligatures with lucidaot

2020-01-16 Thread Otared Kavian
Hi all,

How can I add the so-called « historic ligatures », such as in st, ct, to a 
font (assuming it has that feature)?

For instance

\setupbodyfont[lucidaot]

\starttext

construction

\stoptext

does not show the historic ligature in « st » and in « ct »: how can I get them?

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] How to use in Metafun, a function defined in Lua

2019-12-28 Thread Otared Kavian
Hi all,

I would like to use a math function defined in lua in Metafun in order to draw 
its graph, together with the graphs of some other functions.
As a simple example consider the following:

%%% begin lua-metafun-example.tex
\startluacode 
function document.myfunction(n,x)
local S
S = math.sin(n*x)
return S
end
\stopluacode

\starttext

Here \type{document.myfunction(n,x)} is $\sin(nx)$. For instance when $n = 2$ 
and $x = 355/113$ we have:

\type{document.myfunction(2,355/113)} 
$=\cldcontext{document.myfunction(2,355/113)} \sim 0$.

\startplacefigure[title={Nothing works\dots}]
\startMPcode{GridAxis}
numeric gu ; gu = 5mm ; % gu = graph unit
draw image (
draw function (1,"x","document.myfunction(2,x)", % <-- this does not 
work
%   draw function (1,"x","sin(2*x)", % <-- this works
-355/113,355/113,.01)
scaled gu 
withpen pencircle scaled .075pt
withcolor darkred ;
) xsized .7TextWidth ;
\stopMPcode
\stopplacefigure

\stoptext
%%% end lua-metafun-example.tex

Here one sees that the function « document.myfunction » is well defined in Lua 
and is known in ConTeXt, but I cannot use it in a Metapost code: how can one do 
that?

Thanks in advance for any help.
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 use together lmt_axis, lmt_grid and lmt_function

2019-12-22 Thread Otared Kavian
Hi,

I am experimenting the new LuaMetaTeX features introduced recently, but I can't 
get the built-in features together.

To explain the problem I encounter, I want to draw the graph of a function on a 
grid in which the x-axis and the y-axis are alos drawn.
Now lmtx has the « instances » (if I am not wrong…) named lmt_axis, lmt_grid 
and lmt_function which separately work fine, but I dont see how to use them 
simultaneously by keeping the correct scaling. 
In the minimal example below, copied from luametafun.pdf, the graph of the 
function $f(x) := (x - 1)^2$ should be drawn by showing its minimum at $x = 1$, 
and its value at $x = 0$ should be equal to 1. However the graph on the grid 
does not show this. Moreover the axes do not match the grid.

This means that I have not understood how to give the same units and scales in 
the three instances lmt_axis, lmt_grid and lmt_function.

Thanks for any help: Otared K.
PS: here is a minimal example
% begin grid-axis-function.tex
\starttext
\startplacefigure 
\startMPcode{doublefun} 
draw lmt_grid [
nx = 10, 
ny = 10,
dx = 1, 
dy = 1 
] xsized 5cm withpen pencircle scaled .1pt withcolor "darkblue" ;

draw lmt_axis [
nx = 10,
ny = 10,
dx = 1, 
dy = 1, 
] xsized 5cm withpen pencircle scaled .5pt withcolor "darkred" ;

draw lmt_function [
xmin =  0, xmax = 2, xstep = .05,
ymin = 0, ymax =  1.5,
code = "(x - 1)*(x - 1)", 
] xsized 5cm withpen pencircle scaled .75pt ;
\stopMPcode
\stopplacefigure
\stoptext
% end grid-axis-function.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] Style for captions

2019-12-18 Thread Otared Kavian
Hi Wolfgang and Aditya,

Thanks for the explanations: the confusion for me came from the fact that I had 
already use \tfa for a title containing inline maths, and could not imagine 
that \tfx does not apply to inline maths. Is there reason for this difference?

That said the solution with style=smallitalic makes sense and one can remember 
it.

Best regards: OK

> On 18 Dec 2019, at 17:32, Wolfgang Schuster 
>  wrote:
> 
> Aditya Mahajan schrieb am 18.12.2019 um 13:52:
>> On Wed, 18 Dec 2019, Otared Kavian wrote:
>> 
>>> Hi all,
>>> 
>>> In the example below, I would like to have the style of the figure's 
>>> caption to be \itx, but the inline formula is set with a larger body font: 
>>> is it possible to setup the caption of a float so that a smaller size 
>>> applies also to the math formula?
>>> 
>>> Best regards: Otared
>>> PS: here is the example (not so minimal, sorry…)
>>> % begin example-caption.tex
>>> \setupcaption[figure][
>>> headstyle={\bix},
>>> style={\itx}]
>> 
>> style={\switchtobodyfont[small]\setupinterlinespace\it}
> 
> \setupcaption
>   [figure]
>   [headstyle=bold,
>style=smallitalic]
> 
> 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] Style for captions

2019-12-18 Thread Otared Kavian
Thanks Aditya! That solve smy issue.
However, it is a bit of magic to know that \setupinterlinespace makes also the 
math font small, even for inline math.

Best regards: OK

> On 18 Dec 2019, at 13:52, Aditya Mahajan  wrote:
> 
> On Wed, 18 Dec 2019, Otared Kavian wrote:
> 
>> Hi all,
>> 
>> In the example below, I would like to have the style of the figure's caption 
>> to be \itx, but the inline formula is set with a larger body font: is it 
>> possible to setup the caption of a float so that a smaller size applies also 
>> to the math formula?
>> 
>> Best regards: Otared
>> PS: here is the example (not so minimal, sorry…)
>> % begin example-caption.tex
>> \setupcaption[figure][
>>  headstyle={\bix},
>>  style={\itx}]
> 
> style={\switchtobodyfont[small]\setupinterlinespace\it}
> 
> 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] Style for captions

2019-12-18 Thread Otared Kavian
Hi all,

In the example below, I would like to have the style of the figure's caption to 
be \itx, but the inline formula is set with a larger body font: is it possible 
to setup the caption of a float so that a smaller size applies also to the math 
formula?

Best regards: Otared
PS: here is the example (not so minimal, sorry…)
% begin example-caption.tex
\setupcaption[figure][
headstyle={\bix},
style={\itx}]
\starttext

\startluacode 
function weierstrass(n,x)
local S = 0
for k = 0, n do
S = S + 2^(-k)*math.cos(3^k*x)
end
return S
end
\stopluacode

\startplacefigure[title={The Weierstrass function $\sum_{k=0}^n 
2^{-k}\cos(3^kx)$}]
\startMPcode{doublefun} 
draw lmt_function [
xmin = 0, xmax = 4*355/113, xstep =.001, 
ymin = -2, ymax = 2,
sx = 1mm, xsmall = 80, xlarge = 20, 
sy = 4mm, ysmall = 40, ylarge = 4,
xlabels = "yes",
ylabels = "yes",
linewidth = .015mm, offset = .1mm,
code = "weierstrass(5,x)",
frame = "sticks",
xcaption = "$n = 5$",
functions = {
[
drawcolor = "darkred",
]
}
] xsized .5TextWidth ;
\stopMPcode
\stopplacefigure

\stoptext
% begin example-caption.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
___


[NTG-context] Very strange behaviour of itemize, \quotation and \dots

2019-12-17 Thread Otared Kavian
Hi Hans,

Last week I sent you a PDF showing a strange behaviour of \startitemize and 
\quotation in LMTX. I finally could nail down the origin of the problem: it 
seems that if the command
 
\setupsynctex[state=start]

is present twice at the beginning of the document, then the combination \item 
and \quotation and \dots prevents the item to be shown correctly…
(In my case I was typesetting a document with the above command in which a file 
containing it also was \input).

Below is the minimal example and its PDF.

Best regards: OK
% begin file: bug-itemize-lmtx.tex

\setupsynctex[stat=start]

\setupsynctex[state=start] % if this is removed then everything is fine…

\setupquotation[style=italic,left={«~},right={~»}]

\showframe
\starttext

\startitemize[n]

\dorecurse{4}{\item This item \quotation{is shown correcly\dots} 

\item This item \quotation{\dots is not shown correctly}}

\stopitemize

\stoptext
% end file: bug-itemize-lmtx.tex



bug-itemize-lmtx.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] LMTX Tagging and overlay

2019-12-15 Thread Otared Kavian
Hi Rik,

I can confirm that with lmtx the issue persists with 2019.12.15 17:34.
However it works fine with mkiv version 2019.12.12 19:23.

Best regards: OK

> On 16 Dec 2019, at 00:17, Rik Kabel  wrote:
> 
> Tested with 20191212 and 20191215, still not working. Is anyone else been 
> able to confirm the issue?
> 
> -- 
> Rik
> 
> On 12/10/2019 23:36, Rik Kabel wrote:
>> Dear list,
>> 
>> With the example below (perhaps not minimal, but I have stripped out as much 
>> as I could), the second page is set completely in the color of the overlay. 
>> This also happens when a layer is used instead of an overlay. When tagging 
>> is turned off, the colors are what they should be. When a few lines are 
>> removed from the first page, the colors are correct as well, but ...
>> 
>> Attached is the resulting pdf.
>> 
>> LMTX 20191206 only. MKIV 20191206 is fine.
>> 
>> Error on my part, or bug?
>> 
>> % \definelayer   [WatermarkOverlay]
>> %[repeat=yes,
>> % width=\paperwidth,
>> % height=\paperheight]
>> % \setlayerframed[WatermarkOverlay]
>> %[preset=center]
>> %[foregroundcolor=red,frame=off]
>> %{\scale[factor=max]{\rotate[rotation=60.0]{~Oops!~}}}
>> 
>> \defineoverlay   [WatermarkOverlay]
>>  [{\framed[frame=off,
>>foregroundcolor=red]
>>   {\scale[factor=max]
>>{\rotate[rotation=60.0]
>> {~Oops!~]
>> 
>> \setupbackgrounds[page]
>>  [background=WatermarkOverlay]
>> 
>> %setuptagging[state=stop]
>> \setuptagging[state=start]
>> 
>> \setuplanguage   [en]
>>  [spacing=packed]
>> \setupinterlinespace [2.2ex]
>> \definenarrower  [MidOneEm]
>>  [middle=1em]
>> \setuplayout [topspace=0.25in,
>>   footerdistance=0in,
>>   height=fit,
>>   width=27em,
>>   footer=0.5in,
>>   bottom=0.25in,
>>   backspace=1.1in]
>> \definepapersize [octavo]
>>  [width=6in,
>>   height=9in]
>> \setuppagenumbering  [location=]
>> \setuppapersize  [octavo]
>> \setupbodyfont   [Termes,10pt]
>> 
>> \starttext
>> 
>> \starttitle  [title={N aa aaa }]
>> 
>> \startsubject[title={B}]
>>   Faaa aaa {\em Naa Yaaa T}  aa C 22, 9990 (
>>   999):
>> \startnarrow [MidOneEm]
>>   {\bi Maaa Fa, 86; R Laaa aaa Pa Ta Ba a La}
>> 
>>   Da.~Fa, a  aa aaa Ja I aa Raaa, aa aa
>>   a  Ta Ia aa Wa Haa  1925 aa 1928. Ha
>>   aaa  a aa a aa Caaa Ta Ra Sa aaa
>>   aa M 1930 a aaa   a aaa aa aa 83a Sa
>>   aaa Caa Paaa Waaa. A a a, aa   aaa aa
>>   a, aaa  aa aa aa a aaa aa aa aa
>>   “aaa a a a.”
>> 
>>   “P a aa,” R Fa  aa aaa aa aa
>>   aaa, “aaa a  aa aa aa, aa a,
>>   aa a, aa aa aaa  aaa  aa aa
>>    aa aaa aa,  a aa aa  aaa
>>   aaa . Taa a aaa aa aaa , aaa aaa
>>   aaa a a.”
>> 
>>   Eaa, aa aaa a Paa aa a “ a” aaa
>>   aaa a aaa S P aaa aaa Paaa aaa aa
>>   Na Ta.
>> 
>>   Aaa aa aaa  aa aaa  a.
>> 
>>   A aa  Caaa Ua Laa Sa aa 1933, aa aaa
>>   aaa aa aaa aaa Aaaa-Naaa La aaa aaa aaa Ga-Aaaa
>>   Baaa. Ha aaa  aaa aa aaa Naa Yaaa B aa Ra aaa
>>   aaa aa aaa aaa. Ha aa a  aa aaa aa aaa
>>   aa Naa Yaaa S.
>> \stopnarrow
>> 
>>   Fa  aa aa aaa  aaa aaa a aa aaa
>>   R Ra Caa.
>> 
>>   A aa aaa Faaa 30, 1967 {\em Naa Yaaa T} 
>>   ( 38), aaa , Da.~Ea Oaa Fa, aaa a  aa
>>   aa {\em Taa Jaa aa Daa}. Saa aaa a  aaa aaa
>>   a aaa   aa  aa aaa aaa
>>   Ia aa Raaa aaa Ha aa aa  a .
>> 
>>   Taa Fa’a aa aaa, Faaa M.~Fa (1894–1949) aaa a
>>   a aa a aa MIT. T aaa aaa, Wa A.~Fa
>>   (aaa  I  aaa aa’a aa aa a aaa
>>   ) aaa aa aaa  a aa aaa U.S.~H Maaa Ma
>>   aaa aa aa Daaa aa Raaa aaa  aaa 

Re: [NTG-context] math align broken

2019-12-15 Thread Otared Kavian
Hi Mikael,

II tested your example and can confirm the issue, using lmtx version: 
2019.12.15 17:34 on MacOS.

Best regards: OK

> On 15 Dec 2019, at 16:54, Mikael P. Sundqvist  wrote:
> 
> Hi,
> 
> I hope this report is not a duplicate of another one. I updated lmtx today 
> (from http://lmtx.pragma-ade.nl/install-lmtx/context-linux-64.zip, a fresh 
> install in the folder), and found some strange things with math:
> 
> The file
> 
> %%% EXAMPLE
> \starttext
> \startformula
> \startalign
> \NC \int e^{2x}\sin 3x\,dx\NC=\int\Im e^{(2+3i)x}\,dx\NR
> \NC\NC =\Im\int e^{(2+3i)x}\,dx\NR
> \NC\NC = \Im\Bigl(\frac{1}{2+3i}e^{(2+3i)}\Bigr)\NR
> \stopalign
> \stopformula
> From this we see that $\lim_{n\to+\infty}f(n)=0$.
> \stoptext
> %%%
> 
> gives the attached ex1.pdf. As we can see the spacing inside \startalign  
> \stopalign is wrong. Also, the "lim" in the example after the displayed 
> formula has disappeared.
> 
> Any clues?
> 
> /Mikael
> 
> (I tried in any case to remove cache and rebuild, but since it was a fresh 
> install, I could not see why it could help here. Thought I mention it 
> anyways.)
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Bug inline math in lmtx

2019-12-14 Thread Otared Kavian
Hi Hans,

It seems that the bug which was reported recently is again there: inline math 
does not show some symbols (lmtx version 2019.12.12 19:35).
However mkiv version 2019.12.12 19:23 MKIV beta  fmt: 2019.12.14  works fine.

Here is a minimal example.
\starttext

Let $f(x) := \sum_{n \geq 1}2^{-n}x^n$.

\stoptext

Best regards: OK



bug-sum-lmtx.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] "error not related to input file"

2019-12-14 Thread Otared Kavian
Hi,

Since I have also suffered somewhat from the cryptic (and often useless…) error 
messages, I understand your frustration :-)
Now, maybe if you do 
context --directives="system.showerror" myfile.tex
then you get a file named « myfile-status.html » which is more helpful.

Best regards: OK

> On 14 Dec 2019, at 17:57, Rudolf Bahr  wrote:
> 
> 
> On Sat, Dec 14, 2019 at 05:43:45PM +0100, Bahr Rudolf wrote:
>> 
>> Hello All,
>> 
>> In:
>> LuaMetaTeX, Version 2.03.3
>> ConTeXt  ver: 2019.12.12 19:35 MKIV beta  fmt: 2019.12.12  int: 
>> english/english
>> I get the following error message:
>> 
>> tex error   > error not related to input file:
>> tex error   >   tex: ! Emergency stop
>> tex error   >   lua: ?
>> tex error   >   mps: -
>> 
>> Sorry, no MWE available.
>> What does this message mean? [1] shows only an empty page.
>> To this point my programm does all what it should with the exception of 
>> creating
>> a grey pdf-file-page. My pdf-programs are okular and xpdf.
>> 
>> In:
>> LuaTeX, Version 1.11.2 (TeX Live 2020/dev)
>> ConTeXt  ver: 2019.12.12 19:23 MKIV beta  fmt: 2019.12.13  int: 
>> english/english
>> I get a "*" instead of the error message above. And again my program does 
>> all what
>> it should, but a grey pdf-page too.
>> 
>> Shure, there must be an error in my program. But where should I look for it?
>> I tried several MWEs, but they all worked at their best.
>> 
>> Please, any ideas?
>> 
>> Best wishes,
>> Rudolf
>> 
>> 
>> [1] https://wiki.contextgarden.net/error_not_related_to_input_file
>> 
> 
> 
> Sorry, I forgot:
> My program uses up to now mainly \startluacode ... \stopluacode.
> 
> Rudolf
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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

2019-12-13 Thread Otared Kavian
Hi Dalyoung,

I updated the wiki page for installing LuaMetaTeX on MacOS:

https://wiki.contextgarden.net/installing_luametatex

It would be useful if someone using Linux or Windows could add analogous 
instructions on that page.

Best regards: OK

> On 13 Dec 2019, at 00:48, Jeong Dal  wrote:
> 
> Dear Hans,
> 
> I downloaded the new beta today.
> It installs files and makes format file well.
> I compiled a test file without any problem.  
> Of course, there is a security issue of OSX, but allowing the execution in 
> the preference>security once, it doesn't ask about again.
> I also run a test file containing a new graphic feature of LMTX and I got a 
> nice output.
> 
> Thanks!!!
> 
> Best regards,
> 
> Dalyoung
> 
> P.S. Here is a beginning part of log file. I installed new beta in the folder 
> /Users/graph/ConTeXtC/
> 
> %%%
> resolvers   | formats | executing runner 'run luametatex format': 
> /Users/graph/ConTeXtC/tex/texmf-osx-64/bin/luametatex --jobname="test" 
> --fmt=/Users/graph/ConTeXtC/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
>  
> --lua=/Users/graph/ConTeXtC/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
>  cont-yes.mkiv --c:autopdf --c:currentrun=1 
> --c:fulljobname="/Users/graph/ConTeXtC/test.tex" 
> --c:input="/Users/graph/ConTeXtC/test.tex" --c:kindofrun=1 --c:maxnofruns=9 
> --c:purgeall --c:texmfbinpath="/Users/graph/ConTeXtC/tex/texmf-osx-64/bin"
> This is LuaMetaTeX, Version 2.03.3 
> open source > level 1, order 1, name 'cont-yes.mkiv'
> system  > 
> system  > ConTeXt  ver: 2019.12.06 21:40 MKIV beta  fmt: 2019.12.12  
> int: english/english
> system  > 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Using lmtx and new metafun

2019-12-12 Thread Otared Kavian
Hi Aditya,

Following your explanations in
https://adityam.github.io/context-blog/post/new-metafun-interface/
I wrote an environment in order to display the graph of a function on a grid 
which can be adapted to each case.

Assuming that I have an MPinstance named GridAxis (for example) which can 
dispaly a grid and axes, how can I call it and write a line such as
draw function (1,"x","x*x/4 - 2.5",xmin,xmax,.001) scaled sx  ;
without changing the part whichh is included in \startMPdefinitions, in oder to 
draw the above function on that grid ? 

Thanks for your help: Otared
PS: Here is my definition of GridAxis (I guess many parts of it could be better 
written…)

\defineMPinstance[GridAxis]  
[
format=metafun,
extensions=yes,
initializations=yes,
method=double,
]

\startMPdefinitions{GridAxis}

def GridAxisPlot = applyparameters "GridAxisPlot" "do_GridAxisPlot" enddef ;

presetparameters "GridAxisPlot" [
xmin = -2.5,  xmax = 2.5,
ymin = -2.5,  ymax = 2.5,

dx   = 1, dy   = 1,
sx   = 5mm,   sy   = 5mm,
scale = 0.5,

grid = true,
xaxisnumbers = true,
yaxisnumbers = true,
showmyorigin = true,

style = "\switchtobodyfont[8pt]",
];

vardef do_GridAxisPlot =
image (
pushparameters "GridAxisPlot";

newnumeric xmin, xmax, ymin, ymax;
xmin := getparameter "xmin";
xmax := getparameter "xmax";
ymin := getparameter "ymin";
ymax := getparameter "ymax";

newnumeric sx, sy;
sx := getparameter "sx";
sy := getparameter "sy";

newnumeric dx, dy;
dx := getparameter "dx";
dy := getparameter "dy";

newpath xaxis, yaxis;

xaxis := (xmin*sx, 0) -- (xmax*sx, 0)  ;
yaxis := (0, ymin*sy) --  (0, ymax*sy) ;

newpath xtick, ytick;
xtick := (-0.1sx, 0) -- (0.1sx, 0);
ytick := (0, -0.1sy) -- (0, 0.1sy);

newstring style;
style := getparameter "style";

pickup pencircle scaled .1mm ;
newboolean grid;
grid  := getparameter "grid";

newboolean xaxisnumbers ;
xaxisnumbers := getparameter "xaxisnumbers" ;

newboolean yaxisnumbers ;
yaxisnumbers := getparameter "yaxisnumbers" ;

for x = dx step dx until xmax :
if grid :
draw yaxis shifted (x*sx, 0) withcolor 0.75white ;
fi
draw ytick shifted (x*sx, 0);
if xaxisnumbers :
label.bot(style & decimal x, (x*sx, 0));
fi
endfor

newboolean showmyorigin ;
showmyorigin := getparameter "showmyorigin" ;

if showmyorigin :
label.lrt(style & "0", origin) ;
fi

for x = -dx step -dx until xmin :
if grid :
draw yaxis shifted (x*sx, 0) withcolor 0.75white;
fi
draw ytick shifted (x*sx, 0);
if xaxisnumbers :
label.bot(style & decimal x, (x*sx, 0));
fi
endfor

for y = dy step dy until ymax :
if grid :
draw xaxis shifted (0, y*sy) withcolor 0.75white;
fi
draw xtick shifted (0, y*sy);
if yaxisnumbers :
label.lft(style & decimal y, (0, y*sy));
fi
endfor

for y = -dy step -dy until ymin :
if grid :
draw xaxis shifted (0, y*sy) withcolor 0.75white;
fi
draw xtick shifted (0, y*sy);
if yaxisnumbers :
label.lft(style & decimal y, (0, y*sy));
fi
endfor


drawarrow xaxis;
drawarrow yaxis;

label.rt( style & "$x$",  (xmax*sx, 0));
label.top(style & "$y$", (0, ymax*sy));

newpair p ;

newnumeric scale;
scale := getparameter "scale" ;

popparameters;

)
enddef;
\stopMPdefinitions
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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

2019-12-11 Thread Otared Kavian
Actually I did the update with a new install.sh downloaded from Pragma's site, 
but in fact I got again the older version 2019.12.06 21:40…
So the issues I was reporting concern 2019.12.06 21:40 version.

> On 12 Dec 2019, at 06:28, Otared Kavian  wrote:
> 
> Hi Hans,
> 
> Thank you for the new beta. I tested a few things and they work nicely as 
> expected. 
> 
> However I would like to ask you to put back into lmtx the nice error messages 
> handling we had in early November: now when there is an error it is 
> impossible to locate it and the file filename-status.html contains nothing 
> (though the colored « error » pdf produced is nice looking…).
> In early November the error messages were very precise and the file 
> filename-status.html was very helpful.
> 
> There is also an issue in lmtx (since the version 2019.12.06, including the 
> latest) where in some situations using \startitemize... \stopitemize produces 
> some garbled items and some numbered items completely disappear. I could not 
> make a minimal example, but I can send you the PDF which shows the issue.
> 
> Many thanks, and best regards: OK
> 
> 
>> On 12 Dec 2019, at 01:37, Hans Hagen  wrote:
>> 
>> Hi,
>> 
>> The last few days there have been reports about garbled files in the lmtx 
>> installation so I did some test oinon a linux machine and indeed there was 
>> some issue (I'm not sure what causes it). Anyway, I made new zips so maybe 
>> one needs to reinstall (using the installer zip). It installs okay on wsl so 
>> probably also on other linuxes.
>> 
>> This version (luametatex 2.03.3) has (again) a little smaller mem footprint 
>> as I still want it all to perforem ok on relative small devices or vm's and 
>> as side effect a bit smaller format file, not that that matters much 
>> (compared to general mem usage). There is not much to gain anyway, in terms 
>> of memory usage and performance so it's more an occasional challenge than a 
>> neccessity I guess.
>> 
>> Anyway, hopefully nothing got broken. Peter Rolf and I are updating some of 
>> the pdf validation related stuff (additional formats), so that can be in 
>> flux.
>> 
>> 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] lmtx

2019-12-11 Thread Otared Kavian
Hi Hans,

Thank you for the new beta. I tested a few things and they work nicely as 
expected. 

However I would like to ask you to put back into lmtx the nice error messages 
handling we had in early November: now when there is an error it is impossible 
to locate it and the file filename-status.html contains nothing (though the 
colored « error » pdf produced is nice looking…).
In early November the error messages were very precise and the file 
filename-status.html was very helpful.

There is also an issue in lmtx (since the version 2019.12.06, including the 
latest) where in some situations using \startitemize... \stopitemize produces 
some garbled items and some numbered items completely disappear. I could not 
make a minimal example, but I can send you the PDF which shows the issue.

Many thanks, and best regards: OK


> On 12 Dec 2019, at 01:37, Hans Hagen  wrote:
> 
> Hi,
> 
> The last few days there have been reports about garbled files in the lmtx 
> installation so I did some test oinon a linux machine and indeed there was 
> some issue (I'm not sure what causes it). Anyway, I made new zips so maybe 
> one needs to reinstall (using the installer zip). It installs okay on wsl so 
> probably also on other linuxes.
> 
> This version (luametatex 2.03.3) has (again) a little smaller mem footprint 
> as I still want it all to perforem ok on relative small devices or vm's and 
> as side effect a bit smaller format file, not that that matters much 
> (compared to general mem usage). There is not much to gain anyway, in terms 
> of memory usage and performance so it's more an occasional challenge than a 
> neccessity I guess.
> 
> Anyway, hopefully nothing got broken. Peter Rolf and I are updating some of 
> the pdf validation related stuff (additional formats), so that can be in flux.
> 
> 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] problem with a new installation of LMTX: Solved!

2019-12-09 Thread Otared Kavian
Dear Dalyoung,

Thank you for the good news!
Now I will add  to the wiki the procedure I described, which you followed, but 
we have to find a way for people to get a zip file containing a complete tree 
of LuaMetaTeX which can be installed « by hand » under MacOS 10.15 Catalina.
Maybe Hans or Mojca have a suggestion in this regard.

Best regards: OK

> On 9 Dec 2019, at 15:21, Jeong Dal  wrote:
> 
> Dear Otared,
> 
> I followed your instruction.  During the process, “mtxrun —generate” and 
> “context —make —all” work well.
> 
> After rebooting the system, “context test.tex” produces a pdf output finally. 
> Wow!
> It is a long way around, but I learned many things.
> 
> Thank you for your help.
> 
> Best regards,
> 
> Dalyoung

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

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


Re: [NTG-context] problem with a new installation of LMTX

2019-12-08 Thread Otared Kavian
Dear Dalyoung,

I looked again at what is happening when installing LuaMetaTeX under MacOS 
10.15.

In fact, even after completely disabling Gatekeeper and SIP (System Integrity 
Protection), when running

sh install.sh

if the three files sitting in ~/context-os-64/bin/
mtx-install.lua
mtxrun
mtxrun.lua
are write protected then the installation cannot proceed. And if they are not, 
they are overwriiten with something with the same names but which are binaries. 
And if this is the case then the installation does not proceed for some other 
reasons.
I don't understand why this is the case…

If you can go back to MacOS 10.14 that would be nice, but otherwise as Floris 
suggests in his response, maybe we have to abandon MacOS in the near future…

Best regards: OK

> On 8 Dec 2019, at 09:12, Jeong Dal  wrote:
> 
> Dear Hans and Otared,
> 
> Thank you again for your attempt to find a solution.
> 
> Catalina(MacOS 10.15.1) prohibits an unauthorized program run.
> So I have to allow the execution of “mtxrun” manually in the preference.
> 
> Since "mtxrun —generate” ends with the message “unknown script 
> mtxrun-context.lua or mtx-mtxrun-context.lua”, I tried to locate it in the 
> finder. 
> There is one in a folder installed by MacTeX(TeXLive), but not in 
> “ConTeXtLMTX”.
> 
> As you said, many files are not copied during the installation.
> I’ll try to understand what is going on, but it would be very hard to find a 
> solution by myself.
> 
> I have to use old ConTeXt for a while.
> 
> Thank you again.
> 
> Best regards,
> 
> Dalyoung
> 
> 
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

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


Re: [NTG-context] problem with a new installation of LMTX

2019-12-07 Thread Otared Kavian
Hi Dalyoung,

I installed MacOS 10.15 Catalina on a partition of my Mac and tried to install 
LuaMetaTeX there. I did not succeed … 
Indeed I had to disable completely the Gatekeeper from the Terminal by issuing 
the command

sudo spctl --master-disable

(which, one can re-enable again by saying sudo spctl --master-enable).
But the problem is that  after issuing the command

sh install.sh

the three files mtx-install.lua, mtxrun.lua, mtxrun, which are in

/context-osx-64/bin/

get overwritten and are modified for some unknown reasons: in particular the 
two lua files become complete garbage… while in MacOS 10.14 these files are 
unchanged.
So in fact the installation process cannot continue in MacOS 10.15, and even 
though the directories in 

/context-osx-64/tex/

are created, the binaries and the formats are not there. I guess other people 
on the list may have installed LuaMetaTeX under MacOS 10.15 and they can help 
us understand what is going on. 

Later in the day I'll try to understand how to bypass the security assessments 
(and the overwrite of the above three files) of MacOS 10.15, and let you know 
if I find a solution.

Sorry for not being helpful at this point…

Best regards: Otared K.

> On 8 Dec 2019, at 00:20, Jeong Dal  wrote:
> 
> Dear Hans, Otared,
> 
> Thank you for your concern.
> 
> The version of luametatex is 20191206.
> I followed what Otared said, but texmf-cache is not created after mtxrun.
> 
> "context —make"  is running, but no format.
> 
> I checked folders after the installation.
> Folders, texmf-cache, texmf-fonts, texmf-local, texmf-modules, texmf-project 
> are empty.
> texmf folder contains {fonts,metapost, tex,web2c}
> texmf-context folder contains {colors,context,doc}
> However, I couldn’t find base files, script files, etc.
> Is it normal? Is it related with Catalina?
> 
> Have a nice weekend.
> 
> Best regards,
> 
> Dalyoung
> 
> For reference, here are log of "mtxrun —generate”
> %%
> MacBook ConTeXtLMTX % mtxrun --generate
> resolvers   | resolving | variable 'SELFAUTOLOC' set to 
> '/Users/graph/ConTeXtLMTX/tex/texmf-osx-64/bin'
> resolvers   | resolving | variable 'SELFAUTODIR' set to 
> '/Users/graph/ConTeXtLMTX/tex/texmf-osx-64'
> resolvers   | resolving | variable 'SELFAUTOPARENT' set to 
> '/Users/graph/ConTeXtLMTX/tex'
> resolvers   | resolving | variable 'TEXMFCNF' set to ''
> resolvers   | resolving | variable 'TEXMF' set to ''
> resolvers   | resolving | variable 'TEXOS' set to 'texmf-osx-64'
> resolvers   | resolving |
> resolvers   | resolving | using configuration specification 
> 'home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c'
> resolvers   | resolving |
> resolvers   | resolving | looking for regular 'texmfcnf.lua' on given 
> path '/Users/graph/texmf/web2c' from specification 'home:texmf/web2c'
> resolvers   | resolving | looking for regular 'texmfcnf.lua' on given 
> path '/Users/graph/ConTeXtLMTX/tex/texmf-local/web2c' from specification 
> 'selfautoparent:/texmf-local/web2c'
> resolvers   | resolving | looking for regular 'texmfcnf.lua' on given 
> path '/Users/graph/ConTeXtLMTX/tex/texmf-context/web2c' from specification 
> 'selfautoparent:/texmf-context/web2c'
> resolvers   | resolving | looking for regular 'texmfcnf.lua' on given 
> path '/Users/graph/ConTeXtLMTX/tex/texmf-dist/web2c' from specification 
> 'selfautoparent:/texmf-dist/web2c'
> resolvers   | resolving | looking for regular 'texmfcnf.lua' on given 
> path '/Users/graph/ConTeXtLMTX/tex/texmf/web2c' from specification 
> 'selfautoparent:/texmf/web2c'
> resolvers   | resolving | found regular configuration file 
> '/Users/graph/ConTeXtLMTX/tex/texmf/web2c/texmfcnf.lua'
> resolvers   | resolving |
> resolvers   | resolving | skipping configuration file 
> 'selfautoparent:/texmf/web2c/texmfcnf.lua' (no valid format)
> resolvers   | resolving | no texmf paths are defined (using TEXMF)
> resolvers   | resolving |
> mtxrun  |
> mtxrun  | elapsed lua time: 0.032 seconds
> 
> %%
> -MacBook ConTeXtLMTX % context --make
> mtxrun  | forcing cache reload
> resolvers   | resolving | configuration files already identified
> resolvers   | resolving | skipping configuration file 
> 'selfautoparent:/texmf/web2c/texmfcnf.lua' (no valid format)
> resolvers   | resolving | no texmf paths are defined (using TEXMF)
> resolvers   | resolving |
> mtxrun  | the resolver databases are not present or outdated
> resolvers   | resolving | using suffix based filetype 'scripts'
> resolvers   | resolving | remembering file 'mtx-context.lua' using hash 
> 'lua::mtx-context.lua'
> resolvers   | resolving | using suffix based filetype 'scripts'
> resolvers   | resolving | remembering file 'mtx-contexts.lua' 

Re: [NTG-context] problem with a new installation of LMTX

2019-12-07 Thread Otared Kavian

> On 7 Dec 2019, at 20:39, Hans Hagen  wrote:
> […]
> Can you add this to the wiki someplace?

Done:
https://wiki.contextgarden.net/installing_luametatex

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] Filling a page with \thinrules

2019-12-07 Thread Otared Kavian
Thanks Rik! The \phantom stuff is following me since the good old Plain TeX 
days… :-)
Now I know how to get rid of it.

Best regards: OK

> On 7 Dec 2019, at 16:33, Rik Kabel  wrote:
> […]
> 
> Replace the \hphantom{...} with \dontleavehmode.
> 
> -- 
> Rik

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

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


Re: [NTG-context] problem with a new installation of LMTX

2019-12-07 Thread Otared Kavian
Hi Dalyoung,

May be you could do the following steps (I recently had some issues too with 
installing the new beta, and these are what I did):

• In Terminal type:

which luametatex

in order to see whether 

/context-osx-64/tex/texmf-osx-64/bin/luametatex

is present or not. 

• If not the download has not been complete.

• If yes, in Terminal type:

luametatex --version

and see whether it says among other things:

Functionality : level 20191206

If not, there might be an issue with the files you have downloaded.

• If yes, in the folder 

context-osx-64/tex

remove the folder texmf-cache

and then in the Terminal run:

mtxrun --generate

In principle the folder texmf-cache is present again.

• In the Terminal window type:

context --make --all

If everything goes nicely, you should be able to see LuaMetaTeX functionning.

Best regards: OK

> On 7 Dec 2019, at 15:11, Jeong Dal  wrote:
> 
> I read some reports about the problems of a new installation of LMTX.
> Today, I did fresh install and also have a problem in compilation.
> 
> I did the following:
> 
> 0. Open the terminal
> 1. Remove all files in the folder “ConTeXtLMTX”
> 2. Download install files from PRAGMA ADE.
> 3. run “install.sh”(at first, it won’t run because of the MacOS Catalina. I 
> have to allow the running in the preference.)
> 4. it installs the folder “tex” and some files  but context-cache is empty. 
> And, it couldn’t compile test.tex
> 
> I copied the log during the installation for checking.
> 
> Thank you.
> Best regards,
> Dalyoung
> […]
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Filling a page with \thinrules

2019-12-07 Thread Otared Kavian
Hi Rik,

Thanks a lot for the link to that message dating back to 2010…

I tried to put that solution on the wiki but I could not create a new page. 
I'll try later.

For the record, below is a transcript of what I adapted from Wolfgang's 
solution, but maybe nowadays one could also right a more readable lua code to 
achieve the same.

Best regards: Otared K.

\define\thinrulesfillpage%
{
\hphantom{Answer} % this is necessary, I don't know why...
\blank  

\scratchcounter\dimexpr(\pagegoal-\pagetotal-2\lineheight)/(\dimexpr\lineheight+2.2ex\relax)\relax
\thinrules[n=\number\scratchcounter,inbetween={\blank[2.2ex]}]
\page
}

\showframe
\starttext
\dorecurse{2}{\input knuth.tex\par}

\thinrulesfillpage 

\thinrulesfillpage 

\input ward.tex
\thinrulesfillpage 

\stoptext

> On 7 Dec 2019, at 03:49, Rik Kabel  wrote:
> 
> On 12/6/2019 17:50, Otared Kavian wrote:
>> Hi all,
>> 
>> I am preparing a test for my students where I would like to have the 
>> statement of the problem on the top of a page and the remainder to the 
>> bottom of that page filled with \thinrules, for them to write the solution. 
>> And sometimes there might be an empty page filled with thinrules when the 
>> solution to the exercise is longer.
>> 
>> The following minimal example gives the idea of what I want to achieve, but 
>> since the statement of each exercise may be longer or shorter, I would like 
>> ConTeXt to compute how many \thinrules can be put in the remainder of the 
>> page.
>> That is, can one imagine a macro named (say) \fillpagewiththinrules which 
>> puts the exact number of thinrules before ejecting the page?
>> Is this possible or have I to do it by hand for each page?
>> 
>> \showframe
>> \starttext
>> \dorecurse{2}{\input knuth.tex\par}
>> 
>> \thinrules[n=20] % On the first page I can put 20 thinrules
>> 
>> \page
>> 
>> \thinrules[n=40] % On an empty page I can put 40 thinrules
>> \page
>> 
>> \input ward.tex
>> 
>> \thinrules[n=37] % On the third page there can be 37 thinrules
>> 
>> \stoptext
>> 
>> Thanks for any hint and help,
>> 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
>> 
>> ___
>> 
> It looks like Wolfgang answered this a while back. See Re: [NTG-context] Room 
> for comment on the backside of form. .
> 
> -- 
> Rik
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Filling a page with \thinrules

2019-12-06 Thread Otared Kavian
Hi all,

I am preparing a test for my students where I would like to have the statement 
of the problem on the top of a page and the remainder to the bottom of that 
page filled with \thinrules, for them to write the solution. And sometimes 
there might be an empty page filled with thinrules when the solution to the 
exercise is longer.

The following minimal example gives the idea of what I want to achieve, but 
since the statement of each exercise may be longer or shorter, I would like 
ConTeXt to compute how many \thinrules can be put in the remainder of the page.
That is, can one imagine a macro named (say) \fillpagewiththinrules which puts 
the exact number of thinrules before ejecting the page?
Is this possible or have I to do it by hand for each page?

\showframe
\starttext
\dorecurse{2}{\input knuth.tex\par}

\thinrules[n=20] % On the first page I can put 20 thinrules

\page

\thinrules[n=40] % On an empty page I can put 40 thinrules
\page

\input ward.tex

\thinrules[n=37] % On the third page there can be 37 thinrules

\stoptext

Thanks for any hint and help,
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 beta

2019-12-06 Thread Otared Kavian
Hi Hans,

Thanks a lot for the new beta and for having fixed the issue with luametatex 
binaries.
Everything works great with version 2019.12.06 21:40.

Best regards: OK

> On 6 Dec 2019, at 15:05, Hans Hagen  wrote:
> 
> On 12/6/2019 1:34 PM, Otared Kavian wrote:
> 
>> Is this too old? Is this file created during installation or is it contained 
>> in the zip files downloaded from Pragma's site?
> Ok, I think that there is some issue with the builder. Mojca, it looks like 
> there is no binary upload happening after a build. If needed I can revert to 
> Alan for building but maybe it's something simple.
> 
> (There are two mac variants.)
> 
> 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
___


  1   2   3   4   5   6   7   8   9   10   >