On Mon, Jun 13, 2011 at 3:18 PM, Steffen Wolfrum <cont...@st.estfiles.de> 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 ___________________________________________________________________________________