From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/76003 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: missing pagebreak using vim-module for typing Date: Sun, 6 May 2012 18:30:17 -0400 (EDT) Message-ID: References: <4F9F7C84.8000807@googlemail.com> <4F9FB9DC.3020309@googlemail.com> <4FA00BF2.5020900@googlemail.com> <4FA6C33D.5060804@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1336342994 11485 80.91.229.3 (6 May 2012 22:23:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 May 2012 22:23:14 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon May 07 00:23:14 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SR9rF-0006n8-Mw for gctc-ntg-context-518@m.gmane.org; Mon, 07 May 2012 00:23:13 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9BB2A101E6; Mon, 7 May 2012 00:23:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BW-E6zKI4zll; Mon, 7 May 2012 00:23:10 +0200 (CEST) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8BA4B101DF; Mon, 7 May 2012 00:23:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2BEB2101DF for ; Mon, 7 May 2012 00:23:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id wEbQTNQanDbs for ; Mon, 7 May 2012 00:23:07 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id CEB9E101CF for ; Mon, 7 May 2012 00:23:07 +0200 (CEST) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q46MN4Df031528 for ; Mon, 7 May 2012 00:23:06 +0200 Original-Received: FROM [192.168.1.101] ((null) [64.231.170.169]) By hackers.mr.itd.umich.edu ID 4FA6F9C6.BABF2.8800 ; Authuser adityam; 6 May 2012 18:23:02 EDT In-Reply-To: <4FA6C33D.5060804@googlemail.com> User-Agent: Alpine 2.02 (LNX 1266 2009-07-14) Content-ID: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.81; country=US; region=TX; city=Ladonia; postalcode=75449; latitude=33.4261; longitude=-95.9709; metrocode=623; areacode=903; http://maps.google.com/maps?q=33.4261,-95.9709&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RH6Kn5iN - 7b077c62849a - 20120507 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:76003 Archived-At: 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 ___________________________________________________________________________________