[NTG-context] missing pagebreak using vim-module for typing
Aditya Mahajan
adityam at umich.edu
Mon May 7 00:30:17 CEST 2012
On Sun, 6 May 2012, Xenia wrote:
>> \startsetups linebreak
>> \language\minusone %disable hypenation
>> \raggedright %avoid overflow lines \stopsetups
>>
>> \unprotect
>> \setupsyntaxhighlighting
>> [setups={syntaxhighlighting at 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
More information about the ntg-context
mailing list