On Fri, 15 May 2015, Andreas Schneider wrote:

Am 14.05.2015 17:26, schrieb Aditya Mahajan:

I just released a newer version to t-vim where the `option=hypenated`
is documented. It is also possible to hyphenate words by using

\definevimtyping[...][..., option={packed,hyphenated}, align=hyphenated, ....]

Aditya

Thank you for that solution. It doesn't work quite that way, though:

1. Only [...,option=hyphenated,...] breaks many, but not all lines. \setupalign[verytolerant,stretch] helps here.

Depends on a bit on the breakpoints. Can you send an example where it doesn't work.

2. [...,option={packed,hyphenated},align=hyphenated,...] doesn't work at all

It should. I'll look into this.

3. Omitting "packed", ie. [...,option=hyphenated,align=hyphenated,...] works as expected. Even single words are broken then.

I will currently stick with option 1, since option 3 has a negative side effect: it inserts hyphen marks ("-"), which looks weird in source code.

I know. That is why, as I say in the documentation, option 3 is a last case resort.

All in all I have two wishes regarding wordwrap and hyphenation, and hope they aren't too hard to grant :-)

1. Add an option to omit the hyphenation mark/sign (whatever it is actually called).

This should be easy (provided someone can tell how to do this in normal text :-)

2. Add an option to indent the wrapped line to the line it was wrapped from.

This is too difficult to do correctly, and I am not going to implement a half-baked solution. One option is to run your code through a formatter (prettifier) upfront. It is easy to plug that in to the t-vim module.

Aditya
___________________________________________________________________________________
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 via email to