Changes

Jump to navigation Jump to search
1,161 bytes added ,  14:32, 16 August 2017
add Avoid Escaping Characters
=== Escaping of Special Characters ===
 
You might be interested in [[URL#Avoid_Escaping_Characters|not escaping characters]].
Note that special characters, eg hash sign, percent sign, must be escaped by backslash.
Send mail to \MailTo{foo@bar.zzz}{Mr. Foo}
</context>
 
=== Avoid Escaping Characters ===
 
In case you don’t want to escape characters from your URLs, you might want to use the following command:
 
<context source="yes">
\setupinteraction[state=start]
\setupnote[footnote][location=text]
\setupnotation[footnote][alternative=serried, numbercommand=\tfx]
\unexpanded\def\mypersonalurl#1{%
\bgroup\tt\goto{\hyphenatedurl{#1}}[url(#1)]\egroup}
\starttext
\startasciimode
\mypersonalurl{http://a.b?hpw%20h#pw}
\stopasciimode
\startasciimode
\footnote{\mypersonalurl{http://a.b?hpw%20h#pw}}
\stopasciimode
\placenotes[footnote]
\stoptext
</context>
 
But you have to consider one option to make it work:
 
* Setting <cmd>asciimode</cmd> for the whole document.<p>Comments won’t work, because <code>%</code> will be considered a standard character.</p>
 
* Wrapping all URLs inside <cmd>startasciimode</cmd>...<cmd>stopasciimode</cmd>.<p>If you use URLs inside footnotes, it is the whole footnote which has to be inside the pair of commands.</p><p>Comments inside the mode won’t work.</p>
=== External Links ===
139

edits

Navigation menu