From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: missing pagebreak using vim-module for typing
Date: Sun, 6 May 2012 18:30:17 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.2.02.1205061630350.1809@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <4FA6C33D.5060804@googlemail.com>
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
___________________________________________________________________________________
prev parent reply other threads:[~2012-05-06 22:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 6:02 Xenia
2012-05-01 6:50 ` Aditya Mahajan
2012-05-01 10:24 ` Xenia
2012-05-01 11:02 ` Wolfgang Schuster
2012-05-01 16:14 ` Xenia
2012-05-01 16:53 ` Aditya Mahajan
2012-05-01 17:35 ` Aditya Mahajan
2012-05-01 18:29 ` Hans Hagen
2012-05-01 18:46 ` Aditya Mahajan
2012-05-01 18:46 ` Wolfgang Schuster
2012-05-01 18:49 ` Aditya Mahajan
2012-05-06 18:30 ` Xenia
2012-05-06 22:30 ` Aditya Mahajan [this message]
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=alpine.LNX.2.02.1205061630350.1809@ybpnyubfg.ybpnyqbznva \
--to=adityam@umich.edu \
--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).