* preset for max spacewidth ?
@ 2007-06-04 14:33 Steffen Wolfrum
2007-06-04 17:59 ` Wolfgang Schuster
0 siblings, 1 reply; 2+ messages in thread
From: Steffen Wolfrum @ 2007-06-04 14:33 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
in some projects the regular " " (empty space) becomes quite wide, in some justified paragraphs.
I guess there is a preset somewhere describing the range how far the space can be shrinked/stretched.
So, in these projects I'd like to have the maximum spacewidth set a bit narrower.
Just, where is this definition?
Steffen
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: preset for max spacewidth ?
2007-06-04 14:33 preset for max spacewidth ? Steffen Wolfrum
@ 2007-06-04 17:59 ` Wolfgang Schuster
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2007-06-04 17:59 UTC (permalink / raw)
To: ntg-context
On Mon, 4 Jun 2007 16:33:34 +0200
Steffen Wolfrum <context@st.estfiles.de> wrote:
> Hi,
>
> in some projects the regular " " (empty space) becomes quite wide, in some justified paragraphs.
> I guess there is a preset somewhere describing the range how far the space can be shrinked/stretched.
> So, in these projects I'd like to have the maximum spacewidth set a bit narrower.
>
> Just, where is this definition?
>
> Steffen
Hi Steffen,
the ConTeXt command to control the interword space is \setuptolerance,
the problem is there is by default (correct if I am wrong) no way to
choose a smaller interwordspace.
The low level TeX command to overwrite the default value provided by
the font ist "\spacefactor normalwidth plus stretchfactor minus
shrinkfactor". It is better include such commands only if you know what
you are doing.
I modified ConTeXts \setupinterlinespace to allow you to choose the
option "halfspace" with a narrower interlinespace than the default
value (I tested it oly with Latin Modern).
It could be a bad idea to change also the shrink and stretch values.
\unprotect
\startvariables all
halfspace: halfspace
\stopvariables
\def\dosetuptolerance[#1]%
{\doifinsetelse\v!vertical{#1}%
{\ExpandFirstAfter\processallactionsinset
[#1]
[ \v!verystrict=>\def\bottomtolerance{},
\v!strict=>\def\bottomtolerance{.050},
\v!tolerant=>\def\bottomtolerance{.075},
\v!verytolerant=>\def\bottomtolerance{.100}]}%
{\ExpandFirstAfter\processallactionsinset
[#1]
[ \v!stretch=>\emergencystretch\bodyfontsize,
\v!halfspace=>\spaceskip.25em\!!plus.125em\!!minus.125em\relax,
\v!space=>\spaceskip.5em\!!plus.25em\!!minus.25em\relax,
\v!verystrict=>\tolerance 200,
\v!strict=>\tolerance1500,
\v!tolerant=>\tolerance3000,
\v!verytolerant=>\tolerance4500]}}
\protect
\starttext
Text text text text text
\setuptolerance[halfspace]
Text text text text text
\stoptext
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-04 17:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-04 14:33 preset for max spacewidth ? Steffen Wolfrum
2007-06-04 17:59 ` Wolfgang Schuster
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).