On Sun, 6 May 2012, Xenia wrote:
\startsetups linebreak
\language\minusone %disable hypenation
\raggedright %avoid overflow lines \stopsetups
\unprotect
\setupsyntaxhighlighting
[setups={syntaxhighlighting@setup,linebreak}]
\protect
I am using your workaround and it works fine for most code-snippets.
I released a new version that incorporates this fix, so you no longer need
to add this to your code.
But with longer formulas, this fails. I am attaching a minimal example.
Currently, breaks only occur at spaces. So, in your example, there are no
good linebreaks.
I released a new version that allows you some control over the linebreaks
around each syntax group. You can add
\setupsyntaxgroup[after={\allowbreak}]
to allow a break after each syntaxgroup. If you prefer line breaks before
a syntaxgroup, set
\setupsyntaxgroup[before={\allowbreak}]
Keep in mind that this may not result in good looking linebreaks. A better
solution is to manually set linebreaks in your source code.
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
___________________________________________________________________________________