From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/41451 Path: news.gmane.org!not-for-mail From: Uwe Koloska Newsgroups: gmane.comp.tex.context Subject: Howto fit text into a box Date: Mon, 9 Jun 2008 03:06:39 +0200 Message-ID: <200806090306.39320.ml@koloro.de> 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: ger.gmane.org 1212973644 1248 80.91.229.12 (9 Jun 2008 01:07:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Jun 2008 01:07:24 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 09 03:08:04 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1K5Vrf-0007gH-Ao for gctc-ntg-context-518@m.gmane.org; Mon, 09 Jun 2008 03:08:03 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D2FA31FCF4; Mon, 9 Jun 2008 03:07:06 +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 23525-01-4; Mon, 9 Jun 2008 03:06:49 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7BD0D1FCB7; Mon, 9 Jun 2008 03:06:49 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 96E951FCB7 for ; Mon, 9 Jun 2008 03:06: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 23525-01-3 for ; Mon, 9 Jun 2008 03:06:42 +0200 (CEST) Original-Received: from dd16232.kasserver.com (dd16232.kasserver.com [85.13.137.72]) by ronja.ntg.nl (Postfix) with ESMTP id EDE8E1FC87 for ; Mon, 9 Jun 2008 03:06:41 +0200 (CEST) Original-Received: from bilbo.auenland (dslb-092-078-089-217.pools.arcor-ip.net [92.78.89.217]) by dd16232.kasserver.com (Postfix) with ESMTP id B5A2518037E59 for ; Mon, 9 Jun 2008 03:06:41 +0200 (CEST) Original-Received: from gandalf.auenland (gandalf.auenland [192.168.0.90]) by bilbo.auenland (Postfix) with ESMTP id 0D4E1D2CB5 for ; Mon, 9 Jun 2008 03:20:05 +0200 (CEST) Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:41451 Archived-At: Hello, for a CD-Cover I have to fit a given text into a fixed box. I have tried to achieve this with the help of mag-0010 "Good looking shapes" but was not successful :-( Can you help me with this? The conditions: - the text is of fixed length - the area is of given size (has a given ratio) - the text has to fit completely inside this area - the last line must be justified, too - the fontsize of the text is the variable that can be changed - I have the current minimal context installation and as an addition: - if possible the words should not be hyphenated at all or hyphenated at an arbitrary character without a hyphenation mark (the text consists of names) A possible algorithm (similar to the one from mag-0010) 1 start with a small box with the given ratio 2 fill the text into the box 3 if all text fits in with a small penalty we are ready 4 make the box a bit larger 5 goto 2 Unfortunately, I'm not able to understand the code from the mag nor can I code the algorithm in context ... I would appreciate any input on this problem! Thank you Uwe Koloska ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________