diff options
author | Marius <mariausol@gmail.com> | 2011-11-21 19:40:15 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-11-21 19:40:15 +0200 |
commit | 411958915524daa27f2ef8cd6299b31191d88572 (patch) | |
tree | 38a8d7efa7a757c8afdd92bbb17af4d72d9e8d4e /tex/context/base/lang-url.mkiv | |
parent | ed9ce64970b8efbaf358d7383eb4b65277201756 (diff) | |
download | context-411958915524daa27f2ef8cd6299b31191d88572.tar.gz |
beta 2011.11.21 18:27
Diffstat (limited to 'tex/context/base/lang-url.mkiv')
-rw-r--r-- | tex/context/base/lang-url.mkiv | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/tex/context/base/lang-url.mkiv b/tex/context/base/lang-url.mkiv index d34b33bd5..23178a2a2 100644 --- a/tex/context/base/lang-url.mkiv +++ b/tex/context/base/lang-url.mkiv @@ -57,14 +57,28 @@ \def\hyphenatedurlseparator{} % \periodcentered -\def\dohyphenatedurlafter #1{\char#1\discretionary{}{\hyphenatedurlseparator}{}}% -\def\dohyphenatedurlbefore#1{\discretionary{\hyphenatedurlseparator}{}{}\char#1\relax}% -\def\dohyphenatedurlnormal#1{\char#1\relax}% -\def\dohyphenatedurldisc #1{\discretionary{}{}{}} - -\def\sethyphenatedurlnormal #1{\ctxcommand{hyphenatedurl.setcharacters(\!!bs#1\!!es,0)}} -\def\sethyphenatedurlbefore #1{\ctxcommand{hyphenatedurl.setcharacters(\!!bs#1\!!es,1)}} -\def\sethyphenatedurlafter #1{\ctxcommand{hyphenatedurl.setcharacters(\!!bs#1\!!es,2)}} +\def\dohyphenatedurlspace {\nobreak\hskip\zeropoint plus\onepoint\nobreak} +\def\dohyphenatedurlafter #1{\char#1\discretionary{}{\hyphenatedurlseparator}{}} +\def\dohyphenatedurlbefore #1{\discretionary{\hyphenatedurlseparator}{}{}\char#1\relax} +\def\dohyphenatedurlnormal #1{\char#1\relax} +\def\dohyphenatedurldisc #1{\discretionary{}{}{}} + +\def\dohyphenatedurlspace_trace {\nobreak\begingroup\darkyellow\ruledhskip\zeropoint plus\onepoint\endgroup\nobreak} +\def\dohyphenatedurlafter_trace #1{\char#1\hsmash{\darkblue\vl}\discretionary{}{\hyphenatedurlseparator}{}} +\def\dohyphenatedurlbefore_trace#1{\discretionary{\hyphenatedurlseparator}{}{}\hsmash{\darkred\vl}\char#1\relax} +\def\dohyphenatedurlnormal_trace#1{\char#1\relax} +\def\dohyphenatedurldisc_trace #1{\discretionary{\hsmash{\darkgreen\vl}}{\hsmash{\darkgreen\vl}}{\hsmash{\darkgreen\vl}}} + +\def\showhyphenatedurlbreaks + {\let\dohyphenatedurlspace \dohyphenatedurlspace_trace + \let\dohyphenatedurlafter \dohyphenatedurlafter_trace + \let\dohyphenatedurlbefore\dohyphenatedurlbefore_trace + \let\dohyphenatedurlnormal\dohyphenatedurlnormal_trace + \let\dohyphenatedurldisc \dohyphenatedurldisc_trace} + +\def\sethyphenatedurlnormal#1{\ctxcommand{hyphenatedurl.setcharacters(\!!bs#1\!!es,0)}} +\def\sethyphenatedurlbefore#1{\ctxcommand{hyphenatedurl.setcharacters(\!!bs#1\!!es,1)}} +\def\sethyphenatedurlafter #1{\ctxcommand{hyphenatedurl.setcharacters(\!!bs#1\!!es,2)}} \def\hyphenatedurldiscretionary{} @@ -77,6 +91,8 @@ {\dontleavehmode \begingroup \the\everyhyphenatedurl + \language\zerocount + \let\s\dohyphenatedurlspace \let\n\dohyphenatedurlnormal \let\b\dohyphenatedurlbefore \let\a\dohyphenatedurlafter |