On Mon, 25 Oct 2010, Steffen Wolfrum wrote:
Am 25.10.2010 um 19:30 schrieb Aditya Mahajan:
On Mon, 25 Oct 2010, Steffen Wolfrum wrote:
Hi,
the "%" is a frequently used character in URL. But \hyphenatedurl{} can deal with it ...
Does someone has a fix?
\starttext text\footnote{test \hyphenatedurl{www.test%it.com} test.} text. \stoptext
An extreme solution:
\startcatcodetable \txtcatcodes \catcode`\^^I = 10 \catcode`\^^M = 5 \catcode`\^^L = 5 \catcode`\ = 10 \catcode`\^^Z = 9 \catcode`\\ = 0 \catcode`\{ = 1 \catcode`\} = 2 % \catcode`\% = 14 \stopcatcodetable \starttext \asciimode text\footnote{test \hyphenatedurl{www.test%it.com} test.} text. \stoptext
As I don't have any experience with "\asciimode" "I am not sure if I can map this entirely on a complex book project...
In addition to usual asciimode, I changed the definition so that % does not have its usual meaning. So, % is no longer a comment; it just typesets percentage sign. You can get a comment using \starthiding ... \stophiding.
Any known side-effects?
* You need to use \math{...} to go into math mode. $ will just give a dollar. * You need \startformula ... \stopformula to go into display math. $$...$$ will just print dollars. * _ in text mode will produce an underscore instead of an error. _ in math mode will work fine. The same for ^. * You need \starttex(something) (I don't remember on the top of my head) \def\whatever#1{...} \stoptex(something) to change the definition of a macro. I have never really tested it on a large document. Maybe you can just add this and see if everything compiles. Aditya