[NTG-context] Re: Japanese

2024-02-29 Thread Jeong Dal via ntg-context
Hi,

In Korea, LaTeX is popular rather than ConTeXt since mathematicians initiated 
the use of TeX in Korea and they use LaTeX mainly.
But right now, there are so many non-math people who developed many things for 
Korean & LaTeX.

Many years ago, Hans and Taco visited the seminar held by KTUG.
They discussed with the experts KTUG about to use Korean.
From then, there are many progress to use Korean in ConTeXt. 
Now, I am using ConTeXt to produce textbooks and manuals in Korean with 
pleasure.
Unfortunately, there is a little problem in spacing, for example, “)  ,”.  It 
is rare case, so I can  correct it manually without problem.

In general, ConTeXt typesets Korean nicely. 
Thanks Hans and ConTeXt team.

For Koreans, I use

\mainlanguage[kr]
\setscript[hangul]


The rule of line break are very similar to that of Japanese. 
I think that “hangul” script handles it and other things.

I am just a user of ConTeXt, but if you need any information about Korean to 
enhance the usage of Korean in ConTeXt, please let me know.

Thanks again to Hans, team, and people in this list.

Best regards,

Dalyoung
 

> 2024. 2. 29. 오전 4:51, Emanuel Han via ntg-context  작성:
> 
> Thank you all for your suggestions and contributions to the wiki.
> 
> I don't intend to nag, but when looking at what ConTeXt is producing, I need 
> to state that the result is still far away from a properly typeset Japanese 
> text.
> 
> So the nihongo script which comes with ConTeXt handles line breaks / line 
> wrapping. But the line break rules defined in it need a rework, because they 
> don't follow the standards. The standards are documented here: 
> https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_characters
>  , and all affected characters are listed here: 
> https://www.w3.org/TR/jlreq/tables/table_en3.pdf
> 
> We have different rules, depending what kind of character is surpassing the 
> text width (or is in its last position).
> 
> Rule 1:
> 
> Before closing brackets, closing quotation marks, iteration marks, the 
> Prolonged sound mark and small Kana, line breaking is prohibited.
> 
> ’”)〕]}〉》」』】ヽヾゝゞ々ーぁぃぅぇぉァィゥェォっゃゅょッャュョ etc.
> 
> The actual programmed behaviour by the nihongo script is that, if in the 
> position which exceeds the line width,  these characters jump to the next 
> line and take the previous character with them. If they're in the last 
> position of the line, they stay where they are. This behaviour is correct.
> 
> Rule 2:
> 
> After opening Brackets and opening quotation marks, line breaking is 
> prohibited (but not before).
> 
> ‘“(〔[{〈《「『【
> 
> The actual programmed behaviour by the nihongo script is that these 
> characters jump to the next line and take the previous character with them. 
> This behaviour is wrong. They should jump to the next line without taking the 
> previous character with them, just like any regular character. The difference 
> to a regular character is that they jump already when still within the line 
> length, and they're in the last position of the line. The correct behaviour 
> can be seen in LibreOffice Writer in action.
> 
> Rule 3:
> 
> Comma (tōten), full width comma, full stop
> 
> 、,。
> 
> The actual programmed behaviour by the nihongo script is that, if in the 
> position which exceeds the line width, these characters jump to the next line 
> and take the previous character with them. This behaviour is wrong. 
> They have to be put back to the end of the previous line, but beyond the 
> specified line length. (JIS Z 8125) (Search for "Line adjustment by hanging 
> punctuation" under https://www.w3.org/TR/jlreq/ )
> If they're in the last position of the line, they stay where they are. The 
> correct behaviour can be seen in LibreOffice Writer in action.
> 
> Rules 4, 5, ...:
> 
> Combinations of inseparable characters... (see 
> https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_character 
> ) and eventually more, which I didn't test.
> 
> It might be useful to define three scripts nihongo_loose, nihongo_strict and 
> nihongo_very_strict which each implement one of the 3 cases described here: 
> https://www.w3.org/TR/jlreq/#addendum_a
> 
> According the line gap (Otared uses \setupwhitespace[big], which is exceeding 
> common line gaps), I'd like to quote from https://www.w3.org/TR/jlreq/ :
> 
> It is common that the line gap for the kihon-hanmen is set to a value between 
> half-em spacing and the one em spacing of the character frame used for the 
> kihon-hanmen. Half-em spacing can be chosen in cases where the line length is 
> short, but one em spacing or close to it is more appropriate when the line 
> length is longer than 35 characters.
> 
> I like the standard line gap which is provided by ConTeXt, which is 
> equivalent to \setupwhitespace[0pt]. Even when using ruby, it works well. I 
> found the best voffset for ruby to be -1.7ex.
> 
> The line adjustment provided by ConTeXt by default is not meeting the needs 
> for Japanese  (and 

[NTG-context] Re: Japanese

2024-02-27 Thread Jeong Dal via ntg-context
Dear Otared,

I am using Korean as main language.
I used use typescript file, but recently I use \definefontfamily.
Since using Japanese font is similar to use Korean font, I show my example  of 
using Noto fonts. It was made by the help of expert of this list long time ago.

You may change "Noto Serif CJK KR” to Japanese font.

I also use "\setscript[hangul]” when I use Korean as mainlanaguage.

I hope that you may enhance the following code.

Best regards,

Dalyoung


%%% Noto Fonts

\definefontfamily[notoFont][rm][Noto Serif CJK KR]
  [   it={style:regular,features:{*,slanted}},
  sl={style:regular,features:{*,slanted}},
  bi={style:bold,features:{*,slanted}},force=yes]

\definefontfamily[notoFont][ss][Noto Sans CJK KR]
  [   it={style:regular,features:{*,slanted}},
  sl={style:regular,features:{*,slanted}},
  bi={style:bold,features:{*,slanted}},force=yes]

\definefontfamily[notoFont][tt][Noto Sans Mono CJK KR]
  [   it={style:regular,features:{*,slanted}},
  sl={style:regular,features:{*,slanted}},
  bi={style:bold,features:{*,slanted}},force=yes]

\definefontfamily[notoFont][math][Tex Gyre Termes Math]
%\definefontfamily[notoFonts][math][Tex Gyre Pagella Math]
%\definefontfamily[notoCJK][math][Tex Gyre Aventor]


> 2024. 2. 27. 오전 6:49, Otared Kavian  작성:
> 
> Hi Hraban,
> 
> Your are right indeed ! I didn’t imagine that it was so easy to set up a 
> document to write in Japanese…
> Actually I followed the example by Emanuel Han which is essentially what you 
> suggest (although he gave me also the hint to add the furagana).
> 
> Best regards: Otared
> 
>> On 26 Feb 2024, at 21:16, Henning Hraban Ramm > > wrote:
>> 
>> Am 26.02.24 um 21:08 schrieb Otared Kavian:
>>> Does anyone have a simple setup of fonts to write a small Japanese document 
>>> (possibly with furagana) ? I am using MacOS and I have several Japanese 
>>> fonts on the system.
>>> I have some old examples which do not typeset correctly now, maybe because 
>>> they use the old module simplefonts and  commands such as \setcjkmainfont 
>>> and friends.
>> 
>> Try to replace the simplefonts calls with something like
>> 
>> \definefontfamily[myfonts][rm][SomeFont]
>> \definefontfamily[myfonts][ss][SomeOtherFont]
>> 
>> \setupbodyfont[myfonts,rm,12pt]
>> 
>> With Latin fonts, it usually works.
>> 
>> Hraban
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl  / 
>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl 
>> 
>> webpage  : https://www.pragma-ade.nl  / 
>> https://context.aanhet.net  (mirror)
>> archive  : https://github.com/contextgarden/context 
>> 
>> wiki : https://wiki.contextgarden.net 
>> ___
> 
> Otared Kavian
> e-mail: ota...@gmail.com 
> Phone: +33 6 88 26 70 95
> 
> 
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \startcolumns and \startcolumnset

2024-02-09 Thread Jeong Dal via ntg-context
Dear Otared,

Thank you for testing.

I run the sample after changing the column command to ‘\startsimplecolumns … 
\stopsimplecolumns’.

I got the same result as  your output. And it is same as the result using 
\startcolumns … \stopcolumns.

If ‘\vfill’ works, then it is OK for me, but it isn’t.

It works under the command “\startcolumnset … \stopcolumnset”.
But there are another problem under the ‘columnist’ command.

I’ll read the manual of columnset carefully.

Best regards,

Dalyoung


> 2024. 2. 9. 오후 1:37, Otared Kavian  작성:
> 
> Dear Dalyoung,
> 
> Have you tried 
> \startsimplecolumns
> 
> \stopsimplecolumns
>  instead of the columnset mechanism?
> 
> In your example I put the above commands and I got the attached PDF: is this 
> what you want to obtain?
> 
> Best regards: Otared
> 
> 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] \startcolumns and \startcolumnset

2024-02-08 Thread Jeong Dal via ntg-context
Dear all,I have a little problem to use “columns” in the following example.If I use “\startcolumnset”, then I have the following problems:	1. The figures is aligned left even though I use \startplacefigure[].	2. In the second column, the first item located at the end of the page.However, \vfill works, so I managed the items evenly spaced vertically.If I use “\startcolumns”, then I have the following problems:	1. \vfill doesn’t works, but \blank[] works. So, it isn’t easy to locate the items evenly spaced vertically.Here are sample code and its outputs of two cases for comparison.Any suggestions are welcomed.Tomorrow is the New Years day in Lunar calendar.Happy new year, again.Best regards,Dalyoung%%%\startuseMPgraphic{mark}path p;p := unitsquare scaled 3cm;draw p;draw (point 0 of p)--(point 2 of p);draw (point 1 of p)--(point 3 of p);\stopuseMPgraphic\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;   draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;\stopuseMPgraphic\defineoverlay  [verticalrule]  [\useMPgraphic{verticalrule3}]\setuppagenumbering[state=stop]\setupexternalfigures[location={local,defalut}]\definecolumnset  [quiz]  [n=2,background=verticalrule]\setupbodyfont[bonum, rm, 11pt]\starttext %\startcolumns[n=2,background="">\startcolumnset[quiz]\startitemize[n]  \item Solve the following linear equations.  \startitemize[r]\item equation%\blank[3.5cm]\vfill\item equation%\blank[3.5cm]\vfill\item equation\blank[3.5cm]\item equation\blank[3.5cm]\item equation\blank[3.5cm]  \stopitemize  \hrule\column  \item Draw the graph of the following linear function.\startitemize[r]\item $2x +3y = 6$\startplacefigure[location={here,none},]\useMPgraphic{mark}\stopplacefigure  \item $y = 2x - 1$  \startplacefigure[location={here,none}]\useMPgraphic{mark}\stopplacefigure\stopitemize  \item Find the formula of the line 1:  \vfill  \item Find the formula of the line 2:  \vfill\stopitemize\stopcolumnset\stoptext%%

testColumns.pdf
Description: Adobe PDF document


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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: upload

2024-01-17 Thread Jeong Dal via ntg-context
Dear Otared,

I installed upload version today.
And, your example,

\starttext
The derivative of $f$ is denoted $f'$ or $f^\prime$ or is it $f^'$\dots
\stoptext

works well.

I think that you will have the same good result.

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Math alignment issue

2024-01-17 Thread Jeong Dal via ntg-context
Dear Hans,

Thanks for the new upload.
It clears the issue of the math alignment.

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Math alignment issue

2024-01-17 Thread Jeong Dal via ntg-context
Dear Otared,

I got the same output in which there is an overlap of the formula on the last 
line of the paragraph.  The following line shows the version of my installation.

system  > 
system  > ConTeXt  ver: 2024.01.08 11:23 LMTX  fmt: 2024.1.17  int: 
english/english
system  > 

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Asking help for better way to make tickets.

2024-01-13 Thread Jeong Dal via ntg-context
Dear Bruce and Marco,

Thank you for your suggestions. 
I think that it would be good enough to replace my code.
I learned new method which doesn’t use metaFun.

I’ll modify what you suggested for my purpose.

Thank you again.

Best regards,

Dalyoung


> 2024. 1. 13. 오전 7:38, Bruce Horrocks  작성:
> 
> 
> 
>> On 12 Jan 2024, at 14:05, Jeong Dal via ntg-context  
>> wrote:
>> 
>> Dear all,
>> 
>> I’d like to make a ticket on A4 as follows:
>> 
>> 1. Use all of A4(no margin, no header, no footer,…)
>> 2. Arange 12 tickets in the form of 3 x 4 on one page,
>> 3. Two rows are same,
>> 4. Numbers in the center of the ticket which is increasing.
>> 
>> I use the following code to make it.
>> 
>> but I think that there is a better and simpler way to do it which I don’t 
>> know.
>> 
>> I hope that someone give me a nicer way to do it.
> 
> Not sure if it is 'nicer' but I use a table to print addresses onto sticky 
> labels. The code should be fairly easy to adapt or just borrow some ideas.
> <https://sourceforge.net/projects/context-address-labels/ 
> <https://sourceforge.net/projects/context-address-labels/>>
> 
> —
> 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 <mailto:ntg-context@ntg.nl> / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl 
> <https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl>
> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / 
> https://context.aanhet.net <https://context.aanhet.net/>(mirror)
> archive  : https://github.com/contextgarden/context 
> <https://github.com/contextgarden/context>
> wiki : https://wiki.contextgarden.net <https://wiki.contextgarden.net/>
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Asking help for better way to make tickets.

2024-01-12 Thread Jeong Dal via ntg-context
Dear all,I’d like to make a ticket on A4 as follows:1. Use all of A4(no margin, no header, no footer,…)2. Arange 12 tickets in the form of 3 x 4 on one page,3. Two rows are same,4. Numbers in the center of the ticket which is increasing.I use the following code to make it.but I think that there is a better and simpler way to do it which I don’t know.I hope that someone give me a nicer way to do it.Thank you for reading.Best regards,Dalyoung\setuppapersize[A4]%[A4]\setuplayout[  width=210mm,  height=297mm,  topspace=0pt,  backspace=0pt,  header=0mm,  footer=0mm,  margin=0mm,  bottomspace=0mm   ]\startuseMPgraphic{ticket}{i,j}path p,q;pair A,B;p := unitsquare xyscaled (67mm,73mm);A := point 0.5 of p;B := point 2.5 of p;draw p;label(textext("Text"), .25A+.75B );label(textext("\tfd " & decimal (3*\MPvar{i}-\MPvar{j})), center p);label(textext("Text"), .75A + .25B);\stopuseMPgraphic\starttext\dorecurse{4}{\startcombination[3*1]%distance=0mm]{\useMPgraphic{ticket}{i=\recurselevel,j=2}}{}{\useMPgraphic{ticket}{i=\recurselevel,j=1}}{}{\useMPgraphic{ticket}{i=\recurselevel,j=0}}{}\stopcombination\startcombination[3*1]%distance=0mm]{\useMPgraphic{ticket}{i=\recurselevel,j=2}}{}{\useMPgraphic{ticket}{i=\recurselevel,j=1}}{}{\useMPgraphic{ticket}{i=\recurselevel,j=0}}{}\stopcombination}\page\dostepwiserecurse{5}{8}{1}{\startcombination[3*1]%distance=0mm]{\useMPgraphic{ticket}{i=\recurselevel,j=2}}{}{\useMPgraphic{ticket}{i=\recurselevel,j=1}}{}{\useMPgraphic{ticket}{i=\recurselevel,j=0}}{}\stopcombination\startcombination[3*1]%distance=0mm]{\useMPgraphic{ticket}{i=\recurselevel,j=2}}{}{\useMPgraphic{ticket}{i=\recurselevel,j=1}}{}{\useMPgraphic{ticket}{i=\recurselevel,j=0}}{}\stopcombination}\stoptext

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Question about drawing flowchart using chart module

2023-12-27 Thread Jeong Dal via ntg-context
Dear all,

I tried to draw a flow chart using the module[chart].
Following the examples, I draw one.

The problem is that the size of the chart is not changed even though I changed 
the numbers dx,dy, width, height, and maxwidth in the \setupFLOWcharts

Please tell me how to resize the chart.

Thank you.

Dalyoung

%%
\usemodule[chart]

\starttext

\startFLOWchart[bigger]
  \setupFLOWcharts
  [option=test,
   nx=3,
   ny=6,
   dx=\bodyfontsize,
   dy=\bodyfontsize,
   width=6cm,%.5\bodyfontsize,
   height=10cm,%.3\bodyfontsize,
   maxwidth=.5\textwidth
   ]

  \startFLOWcell 
\name{a} \location{2,1} \shape{loop} \text{start}  
\connection[bt]{b}
  \stopFLOWcell
  \startFLOWcell 
\name{b} \location{2,2} \shape{79} \text{input $a,b$} 
\connection[bt]{c} 
  \stopFLOWcell
  \startFLOWcell 
\name{c} \location{2,3} \shape{decision} \text{$a-b > 0$}  
\connection[lt]{d}  \comment[l]{Yes}
\connection[rt]{g}  \comment[r]{No}
  \stopFLOWcell
  \startFLOWcell 
\name{d} \location{1,5} \shape{76} \text{$a$ is bigger \\ than $b$} 
 
\connection[bt]{f}
  \stopFLOWcell
  \startFLOWcell 
\name{e} \location{2,5} \shape{76} \text{$b$ is bigger \\ than $a$} 
 
\connection[bt]{f}
  \stopFLOWcell
  \startFLOWcell 
\name{g} \location{3,4} \shape{decision} \text{$a - b < 0$}  
\connection[lt]{e}\comment[l]{Yes}
\connection[bt]{h}\comment[b]{No}
  \stopFLOWcell
  \startFLOWcell 
\name{h} \location{3,5} \shape{76} \text{$a$ is equal \\ to $b$}  
\connection[bt]{f}
  \stopFLOWcell
  \startFLOWcell 
\name{f} \location{2,6} \shape{loop} \text{stop}  
  \stopFLOWcell
\stopFLOWchart

\placefigure
  [here][fig:bigger]
  {Which is bigger?}
  {\tx\setupFLOWcharts\FLOWchart[bigger]}

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: error: Control sequence expected instead of undefined

2023-12-25 Thread Jeong Dal via ntg-context
Dear Willi and Wolfgang,

Thank you for the answer.

After adding the fix, no error messages.
I’ll wait the upload of new version.

Best regards,

Dalyoung




> 2023. 12. 26. 오전 1:45, Wolfgang Schuster  
> 작성:
> 
> Jeong Dal via ntg-context schrieb am 25.12.2023 um 16:09:
>> Hi,
>> 
>> I got an error message as following:
>> 
>> Control sequence expected instead of undefined
>> 
>> If I comment out the “\externalfigure[][]” line, then there is no error 
>> message.
>> 
>> I don’t know what is wrong in the sample code.
> 
> The problem was mentioned a while ago
> 
> https://www.mail-archive.com/ntg-context@ntg.nl/msg106078.html 
> <https://www.mail-archive.com/ntg-context@ntg.nl/msg106078.html>
> 
> and Hans provided a fix until a new binary is online
> 
> https://www.mail-archive.com/ntg-context@ntg.nl/msg106095.html 
> <https://www.mail-archive.com/ntg-context@ntg.nl/msg106095.html>
> 
> Wolfgang
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] error: Control sequence expected instead of undefined

