From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/21808 Path: news.gmane.org!not-for-mail From: Eugene Toporov Newsgroups: gmane.comp.tex.context Subject: Re: Verbatim with linebreaks sillyness Date: Sat, 6 Aug 2005 19:03:38 +0300 Message-ID: References: <42EA3041.3030209@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1433031370==" X-Trace: sea.gmane.org 1123344273 25137 80.91.229.2 (6 Aug 2005 16:04:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Aug 2005 16:04:33 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sat Aug 06 18:04:28 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 1E1R9T-0007hd-Fu for gctc-ntg-context-518@m.gmane.org; Sat, 06 Aug 2005 18:04:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 92316127B6; Sat, 6 Aug 2005 18:03:47 +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 11409-06; Sat, 6 Aug 2005 18:03:43 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D9DE01279D; Sat, 6 Aug 2005 18:03:42 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EF2861279D for ; Sat, 6 Aug 2005 18:03:40 +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 11605-03 for ; Sat, 6 Aug 2005 18:03:40 +0200 (CEST) Original-Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.207]) by ronja.ntg.nl (Postfix) with ESMTP id EA61B12788 for ; Sat, 6 Aug 2005 18:03:39 +0200 (CEST) Original-Received: by rproxy.gmail.com with SMTP id 34so160193rns for ; Sat, 06 Aug 2005 09:03:38 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Kpz7yEYAF0FO7DJ3VYOFz3k+s6kVDDSLghxEId4rPVlYEsKRyxwCQTScg7acLpENEYLxIVhvnCj79GdkX9EWDAR3xirepBMyWBEfV/gNsW7vE15JJEiI2VKE3tYD5pbz8PqktVe/wyjq0dEcNZG2DKtAlOsivgG15Qor4Hyye+w= Original-Received: by 10.11.119.41 with SMTP id r41mr35885cwc; Sat, 06 Aug 2005 09:03:38 -0700 (PDT) Original-Received: by 10.11.117.74 with HTTP; Sat, 6 Aug 2005 09:03:38 -0700 (PDT) Original-To: mailing list for ConTeXt users , taco@elvenkind.com In-Reply-To: <42EA3041.3030209@elvenkind.com> 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:21808 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:21808 --===============1433031370== Content-Type: multipart/alternative; boundary="----=_Part_133_19673697.1123344218723" ------=_Part_133_19673697.1123344218723 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Taco, Just tried this and it is really cool! But how can I make spaces without the special space character? Thanks On 7/29/05, Taco Hoekwater wrote: >=20 >=20 > Hi, >=20 > I saw this on the wiki: >=20 > http://contextgarden.net/Verbatim_with_line_breaks >=20 > and it seemed like a fun idea to play with for a bit.=20 > How's this? >=20 > Cheers, Taco >=20 >=20 > % > % BREAK is a special pretty handler that auto-wraps lines > % to fit the current hsize. >=20 > \gdef\BREAKsetspecials% > {\dorecurse{256}{\setpretty\numexpr \recurselevel-1\relax=3D10 }}=20 >=20 > \gdef\BREAKsethandlers% > {\installprettyhandler 10 \BREAKtypeone } >=20 > \newcount\BREAKcharcounter > \newcount\BREAKmaxcharcount >=20 > \def\BREAKtypeone#1% > {\advance\BREAKcharcounter 1 > \ifnum\BREAKcharcounter > \BREAKmaxcharcount=20 > \hfil\break > \BREAKcharcounter=3D1 > \fi > \getpretty{#1}} >=20 > \def\BREAKsetcounters% > {\setbox\scratchbox=3D\hbox{0}% > \BREAKmaxcharcount=3D\hsize > \divide\BREAKmaxcharcount \wd\scratchbox=20 > \def\flushrestofverbatimline{\BREAKcharcounter=3D0 }% > \BREAKcharcounter=3D0 } >=20 > \gdef\setupprettyBREAKtype% > {\def\prettyidentifier{BREAK}% > \BREAKsetcounters > \BREAKsethandlers > \BREAKsetspecials}=20 >=20 > \installprettytype [BREAK] [BREAK] >=20 > \starttext > \framed > [width=3D8cm, > align=3Dflushleft]{% > \setuptyping[option=3DBREAK] > \starttyping > h=F6=F6ah:aloh/aa?lha llol!loh%lloh#allhal\lohhll;ohohal~loll ohal=F6lo= =20 > \stoptyping > } > \stoptext >=20 > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context >=20 --=20 Regards. Eugene Toporov ------=_Part_133_19673697.1123344218723 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Taco,

Just tried this and it is really cool!
But how can I make spaces without the special space character?

Thanks

On 7/29/05, Taco Hoekwater <= taco@elvenkind.com> wrote:

Hi,

I saw this on the wiki:

   http://contextgarden.net/Ver= batim_with_line_breaks

and it seemed like a fun idea to play wit= h for a bit.
How's this?

Cheers, Taco


%
% BREAK is a special pr= etty handler that auto-wraps lines
% to fit the current hsize.

\g= def\BREAKsetspecials%
   {\dorecurse{256}{\setpretty\numexpr \= recurselevel-1\relax=3D10 }}

\gdef\BREAKsethandlers%
   {\installprettyhandler 10 \= BREAKtypeone  }

\newcount\BREAKcharcounter
\newcount\BR= EAKmaxcharcount

\def\BREAKtypeone#1%
   {\advance\BREAK= charcounter 1
    \ifnum\BREAKcharcounter > \BREA= Kmaxcharcount
       \hfil\break
   &= nbsp;   \BREAKcharcounter=3D1
    \fi
&= nbsp;   \getpretty{#1}}

\def\BREAKsetcounters%
&nb= sp;  {\setbox\scratchbox=3D\hbox{0}%
    \BREAK= maxcharcount=3D\hsize
    \divide\BREAKmaxcharcount = \wd\scratchbox
    \def\flushrestofverbatimline{\BREAKcharcounter= =3D0 }%
    \BREAKcharcounter=3D0 }

\gdef\set= upprettyBREAKtype%
   {\def\prettyidentifier{BREAK}%
 =    \BREAKsetcounters
    \BREAKsethan= dlers
    \BREAKsetspecials}

\installprettytype [BREAK] [BREAK]

\starttext
\framed
=     [width=3D8cm,
     align=3Df= lushleft]{%
\setuptyping[option=3DBREAK]
\starttyping
h=F6=F6ah:al= oh/aa?lha llol!loh%lloh#allhal\lohhll;ohohal~loll ohal=F6lo
\stoptyping
}
\stoptext

__________________________________= _____________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


--
Regards.
Eugene Toporov ------=_Part_133_19673697.1123344218723-- --===============1433031370== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --===============1433031370==--