Re: [NTG-context] new upload

2022-04-19 Thread Jeong Dal via ntg-context
Dear Hans,

I can use "\blank[9cm]” in column mode but I have to adjust the value to make 
space evenly.
Since it was working well last December, I guess that there is something 
changed in \startcolumns … \stopcolumns after last December.

Thank you. 

Best regards,

Dalyoung

> 2022. 4. 20. 오전 4:18, Jeong Dal via ntg-context  작성:
> 
> Dear Hans,
> 
> A new upload solves the math font problem in MetaFun. The code
>   label(textext("$\sin\theta$”),origin);
> is working well.
> Also, your sample file adaptive-001.tex is also working without error which 
> is not compiled before.
> However, \vfill is not working in column mode while it provides the same 
> vertical spaces properly not in column mode. 
> The following code is compiled well but no vertical spaces between items. If 
> I comment out \startcolumns … \column … \stopcolumns, it provides the same 
> vertical spaces for each items.
>   \starttext
>   \startcolumns
>   \startitemize[n]
>   \item 
>   \vfill
>   \item
>   \vfill
>   \column
>   \item 
>   \vfill
>   \item
>   \vfill
>   \stopitemize
>   \stopcolumns
>   \stoptext
> 
> This code was working in last December. 
> 
> Thank you for your fix.
> 
> Best regards,
> 
> Dalyoung
> 
> 
>> 2022. 4. 20. 오전 3:23, Hans Hagen via ntg-context > <mailto:ntg-context@ntg.nl>> 작성:
>> 
>> Hi,
>> 
>> I uploaded a new lmtx. Some more adaptive magic ... I'm not sure how usefull 
>> it is but users always find ways to apply such things. I attached a test 
>> file.
>> 
>> Hans
>> 
>> -
>>  Hans Hagen | PRAGMA ADE
>>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
>> www.pragma-pod.nl <http://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 <mailto:ntg-context@ntg.nl> / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>> <http://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : http://contextgarden.net <http://contextgarden.net/>
>> ___
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

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


Re: [NTG-context] new upload

2022-04-19 Thread Jeong Dal via ntg-context
Dear Hans,

A new upload solves the math font problem in MetaFun. The code
label(textext("$\sin\theta$”),origin);
is working well.
Also, your sample file adaptive-001.tex is also working without error which is 
not compiled before.
However, \vfill is not working in column mode while it provides the same 
vertical spaces properly not in column mode. 
The following code is compiled well but no vertical spaces between items. If I 
comment out \startcolumns … \column … \stopcolumns, it provides the same 
vertical spaces for each items.
\starttext
\startcolumns
\startitemize[n]
\item 
\vfill
\item
\vfill
\column
\item 
\vfill
\item
\vfill
\stopitemize
\stopcolumns
\stoptext

This code was working in last December. 

Thank you for your fix.

Best regards,

Dalyoung


> 2022. 4. 20. 오전 3:23, Hans Hagen via ntg-context  작성:
> 
> Hi,
> 
> I uploaded a new lmtx. Some more adaptive magic ... I'm not sure how usefull 
> it is but users always find ways to apply such things. I attached a test file.
> 
> 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] $\sin \theta$ behave differently in metafun

2022-04-15 Thread Jeong Dal via ntg-context
Dear all,

I use $\sin \theta$ and $\cos \theta$ behave differently in text and in metafun.
It works well sometime before but it doesn’t  in metafun now.
What is wrong in my example?

Thank you for reading.
Best regards,

Dalyoung

Here is a MWE.

\startbuffer[pointCircle]
numeric u; u:=1cm;
pair A,B,C;
draw fullcircle scaled 4u;
A := dir(25)*2u; 
label.top(textext("$P=(\cos\theta, \sin\theta)$"), A);
B := dir(-25)*2u;
label.bot(textext("$Q=(\cos(-\theta), \sin(-\theta))$"), B);
C := (xpart A, 0); label.lrt(textext("$A$"), C);
label(textext("$O$"), origin);
\stopbuffer
\starttext
I'd like use $\sin$ and $\cos$ in the metafun. But it shows strange text 
instead of $\sin$ and $\cos$. 

\processMPbuffer[pointCircle]

\stoptext


> 2022. 4. 13. 오전 11:09, 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. Re: Setting up zint on a mac with macOS Montery Version
>  12.3.1 (Keith McKay)
>   2. Re: fatal error in LMTX (Bruce Horrocks)
>   3. Re: Setting up zint on a mac with macOS Montery Version
>  12.3.1 (Bruce Horrocks)
>   4. Re: Proper formatting of itemized bullets in ConTeXt (śrīrāma)
>   5. Re: Proper formatting of itemized bullets in ConTeXt (śrīrāma)
> 
> 
> --
> 
> Message: 1
> Date: Tue, 12 Apr 2022 21:04:50 +0100
> From: Keith McKay 
> To: Bruce Horrocks , mailing list for ConTeXt users
>   , monty.l...@gmail.com
> Subject: Re: [NTG-context] Setting up zint on a mac with macOS Montery
>   Version 12.3.1
> Message-ID: <475d96e6-0905-7d2d-a51d-84b06d340...@gmail.com>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
> 
> Hi All
> 
> I created the symbolic link as suggested by Bruce and Luis and still got the 
> error message
> 
> optional> unable to locate library 'libzint'
> 
> in my text editor. I use TeXworks. However, I thought I would try running 
> from the Terminal app and it worked. It found libzint and output the pdf with 
> both barcodes and the qrcode. I have no idea why it works in the Terminal and 
> not TexWorks, I'm guessing I have a path issue which I need to investigate.
> 
> Notes
> 1) My machine is a mac-mini-M1 with macos Monterey and I'm running the latest 
> ConTeXt version
> 2) Bruce noted that my Homebrew was installed in a non-standard location so I 
> checked on the Hombrew website and it is installed in opt/homebrew for Apple 
> Silicon i.e the M1 chip. Maybe Bruce's homebrew was installed on an earlier 
> version.
> 
> Thanks to Luis and Bruce for their suggestions.
> Best Wishes
> Keith McKay
> 
> On 10/04/2022 22:26, Bruce Horrocks wrote:
>> Hi Keith,
>> 
>>> On 10 Apr 2022, at 14:49, Keith McKay via ntg-context  
>>> wrote:
>>> 
>>> Hi All
>>> 
>>> I have been struggling today trying to setup and use the Barcode module 
>>> zint in ConTeXt and failed. I have followed the instructions on the wiki 
>>> (https://wiki.contextgarden.net/Barcodes  ) but with some changes as 
>>> follows. Which maybe why I failed.
>>> 
>>> 1) I downloaded Zint using Homebrew since I'm using macOS, and installed it 
>>> according to the instructions.
>>> 
>>> 
>>> 2) Since I'm using LMTX I looked for the file libzint.dylib and found it in 
>>> /opt/homebrew/Cellar/zint/2.10.0/lib . This is different from the path 
>>> given on the wiki. The directory contained three files, two of which were 
>>> aliases,  libzint.2.10.dylib and libzint.dylib, and an exe file 
>>> libzint.2.10.0.0.dylib
>> You have Hombrew installed in a non-standard location. Mine is in 
>> /usr/local/Cellar with the executables linked into /usr/local/bin.
>> 
>> But, assuming other Homebrew commands work when run from Terminal then you 
>> might still be okay.
>> 
>>> 3) I created the path $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint and 
>>> copied libzint.2.10.0.0.dylib into but replaced dylib with 'so' as 
>>> suggested on the wiki instructions. So I basically added  
>>> lib/luametatex/zint to texmf-osx-64/bin .
>> "Yes" to creating the path but "no" to copying. Create a symbolic link 
>> instead.
>> 
>> So, in Terminal:
>> 
>>   $ cd $TEXROOT/tex/texmf-osx-64/bin/lib/luametatex/zint
>> 
>>   # In my case I used the following:
>>   $ ln -s /usr/local/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so
>> 
>>   # For you with Homebrew in a different location, try:
>>   $ ln -s /opt/homebrew/Cellar/zint/2.10.0/lib/libzint.dylib libzint.so
>> 
>> Then steps 4 and 5 as below. I ran the MWE below: the ISBN worked, the 

Re: [NTG-context] right item marks for associative questions?

2022-04-11 Thread Jeong Dal via ntg-context
Dear Damien,

Using the “columns" feature is one way to go if you don’t mind the vertical 
alignment mismatch  in the third items.

Best regards,
Dalyoung

\starttext
\startitemize [8,columns]%,two]
\startitem Nietzsche \stopitem
\startitem Woody Allen \stopitem
\startitem God \stopitem
\startitem God is dead \stopitem
\startitem Nietzsche is dead, God is dead and I don't feel so good \stopitem
\startitem Nietzsche is dead \stopitem
\stopitemize
\stoptext




> 2022. 4. 12. 오전 3:46, Damien Thiriet via ntg-context  작성:
> 
> Hi!
> 
> I am used to giving associative questions to my pupils,
> something like
> 
> * connect the author with its ideas
> 
> Friedrich Nietzsche *  * "God is dead"
> Woody Allen *  * "Nietzsche is dead, God is dead 
>  and I don't feel so good"
> God *  * "Nietzsche is dead"
> 
> I design it as a two-cells xtable with itemized lists inside.
> How can I have the item mark on the right side?
> 
> \starttext
> \startitemize [8]
> \startitem Nietzsche \stopitem
> \startitem Allen \stopitem
> \startitem God \stopitem
> \stopitemize
> \stoptext
> 
> Greetings,
> 
> Damien Thiriet 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

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

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


Re: [NTG-context] context manuals -- absence of \definefontfamily

2022-01-04 Thread Jeong Dal via ntg-context
Dear Aditya and Youssef Cherem,

To: Aditya,
> 
> There is the talk that Wolfgang gave in this year's context meeting:
> 
> https://meeting.contextgarden.net/2021/talks/2021-09-23/definefontfamily.pdf
> 
Thank you for letting me know the talk which gives me more understanding about 
\definefontfamily.

To: Youssef Cherem,

Recently, Wolfgang helped me to define a font family as following, and I hope 
that it gives you some idea to use \definefontfamily.

\definefallbackfamily [nanum] [rm] [Tex Gyre Pagella]
  [range={basiclatin,latinsupplement,latinextendeda,latinextendedb}, 
   force=yes]
\definefallbackfamily [nanum] [rm] [Noto Serif CJK KR]
  [range={cjkunifiedideographs},force=yes]
\definefontfamily [nanum] [rm] [Nanum Myeongjo OTF]
  [   it={style:regular,features:{*,slanted}},
  bi={style:bold,features:{*,slanted}},force=yes]

Explanation:
1. I use Korean font whose family name is “Nanum Myeongjo OTF” as main font. 
Since it doesn’t have italic style and bold italic style, I add [it=… , bi=…] 
to simulate the styles.

2. Since I want to use English character in "TeX Gyre Pagella”. I add it in the 
first \definefallbackfamily with an option [range={…},force=yes] which restrict 
the use of font to Latin characters.

3. We use chinese characters also in the Korean sentences. But "Nanum Myeongjo 
OTF” doesn’t have Chinese characters. So I add another font “Noto Serif CJK KR” 
which contains Chinese character with the option 
[range={cjkunified…},force=yes] in the second \definefallbackfamily.

There are two font families more,  sans and mono which is similar as rm.
It is really nice to use \definefontfamily which saves a lot of work to define 
fonts. 

Thanks Wolfgang.
If there are something should changed in the above definition, please tell me 
what to do.

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] upload

2021-12-25 Thread Jeong Dal via ntg-context
Dear Hans,

I installed the new upload and compiled “helloWorld.tex” created Sanjoy Mahajan.
It runs well except  the dummy figures are not appeared in the pdf output.

However, I still got error message when try to compile “\startcolumnset … 
\stopcolumnset”.

fonts   > 'fallback modern-designsize rm 12pt' is loaded
mtx-context | fatal error: return code: 1
The terminal process "zsh '-c', 'mtxrun --autogenerate --script context 
--autopdf --purge '/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/exit11.tex''" terminated with exit code: 
1.

As you see in the log file, "return code: 11" is changed to “return code: 1”.

It might be the problem of system environment as you said.

Thank you.

Merry Christmas and Happy new year!

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
___


[NTG-context] \startcolumnset ... \stopcolumnset fatal error: return code 11

2021-12-16 Thread Jeong Dal via ntg-context
Hi,

I have used newcolumnset module to make a test sheet. It was made by the help 
of experts in the list.
It worked fine a month ago and also worked via TeXlive 2021.
But I got error using the recent version.
Thanks Nicola and John for testing.

I have listed it before and tried to find out the cause.
I have test the following file in the editors,  vscode, vim, atom and even in 
the terminal.
It might be an apple binary problem as Hans suspected.
I’d like to know that it is the only problem for Mac users.

Here is the code and the part of error message:
It was tested in vscode, vim and terminal too.

I am using Mac OSX, 
ConTeXt  ver: 2021.12.03 15:20 LMTX  fmt: 2021.12.9  int: english/english

Thank you for reading.
Best regards,

Dalyoung

%%%
\startuseMPgraphic{verticalrule0}
  if CurrentColumn < NOfColumns :
draw rightboundary OverlayBox shifted (4mm,0);
setbounds currentpicture to OverlayBox enlarged 2.5mm;
  fi;
\stopuseMPgraphic

\startuseMPgraphic{squareBox}
   draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
   draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: 
shifted(-2mm,0) fi ;
   draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: 
shifted(2mm,0) fi ;  
   draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
 \stopuseMPgraphic
\defineoverlay
  [headerBox]
  [\useMPgraphic{squareBox}]

\startuseMPgraphic{verticalrule3}
   draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: 
shifted(-2mm,0) fi ;
   draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: 
shifted(2mm,0) fi ;  
   draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
 \stopuseMPgraphic

\defineoverlay
  [verticalrule]
  [\useMPgraphic{verticalrule3}]

\definecolumnset
  [exam]
  [n=2,
   background=verticalrule]


\setuplayout[width=19cm, height=26cm, header=1cm, footer=.5cm,backspace=1cm]
\setupheader[before=\vfil, after=\vfil]
\setupbackgrounds[header][text][frame=off, background=headerBox, 
align=lohi]%topframe=
\setupbackgrounds[footer][text][frame=off, background=screen]

\define[3]\headTitle{\setupheadertexts[][\bf #1  \hfill #2  \hfill #3  \hfill 
ID:  \hskip 2cm Name: \hskip 2cm]}

\setupmathematics[autopunctuation=no, integral=nolimits]

\setupbodyfont[rm,10pt]
\setuppagenumbering[location=footer]
\setupcolors[state=start]
%\setupexternalfigure[directory={/Users/graph/Documents/figures,}]

\headTitle{2021. 12. 9.}{Set Theory}{Final Exam}

\usemodule[newcolumnsets]

\starttext

%\startcolumns[rule=on,n=2,leftframe=on]
\startcolumnset[exam]

\startitemize[n]
  \item The first problem.
  \vfill
  \column

  \item The second problem.
  \vfill
  \column

  \item The third problem.
  \vfill
  \column

\stopitemize

\stopcolumnset
%\stopcolumns
\stoptext


%%
…
open source > level 2, order 3, name 
‘/Users/graph/ConTeXtLM/tex/texmf-context/tex/context/base/mkiv/m-newcolumnsets.mkiv'
close source> level 2, order 3, name 
'/Users/graph/ConTeXtLM/tex/texmf-context/tex/context/base/mkiv/m-newcolumnsets.mkiv'
mtx-context | fatal error: return code: 11
The terminal process "zsh '-c', 'mtxrun --autogenerate --script context 
--autopdf --purge '/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex''" terminated with exit 
code: 1.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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 setup path of ConTeXtLMTX for MacVim?

2021-12-15 Thread Jeong Dal via ntg-context
Dear Jan-Erik,

Thank you for sharing your code.

It will be very helpful for me.
I hope that my problem is solved soon.

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
___


Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-14 Thread Jeong Dal via ntg-context
Dear Nicola, Jan-Erik, and John,

Although you have explained about the way out of my problem, 
I am still in the problem.

