From: Uwe Koloska <ml@koloro.de>
To: ntg-context@ntg.nl
Subject: Howto fit text into a box
Date: Mon, 9 Jun 2008 03:06:39 +0200 [thread overview]
Message-ID: <200806090306.39320.ml@koloro.de> (raw)
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
___________________________________________________________________________________
next reply other threads:[~2008-06-09 1:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-09 1:06 Uwe Koloska [this message]
2008-06-09 13:44 ` Wolfgang Schuster
2008-06-11 12:56 ` Wolfgang Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200806090306.39320.ml@koloro.de \
--to=ml@koloro.de \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).