diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-01-24 15:11:58 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-01-24 15:11:58 +0100 |
commit | b47e8c2cdeeab0bcdb1c4c32328c933f3f8599de (patch) | |
tree | 8e32282155744f2b0a812eff2fe88bbc919a70b4 /tex/context/base/mkxl/spac-prf.mklx | |
parent | 0caec226a633182402b349c3ac5b3bf9e0bc76c2 (diff) | |
download | context-b47e8c2cdeeab0bcdb1c4c32328c933f3f8599de.tar.gz |
2023-01-24 13:50:00
Diffstat (limited to 'tex/context/base/mkxl/spac-prf.mklx')
-rw-r--r-- | tex/context/base/mkxl/spac-prf.mklx | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/tex/context/base/mkxl/spac-prf.mklx b/tex/context/base/mkxl/spac-prf.mklx index 824b14ca7..fc3e4ae22 100644 --- a/tex/context/base/mkxl/spac-prf.mklx +++ b/tex/context/base/mkxl/spac-prf.mklx @@ -20,11 +20,7 @@ \unprotect -\doiffileelse{spac-prf-new.lmt}{ - \registerctxluafile{spac-prf-new}{autosuffix} -} { - \registerctxluafile{spac-prf}{autosuffix} -} +\registerctxluafile{spac-prf}{autosuffix} \definesystemattribute[profilemethod][public] @@ -86,7 +82,7 @@ \edef\currentprofile{#profile}% \fi \spac_profile_set - \par + \profileparameter\c!before} \protected\def\spac_profile_stop @@ -150,4 +146,40 @@ \defineprofile[quarterfixed][\v!fixed][\c!factor=\plusfour] \defineprofile[eightsfixed] [\v!fixed][\c!factor=\pluseight] +% Finally some follow up on this experiment: + +\definesystemattribute[lineprofile] [public] + +\installcorenamespace {lineprofile} + +\installcommandhandler \??lineprofile {lineprofile} \??lineprofile + +\setuplineprofile + [\c!method=\v!a, + \c!step=.5\emwidth, % maybe 2pt + \c!factor=.125] % maybe 0.250 + +\def\spac_line_profile_set + {\clf_setlineprofile + name {\currentlineprofile}% + step \dimexpr\lineprofileparameter\c!step\relax + factor {\lineprofileparameter\c!factor} + method {\lineprofileparameter\c!method}% + \relax} + +\permanent\tolerant\protected\def\setlineprofile[#profile]% + {\edef\currentlineprofile{#profile}% + \spac_line_profile_set} + +\permanent\protected\def\resetlineprofile + {\c_attr_lineprofile\attributeunsetvalue} + +\permanent\protected\def\setmainlineprofile + {\lettonothing\currentlineprofile + \clf_setlineprofile} + +\appendtoks + \c_attr_lineprofile\attributeunsetvalue % or in general resetter +\to \everyforgetall + \protect \endinput |