* Allow for hyphenation in 'firstline' ConTeXt feature ?
@ 2016-05-29 9:40 josephcanedo
2016-05-29 15:18 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: josephcanedo @ 2016-05-29 9:40 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 1285 bytes --]
Dear all,
I use the nifty ‘firstline’ feature ConTeXt offers (using a larger font size, line mode, 1 line only) and I notice that the last word of the first line is never hyphenated even if doing so could reduce underful in the first line. From typo-fln.lua it looks like that’s expected as the decision to break the first line happens only at nodes which are not glyphs, disc_nodes or kern nodes. There is a comment saying it could be added some option to handle disc nodes. I’d be happy to add such option but do not have enough knowledge in nodes manipulation in luatex, especially those related to hyphenation. Would it be very difficult to add such option please ?
I post a MWE showing some extreme non real non sensible case, to double check that hyphenation is never performed.
\definefirstline[FirstLine][alternative=line, style=\tfd] % exegerate size
\starttext
% exagerated case as MWE
\setfirstline[FirstLine] A few words larger largestwordwordlongwordthatcouldbehyphenated bar bar.
A few words larger largest word word foo bar word bar bar. A few words larger largest
word word foo bar word bar bar. A few words larger largest word word foo bar word bar bar.
\stoptext
Thanks a lot,
Best regards
Joseph Canedo
[-- Attachment #1.2: Type: text/html, Size: 2523 bytes --]
[-- Attachment #2: test_firstline.pdf --]
[-- Type: application/pdf, Size: 9718 bytes --]
[-- Attachment #3: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Allow for hyphenation in 'firstline' ConTeXt feature ?
2016-05-29 9:40 Allow for hyphenation in 'firstline' ConTeXt feature ? josephcanedo
@ 2016-05-29 15:18 ` Hans Hagen
2016-05-29 20:56 ` josephcanedo
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2016-05-29 15:18 UTC (permalink / raw)
To: ntg-context
On 5/29/2016 11:40 AM, josephcanedo@gmail.com wrote:
> Dear all,
>
> I use the nifty ‘firstline’ feature ConTeXt offers (using a larger font
> size, line mode, 1 line only) and I notice that the last word of the
> first line is never hyphenated even if doing so could reduce underful in
> the first line. From typo-fln.lua it looks like that’s expected as the
> decision to break the first line happens only at nodes which are not
> glyphs, disc_nodes or kern nodes. There is a comment saying it could be
> added some option to handle disc nodes. I’d be happy to add such option
> but do not have enough knowledge in nodes manipulation in luatex,
> especially those related to hyphenation. Would it be very difficult to
> add such option please ?
depends on what one finds 'difficult' ... by now i can probably do most
i want at that level in which difficult is replace by 'just takes time';
also, one needs to keep in mind that trickery like this also needs to
cooperate with other mechanisms
i'll send you a file to test (no beta as i'm cleaning up some display math)
> I post a MWE showing some extreme non real non sensible case, to double
> check that hyphenation is never performed.
>
> \definefirstline[FirstLine][alternative=line, style=\tfd] % exegerate size
>
> \starttext
>
> % exagerated case as MWE
>
> \setfirstline[FirstLine] A few words larger
> largestwordwordlongwordthatcouldbehyphenated bar bar.
> A few words larger largest word word foo bar word bar bar. A few words
> larger largest
> word word foo bar word bar bar. A few words larger largest word word foo
> bar word bar bar.
>
> \stoptext
>
> Thanks a lot,
>
> Best regards
>
> Joseph Canedo
>
>
>
> ___________________________________________________________________________________
> 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://tex.aanhet.net
> archive : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
>
--
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Allow for hyphenation in 'firstline' ConTeXt feature ?
2016-05-29 15:18 ` Hans Hagen
@ 2016-05-29 20:56 ` josephcanedo
0 siblings, 0 replies; 3+ messages in thread
From: josephcanedo @ 2016-05-29 20:56 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 3454 bytes --]
Yes, I probably should have written ‘Would it be time consuming etc… ?’ :-)
In any case, I had a try to the test file, and it works very well.
Thanks for your very swift reply.
Best regards
Joseph Canedo
From: pragma@wxs.nl
Sent: Sunday, May 29, 2016 5:18 PM
To: ntg-context@ntg.nl
On 5/29/2016 11:40 AM, josephcanedo@gmail.com wrote:
> Dear all,
>
> I use the nifty ‘firstline’ feature ConTeXt offers (using a larger font
> size, line mode, 1 line only) and I notice that the last word of the
> first line is never hyphenated even if doing so could reduce underful in
> the first line. From typo-fln.lua it looks like that’s expected as the
> decision to break the first line happens only at nodes which are not
> glyphs, disc_nodes or kern nodes. There is a comment saying it could be
> added some option to handle disc nodes. I’d be happy to add such option
> but do not have enough knowledge in nodes manipulation in luatex,
> especially those related to hyphenation. Would it be very difficult to
> add such option please ?
depends on what one finds 'difficult' ... by now i can probably do most
i want at that level in which difficult is replace by 'just takes time';
also, one needs to keep in mind that trickery like this also needs to
cooperate with other mechanisms
i'll send you a file to test (no beta as i'm cleaning up some display math)
> I post a MWE showing some extreme non real non sensible case, to double
> check that hyphenation is never performed.
>
> \definefirstline[FirstLine][alternative=line, style=\tfd] % exegerate size
>
> \starttext
>
> % exagerated case as MWE
>
> \setfirstline[FirstLine] A few words larger
> largestwordwordlongwordthatcouldbehyphenated bar bar.
> A few words larger largest word word foo bar word bar bar. A few words
> larger largest
> word word foo bar word bar bar. A few words larger largest word word foo
> bar word bar bar.
>
> \stoptext
>
> Thanks a lot,
>
> Best regards
>
> Joseph Canedo
>
>
>
> ___________________________________________________________________________________
> 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://tex.aanhet.net
> archive : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
>
--
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 6037 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-29 20:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-29 9:40 Allow for hyphenation in 'firstline' ConTeXt feature ? josephcanedo
2016-05-29 15:18 ` Hans Hagen
2016-05-29 20:56 ` josephcanedo
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).