diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-01-14 17:29:49 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-01-14 17:29:49 +0100 |
commit | a16cd078a5cc00d7c789093b5209b6f8d2dfdb1a (patch) | |
tree | 3385cd79be0c9b3b66ed3c465b03eefc92001b21 /tex/context/base/mkiv/lang-mis.mkiv | |
parent | 52c5102fab837626fe9bb359b3eda6066e1a968e (diff) | |
download | context-a16cd078a5cc00d7c789093b5209b6f8d2dfdb1a.tar.gz |
2018-01-14 16:05:00
Diffstat (limited to 'tex/context/base/mkiv/lang-mis.mkiv')
-rw-r--r-- | tex/context/base/mkiv/lang-mis.mkiv | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/tex/context/base/mkiv/lang-mis.mkiv b/tex/context/base/mkiv/lang-mis.mkiv index e8609ec04..eb7dc7d80 100644 --- a/tex/context/base/mkiv/lang-mis.mkiv +++ b/tex/context/base/mkiv/lang-mis.mkiv @@ -139,16 +139,13 @@ %D \stop %D \macros -%D {compoundhyphen, -%D beginofsubsentence,endofsubsentence} +%D {compoundhyphen} %D %D Now let's go to the macros. First we define some variables. In the main \CONTEXT\ %D modules these can be tuned by a setup command. Watch the (maybe) better looking %D compound hyphen. \ifx\compoundhyphen \undefined \unexpanded\def\compoundhyphen {\hbox{-\kern-.25ex-}} \fi -\ifx\beginofsubsentence\undefined \unexpanded\def\beginofsubsentence{\hbox{\emdash}} \fi -\ifx\endofsubsentence \undefined \unexpanded\def\endofsubsentence {\hbox{\emdash}} \fi %D The last two variables are needed for subsentences |<|like this one|>| which we %D did not yet mention. We want to enable breaking but at the same time don't want @@ -162,14 +159,17 @@ \unexpanded\def\permithyphenation{\ifhmode\prewordbreak\fi} % doesn't remove spaces %D \macros -%D {beginofsubsentencespacing,endofsubsentencespacing} +%D {beginofsubsentence,endofsubsentence, +%D beginofsubsentencespacing,endofsubsentencespacing} %D %D In the previous macros we provided two hooks which can be used to support nested %D sub||sentences. In \CONTEXT\ these hooks are used to insert a small space when %D needed. -\ifx\beginofsubsentencespacing\undefined \let\beginofsubsentencespacing\relax \fi -\ifx\endofsubsentencespacing \undefined \let\endofsubsentencespacing \relax \fi +% \ifx\beginofsubsentence \undefined \unexpanded\def\beginofsubsentence{\hbox{\emdash}} \fi +% \ifx\endofsubsentence \undefined \unexpanded\def\endofsubsentence {\hbox{\emdash}} \fi +% \ifx\beginofsubsentencespacing\undefined \let\beginofsubsentencespacing\relax \fi +% \ifx\endofsubsentencespacing \undefined \let\endofsubsentencespacing \relax \fi %D The following piece of code is a torture test compound handling. The \type %D {\relax} before the \type {\ifmmode} is needed because of the alignment scanner @@ -313,7 +313,7 @@ \prewordbreak\discretionary{\hbox{#2}}{}{\hbox{#2}}\allowbreak\postwordbreak \fi\fi \fi\fi - \nextnextnext} % lookahead in commands + \nextnextnext} %D \macros %D {directdiscretionary} @@ -412,14 +412,27 @@ {\prewordbreak\discretionary{\hbox{\normalstartimath|\normalstopimath}}{}{\hbox{\normalstartimath|\normalstopimath}}% \allowbreak\postwordbreak} % bugged +% \definetextmodediscretionary < +% {\beginofsubsentence\prewordbreak\beginofsubsentencespacing} +% +% \definetextmodediscretionary > +% {\endofsubsentencespacing\prewordbreak\endofsubsentence} +% +% \definetextmodediscretionary = +% {\prewordbreak\midsentence\prewordbreak} + \definetextmodediscretionary < - {\beginofsubsentence\prewordbreak\beginofsubsentencespacing} + {\beginofsubsentence\prewordbreak\beginofsubsentencespacing + \aftergroup\ignorespaces} % tricky, we need to go over the \nextnextnext \definetextmodediscretionary > - {\endofsubsentencespacing\prewordbreak\endofsubsentence} + {\removeunwantedspaces + \endofsubsentencespacing\prewordbreak\endofsubsentence} \definetextmodediscretionary = - {\prewordbreak\midsentence\prewordbreak} % {\prewordbreak\compoundhyphen} + {\removeunwantedspaces + \prewordbreak\midsentence\prewordbreak + \aftergroup\ignorespaces} % french |