* hz / expansion
@ 2019-12-02 17:52 Hans Hagen
2019-12-05 19:01 ` Pablo Rodriguez
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2019-12-02 17:52 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
The latest lmtx has a new feature: expansion control independent of font
specific settings. When used the font specific step stretch and shrink
will be overloaded. This permits mixed setups that are normally nor
possible because these three properties need to be consistent within a
paragraph. It also permits local deviations from the defaults, for
instance in more extreme cases.
\startluacode
local classes = fonts.expansions.classes
classes.qualityb = {
vector = "default",
factor = 1,
stretch = 8,
shrink = 4,
step = .5,
}
classes.qualitya = {
vector = "default",
factor = 1,
stretch = 4,
shrink = 2,
step = .5,
}
\stopluacode
\showframe
% \enabletrackers[*expansion]
\setupbodyfont[dejavu,8pt]
\defineexpansion
[myexpansion]
[step=1,
stretch=50,
shrink=20]
\definefontfeature [basea] [default] [expansion=qualitya]
\definefontfeature [baseb] [default] [expansion=qualityb]
\definefont[FontA][Serif*basea]
\definefont[FontB][Serif*baseb]
\setupalign[verytolerant,stretch,hz]
\starttext
\startbuffer
\dorecurse {30} {%
{\FontB \red test me #1,} \FontA \dorecurse{#1}{test ##1, }%
}\par
\stopbuffer
{\getbuffer \page}
\setexpansion[myexpansion] {\getbuffer \page}
\stoptext
Maybe it's useful (I hardly use expansion myself). Hopefully there are
no side effects.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: hz / expansion
2019-12-02 17:52 hz / expansion Hans Hagen
@ 2019-12-05 19:01 ` Pablo Rodriguez
2019-12-07 22:51 ` Pablo Rodriguez
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2019-12-05 19:01 UTC (permalink / raw)
To: ntg-context
On 12/2/19 6:52 PM, Hans Hagen wrote:
> Hi,
>
> The latest lmtx has a new feature: expansion control independent of font
> specific settings.
> [...]
> Maybe it's useful (I hardly use expansion myself). Hopefully there are
> no side effects.
Many thanks for the new implementation, Hans.
Using beta from 2019.12.02 18:28 for LMTX in Windows, I get only the
left margin justified with this sample:
\definefontfeature[default][default][expansion=quality]
\setupalign[hz]
\starttext
\input zapf
\stoptext
I cannot reproduce the issue in Linux. I’m afraid I don’t have access to
other computers.
Is this a real bug or is my distribution missing something?
Many thanks for your help,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: hz / expansion
2019-12-05 19:01 ` Pablo Rodriguez
@ 2019-12-07 22:51 ` Pablo Rodriguez
0 siblings, 0 replies; 3+ messages in thread
From: Pablo Rodriguez @ 2019-12-07 22:51 UTC (permalink / raw)
To: ntg-context
On 12/5/19 8:01 PM, Pablo Rodriguez wrote:
> On 12/2/19 6:52 PM, Hans Hagen wrote:
>> [...]
>> Maybe it's useful (I hardly use expansion myself). Hopefully there are
>> no side effects.
>
> Many thanks for the new implementation, Hans.
>
> Using beta from 2019.12.02 18:28 for LMTX in Windows, I get only the
> left margin justified with this sample: [...]
Many thanks for the fix, Hans.
I updated LMTX to the latest beta and everything works fine again.
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-07 22:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02 17:52 hz / expansion Hans Hagen
2019-12-05 19:01 ` Pablo Rodriguez
2019-12-07 22:51 ` Pablo Rodriguez
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).