2023-12-25 Thread Jeong Dal via ntg-context
Hi,

I got an error message as following:

Control sequence expected instead of undefined

If I comment out the “\externalfigure[][]” line, then there is no error message.

I don’t know what is wrong in the sample code.
Please check the code.

Thank you for reading.

Best regards,

Dalyoung

%%%*
\starttext
\in{figure}[fig:kruskal1] is my point.

\startplacefigure[location=,reference=fig:kruskal1,title={}]
\externalfigure[cow][width=.5\makeupwidth]
\stopplacefigure
\stoptext
%___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: wiki update: Modules

2023-10-01 Thread Jeong Dal via ntg-context
Dear Hraban,

When I wrote a class material for Linear Algebra, it is nice to use \pmatrix 
and \bmatrix etc. 
But, for example, to write a result matrix of the product of two matrices, I 
need to calculate it somewhere and copy it to my text. Hence, I tried to use 
Lua to handle it in the ConTeXt. And, it is nicely working.
During the process, I asked many questions to Hans and he gladly helped me.
It is the first time for me to code using Lua, so my coding was clumsy. 
However,  Hans corrected it to be usable in ConTeXt even though he is very very 
busy in many things.
And, he made it a module and put it in the list.
Thanks Hans.

Finally I finished several chapters on Linear Algebra using that code.
It was many years ago.
Here is a document of it. I confirm that it is running well without any problem.