I need to learn more about vim.
I’ll do more try following your advice and  the explanation in wiki.

Thank you again for your help.

Best regards,

Dalyoung

> 2021. 12. 14. 오전 8:56, 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. Re: how to setup path of ConTeXtLMTX for MacVim?
>  (Jan-Erik Hägglöf)
>   2. Re: circuitikz module seems broken (Hans Hagen)
>   3. Re: TeXWorks and synctex SOLVED (Bruce Horrocks)
> 
> 
> --
> 
> Message: 1
> Date: Tue, 14 Dec 2021 00:48:25 +0100
> From: Jan-Erik Hägglöf 
> To: mailing list for ConTeXt users 
> Subject: Re: [NTG-context] how to setup path of ConTeXtLMTX for
>   MacVim?
> Message-ID: <32566c08-2359-48df-b24c-2aa2e3d02...@gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> let g:context_mtxrun = 
> 'PATH=$HOME/context/context-osx-64/tex/texmf-osx-64/bin:$PATH mtxrun'
> 
> nnoremap å :ConTeXt
> nnoremap  ö :call tex#preview()
> nnoremap  ä
>\ :call tex#goto_texshop(expand("%:p"), line('.'), col('.'), 1, 1)
> 
> Here is my snippet from my personal context.vim file
> 
> I see that you have :! and that means that you instruct vim to execute a 
> shell command.
> 
> Just write :ConTeXt and it should work fine
> 
>> 13 dec. 2021 kl. 14:30 skrev Jeong Dal via ntg-context :
>> 
>> Dear John, Nicola,
>> 
>> I created a file context.vim under the folder ~/.vim/after/ftplugin/ which 
>> contains
>> 
>> map > :w:!ConTeXt
>> let g:context_mtxrun = 'PATH=$HOME/ConTeXtLM/tex/texmf-osx-64/bin:$PATH 
>> mtxrun'
>> let g:tex_flavor = "context"
>> 
>> The result is
>> 1. using “:ConTeXt”   issued an error message:  “E492: not an editor 
>> command: ConTeXt
>> 2. using “make” issued an error message: "No targets specified and no 
>> makefile found. …" 
>> Pressing C-h, compiling started and succesfully ended. However, it use 
>> /usr/local/texlive/… not LMTX tex folder.
>> 
>> Without context.vim, “:ConTeXt" and “:make" worked fine.
>> 
>> I’ll do more test. 
>> 
>> 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
>> ___
> 
> -- next part --
> An HTML attachment was scrubbed...
> URL: 
> <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20211214/d4e3531d/attachment-0001.htm>
> 
> --
> 
> Message: 2
> Date: Tue, 14 Dec 2021 00:54:44 +0100
> From: Hans Hagen 
> To: mailing list for ConTeXt users , Aditya
>   Mahajan 
> Subject: Re: [NTG-context] circuitikz module seems broken
> Message-ID: <41f06234-caab-6576-aa5e-8396c8ee3...@xs4all.nl>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
> 
> Hi,
> 
> This works here:
> 
> \usemodule[circuitikz]
> 
> \starttext
> \startcircuitikz
> \draw (0,2) to[I] (2,2);
> \stopcircuitikz
> \startcircuitikz
> \draw (0,2) to[I] (2,2);
> \stopcircuitikz
> \stoptext
> 
> with the attached. Make sure to put it in the regular context base path 
> and run mtxrun --generate.
> 
> Aditya: can you check if we load enough? We really need to get rid of 
> all these (kind of strange) t-* modules that somehow ended up in tikz 
> and it's way easier and robust to occasionally add something needed to 
> m-tikz than to try to catch hard-to-l

Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-13 Thread Jeong Dal via ntg-context
Dear John, Nicola,

I created a file context.vim under the folder ~/.vim/after/ftplugin/ which 
contains

map > :w:!ConTeXt
let g:context_mtxrun = 'PATH=$HOME/ConTeXtLM/tex/texmf-osx-64/bin:$PATH mtxrun'
let g:tex_flavor = "context"

The result is
1. using “:ConTeXt”   issued an error message:  “E492: not an editor command: 
ConTeXt
2. using “make” issued an error message: "No targets specified and no makefile 
found. …" 
Pressing C-h, compiling started and succesfully ended. However, it use 
/usr/local/texlive/… not LMTX tex folder.

Without context.vim, “:ConTeXt" and “:make" worked fine.

I’ll do more test. 

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] how to setup path of ConTeXtLMTX for MacVim?

2021-12-13 Thread Jeong Dal via ntg-context
Dear John, Nicola,

Thank you for your help.
I have to check the wiki carefully first.

I’ll do what you said and report it later.

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
___


[NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-11 Thread Jeong Dal via ntg-context
Hi,

Recently, I have a problem to use vscode, so I tried MacVim for ConTeXt.
It worked fine. But it uses context in TeXLive instead of using it in 
ConTeXtLMTX.
I’d like to use LMTX which is installed in ~/ConTeXtLM/tex/...

How to redirect the path for ConTeXt in MacVim?

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] using the newcolumnsets module

2021-12-09 Thread Jeong Dal via ntg-context

Dear Hans, Bruce Horrocks,

I test the file using MacVim and confirm that it works fine.
Thus, something happened in my system or environment of vscode.
I may reinstall vscode.

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] using the newcolumnsets module

2021-12-09 Thread Jeong Dal via ntg-context

Dear Bruce Horrocks,

Thank you for your test.
I have moved the file to the local and run it. But the result is same.
However, since your try worked well, the problem is mine not LMTX.
I am using the editor “vscode”, and there may be something changed in my system 
recently.

I’ll try using other editors.
Thank you.

Best regards,

Dalyoung

> Message: 4
> Date: Thu, 9 Dec 2021 17:19:48 +
> From: Bruce Horrocks 

>> On 9 Dec 2021, at 16:32, Hans Hagen via ntg-context  
>> wrote:
>> 
>> On 12/9/2021 1:27 PM, Jeong Dal via ntg-context wrote:
>> 
>>> error messages:
>> 
>>> Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex', result 
>>> '/Users/graph/Library/Mobile 
>> 
>>> Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex''" terminated with 
>>> exit code: 1.*
>> no clue ... does lmtx also fail? is it an apple binary issue?
>> 
>> Hans
>> 
> 
> It works fine for me under macOS Monterey and LMTX version:
> 
>  mtx-context | current version: 2021.12.03 15:20
> 
> Dalyoung: the error line that Hans quoted implies that your .tex file is on 
> your iCloud drive. Try moving it to a local, hard drive.
> 
> —
> Bruce Horrocks
> Hampshire, UK
> 

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

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


Re: [NTG-context] using the newcolumnsets module

2021-12-09 Thread Jeong Dal via ntg-context
Dear Hans,

>> Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex''" terminated 
>> with exit code: 1.*
> no clue ... does lmtx also fail? is it an apple binary issue?

I am running LMTX now.
It opens and closes  "*-newcolumnsets.mkiv” files(we can find the lines in the 
log file).
I also tested the  files which had no problem a month ago, but got the same 
error message now.

I reinstalled context and test it. 
But the result is same.

I am going to test it more.

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
___


[NTG-context] using the newcolumnsets module

2021-12-09 Thread Jeong Dal via ntg-context

Dear all,

I made an exam form by the help of the experts in this list.
However, it was not working after recent update.
Here is a code which I made for the test.
If I use “\startcolumns \stopcolumns”, then it has no problem.
But using “\startcolumnset[exam] … \stopcolumnset” produces error message 
“return code 11”.
It loads “m-newcolumnset.tex” without problem.

What is the cause of this error?

Thank you for reading.

Best regards,

Dalyoung

\startuseMPgraphic{verticalrule0}
  if CurrentColumn < NOfColumns :
draw rightboundary OverlayBox shifted (4mm,0);
setbounds currentpicture to OverlayBox enlarged 2.5mm;
  fi;
\stopuseMPgraphic

\startuseMPgraphic{squareBox}
   draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
   draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: 
shifted(-2mm,0) fi ;
   draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: 
shifted(2mm,0) fi ;  
   draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
 \stopuseMPgraphic
\defineoverlay
  [headerBox]
  [\useMPgraphic{squareBox}]

\startuseMPgraphic{verticalrule3}
   draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: 
shifted(-2mm,0) fi ;
   draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: 
shifted(2mm,0) fi ;  
   draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
 \stopuseMPgraphic

\defineoverlay
  [verticalrule]
  [\useMPgraphic{verticalrule3}]

\definecolumnset
  [exam]
  [n=2,
   background=verticalrule]


\setuplayout[width=19cm, height=26cm, header=1cm, footer=.5cm,backspace=1cm]
\setupheader[before=\vfil, after=\vfil]
\setupbackgrounds[header][text][frame=off, background=headerBox, 
align=lohi]%topframe=
\setupbackgrounds[footer][text][frame=off, background=screen]

\define[3]\headTitle{\setupheadertexts[][\bf #1  \hfill #2  \hfill #3  \hfill 
ID:  \hskip 2cm Name: \hskip 2cm]}

\setupmathematics[autopunctuation=no, integral=nolimits]

\setupbodyfont[rm,10pt]
\setuppagenumbering[location=footer]
\setupcolors[state=start]
%\setupexternalfigure[directory={/Users/graph/Documents/figures,}]

\headTitle{2021. 12. 9.}{Set Theory}{Final Exam}

\usemodule[newcolumnsets]

\starttext

\startcolumns[rule=on,n=2,leftframe=on]
%\startcolumnset[exam]

\startitemize[n]
  \item The first problem.
  \vfill
  \column

  \item The second problem.
  \vfill
  \column

  \item The third problem.
  \vfill
  \column

\stopitemize

%\stopcolumnset
\stopcolumns
\stoptext


error messages:
system  > ConTeXt  ver: 2021.11.30 19:49 LMTX  fmt: 2021.12.1  int: 
english/english
system  > 
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/Users/graph/ConTeXtL/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name 
'/Users/graph/ConTeXtL/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname '/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/ColumnsetTest', input 
'/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex', result 
'/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/ColumnsetTest'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name '/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex'
fonts   > preloading latin modern fonts (third stage)
fonts   > 'fallback modern-designsize rm 10pt' is loaded
colors  > 'rgb' color space is supported
colors  > 'cmyk' color space is supported
modules > 'newcolumnsets' is loaded
open source > level 2, order 3, name 
'/Users/graph/ConTeXtL/tex/texmf-context/tex/context/base/mkiv/m-newcolumnsets.mkiv'
close source> level 2, order 3, name 
'/Users/graph/ConTeXtL/tex/texmf-context/tex/context/base/mkiv/m-newcolumnsets.mkiv'
mtx-context | fatal error: return code: 11
The terminal process "zsh '-c', 'export 
PATH=~/ConTeXtL/tex/texmf-osx-64/bin:$PATH;mtxrun --autogenerate --script 
context --autopdf --purge '/Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/ColumnsetTest.tex''" terminated with exit 
code: 1.

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

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

2021-09-07 Thread Jeong Dal via ntg-context
Dear Sylvain,

I am using ’\startalign’

> 
> \starttext
> \startformula
> \eqalign{
> ax^2+bx+c &= 0 \cr
> x &= \frac{-b \pm \sqrt{b^2-4ac}}{2a} \cr
> }
> \stopformula
> \stoptext
> 

\starttext
\startformula
\startalign
\NC ax^2 + bx + c \NC = 0 \NR
\NC x \NC = = \frac{-b \pm \sqrt{b^2-4ac}}{2a} \NR
\stopalign
\stopformula
\stoptext

There is  a nice guide book "My Way” for math-alignment by Aditya.
https://wiki.contextgarden.net/images/archive/b/b4/20100530075041!Mathalign.pdf 


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
___


[NTG-context] using a red frame as an overlay

2021-08-02 Thread Jeong Dal via ntg-context
Hi,

I used red frame which is in the metafun manual for long time.
But it is not working now. 
Here is a MWE and a part of the log file.
What should I change in the definitions?

I am using "ConTeXt  ver: 2021.07.10 21:51 LMTX  fmt: 2021.7.12  int: 
english/english”.

 framed Text with title %%%
\startuseMPgraphic{redFrame}
picture p ; numeric o ; path a, b ; pair c ;
p := textext.rt(\MPstring{FrameText}) ;
o := BodyFontSize ;
a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
b := a superellipsed .95 ;
%fill b withcolor .85white ;
draw b ;
b := (boundingbox p) superellipsed .95 ;
fill b withcolor .85white ;  %.425green;%.
draw b ;
draw p withcolor black ;
setbounds currentpicture to a ;
\stopuseMPgraphic

\defineoverlay[rFrame][\useMPgraphic{redFrame}]

\defineframedtext[rfText]
[frame=off,
background=rFrame,
offset=\bodyfontsize,
width=\textwidth,
before=\blank,
after=\blank]

\def\StartFrame{\blank\startrfText}
\def\StopFrame {\stoprfText\blank}

\starttext

\StartFrame
This is a test for the frame. 
This is a test for the frame. 
This is a test for the frame. 
This is a test for the frame. 
This is a test for the frame. 
This is a test for the frame. 
\StopFrame
\stoptext

\starttext


log file:

