From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/21817 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Verbatim with linebreaks sillyness Date: Sun, 07 Aug 2005 22:41:48 +0200 Message-ID: <42F6720C.5040700@wxs.nl> References: <42EA3041.3030209@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1123447549 16203 80.91.229.2 (7 Aug 2005 20:45:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 7 Aug 2005 20:45:49 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sun Aug 07 22:45:45 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1E1s14-00027i-UW for gctc-ntg-context-518@m.gmane.org; Sun, 07 Aug 2005 22:45:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7088D1279A; Sun, 7 Aug 2005 22:45:06 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32021-02; Sun, 7 Aug 2005 22:45:05 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A67B81279B; Sun, 7 Aug 2005 22:41:14 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 83E201279B for ; Sun, 7 Aug 2005 22:41:12 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31751-07 for ; Sun, 7 Aug 2005 22:41:11 +0200 (CEST) Original-Received: from mailrelay01.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id 7CEEB1279A for ; Sun, 7 Aug 2005 22:41:11 +0200 (CEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay01.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id j77Kf5Sb008627 for ; Sun, 7 Aug 2005 22:41:05 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id D34C0193E8; Sun, 7 Aug 2005 21:54:19 +0200 (CEST) Original-Received: from [10.100.1.52] (unknown [10.100.1.52]) by server-1.pragma-net.nl (Postfix) with ESMTP id 6D70517A1D for ; Sun, 7 Aug 2005 19:54:18 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: X-Virus-Scanned: ClamAV 0.86.1/1007/Sun Aug 7 13:47:34 2005 on mailrelay01 X-Virus-Status: Clean X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:21817 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:21817 Eugene Toporov wrote: > Taco, > > Just tried this and it is really cool! > But how can I make spaces without the special space character? framedtext is better suited than framed here: \defineframedtext [broken] [width=3D8cm, align=3Dflushleft] \definetyping[BREAK][option=3DBREAK] \startbroken \startBREAK h=F6=F6ah:aloh/aa?lha llol!loh%lloh#allhal\lohhll;ohohal~loll=20 ohal=F6loh=F6=F6ah:aloh/aa?lha llol!loh%lloh#allhal\lohhll;ohohal~loll oh= al=F6lo \stopBREAK \stopbroken > > Thanks > > On 7/29/05, *Taco Hoekwater* > wrote: > > > Hi, > > I saw this on the wiki: > > http://contextgarden.net/Verbatim_with_line_breaks > > and it seemed like a fun idea to play with for a bit. > How's this? > > Cheers, Taco > > > % > % BREAK is a special pretty handler that auto-wraps lines > % to fit the current hsize. > > \gdef\BREAKsetspecials% > {\dorecurse{256}{\setpretty\numexpr \recurselevel-1\relax=3D10 }= } > > \gdef\BREAKsethandlers% > {\installprettyhandler 10 \BREAKtypeone } > > \newcount\BREAKcharcounter > \newcount\BREAKmaxcharcount > > \def\BREAKtypeone#1% > {\advance\BREAKcharcounter 1 > \ifnum\BREAKcharcounter > \BREAKmaxcharcount > \hfil\break > \BREAKcharcounter=3D1 > \fi > \getpretty{#1}} > > \def\BREAKsetcounters% > {\setbox\scratchbox=3D\hbox{0}% > \BREAKmaxcharcount=3D\hsize > \divide\BREAKmaxcharcount \wd\scratchbox > \def\flushrestofverbatimline{\BREAKcharcounter=3D0 }% > \BREAKcharcounter=3D0 } > > \gdef\setupprettyBREAKtype% > {\def\prettyidentifier{BREAK}% > \BREAKsetcounters > \BREAKsethandlers > \BREAKsetspecials} > > \installprettytype [BREAK] [BREAK] > > \starttext > \framed > [width=3D8cm, > align=3Dflushleft]{% > \setuptyping[option=3DBREAK] > \starttyping > h=F6=F6ah:aloh/aa?lha llol!loh%lloh#allhal\lohhll;ohohal~loll ohal=F6= lo > \stoptyping > } > \stoptext > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > > > > > --=20 > Regards. > Eugene Toporov > >------------------------------------------------------------------------ > >_______________________________________________ >ntg-context mailing list >ntg-context@ntg.nl >http://www.ntg.nl/mailman/listinfo/ntg-context > =20 > --=20 ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------