* About vertical typesetting in ConTeXt
@ 2020-06-10 5:49 Jairo A. del Rio
2020-06-10 7:30 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Jairo A. del Rio @ 2020-06-10 5:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1388 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 4226 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: About vertical typesetting in ConTeXt
2020-06-10 5:49 About vertical typesetting in ConTeXt Jairo A. del Rio
@ 2020-06-10 7:30 ` Hans Hagen
[not found] ` <CAKyqqaaqEL8J73Hogii91xB4E69xn_ibyEWj4ANzL_EVYtpZMg@mail.gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2020-06-10 7:30 UTC (permalink / raw)
To: mailing list for ConTeXt users, Jairo A. del Rio
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: About vertical typesetting in ConTeXt
[not found] ` <CAKyqqaaqEL8J73Hogii91xB4E69xn_ibyEWj4ANzL_EVYtpZMg@mail.gmail.com>
@ 2020-08-04 8:32 ` Jairo A. del Rio
2020-08-04 12:42 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Jairo A. del Rio @ 2020-08-04 8:32 UTC (permalink / raw)
To: Hans Hagen, mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 6378 bytes --]
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 (
jairoadelrio6@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.hagen@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:
>>
>> 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
>> -----------------------------------------------------------------
>>
>
[-- Attachment #1.2: Type: text/html, Size: 8008 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: About vertical typesetting in ConTeXt
2020-08-04 8:32 ` Jairo A. del Rio
@ 2020-08-04 12:42 ` Hans Hagen
[not found] ` <b8495842-1b1d-7e1f-71cd-a6df97c1d54d@xs4all.nl>
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2020-08-04 12:42 UTC (permalink / raw)
To: Jairo A. del Rio, mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: About vertical typesetting in ConTeXt
[not found] ` <b8495842-1b1d-7e1f-71cd-a6df97c1d54d@xs4all.nl>
@ 2020-08-04 13:32 ` Jairo A. del Rio
0 siblings, 0 replies; 5+ messages in thread
From: Jairo A. del Rio @ 2020-08-04 13:32 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 9075 bytes --]
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.hagen@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,%
> > % 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
> >
> ___________________________________________________________________________________
>
> >
>
>
> --
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>
[-- Attachment #1.2: Type: text/html, Size: 11463 bytes --]
[-- Attachment #2: is.pdf --]
[-- Type: application/pdf, Size: 11191 bytes --]
[-- Attachment #3: shouldbe.pdf --]
[-- Type: application/pdf, Size: 11336 bytes --]
[-- Attachment #4: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-08-04 13:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 5:49 About vertical typesetting in ConTeXt Jairo A. del Rio
2020-06-10 7:30 ` Hans Hagen
[not found] ` <CAKyqqaaqEL8J73Hogii91xB4E69xn_ibyEWj4ANzL_EVYtpZMg@mail.gmail.com>
2020-08-04 8:32 ` Jairo A. del Rio
2020-08-04 12:42 ` Hans Hagen
[not found] ` <b8495842-1b1d-7e1f-71cd-a6df97c1d54d@xs4all.nl>
2020-08-04 13:32 ` Jairo A. del Rio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).