diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-08-09 20:27:33 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-08-09 20:27:33 +0200 |
commit | 88dab5316e045e6bc15826f6b791b24abaf93d35 (patch) | |
tree | 306f6a6f19e6ee044d645fe8de7732f3db7267bc /tex/context/base/mkiv/lang-ini.mkxl | |
parent | 30c6dc99b093fcf351f64974778d40c69aba08af (diff) | |
download | context-88dab5316e045e6bc15826f6b791b24abaf93d35.tar.gz |
2020-08-09 19:54:00
Diffstat (limited to 'tex/context/base/mkiv/lang-ini.mkxl')
-rw-r--r-- | tex/context/base/mkiv/lang-ini.mkxl | 51 |
1 files changed, 40 insertions, 11 deletions
diff --git a/tex/context/base/mkiv/lang-ini.mkxl b/tex/context/base/mkiv/lang-ini.mkxl index 490d35997..b7a589b47 100644 --- a/tex/context/base/mkiv/lang-ini.mkxl +++ b/tex/context/base/mkiv/lang-ini.mkxl @@ -409,6 +409,46 @@ \newcount\hyphenstate \newcount\hyphenminoffset +% This is the old implementation: a hack that sets the min values, because we want +% to keep the language set: +% +% \unexpanded\def\nohyphens % nicer for url's +% {\ifx\dohyphens\relax +% \unexpanded\edef\dohyphens +% {\hyphenminoffset\the\hyphenminoffset\relax +% \lang_basics_synchronize_min_max}% +% \fi +% \hyphenminoffset\plusthousand +% \lang_basics_synchronize_min_max} +% +% \let\dohyphens\relax + +% But this one is nicer because we do keep the language set as well as don't mess +% with the min values (it's more efficient too). We might get some more bits in +% this mode (engine specific). +% +% \let \hyphenationenabledcode \plusone +% \let \hyphenationuppercasecode \plustwo +% +% \protected\def\dohyphens +% {\hyphenationmode \numexpr +% \hyphenationenabledcode +% +\hyphenationuppercasecode +% \relax} + +\unexpanded\def\dohyphens{\hyphenationmode\plusthree} +\unexpanded\def\nohyphens{\hyphenationmode\zerocount} + +\unexpanded\def\usehyphensparameter#1% + {\edef\p_hyphens{#1\c!hyphens}% + \ifx\p_hyhens\v!no + \nohyphens + \fi} + +\dohyphens + +%D The rest stays the same as in mkiv: + \unexpanded\def\lesshyphens {\advance\hyphenminoffset\plusone \lang_basics_synchronize_min_max} @@ -419,17 +459,6 @@ \fi \lang_basics_synchronize_min_max} -\unexpanded\def\nohyphens % nicer for url's - {\ifx\dohyphens\relax - \unexpanded\edef\dohyphens - {\hyphenminoffset\the\hyphenminoffset\relax - \lang_basics_synchronize_min_max}% - \fi - \hyphenminoffset\plusthousand - \lang_basics_synchronize_min_max} - -\let\dohyphens\relax - \unexpanded\def\lang_basics_synchronize_min_max % maybe store this at the lua end {% these values are stored along with glyph nodes \lefthyphenmin \numexpr0\languageparameter\s!lefthyphenmin +\hyphenminoffset\relax |