I hope that someone who wants to write an article on Linear Algebra use it.

Thanks for reading.

Best regards,

Dalyoung




matrixDoc.tex
Description: Binary data



> 2023. 10. 1. 오후 6:01, Henning Hraban Ramm  작성:
> 
> Am 01.10.23 um 05:51 schrieb Otared Kavian:
>> Hi Hraban,
>> Thank you for your updating of the modules stuff.
>> As far as I remember the matrix features are not related to any modules, but 
>> rather are part of LMTX. In nay case next week I will look at the page
>> https://wiki.contextgarden.net/Matrix_in_maths 
>> 
>> and verify that eveything on that page works fine and is up to date.
> 
> Thank you!
> 
> But there _is_ a matrix module (hey, I just looked through all this stuff!) 
> by Jeong Dalyoung & Hans; apparently it can do matrix calculations.
> 
> https://source.contextgarden.net/tex/context/modules/mkiv/m-matrix.mkiv
> 
> Hraban
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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

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

Re: [NTG-context] Chapter title in MetaFun manual.

2023-02-10 Thread Jeong Dal via ntg-context
Dear all,
 
I think that I found the cause.
The page layout of my file is different from that of MetaFun manual.
After borrowing the \setuplayout from MetaFun-000.tex, it works correctly.

I am sorry to give you a wrong example.

