Re: [NTG-context] About vertical typesetting in ConTeXt
Thank you a lot, Hans. Indeed, the second solution seems to correctly put text into a vertical flow. However, a serious issue with Mongolian script is the horizontal direction: unlike CJK vertical typesetting, the text columns go from left to right, and the following almost works (\definefont gives no ligatures in my computer so I've used \definefontfamily instead) %\definefont does not work as expected \definefontfamily[main][serif][mongolianwhite][features=mongolian] \setupbodyfont[main,24pt] \defineframed [vertical] [ offset=none, align=flushleft, anchoring=left, foregroundstyle={\setupinterlinespace[40pt]}] \starttext %\MyFont \startframed[vertical] ᠣᠢᠷᠠ ᠵᠢᠨ ᠡᠳᠦᠷ᠂ ᠦᠪᠦᠷ ᠮᠣᠩᠭᠣᠯ ᠦᠨ ᠰᠢᠯᠢ ᠵᠢᠨ ᠭᠣᠣᠯ ᠠᠢᠮᠠᠭ ᠦᠨ ᠰᠢᠯᠣᠭᠣᠨ ᠬᠦᠬᠡ ᠬᠣᠰᠢᠭᠣᠨ ᠦ ᠰᠢᠭᠦᠬᠦ ᠬᠣᠷᠢᠶᠠ ᠨᠢᠭᠡᠨ ᠬᠦᠴᠦᠷᠬᠡᠭᠯᠡᠨ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠠᠯᠠᠲᠣ ᠬᠡᠷᠡᠭ ᠲᠦ ᠰᠢᠭᠦᠯᠲᠡ ᠬᠢᠪᠡ᠃ ᠰᠢᠭᠦᠨ ᠲᠠᠰᠣᠯᠣᠯᠳᠠ ᠪᠠᠷ᠂ ᠵᠠᠭᠠᠯᠳᠣᠭᠳᠠᠭᠴᠢ ᠡᠷᠬᠢᠮᠲᠦ ᠵᠢ ᠬᠦᠴᠦᠷᠭᠡᠭᠯᠡᠨ᠂ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠡᠯᠡ ᠪᠡᠷ ᠭᠣᠷᠪᠠᠨ ᠵᠢᠯ ᠦᠨ ᠬᠣᠭᠣᠴᠠᠭᠠ ᠲᠠᠢ ᠬᠣᠷᠢᠬᠣ ᠡᠷᠡᠭᠦᠦ ᠪᠡᠷ ᠰᠢᠳᠬᠡᠭᠰᠡᠨ ᠪᠠᠢᠨᠠ᠃ \stopframed \stoptext I've attached two files: the ConTeXt output (results so far) and the expected result (done via LuaLaTeX). As it can be seen, the text lines should go "upwards". I'd just use LuaLaTeX for this specific case, but ConTeXt is too cute... Thank you again, Hans. Sincerely, Jairo. El mar., 4 de ago. de 2020 a la(s) 07:52, Hans Hagen (j.ha...@xs4all.nl) escribió: > On 8/4/2020 2:42 PM, Hans Hagen wrote: > > On 8/4/2020 10:32 AM, Jairo A. del Rio wrote: > > > >> http://www.mongolfont.com/en/font/mnglwhiteotf.html > > let me be fast in providing an easier solution (I bet WS would correct > me otherwise): > > \defineframed >[vertical] >[offset=none, > align=flushleft, > anchoring=left, > foregroundstyle={\MyFont\setupinterlinespace[40pt]}] > > \startframed[vertical] > ᠣᠢᠷᠠ ᠵᠢᠨ ᠡᠳᠦᠷ᠂ ᠦᠪᠦᠷ ᠮᠣᠩᠭᠣᠯ ᠦᠨ ᠰᠢᠯᠢ ᠵᠢᠨ ᠭᠣᠣᠯ ᠠᠢᠮᠠᠭ ᠦᠨ ᠰᠢᠯᠣᠭᠣᠨ ᠬᠦᠬᠡ > ᠬᠣᠰᠢᠭᠣᠨ ᠦ ᠰᠢᠭᠦᠬᠦ ᠬᠣᠷᠢᠶᠠ ᠨᠢᠭᠡᠨ ᠬᠦᠴᠦᠷᠬᠡᠭᠯᠡᠨ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠠᠯᠠᠲᠣ ᠬᠡᠷᠡᠭ ᠲᠦ > ᠰᠢᠭᠦᠯᠲᠡ ᠬᠢᠪᠡ᠃ ᠰᠢᠭᠦᠨ ᠲᠠᠰᠣᠯᠣᠯᠳᠠ ᠪᠠᠷ᠂ ᠵᠠᠭᠠᠯᠳᠣᠭᠳᠠᠭᠴᠢ ᠡᠷᠬᠢᠮᠲᠦ ᠵᠢ ᠬᠦᠴᠦᠷᠭᠡᠭᠯᠡᠨ᠂ > ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠡᠯᠡ ᠪᠡᠷ ᠭᠣᠷᠪᠠᠨ ᠵᠢᠯ ᠦᠨ ᠬᠣᠭᠣᠴᠠᠭᠠ ᠲᠠᠢ ᠬᠣᠷᠢᠬᠣ ᠡᠷᠡᠭᠦᠦ ᠪᠡᠷ > ᠰᠢᠳᠬᠡᠭᠰᠡᠨ ᠪᠠᠢᠨᠠ᠃ > \stopframed > > I realized that I already added the anchoring features long ago ... > > Hans > > > hm, only for testing, not for use > > > >> I can rotate boxes in ConTeXt using other methods than those used in > >> LaTeX. However, my main concern is about "translating" the Lua(La)TeX > >> piece to be used in ConTeXt. I've read about "finalizers" in the CLD > >> manual and somewhere online, but I don't know how to access to > >> node.subtype("pdf_literal"). I'll be happy to know about a better > >> solution if ConTeXt offers it so it is accessible to other users. > >> Thank you in advance. > > The problem (or challenge) as usual is not in the coding but in what is > > a reasonable user interface. So, what are the use cases. Her eis one > > solution: > > > > \protected\def\startvertical > >{\dosingleempty\dostartvertical} > > > > \def\dostartvertical[#1]% > >{\begingroup > > \getdummyparameters[width=\textwidth,height=\textheight,#1]% > > \vbox > > orientation 1 > > \doifelsedimension{\dummyparameter{width}}{to > > \dummyparameter{width}}{}% > > \bgroup > > \doifelsedimension{\dummyparameter{height}}{\hsize > > \dummyparameter{height}}{}} > > > > \protected\def\stopvertical > >{\vfill > > \egroup > > \endgroup} > > > > % test > > > > \starttext > > > > \definefont > >[MyFont] > >[file:mnglwhiteotf.ttf*default,mongolian @ 24pt] > > > > \showframe > > > > \startvertical > > \MyFont > > \setupalign[stretch,tolerant,stretch] > > \setupinterlinespace[40pt]% > > ᠣᠢᠷᠠ ᠵᠢᠨ ᠡᠳᠦᠷ᠂ ᠦᠪᠦᠷ ᠮᠣᠩᠭᠣᠯ ᠦᠨ ᠰᠢᠯᠢ ᠵᠢᠨ ᠭᠣᠣᠯ ᠠᠢᠮᠠᠭ ᠦᠨ ᠰᠢᠯᠣᠭᠣᠨ ᠬᠦᠬᠡ > > ᠬᠣᠰᠢᠭᠣᠨ ᠦ ᠰᠢᠭᠦᠬᠦ ᠬᠣᠷᠢᠶᠠ ᠨᠢᠭᠡᠨ ᠬᠦᠴᠦᠷᠬᠡᠭᠯᠡᠨ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠠᠯᠠᠲᠣ ᠬᠡᠷᠡᠭ ᠲᠦ > > ᠰᠢᠭᠦᠯᠲᠡ ᠬᠢᠪᠡ᠃ ᠰᠢᠭᠦᠨ ᠲᠠᠰᠣᠯᠣᠯᠳᠠ ᠪᠠᠷ᠂ ᠵᠠᠭᠠᠯᠳᠣᠭᠳᠠᠭᠴᠢ ᠡᠷᠬᠢᠮᠲᠦ ᠵᠢ ᠬᠦᠴᠦᠷᠭᠡᠭᠯᠡᠨ᠂ > > ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠡᠯᠡ ᠪᠡᠷ ᠭᠣᠷᠪᠠᠨ ᠵᠢᠯ ᠦᠨ ᠬᠣᠭᠣᠴᠠᠭᠠ ᠲᠠᠢ ᠬᠣᠷᠢᠬᠣ ᠡᠷᠡᠭᠦᠦ ᠪᠡᠷ > > ᠰᠢᠳᠬᠡᠭᠰᠡᠨ ᠪᠠᠢᠨᠠ᠃ > > \stopvertical > > > > \page > > > > \startvertical[height=.75\textheight] > > \MyFont > > \setupalign[flushleft] > > \setupinterlinespace[40pt]% > > ᠣᠢᠷᠠ ᠵᠢᠨ ᠡᠳᠦᠷ᠂ ᠦᠪᠦᠷ ᠮᠣᠩᠭᠣᠯ ᠦᠨ ᠰᠢᠯᠢ ᠵᠢᠨ ᠭᠣᠣᠯ ᠠᠢᠮᠠᠭ ᠦᠨ ᠰᠢᠯᠣᠭᠣᠨ ᠬᠦᠬᠡ > > ᠬᠣᠰᠢᠭᠣᠨ ᠦ ᠰᠢᠭᠦᠬᠦ ᠬᠣᠷᠢᠶᠠ ᠨᠢᠭᠡᠨ ᠬᠦᠴᠦᠷᠬᠡᠭᠯᠡᠨ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠠᠯᠠᠲᠣ ᠬᠡᠷᠡᠭ ᠲᠦ > > ᠰᠢᠭᠦᠯᠲᠡ ᠬᠢᠪᠡ᠃ ᠰᠢᠭᠦᠨ ᠲᠠᠰᠣᠯᠣᠯᠳᠠ ᠪᠠᠷ᠂ ᠵᠠᠭᠠᠯᠳᠣᠭᠳᠠᠭᠴᠢ ᠡᠷᠬᠢᠮᠲᠦ ᠵᠢ ᠬᠦᠴᠦᠷᠭᠡᠭᠯᠡᠨ᠂ > > ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠡᠯᠡ ᠪᠡᠷ ᠭᠣᠷᠪᠠᠨ ᠵᠢᠯ ᠦᠨ ᠬᠣᠭᠣᠴᠠᠭᠠ ᠲᠠᠢ ᠬᠣᠷᠢᠬᠣ ᠡᠷᠡᠭᠦᠦ ᠪᠡᠷ > > ᠰᠢᠳᠬᠡᠭᠰᠡᠨ ᠪᠠᠢᠨᠠ᠃ > > \stopvertical > > > > \stoptext > > > > But it's kind of a quick hack interface. We can have alignment, > > interlinespace etc parameters to. Maybe definable verticals and so. > > > > Hans > > > > ps. for chinese one would probably kick in an extra feature > > > > % \definefontfeature > > % [vertical] > > % [vertical={% > > % orientation=3,% > > % down=.1,% > > % right=.1,% > > % ranges={% > > % cjkcompatibility,% > > % cjkcompatibilityforms,% > > % cjkcompatibilityideographs,% > > %
Re: [NTG-context] About vertical typesetting in ConTeXt
On 8/4/2020 10:32 AM, Jairo A. del Rio wrote: http://www.mongolfont.com/en/font/mnglwhiteotf.html hm, only for testing, not for use I can rotate boxes in ConTeXt using other methods than those used in LaTeX. However, my main concern is about "translating" the Lua(La)TeX piece to be used in ConTeXt. I've read about "finalizers" in the CLD manual and somewhere online, but I don't know how to access to node.subtype("pdf_literal"). I'll be happy to know about a better solution if ConTeXt offers it so it is accessible to other users. Thank you in advance. The problem (or challenge) as usual is not in the coding but in what is a reasonable user interface. So, what are the use cases. Her eis one solution: \protected\def\startvertical {\dosingleempty\dostartvertical} \def\dostartvertical[#1]% {\begingroup \getdummyparameters[width=\textwidth,height=\textheight,#1]% \vbox orientation 1 \doifelsedimension{\dummyparameter{width}}{to \dummyparameter{width}}{}% \bgroup \doifelsedimension{\dummyparameter{height}}{\hsize \dummyparameter{height}}{}} \protected\def\stopvertical {\vfill \egroup \endgroup} % test \starttext \definefont [MyFont] [file:mnglwhiteotf.ttf*default,mongolian @ 24pt] \showframe \startvertical \MyFont \setupalign[stretch,tolerant,stretch] \setupinterlinespace[40pt]% ᠣᠢᠷᠠ ᠵᠢᠨ ᠡᠳᠦᠷ᠂ ᠦᠪᠦᠷ ᠮᠣᠩᠭᠣᠯ ᠦᠨ ᠰᠢᠯᠢ ᠵᠢᠨ ᠭᠣᠣᠯ ᠠᠢᠮᠠᠭ ᠦᠨ ᠰᠢᠯᠣᠭᠣᠨ ᠬᠦᠬᠡ ᠬᠣᠰᠢᠭᠣᠨ ᠦ ᠰᠢᠭᠦᠬᠦ ᠬᠣᠷᠢᠶᠠ ᠨᠢᠭᠡᠨ ᠬᠦᠴᠦᠷᠬᠡᠭᠯᠡᠨ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠠᠯᠠᠲᠣ ᠬᠡᠷᠡᠭ ᠲᠦ ᠰᠢᠭᠦᠯᠲᠡ ᠬᠢᠪᠡ᠃ ᠰᠢᠭᠦᠨ ᠲᠠᠰᠣᠯᠣᠯᠳᠠ ᠪᠠᠷ᠂ ᠵᠠᠭᠠᠯᠳᠣᠭᠳᠠᠭᠴᠢ ᠡᠷᠬᠢᠮᠲᠦ ᠵᠢ ᠬᠦᠴᠦᠷᠭᠡᠭᠯᠡᠨ᠂ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠡᠯᠡ ᠪᠡᠷ ᠭᠣᠷᠪᠠᠨ ᠵᠢᠯ ᠦᠨ ᠬᠣᠭᠣᠴᠠᠭᠠ ᠲᠠᠢ ᠬᠣᠷᠢᠬᠣ ᠡᠷᠡᠭᠦᠦ ᠪᠡᠷ ᠰᠢᠳᠬᠡᠭᠰᠡᠨ ᠪᠠᠢᠨᠠ᠃ \stopvertical \page \startvertical[height=.75\textheight] \MyFont \setupalign[flushleft] \setupinterlinespace[40pt]% ᠣᠢᠷᠠ ᠵᠢᠨ ᠡᠳᠦᠷ᠂ ᠦᠪᠦᠷ ᠮᠣᠩᠭᠣᠯ ᠦᠨ ᠰᠢᠯᠢ ᠵᠢᠨ ᠭᠣᠣᠯ ᠠᠢᠮᠠᠭ ᠦᠨ ᠰᠢᠯᠣᠭᠣᠨ ᠬᠦᠬᠡ ᠬᠣᠰᠢᠭᠣᠨ ᠦ ᠰᠢᠭᠦᠬᠦ ᠬᠣᠷᠢᠶᠠ ᠨᠢᠭᠡᠨ ᠬᠦᠴᠦᠷᠬᠡᠭᠯᠡᠨ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠠᠯᠠᠲᠣ ᠬᠡᠷᠡᠭ ᠲᠦ ᠰᠢᠭᠦᠯᠲᠡ ᠬᠢᠪᠡ᠃ ᠰᠢᠭᠦᠨ ᠲᠠᠰᠣᠯᠣᠯᠳᠠ ᠪᠠᠷ᠂ ᠵᠠᠭᠠᠯᠳᠣᠭᠳᠠᠭᠴᠢ ᠡᠷᠬᠢᠮᠲᠦ ᠵᠢ ᠬᠦᠴᠦᠷᠭᠡᠭᠯᠡᠨ᠂ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠡᠯᠡ ᠪᠡᠷ ᠭᠣᠷᠪᠠᠨ ᠵᠢᠯ ᠦᠨ ᠬᠣᠭᠣᠴᠠᠭᠠ ᠲᠠᠢ ᠬᠣᠷᠢᠬᠣ ᠡᠷᠡᠭᠦᠦ ᠪᠡᠷ ᠰᠢᠳᠬᠡᠭᠰᠡᠨ ᠪᠠᠢᠨᠠ᠃ \stopvertical \stoptext But it's kind of a quick hack interface. We can have alignment, interlinespace etc parameters to. Maybe definable verticals and so. Hans ps. for chinese one would probably kick in an extra feature % \definefontfeature % [vertical] % [vertical={% % orientation=3,% % down=.1,% % right=.1,% % ranges={% % cjkcompatibility,% % cjkcompatibilityforms,% % cjkcompatibilityideographs,% % cjkcompatibilityideographssupplement,% % cjkradicalssupplement,% % % cjkstrokes,% % cjksymbolsandpunctuation,% % cjkunifiedideographs,% % cjkunifiedideographsextensiona,% % cjkunifiedideographsextensionb,% % cjkunifiedideographsextensionc,% % cjkunifiedideographsextensiond,% % cjkunifiedideographsextensione,% % cjkunifiedideographsextensionf,% % }% % }] and maybe some extreme hz would work out well too. - 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] About vertical typesetting in ConTeXt
Hi, list. I've found a (sort of) way to do LTL typesetting in Lua(La)TeX based on "chickenize", a LuaTeX package. The font used is available here; http://www.mongolfont.com/en/font/mnglwhiteotf.html %Just for testing in LaTeX \documentclass{article} \usepackage{luacode} \usepackage{fontspec} \setmainfont{Mongolian White}[Renderer=Harfbuzz,Script=Mongolian] \begin{luacode*} -- How do I do this in ConTeXt? userdata = userdata or {} userdata.mongolian = function(head) --Ugly hackish line rotation rot = node.new(node.id("whatsit"),node.subtype("pdf_literal")) rot2 = node.new(node.id("whatsit"),node.subtype("pdf_literal")) for line in node.traverse_id(0,head) do w = line.width/65536*0.99625 rot.data = "-1 0 0 -1 "..w.." 0 cm" rot2.data = "-1 0 0 -1 "..-w.." 0 cm" line.head = node.insert_before(line.head,line.head,node.copy(rot)) node.insert_after(line.head,node.tail(line.head),node.copy(rot2)) end return head end \end{luacode*} \def\startmongolian{\directlua{luatexbase.add_to_callback("post_linebreak_filter", userdata.mongolian, "mongolian")}} \def\stopmongolian{% \par\directlua{luatexbase.remove_from_callback("post_linebreak_filter", "mongolian")}% } \usepackage{graphicx} \begin{document} \rotatebox{90}{% \parbox{8cm}{% \startmongolian \begin{flushleft} ᠣᠢᠷᠠ ᠵᠢᠨ ᠡᠳᠦᠷ᠂ ᠦᠪᠦᠷ ᠮᠣᠩᠭᠣᠯ ᠦᠨ ᠰᠢᠯᠢ ᠵᠢᠨ ᠭᠣᠣᠯ ᠠᠢᠮᠠᠭ ᠦᠨ ᠰᠢᠯᠣᠭᠣᠨ ᠬᠦᠬᠡ ᠬᠣᠰᠢᠭᠣᠨ ᠦ ᠰᠢᠭᠦᠬᠦ ᠬᠣᠷᠢᠶᠠ ᠨᠢᠭᠡᠨ ᠬᠦᠴᠦᠷᠬᠡᠭᠯᠡᠨ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠠᠯᠠᠲᠣ ᠬᠡᠷᠡᠭ ᠲᠦ ᠰᠢᠭᠦᠯᠲᠡ ᠬᠢᠪᠡ᠃ ᠰᠢᠭᠦᠨ ᠲᠠᠰᠣᠯᠣᠯᠳᠠ ᠪᠠᠷ᠂ ᠵᠠᠭᠠᠯᠳᠣᠭᠳᠠᠭᠴᠢ ᠡᠷᠬᠢᠮᠲᠦ ᠵᠢ ᠬᠦᠴᠦᠷᠭᠡᠭᠯᠡᠨ᠂ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠡᠯᠡ ᠪᠡᠷ ᠭᠣᠷᠪᠠᠨ ᠵᠢᠯ ᠦᠨ ᠬᠣᠭᠣᠴᠠᠭᠠ ᠲᠠᠢ ᠬᠣᠷᠢᠬᠣ ᠡᠷᠡᠭᠦᠦ ᠪᠡᠷ ᠰᠢᠳᠬᠡᠭᠰᠡᠨ ᠪᠠᠢᠨᠠ᠃ \end{flushleft} \stopmongolian } } \end{document} I can rotate boxes in ConTeXt using other methods than those used in LaTeX. However, my main concern is about "translating" the Lua(La)TeX piece to be used in ConTeXt. I've read about "finalizers" in the CLD manual and somewhere online, but I don't know how to access to node.subtype("pdf_literal"). I'll be happy to know about a better solution if ConTeXt offers it so it is accessible to other users. Thank you in advance. Regards, Jairo El mié., 10 de jun. de 2020 a la(s) 03:11, Jairo A. del Rio ( jairoadelr...@gmail.com) escribió: > I totally ignored this document until now. As it looks really promising > (to me), I'll make some attempts first. In my almost-one-year experience > with ConTeXt, a manual or a discussion in the list usually foreshadows a > solution. ConTeXt never ceases to amaze me with its tricks and quirks. > Thank you very much, Hans. > > Jairo :) > > El mié., 10 de jun. de 2020 a la(s) 02:30, Hans Hagen (j.ha...@xs4all.nl) > escribió: > >> On 6/10/2020 7:49 AM, Jairo A. del Rio wrote: >> > Hi list! I'm curious about vertical typesetting in ConTeXt. As far as I >> > know, LuaTeX supports four text directions, but LTL is broken for >> Manchu >> > script (letters are displayed unjoined in LTL mode) and LuaMetaTeX does >> > not support vertical directions anymore, at least as primitives. >> > >> > I found the following solution: >> > >> > https://tex.stackexchange.com/a/140972/193767 >> > I reproduce the code (in XeLaTeX), just in case >> > >> > |% !TEX TS-program = >> > >> xelatex\documentclass{scrartcl}\usepackage{fontspec}\newfontfamily{\dcw}[]{DaicingWhite}%\begin{document}\noindentLine >> >> > above\\% to demonstrate that the lines are being stacked as >> > normal\rotatebox{-90}{%\XeTeXupwardsmode1\\% successive lines will be >> > stacked upwards instead of downwards\begin{minipage}{4em}% this will be >> > the vertical length of the Mongolian section{\dcw% Font: Daicing White1 >> > ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ\\% direct Unicode input of Manchu letters2 ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ }% >> > End font\end{minipage}\XeTeXupwardsmode0 }% End rotatebox\noindentLine >> > underneath \end{document}| >> > >> > >> > and I see XeTeX uses the primitive |\XeTeXupwardsmodeand some other >> > tricks to get the proper display of Manchu text, so maybe MKII can do >> > the magic using XeTeX as an engine. How would one use ConTeXt MKIV for >> > this task? Is it possible to emulate \XeTeXupwardsmode in ConTeXt as a >> > first step? Thank you very much. >> I admit that I have no clue about what xetex does in that departmentbut >> you're right that in lmtx the vertical directions are not supported. The >> main reason is that it didn't really integrates well in the way pages >> are constructed. >> >> Vertical typesetting (afaiks) involves two things: one character wide >> columns and rotated glyphs. The first can be handled by the macro >> package and the second by a combination of engine and macro package. >> >> Already for quite a while there are the basics for a more advanced >> vertical subsystem but it's typically one of these things that I explore >> and then set aside till some users show up who need it and are willing >> to spend time on discussing and testing intertfaces. After all, most of >> this tex stuff is kind of a hobby and it's easy to find new interesting >> experiments. >> >> Anyway, you can get some ideas in chapter 6 of: >> >>
Re: [NTG-context] About vertical typesetting in ConTeXt
On 6/10/2020 7:49 AM, Jairo A. del Rio wrote: Hi list! I'm curious about vertical typesetting in ConTeXt. As far as I know, LuaTeX supports four text directions, but LTL is broken for Manchu script (letters are displayed unjoined in LTL mode) and LuaMetaTeX does not support vertical directions anymore, at least as primitives. I found the following solution: https://tex.stackexchange.com/a/140972/193767 I reproduce the code (in XeLaTeX), just in case |% !TEX TS-program = xelatex\documentclass{scrartcl}\usepackage{fontspec}\newfontfamily{\dcw}[]{DaicingWhite}%\begin{document}\noindentLine above\\% to demonstrate that the lines are being stacked as normal\rotatebox{-90}{%\XeTeXupwardsmode1\\% successive lines will be stacked upwards instead of downwards\begin{minipage}{4em}% this will be the vertical length of the Mongolian section{\dcw% Font: Daicing White1 ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ\\% direct Unicode input of Manchu letters2 ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ }% End font\end{minipage}\XeTeXupwardsmode0 }% End rotatebox\noindentLine underneath \end{document}| and I see XeTeX uses the primitive |\XeTeXupwardsmodeand some other tricks to get the proper display of Manchu text, so maybe MKII can do the magic using XeTeX as an engine. How would one use ConTeXt MKIV for this task? Is it possible to emulate \XeTeXupwardsmode in ConTeXt as a first step? Thank you very much. I admit that I have no clue about what xetex does in that departmentbut you're right that in lmtx the vertical directions are not supported. The main reason is that it didn't really integrates well in the way pages are constructed. Vertical typesetting (afaiks) involves two things: one character wide columns and rotated glyphs. The first can be handled by the macro package and the second by a combination of engine and macro package. Already for quite a while there are the basics for a more advanced vertical subsystem but it's typically one of these things that I explore and then set aside till some users show up who need it and are willing to spend time on discussing and testing intertfaces. After all, most of this tex stuff is kind of a hobby and it's easy to find new interesting experiments. Anyway, you can get some ideas in chapter 6 of: http://www.pragma-ade.com/general/manuals/followingup.pdf but as said, probably no one ever read that. The question isnot so much if it can be done, but how to integrate it. (There's more stuff waiting for being used but we leave that for users to run into and demand support for.) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] About vertical typesetting in ConTeXt
Hi list! I'm curious about vertical typesetting in ConTeXt. As far as I know, LuaTeX supports four text directions, but LTL is broken for Manchu script (letters are displayed unjoined in LTL mode) and LuaMetaTeX does not support vertical directions anymore, at least as primitives. I found the following solution: https://tex.stackexchange.com/a/140972/193767 I reproduce the code (in XeLaTeX), just in case % !TEX TS-program = xelatex\documentclass{scrartcl}\usepackage{fontspec}\newfontfamily{\dcw}[]{DaicingWhite}%\begin{document}\noindent Line above\\% to demonstrate that the lines are being stacked as normal\rotatebox{-90}{%\XeTeXupwardsmode1\\% successive lines will be stacked upwards instead of downwards\begin{minipage}{4em}% this will be the vertical length of the Mongolian section{\dcw% Font: Daicing White 1 ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ\\% direct Unicode input of Manchu letters 2 ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ}% End font\end{minipage}\XeTeXupwardsmode0}% End rotatebox \noindent Line underneath\end{document} and I see XeTeX uses the primitive \XeTeXupwardsmode and some other tricks to get the proper display of Manchu text, so maybe MKII can do the magic using XeTeX as an engine. How would one use ConTeXt MKIV for this task? Is it possible to emulate \XeTeXupwardsmode in ConTeXt as a first step? Thank you very much. Jairo :D ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___