From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/22369 Path: news.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: Re: cropping with \limitatefirstline Date: Thu, 08 Sep 2005 18:34:11 +0200 Message-ID: <43206803.5090009@gmx.net> References: <431EFA3B.8090706@gmx.net> <431F0D7F.9020005@wxs.nl> <4320499B.5050002@gmx.net> <432058AD.1040900@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020902050600020207060907" X-Trace: sea.gmane.org 1126197320 12085 80.91.229.2 (8 Sep 2005 16:35:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Sep 2005 16:35:20 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 08 18:35:19 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 1EDPKV-00055u-IB for gctc-ntg-context-518@m.gmane.org; Thu, 08 Sep 2005 18:32:51 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AD781127FA; Thu, 8 Sep 2005 18:32:50 +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 21314-07-3; Thu, 8 Sep 2005 18:32:47 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D1279127E5; Thu, 8 Sep 2005 18:32:47 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 85297127E5 for ; Thu, 8 Sep 2005 18:32:46 +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 21314-07-2 for ; Thu, 8 Sep 2005 18:32:45 +0200 (CEST) Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by ronja.ntg.nl (Postfix) with SMTP id 90DA5127CF for ; Thu, 8 Sep 2005 18:32:45 +0200 (CEST) Original-Received: (qmail invoked by alias); 08 Sep 2005 16:32:44 -0000 Original-Received: from i5387C7F5.versanet.de (EHLO [192.168.0.3]) [83.135.199.245] by mail.gmx.net (mp014) with SMTP; 08 Sep 2005 18:32:44 +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: <432058AD.1040900@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:22369 Archived-At: This is a multi-part message in MIME format. --------------020902050600020207060907 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hans, is this a trick to get even more wiki pages? \clip is still running wild... :) Greetings, Peter --------------020902050600020207060907 Content-Type: text/plain; name="crop.tex" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="crop.tex" % interface=en output=pdftex % Time-stamp: % \setupcolors[state=start] \unprotect \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}% \ifx\clip\undefined \box\plusone\removeunwantedspaces#3% \else\ifdim\wd\plusone>\hsize \hbox{\clip[\c!width=\hsize]{\box\plusone}#3}% \else \box\plusone\removeunwantedspaces#3% \fi\fi}% \else #1% \fi \egroup} \protect \def\CropSymbol{\red...}% \starttext \setupframed[offset=overlay, height=\struttotal, framecolor=lightgray] \setupframed[offset=overlay, height=\struttotal, framecolor=lightgray] \framed[width=8ex,background=color,backgroundcolor=black]{\white 8ex} \framed{\limitatefirstline{\underbar{Text dummy}}{8ex}{\CropSymbol}} \framed{\limitatetext{\underbar{Text dummy}}{8ex}{\CropSymbol}} \blank \framed[width=120pt,background=color,backgroundcolor=black]{\white 120 pt} \framed{\limitatefirstline{\textbar \_\textcircumflex\texttilde \%\$\#\textbraceleft \textbraceright \textpm \copyright \registered \pi \textdegree <>\&}{120pt}{\CropSymbol}} \blank \framed[width=110pt,background=color,backgroundcolor=black]{\white 110 pt} \framed{\limitatefirstline{\textbar \_\textcircumflex\texttilde \%\$\#\textbraceleft \textbraceright \textpm \copyright \registered \pi \textdegree <>\&}{110pt}{\CropSymbol}} \framed{\limitatefirstline{This text is definitely too long to fit this frame.}{110pt}{\CropSymbol}} \blank \framed[width=100pt,background=color,backgroundcolor=black]{\white 100 pt} \framed{\limitatefirstline{\textbar \_\textcircumflex\texttilde \%\$\#\textbraceleft \textbraceright \textpm \copyright \registered\space \pi \textdegree <>\&}{100pt}{\CropSymbol}} \stoptext %%% Local Variables: %%% mode: context %%% TeX-master: "" %%% End: --------------020902050600020207060907 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 --------------020902050600020207060907--