From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/22347 Path: news.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: Re: cropping with \limitatefirstline Date: Wed, 07 Sep 2005 18:18:35 +0200 Message-ID: <431F12DB.3080209@gmx.net> References: <431EFA3B.8090706@gmx.net> <431F0D7F.9020005@wxs.nl> 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 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1126109949 17974 80.91.229.2 (7 Sep 2005 16:19:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Sep 2005 16:19:09 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 07 18:19:01 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 1ED2bm-0001I7-KZ for gctc-ntg-context-518@m.gmane.org; Wed, 07 Sep 2005 18:17:10 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6A1BA1281F; Wed, 7 Sep 2005 18:17:10 +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 07141-02-5; Wed, 7 Sep 2005 18:17:06 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8480F1281B; Wed, 7 Sep 2005 18:17:06 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 231451281B for ; Wed, 7 Sep 2005 18:17:05 +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 07141-02-4 for ; Wed, 7 Sep 2005 18:17:04 +0200 (CEST) Original-Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by ronja.ntg.nl (Postfix) with SMTP id 3476212816 for ; Wed, 7 Sep 2005 18:17:03 +0200 (CEST) Original-Received: (qmail invoked by alias); 07 Sep 2005 16:17:03 -0000 Original-Received: from i5387D8EB.versanet.de (EHLO [192.168.0.3]) [83.135.216.235] by mail.gmx.net (mp028) with SMTP; 07 Sep 2005 18:17:03 +0200 X-Authenticated: #24293357 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <431F0D7F.9020005@wxs.nl> X-Enigmail-Version: 0.92.0.0 X-Y-GMX-Trusted: 0 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:22347 Archived-At: Hans Hagen wrote: > Peter Rolf wrote: >=20 >> Sorry to bother you Hans, but the macro is not working as expected... >> >> I can see the cropped text (\underbar + special symbols) and there is = an >> hyphen symbol in the text only example. >> >> I've added the example code I used for tests with \limitatetext and >> \doboundtext. >> =20 >> > \def\limitatefirstline#1#2#3% > {\hbox\bgroup\strut > \setbox\scratchbox\hbox{#1}% > \ifdim\wd\scratchbox>#2\relax > \setbox\scratchbox\hbox{#3}% > \hsize#2\relax > \advance\hsize-\wd\scratchbox > \setbox\scratchbox\vbox{\forgetall\veryraggedright#1}% > \setbox\scratchbox\vsplit\scratchbox to \lineheight > \vbox > {\unvbox\scratchbox > \global\setbox\plusone\lastbox > \global\setbox\plusone\hbox{\unhbox\plusone}}% > \box\plusone\removeunwantedspaces#3% > \else > #1% > \fi > \egroup} >=20 > of course there must be something to break (not possible with the non > letters, so there you either need to add \hskip0pt's or do real clippin= g I'll try to understand your code later (make no sense at 30=B0 and I need to read again about the \lastbox trick and unboxing). The text will be generated from XML source, so there is no problem in inserting something (although clipping would be the cleaner solution). Later.... So again many thanks! Greetings, Peter > Hans > ----------------------------------------------------------------- > 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 > ----------------------------------------------------------------- >=20 > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context >=20 >=20