* Negative width vrule ignored in LuaMETATeX
@ 2020-04-24 14:42 SAO Ocean
2020-04-24 14:48 ` Wolfgang Schuster
2020-04-24 15:37 ` Hans Hagen
0 siblings, 2 replies; 4+ messages in thread
From: SAO Ocean @ 2020-04-24 14:42 UTC (permalink / raw)
To: ntg-context
Hi,
As I'm beginning to use ConTeXt LMTX, I experimented with it a little and
noticed some of my old documents different. After some examination I found the
following example:
\starttext
a\vrule width -5pt height 0pt depth 0pt b
\stoptext
In LMTX, the result looks as if there is no `\vrule' between `a' and `b'. And if
I run with `context --engine=luatex', the expected result is back. I have
checked the luametatex manual but it doesn't seem to mention the difference. My
luametatex version is
mkiv lua stats > used engine: luametatex version: 2.0502,
functionality level: 20200413, format id: 493, compiler: clang.
Is the behaviour expected? Or shall I use other method to get non-discardable
negative space?
Ao Shen
___________________________________________________________________________________
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] 4+ messages in thread
* Re: Negative width vrule ignored in LuaMETATeX
2020-04-24 14:42 Negative width vrule ignored in LuaMETATeX SAO Ocean
@ 2020-04-24 14:48 ` Wolfgang Schuster
2020-04-24 15:37 ` Hans Hagen
1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2020-04-24 14:48 UTC (permalink / raw)
To: mailing list for ConTeXt users, SAO Ocean
SAO Ocean schrieb am 24.04.2020 um 16:42:
> Hi,
>
> As I'm beginning to use ConTeXt LMTX, I experimented with it a little and
> noticed some of my old documents different. After some examination I found the
> following example:
>
> \starttext
> a\vrule width -5pt height 0pt depth 0pt b
> \stoptext
>
> In LMTX, the result looks as if there is no `\vrule' between `a' and `b'. And if
> I run with `context --engine=luatex', the expected result is back. I have
> checked the luametatex manual but it doesn't seem to mention the difference. My
> luametatex version is
>
> mkiv lua stats > used engine: luametatex version: 2.0502,
> functionality level: 20200413, format id: 493, compiler: clang.
>
> Is the behaviour expected? Or shall I use other method to get non-discardable
> negative space?
\starttext
a\kern-5pt\relax b
\stoptext
or
\starttext
a\nobreak\hskip-5pt\relax b
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Negative width vrule ignored in LuaMETATeX
2020-04-24 14:42 Negative width vrule ignored in LuaMETATeX SAO Ocean
2020-04-24 14:48 ` Wolfgang Schuster
@ 2020-04-24 15:37 ` Hans Hagen
[not found] ` <CAOyvy4=YxV-1Nh4Ot78Kym8EY8dQYio71qRu2h3=Xyj3jTMcBg@mail.gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2020-04-24 15:37 UTC (permalink / raw)
To: mailing list for ConTeXt users, SAO Ocean
On 4/24/2020 4:42 PM, SAO Ocean wrote:
> Hi,
>
> As I'm beginning to use ConTeXt LMTX, I experimented with it a little and
> noticed some of my old documents different. After some examination I found the
> following example:
>
> \starttext
> a\vrule width -5pt height 0pt depth 0pt b
> \stoptext
>
> In LMTX, the result looks as if there is no `\vrule' between `a' and `b'. And if
> I run with `context --engine=luatex', the expected result is back. I have
> checked the luametatex manual but it doesn't seem to mention the difference. My
> luametatex version is
>
> mkiv lua stats > used engine: luametatex version: 2.0502,
> functionality level: 20200413, format id: 493, compiler: clang.
>
> Is the behaviour expected? Or shall I use other method to get non-discardable
> negative space?
no, but i must admit that it's kind of a border case ... i'll fix it but
also wonder if *no* visual rule showing up is intended (i would then
also expect an engine to show a rule .. could be an interesting new
(luametatex) option as it saves kerns in some cases)
see Wolfgangs mail for a better solution using kerns
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] 4+ messages in thread
* Re: Negative width vrule ignored in LuaMETATeX
[not found] ` <CAOyvy4=YxV-1Nh4Ot78Kym8EY8dQYio71qRu2h3=Xyj3jTMcBg@mail.gmail.com>
@ 2020-04-24 18:11 ` Hans Hagen
0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2020-04-24 18:11 UTC (permalink / raw)
To: Ao Shen, mailing list for ConTeXt users
On 4/24/2020 7:44 PM, Ao Shen wrote:
> Thanks for your timely reply!
>
> Hans Hagen <j.hagen@xs4all.nl> 于2020年4月24日周五 下午11:38写道:
>>
>> no, but i must admit that it's kind of a border case ... i'll fix it but
>> also wonder if *no* visual rule showing up is intended (i would then
>> also expect an engine to show a rule .. could be an interesting new
>> (luametatex) option as it saves kerns in some cases)
>
> My use cases of negative vrule is a little tricky. I'm trying to comply with
> W3C's [Requirements for Japanese Text Layout](https://www.w3.org/TR/jlreq/).
> It states that
>
> In principle, closing brackets (cl-02), commas (cl-07) or full stops (cl-06)
> at the line end have a half em space after them (see Fig. 3.20). This half em
> space can be deleted for line adjustment. However, the possibilities are only
> half em space or solid. Other spaces, such as a quarter em space should not be
> used.
>
> The tricky part is that I also want the opening fullwidth bracket at the
> beginning of the line to be solid, i.e., without half em sidebearing on the left
> to make the left margin visually more aligned (this is one but not the only way
> of line begining handling shown in jlreq).
>
> To achieve this, in the scripts handler I use the following injector between
> 'full_width_close' and 'full_width_open':
>
> \hskip -0.5em \penalty 100 \hskip 0.5em minus 0.5em \vrule width
> -0.5em height 0pt
> ^^^(a) ^^^(b)
>
> If line is broken here, the only broken points are (a) before the glue or (b) at
> the penalty point. With the vrule the sidebearing of the opening bracket at
> beginning of next line is eliminated.
>
> In this particular case, a kern is not applicable because it won't survive the
> line break. And here a vrule showing nothing is intended.
How about something ...
\startluacode
local classes = fonts.protrusions.classes
local vectors = fonts.protrusions.vectors
classes.myown = {
vector = 'myown',
factor = 1,
}
vectors.myown = table.merged (vectors.quality, {
[0x0028] = { 1, 0 }, -- (
[0x0029] = { 0, 1 }, -- )
})
\stopluacode
\starttext
\showframe
\definefontfeature[whatever][default][protrusion=myown]
\definedfont[Serif*whatever] \setupalign[hanging]
\dorecurse{100}{(#1) }
\stoptext
of course you need to define the cjk fences etc.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 4+ messages in thread
end of thread, other threads:[~2020-04-24 18:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 14:42 Negative width vrule ignored in LuaMETATeX SAO Ocean
2020-04-24 14:48 ` Wolfgang Schuster
2020-04-24 15:37 ` Hans Hagen
[not found] ` <CAOyvy4=YxV-1Nh4Ot78Kym8EY8dQYio71qRu2h3=Xyj3jTMcBg@mail.gmail.com>
2020-04-24 18:11 ` Hans Hagen
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).