From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/69120 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: break strings Date: Mon, 13 Jun 2011 15:40:52 +0200 Message-ID: References: <81BCF9A8-D19A-4DD3-91EE-C552023AA86E@st.estfiles.de> <8EA8D5E8-2692-4D13-881A-4D8E499BF803@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1307972474 15019 80.91.229.12 (13 Jun 2011 13:41:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 13 Jun 2011 13:41:14 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 13 15:41:09 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QW7O4-0000pR-3m for gctc-ntg-context-518@m.gmane.org; Mon, 13 Jun 2011 15:41:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C47C1CADA8; Mon, 13 Jun 2011 15:41:02 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id i6AWdWNk36my; Mon, 13 Jun 2011 15:40:59 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 55D4ACAD9D; Mon, 13 Jun 2011 15:40:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5FA90CAD9D for ; Mon, 13 Jun 2011 15:40:57 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FSbRi3cqQZcC for ; Mon, 13 Jun 2011 15:40:55 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 927A8CAD90 for ; Mon, 13 Jun 2011 15:40:55 +0200 (CEST) Original-Received: from mail-qw0-f41.google.com (mail-qw0-f41.google.com [209.85.216.41]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p5DDeq88013067 for ; Mon, 13 Jun 2011 15:40:53 +0200 Original-Received: by qwa26 with SMTP id 26so3045899qwa.14 for ; Mon, 13 Jun 2011 06:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=8M6DF2dh2VZf9w17nYTNqwsuSDpjzOmnhNra8hIpv3M=; b=eSYQ1iMaD+g53qZTNEpoDfMjPmEECLRtWh+Ttun9Kgbe1luYvxyk82epg+l2C49Ok/ PfnfbWmTskhhVQMPcPJhh3o9peoSwG+wfwbReAMISFf08cX/qlfmO6dj5R+uE+ZnW9N/ GtswAEWQ1iaaXDbaCPeOikduJy5VLmoQSpuyc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=te8Udz3YI+qsmHpRrody95qCYLdMD/qUv9RV19lCwPO1Wotd1kM56LrRvoNwSwsrOZ 0wHqHM7YNm7PoHItCfRI0Sv+lelDHv4KM2/miOWbZi8BsIC9t7hOzcZu6b6y/2IVfdOX ZLJK1KvWxefOtdidDXmUEDD1ohJTAEZHYqkfQ= Original-Received: by 10.229.27.205 with SMTP id j13mr67914qcc.82.1307972452427; Mon, 13 Jun 2011 06:40:52 -0700 (PDT) Original-Received: by 10.229.247.7 with HTTP; Mon, 13 Jun 2011 06:40:52 -0700 (PDT) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.216.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cETpERKS - d774556ad0e9 - 20110613 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 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:69120 Archived-At: On Mon, Jun 13, 2011 at 3:18 PM, Steffen Wolfrum wrote: > > Am 13.06.2011 um 14:25 schrieb Wolfgang Schuster: > >> >> Am 13.06.2011 um 14:12 schrieb Steffen Wolfrum: >> >>> Hi, >>> >>> say I have arbitrary string of alphanumeric characters: >>> >>> >>> \starttext >>> >>> \showframe >>> >>> 9769387937933hhgiuiuziuziduzid93739837fhieuhifeuhfeiu39739837938398zfhfdkuhfiufhz398739837r98z379dihhfiu >>> >>> \stoptext >>> >>> How can I (automatically) force a break at end of line, without manually adding \crlf or \break at break points? >> >> \handletokens ...\with{\hskip 0pt plus .1pt\firstofoneargument} > > > Yes, this helps: > > \showframe > > \define[1]\ThisHelps {\handletokens#1\with{\hskip 0pt plus .1pt\firstofoneargument}} > > Test text test text\ThisHelps {9769387937933hhgiuiuziuziduzid93739837fhieuhifeuhfeiu39739837938398zfhfdkuhfiufhz398739837r98z379dihhfiu} > > \stoptext > > > Thank you!! > > Steffen Where is the difference ? \starttext \showframe \define[1]\ThisHelps {\handletokens#1\with{\hskip 0pt plus .1pt\firstofoneargument}} Test text test text\ThisHelps {9769387937933hhgiuiuziuziduzid93739837fhieuhifeuhfeiu39739837938398zfhfdkuhfiufhz398739837r98z379dihhfiu} \define[1]\ThisHelpsLuigi{% \startluacode s='#1' s= string.gsub(s,'(.)',"\%1\\hskip0sp") % maybe only some chars... %s= string.gsub(s,'[=/]',"\%1\\hskip0sp") context(s) \stopluacode} Test text test text\ThisHelpsLuigi {9769387937933hhgiuiuziuziduzid93739837fhieuhifeuhfeiu39739837938398zfhfdkuhfiufhz398739837r98z379dihhfiu} \stoptext -- luigi ___________________________________________________________________________________ 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 ___________________________________________________________________________________