diff options
author | Hans Hagen <pragma@wxs.nl> | 2001-07-11 00:00:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2001-07-11 00:00:00 +0200 |
commit | 60cc55d63b06031c0c852888fddeaff74a209011 (patch) | |
tree | e36f74ebcb4f47a78b72756fbafc50315d19601d /tex/context/base/supp-lan.tex | |
parent | 8e7b17b0b24641743f62d3f5779e79c2c25b67e0 (diff) | |
download | context-60cc55d63b06031c0c852888fddeaff74a209011.tar.gz |
stable 2001.07.11
Diffstat (limited to 'tex/context/base/supp-lan.tex')
-rw-r--r-- | tex/context/base/supp-lan.tex | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex index c1f1299a0..eba8e7735 100644 --- a/tex/context/base/supp-lan.tex +++ b/tex/context/base/supp-lan.tex @@ -714,6 +714,79 @@ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \nextnextnext} +%D Since most things in \CONTEXT\ are configurable, we +%D slightly change the previous definition so that we can +%D install new functionality outside this module. + +\def\activedododotextmodediscretionary#1#2% + {\convertargument#2\to\discretionarytoken + \def\textmodediscretionary{\getvalue{textmodediscretionary\string#1}}% + \ifx#1\nextnext % takes care of ||| and +++ and ...... + \prewordbreak\discretionary{\hbox{$#1$}}{}{\hbox{$#1$}}% + \allowbreak\postwordbreak + \def\nextnextnext{\afterassignment\egroup\let\next=}% + \else\ifx\discretionarytoken\empty + \checkafterdiscretionary + \bgroup + \checkbeforediscretionary + \prewordbreak\hbox{\textmodediscretionary\nextnext}\allowbreak\postwordbreak + \egroup + \else\expandafter\ifx\csname @tmd@\discretionarytoken\endcsname\relax + \checkafterdiscretionary + \bgroup + \checkbeforediscretionary + \prewordbreak + \discretionary{\hbox{#2}}{}{\hbox{#2}}% + \allowbreak\postwordbreak + \egroup + \else + \csname @tmd@\discretionarytoken\endcsname + \fi\fi\fi + \nextnextnext} + +\def\definetextmodediscretionary #1 + {\convertargument#1\to\ascii + \setvalue{@tmd@\ascii}} + +\definetextmodediscretionary = + {\prewordbreak\textmodediscretionary} + +\definetextmodediscretionary ~ + {\prewordbreak\discretionary{-}{}{\thinspace}\postwordbreak} + +\definetextmodediscretionary _ + {\prewordbreak\discretionary{\textmodediscretionary} + {\textmodediscretionary}{\textmodediscretionary}\prewordbreak} + +\definetextmodediscretionary ( + {\ifdim\lastskip>\zeropoint + (\prewordbreak + \else + \prewordbreak\discretionary{}{(-}{(}\prewordbreak + \fi} + +\definetextmodediscretionary ) + {\ifx\nextnext\blankspace + \prewordbreak)\relax + \else\ifx\nextnext\space + \prewordbreak)\relax + \else + \prewordbreak\discretionary{-)}{}{)}\prewordbreak + \fi\fi} + +\definetextmodediscretionary ' + {\prewordbreak\discretionary{-}{}{'}\postwordbreak} + +\definetextmodediscretionary < + {\beginofsubsentence\prewordbreak\beginofsubsentencespacing} + +\definetextmodediscretionary > + {\endofsubsentencespacing\prewordbreak\endofsubsentence} + +\definetextmodediscretionary ^ + {\prewordbreak\discretionary{\hbox{$|$}}{}{\hbox{$|$}}% + \allowbreak\postwordbreak} + %D Since we don't have to bother about active characters any %D longer, we end up with a pretty simple activating macro: |