Thank you for reading.

Best regards,

Dalyoung


> 2023. 2. 10. 오후 9:05, Jeong Dal via ntg-context  작성:
> 
> Dear all,
> 
> I copied the code of defining chapter command  from metafun-000.tex, and run 
> it.
> But the result is different from that in MetaFun Manual.
> There is a big spaces between the number and the title which yields the 
> number cannot be seen.
> I commented out several lines which seems to be not-related with chapter 
> title.
> And, I changed
> 
>   \def\ChapterCommand#1#2% —> \define[2]\ChapterCommand
> 
> Would you please test the following code to find out what is wrong?
> 
> Thank you for reading.
> 
> Best regards,
> 
> Dalyoung
> 
> 
> \startuseMPgraphic{circled}
>   pickup pencircle scaled 1mm ;
>   drawoptions(withcolor (.6+uniformdeviate.35)*white) ;
>   fill fullcircle xscaled 1.5cm yscaled 1cm ;
>   drawoptions(withcolor .625yellow) ;
>   draw fullcircle xscaled 1.5cm yscaled 1cm ;
> \stopuseMPgraphic
> 
> %\startnotmode[proof]
> %  \defineoverlay[circled][\useMPgraphic{circled}]
> %\stopnotmode
> 
> \define[1]\Circled%
>   {\framed
>  [background=circled,frame=off,offset=overlay]
>  {\color[darkred]{#1}}}
> 
> \setuppagenumbering[location=]
> \setupheadertexts[margin][][\hbox to \hsize{\hss\Circled\pagenumber\hss}]
> 
> \startuniqueMPgraphic{titled}
>   path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
>   pickup pencircle scaled 1mm ;
>   drawoptions(withcolor .625yellow) ;
>   draw llcorner p -- lrcorner p ;
>   setbounds currentpicture to p ;
> \stopuniqueMPgraphic
> 
> \defineoverlay[titled][\uniqueMPgraphic{titled}]
> 
> \define[2]\ChapterCommand%
>   {\setbox0=\hbox to \leftmarginwidth{#1\hss}%
>\hskip-\leftmarginwidth
>\hskip-\leftmargindistance
>\framed
>  [background=titled,frame=off,offset=0pt]
>  {\box0
>   \hskip\leftmargindistance
>   #2}}
> 
> \define[2]\TitleCommand%
>   {\framed
>  [background=titled,frame=off,offset=0pt]
>  {#2}}
> 
> \setuphead
>   [chapter]%,section,subsection]
>   [command=\ChapterCommand,
>style=\ss\bf\tfd,
>color=darkred]
> 
> \setuphead
>   [title]%,subject,sububject]
>   [command=\TitleCommand,
>style=\ss\bf\tfd,
>color=darkred]
> 
> 
> \setupbodyfont[bonum,rm,12pt]
> \showframe
> 
> \starttext
> \startchapter[title={Introduction}]
> This is the chapter for introduction.
> \stopchapter
> 
> \startchapter[title={Function}]
> Now, we study the function.
> \stopchapter
> 
> \starttitle[title={References}]
> \startitemize[n]
> \item first
> \item second
> \item third
> \stopitemize
> \stoptitle
> 
> \stoptext
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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

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


[NTG-context] Chapter title in MetaFun manual.

2023-02-10 Thread Jeong Dal via ntg-context
Dear all,

I copied the code of defining chapter command  from metafun-000.tex, and run it.
But the result is different from that in MetaFun Manual.
There is a big spaces between the number and the title which yields the number 
cannot be seen.
I commented out several lines which seems to be not-related with chapter title.
And, I changed

\def\ChapterCommand#1#2% —> \define[2]\ChapterCommand

Would you please test the following code to find out what is wrong?

Thank you for reading.

Best regards,

Dalyoung


\startuseMPgraphic{circled}
  pickup pencircle scaled 1mm ;
  drawoptions(withcolor (.6+uniformdeviate.35)*white) ;
  fill fullcircle xscaled 1.5cm yscaled 1cm ;
  drawoptions(withcolor .625yellow) ;
  draw fullcircle xscaled 1.5cm yscaled 1cm ;
\stopuseMPgraphic

%\startnotmode[proof]
%  \defineoverlay[circled][\useMPgraphic{circled}]
%\stopnotmode

\define[1]\Circled%
  {\framed
 [background=circled,frame=off,offset=overlay]
 {\color[darkred]{#1}}}

\setuppagenumbering[location=]
\setupheadertexts[margin][][\hbox to \hsize{\hss\Circled\pagenumber\hss}]

\startuniqueMPgraphic{titled}
  path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
  pickup pencircle scaled 1mm ;
  drawoptions(withcolor .625yellow) ;
  draw llcorner p -- lrcorner p ;
  setbounds currentpicture to p ;
\stopuniqueMPgraphic

\defineoverlay[titled][\uniqueMPgraphic{titled}]

\define[2]\ChapterCommand%
  {\setbox0=\hbox to \leftmarginwidth{#1\hss}%
   \hskip-\leftmarginwidth
   \hskip-\leftmargindistance
   \framed
 [background=titled,frame=off,offset=0pt]
 {\box0
  \hskip\leftmargindistance
  #2}}

\define[2]\TitleCommand%
  {\framed
 [background=titled,frame=off,offset=0pt]
 {#2}}

\setuphead
  [chapter]%,section,subsection]
  [command=\ChapterCommand,
   style=\ss\bf\tfd,
   color=darkred]

\setuphead
  [title]%,subject,sububject]
  [command=\TitleCommand,
   style=\ss\bf\tfd,
   color=darkred]


\setupbodyfont[bonum,rm,12pt]
\showframe

\starttext
\startchapter[title={Introduction}]
This is the chapter for introduction.
\stopchapter

\startchapter[title={Function}]
Now, we study the function.
\stopchapter

\starttitle[title={References}]
\startitemize[n]
\item first
\item second
\item third
\stopitemize
\stoptitle

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

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


Re: [NTG-context] Meta(post)/(fun) macro with label position

2023-01-19 Thread Jeong Dal via ntg-context
Dear Alex,

I don’t know what you want exactly.
I hope that it may help.

\startMPpage
def myLabel(expr xpos, ypos)(text t) =
  dotlabel.top(textext(t),(xpos,ypos));
enddef;
myLabel(1cm, 1cm, "Position");
\stoppage

Good luck.

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Bug in math alignment

2022-11-02 Thread Jeong Dal via ntg-context
Dear Otared,

> 
> I think there is an issue with the size of math fonts in \frac when used in 
> math alignments, as it is is shown in the following example.
> 

I confirm what you said.

However, if I use \dm{} instead of \displaystyle as following, then the output 
is correct.

\placeformula
\startformula
\startalignedcases
\NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR
\NC  \dm{\frac{\partial u}{\partial {\bi n}}}
 \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR
\stopalignedcases
\stopformula
or this (with\type{\displaystyle} added)
\placeformula 
\startformula
\startalignedcases
\NC - \Delta u \NC = 0 \NC \qquad\text{in }\, \Omega \NR
\NC  \dm{\frac{\partial u}{\partial {\bi n}}}
 \NC = V u + \phi \NC \qquad\text{on }\, \partial\Omega. \NR
\stopalignedcases
\stopformula

In this example, it is OK to use \dm inside of \startformula … \stopformula.
I am not sure that it is what Hans and Mikael want.

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Math alignment question

2022-09-24 Thread Jeong Dal via ntg-context
Dear Hans,


>> Thank you for your explanation.
>> I just wonder \alinghere can be applicable to multiple formula.
>> It is OK to use \NC \NR for multiple formulas.
> What probably can be done, is to let the next formula start with the align of 
> the previous one .. Mikael can add it to our todo
> 

Thank you for your concern.
When we write  two long formula, I think that to use "\alignhere, \breakhere" 
is a little bit simpler than use \NC\NR.
We may write them to use \startformula…\stopformula twice separetely. 
But, then the alignment of two formulas may be different because formula’s 
alignment is midaligned. 

Thanks again to add it todo list.

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Math alignment question

2022-09-24 Thread Jeong Dal via ntg-context
Dear Aditya, Mikael,

Thank you for your explanation.
I just wonder \alinghere can be applicable to multiple formula.
It is OK to use \NC \NR for multiple formulas.

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Math alignment question

2022-09-22 Thread Jeong Dal via ntg-context
Dear Mikael and Hans,

Recently, you introdued the new command “\alignhere, \breakhere, \skiphere” 
which works fine.

Since I usually use the following code that is adopted from My 
Way(Mathalign.pdf), I’d like to know that there is a way to use “\alignhere, 
\breakhere, \skiphere”  for the case below?

\startformula\startalign
\NC A \NC = 3   \NR
\NC B \NC = 5 \NR
\stopalign\stopformula

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] \startcolumnset ... \stopcolumnset is working.

2022-09-14 Thread Jeong Dal via ntg-context
Dear all,

I didn’t test “\startcolumnset … \stopcolumnset” for some time, because I got 
error whenever I tested it under Mac OS Big Sur. 

However, two days ago, I tested it, and found that it was working.
I install updated version today and run a test file again.
Finally, I get an output without error!

I don't know what is happened, but it is a good news.

Here is a sample file which I simplified one that is given by one of the 
experts.
Someone may modify it better.

Thanks to ConTeXt team.

Best regards,

Dalyoung


\startuseMPgraphic{squareBox}
   draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
   draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;
   draw rightboundary OverlayBox shifted (1mm,0); 
   draw leftboundary OverlayBox shifted (-1mm,0); 
\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. 12.}{Set Theory}{Final Exam}

\starttext

\startcolumnset[exam]

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

  \item The second problem.
  \column

  \item The third problem.
  \column
  \item The third problem.


\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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2022-09-07 Thread Jeong Dal via ntg-context
Dear Taco,

The following mail came every hour since a few days ago.
But I don’t get any other mail from the list.
I think that there is something wrong between my mail system and the server.
However, I don’t know how to solve it.

Would you please tell me what to do?

Thank you.

Best regards,

Dalyoung


> On Sep 7, 2022, at 9:03 PM, Cron Daemon via ntg-context  
> wrote:
> 
> rsync: failed to connect to rsync.pragma-ade.nl (213.125.29.165): Connection 
> timed out (110)
> rsync error: error in socket IO (code 10) at clientserver.c(125) 
> [Receiver=3.1.2]
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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

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


[NTG-context] Write a long chapter title in two lines

2022-08-18 Thread Jeong Dal via ntg-context
Dear all,

A few days ago, I sent an email as follows. But it is linked to another subject 
because I choose reply of another subject.
So, I send the same mail again.

Thank you for reading.

Best regards,
Dalyoung

**
I’d like to write a long chapter title in two lines if it is longer than the 
textwidth.
It is OK when I use just bigger fonts.

But it writes the long title in one line if I use outlined font for title as in 
MWE.

Is there a way to write it in two lines using the outlined font?

Thanks,

Best regards,

Dalyoung

\startuseMPgraphic{outlineT}
  draw outlinetext.b (\MPvar{tt})
  (withcolor .75white)
  (withcolor .725blue withpen pencircle scaled .75pt);%\MPvar{thick});
\stopuseMPgraphic
\definefont[BigFontOne][NotoSansCJKkr-Bold sa 4]
\define[1]\outlineTitle{\useMPgraphic{outlineT}{tt="#1"}}

\setuphead[chapter]
[textcommand=\outlineTitle,
 style=\BigFontOne,
 numbercommand=\outlineTitle,
% align = middle,
 number=yes]

\setupexternalfigures[location={default,local,global}]
%\definefont[fancy][Zapfino at 24pt]

\starttext
\startchapter[title={Very Long Long Long Title}]
\startcombination[3*1]
 {\externalfigure[cow]   [combination]}{cow}
 {\externalfigure[mill]  [combination]}{mill}
 {\externalfigure[hacker][combination]}{hacker}
\stopcombination
\stopchapter
\stoptext___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Write a long chapter title in two lines

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

I’d like to write a long chapter title in two lines if it is longer than the 
textwidth.
It is OK when I use just bigger fonts.

But it writes the long title in one line if I use outlined font for title as in 
MWE.

Is there a way to write it in two lines using the outlined font?

Thanks,

Best regards,

Dalyoung

\startuseMPgraphic{outlineT}
  draw outlinetext.b (\MPvar{tt})
  (withcolor .75white)
  (withcolor .725blue withpen pencircle scaled .75pt);%\MPvar{thick});
\stopuseMPgraphic
\definefont[BigFontOne][NotoSansCJKkr-Bold sa 4]
\define[1]\outlineTitle{\useMPgraphic{outlineT}{tt="#1"}}

\setuphead[chapter]
[textcommand=\outlineTitle,
 style=\BigFontOne,
 numbercommand=\outlineTitle,
% align = middle,
 number=yes]

\setupexternalfigures[location={default,local,global}]
%\definefont[fancy][Zapfino at 24pt]

\starttext
\startchapter[title={Very Long Long Long Title}]
\startcombination[3*1]
 {\externalfigure[cow]   [combination]}{cow}
 {\externalfigure[mill]  [combination]}{mill}
 {\externalfigure[hacker][combination]}{hacker}
\stopcombination
\stopchapter
\stoptext


> On Aug 15, 2022, at 7:42 PM, Pablo Rodriguez via ntg-context 
>  wrote:
> 
> Dear list,
> 
> adapting a the sample from mkxl/page-str.mkxl (and code from the list),
> I came with the following sample:
> 
>  \setuppapersize[A6]
>  \showgrid
>  %\setuplayout[grid=yes]
>  \starttext
>  \input tufte
>  \startoutputstream[es]
>   \dorecurse{25}
>{\startlanguage[es]\input cervantes-es\stoplanguage%
>  \par\pushoutputstream}
>  \enableoutputstream[en]
>   \dorecurse{25}
>{\input zapf\par\pushoutputstream}
>  \disableoutputstream
>  \stopoutputstream
>  \synchronizestreams[es,en]
>  \page \flushoutputstream[es]
>  \page \flushoutputstream[en]
>  \stoptext
> 
> To reorder pages, I rename the output to "wg.pdf" and run the following
> code:
> 
>  \setuppapersize[A6]
>  \setuplayout[page]
>  \starttext
>  \dorecurse{26}
>  {\ifnum\recurselevel = 1
>\externalfigure[wg.pdf][page=\recurselevel]\else
>\externalfigure[wg.pdf][page=\recurselevel]
>\externalfigure[wg.pdf][page={\the\numexpr \recurselevel + 25}]\fi}
>  \stoptext
> 
> I’m afraid that the paragraph mistmatch is clear (the number of pages is
> way different for each versions).
> 
> Using the grid, the mismatch is not so evident (but there is still a
> different number of pages for each version).
> 
> Page reordering would be in this case:
> 
>  \setuppapersize[A6]
>  \setuplayout[page]
>  \starttext
>  \dorecurse{20}
>  {\ifnum\recurselevel = 1
>\externalfigure[wg.pdf][page=\recurselevel]\else
>\externalfigure[wg.pdf][page=\recurselevel]
>\externalfigure[wg.pdf][page={\the\numexpr \recurselevel + 19}]\fi}
>  \stoptext
> 
> I would need that for a bilingual edition. I don’t mind reodering the
> pages (if there is no other option).
> 
> But what am I doing wrong not to get synced text streams for facing pages?
> 
> Many thanks for your help,
> 
> Pablo
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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

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


Re: [NTG-context] update

2022-08-05 Thread Jeong Dal via ntg-context
Dear Hans, Mikael,

The alignment problem which occurred when I put aligned formulas and a figure 
side by side is solved.

Thank you for the update.

Best regards,

Dalyoung


> On Aug 5, 2022, at 6:52 PM, Hans Hagen via ntg-context  
> wrote:
> 
> Hi,
> 
> I uploaded a new lmtx that fixes a few math issues reported.
> 
> Hans
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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

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


Re: [NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2022-07-29 Thread Jeong Dal via ntg-context
Dear Hans,

Thank you for the new way to align math formulas.
It is great to use “\alignhere”, “\breakhere”.

However, I got a problem today.
If I use it with figures side by side, then the alignment is broken.

Please try the following MWE.

Best regards,

Dalyoung


\setupexternalfigures[location={default,local,global}]

\starttext
\startplacefigure[location=right,]
\externalfigure[cow][width=.3\makeupwidth]
\stopplacefigure
\startformula
 U(f,P) \alignhere = f(2,2)\Delta A_{11}+f(2,3)\Delta A_{12}\breakhere
  \skiphere[1em] +f(3,2)\Delta A_{21}+f(3,3)\Delta A_{22} \breakhere
  = 4\times 2 + 6 \times 1+ 6 \times 2 +9 \times 1  \breakhere
  = 35.
\stopformula
\stoptext




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

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


Re: [NTG-context] 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
___


  1   2   3   4   >