summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/lang-url.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/lang-url.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/lang-url.mkiv73
1 files changed, 52 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/context/base/lang-url.mkiv b/Master/texmf-dist/tex/context/base/lang-url.mkiv
index 8990dccd86f..e7d62ba016c 100644
--- a/Master/texmf-dist/tex/context/base/lang-url.mkiv
+++ b/Master/texmf-dist/tex/context/base/lang-url.mkiv
@@ -44,18 +44,21 @@
\newtoks\everyhyphenatedurl
\appendtoks
- \let\&\letterampersand
- \let\#\letterhash
- \let\~\lettertilde
- \let\\\letterbackslash
- \let\$\letterdollar
- \let\^\letterhat
- \let\_\letterunderscore
- \let\{\letterleftbrace
- \let\}\letterrightbrace
- \let\|\letterbar
- \let~=\lettertilde
- \let|=\letterbar
+ \resetfontfeature
+ \resetcharacterspacing
+ %
+ \let\&\letterampersand
+ \let\#\letterhash
+ \let\~\lettertilde
+ \let\\\letterbackslash
+ \let\$\letterdollar
+ \let\^\letterhat
+ \let\_\letterunderscore
+ \let\{\letterleftbrace
+ \let\}\letterrightbrace
+ \let\|\letterbar
+ \let~=\lettertilde
+ \let|=\letterbar
\to \everyhyphenatedurl
\let\hyphenatedurlseparator \empty % \periodcentered
@@ -86,9 +89,9 @@
\let\lang_url_show\relax
-\unexpanded\def\sethyphenatedurlnormal#1{\ctxcommand{hyphenatedurl.setcharacters(\!!bs#1\!!es,0)}} % Lua names will change
-\unexpanded\def\sethyphenatedurlbefore#1{\ctxcommand{hyphenatedurl.setcharacters(\!!bs#1\!!es,1)}} % Lua names will change
-\unexpanded\def\sethyphenatedurlafter #1{\ctxcommand{hyphenatedurl.setcharacters(\!!bs#1\!!es,2)}} % Lua names will change
+\unexpanded\def\sethyphenatedurlnormal#1{\clf_sethyphenatedurlcharacters{#1}{\v!normal}}
+\unexpanded\def\sethyphenatedurlbefore#1{\clf_sethyphenatedurlcharacters{#1}{\v!before}}
+\unexpanded\def\sethyphenatedurlafter #1{\clf_sethyphenatedurlcharacters{#1}{\v!after }}
% \sethyphenatedurlafter{ABCDEF}
@@ -106,12 +109,12 @@
\let\C\lang_url_C % character_nobreak
\scratchskipone\zeropoint\s!plus\dimexpr\emwidth/12\s!minus\dimexpr\emwidth/24\relax % 1.00pt @ 12pt
\scratchskiptwo\zeropoint\s!plus\dimexpr\emwidth/48\s!minus\dimexpr\emwidth/96\relax % 0.25pt @ 12pt
- \normalexpanded{\noexpand\ctxcommand{hyphenatedurl(
- \!!bs\noexpand\detokenize{#1}\!!es,
- \number\hyphenatedurllefthyphenmin,
- \number\hyphenatedurlrighthyphenmin,
- "\hyphenatedurldiscretionary"
- )}}%
+ \normalexpanded{\noexpand\clf_hyphenatedurl
+ {\noexpand\detokenize{#1}}%
+ \hyphenatedurllefthyphenmin
+ \hyphenatedurlrighthyphenmin
+ {\hyphenatedurldiscretionary}%
+ }%
\endgroup}
%D \macros
@@ -138,3 +141,31 @@
% \dorecurse{100}{\test{a} \test{ab} \test{abc} \test{abcd} \test{abcde} \test{abcdef}}
\protect \endinput
+
+% \setuppapersize[A7]
+%
+% \unexpanded\def\WhateverA#1%
+% {\dontleavehmode
+% \begingroup
+% \prehyphenchar"B7\relax
+% \setbox\scratchbox\hbox{\tttf#1}%
+% \prehyphenchar`-\relax
+% \unhbox\scratchbox
+% \endgroup}
+%
+% \unexpanded\def\WhateverB#1%
+% {\dontleavehmode
+% \begingroup
+% \tttf
+% \prehyphenchar\minusone
+% % \localrightbox{\llap{_}}%
+% \localrightbox{\llap{\smash{\lower1.5ex\hbox{\char"2192}}}}%
+% \setbox\scratchbox\hbox{#1}%
+% \prehyphenchar`-\relax
+% \unhbox\scratchbox
+% \endgroup}
+%
+% \begingroup \hsize1cm
+% \WhateverA{thisisaboringandverylongcommand}\par
+% \WhateverB{thisisaboringandverylongcommand}\par
+% \endgroup