[NTG-context] line breaking hints?

Santy, Michael Michael.Santy at dynetics.com
Mon Nov 26 22:08:40 CET 2007


Hello,

I'm looking for a way to give ConTeXt's line breaking algorithm a hint on where it is allowed to break a line.  For example, I want ConTeXt to break lines, if necessary, when it encounters '//' in a string.  I don't want to force a line break there, but if context needs to break the line, I want it to be after a "//".  

A contrived example of some input text is:
THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG//NOW IS THE TIME FOR ALL GOOD MEN TO COME TO THE AID OF THEIR COUNTRY.

When this text is rendered by ConTeXt, and it is too big to fit on a single line, I would like it to break like this:
THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG//
NOW IS THE TIME FOR ALL GOOD MEN TO COME TO THE AID OF THEIR COUNTRY.

I can preprocess the source to change spaces into non-breaking spaces and can replace '//' with anything else that I need to, but don't know how to suggest where to break the line.  Also note that I do not want any words to be hyphenated nor broken on hyphens.

Does anyone have any ideas on how I might accomplish this?

Cheers,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ntg.nl/pipermail/ntg-context/attachments/20071126/13c395ef/attachment.html 


More information about the ntg-context mailing list