diff options
Diffstat (limited to 'tex/context/base/lang-url.tex')
-rw-r--r-- | tex/context/base/lang-url.tex | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/tex/context/base/lang-url.tex b/tex/context/base/lang-url.tex new file mode 100644 index 000000000..552dae571 --- /dev/null +++ b/tex/context/base/lang-url.tex @@ -0,0 +1,70 @@ +%D \module +%D [ file=lang-url, +%D version=2008.01.22, % used to be lang-mis +%D title=\CONTEXT\ Language Macros, +%D subtitle=Language Options, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{Context Language Macros / URL} + +\loadmarkfile{lang-url} + +\unprotect + +\ifx\urlsplitmode\undefined \chardef\urlsplitmode\zerocount \fi % not supported in mkiv + +%D \macros +%D {hyphenatedurl} +%D +%D For those who want to put full \URL's in a text, we offer +%D +%D \startbuffer +%D \hyphenatedurl{http://optimist.optimist/optimist/optimist.optimist#optimist} +%D \stopbuffer +%D +%D \typebuffer +%D +%D which breaks at the appropriate places. Watch the \type{#} +%D hack. +%D +%D When passed as argument, like in \type {\goto}, one needs +%D to substitute a \type {\\} for each \type{#}. +%D +%D \startbuffer +%D \hyphenatedurl{http://this.is.a.rather/strange/reference#indeed} +%D \stopbuffer +%D +%D \typebuffer + +\ifx\hyphenatedurl\undefined \let\hyphenatedurl\firstofoneargument \fi + +%D \macros +%D {hyphenatedfile} +%D +%D For the moment we treat filenames in a similar way, +%D +%D \starttyping +%D \hyphenatedfile{here/there/filename.suffix} +%D \stoptyping + +\ifx\hyphenatedfile\undefined \let\hyphenatedfile\hyphenatedurl \fi + +% \def\test#1% +% {\dontleavehmode +% \begingroup +% \tttf +% \hyphenatedurl {% +% \letterampersand #1\letterampersand #1\letterampersand #1\letterampersand #1\letterampersand +% \letterhash #1\letterhash #1\letterpercent #1\letterslash #1\letterampersand +% }% +% \endgroup} + +% \dorecurse{100}{\test{a} \test{ab} \test{abc} \test{abcd} \test{abcde} \test{abcdef}} + +\protect \endinput |