diff options
author | Norbert Preining <preining@logic.at> | 2019-02-24 15:12:57 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2019-02-24 15:12:57 +0000 |
commit | 1314fbe93790c501dc436a5cf99f106b9e5c0f63 (patch) | |
tree | 04dc7734c8be8ffe385d41f4388826ef5857b6f9 /Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv | |
parent | eb80ce7b34f59896a1dfee5ca422495394d6677f (diff) |
Revert "ConTeXt version 2019.02.22 19:35"
This reverts commit 5c6357cdb820b4f628d036ba7b2248f221d50c0b.
git-svn-id: svn://tug.org/texlive/trunk@50112 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv | 156 |
1 files changed, 68 insertions, 88 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv b/Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv index 3ec29a782f8..eb7dc7d808b 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv +++ b/Master/texmf-dist/tex/context/base/mkiv/lang-mis.mkiv @@ -145,11 +145,7 @@ %D modules these can be tuned by a setup command. Watch the (maybe) better looking %D compound hyphen. -% hm why ex - -\ifx\compoundhyphen \undefined - \unexpanded\def\compoundhyphen {\hbox{-\kern-.10775\emwidth-}} % .25\exheight -\fi +\ifx\compoundhyphen \undefined \unexpanded\def\compoundhyphen {\hbox{-\kern-.25ex-}} \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 @@ -160,8 +156,7 @@ \ifx\postwordbreak\undefined \unexpanded\def\postwordbreak {\penalty\zerocount \hskip\zeropoint\relax} \fi \ifx\hspaceamount \undefined \def\hspaceamount#1#2{.16667\emwidth} \fi % language specific -%unexpanded\def\permithyphenation{\ifhmode\prewordbreak\fi} % doesn't remove spaces -\unexpanded\def\permithyphenation{\ifhmode\wordboundary\fi} % doesn't remove spaces +\unexpanded\def\permithyphenation{\ifhmode\prewordbreak\fi} % doesn't remove spaces %D \macros %D {beginofsubsentence,endofsubsentence, @@ -207,21 +202,22 @@ \setnewconstant\discretionarymode\plusone -\unexpanded\def\ignorediscretionaries{\discretionarymode\zerocount} -\unexpanded\def\obeydiscretionaries {\discretionarymode\plusone} +\unexpanded\def\ignorediscretionaries + {\discretionarymode\zerocount} \def\lang_discretionaries_command {% if direct if, we need \relax for lookahead in math mode \csname\??discretionarymode \ifcase\discretionarymode - n% + n% \csstring\lang_discretionaries_process_none \else\ifmmode - m% + m% \csstring\lang_discretionaries_process_math \else - t% + t% \csstring\lang_discretionaries_process_text \fi\fi \endcsname} +% \def\lang_discretionaries_process_none#1% \setvalue{\??discretionarymode n}#1% {\detokenize{#1}} @@ -234,22 +230,19 @@ \newconditional\punctafterdiscretionary \newconditional\spaceafterdiscretionary -\def\lang_discretionaries_check_before %i sused grouped +\def\lang_discretionaries_check_before {\ifvmode \dontleavehmode \fi \ifhmode - %\begingroup - %\setbox\scratchbox\lastbox - %\ifzeropt\wd\scratchbox - % \box\scratchbox\relax - % \endgroup - % \let\postwordbreak\prewordbreak - %\else - % \box\scratchbox\relax - % \endgroup - %\fi - \fi} + \begingroup + \setbox\scratchbox\lastbox + \ifzeropt\wd\scratchbox + \let\postwordbreak\prewordbreak + \fi + \box\scratchbox\relax + \endgroup + \fi} \def\lang_discretionaries_check_after {\setfalse\punctafterdiscretionary @@ -261,8 +254,10 @@ \ifx :\nextnext \settrue \punctafterdiscretionary \else \ifx ;\nextnext \settrue \punctafterdiscretionary \fi\fi\fi\fi\fi\fi} +%let\lang_discretionaries_process_math\handlemathmodediscretionary \letvalue{\??discretionarymode m}\handlemathmodediscretionary +% \def\lang_discretionaries_process_text#1% grouped ! \setvalue{\??discretionarymode t}#1% {\bgroup \let\nextnextnext\egroup @@ -283,47 +278,39 @@ \ifcsname\??discretionaryaction\string#1\endcsname \lastnamedcs \else\ifconditional\spaceafterdiscretionary - %\prewordbreak\hbox{\string#1}\relax - \wordboundary\hbox{\string#1}\relax + \prewordbreak\hbox{\string#1}\relax \else\ifconditional\punctafterdiscretionary - %\prewordbreak\hbox{\string#1}\relax - \wordboundary\hbox{\string#1}\wordboundary + \prewordbreak\hbox{\string#1}\relax \else - %\prewordbreak\hbox{\string#1}\prewordbreak - \wordboundary\hbox{\string#1}\wordboundary + \prewordbreak\hbox{\string#1}\prewordbreak \fi\fi\fi \def\nextnextnext{\afterassignment\egroup\let\next=}% \else \lang_discretionaries_check_before % the next line has been changed (20050203) - % \prewordbreak\hbox{\textmodediscretionary\nextnext}\postwordbreak + % \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak\postwordbreak % but an hbox blocks a possible \discretionary \ifcsname\??discretionaryaction\endcsname \lastnamedcs \else\ifconditional\spaceafterdiscretionary - %\prewordbreak\textmodediscretionary\relax - \wordboundary\textmodediscretionary\relax + \prewordbreak\textmodediscretionary\relax \else\ifconditional\punctafterdiscretionary - %\prewordbreak\textmodediscretionary\relax - \wordboundary\textmodediscretionary\relax + \prewordbreak\textmodediscretionary\relax \else - %\prewordbreak\textmodediscretionary\prewordbreak - \wordboundary\textmodediscretionary\wordboundary + \prewordbreak\textmodediscretionary\prewordbreak \fi\fi\fi + % \prewordbreak\textmodediscretionary\nextnext\allowbreak\postwordbreak \fi \else\ifcsname\??discretionaryaction\discretionarytoken\endcsname \lastnamedcs \else \lang_discretionaries_check_before \ifconditional\spaceafterdiscretionary - %\prewordbreak\hbox{#2}\relax - \wordboundary\hbox{#2}\relax + \prewordbreak\hbox{#2}\relax \else\ifconditional\punctafterdiscretionary - %\prewordbreak\hbox{#2}\relax - \wordboundary\hbox{#2}\relax + \prewordbreak\hbox{#2}\relax \else - %\prewordbreak\discretionary{\hbox{#2}}{}{\hbox{#2}}\postwordbreak - \wordboundary\discretionary{\hbox{#2}}{}{\hbox{#2}}\wordboundary + \prewordbreak\discretionary{\hbox{#2}}{}{\hbox{#2}}\allowbreak\postwordbreak \fi\fi \fi\fi \nextnextnext} @@ -337,33 +324,35 @@ \unexpanded\def\directdiscretionary {\csname\??discretionarymode \ifcase\discretionarymode - n% + n% \csstring\lang_discretionaries_process_none \else - d% + d% \csstring\lang_discretionaries_process_direct \fi \endcsname} \unexpanded\def\indirectdiscretionary {\csname\??discretionarymode \ifcase\discretionarymode - n% + n% \csstring\lang_discretionaries_process_none \else - i% + i% \csstring\lang_discretionaries_process_indirect \fi \endcsname} +% \unexpanded\def\lang_discretionaries_process_direct#1% \setuvalue{\??discretionarymode d}#1% {\edef\discretionarytoken{\detokenize{#1}}% \let\textmodediscretionary\compoundhyphen + %\executeifdefined{\??discretionaryaction\discretionarytoken}{\indirectdiscretionary{#1}}} \ifcsname\??discretionaryaction\discretionarytoken\endcsname \expandafter\lastnamedcs \else \expandafter\indirectdiscretionary \fi{#1}} +% \unexpanded\unexpanded\def\lang_discretionaries_process_indirect#1% \setuvalue{\??discretionarymode i}#1% - %{\prewordbreak\discretionary{\hbox{#1}}{}{\hbox{#1}}\postwordbreak} - {\wordboundary\discretionary{\hbox{#1}}{}{\hbox{#1}}\wordboundary} + {\prewordbreak\discretionary{\hbox{#1}}{}{\hbox{#1}}\allowbreak\postwordbreak} \unexpanded\def\definetextmodediscretionary #1 {\setvalue{\??discretionaryaction\detokenize{#1}}} @@ -387,14 +376,11 @@ \def\lang_discretionaries_hyphen_like#1#2% {\ifconditional\spaceafterdiscretionary - %prewordbreak\hbox{#1}\relax - \wordboundary\hbox{#1}\relax + \prewordbreak\hbox{#1}\relax \else\ifconditional\punctafterdiscretionary - %prewordbreak\hbox{#1}\relax - \wordboundary\hbox{#1}\relax + \prewordbreak\hbox{#1}\relax \else - %\prewordbreak#2\postwordbreak % was prewordbreak - \wordboundary#2\wordboundary + \prewordbreak#2\postwordbreak % was prewordbreak \fi\fi} \definetextmodediscretionary {} @@ -411,65 +397,59 @@ \definetextmodediscretionary ( {\ifdim\lastskip>\zeropoint - %(\prewordbreak - (\wordboundary + (\prewordbreak \else - %\prewordbreak\discretionary{}{(-}{(}\prewordbreak - \wordboundary\discretionary{}{(-}{(}\wordboundary + \prewordbreak\discretionary{}{(-}{(}\prewordbreak \fi} \definetextmodediscretionary ~ - %{\prewordbreak\discretionary{-}{}{\thinspace}\postwordbreak} - {\wordboundary\discretionary{-}{}{\thinspace}\wordboundary} + {\prewordbreak\discretionary{-}{}{\thinspace}\postwordbreak} \definetextmodediscretionary ' - %{\prewordbreak\discretionary{-}{}{'}\postwordbreak} - {\wordboundary\discretionary{-}{}{'}\wordboundary} + {\prewordbreak\discretionary{-}{}{'}\postwordbreak} \definetextmodediscretionary ^ - %{\prewordbreak\discretionary{\hbox{\normalstartimath|\normalstopimath}}{}{\hbox{\normalstartimath|\normalstopimath}}% - % \postwordbreak} % bugged - {\wordboundary\discretionary{\hbox{\normalstartimath|\normalstopimath}}{}{\hbox{\normalstartimath|\normalstopimath}}% - \wordboundary} % bugged + {\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\wordboundary\beginofsubsentencespacing + {\beginofsubsentence\prewordbreak\beginofsubsentencespacing \aftergroup\ignorespaces} % tricky, we need to go over the \nextnextnext \definetextmodediscretionary > {\removeunwantedspaces - %\endofsubsentencespacing\prewordbreak\endofsubsentence} - \endofsubsentencespacing\wordboundary\endofsubsentence} + \endofsubsentencespacing\prewordbreak\endofsubsentence} \definetextmodediscretionary = {\removeunwantedspaces - %\prewordbreak\midsentence\prewordbreak - \wordboundary\midsentence\wordboundary + \prewordbreak\midsentence\prewordbreak \aftergroup\ignorespaces} % french -%definetextmodediscretionary : {\removeunwantedspaces\prewordbreak\kern\hspaceamount\empty{:}:} -%definetextmodediscretionary ; {\removeunwantedspaces\prewordbreak\kern\hspaceamount\empty{;};} -%definetextmodediscretionary ? {\removeunwantedspaces\prewordbreak\kern\hspaceamount\empty{?}?} -%definetextmodediscretionary ! {\removeunwantedspaces\prewordbreak\kern\hspaceamount\empty{!}!} - -\definetextmodediscretionary : {\removeunwantedspaces\wordboundary\kern\hspaceamount\empty{:}:} -\definetextmodediscretionary ; {\removeunwantedspaces\wordboundary\kern\hspaceamount\empty{;};} -\definetextmodediscretionary ? {\removeunwantedspaces\wordboundary\kern\hspaceamount\empty{?}?} -\definetextmodediscretionary ! {\removeunwantedspaces\wordboundary\kern\hspaceamount\empty{!}!} +\definetextmodediscretionary : {\removeunwantedspaces\prewordbreak\kern\hspaceamount\empty{:}:} +\definetextmodediscretionary ; {\removeunwantedspaces\prewordbreak\kern\hspaceamount\empty{;};} +\definetextmodediscretionary ? {\removeunwantedspaces\prewordbreak\kern\hspaceamount\empty{?}?} +\definetextmodediscretionary ! {\removeunwantedspaces\prewordbreak\kern\hspaceamount\empty{!}!} -%definetextmodediscretionary * {\prewordbreak\discretionary{-}{}{\kern.05\emwidth}\prewordbreak} -\definetextmodediscretionary * {\wordboundary\discretionary{-}{}{\kern.05\emwidth}\wordboundary} +\definetextmodediscretionary * + {\prewordbreak\discretionary{-}{}{\kern.05em}\prewordbreak} % spanish -%definetextmodediscretionary ?? {\prewordbreak\questiondown} -%definetextmodediscretionary !! {\prewordbreak\exclamdown} +\definetextmodediscretionary ?? {\prewordbreak\questiondown} +\definetextmodediscretionary !! {\prewordbreak\exclamdown} -\definetextmodediscretionary ?? {\wordboundary\questiondown} -\definetextmodediscretionary !! {\wordboundary\exclamdown} +% \ifx\normalcompound\undefined \let\normalcompound=| \fi %D \installdiscretionary | + %D \installdiscretionary + = |