Hi,

I made a list of 4-dimensional vectors using the following code.

\startluacode
local matT = {{0,0,1,1/3},{1,0,0,1/3},{0,1/2,0,1/3},{0,1/2,0,0}}
local matOld = {{1/4},{1/4},{1/4},{1/4}}
local matNew = {}
local matHistory = {}
table.insert(matHistory, matOld)

for i = 2, 15   do
    matOld = matHistory[i-1]
    matNew = mtx.product(matT, matOld) 
  --  mtx.typeset(matT)context("\\times")mtx.typeset(matOld)
  --      context(" = ") mtx.typeset(matNew) context("\\blank")
    table.insert(matHistory, matNew)
end
\stopluacode

I’d like to draw a line graph of the data in matHistory to show the change of 
each component of 4-dimensional vectors.

How can I draw it in LuaMetaFun?

In the manual, data is already given in the example.

How can bring the data made in lua to  ConTeXt?

Thank you.

Best regards,

Dalyoung



> 2026. 1. 8. 오전 2:53, Jean-Pierre Delange via ntg-context <[email protected]> 
> 작성:
> 
> Hi Julin !
> 
> At first glance, it appears that the font declared and the font used are not 
> the same. This is why, during compilation, ConTeXt falls back on LatinModern 
> and prints the numbers in Roman.
> 
> As Wolfgang rightly points out, it would be necessary to identify precisely 
> which system font actually allows Japanese to be rendered. The following 
> commands must therefore be executed:
> 
> mtxrun --script fonts --list --pattern=“Noto”
> 
> mtxrun --script fonts --list --pattern=“JP”
> 
> mtxrun --script fonts --list --pattern=‘CJK’
> 
> and definitely install a “real” font that renders kana and nihongo mode 
> properly (try ipaexmincho). And try this :
> 
> \definefontfamily[jp][rm][IPAexMincho]
> \setupbodyfont[jp]
> \setscript[nihongo]
> 
> \starttext
> これはIPAex明朝体による日本語のテストです。
> \stoptext
> 
> Or, if it fails, try this code :
> 
> % 1) Fallback first
> \definefallbackfamily[main][rm][ipaexmincho]
>   [preset=range:japanese,force=yes]
> 
> % 2) Main family follows
> \definefontfamily[main][rm][TeX Gyre Pagella]
> 
> \setupbodyfont[main,10pt]
> \mainlanguage[en]
> \setscript[nihongo]
> 
> \starttext
> This is English text.
> 
> これはIPAex明朝体による日本語です。
> \stoptext
> 
> Hope this helps.
> 
> Best//JP
> 
> Le 31/12/2025 à 08:13, Julin S a écrit :
>> I am new to ConTeXt (but comfortable with LaTeX) and was trying to
>> figure out how to have letters of different scripts in the same
>> document.
>> 
>> I tried to have a Japanese only document using the snippet in this thread
>> https://mailman.ntg.nl/archives/list/[email protected]/message/QCXFTDHLPDS3P67GXLI33IPG5DJNGI32/
>> 
>> Like this:
>> 
>> ```
>> \definefontfamily [noto-jp] [rm] [Noto Serif CJK JP]
>> \definefontfamily [noto-jp] [ss] [Noto Sans CJK JP]
>> \definetypeface   [noto-jp] [mm] [math] [pagella] [default]
>> 
>> \setupbodyfont [noto-jp]
>> 
>> \mainlanguage [ja]
>> 
>> \setscript [nihongo]
>> 
>> \starttext
>> 
>> \startbuffer
>> 打構セト読役いゆお及層大コモクカ軟毎ホアヲト極書た球87本野
>> ぎレべ襲画売ぎ関負ら断紀チラネキ質紋キタ資私トゃふん。江コキトサ狂毎現ンづ応通サシ続36島性84界ぼゆゃが実書ちぽふず辞躍事シ世図二ハス盛堀人わレをう第紙きかイの浅69乳キメタ事争つょ社以ヨナム法例やほにル済療にしいむ。子け記多ゅくよ正役モ母憲トぞ説帝け務賞ク付打ワナ内桁ぼでクフ因倒おふフ印気地レタケマ冬4雇各裁微ひるぼ。
>> \stopbuffer
>> 
>> \rm \getbuffer
>> 
>> \page
>> 
>> \ss \getbuffer
>> 
>> \stoptext
>> ```
>> 
>> I got all the fonts available in my computer, but the generated pdf contains
>> only the Latin part. Just few numbers: 873684694.
>> I don't know what I am doing incorrectly here.
>> 
>> Would anyone be able to help me out?
>> I eventually want to make a document which has multiple scripts in it
>> with English as main language.
>> 
>> I tried skipping some of the pdfs at
>> https://wiki.contextgarden.net/Documentation, but am not sure if I
>> missed the relevant section.
>> 
>> Thanks.
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : [email protected] / 
>> 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 : [email protected] / 
> 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 : [email protected] / 
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
___________________________________________________________________________________

Reply via email to