* underscore hyphenation in LMTX
@ 2019-04-27 11:51 Pablo Rodriguez
2019-04-29 8:57 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2019-04-27 11:51 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dear list,
I have the following sample:
\startluacode
function document.addfunnyhyphen(tfmdata)
local underscore = utf.byte("_")
local char = tfmdata.characters[underscore]
tfmdata.characters[0xFE000] = {
width = 0,
height = 0,
depth = 0,
commands = {
{ "right", -char.width },
{ "down", char.depth },
{ "slot", 1, underscore },
}
}
end
utilities.sequencers.appendaction("aftercopyingcharacters","after",
"document.addfunnyhyphen")
\stopluacode
\definehyphenationfeatures
[whatever]
[righthyphenchar="FE000]
\setuphyphenation[method=traditional]
\sethyphenationfeatures[strict, whatever]
\setuppapersize[A10, lanscape]
\starttext
\startmakeup[standard]
\hsize\zeropoint
\tt definebodyfont
\stopmakeup
\stoptext
I get the underscore hyphenation with latest ConTeXt beta (LuaTeX-1.10),
but not with latest LMTX (LuaTeX-2.0).
Am I missing something here?
Many thanks for your help,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 3+ messages in thread
* Re: underscore hyphenation in LMTX
2019-04-27 11:51 underscore hyphenation in LMTX Pablo Rodriguez
@ 2019-04-29 8:57 ` Hans Hagen
2019-05-01 11:22 ` Pablo Rodriguez
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2019-04-29 8:57 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 4/27/2019 1:51 PM, Pablo Rodriguez wrote:
> Dear list,
>
> I have the following sample:
>
> \startluacode
> function document.addfunnyhyphen(tfmdata)
> local underscore = utf.byte("_")
> local char = tfmdata.characters[underscore]
> tfmdata.characters[0xFE000] = {
> width = 0,
> height = 0,
> depth = 0,
> commands = {
> { "right", -char.width },
> { "down", char.depth },
> { "slot", 1, underscore },
> }
> }
> end
>
> utilities.sequencers.appendaction("aftercopyingcharacters","after",
> "document.addfunnyhyphen")
> \stopluacode
>
> \definehyphenationfeatures
> [whatever]
> [righthyphenchar="FE000]
>
> \setuphyphenation[method=traditional]
> \sethyphenationfeatures[strict, whatever]
>
> \setuppapersize[A10, lanscape]
>
> \starttext
> \startmakeup[standard]
> \hsize\zeropoint
> \tt definebodyfont
> \stopmakeup
> \stoptext
>
> I get the underscore hyphenation with latest ConTeXt beta (LuaTeX-1.10),
> but not with latest LMTX (LuaTeX-2.0).
>
> Am I missing something here?
use slot '0' instead of '1' (i'll catch it anyway)
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] 3+ messages in thread
* Re: underscore hyphenation in LMTX
2019-04-29 8:57 ` Hans Hagen
@ 2019-05-01 11:22 ` Pablo Rodriguez
0 siblings, 0 replies; 3+ messages in thread
From: Pablo Rodriguez @ 2019-05-01 11:22 UTC (permalink / raw)
To: ntg-context
On 4/29/19 10:57 AM, Hans Hagen wrote:
> On 4/27/2019 1:51 PM, Pablo Rodriguez wrote:
>> [...]
>> I get the underscore hyphenation with latest ConTeXt beta (LuaTeX-1.10),
>> but not with latest LMTX (LuaTeX-2.0).
>>
>> Am I missing something here?
>
> use slot '0' instead of '1' (i'll catch it anyway)
Hans,
many thanks for the trick and the improved code.
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 3+ messages in thread
end of thread, other threads:[~2019-05-01 11:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-27 11:51 underscore hyphenation in LMTX Pablo Rodriguez
2019-04-29 8:57 ` Hans Hagen
2019-05-01 11:22 ` Pablo Rodriguez
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).