[NTG-context] How to obtain the hbox's node when there is only one hbox for an entire paragraph?
Dear list, What is the non-hacking way to obtain the hbox's node in a Lua hook when there is only one hbox for an entire paragraph? Best regards, Huang Fusyong (黄复雄) % start ConTeXt \startluacode Moduledata = Moduledata or {} Moduledata.jiazhu = Moduledata.jiazhu or {} ---[[ local function show_detail(n, label) local l = label or "===" print(">>>>>>>>>"..l.."<<<<<<<<<<") print(nodes.toutf(n)) for i in node.traverse(n) do local char if i.id == nodes.nodecodes.glyph then char = utf8.char(i.char) print(i, char) elseif i.id == nodes.nodecodes.penalty then print(i, i.penalty) elseif i.id == nodes.nodecodes.glue then print(i, i.width, i.stretch, i.shrink, i.stretchorder, i.shrinkorder) elseif i.id == nodes.nodecodes.hlist then print(i, nodes.toutf(i.list),i.width,i.height,i.depth,i.shift,i.glue_set,i.glue_sign,i.glue_order) elseif i.id == nodes.nodecodes.kern then print(i, i.kern, i.expension) else print(i) end end end --]] function Moduledata.jiazhu.main(head) show_detail(head,"head") return head, true end nodes.tasks.appendaction("processors", "after", "Moduledata.jiazhu.main") \stopluacode \starttext \hbox{a b c} % The result is as follows (without the I expected): % >>>>>>>>>head<<<<<<<<<< % a b c %3448 : glyph unset> a %3702 : glue spaceskip>261738 130869 87246 0 0 %3484 : glyph unset> b %3716 : glue spaceskip>261738 130869 87246 0 0 % nil : glyph unset> c ~\hbox{a b c} % Hacking with the `~`, the result is as follows (containing the I expected): % >>>>>>>>>head<<<<<<<<<< % a b c %3377 : glyph unset> a %3733 : glue spaceskip>261738 130869 87246 0 0 %3491 : glyph unset> b %3747 : glue spaceskip>261738 130869 87246 0 0 % nil : glyph unset> c % >>>>>>>>>head<<<<<<<<<< % a b c %3484 : par vmodepar> %2208 : glue indentskip> 0 0 0 0 0 %3498 : penalty userpenalty> 1 %3325 : glue spaceskip>261738 130869 87246 0 0 %3441 : hlist box> a b c 1702476 545484 86460 nil nil nil nil : glue spaceskip>261738 130869 87246 0 0 \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: Best way to input UTF-8
I recommend you to always show missing font markers in PDF documents with \replacemissingcharacters On Mon, Feb 19, 2024 at 12:46 AM Shiv Shankar Dayal wrote: > > Hi all, > > What is the best way to input UTF-8 in LuaMetaTex? If I use the UTF-8 > characters then do not come out in text with Modern font. > > -- > Respect, > Shiv Shankar Dayal > ___ > 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 ___
Re: [NTG-context] New c-o-w: The XMas gift for ConTeXt users
Dear Zdeněk, Thanks for your prompt response. Yes, great, I got the right PDF now. Best regards 黄复雄(Huang Fysyong) Zdeněk Svoboda via ntg-context 于2022年12月28日周三 10:42写道: > > Hello Huang, > > This was probably an error on my side. > > Can you please try again now? I have tried to fix it, it should > hopefully work now. > > Sincerely, > Zdeněk Svoboda > > Dne 28. 12. 22 v 3:01 黄复雄 via ntg-context napsal(a): > >> You can probably test with uploading a font the the work directory. > >> > > Hans, > > thanks for the tip. > > > > I uploaded a noto-cjk font file, NotoSerifCJKsc-Regular.otf, to the > > root directory. > > Also, my typography file, test.tex, is in the root directory, and it reads > > > > ```context > > \definefont[myfont][file:NotoSerifCJKsc-Regular.otf*default at 12pt] > > > > \starttext > > > > {\myfont 我我} > > > > \stoptext > > ``` > > > > Then I did not get the correct PDF file, i.e. the two Chinese > > characters are not displayed on it. and the log shows: > > > > ```log > > .. > > fonts > defining > forced type 'otf' of 'NotoSerifCJKsc-Regular' not found > > 17fonts > defining > unable to define 'NotoSerifCJKsc-Regular.otf' as > > 'myfont--0' > > .. > > 51fonts > start missing characters: > > /home/admin/context/tex/texmf/fonts/data/gust/lm/lmroman10-regular.otf > > 52fonts > 2 U+06211 我 > > 53fonts > stop missing characters > > .. > > ``` > > > > I processed on my Win10 PC, with the same font file, test.tex and the > > same directory structure, > > and got the correct PDF file and the log is as follows: > > > > ```log > > .. > > fonts > defining > source file > > 'c:/windows/fonts/NotoSerifCJKsc-Regular.otf' is not found > > fonts > defining > using source file > > 'NotoSerifCJKsc-Regular.otf' due to cache mismatch > > .. > > mkiv lua stats > loaded fonts: 3 files: latinmodern-math.otf, > > lmroman12-regular.otf, notoserifcjksc-regular.otf > > .. > > ``` > > > > Any further hints? > > > > Best regards, > > 黄复雄(Huang Fusyong) > > ___ > > 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 > ___ ___ 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 c-o-w: The XMas gift for ConTeXt users
> > You can probably test with uploading a font the the work directory. > Hans, thanks for the tip. I uploaded a noto-cjk font file, NotoSerifCJKsc-Regular.otf, to the root directory. Also, my typography file, test.tex, is in the root directory, and it reads ```context \definefont[myfont][file:NotoSerifCJKsc-Regular.otf*default at 12pt] \starttext {\myfont 我我} \stoptext ``` Then I did not get the correct PDF file, i.e. the two Chinese characters are not displayed on it. and the log shows: ```log .. fonts > defining > forced type 'otf' of 'NotoSerifCJKsc-Regular' not found 17fonts > defining > unable to define 'NotoSerifCJKsc-Regular.otf' as 'myfont--0' .. 51fonts > start missing characters: /home/admin/context/tex/texmf/fonts/data/gust/lm/lmroman10-regular.otf 52fonts > 2 U+06211 我 53fonts > stop missing characters .. ``` I processed on my Win10 PC, with the same font file, test.tex and the same directory structure, and got the correct PDF file and the log is as follows: ```log .. fonts > defining > source file 'c:/windows/fonts/NotoSerifCJKsc-Regular.otf' is not found fonts > defining > using source file 'NotoSerifCJKsc-Regular.otf' due to cache mismatch .. mkiv lua stats > loaded fonts: 3 files: latinmodern-math.otf, lmroman12-regular.otf, notoserifcjksc-regular.otf ...... ``` Any further hints? Best regards, 黄复雄(Huang Fusyong) ___ 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 c-o-w: The XMas gift for ConTeXt users
Dear Zdeněk Svoboda. I tried your platform, it's great and it will definitely help to promote ConTeXt. Thanks for your work. I am from China and I would like to know, does this platform support CJK fonts (e.g. https://github.com/googlefonts/noto-cjk)? if yes, then is there any examples of usage? or have any plans to support them? Best regards, 黄复雄(Huang Fusyong) Zdeněk Svoboda via ntg-context 于2022年12月27日周二 07:58写道: > > Hello ConTeXt community! > > I'm Zdeněk Svoboda, a master degree student at Mendel university in > Brno. I've been using ConTeXt for a while now and have always been > impressed by its capabilities and the helpfulness of this community. > > For my thesis project with Tomáš Hála as the supervisor, I've developed > an online application for working with ConTeXt. The main goal was to > create an application capable of compiling ConTeXt source right from the > browser but I thought that it's not enough and added a few features or > tools on top of that. Functions of the application include: > > - User accounts to save files and access them from other computers. > - Editor with syntax highlighting and autocompletion for ConTeXt > command. > - Generating PDF document and previewing it directly from the browser. > - Layout designer to customize the layout of their documents with a > variety of options and mouse resizability of each layout element. > - Table designer for creating and customize tables with alignment > and border settings, colors, merging and splitting cells eg. > - Lists designer with a simple interface to customize lists. > - Help function for ConTeXt commands (hidden under the "?" button) > > Developing this application was a great learning experience for me, and > I faced a number of technical challenges along the way. For example, > having to dig through the XML document to extract all the information > needed for the "?" help function. > > I'm excited to share my project with the ConTeXt community and hope that > it will be a useful resource for someone. If you're interested in trying > it out, you can find it at https://www.context-on-web.eu/. I'd love to > hear any feedback or suggestions you have. If you find a bug or > encounter an error while using the application, please let me know (and > cc: th...@mendelu.cz) the steps you took that caused it. > > Known bugs: > - Generated code from table designer needs better formatting > - Duplicated color definitions in table designer > - Layout designer -- numbers are not rounded > > Best regards, > Zdeněk Svoboda > > ___ > 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] how to simulate \hss in luametatex?
Hans, thank you. By your and Max's answers, I understand that there must be box.glueset for the glues in the box.list to actually work. Best regards Huang Fusyong(黄复雄) Hans Hagen via ntg-context 于2022年11月11日周五 18:52写道: > > On 11/11/2022 10:53 AM, Max Chernoff via ntg-context wrote: > > Hi, > > > >> I want to simulate \hss in lua end in ConTeXt/luametatex environment. > >> For example, > >> > >> ```ConTeXt > >> a{\raise 1.5ex\hbox to 0pt{\hss b}}c > >> ``` > > > >> And in lua, I do as follows(part of my app seen in attachment): > > > > Your code doesn't compile as is. I think that this is the same thing > > though: > > > > \starttext > > \startluacode > > local a = node.new"glyph" > > a.char = string.byte("a") > > a.font = font.current() > > > > local b = node.new"glyph" > > b.char = string.byte("b") > > b.font = font.current() > > > > local c = node.new"glyph" > > c.char = string.byte("c") > > c.font = font.current() > > > > local hss = node.new("glue") > > hss.stretch = 65536 > > hss.stretchorder = 2 > > hss.shrink = 65536 > > hss.shrinkorder = 2 > > hss.width = 0 > > b = node.insertbefore(b, b, hss) > > > > local box = node.new("hlist", "box") > > box.head = b > > box.width = 0 > > box.shift = -tex.sp("1ex") > > > > tex.forcehmode() > > node.write(a + box + c) > > \stopluacode > > \stoptext > > > >> And got 'b' on top of 'c' in pdf as follows: > >> > >> ```pdf > >>b > >> ac > >> ``` > > > > The \hss isn't the problem here. The problem is actually with the box. > > When you manually make the \hbox like that, I think (although I could be > > wrong) that you're bypassing all of TeX's glue calculations. You should > > probably use "node.hpack" instead: > > > > \starttext > > \startluacode > > local a = node.new"glyph" > > a.char = string.byte("a") > > a.font = font.current() > > > > local b = node.new"glyph" > > b.char = string.byte("b") > > b.font = font.current() > > > > local c = node.new"glyph" > > c.char = string.byte("c") > > c.font = font.current() > > > > local hss = node.new("glue") > > hss.stretch = 65536 > > hss.stretchorder = 2 > > hss.shrink = 65536 > > hss.shrinkorder = 2 > > hss.width = 0 > > > > local box = node.hpack(hss + b, "exactly", 0) > > box.shift = -tex.sp("1ex") > > > > tex.forcehmode() > > a.next = box > > box.next = c > > node.write(a) > > \stopluacode > > \stoptext > indeed, an dafter that you can check it > > box.glueorder : 2 > box.glueset: 6.6683349609375 > box.gluesign : 2 > > which will be applied (in the backend) to glues > > 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] how to simulate \hss in luametatex?
Dear Max, I am very grateful that you took the time to tweak and test my non-running code snippet and found the problem. > local box = node.hpack(hss + b, "exactly", 0) You are absolutely right, the cause of the problem was that I wasn't using node.hpack(). Actually, I tried to use it, but used it wrong, as follows: local box, _ = node_hpack(list) box.width = 0 box.shift = -tex_sp("1ex") My app works fine now. Also, I learned a lot from your code, like font.current(), hss + b and tex.forcehmode() - I immediately used the last one to set box.shift, making it relative. Best regards Huang Fusyong(黄复雄) Max Chernoff via ntg-context 于2022年11月11日周五 17:55写道: > > Hi, > > > I want to simulate \hss in lua end in ConTeXt/luametatex environment. > > For example, > > > > ```ConTeXt > > a{\raise 1.5ex\hbox to 0pt{\hss b}}c > > ``` > > > And in lua, I do as follows(part of my app seen in attachment): > > Your code doesn't compile as is. I think that this is the same thing > though: > >\starttext >\startluacode >local a = node.new"glyph" >a.char = string.byte("a") >a.font = font.current() > >local b = node.new"glyph" >b.char = string.byte("b") >b.font = font.current() > >local c = node.new"glyph" >c.char = string.byte("c") >c.font = font.current() > >local hss = node.new("glue") >hss.stretch = 65536 >hss.stretchorder = 2 >hss.shrink = 65536 >hss.shrinkorder = 2 >hss.width = 0 >b = node.insertbefore(b, b, hss) > >local box = node.new("hlist", "box") >box.head = b >box.width = 0 >box.shift = -tex.sp("1ex") > >tex.forcehmode() >node.write(a + box + c) >\stopluacode >\stoptext > > > And got 'b' on top of 'c' in pdf as follows: > > > > ```pdf > > b > > ac > > ``` > > The \hss isn't the problem here. The problem is actually with the box. > When you manually make the \hbox like that, I think (although I could be > wrong) that you're bypassing all of TeX's glue calculations. You should > probably use "node.hpack" instead: > >\starttext >\startluacode >local a = node.new"glyph" >a.char = string.byte("a") >a.font = font.current() > >local b = node.new"glyph" >b.char = string.byte("b") >b.font = font.current() > >local c = node.new"glyph" >c.char = string.byte("c") >c.font = font.current() > >local hss = node.new("glue") >hss.stretch = 65536 >hss.stretchorder = 2 >hss.shrink = 65536 >hss.shrinkorder = 2 >hss.width = 0 > >local box = node.hpack(hss + b, "exactly", 0) >box.shift = -tex.sp("1ex") > >tex.forcehmode() >a.next = box >box.next = c >node.write(a) >\stopluacode >\stoptext > > -- Max > > ___ > 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] how to simulate \hss in luametatex?
Hi list, I want to simulate \hss in lua end in ConTeXt/luametatex environment. For example, ```ConTeXt a{\raise 1.5ex\hbox to 0pt{\hss b}}c ``` should get 'b' on top of 'a', as follows: ```pdf b ac ``` and in lua, I see a before "b" node, width width:0, stretch:65536, shrink:65536, stretchorder:2, shrinkorder:2 And in lua, I do as follows(part of my app seen in attachment): ```lua local hss = node_new(glue_id) hss.stretch = 65536 hss.stretchorder = 2 hss.shrink = 65536 hss.shrinkorder = 2 hss.width = 0 list,_ = node_insertbefore(list, list, hss) -- b is in the list -- I got a with width:0, stretch:65536, shrink:65536, stretchorder:2, shrinkorder:2 local box = node_new(hlist_id, "box") box.head = list box.width = 0 box.shift = -tex_sp("1ex") -- I got width:0 height:0 deep:0 shift: -503424 head, current = node_insertbefore(head,current, box) -- current is 'c' node ``` And got 'b' on top of 'c' in pdf as follows: ```pdf b ac ``` How can I get 'b' on top of 'a' as \hss do? ___ 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 ___ t-zhpunc.lua Description: Binary data ___ 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] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
> I noticed an issue with multiple glyphs but am not sure why ... (so we > need very small examples to figure it out). I have observed a phenomenon that when the base text contains glues/spaces, an error occurs, as in the following example. Coincidentally, when using \setscript[hanzi], the macro will inject glue between Chinese, and I will get the same error. %%%begin example \starttext \ruby{a a}{b} \stoptext %%%end example Best Regards, 黄复雄(Huang Fuysong) ___ 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] Can't no break between a close punctuation and a open punctuation
> you can try this in scrp-cjk.lua (remake the format) > > local chinese_8 = { > jami_initial = nobreak_shrink_break_stretch, > korean = nobreak_autoshrink_break_stretch, > chinese = stretch_break, -- nobreak_autoshrink_break_stretch, > hiragana = stretch_break, -- nobreak_autoshrink_break_stretch, > katakana = stretch_break, -- nobreak_autoshrink_break_stretch, > half_width_open = nobreak_autoshrink_break_stretch_nobreak_autoshrink, > half_width_open = stretch_break, > half_width_close = nobreak_autoshrink_nobreak_stretch, > full_width_open = nobreak_autoshrink_break_stretch_nobreak_shrink, > full_width_close = nobreak_autoshrink_nobreak_stretch, > full_width_punct = nobreak_autoshrink_nobreak_stretch, > hyphen = nobreak_autoshrink_break_stretch, > non_starter = nobreak_autoshrink_break_stretch, > other= nobreak_autoshrink_break_stretch, > } Dear Hans, I have modified these two files, scrp-cjk.lua and char-scr.lua. In the modified lines, some comments were made, but not all of these places were commented. If you need to mark all the places, please let me know and I'll mark all the changes. As I've said last time, what I've done may be a bit reckless, please check and correct it. Though I've done some testing, but obviously it is not very comprehensive. With best regards, 黄复雄(Huang Fusyong) ___ 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 ___ scrp-cjk.lua Description: Binary data char-scr.lua Description: Binary data watch_sys_actions_to_punctuation.lmtx Description: Binary data ___ 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] Can't no break between a close punctuation and a open punctuation
> > doc for example: > > > > ```lmtx > > \setscript[hanzi] > > \usetypescriptfile[mscore] > > \usebodyfont [mschinese,20pt] > > can you upgrade the chiese section in that file for windows 10+ as the > old fonts are gone > > (i tested with \definedfont[file:mingliu.ttc*chinese @ 10pt]) I adapted type-imp-mscore.mkiv to the situation of the fonts in Win10, and made type-imp-notocjksc.mkiv according to the Notocjksc fonts. I refer to type-imp-ipaex.mkiv, and I don't know if the method in it is outdated. At least, the test results are fine, though the resulting PDF is a bit too large to be included in this email. ___ 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 ___ font_testing.lmtx Description: Binary data type-imp-notocjksc.mkiv Description: Binary data type-imp-mscore.mkiv Description: Binary data ___ 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] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
Dear Hans. Thank you very much for so many examples and guidance. In fact, I have read one of the examples in the followingup.pdf, and the https://github.com/Fusyong/vertical-typesetting module I made is based on the example. The examples all worked after I changed the font settings according to my Win10 OS; and surprisingly, the ruby module also worked with \setscript[hanzi] (they don't work together in the example Mr. Wolfgang provided). The only problem is that the offsets of glyphs are a bit inaccurate, which may be related to the font, and I will look into it further. The examples I have adjusted are attached, and the output PDF of them is not attached for being too big to the limit of 100 KB. (Just now I received a reply from the mailing list system asking to adjust a over-length email, I mistakenly thought it was about the one to Mr. Wolfgang, so that one was duplicated and submitted, please deal with it.) By the way, I've finished checking and adjusting type-imp-mscore.mkiv, scrp-cjk.lua, and char-scr.lua so far, but the changes are a bit much (or maybe you can say a bit reckless), so I'm hesitant to get back to you in order to minimize your troubles. And as mentioned partly in an earlier email, I've made 3 modules that support Chinese (about vertical-typesetting, Jiazhu or inline cutting note and punctuation) and I'd be happy to contribute them to the ConTeXt project repository when they're ripe, if that's in line with the project policy. Your comments and guidance are very welcome. Best regards, Huang Fusyong(黄复雄) Hans Hagen via ntg-context 于2022年8月22日周一 00:20写道: > > On 8/21/2022 12:10 PM, Wolfgang Schuster via ntg-context wrote: > > 黄复雄 via ntg-context schrieb am 21.08.2022 um 10:24: > >> Currently, the ruby module does not seem to support cjk fonts? I have > >> a preliminary implementation of furigana(pinyin in Chinese) as: > attached a variant (no pdf attached) using wolfgangs font definition > plus some more > > - >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 > ___ test-directions-006.lmtx Description: Binary data test-directions-005.lmtx Description: Binary data test-directions-008.lmtx Description: Binary data ___ 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] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
Dear Wolfgang, thank you very much for your guidance. After changing the font settings according to my computer Win10 OS, the ruby module worked. But there is another problem, when I use `\setscript[hanzi]`, as follows %%%begin example \setscript[hanzi] \usetypescriptfile[mscore] \usebodyfont [mschinese,20pt] \definefont[pinyinfont][name:ahpinying*default at 9pt] \setupruby[color=darkgray, style=\pinyinfont] \starttext \ruby{寖備}{jìn bèi} \ss \ruby{寖備}{jìn bèi} % \tt \ruby{寖備}{jìn bèi} \stoptext %%%end example ruby errors out as follows(that's why I didn't succeed with ruby before): %%%begin error …… tex error > tex error on line 1 in file d:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx: lua error: registered function call [209]: ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:268: attempt to index a nil value (local 'ruby') stack traceback: ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:268: in upvalue 'whatever' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'attach' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363: in upvalue 'whatever' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'attach' ... (skipping 27 levels) ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363: in upvalue 'whatever' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'typesetters_rubies_attach' [string "local tonut = nodes.tonut..."]:20: in function <[string "local tonut = nodes.tonut..."]:11> (...tail calls...) [string "D:/venvs/context-win64/tex/texmf-context/tex/..."]:38: in function <[string "D:/venvs/context-win64/tex/texmf-context/tex/..."]:37> (...tail calls...) 1 >> \setscript[hanzi] …… %%%end error Best regards, Huang Fusyong(黄复雄) Wolfgang Schuster via ntg-context 于2022年8月21日周日 18:11写道: > > 黄复雄 via ntg-context schrieb am 21.08.2022 um 10:24: > > Currently, the ruby module does not seem to support cjk fonts? I have > > a preliminary implementation of furigana(pinyin in Chinese) as: > > > > ```lmtx > > % define the pinyin font > > \definefont[pinyinfont][name:ahpinying*default at 9pt] > > % define the pinyin command > > \define[2]\pinyin{% > > \setbox1 = \hbox{#1}% > > \setbox2 = \hbox{\darkgray \pinyinfont #2}% > > \newdimen\maxwd% > > \ifdim \wd1>\wd2 \maxwd=\wd1 \else \maxwd=\wd2 \fi% > > \setbox1 = \hbox to \maxwd{\hfill \box1 \hfill}% > > \setbox2 = \hbox to \maxwd{\hfill \box2 \hfill}% > > \hskip0pt plus5pt\vbox{\setupinterlinespace[line=0.5em]\box2\box1}% > > above line > > % \hskip0pt > > plus5pt\vtop{\setupinterlinespace[line=0.5em]\box1\box2}% under line > > } > > ``` > > usage as follows: > > > > ```lmtx > > \pinyin{寖備}{jìn bèi} > > ``` > > The ruby command has no problem with chinese but you need a font which > has support for it. > As can be seen in my previous example you can use the style-key to > switch to a different font > for the annotation (e.g. \setupruby[style=\pinyinfont]). > > begin example > \definefallbackfamily [documentfont] [rm] [Noto Serif CJK SC] > [preset=range:chinese] > \definefallbackfamily [documentfont] [ss] [Noto Sans CJK SC] > [preset=range:chinese] > \definefallbackfamily [documentfont] [tt] [Noto Sans Mono CJK SC] > [preset=range:chinese] > > \definefontfamily [documentfont] [rm] [Noto Serif] > \definefontfamily [documentfont] [ss] [Noto Sans] > \definefontfamily [documentfont] [tt] [Noto Sans Mono] > > \setupbodyfont [documentfont] > > \setupruby[color=darkgray] > > \starttext > \ruby{寖備}{jìn bèi} \ss \ruby{寖備}{jìn bèi} \tt \ruby{寖備}{jìn bèi} > \stoptext > end example > > Wolfgang > > ___ > 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] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
xmf-context/tex/context/base/mkxl/typo-rub.lmt:363: in upvalue 'whatever' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'attach' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363: in upvalue 'whatever' ...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370: in upvalue 'typesetters_rubies_attach' [string "local tonut = nodes.tonut..."]:20: in function <[string "local tonut = nodes.tonut..."]:11> (...tail calls...) [string "D:/venvs/context-win64/tex/texmf-context/tex/..."]:38: in function <[string "D:/venvs/context-win64/tex/texmf-context/tex/..."]:37> (...tail calls...) 1 >> \setscript[hanzi] 2 3 \usetypescriptfile[mscore] 4 \usebodyfont [mschinese,20pt] 5 % 6 \definefont[pinyinfont][name:ahpinying*default at 9pt] 7 % 8 \setupruby[color=darkgray, style=\pinyinfont] 9 10 \starttext 11 \ruby{寖備}{jìn bèi} \ss \ruby{寖備}{jìn bèi} %\tt \ruby{寖備}{jìn bèi} mtx-context | fatal error: return code: 1 %%%end error Best regards, Huang Fusyong(黄复雄) Wolfgang Schuster via ntg-context 于2022年8月21日周日 18:11写道: > > 黄复雄 via ntg-context schrieb am 21.08.2022 um 10:24: > > Currently, the ruby module does not seem to support cjk fonts? I have > > a preliminary implementation of furigana(pinyin in Chinese) as: > > > > ```lmtx > > % define the pinyin font > > \definefont[pinyinfont][name:ahpinying*default at 9pt] > > % define the pinyin command > > \define[2]\pinyin{% > > \setbox1 = \hbox{#1}% > > \setbox2 = \hbox{\darkgray \pinyinfont #2}% > > \newdimen\maxwd% > > \ifdim \wd1>\wd2 \maxwd=\wd1 \else \maxwd=\wd2 \fi% > > \setbox1 = \hbox to \maxwd{\hfill \box1 \hfill}% > > \setbox2 = \hbox to \maxwd{\hfill \box2 \hfill}% > > \hskip0pt plus5pt\vbox{\setupinterlinespace[line=0.5em]\box2\box1}% > > above line > > % \hskip0pt > > plus5pt\vtop{\setupinterlinespace[line=0.5em]\box1\box2}% under line > > } > > ``` > > usage as follows: > > > > ```lmtx > > \pinyin{寖備}{jìn bèi} > > ``` > > The ruby command has no problem with chinese but you need a font which > has support for it. > As can be seen in my previous example you can use the style-key to > switch to a different font > for the annotation (e.g. \setupruby[style=\pinyinfont]). > > begin example > \definefallbackfamily [documentfont] [rm] [Noto Serif CJK SC] > [preset=range:chinese] > \definefallbackfamily [documentfont] [ss] [Noto Sans CJK SC] > [preset=range:chinese] > \definefallbackfamily [documentfont] [tt] [Noto Sans Mono CJK SC] > [preset=range:chinese] > > \definefontfamily [documentfont] [rm] [Noto Serif] > \definefontfamily [documentfont] [ss] [Noto Sans] > \definefontfamily [documentfont] [tt] [Noto Sans Mono] > > \setupbodyfont [documentfont] > > \setupruby[color=darkgray] > > \starttext > \ruby{寖備}{jìn bèi} \ss \ruby{寖備}{jìn bèi} \tt \ruby{寖備}{jìn bèi} > \stoptext > end example > > Wolfgang > > ___ > 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] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
Currently, the ruby module does not seem to support cjk fonts? I have a preliminary implementation of furigana(pinyin in Chinese) as: ```lmtx % define the pinyin font \definefont[pinyinfont][name:ahpinying*default at 9pt] % define the pinyin command \define[2]\pinyin{% \setbox1 = \hbox{#1}% \setbox2 = \hbox{\darkgray \pinyinfont #2}% \newdimen\maxwd% \ifdim \wd1>\wd2 \maxwd=\wd1 \else \maxwd=\wd2 \fi% \setbox1 = \hbox to \maxwd{\hfill \box1 \hfill}% \setbox2 = \hbox to \maxwd{\hfill \box2 \hfill}% \hskip0pt plus5pt\vbox{\setupinterlinespace[line=0.5em]\box2\box1}% above line % \hskip0pt plus5pt\vtop{\setupinterlinespace[line=0.5em]\box1\box2}% under line } ``` usage as follows: ```lmtx \pinyin{寖備}{jìn bèi} ``` BTW, I hav made a vertical typesetting module for Chinese in ConTeXt LMTX, vertical_typeset.lua in https://github.com/Fusyong/vertical-typesetting You should modify the set for Japanese characters and punctuations here: ```lua local function chars_to_vertical(c) return c >= 0x04E00 and c <= 0x09FFF end local puncs_to_rotate = { [0x3001] = true, -- 、 [0xFF0C] = true, -- , [0x3002] = true, -- 。 [0xFF0E] = true, -- . [0xFF1F] = true, -- ? [0xFF01] = true, -- ! [0xFF1A] = true, -- : [0xFF1B] = true, -- ; } ``` and there is a doc for example, 大学章句.lmtx, in https://github.com/Fusyong/jiazhu, and jiazhu.lua in same place is a module of Jiazhu (or 夹注, 割注) in ConTeXt LMTX. But all the comments are in Chinese. amano.kenji via ntg-context 于2022年8月16日周二 19:34写道: > > At least, furigana seems covered. > > How do I know which document to consult? There are many PDF files that come > with ConTeXt. > > --- Original Message --- > On Monday, August 15th, 2022 at 3:39 PM, Wolfgang Schuster via ntg-context > wrote: > > > > amano.kenji via ntg-context schrieb am 15.08.2022 um 14:00: > > > > > Is there any documentation about \ruby? > > > > > > You can see all available parameters in setup-en.pdf, the example below > > shows a few of them: > > > > begin example > > \setupinterlinespace[line=4ex] > > > > \setuptype[style=\ttx] > > > > \starttext > > > > \start > > x \ruby{aaa}{bbb} x > > \stop > > > > \start \setupruby[location=left] > > \type{\setupruby[location=left]}\quad x \ruby{aaa}{bbb} x > > \stop > > > > \start \setupruby[location=right] > > \type{\setupruby[location=right]}\quad x \ruby{aaa}{bbb} x > > \stop > > > > \start \setupruby[location=right,left={[},right={]}] > > \type{\setupruby[left={[},right={]}]}\quad x \ruby{aaa}{bbb} > > x > > \stop > > > > \start \setupruby[align=flushleft] > > \type{\setupruby[align=flushleft]}\quad x \ruby{aa}{bbb} > > x > > \stop > > > > \start \setupruby[align=flushright] > > \type{\setupruby[align=flushright]}\quad x \ruby{aa}{bbb} > > x > > \stop > > > > \start \setupruby[style=\itxx] > > \type{\setupruby[style=\itxx]}\quad x \ruby{aaa}{bbb} x > > \stop > > > > \start \setupruby[color=blue] > > \type{\setupruby[color=blue]}\quad x \ruby{aaa}{bbb} x > > \stop > > > > \start \setupruby[voffset=-1.2ex] > > \type{\setupruby[voffset=-1.2ex]}\quad x \ruby{aaa}{bbb} x > > \stop > > > > \stoptext > > end example > > > > > What about vertical text? > > > > > > ConTeXt has a mechanism to produce vertical text but there is nothing > > yet which can > > be used out of the box to produce a complete document with vertical > > paragraphs. > > > > Wolfgang > > > > ___ > > 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 > ___ ___ 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 :
Re: [NTG-context] Can't no break between a close punctuation and a open punctuation
> > > Dear Hans, > > > > I found that ConTeXt injected two infinity penalties between a close > > punctuation and a open punctuation, for example between `”` and `“`, or > > between `:` and `“`, so can not break at these places, as showed in > > following doc. But actually, we may sometimes need to do so. Please note > > that there is no space around full width punctuations in Chinese > document. > > you can try this in scrp-cjk.lua (remake the format) > > local chinese_8 = { > jami_initial = nobreak_shrink_break_stretch, > korean = nobreak_autoshrink_break_stretch, > chinese = stretch_break, -- nobreak_autoshrink_break_stretch, > hiragana = stretch_break, -- nobreak_autoshrink_break_stretch, > katakana = stretch_break, -- nobreak_autoshrink_break_stretch, > half_width_open = > nobreak_autoshrink_break_stretch_nobreak_autoshrink, > half_width_open = stretch_break, > half_width_close = nobreak_autoshrink_nobreak_stretch, > full_width_open = nobreak_autoshrink_break_stretch_nobreak_shrink, > full_width_close = nobreak_autoshrink_nobreak_stretch, > full_width_punct = nobreak_autoshrink_nobreak_stretch, > hyphen = nobreak_autoshrink_break_stretch, > non_starter = nobreak_autoshrink_break_stretch, > other= nobreak_autoshrink_break_stretch, > } > > Thanks to your guidance, I solved the problem. And I would like to look into some other related issues that I have doubts about and get back to you together. So I need some more time. > > doc for example: > > > > ```lmtx > > \setscript[hanzi] > > \usetypescriptfile[mscore] > > \usebodyfont [mschinese,20pt] > > can you upgrade the chiese section in that file for windows 10+ as the > old fonts are gone > > (i tested with \definedfont[file:mingliu.ttc*chinese @ 10pt]) > Sorry, when you say ` that file for windows 10+`, which one are you referring to? to scrp-cjk.lua?( yes, I will upgrade it.) or to my lmtx doc for testing?(It work fine in my Windows 10.) or to type-imp-mscore.mkiv? (It work fine in my Windows 10, and no mingliu.ttc in it.) Thanks. Huang Fusyong(黄复雄) --- 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] Can't no break between a close punctuation and a open punctuation
I sent this email four days ago and it may not have been delivered? --- Dear Hans, I found that ConTeXt injected two infinity penalties between a close punctuation and a open punctuation, for example between `”` and `“`, or between `:` and `“`, so can not break at these places, as showed in following doc. But actually, we may sometimes need to do so. Please note that there is no space around full width punctuations in Chinese document. doc for example: ```lmtx \setscript[hanzi] \usetypescriptfile[mscore] \usebodyfont [mschinese,20pt] \showframe \starttext \dorecurse{5}{“好?!;”“:,。”} % linebreak sutck \dorecurse{30}{“我”} % linebreak sutck \dorecurse{30}{我} % linebreak work \dorecurse{30}{我。} % linebreak work \stoptext ``` What I see between any two consecutive punctuations are 1 0 0 655500 1 0 655500 0 so nowhere to linebreak. Thanks. Huang Fusyong(黄复雄) ___ 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] Can't no break between a close punctuation and a open punctuation
Dear Hans, I found that ConTeXt injected two infinity penalties between a close punctuation and a open punctuation, for example between `”“`, or `:“`, as showed in the following Chinese document. But actually, we need to break between them sometime. Please note that there is no space around full width punctuations in Chinese document. ```lmtx \setscript[hanzi] \usetypescriptfile[mscore] \usebodyfont [mschinese,20pt] \showframe % just for watching node list % \startluacode % local watch = require("watch_sys_actions.lua") % watch.register() % \stopluacode \starttext \dorecurse{5}{“好?!;”“:,。”} % linebreak sutck \dorecurse{30}{“我”} % linebreak sutck \dorecurse{30}{我} % linebreak work \dorecurse{30}{我。} % linebreak work \stoptext ``` What I see between any two consecutive punctuations is 1 0 0 655500 1 0 655500 0 so nowhere to linebreak. Huang Fusyong(黄复雄) watch_sys_actions.lua Description: Binary data ___ 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] linebreak error: no leftinit or rightinit or leftfill or rigthfill expected
Thanks, Hans. My module works again now, with the help of tex.preparelinebreak(). For potential readers: tex.preparelinebreak(list) modifyed my list for tex.linebreak(list) to: # by user in advance, necessary # by user in advance, necessary ... # The last glue here, in the end of the list, is removed # as same as parfillrightskip 黄复雄 于2022年7月16日周六 10:02写道: > Thanks, Hans > > I modified my list to: > >2873 : par vmodepar> >3113 : glue indentskip> >3119 : glue parinitleftskip> >2879 : glue parinitrightskip> >2891 : glyph unset> > ... > 639 : glyph unset> >3089 : kern userkern> >2334 : glue userskip> >3095 : rule normal> >3101 : glue spaceskip> > 642 : glue spaceskip> >3107 : penalty userpenalty> > 645 : glue userskip> >3125 : penalty userpenalty> >3131 : glue parfillleftskip> > nil : glue parfillskip> > > but the error is the same, so I'll wait the tex.preparelinebreak(), and > observe it's work for more details. > > Huang Fusyong(黄复雄) > ___ 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] linebreak error: no leftinit or rightinit or leftfill or rigthfill expected
Thanks, Hans I modified my list to: 2873 : par vmodepar> 3113 : glue indentskip> 3119 : glue parinitleftskip> 2879 : glue parinitrightskip> 2891 : glyph unset> ... 639 : glyph unset> 3089 : kern userkern> 2334 : glue userskip> 3095 : rule normal> 3101 : glue spaceskip> 642 : glue spaceskip> 3107 : penalty userpenalty> 645 : glue userskip> 3125 : penalty userpenalty> 3131 : glue parfillleftskip> nil : glue parfillskip> but the error is the same, so I'll wait the tex.preparelinebreak(), and observe it's work for more details. Huang Fusyong(黄复雄) ___ 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] linebreak error: no leftinit or rightinit or leftfill or rigthfill expected
I mistakenly sent the following letter to lua...@tug.org yesterday. I hope it won't cause anyone any trouble. Thanks to luigi for pointing out the error. - Hi all, I just updated my ConTeXt to system > ConTeXt ver: 2022.07.06 21:42 LMTX fmt: 2022.7.12 int: english/english yesterday and got a error message in using tex.linebreak(head) as follow: luatex warning > linebreak: no [ leftinit | rightinit | leftfill | rigthfill] expected I can't get any information about them. The head and the list going to tex.linebreak() like: 2873 : par vmodepar> 2879 : glue indentskip> 2891 : glyph unset> 2897 : glue userskip> ... 639 : glyph unset> 3089 : kern userkern> 2334 : glue userskip> 3095 : rule normal> 3101 : glue spaceskip> 642 : glue spaceskip> 3107 : penalty userpenalty> nil : glue userskip> My question is: Which of them is necessary, and How can I node.new() one and Where should it go in the list? Any hint would be appreciated, Huang Fusyong(黄复雄) ___ 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 ___