fonts   > 'fallback modern-designsize rm 12pt' is loaded
tex error   > tex error on line 41 in file /Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/test.tex: Use of \meta_usempgraphic_nop 
doesn't match its definition

 
}
 \executedefinedoverlay #1#2->\bgroup \setlayoutcomponentattribute 
{\v!overlay :#1}\setbox \scratchbox \hbox \layoutcomponentboxattribute {\the 
\everyoverlay #2}
\boxxoffset \scratchbox -.5\dimexpr \wd \scratchbox -\d_framed_target_wd 
\relax \boxyoffset \scratchbox -.5\dimex
 \pack_framed_process_background_indeed_internal #1->\bgroup \setbox 
\b_framed_extra \hpack \bgroup \ifzeropt \framedbackgroundoffset \else \kern 
-\framedbackgroundoffset \fi \hbox \bgroup #1
\egroup \egroup \wd \b_framed_extra \zeropoint \ht \b_framed_extra 
\framedbackgroundheight \dp \b_framed_ext

 \m_framed_background ...background \endcsname \expandafter 
\pack_framed_process_background_indeed_internal \lastnamedcs \orelse \ifcsname 
\??overlay \m_framed_background \endcsname \expandafter 
\pack_framed_process_background_indeed_external \lastnamedcs 
\fi 

 \pack_framed_process_backgrounds #1,#2->\edef \m_framed_background 
{#1}\ifx \m_framed_background \s!unknown \else \pack_framed_process_background 
\expandafter \pack_framed_process_backgrounds \fi #2

 \p_framed_component ...s\let \foregroundbox 
\pack_framed_background_box_content \hpack \layoutcomponentboxattribute to 
\framedbackgroundwidth \bgroup \the \everybackgroundbox \expandafter 
\pack_framed_process_backgrounds \p_framed_background ,\s!unknown 
,\relax \box ...
...


 \StopFrame

31 
32 \starttext
33 
34 \StartFrame
35 This is a test for the frame. 
36 This is a test for the frame. 
37 This is a test for the frame. 
38 This is a test for the frame. 
39 This is a test for the frame. 
40 This is a test for the frame. 
41 >>  \StopFrame
42 
43 \stoptext
44 
If you say, e.g., '\def\a1{...}', then you must always put '1' after '\a',
since control sequence names are made up of letters only. The macro here has not
been followed by the required stuff, so I'm ignoring it.
mtx-context | fatal error: return code: 256___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] weekend upload - stacking and animation

2021-07-13 Thread Jeong Dal
Dear Hans, Wolfgang,

Both of your methods are working well.

Using \frame, the \dorecurse problem is solved.

\starttext
\startanimation[menu=yes]
 \dorecurse{10}
  { \frame{\useMPgraphic[stacking={#1}]{demo}}}
\stopanimation
\stoptext

Thank you for your solutions.

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] weekend upload

2021-07-13 Thread Jeong Dal
Dear Aditya,

> You cannot use [offset=2mm] here. Just use \startuseMPgraphic{boxes}.
> 

After remove [offset=smm], it is working well.

Thank you for the solution.

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] weekend upload - stacking and animation

2021-07-13 Thread Jeong Dal
Dear Hans, Aditya,

Now, I understand the stacking method.
I made a simple animation using it.


\startuseMPgraphic{demo}
  for i=1 upto 10:
  draw fullcircle scaled (.3*i*cm)  withcolor (.1*i*red) withpen  pencircle 
scaled (.5*bp) withstacking i;
  endfor;
\stopuseMPgraphic
\setupinteraction[state=start]
\usemodule[animation]

\starttext
\startanimation[menu=yes]
%  \dorecurse{10}
%  { {\useMPgraphic[stacking={#1}]{demo}}}
  {\useMPgraphic[stacking={1}]{demo}}
  {\useMPgraphic[stacking={2}]{demo}}
  {\useMPgraphic[stacking={3}]{demo}}
  {\useMPgraphic[stacking={4}]{demo}}
  {\useMPgraphic[stacking={5}]{demo}}
  {\useMPgraphic[stacking={6}]{demo}}
  {\useMPgraphic[stacking={7}]{demo}}
  {\useMPgraphic[stacking={8}]{demo}}
  {\useMPgraphic[stacking={9}]{demo}}
  {\useMPgraphic[stacking={10}]{demo}}
\stopanimation
\stoptext


However, I cannot succeed to use \dorecurse to make the code simple.
If there is another good method, please let me know.

Anyway, thanks for this new feature!

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] weekend upload

2021-07-12 Thread Jeong Dal
Dear Aditya,

Thank you for your code and an explanation.

> Let's assume that the last MPpage was a \startuseMPgraphic{boxes}  
> \stopuseMPgraphic. Suppose I wanted to use these pictures in a presentation. 
> On the first slide, I can use
> 
>\useMPgraphic[stacking=0]{boxes}
> 
> to show the three boxes, and on the next slide, I can use
> 
>\useMPgraphic[stacking={-1,0}]{boxes}
> 

I tried to reproduce your example using \startuseMPgraphic{boxes} … 
\stopuseMPgraphic, and useMPgraphic[stacking=0]{boxes} .
A modified one of your code is below.
There is no error message but no output at all.
Would you please tell me what is wrong in here?

Best regards,
Dalyoung


\startMPdefinitions
  input boxes;

  primarydef a +- b =
a -- (xpart a, ypart b) -- b
  enddef ;
  primarydef a -+ b =
a -- (xpart b, ypart a) -- b
  enddef ;
\stopMPdefinitions
\defineframed
  [boxframed]
  [
width=6em,
height=2\lineheight,
align={middle,lohi},
background=color,
backgroundcolor=blue,
foregroundcolor=white,
forefroundstyle=bold,
  ]

\startuseMPgraphic[offset=2mm]{boxes}
  boxit.A("\boxframed{Box A}");
  boxit.B("\boxframed{Box B}");
  boxit.C("\boxframed{Box C}");

  defaultdx := 0pt;
  defaultdy := 0pt;

  A.c = origin;

  B.w - A.e = (1cm, 0);

  0.5[ A.s, B.s ] - C.n = (0, 1cm);

  stacking := 0;
  drawunboxed(A,B,C);
  stacking := 1;
  drawarrow A.s +- C.w ;
  drawarrow B.s +- C.e ;

  newpath highlight;

  highlight := (A.sw -- B.se -- B.ne -- A.nw) enlarged EmWidth;
  fill highlight withcolor "darkgray" withstacking -1;

\stopuseMPgraphic

\starttext
\useMPgraphic[stacking={0}]{boxes}
\useMPgraphic[stacking={0,1}]{boxes}
\useMPgraphic[stacking=-1]{boxes}
\stoptext___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-25 Thread Jeong Dal
Dear Aditya and Hans,

Thank you for your suggestion.
I add 

> \startMPcalculation
>  
> \stopMPcalculation

and it works.

\setupinteraction[state=start]
\usemodule[animation]
\starttext
%\startanimation[menu=yes]
%{
\startMPcalculation
 path p;
\stopMPcalculation
\dorecurse{\udCount}
 {\useMPgraphic{foldUD}{num=\recurselevel}}
 {\useMPgraphic{dotLines}{num=\recurselevel}}
%}
%\stopanimation
\stoptext

However, it draws all the figures under the \startanimation case.

There may be something I missed or there is something uncertain between 
\dorecurse and \startanimation.

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] simplifying repeated macro calls in metafun

2021-06-25 Thread Jeong Dal
Dear Aditya,


> A while back, I wrote some code to easily generate metapost animations. 
> 
> https://adityam.github.io/context-blog/post/metapost-animation/
> 
> I haven't used it much because I am mostly on linux, and its is a PITA to get 
> an older version of Adobe Reader to work under wine. 

I have visited this site before, and I have used it for a few time in similar 
cases.
Thank you for a very nice code.

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] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-24 Thread Jeong Dal
Dear Hans,

Your code works fine.

> \starttext
> 
> \startMPcode
>numeric maxCount;
>maxCount := 10;
>setglobalmacro("MyMacro",decial maxCount);
>setglobalcount("MyCount",maxCount);
> \stopMPcode
> 
> 
> \dorecurse{\MyMacro}{It is \recurselevel. }\par
> \dorecurse{\MyCount}{It is \recurselevel. }\par
> 
> \stoptext

I applied your method to my code as following. 

\newcount\udCount  %%% add count
\startMPinitializations%{UDBasic}
  pair A,B,C,D;
  pair E, F, G, H;
  path p,q;
  numeric ang,maxNum;

  numeric n; %AM Added

  u:=1in;
  A=(.95*TextWidth,u); B=(0,u); C=(0,0); D=(.95*TextWidth,0);
  p := A--B--C--D;
  q := (TextWidth,1.5u)--(0,1.5u)--(0,-.5u)--(TextWidth,-.5u)--cycle;
  z0=(.1u,0);
  
   vardef nextPt (expr M,N) = 
   if ypart(N) = 0: 
   H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[A,B];
   else:
   H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[C,D];
   fi;
   H
   enddef;

   def grayUD(expr i) =
  draw G -- if ypart(B)=ypart(G): B -- C else: C -- B fi --z[i];
  filldraw z[i]+2*(G-z[i])*u -- z[i] -- z[i+1] -- z[i+1]+(G-z[i])*u -- 
cycle withcolor .75white; 
  draw G -- z[i+1] dashed evenly;
  draw z[0] for k=0 upto i: --z[k] endfor dashed evenly;
  clip currentpicture to q;
   enddef;

   def linesUD(expr i) =
  draw p;
  draw z0 for k=0 upto i+1: --z[k] endfor dashed evenly;

  % AM: removed. Set in in the main code
  % setbounds currentpicture to boundingbox q;
   enddef;

   ang := 40;
   z[1] = whatever[z[0], z[0]+dir(ang)*u] = whatever[A,B];

   % AM: Changed next line from G to z[-1]
   z[-1] = whatever[z[0], z[0]+dir(2*ang)*u] = whatever[A,B];
   for k = 2 upto 20:
  z[k] = nextPt(z[k-2],z[k-1]);
  maxNum := k;
  exitif xpart(z[k]) > TextWidth;
   endfor;
   maxNum := maxNum-1;
   setglobalmacro("udMacro",decimal maxNum);  %%% define udMacro and udCount
   setglobalcount("udCount",maxNum);

\stopMPinitializations

\startuseMPgraphic{foldUD}{num}
   numeric n;
   n := \MPvar{num}-1;
   G := z[n-1];
   grayUD(n);
\stopuseMPgraphic
\startuseMPgraphic{dotLines}{num}
   numeric n;
   n := \MPvar{num}-1;
   linesUD(n);
\stopuseMPgraphic

\setupinteraction[state=start]
\usemodule[animation]
\starttext
%\startanimation[menu=yes]
%{
\dorecurse{\udCount}
 {\useMPgraphic{foldUD}{num=\recurselevel}}
 {\useMPgraphic{dotLines}{num=\recurselevel}}
%}
%\stopanimation
\stoptext

1. Using “udCount” doesn’t issue error message, but it draws the path p only.
2. Using “udMacro” issue the error message.

Is there anything that I miss?

Best regards,

Dalyoung

**
tex error   > tex error on line 75 in file /Users/graph/Library/Mobile 
Documents/com~apple~CloudDocs/texMain/funmath/foldBandMPnew.tex: Undefined 
control sequence

 \udMacro 

 \dorecurse #1->\ifcase #1
\relax \expandafter \gobbletwoarguments \or \expandafter 
\syst_helpers_recurse_y \else \expandafter \syst_helpers_recurse_x \fi {#1}
 \dorecurse{\udMacro}

65numeric n;
66n := \MPvar{num}-1;
67linesUD(n);
68 \stopuseMPgraphic
69 
70 \setupinteraction[state=start]
71 \usemodule[animation]
72 \starttext
73 %\startanimation[menu=yes]
74 %{
75 >>  \dorecurse{\udMacro}
76  {\useMPgraphic{foldUD}{num=\recurselevel}}
77  {\useMPgraphic{dotLines}{num=\recurselevel}}
78 %}
 ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] simplifying repeated macro calls in metafun

2021-06-23 Thread Jeong Dal
Dear Otared,

> 
> Regarding the way Aditya uses \startuseMPgraphic, it is also very 
> instructive. 
> Dalyoung, can you also share the animation example for the foldings ? I am 
> sure we are a few on the list to learn something…
> 

1. Here is the working sample of animation using \processMPbuffer which I did 
before. You can see it using adobe reader.


\startbuffer[UDBasic]
  pair A,B,C,D;
  pair E, F, G, H;
  path p,q;
  numeric ang,maxNum;
  u:=1in;
  A=(.95*TextWidth,u); B=(0,u); C=(0,0); D=(.95*TextWidth,0);
  p := A--B--C--D;
  q := (TextWidth,1.5u)--(0,1.5u)--(0,-.5u)--(TextWidth,-.5u)--cycle;
  z0=(.1u,0);
  
   vardef nextPt (expr M,N) = 
   if ypart(N) = 0: 
   H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[A,B];
   else:
   H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[C,D];
   fi;
   H
   enddef;

   def grayUD(expr i) =
  draw G -- if ypart(B)=ypart(G): B -- C else: C -- B fi --z[i];
  filldraw z[i]+2*(G-z[i])*u -- z[i] -- z[i+1] -- z[i+1]+(G-z[i])*u -- 
cycle withcolor .75white; 
  draw G -- z[i+1] dashed evenly;
  draw z[0] for k=0 upto i: --z[k] endfor dashed evenly;
  clip currentpicture to q;
  setbounds currentpicture to boundingbox q;
   enddef;

   def linesUD(expr i) =
  draw p;
  draw z0 for k=0 upto i+1: --z[k] endfor dashed evenly;
  setbounds currentpicture to boundingbox q;
   enddef;
\stopbuffer

\startbuffer[UDpts]
   ang := 40;
   z[1] = whatever[z[0], z[0]+dir(ang)*u] = whatever[A,B];
   G := whatever[z[0], z[0]+dir(2*ang)*u] = whatever[A,B];
   for k = 2 upto 20:
  z[k] = nextPt(z[k-2],z[k-1]);
  maxNum := k;
  exitif xpart(z[k]) > TextWidth;
   endfor;
\stopbuffer
\startbuffer[UD0]
   draw p;
   setbounds currentpicture to boundingbox q;
\stopbuffer
\startbuffer[UD1]
   grayUD(0);
\stopbuffer
\startbuffer[UD11]
   linesUD(0);
\stopbuffer
\startbuffer[UD2]
   G := z0;
   grayUD(1)
\stopbuffer
\startbuffer[UD21]
   linesUD(1);
\stopbuffer
\startbuffer[UD3]
   G := z1;
   grayUD(2);
\stopbuffer
\startbuffer[UD31]
   linesUD(2);
\stopbuffer
\startbuffer[UD4]
   G := z2;
   grayUD(3);
\stopbuffer
\startbuffer[UD41]
   linesUD(3);
\stopbuffer
\startbuffer[UD5]
   G := z3;
   grayUD(4);
\stopbuffer
\startbuffer[UD51]
   linesUD(4);
\stopbuffer
\startbuffer[UDFinal]
draw p;
draw z0--z1--z2--z3--z4--z5--z6--z7--z8 dashed evenly;
setbounds currentpicture to boundingbox q;
\stopbuffer

\setupinteraction[state=start]
\usemodule[animation]
\starttext
\startanimation[menu=yes]
{\processMPbuffer[UDBasic,UDpts,UD0]}
{\processMPbuffer[UDBasic,UDpts,UD1]}
{\processMPbuffer[UDBasic,UDpts,UD11]}
{\processMPbuffer[UDBasic,UDpts,UD2]}
{\processMPbuffer[UDBasic,UDpts,UD21]}
{\processMPbuffer[UDBasic,UDpts,UD3]}
{\processMPbuffer[UDBasic,UDpts,UD31]}
{\processMPbuffer[UDBasic,UDpts,UD4]}
{\processMPbuffer[UDBasic,UDpts,UD41]}
{\processMPbuffer[UDBasic,UDpts,UD5]}
{\processMPbuffer[UDBasic,UDpts,UD51]}
{\processMPbuffer[UDBasic,UDpts,UDFinal]}
\stopanimation
\stoptext

Now, I am trying to do the same thing using \startuseMPgraphic, but I don’t the 
correct result yet.
Using \startuseMPgraphic, and \dorecurse, the code is simpler. But, it seems to 
me that \startanimation … \stopanimation is not working with \dorecurse{}{} …
It just list all the graphics.
Any hint is welcome.

\startMPinitializations%{UDBasic}
  pair A,B,C,D;
  pair E, F, G, H;
  path p,q;
  numeric ang,maxNum;

  numeric n; %AM Added

  u:=1in;
  A=(.95*TextWidth,u); B=(0,u); C=(0,0); D=(.95*TextWidth,0);
  p := A--B--C--D;
  q := (TextWidth,1.5u)--(0,1.5u)--(0,-.5u)--(TextWidth,-.5u)--cycle;
  z0=(.1u,0);
  
   vardef nextPt (expr M,N) = 
   if ypart(N) = 0: 
   H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[A,B];
   else:
   H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[C,D];
   fi;
   H
   enddef;

   def grayUD(expr i) =
  draw G -- if ypart(B)=ypart(G): B -- C else: C -- B fi --z[i];
  filldraw z[i]+2*(G-z[i])*u -- z[i] -- z[i+1] -- z[i+1]+(G-z[i])*u -- 
cycle withcolor .75white; 
  draw G -- z[i+1] dashed evenly;
  draw z[0] for k=0 upto i: --z[k] endfor dashed evenly;
  clip currentpicture to q;
   enddef;

   def linesUD(expr i) =
  draw p;
  draw z0 for k=0 upto i+1: --z[k] endfor dashed evenly;

  % AM: removed. Set in in the main code
  % setbounds currentpicture to boundingbox q;
   enddef;

   ang := 40;
   z[1] = whatever[z[0], z[0]+dir(ang)*u] = whatever[A,B];

   % AM: Changed next line from G to z[-1]
   z[-1] = whatever[z[0], z[0]+dir(2*ang)*u] = whatever[A,B];
   for k = 2 upto 20:
  z[k] = nextPt(z[k-2],z[k-1]);
  maxNum := k;
  exitif xpart(z[k]) > TextWidth;
   endfor;

\stopMPinitializations

\startuseMPgraphic{foldUD}{num}
   numeric n;
   n := \MPvar{num}-1;
   G := z[n-1];
   grayUD(n);
\stopuseMPgraphic
\startuseMPgraphic{dotLines}{num}
   numeric n;
   n := \MPvar{num}-1;
   linesUD(n);
\stopuseMPgraphic

\setupinteraction[state=start]
\usemodule[animation]

[NTG-context] Delivering the value of a variable in MetaFun to ConTeXt

2021-06-23 Thread Jeong Dal

Hi,

Is there a way to deliver the value of a variable in MetaFun to ConTeXt.
For example, I want to do the following:

\starttext
\startMPcode
numeric maxCount;
% … some code
maxCount := 10;
\stopMPcode

dorecurse{maxCount}
{It is \recurselevel.\par}

\stoptext

Thank you for reading.

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] simplifying repeated macro calls in metafun

2021-06-21 Thread Jeong Dal

Dear Otared,

I received list mail in condensed form, I didn’t see your mail before I sent 
one.

As Mikael explained, “whatever” is very nice to find the intersection point of 
two lines.
You can see nice examples which use “whatever” in MetaFun manual.

In my code, the next point is the intersection point of the edge and the 
folding line which bisect the angle of the former folding line [M,N].

H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[A,B];

Enjoy the use of “whatever”!

I made an animation of the folding process using animation module and 
\processMPbuffer.
But Woldgang’s code showed a way to make it using \startuseMPgraphic.


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] simplifying repeated macro calls in metafun

2021-06-21 Thread Jeong Dal
Dear Aditya,

Your code works perfectly.

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
___


[NTG-context] simplifying repeated macro calls in metafun

2021-06-20 Thread Jeong Dal

Hi,

I defined a macro definition in metafun, and draw figures using \startbuffer[] 
… \stopbuffer and \processMPbuffer[].
As you see in the attached code, the same macro definition is used repeatedly 
by changing the numeric argument. 
Is there a better way to simplify the code, for example, using \dorecurse and 
recurselevel?

Thank you for reading.

Best regards,

Dalyoung

\startbuffer[UDBasic]
  pair A,B,C,D;
  pair E, F, G, H;
  path p,q;
  numeric ang,maxNum;
  u:=1in;
  A=(.95*TextWidth,u); B=(0,u); C=(0,0); D=(.95*TextWidth,0);
  p := A--B--C--D;
  q := (TextWidth,1.5u)--(0,1.5u)--(0,-.5u)--(TextWidth,-.5u)--cycle;
  z0=(.1u,0);
  
   vardef nextPt (expr M,N) = 
   if ypart(N) = 0: 
   H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[A,B];
   else:
   H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[C,D];
   fi;
   H
   enddef;

   def grayUD(expr i) =
  draw G -- if ypart(B)=ypart(G): B -- C else: C -- B fi --z[i];
  filldraw z[i]+2*(G-z[i])*u -- z[i] -- z[i+1] -- z[i+1]+(G-z[i])*u -- 
cycle withcolor .75white; 
  draw G -- z[i+1] dashed evenly;
  draw z[0] for k=0 upto i: --z[k] endfor dashed evenly;
  clip currentpicture to q;
   enddef;

   def linesUD(expr i) =
  draw p;
  draw z0 for k=0 upto i+1: --z[k] endfor dashed evenly;
  setbounds currentpicture to boundingbox q;
   enddef;
\stopbuffer

\startbuffer[UDpts]
   ang := 40;
   z[1] = whatever[z[0], z[0]+dir(ang)*u] = whatever[A,B];
   G := whatever[z[0], z[0]+dir(2*ang)*u] = whatever[A,B];
   for k = 2 upto 20:
  z[k] = nextPt(z[k-2],z[k-1]);
  maxNum := k;
  exitif xpart(z[k]) > TextWidth;
   endfor;
\stopbuffer
\startbuffer[UD0]
   draw p;
   setbounds currentpicture to boundingbox q;
\stopbuffer
\startbuffer[UD1]
   grayUD(0);
\stopbuffer
\startbuffer[UD11]
   linesUD(0);
\stopbuffer
\startbuffer[UD2]
   G := z0;
   grayUD(1)
\stopbuffer
\startbuffer[UD21]
   linesUD(1);
\stopbuffer
\startbuffer[UD3]
   G := z1;
   grayUD(2);
\stopbuffer
\startbuffer[UD31]
   linesUD(2);
\stopbuffer
\startbuffer[UD4]
   G := z2;
   grayUD(3);
\stopbuffer
\startbuffer[UD41]
   linesUD(3);
\stopbuffer
\startbuffer[UD5]
   G := z3;
   grayUD(4);
\stopbuffer
\startbuffer[UD51]
   linesUD(4);
\stopbuffer
\startbuffer[UDFinal]
draw p;
draw z0--z1--z2--z3--z4--z5--z6--z7--z8 dashed evenly;
setbounds currentpicture to boundingbox q;
\stopbuffer
\starttext
\processMPbuffer[UDBasic,UDpts,UD0]
\processMPbuffer[UDBasic,UDpts,UD1]
\processMPbuffer[UDBasic,UDpts,UD11]
\processMPbuffer[UDBasic,UDpts,UD2]
\processMPbuffer[UDBasic,UDpts,UD21]
\processMPbuffer[UDBasic,UDpts,UD3]
\processMPbuffer[UDBasic,UDpts,UD31]
\processMPbuffer[UDBasic,UDpts,UD4]
\processMPbuffer[UDBasic,UDpts,UD41]
\processMPbuffer[UDBasic,UDpts,UD5]
\processMPbuffer[UDBasic,UDpts,UD51]
\processMPbuffer[UDBasic,UDpts,UDFinal]
\stoptext





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

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


Re: [NTG-context] mathfun (Hans Hagen)

2021-05-21 Thread Jeong Dal
Dear Hans,

Thank you for your new module for math.

If possible, I prefer to use 
$ \sqrt(x) = \compute\sqrt[.3N] {2} $   
$ \pi = \mathexpr[.40N]{pi}$

It is more direct to use and good to write a text in which we need some math 
calculation.
It is another good news for me.
I hope it covers at least all the functions in metafun and in lua.

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] add more blank space when using \starteffect[hidden]

2021-03-17 Thread Jeong Dal
Dear Hans,

It is very interesting example.
Thank you for a new method.

Best regards,

Dalyoung

> 
> \def\determinednoflines#1%
>  {\localcontrolled{\determinenoflines{#1}}\noflines}
> 
> \startbuffer
>\input tufte
> \stopbuffer
> 
> \fillinrules[n=\determinednoflines{\getbuffer},
>  width=fit]{first}
> \fillinrules[n=\determinednoflines{\getbuffer},
>  width=broad]{first}
> \fillinrules[n=\determinednoflines{\getbuffer},
>  width=3cm]{first}
> \fillinrules[n=\determinednoflines{\getbuffer},
>  width=3cm,distance=.5em,separator=:]{first}
> \fillinrules[n=\determinednoflines{\getbuffer}]{first}{last}
> 
> i'll make a better hider later
> 
> -
>  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] add more blank space when using \starteffect[hidden]

2021-03-16 Thread Jeong Dal
Dear Hans,

I found a command \determinenoflines by googling.
I made a MWE as following. It is working well.

But I have to write the paragraph twice for couning.
Is there a better way?

Thank you again.
Best regards,

Dalyoung

%%%
\def\StartHide{\doifmode{hideSolution}{\starteffect[hidden]}}   
\def\StopHide{\doifmode{hideSolution}{\stopeffect\blank[\the\noflines*line + 
\the\noflines*halfline]}}   

\enablemode[hideSolution]

\starttext

The first line.

\hrule
\StartHide
\samplefile{knuth}
\determinenoflines{\samplefile{knuth}}
\StopHide
\hrule

The second line.

\hrule

\StartHide
\samplefile{ward}
\determinenoflines{\samplefile{ward}}
\StopHide

\hrule

The last line.
\stoptext

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

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


Re: [NTG-context] missing "{ }" in metafun.

2021-03-14 Thread Jeong Dal
Dear Hans,

> \$ \_ \& \{ \}
> 
> become letters when we flush a mp graphic, so use
> 
> \lbrace \rbrace instead
> 

It works well.
Thank you so much.

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] add more blank space when using \starteffect[hidden]

2021-03-14 Thread Jeong Dal
Dear Hans,

Thank you for your answer.

> 
> \framedtext[empty=yes]
> 

Yes, it clears everything in the frame.
But the frame is also clean when I disable \hideSolution. In that case, texts 
should be appeared.
What I want is the following:

If \hideSolution then
hide text and add more blank spaces
else
show full text and no more space.
endif

The full text  for the students another for the lecture.

Is there a way not using \framedtext?

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
___


[NTG-context] missing "{ }" in metafun.

2021-03-14 Thread Jeong Dal
Hi,

Set notation “{}” is OK in TeX mode.
But it is missing in the output of the metafun code.
Here is an MWE.

It is same in two different versions.
ConTeXt  ver: 2021.01.17 21:42 LMTX  fmt: 2021.2.4  int: english/english
ConTeXt  ver: 2021.03.13 11:22 LMTX  fmt: 2021.3.14  int: english/english

\startbuffer[test]
label(textext("$\{a,b\}$"),origin);
\stopbuffer
\starttext
Let $A = \{a,b\}$.

\processMPbuffer[test]
\stoptext


Thanks.

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
___


[NTG-context] add more blank space when using \starteffect[hidden]

2021-03-12 Thread Jeong Dal
Hi,

Sometimes, I need to hide the solution of a problem.
So I use \doifmode{} and \starteffect[hidden] as in the following sample file.
Since I want to set more blank space if it is hidden, I add \blank[5cm] when it 
is in the \enablemode[hideSolution].
It works well except the figures and bars are not hidden. Only texts, even  in 
the mp part, are hidden.
It is OK for me.

However, it would be much better to set the height of blank space depends on 
the height of hidden texts.
Is there a way to set the variable height  using “overlay” stuff instead of 
\blank[5cm]?

Thank for reading.

Best regards,

Dalyoung


\startbuffer[circles]
draw fullcircle scaled 1cm;
draw fullcircle scaled 1cm shifted (2cm,0);
dotlabel.top(“O”,origin);
\stopbuffer

\def\StartHide{\doifmode{hideSolution}{\starteffect[hidden]}}   
\def\StopHide{\doifmode{hideSolution}{\stopeffect\blank[5cm]}}   

%\enablemode[hideSolution]

\starttext
\framed[]{This is what I want:}
\framedtext[]{
  \StartHide
  \samplefile{knuth}
 
 Overbar is not \overbar{hidden}.
  {\processMPbuffer[circles]}
  
  \StopHide
}
\stoptext

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

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


Re: [NTG-context] question about vardef variables

2021-01-17 Thread Jeong Dal
Dear Damien Thiriet,

If you change ‘vardef’ to ‘def’, you will get the figure.
There is a difference between ‘vardef’ and ‘def’.
AFAIK, vardef returns the value of the last statement in the macro.
Please see  the examples in Metafun manual from page 32 ~ .
I hope that you find your answer there.

I am sorry that I am not good enough to explain the variables.

Best regards,

Dalyoung

> 2021. 1. 17. 오후 8:00, ntg-context-requ...@ntg.nl 작성:
> 
> \starttext
> \startMPpage
> 
> vardef Test (expr ab,cd)=
>   %numeric ab;
>   %numeric cd;
>   draw unitsquare scaled 10 xshifted ab;
>   draw unitsquare scaled 10 yshifted cd;
> enddef;
> 
> Test (50,100);
> \stopMPpage
> \stoptext

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

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


Re: [NTG-context] adding url as a footnote in the caption of figure

2020-12-30 Thread Jeong Dal
Dear Pablo,

Thank you for your reply.
I just search wiki not the mailing list. I never used \setupnote before.

> I would say that LMTX is causing an issue here (but for sure Hans knows
> better).
> 
> The issue with your MWE is solved by adding:
> 
>  \setupnote[footnote][width=\textwidth]

It works fine.

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


[NTG-context] adding url as a footnote in the caption of figure

2020-12-29 Thread Jeong Dal

Hi,

I am trying to add a url as a footnote in the caption.
There is no error, but it is written in two lines in the footnote.
I also try \hyphenatedurl, \letterslash in the wiki, but it is no use.
I am using "ConTeXt  ver: 2020.12.22 22:14 LMTX”.

Thank you for reading.

Best regards,

Dalyoung

Here is a MWE.

\useMPlibrary[dum]
\unexpanded\def\myurl#1{%
\bgroup{\hyphenatedurl{#1}}\egroup}

\starttext
\startplacefigure[]
{\startcombination[2*1]
{\externalfigure[dummyz][width=.35\makeupwidth]}{Pegasus\footnote{\myurl{https://www.mcescher.com/gallery\letterslash
 recognition-success/no-105-pegasus/}}}
{\externalfigure[dummy][width=.35\makeupwidth]}{Birds\footnote{\myurl{https://www.mcescher.com/gallery/recognition-success/no-128-bird/}}}
\stopcombination}
\stopplacefigure

\stoptext

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

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


Re: [NTG-context] removing many lines about font in log.

2020-11-10 Thread Jeong Dal
Dear Hans,

Thank you for the explanation.
Since those messages takes too many lines in the log file, I ask about it.
I prefer to suppress them. But, someone want to see them.

Since there is no problem to compile, it is OK to let them shown for some one 
want to know what happened.
 
Best regards,

Dalyoung




> 2020. 11. 10. 오전 1:12, Hans Hagen  작성:
> 
> On 11/8/2020 8:05 PM, Jeong Dal wrote:
>> Hi,
>> The following example creates so many lines of messages about fonts in the 
>> log.
>> \definefontfeature [default] [default] [script=hang,language=kor]
>> \starttext
>> \definedfont[file:notoserifcjkkrregular*default]
>> Korean sentences.
>> 한글이 아름답습니다.
>> \stoptext
>> fonts   > 'fallback modern-designsize rm 12pt' is loaded
>> fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
>> script 'grek', no language 'kor'
>> fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
>> script 'latn', no language 'kor'
>> fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
>> script 'kana', no language 'kor'
>> fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
>> script 'cyrl', no language 'kor'
>> fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
>> script 'dflt', no language 'kor'
>> fonts   > defining > f
>> ...
>> Is there a way to suppress messages?
>> Of course, there is no problem to get the output.
> it depends if you're interested in it ... i kept it for cases where users 
> expect some feature to work while the font doesn't have it but I have no 
> problem making it optional
> 
> Hans
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
> www.pragma-pod.nl <http://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] removing many lines about font in log.

2020-11-08 Thread Jeong Dal

Hi,

The following example creates so many lines of messages about fonts in the log.

\definefontfeature [default] [default] [script=hang,language=kor]

\starttext
\definedfont[file:notoserifcjkkrregular*default]
Korean sentences.

한글이 아름답습니다.
\stoptext

fonts   > 'fallback modern-designsize rm 12pt' is loaded
fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
script 'grek', no language 'kor'
fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
script 'latn', no language 'kor'
fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
script 'kana', no language 'kor'
fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
script 'cyrl', no language 'kor'
fonts   > defining > font 'notoserifcjkkrregular', feature 'vert', 
script 'dflt', no language 'kor'
fonts   > defining > f
...

Is there a way to suppress messages?
Of course, there is no problem to get the output.

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] \dorecurse{}{} problem

2020-09-21 Thread Jeong Dal

Dear Aditya, Jairo, Wolfgang, and Otared,

Thank you for the replies and explanations.
I also read the blog.

In this case, using '##1’ is an easy way.
For more complex table, I may use luacode.

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


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

2020-09-21 Thread Jeong Dal
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 Sep 2020 14:55:02 +0200
> From: Christoph Reller 
> To: Hans Hagen 
> Cc: mailing list for ConTeXt users 
> Subject: Re: [NTG-context] ZapfDingbats Unicode differences MKIV vs
>   LMTX
> Message-ID:
>   
> Content-Type: text/plain; charset="utf-8"
> 
> On Sat, Sep 19, 2020 at 12:04 PM Hans Hagen  wrote:
> 
>> On 9/19/2020 6:18 AM, Christoph Reller wrote:
>>> On Fri, Sep 18, 2020 at 4:17 PM Hans Hagen >> > wrote:
>>> 
>>>On 9/18/2020 11:23 AM, Christoph Reller wrote:
>>> 
>> \definefontsynonym[ZapfDingbats][file:ZapfDingbats][features=dingbats]
 \usemodule [fnt-10]
 \starttext
 (1) \getglyphdirect{ZapfDingbats}{61491}\crlf % MKIV log: char 
 (U+0F033) in font 'ZapfDingbats-4' with id 8: missing
 (2) \getglyphdirect{ZapfDingbats}{983059} % LMTX log: char 
 (U+F0013) in font 'ZapfDingbats-4' with id 8: missing
 \ShowCompleteFont{name:ZapfDingbats}{14pt}{1}
 \stoptext
 
>>>Dingbats are old school t1 without proper names so we can't use
>>>unicodes. However, there is a goodie that should do that so that in
>>>principle it should work with unicodes but there is some interference
>>>going on (i'll look at that)
>>> 
>>>For nwo access by 'name' or 'index' (these are kind of stable for
>> such
>>>an old font):
>>> 
>>>   n:a34  : \getglyph{ZapfDingbats}{\tochar{n:a34}}  \par
>>>   n:a35  : 

Re: [NTG-context] Installing VSCode extension?

2020-08-05 Thread Jeong Dal
Dear Mikael,


> 2) Is there a nice way to compile the tex file from
> within vs code? As of
> now, I opened a terminal and compiled from that, but that feels like the
> wrong way of doing it.

For the first question, I don’t know either.
For the second question, I’d like to explain what I did for compiling TeX file 
in vscode.
Since I use vscode in MacOsX, you may find your way in Linux.

There is a tasks.json file in .vscode folder.
I added the following script in the “tasks":[ ]  and save it.
(You have to modify the  "texmf-osx-64/bin” path in the following script from 
your machine.

{
"label": "ConTeXt LuaMetaTeX",
"type": "shell",
"command": "export 
PATH=/Users/graph/ConTeXtLM/tex/texmf-osx-64/bin:$PATH;mtxrun --autogenerate 
--script context --autopdf --purge '${file}'",
"args": [],
"options": {
"cwd": "${fileDirname}"
},
"group": {
"kind": "build",
"isDefault": true
}
 },

When you want to compile a ConTeXt file, find “terminal > Run Build task” in 
the menu,
then “ConTeXt LuaMetaTex” will pop up.
Or just use the key “command-shift-B” instead using menu item.

I hope that it may help.

Best wishes,

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] Installing VSCode extension?

2020-07-30 Thread Jeong Dal
Dear Alasdair McAndrew,

I am using vscode in iMac, so my setting may not work for you.



1. First, find files for vscode in your TeX folder.

In my case, 

/ConTeXt-homefolder/tex/texmf-context/context/data/vacode/extensions/context/*.*

2. In a homefolder, there is a hidden folder “.vacode”.

Copy context/*.* to  ./vscode/extensions/context/*.*

3. Open vscode and enable context-extension.

Since it was long time ago, my memory may not be correct.
However, I hope that it may give you an idea.

Best wishes,

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] Code lua in a table

2020-07-20 Thread Jeong Dal
Dear Hans,

Thank you for new methods!
It would take some time for me to understand them fully.

Learning Lua, metafun, lmtx, wiki is always a challenge for me.
I also wonder where is the boundary of ConTeXt.

I hope that you and all members in this list are well from COVID-19.

Thank you again.

Best regards,

Dalyoung

> 2020. 7. 20. 오후 5:36, Hans Hagen  작성:
> 
> On 7/20/2020 7:56 AM, Jeong Dal wrote:
>> Dear Fabrice,
>> You may split Binom(n,k) function into two functions as following:
> > see original mail
> >
>> Dalyoung
> Best stay in a protected namespace ...
> 
> \startluacode
> 
>local function fact (n)
>if n <= 0 then
>return 1
>else
>return n * fact(n-1)
>end
>end
> 
>local function ncr(n,r)
>return fact(n)/(fact(r)*fact(n-r))
>end
> 
>userdata.P = {
>fact = fact,
>ncr  = ncr,
>}
> 
>function MP.pascal_ncr(n, r)
>mp.print(ncr(n,r))
>end
> 
> \stopluacode
> 
> Watch the last definition. This permits
> 
>  % tt := lua("mp.print(userdata.P.ncr(" & decimal n & "," & decimal r & " 
> ))");
> 
> replaced by
> 
>tt := lua.MP.pascal_ncr(n,r);
> 
> which looks nicer.
> 
> \startbuffer[pt1]
>numeric n, r, s, u, dx, dy, tt;
>path p, q;
>pair A, B, start, now;
>u := 1.8cm;
>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(userdata.P.ncr(" & decimal n & "," & decimal r 
> & " ))");
>  tt := lua.MP.pascal_ncr(n,r);
>now := start+r*right*dx;
>dotlabel.top(textext("$\displaystyle {" & decimal n & "\choose" & 
> decimal r & "} = "& decimal tt & "$"),now);
>draw (now+A) -- now -- (now+B);
>endfor;
>endfor;
> \stopbuffer
> 
> Now, in context lmtx we can have a different kind of abstraction. We can do 
> this:
> 
>function MP.pascal_ncr_x()
>mp.print(ncr(mp.scan.pair()))
>end
> 
> and then use:
> 
>tt := runscript("MP.pascal_ncr_x()") (n,r) ;
> 
> Of course one can decide to pick to two numerics instead, like
> 
>tt := runscript("MP.pascal_ncr_x()") n r ;
> 
> but i leave that as exercise.
> 
>  % tt := runscript mp_pascal_ncr (n,r) ;
>tt := pascal_ncr (n,r) ;
> 
> However, we still have the rather verbose runscript here, so we go further, 
> we register pascal as script:
> 
> \startluacode
>metapost.registerscript("pascal_ncr",MP.pascal_ncr_x)
> \stopluacode
> 
> And then define an alias at the metafun end:
> 
> \startMPextensions
>newinternal mp_pascal_ncr ; mp_pascal_ncr := scriptindex "pascal_ncr" ;
> 
>def pascal_ncr =
>runscript mp_pascal_ncr
>enddef ;
> \stopMPextensions
> 
> The internal permits this:
> 
>   tt := runscript mp_pascal_ncr (n,r) ;
> 
> while the additional def permits
> 
>tt := pascal_ncr (n,r) ;
> 
> Now watch out, because we define pascal_ncr here, something
> lua.MP.pascal_ncr(n,r) won't work because the last part gets expanded because 
> that is what mp does (i'll probably cook something for that some day).
> 
> Now, to come back to
> 
>   "I couldn’t wikify it at that time because I don’t know
>how to.  I’ll do it soon."
> 
> looks like you suddenly have an additional challenge,
> 
> 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] Code lua in a table

2020-07-20 Thread Jeong Dal
Dear Fabrice,

You may split Binom(n,k) function into two functions as following:

*
\startluacode
P={}
combi = P

function P.fact (n)
  if n <= 0 then
return 1
  else
return n * P.fact(n-1)
  end
end

function P.ncr(n,r)
return P.fact(n)/(P.fact(r)*P.fact(n-r))
end
combi = {
fact = fact,
ncr = ncr,
}
\stopluacode
**

Your table is actually Pascal’d triangle. 
Using the above function, I was able to draw Pascal’s triangles.
Hans helped me to complete it.
I couldn’t wikify it at that time because I don’t know how to.  I’ll do it soon.

Here is the whole code for Pascal’s triangle in two different ways using Lua, 
Metafun and ConTeXt.
You may enhance the code.

\startbuffer[pt1]
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(P.ncr(" & decimal n & "," &  decimal r & " ))");
now := start+r*right*dx;
dotlabel.top(textext("$\displaystyle {" & decimal n & "\choose" & 
decimal r & "} = "& decimal tt & "$"),now);
draw (now+A) -- now -- (now+B);
endfor;
endfor;
\stopbuffer
\startbuffer[pt2]
numeric n,r,s,u,dx,dy,tt; u := 1cm;
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 8:
start := n*dir(210)*u;
for r=0 upto n:
s := n-r;
tt := lua("mp.print(P.ncr(" & decimal n & "," &  decimal r & " ))");

now := start+r*right*dx;
label(textext("$" & decimal tt & "$"),now);
endfor;
endfor;
\stopbuffer
\startluacode
P={}
combi = P

function P.fact (n)
  if n <= 0 then
return 1
  else
return n * P.fact(n-1)
  end
end

function P.ncr(n,r)
  return P.fact(n)/(P.fact(r)*P.fact(n-r))
end
combi = {
  fact = fact,
  ncr = ncr,
}
\stopluacode
\starttext

\processMPbuffer[pt1]
\blank[big]
\processMPbuffer[pt2]

\stoptext

I hope that it helps.

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
___


[NTG-context] error during the installation of luametatex

2020-05-09 Thread Jeong Dal
Hi,

I tried to update luametatex which was running well(it was installed following 
the process in the wiki>installation> MacOsX catalina), but I got the following 
error after all the files are downloaded.

resolvers   > lua > loading file 
'/Users/graph/ConTeXtL/tex/texmf-context/tex/context/base/mkiv/math-spa.lua' 
succeeded

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

l.2960 \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.


resolvers   | formats |
resolvers   | formats | binary path  : 
/Users/graph/ConTeXtL/tex/texmf-osx-64/bin
resolvers   | formats | format path  : 
/Users/graph/ConTeXtL/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex
resolvers   | formats | luatex engine: luametatex


However, the installation continues to end. 
But the same error appears when I compile a tex file.

***
resolvers   > lua > loading file 
'/Users/graph/ConTeXtLM/tex/texmf-context/tex/context/base/mkiv/math-spa.lua' 
succeeded

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

l.2960 \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.


resolvers   | formats |
resolvers   | formats | binary path  : 
/Users/graph/ConTeXtLM/tex/texmf-osx-64/bin
resolvers   | formats | format path  : 
/Users/graph/ConTeXtLM/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex
resolvers   | formats | luatex engine: luametatex
resolvers   | formats | lua startup file : 
/Users/graph/ConTeXtLM/tex/texmf-context/tex/context/base/mkiv/luat-cod.lua
resolvers   | formats | context file : 
/Users/graph/ConTeXtLM/tex/texmf-context/tex/context/base/mkiv/cont-en.mkxl
*

I’d like to know what is wrong in this process.

Thank you for reading.

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] Vertical lines in matrices

2020-05-04 Thread Jeong Dal
Dear Weber Mattias,

Please see page 10 of “mathalign.pdf” made by Aditya.
He showed the way of writing  aligned math including  matrices.
For example,

\startformula

 \startmatrix[left={\left(\,},right={\,\right)}]

  \NC 1 \NC 0 \NC 0 \NR
  \NC 0 \NC 1 \NC 0 \NR
  \NC 0 \NC 0 \NC 1 \NR
\stopmatrix 
  \stopformula 
There are many other examples that you can use.

Best regards,
Dalyoung

> Message: 2
> Date: Sun, 3 May 2020 17:47:24 +
> From: "Weber, Matthias" 
> To: mailing list for ConTeXt users 
> Subject: [NTG-context] Vertical lines in matrices
> Message-ID: 
> Content-Type: text/plain; charset="utf-8"
> 
> Dear List,
> 
> I am trying to get vertical (separating) lines into matrices, as is possible 
> in tables:
> 
> \starttext
> \startformula
> \left(
> \starttable[|c|c|c|]
> \NC 0 \NC  0\VL  0 \FR
> \NC 1 \NC  0\VL  1 \FR
> \stoptable
> \right)
> \stopformula
> \stoptext
> 


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

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


Re: [NTG-context] animation using \startuseMPgraphic

2020-04-21 Thread Jeong Dal
Dear Hans,

I have not experienced a bottleneck when running ConTeXt.
It is stable and fast. 

I am satisfied with ConTeXt except there are many features and commands which 
are not explained.
Frankly speaking, I don’t need that much commands for my job. 
Also it is not the problem because there are many experts who willingly give 
the solutions in the list mail

I appreciate you and your team.

Best regards,

Dalyoung

> 2020. 4. 21. 오전 2:19, Hans Hagen  작성:
> 
> On 4/20/2020 4:40 PM, Jeong Dal wrote:
> 
>> Of course, it runs so fast that it is meaningless to shorten the runtime.
>> It is my old habit to check the algorithmic efficiency.
> 
> We share the same habit ... unfortunately there is not much performance to 
> gain after all these years. Of course users are invited to tell me where they 
> see a (real) bottleneck that doesn't make sense to them.
> 
> 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] animation using \startuseMPgraphic

2020-04-20 Thread Jeong Dal
Dear Hans,

Of course, it runs so fast that it is meaningless to shorten the runtime.
It is my old habit to check the algorithmic efficiency.

It is just my interest.

Thank you for your concern.

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] animation using \startuseMPgraphic

2020-04-19 Thread Jeong Dal
Dear Aditya,

Thank you for your link.
It is good to see your nice code.

I’ll see how to apply \startMPanimation … \stopMPanimation to my sample.

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
___


Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Jeong Dal
Dear Wolfgang,

I’d like to ask you one more.

To make an animation, almost same graphics are drawn repeatedly.
In my code, for example,
The base figure(two circles, line, boundingbox) is fixed and only points are 
moved.
But it draws the base figure every time and it is not inefficient.

Is there a way to draw the base figure once, and draw the points only at each 
frame?

Thank you.
Best regards,

Dalyoung

\startuseMPgraphic{inversionPoint}{n}
vardef findPointD(expr C, Q, r) = 
numeric dist, ang;
pair X, Y;
dist := r**2/sqrt((xpart Q - xpart C)**2 + (ypart Q - ypart C)**2);
ang := angle(Q - C);
Y := C + dir(ang)*dist;
Y
enddef;

numeric radius, now, move;
pair A,B,C,P,Q;
path p,q;
   radius := 2cm;
   C := origin;
   p := fullcircle scaled (2*radius);
   z[1] = point 6 of p;
   z[2] = point .8 of p;

   q := (1.5*z1 - .5*z2) -- (-.5z1 + 1.5*z2);
   %q := fullcircle scaled radius shifted (2cm, 1cm);
   draw p;
   draw q; 

% end of base figure
% draw points

move := 0.1;
now := move*\MPvar{n};
P := point now along q;
Q := findPointD(C, P, radius);
drawdot P;
drawdot Q withcolor .625red;
dotlabel.lft(textext("P"),P);
dotlabel.rt(textext("Q"),Q) withcolor .625red;
\stopuseMPgraphic

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

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

2020-04-19 Thread Jeong Dal
Dear Wolfgang,

Thank you for your help.
It works fine.

As you said, I need to use boundingbox for stable animation.

Thank you again.

Best regards,

Dalyoung


> 2020. 4. 19. 오후 4:19, Wolfgang Schuster  
> 작성:
> 
> Jeong Dal schrieb am 19.04.2020 um 07:08:
>> Dear all,
>> I am trying to make an animation using the animation module.
>> But it draws 10 figures instead of creating animation.
>> Is there anything I have to do more?
> 
> You have to put each animation step in a frame environment. I recommend also 
> to set the boundingbox to the same size for each frame, otherwise your 
> graphic jumps around.
> 
> When you use \recurselevel you have to use this:
> 
> \startanimation[menu=yes]
>  \dorecurse{10}
>{\startexpanded
>   \startframe
> \useMPgraphic{inversionPoint}{n=\recurselevel}%
>   \stopframe
> \stopexpanded}
> \stopanimation
> 
> or use #1 to access the counter level and get rid of \startexpanded:
> 
> \startanimation[menu=yes]
>  \dorecurse{10}
>{\startframe
>   \useMPgraphic{inversionPoint}{n=#1}%
> \stopframe}
> \stopanimation
> 
> Wolfgang

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

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


[NTG-context] animation using \startuseMPgraphic

2020-04-18 Thread Jeong Dal
Dear all,

I am trying to make an animation using the animation module.
But it draws 10 figures instead of creating animation.
Is there anything I have to do more?
Or, is there a better way to do this?

Thank you for reading.

Best regards,

Dalyoung


\startuseMPgraphic{inversionPoint}{n}
vardef findPointD(expr C, Q, r) = 
numeric dist, ang;
pair X, Y;
dist := r**2/sqrt((xpart Q - xpart C)**2 + (ypart Q - ypart C)**2);
ang := angle(Q - C);
Y := C + dir(ang)*dist;
Y
enddef;
numeric radius, now, move;
pair A,B,C,P,Q;
path p,q;

radius := 2cm;
C := origin;
p := fullcircle scaled (2*radius);
z[1] = point 6 of p;
z[2] = point .8 of p;

q := (1.5*z1 - .5*z2) -- (-.5z1 + 1.5*z2);
%q := fullcircle scaled radius shifted (2cm, 1cm);
draw p;
draw q; 
%for i := 0 step 0.1 until 1:
move := 0.1;
now := move*\MPvar{n};
P := point now along q;
Q := findPointD(C, P, radius);
drawdot P;
drawdot Q withcolor .625red;
dotlabel.lft(textext("P"),P);
dotlabel.rt(textext("Q"),Q) withcolor .625red;
%endfor;
\stopuseMPgraphic

\usemodule[animation]
\setupinteraction[state=start]

\starttext
%\startplacefigure[]
\startanimation[menu=yes]
\dorecurse{10}{
\useMPgraphic{inversionPoint}{n=\recurselevel}
}
\stopanimation
%\stopplacefigure
\stoptext


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

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


Re: [NTG-context] \startMPcode and \startMPpage

2020-04-16 Thread Jeong Dal
Dear Hans,

Thank you for the reply.
Since  \startMPcode … \stopMPcode form is used in the manual, I think that it 
is OK to use it for all cases.

Thank you again.

Best regards,

Dalyoung


> 2020. 4. 17. 오전 5:01, Hans Hagen  작성:
> 
> On 4/16/2020 8:36 PM, Jeong Dal wrote:
>> Hi,
>> The following sample code is working well in the \startMPpage ~ \stopMPpage, 
>> but is not working in the \startMPcode ~ \stopMPcode.
>> The error message is
>> \textfont0 is undefined (character 63)
>> l.6 \setstrut\strut $A$
>> If I remove “$” from the code, it is also working in \startMPcode ~ 
>> \stopMPcode.
>> Is there anything which I have to set for \startMPcode?
> 
> \starttext ... \stoptext
> 
> or
> 
> \startMPpage[instance=doublefun]
> 
> \stopMPpage
> 
>> Best regards,
>> Dalyoung
>> 
>> \startMPcode{doublefun}
>> %\startMPpage
>> numeric count, temp[], tt, minus, u; u := 1cm;
>> path p,q,r;
>> pair A,B,C,D;
>> string varName, ss, pos[];
>> p := unitsquare xyscaled (8u,3.5u);
>> *draw p;*
>> *
>> *
>> pos[0] := "bot";
>> pos[1] := "rt";
>> pos[2] := "top";
>> pos[3] := "lft";
>> varName := "yxwz";
>> count := 0;
>> pickup pencircle scaled 5pt;
>> for i = 0 upto 3:
>> drawdot (point i of p);
>> draw lmt_text[
>> text = "$" & char(65+i) & "$",
>> anchor = pos[i],
>> offset = 2pt,
>> position = point i of p,
>> ];
>> endfor;
>> %\stopMPpage
>> \stopMPcode
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>> <http://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : http://contextgarden.net <http://contextgarden.net/>
>> ___
> 
> 
> -- 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
> www.pragma-pod.nl <http://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] \startMPcode and \startMPpage

2020-04-16 Thread Jeong Dal
Hi,

The following sample code is working well in the \startMPpage ~ \stopMPpage, 
but is not working in the \startMPcode ~ \stopMPcode.

The error message is 

\textfont0 is undefined (character 63)

l.6 \setstrut\strut $A$

If I remove “$” from the code, it is also working in \startMPcode ~ \stopMPcode.

Is there anything which I have to set for \startMPcode?

Best regards,

Dalyoung


\startMPcode{doublefun}
%\startMPpage
numeric count, temp[], tt, minus, u; u := 1cm;
path p,q,r;
pair A,B,C,D;
string varName, ss, pos[];
p := unitsquare xyscaled (8u,3.5u);
draw p;

pos[0] := "bot";
pos[1] := "rt";
pos[2] := "top";
pos[3] := "lft";
varName := "yxwz";
count := 0;
pickup pencircle scaled 5pt;

for i = 0 upto 3: 
drawdot (point i of p);
draw lmt_text[
text = "$" & char(65+i) & "$",
anchor = pos[i],
offset = 2pt,
position = point i of p,  
];
endfor;
%\stopMPpage
\stopMPcode


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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-12 Thread Jeong Dal
Dear Hans,

Thank you for your new code.

Frankly speaking, it is hard to follow your code right now because of my little 
knowledge about these matter.
I need some time  to understand your code fully, especially lmtx.
I’ll do  more exercises using your code.

Thank you for your concern.

Best regards,

Dalyoung


> 2020. 4. 12. 오후 6:44, Hans Hagen  작성:
> 
> Hi Dal,
> 
>> Thank you for your nice code.
>> lua.MP.Whatever is something!
> 
> just keep in mind that lua.MP is the user namespace and lua.mp (lowercase) 
> the system one
> 
> btw, as you're doing math in mp, in lmtx (which has some extra metafun 
> features) we have some more math functions available:
> 
> m_acos m_acosh m_asin m_asinh m_atan m_atantwo m_atanh m_cbrt m_ceil 
> m_copysign
> m_cos m_cosh m_deg m_erf m_erfc m_exp m_exptwo m_expm m_fabs m_fdim m_floor 
> m_fma
> m_fmax m_fmin m_fmod m_frexp m_gamma m_hypot m_isfinite m_isinf m_isnan
> m_isnormal m_jz m_j m_jn m_ldexp m_lgamma m_log m_logten m_logp m_logtwo 
> m_logb
> m_modf m_nearbyint m_nextafter m_pow m_rad m_remainder m_remquo m_round 
> m_scalbn
> m_sin m_sinh m_sqrt m_tan m_tanh m_tgamma m_trunc m_yz m_y m_yn
> 
> c_sin c_cos c_tan c_sinh c_cosh c_tanh c_asin c_acos c_atan c_asinh c_acosh
> c_atanh c_sqrt c_abs c_arg c_conj c_exp c_log c_proj c_erf c_erfc c_erfcx 
> c_erfi
> c_imag c_real c_neg c_pow c_add c_sub c_mul c_div c_voigt c_voigt_hwhm c_imag
> c_real c_neg
> 
> these are using the functions in the xmath and xcomplex namespaces that are 
> provided in the lmtx lua interfaces
> 
> there's also an xdecimal namespace for using decimal calculations with high 
> precisions but not yet interfaced to the mp end which actually already has 
> decimal anyway
> 
> (if some matrix features are needed at the mp end, as extension to the matrix 
> module, then we can explore that as we have ways to pick up data from mp, 
> process it by lua, and pipe it back, which is also pretty efficient by now - 
> not that mp graphics are much of a bottleneck)
> 
> Here is an example of a crude interfacve if you need indeed hundreds such 
> exercises
> 
> \unexpanded\def\WhateverShape#1#2#3%
>  {$\displaystyle{#1\choose #2} = #3$}
> 
> \startluacode
> local function fact(n)
>if n <= 0 then
>return 1
>else
>return n * fact(n - 1)
>end
> end
> 
> local function whatever(n,r)
>return fact(n) / (fact(r) * fact(n-r))
> end
> 
> function MP.lmt_WhateverShape(n,r)
>mp.quoted([[\WhateverShape{%.0f}{%.0f}{%.0f}]],n,r,whatever(n,r))
> end
> 
> -- or in latest lmtx:
> --
> -- function MP.lmt_WhateverShape(n,r)
> -- mp.inject(
> -- string.format(
> -- [[\WhateverShape{%.0f}{%.0f}{%.0f}]],
> -- n,
> -- r,
> -- whatever(n,r)
> -- )
> -- )
> -- end
> \stopluacode
> 
> \startMPextensions
> 
> presetparameters "WhateverShape" [
>options = "labels",
>angle   = 30,
>unit= 2cm,
>color   = "black",
> ] ;
> 
> def WhateverShape = applyparameters "WhateverShape" "lmt_WhateverShape" 
> enddef ;
> 
> vardef lmt_WhateverShape =
>image (
> 
>pushparameters "WhateverShape" ;
> 
>save u, a, b, dx, n, r ;
>save A, B, start, now ; pair A, B, start, now ;
> 
>u  := getparameter "unit" ;
>a  := getparameter "angle" ;
>b  := a + 180 ;
> 
>A  := u * dir(a) ;
>B  := u * dir(-b) ;
>dx := u * 2 * cosd(b) ;
> 
>draw image (
>for n = 0 upto 4 :
>start := n * A ;
>for r = 0 upto n :
>now := start + r * right * dx ;
>draw (now + A) -- now -- (now + B) ;
>endfor ;
>endfor ;
>) withcolor getparameter "color" ;
> 
>for n = 0 upto 4 :
>start := n * A ;
>for r = 0 upto n :
>now := start + r * right * dx ;
>if hasoption "options" "labels" :
> dotlabel.top(textext(lua.MP.lmt_WhateverShape(n,r)),now) ;
>fi ;
>endfor;
>endfor;
> 
>popparameters ;
>)
> enddef ;
> 
> \stopMPextensions
> 
> \starttext
> 
> \startMPcode
>draw WhateverShape [
>angle = 30,
>unit  = 1.8cm,
>color = "darkgreen",
>] ;
> \stopMPcode
> 
> \startMPcode
>draw WhateverShape [
>options = "",
>angle   = 40,
>color   = "darkred",
>unit= 4*BodyFontSize,
>] ;
> \stopMPcode
> 
> \stopMPcode
> 
> (parameters can be strings, numerics, booleans, pairs, paths, tables, etc)
> 
> 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
> 

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

2020-04-11 Thread Jeong Dal
Dear Hans,

Thank you for your nice code.
lua.MP.Whatever is something!

Have a nice weekend.

Best regards,

Dalyoung

> 2020. 4. 12. 오전 2:08, Hans Hagen  작성:
> 
> On 4/11/2020 4:15 PM, Jeong Dal wrote:
>> Dear all,
>> The problem is solved by using the namespace of lua as below:
>> I am not sure what I did is the right way.
>> If it is not the right way, please let me know.
>> Thanks for reading.
>> Best regards,
>> Dalyoung
>> \startluacode
>> P={}
>> combi = P
>> function P.fact (n)
>> if n <= 0 then
>> return 1
>> else
>> return n * P.fact(n-1)
>> end
>> end
>> function P.ncr(n,r)
>> return P.fact(n)/(P.fact(r)*P.fact(n-r))
>> end
>> combi = {
>> fact = fact,
>> ncr = ncr,
>> }
>> \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(P.fact(" & decimal n & ")/(P.fact(" & decimal r & 
>> ")*P.fact(" & decimal s &" )))");
>> tt := lua("mp.print(P.ncr(" & 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
> Sunday afternoon educational moment (that you can wikify), four variants:
> 
> 1 : A more metafunish alternative of your example.
> 2 : The same but avoiding a temporary variable.
> 3 : Less code and clutter, the real deal.
> 4 : Idem, but permits more tuning at the TeX end.
> 
> \unexpanded\def\MyWhatever#1#2#3%
>  {$\displaystyle{#1\choose #2} = #3$}
> 
> \startluacode
> local function fact(n)
>if n <= 0 then
>return 1
>else
>return n * fact(n - 1)
>end
> end
> 
> local function whatever(n,r)
>   return fact(n) / (fact(r) * fact(n-r))
> end
> 
> MP.WhateverA = whatever
> 
> function MP.WhateverB(n,r)
>   mp.quoted("%.0f",whatever(n,r))
> end
> 
> function MP.WhateverC(n,r)
>   mp.quoted([[$\displaystyle{%.0f\choose %.0f} = %.0f$]],n,r,whatever(n,r))
> end
> 
> function MP.WhateverD(n,r)
>   mp.quoted([[\MyWhatever{%.0f}{%.0f}{%.0f}]],n,r,whatever(n,r))
> end
> \stopluacode
> 
> \startbuffer[fig121]
>numeric n, r, s, u, dx, dy, tt;
>path p, q ; pair A, B, start, now;
>u := 1.8cm;
>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;
>now := start + r*right*dx;
>draw (now + A) -- now -- (now + B);
> 
>tt := lua.MP.WhateverA(n,r) ;
> 
>dotlabel.top(textext("$\displaystyle {" & decimal n & "\choose" & 
> decimal r & "} = "& decimal tt & "$"),now);
> 
>dotlabel.top(textext("$\displaystyle {" & decimal n & "\choose" & 
> decimal r & "} = "& lua.MP.WhateverB(n,r) & "$"),now);
> 
>dotlabel.top(textext(lua.MP.WhateverC(n,r)),now);
> 
>dotlabel.top(textext(lua.MP.WhateverD(n,r)),now);
> 
>endfor;
>endfor;
> \stopbuffer
> 
> \starttext
> 
>{\switchtobodyfont[11pt]\processMPbuffer[fig121]}
> 
> \stoptext
> 
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -

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

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


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

2020-04-11 Thread Jeong Dal
Dear all,

The problem is solved by using the namespace of lua as below:
I am not sure what I did is the right way.
If it is not the right way, please let me know.

Thanks for reading.

Best regards,

Dalyoung



\startluacode
P={}
combi = P

function P.fact (n)
  if n <= 0 then
return 1
  else
return n * P.fact(n-1)
  end
end

function P.ncr(n,r)
   return P.fact(n)/(P.fact(r)*P.fact(n-r))
end
combi = {
   fact = fact,
   ncr = ncr,
}
\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(P.fact(" & decimal n & ")/(P.fact(" & decimal r & 
")*P.fact(" & decimal s &" )))");
  tt := lua("mp.print(P.ncr(" & 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

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] running lua in metafun and in ConTeXt

2020-04-11 Thread Jeong Dal
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
___


Re: [NTG-context] write a subtitle under the title of a chapter using outlined font

2020-03-21 Thread Jeong Dal
Dear Hans,

Your method perfectly works!
The number of chapter use the same font as the main title font and there is no 
big space between main title and the subtitle.

Thank you.

Best regards,

Dalyoung


> 
> On 3/20/2020 11:07 AM, Jeong Dal wrote:
>> Dear Hans,
>> Here is another problem.
>> To use a big font for the title and a small font for the subtitle, I set the 
>> font size in the \setuphead.
>> Then it writes them fine in two lines, but a big linespace between them.
>> If I remove the “style=\BigFontTwo” from the \setuphead, and use it in the 
>> title input like
>> \startchapter[title={{\BigFontTwo A Long Long Title}\crlf{\tfa Sub Title}}]
>> then a big space is gone, but the chapter number follows the size of 
>> subtitle.
>> How to remove the big space while the chapter number follows the size of the 
>> title?
> \tfd \setupinterlinespace Foo \par
> \tfa \setupinterlinespace Bar \par
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] write a subtitle under the title of a chapter using outlined font

2020-03-19 Thread Jeong Dal
Dear Hans,

I found how to.
By removing ‘& ditto’, then it works!

>   draw outlinetext.b ("\framed[align=normal]{" & \MPvar{tt}  & "}”)

Thank you so much.

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] write a subtitle under the title of a chapter using outlined font

2020-03-19 Thread Jeong Dal
Dear Hans,

Thanks for the reply.
Your method works partly.

> 
>draw outlinetext.b ("\framed[align=normal]{" & ditto & \MPvar{tt} & ditto 
> & "}”)
> 

It allows to write it in two lines. However, the title is surrounded by ‘ “ ‘.
How to remove it?

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
___


[NTG-context] write a subtitle under the title of a chapter using outlined font

2020-03-19 Thread Jeong Dal
Hi,

long time ago, I can use outlined fonts for the title of a chapter by the help 
of the experts in this list.
Now, I’d like to write a subtitle under the title, but \crlf is not working.
I tried in several ways, but I couldn’t make it.

How to write them in two lines?

Thanks.

Best regards,

Dalyoung

**
\startuseMPgraphic{outlineT}
  draw outlinetext.b (\MPvar{tt})
  (withcolor .75white)
  (withcolor .725blue withpen pencircle scaled .75pt);
\stopuseMPgraphic

\define[1]\outlineFill{\useMPgraphic{outlineT}{tt="#1"}}%

\setuphead[chapter,title]
 [textcommand=\outlineFill,
  color=.625Blue,
  numbercommand=\outlineFill,
  number=yes]

\setupbodyfont[rm, 12pt]

\starttext

\startchapter[title={First Title\crlf{\tfa Sub Title}}]
\input knuth
\stopchapter

\stoptext

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

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


Re: [NTG-context] ConTeXt support for Atom

2020-01-15 Thread Jeong Dal
Hi,

Thanks for "language-context”.

> 
>> what are the key shortcuts to compile the context file at hand?
>> i try the atom editor on Linux platform.
>> Can't find the way to feed the tex file into context luatex...
> 
> There are no key shortcuts. I use a terminal.
> As I wrote:
> 
>> So there’s no run command or something like Atom-LaTeX
> 

When I use Atom for ConTeXt, I use the package,”process palette” in which 
commands and a key shortcut are defined. By pressing the defined key-shortcut, 
terminal will do the job as Hraban said.

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] background color of text in contour(former: ntg-context Digest, Vol 186, Issue 61)

2019-12-29 Thread Jeong Dal
Dear Wolfgang,

Now, I understand why the error messages “\texfont0 is undefined”, “ you used 
the started character from an undefined font family.” are appeared.

Thank you for your clear explanation.

Best regards,

Dalyoung


>> 3. removing \starttext, \stoptext, and functionstyle=“math”, it worked. 
>> However the caption 
>> “x=[…];  y=[….]” is overlapped.
> 
> ConTeXt doesn't preload fonts and only when no font was set untill \starttext 
> latin modern is used as fallback font at this point.
> 
> When you omit \starttext no font is loaded and when you use math mode (which 
> is the case when you use funtionstyle=math) the error message appears. 
> Another fallback in this case it to load a monospaced font in horizontal or 
> vertical boxes which is what you set in your example when you remove 
> \starttext.




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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] background color of text in contour(former: ntg-context Digest, Vol 186, Issue 61)

2019-12-29 Thread Jeong Dal
Dear Hans,

I run the following code which is in page 24,25 luametafun.pdf.

1. adding \starttext and \stoptext, it works fine. No overlapping. 
Also, functionstyle = “math” is working nicely.

2. removing \starttext and \stoptext, then functionstyle =“math” invoked an 
error.

3. removing \starttext, \stoptext, and functionstyle=“math”, it worked. However 
the caption 
“x=[…]; y=[….]” is overlapped.

%\starttext
\startMPcode{doublefun} 
draw lmt_contour [
xmin = 0, xmax = 4*pi, xstep = .05,
ymin = -6, ymax = 6, ystep = .05,
levels = 7,
height = 5cm,
preamble = "local sin, cos = math.sin, math.cos",
function = "cos(x)+sin(y)",
%functionstyle = "math",
background = "bitmap",
foreground = "edge",
linewidth = 1/2,
cache = true,
]; 
\stopMPcode
%\stoptext


Thank you so much.

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] background color of text in contour(former: ntg-context Digest, Vol 186, Issue 61)

2019-12-28 Thread Jeong Dal
Dear Hans,

Thank you for the fix.
Background color is OK now.

A new problem in the caption:
Since width of the figure is narrower than the width of the line 
"x = [0,12.555]; y = [-6,6];”,
“y  =“ is written over 12.555. 

Is there any option to suppress the caption x, y since there are numbers of x 
and y in the figure already?

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] ntg-context Digest, Vol 186, Issue 61

2019-12-26 Thread Jeong Dal
Dear Hans,

I read the “luametafun.pdf” and run the codes one by one.
It is a really nice to have those figures easily.

During the reading, I found that there is a difference between the figure in 
the manual and the output of my run.
I run the following code at page 24-25 in “luametafun.pdf”.

\startMPcode{doublefun} draw lmt_contour [
xmin = 0, xmax = 4*pi, xstep = .05,
ymin = -6, ymax = 6, ystep = .05,
levels =7,
height = 5cm,
preamble = "local sin, cos = math.sin, math.cos",
function = "cos(x) + cos(y)"
background = "bitmap",
foreground = "edge", 
linewidth = 1/2, 
cache = true,
]; 
\stopMPcode


In the output, the background of text is gray while the background of text in 
the manual is white.
Here are versions of LuaMetaTeX and ConTeXt which I use.

%%%
This is LuaMetaTeX, Version 2.03.4 
open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2019.12.16 18:54 MKIV beta  fmt: 2019.12.17  
int: english/english
system  > 
%

Is there anything that I miss?
Would you please to check it?

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] math align broken

2019-12-16 Thread Jeong Dal
Dear Hans,

I reinstall a new beta and test the previous file.
(LuaMetaTeX: version 2.03.4, ConTeXt version: 2019.12.16 18:54, format: 
2019.12.17)

The problem is gone!
The space in the aligned display math mode is normal.

Thank you so much.

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] math align broken

2019-12-16 Thread Jeong Dal
Dear Hans, 

Here is a small example which shows a strange spacing in the aligned display 
math mode.
The same code is OK in both inline mode and just display mode, but it is not 
good in aligned mode.

I hope that it helps your fix .

Thank you.

Best regards,

Dalyoung

%
running luametatex version 2.03.3,   ConTeXt ver: 2019.12.12, format: 2019.12.14
%
\starttext

\startitemize
\head inline formula:

$1001 \times 23 \equiv 1  \quad \pmod {3837}$

\head display mode

\startformula
1001 \times 23 \equiv 1  \quad \pmod {3837}
\stopformula

\head aligned display mode

\startformula\startalign[m=2]
\NC 2^7 \equiv \qquad \NC \pmod {341},  \NC 14^7 \equiv \qquad \NC 
\pmod {341}, \NR
\NC 11^7 \equiv \qquad \NC \pmod {341}, \NC 3^7 \equiv \qquad \NC \pmod 
{341}, \NR
\stopalign\stopformula

\startformula\startalign[n=3]
\NC 1001 \times 23 \NC \equiv 1  \quad \NC\pmod {3837}  \NR
\NC \qquad \times 23 \NC \equiv \qquad \NC\pmod {3837}  \NR
\stopalign\stopformula

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

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


Re: [NTG-context] math align broken

2019-12-15 Thread Jeong Dal
Dear Mikael,

I also confirm your problem. 
I am using
"ConTeXt  ver: 2019.12.06 21:40 MKIV beta  fmt: 2019.12.9  int: english/english”

However, if you change “\Bigl(“ to “\left(“, then the space between left 
parenthesis and text become narrower. 

I hope that it will be fixed soon.

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

2019-12-13 Thread Jeong Dal
Dear Otared,


> I updated the wiki page for installing LuaMetaTeX on MacOS:
> 
>   https://wiki.contextgarden.net/installing_luametatex

Thank you for the wiki.
It explains the complicate processes well.

As I wrote in the last mail, I don’t have a problem of installation as before.
At this time, I don’t need to change SIP and the options of Gatekeeper in Mac 
OSX Catalina.
Since I downloaded “install.sh”, it is inexecutable at the first time.
But it worked well after allowing its running in the preference>security tab 
once.

I don’t know why there is no problem at all as before. There may be some 
changes in the new beta.
For test, I installed the new beta once more and confirmed that it is installed 
well and running well.

However, your description is very useful when “install.sh” needs a permission 
of execution again and again.

Thank you for your helpful advice 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
___


Re: [NTG-context] lmtx

2019-12-12 Thread Jeong Dal
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
___


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

2019-12-08 Thread Jeong Dal
Dear Otared,

Thank you for the zip file.
I downloaded it and copied it in a folder.
(There is no context-cache folder in the zip file)
In the terminal, I run “mtxrun —generate” and “context —make”.
But system doesn’t allow the execution of “luametatex”.
So I open the system preference:security part, and clear and allow the running 
“luametatex”.
But the system hinders “luametatex” continuously.

I have to ask about it to MAC service first to resolve this problem.
If it is not working after the resolve security problem, I may go back to 
previous version of OSX.
I’ll let you know the progress.

Thank you again.

Best regards,

Dalyoung
 

> 2019. 12. 9. 오전 6:34, Otared Kavian  작성:
> 
> Dear Dalyoung,
> 
> I made a zip file of the context-osx-64 tree on my machine, and put it on 
> Dropbox
>   https://www.dropbox.com/s/6isogxi78fwp1se/context-osx-64.zip?dl=0
> for you: you can try to install it on your Mac running MacOS 10.15 Catalina. 
> Could you please tell me if you succeed to implement the procedure I 
> described in the other email?
> 
> Best regards: OK
> 
>> On 8 Dec 2019, at 13:31, Jeong Dal  wrote:
>> 
>> For test, I  installed again after removing ConTeXtLMTX folder.
>> But it is same as before.
>> 
>> I looked files in “/tex/texmf-osx-64/bin”.
>> There are 5 files: context, context.lua, luametatex, mtxrun, mtxrun.lua.
>> context and mtxrun are symbolic linked to luametatex.
>> But luametatex is not executable, so I changed it using “chmod 755 
>> luametatex”.
>> I run “mtxrun —generate”, then it set variables as follows:
>> 
>> % mtxrun --generate
>> resolvers   | resolving | variable 'SELFAUTOLOC' set to 
>> '/usr/local/texlive/2019/bin/x86_64-darwin'
>> resolvers   | resolving | variable 'SELFAUTODIR' set to 
>> '/usr/local/texlive/2019/bin'
>> resolvers   | resolving | variable 'SELFAUTOPARENT' set to 
>> '/usr/local/texlive/2019'
>> resolvers   | resolving | variable 'TEXMFCNF' set to ''
>> resolvers   | resolving | variable 'TEXMF' set to ''
>> resolvers   | resolving | variable 'TEXOS' set to 'bin'
>> resolvers   | resolving |
>> …….
>> 
>> and do many things in the texlive/2019 folders.
>> 
>> My question is that luametatex is distributed as  an inexecutable form 
>> deliberately?
>> 
>> Thank you for reading.
>> 
>> 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-08 Thread Jeong Dal
Dear Hans, Alan, and Mojca,

Thank you for your concern.

For me, it is a difficult problem, so I may return to the previous version of 
OSX.

> I have no problem on Catalina, however wiping-out the cache and rebuilding 
> the format often gives me errors finding the lua scripts (so I have taken the 
> habit of creating and maintaining symbolic links in the texmf-osx-64/bin 
> directory).
> 
> Alan

Since you don’t have any problem on Catalina, there is  a hope of way out from 
this problem.
Would you please tell me how to maintain them in detail?

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
___


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

2019-12-08 Thread Jeong Dal
For test, I  installed again after removing ConTeXtLMTX folder.
But it is same as before.

I looked files in “/tex/texmf-osx-64/bin”.
There are 5 files: context, context.lua, luametatex, mtxrun, mtxrun.lua.
context and mtxrun are symbolic linked to luametatex.
But luametatex is not executable, so I changed it using “chmod 755 luametatex”.
 I run “mtxrun —generate”, then it set variables as follows:

% mtxrun --generate
resolvers   | resolving | variable 'SELFAUTOLOC' set to 
'/usr/local/texlive/2019/bin/x86_64-darwin'
resolvers   | resolving | variable 'SELFAUTODIR' set to 
'/usr/local/texlive/2019/bin'
resolvers   | resolving | variable 'SELFAUTOPARENT' set to 
'/usr/local/texlive/2019'
resolvers   | resolving | variable 'TEXMFCNF' set to ''
resolvers   | resolving | variable 'TEXMF' set to ''
resolvers   | resolving | variable 'TEXOS' set to 'bin'
resolvers   | resolving |
…….

and do many things in the texlive/2019 folders.

My question is that luametatex is distributed as  an inexecutable form 
deliberately?

Thank you for reading.

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 Jeong Dal
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
___


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

2019-12-07 Thread Jeong Dal
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' using hash 
'lua::mtx-contexts.lua'
resolvers   | resolving | remembered file 'mtx-context.lua'
resolvers   | resolving | using suffix based filetype 'scripts'
resolvers   | resolving | remembering file 'mtx-t-mtx-context.lua' using 
hash 'lua::mtx-t-mtx-context.lua'
resolvers   | resolving | using suffix based filetype 'scripts'
resolvers   | resolving | remembering file 'mtx-t-mtx-contexts.lua' using 
hash 'lua::mtx-t-mtx-contexts.lua'
resolvers   | resolving | remembered file 'mtx-t-mtx-context.lua'
resolvers   | resolving | remembered file 'mtx-context.lua'
mtxrun  | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


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

2019-12-07 Thread Jeong Dal
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


ConTeXtLMTX % sh ./install.sh
mtxrun  | forcing cache reload
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/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/graph/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/graph/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/Users/graph/texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/graph/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/graph/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/graph/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/graph/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/Users/graph/texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
resolvers   | resolving |
resolvers   | resolving | warning: no lua configuration files found
resolvers   | resolving | no texmf paths are defined (using TEXMF)
resolvers   | resolving |
mtxrun  | the resolver databases are not present or outdated
mtx-install | server   : lmtx.pragma-ade.com
mtx-install | instance : install-lmtx
mtx-install | platform : osx-64
mtx-install | system   : unix
mtx-install | fetching 'http://lmtx.pragma-ade.com/install-lmtx//texmf.zip'
mtx-install | unzipping 'texmf.zip'
159 files of 1598 done,3290479 bytes, 0.043 seconds
318 files of 1598 done,   21710364 bytes, 0.158 seconds
477 files of 1598 done,   38859916 bytes, 0.251 seconds
636 files of 1598 done,   39457728 bytes, 0.275 seconds
795 files of 1598 done,   39931784 bytes, 0.298 seconds
954 files of 1598 done,   40812872 bytes, 0.323 seconds
1113 files of 1598 done,   48279500 bytes, 0.371 seconds
1272 files of 1598 done,   72162122 bytes, 0.515 seconds
1431 files of 1598 done,   82495084 bytes, 0.605 seconds
1590 files of 1598 done,   83618619 bytes, 0.629 seconds
1598 files of 1598 done,   83681430 bytes, 0.631 seconds
mtx-install | fetching 
'http://lmtx.pragma-ade.com/install-lmtx//texmf-context.zip'
mtx-install | unzipping 'texmf-context.zip'
 26 files of  265 done,4130838 bytes, 0.020 seconds
 52 files of  265 done,4639798 bytes, 0.026 seconds
 78 files of  265 done,5091021 bytes, 0.032 seconds
104 files of  265 done,5652061 bytes, 0.039 seconds
130 files of  265 done,5930475 bytes, 0.045 seconds
156 files of  265 done,5948715 bytes, 0.049 seconds
182 files of  265 done,6166185 bytes, 0.054 seconds
208 files of  265 done,6380942 bytes, 0.059 seconds
234 files of  265 done,9347747 bytes, 0.074 seconds
260 files of  265 done,   32131852 bytes, 0.164 seconds
265 files of  265 done,   55758323 bytes, 0.281 seconds
mtx-install | installing tex/texmf-osx-64, 5 files
mtx-install | skipping tex/texmf-osx-64/bin/context
mtx-install | new  :  31 % : 1315 : tex/texmf-osx-64/bin/context.lua
mtx-install | new  :  62 % :  2805872 : tex/texmf-osx-64/bin/luametatex
mtx-install | skipping tex/texmf-osx-64/bin/mtxrun
mtx-install | new  : 100 % :   696620 : tex/texmf-osx-64/bin/mtxrun.lua
mtx-install | current  : %S
mtx-install | target   : true
mtx-install | removing : mtxrun
mtx-install | removing : context
mtx-install | linked   : mtxrun
mtx-install | linked   : context
mtx-install | xbit set : 
/Users/graph/ConTeXtLMTX/tex/texmf-osx-64/bin/luametatex
mtx-install | xbit set : 

Re: [NTG-context] Transparency (Metapost)

2019-12-01 Thread Jeong Dal
Dear Fabrice,

I run your code using ConTeXt LMTX and got the figure.
(LuaMetaTeX 2.00, ConTeXt version: 2019.11.14.)
I don’t know why you have errors.

Here is the beginning of log file:

resolvers   | formats | executing runner 'run luametatex format': 
/Users/graph/ConTeXtLMTX/tex/texmf-osx-64/bin/luametatex --jobname="test" 
--fmt=/Users/graph/ConTeXtLMTX/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/Users/graph/ConTeXtLMTX/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 cont-yes.mkiv --c:autopdf --c:currentrun=1 
--c:fulljobname="/Users/graph/Documents/TeXfiles/test.tex" 
--c:input="/Users/graph/Documents/TeXfiles/test.tex" --c:kindofrun=1 
--c:maxnofruns=9 --c:purge 
--c:texmfbinpath="/Users/graph/ConTeXtLMTX/tex/texmf-osx-64/bin"
This is LuaMetaTeX, Version 2.00.0 
open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2019.11.14 17:47 MKIV beta  fmt: 2019.11.19  
int: english/english
system  > 
system  > 'cont-new.mkiv’ loaded


Best regards,

Dalyoung


> 
> \starttext
> \startMPcode
>   defaultfont := "texgyrepagella-regular*default" ;
>   defaultscale :=0.8;
> 
>   color brown;
>   brown = (0.128,0.00,0.00);
> 
>   path twos, threes, sixes;
>   twos = fullcircle xscaled 4cm yscaled 2cm rotated 180
>  shifted 42 left;
>   threes = fullcircle xscaled 4cm yscaled 2cm shifted 42 right;
>   sixes = buildcycle(twos, threes);
> 
>   fill twos   withcolor brown withtransparency(1,0.75);
>   fill threes withcolor yellow withtransparency(1,0.75);
>   fill sixes withcolor yellow + brown withtransparency(1,0.75);
> 
>   draw twos;
>   draw threes;
> 
>   label("...",(1.5cm,0));
>   label("...",(0,0));
>   label("...",(-1.5cm,0));
>   label.top("yeux marron",(-1.5cm,1.25cm));
>   label.top("cheveux blonds",(1.5cm,1.25cm));
> \stopMPcode
> \stoptext

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

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


Re: [NTG-context] Transparency (Metapost)

2019-11-30 Thread Jeong Dal
> \

Dear Fabrice,

I got color and transparency using the following command in LMTX(metafun).

fill p withcolor yellow withtransparency(1, .75);

I hope that it helps.

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] new (lmtx) beta

2019-10-11 Thread Jeong Dal
Dear Hans,


>> Though it calculates function using “x^2 + y^2”,  it is better to write the 
>> name of it as the output of $x^2 + y^2$.
>> Is it possible to write  it as in mathematical form?
> 
>functionstyle = "math”,
> 
It works nicely.

>> Is there any reason to use two different names “function” and “code” to 
>> define functions?
> we can still decide as it's beta ...
> 
>  function | functions
> 
> or
> 
>  code | codelist
> 
> (it's basically lua code ...)
> 
> i have no preference and as you're the first to bring it up you may decide 
> ... (unless others can convince you otherwise)
> 

I think that it is better to use the same name if there is no special reason to 
distinguish, and I prefer to use “function | functions”.  
However, I am OK whether you keep both or choose one. 

Thank you and your team 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
___


Re: [NTG-context] new (lmtx) beta

2019-10-11 Thread Jeong Dal

Dear Hans,

I read the manual of luametafun and do some examples.
Thanks for many new features.
It is  really great.

I’d like to ask two things. 

1. On  page 26,27, in the manual, 
> 
> http://www.pragma-ade.com/general/manuals/luametafun.pdf 
> 

a function name of the graphics are appeared as same as in the argument 
‘function = “x^2 + y^2”’. 
Though it calculates function using “x^2 + y^2”,  it is better to write the 
name of it as the output of $x^2 + y^2$.
Is it possible to write  it as in mathematical form?

2. To define a mathematical function, it uses “function = “ in Contour, while 
it uses “code = “ in Surfaces and in Functions.
Is there any reason to use two different names “function” and “code” to define 
functions?  

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
___


Re: [NTG-context] MetaPost with Multiple Variable Sections

2019-09-18 Thread Jeong Dal
Dear Jeroen,

If you change “pair a;” to “numeric a;” in the second MPcode, it draws a circle 
without error.

Best regards,

Dalyoung

> 
> \placefloatright{}{
> \startMPcode
> pair a;

numeric a;

> a := 2cm;
> draw fullcircle scaled (2*a);
> \stopMPcode}
> 
> \stoptext
> 

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

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


Re: [NTG-context] :Re: How to use ConTeXt extensions with VS Code

2019-09-03 Thread Jeong Dal
Dear Hans,

I tried to install context extension using the command ‘code’, but I couldn’t 
make it.
Using ‘context development team.context’ instead context didn’t work either.

However,  by copying all the files in …/vscode/extensions to 
./vscode/extensions and enable it as before, it works.

Thank you again.
Best regards,

Dalyoung

> 2019. 9. 3. 오후 9:43, Jeong Dal  작성:
> 
> Dear Hans,
> 
> I tried to install  your vscode extension for context using the command :
> 
> code --extensions-dir 
> /Users/graph/ConTeXtLMTX/tex/texmf-context/context/data/vscode/extensions 
> --install-extension context
> 
> 
> Then I got a following error message:
> 
> Installing extensions...
> Extension 'context' not found.
> Make sure you use the full extension ID, including the publisher, e.g.: 
> ms-vscode.csharp
> Failed Installing Extensions: context
> 
> What am I missing in this process?
> 
> 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
___


[NTG-context] :Re: How to use ConTeXt extensions with VS Code

2019-09-03 Thread Jeong Dal
Dear Hans,

I tried to install  your vscode extension for context using the command :

code --extensions-dir 
/Users/graph/ConTeXtLMTX/tex/texmf-context/context/data/vscode/extensions 
--install-extension context


Then I got a following error message:

Installing extensions...
Extension 'context' not found.
Make sure you use the full extension ID, including the publisher, e.g.: 
ms-vscode.csharp
Failed Installing Extensions: context

What am I missing in this process?

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] ntg-context Digest, Vol 183, Issue 4

2019-09-02 Thread Jeong Dal
Dear Hans,

By adding “setuptex” in the task file, it runs well and makes a pdf output.

{
"label": "ConTeXt Compile",
"type": "shell",
"command": "source ~/ConTeXtLMTX/tex/setuptex;context '${file}'",
"args": [],
"group": {
"kind": "build",
"isDefault": true
}
},

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] How to use ConTeXt extensions with VS Code

2019-09-02 Thread Jeong Dal
Dear Hans,

>> But I cannot see any syntax coloring and don’t know how to compile a TeX 
>> file.
>> Would you please help me more?
> I think you also need to choose the context color scheme
> 

Yes, syntax coloring works after choosing the context color scheme.

I find a following task file to compile a file from vscode, but it doesn’t work.

Here is the error message:

/bin/bash: context: command not found
The terminal process terminated with exit code: 127

%
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "ConTeXt build",
"type": "shell",
// Keep in mind that the file path here has to be 
changed
"command": "context myfile.tex", 
"group": {
"kind": "build",
"isDefault": true
// Since we set this task to the default build 
task, you can 
// run it with a keyboard shortcut 
(Ctrl+Shift+B by default)
}
}
]
}
%%%
i am using ConTeXtLMTX installed ~/ConTeXtLMTX/.

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] How to use ConTeXt extensions with VS Code

2019-09-02 Thread Jeong Dal
Dear Hans,

Thank you for a quick reply.

> 
> tex/texmf-context/context/data/vscode
> 

I copied all the file …/vscode/extensions/context to ~/.vscode/extexsions/

When I open vacode, there is “ConTeXt 1.0.0, ConTeXt Syntax Highlignting…” in 
the extensions tab.
It is installed and enabled.
But I cannot see any syntax coloring and don’t know how to compile a TeX file.

Would you please help me more?

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
___


Re: [NTG-context] How to use ConTeXt extensions with VS Code

2019-09-01 Thread Jeong Dal
Dear Hans,

> 2019. 8. 19. 오후 4:21, ntg-context-requ...@ntg.nl 작성:
> 
> there is an vscode-context.cmd file
> 

Where can I find a vscode-context.cmd file?
I couldn’t locate it using google search.

> this could also work:
> 
>> mtxrun --script vscode --start
> 

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] balanced vertical spaces under \startcolumnset

2019-08-26 Thread Jeong Dal
Dear Sytse,

Thank you for your suggestion.

> 
> Maybe paragraphs work for you?
> (https://wiki.contextgarden.net/Columns)

I will check it. 

BTW, Use “\column” and don’t print a blank page is the simplest way.

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
___


Re: [NTG-context] balanced vertical spaces under \startcolumnset

2019-08-22 Thread Jeong Dal
Dear Sytse Knypstra,

Thank you for your reply.

I read the manual “Columns” as you suggested.
The command \setupcolumnsetstart made a balanced output.
But my problem is little different from it.

I want exam paper of two columns in a page and  in each column 
 two problems located with the same space for solution.
In general, it worked well, except the solution space of the last problem.
Without \column, the heights of the two problems in the last column are 
different.
With \column, the heights are same, but it create another extra blank page.

It is not a big problem, but I wonder there is a solution.

Thank you for your concern.

Best regards,

Dalyoung

> 
> \setuplayout[grid=yes]
> \emptylines[...] % see the command \emptylines in ConTeXtgarden
> \setupcolumnsetstart[...][...][...][...] % see the manual COLUMNS, page 9
> \setupcolumnsetlines[...][...][...][...] % see the manual COLUMNS, page 9
> %\showgrid % uncomment if you want to see the grid lines and line numbers
> 
> You find the manual COLUMNS under the heading 'Layout' on
> https://wiki.contextgarden.net/Manuals.
> 
> With kind regards,
> 
> Sytse

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] balanced vertical spaces under \startcolumnset

2019-08-20 Thread Jeong Dal
Dear all,

I use the following code to make test.
To make the same height blank spaces after the problems, I use \vfill before 
\column.
The problem is that the second \column creates extra blank page.
But, without the second \column, the height of blank spaces of the second 
column are different.

Is there a way to make the blank spaces height same while not to create a blank 
page?

Thank you for reading.

Best regards,

Dalyoung


\usetypescriptfile[type-siz]
\usemodule[units]
\setupbodyfont[10pt,rm]
\definecolumnset
 [exam]
 [n=2]

\starttext

\startcolumnset[exam]

\startitemize[n]
\item Answer to the questions:
\vfill

   \item Answer to the questions:
\vfill

\column

\item Answer to the questions:
\vfill

   \item Answer to the questions:
\vfill

%\column

\stopitemize
\stopcolumnset

\stoptext

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

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


[NTG-context] align figures verticaly centered in \startcombination mode

2019-08-08 Thread Jeong Dal

Dear all,

In the following example, “align=middle” works for horizontal center.
Is there any way to align two figures with different height in vertically 
centered?

Thank you.

Best regards,

Dalyoung

\useMPlibrary[dum]
\setupinteraction[state=start]
\usemodule[pre-60]
\setupcombination[align=middle]
\starttext
\StartSteps
\startplacefigure[]
{\startcombination[2*2]
{{\externalfigure[bogus][width=.3\makeupwidth]}{}\FlushStep}
{{\externalfigure[bogus][height=.1\makeupheight]}{}\FlushStep}
{{\externalfigure[bogus][width=.3\makeupwidth]}{}\FlushStep}
{{\externalfigure[bogus][width=.3\makeupwidth]}{}\FlushStep}
\stopcombination}
\stopplacefigure
\StopSteps

\stoptext

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

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


Re: [NTG-context] about \startMPanimation

2019-05-13 Thread Jeong Dal
Dear Hans,

Thank you for the clear explanation.
I thought “” is appeared because of the font problem in my system.

I did something wrong when I run the sample code, which didn’t work.

Yes, it is working well in my code now.
It makes the procedure of creating animation simpler.

Thank you and thanks Wolfgang!

Best regards,

Dalyoung 


> 2019. 5. 13. 오후 10:04, Hans Hagen  작성:
> 
> On 5/13/2019 2:14 PM, Jeong Dal wrote:
>> Dear Wolfgang,
>> I found the following code with a comment “code by Wolfgang” at
>> https://adityam.github.io/context-blog/post/metapost-animation/
>> |\unprotect|
>> |\installnamespace{MPanimationvariables}\unexpanded\def\startMPanimation{\dodoublegroupempty\meta_start_animation}
>>  
>> \def\meta_start_animation#1%{\normalexpanded{\meta_start_animation_indeed{#1}}}
>>  
>> \unexpanded\def\meta_start_animation_indeed#1#2#3\stopMPanimation{\doifsomething{#2}{\getparameters[\MPanimationvariables#1:][#2]}%\setgvalue{\??mpgraphic
>>  
>> animation:#1}{\meta_handle_use_graphic{#1}{n,t}{#3}}}\let\stopMPanimation\relax\unexpanded\def\useMPanimation%{\dosingleargument\use_meta_animation}\def\use_meta_animation[#1]#2%{\edef\c_MP_animation_frames{\getvalue{\MPanimationvariables#2:n}}%\startanimation[#1]\dorecurse{\c_MP_animation_frames}{\expanded{\frame{\useMPgraphic{animation:#2}{n=\c_MP_animation_frames,t=\recurselevel\stopanimation}\protect|
>> In the code, there are many “”.(\MPanimationvariables#1, 
>> {\??mpgraphic animation:#1})
>> I wonder it is correct or not.
>> Would you please check it?
> these ??  etc indicate (protected) namespaces so it's correct
> 
> Hans
> 
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
> www.pragma-pod.nl <http://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] about \startMPanimation

2019-05-13 Thread Jeong Dal
Dear Wolfgang,

I found the following code with a comment “code by Wolfgang” at 
https://adityam.github.io/context-blog/post/metapost-animation/ 


\unprotect
\installnamespace{MPanimationvariables}

\unexpanded\def\startMPanimation
{\dodoublegroupempty\meta_start_animation}

\def\meta_start_animation#1%
{\normalexpanded{\meta_start_animation_indeed{#1}}}

\unexpanded\def\meta_start_animation_indeed#1#2#3\stopMPanimation
{\doifsomething{#2}{\getparameters[\MPanimationvariables#1:][#2]}%
 \setgvalue{\??mpgraphic 
animation:#1}{\meta_handle_use_graphic{#1}{n,t}{#3}}}

\let\stopMPanimation\relax

\unexpanded\def\useMPanimation%
{\dosingleargument\use_meta_animation}

\def\use_meta_animation[#1]#2%
{\edef\c_MP_animation_frames{\getvalue{\MPanimationvariables#2:n}}%
 \startanimation[#1]
\dorecurse{\c_MP_animation_frames}

{\expanded{\frame{\useMPgraphic{animation:#2}{n=\c_MP_animation_frames,t=\recurselevel
 \stopanimation}

\protect

In the code, there are many “”.(\MPanimationvariables#1, {\??mpgraphic 
animation:#1})
I wonder it is correct or not.

Would you please check it?

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] follow up

2019-04-08 Thread Jeong Dal
Dear Otared,

I checked the both cases in the terminal and found that there is no problem in 
the installation.
It call “mtxrun" in right place depending on MKIV or LMTX.

Actually, files which doesn’t need  files in texmf-local folder are compiled 
well in both installations.
The problem is occurred when the file tried to read files in texmf-local 
folder. 
In that case, if it is compiled well in MKIV, then it had a problem in LMTX and 
vice versa.
I didn’t try to use a symbolic link.

Since I don’t have any problem to compile files under LMTX so far, I will use 
LMTX mainly.
So I’ll left my previous problem for a while.

Thank you for your help.

Best regards,
Dalyoung



> Subject: Re: [NTG-context] follow up
> Message-ID:  >
> Content-Type: text/plain; charset="utf-8"
> 
> Dear Dalyoung,
> 
> Actually when you have added 
> 
>   export 
> PATH=/context-osx-64/tex/texmf-osx-64/bin:/context-osx-64/bin:/context-osx-64/tex/texmf-osx-64/bin
> 
> either in your engine file (using TeXShop), or when typesetting from the 
> Terminal, then you don't need to use mtxrun --autogenerate in order to 
> typeset a file with LuaMetaTeX: you can just have
> 
>   /context-osx-64/tex/texmf-osx-64/bin/context myfile.tex
> 
> in this way you can use any mode you wish.
> 
> Or have I misunderstood the issue you are asking about?
> 
> 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
___


  1   2   3   >