ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: <josephcanedo@gmail.com>
To: "ntg-context@ntg.nl" <ntg-context@ntg.nl>
Subject: Allow for hyphenation in 'firstline' ConTeXt feature ?
Date: Sun, 29 May 2016 09:40:33 +0000	[thread overview]
Message-ID: <570d4e40a09448fba5373b4cf9902b8f@gmail.com> (raw)


[-- 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
___________________________________________________________________________________

             reply	other threads:[~2016-05-29  9:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-29  9:40 josephcanedo [this message]
2016-05-29 15:18 ` Hans Hagen
2016-05-29 20:56   ` josephcanedo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=570d4e40a09448fba5373b4cf9902b8f@gmail.com \
    --to=josephcanedo@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).