* escaping % in urls
@ 2012-01-01 13:26 Pablo Rodríguez
2012-01-01 13:46 ` Khaled Hosny
2012-01-01 13:48 ` Peter Münster
0 siblings, 2 replies; 5+ messages in thread
From: Pablo Rodríguez @ 2012-01-01 13:26 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi there,
I have the following sample:
\define[1]\url{\goto{\hyphenatedurl{#1}}[url(#1)]}
\starttext
\url{http://buscon.rae.es/dpdI/SrvltGUIBusDPD?lema=puntos\%20suspensivos}
\stoptext
in which I try to escape %, but using the above approach I also get the
\ printed.
Which is the proper way to do it? (Not replacing %20 with a blank space.)
Thanks for your help,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: escaping % in urls
2012-01-01 13:26 escaping % in urls Pablo Rodríguez
@ 2012-01-01 13:46 ` Khaled Hosny
2012-01-01 14:34 ` Pablo Rodríguez
2012-01-01 13:48 ` Peter Münster
1 sibling, 1 reply; 5+ messages in thread
From: Khaled Hosny @ 2012-01-01 13:46 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sun, Jan 01, 2012 at 02:26:39PM +0100, Pablo Rodríguez wrote:
> Hi there,
>
> I have the following sample:
>
> \define[1]\url{\goto{\hyphenatedurl{#1}}[url(#1)]}
> \starttext
> \url{http://buscon.rae.es/dpdI/SrvltGUIBusDPD?lema=puntos\%20suspensivos}
> \stoptext
>
> in which I try to escape %, but using the above approach I also get the
> \ printed.
>
> Which is the proper way to do it? (Not replacing %20 with a blank space.)
I use \asciimode which leaves only 3 special characters \ { }, and the
rest (including # and %) can be used normally. But then, your \define
should be before \asciimode or moved to environment file. %% can be used
as comment char.
Regards,
Khaled
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: escaping % in urls
2012-01-01 13:46 ` Khaled Hosny
@ 2012-01-01 14:34 ` Pablo Rodríguez
0 siblings, 0 replies; 5+ messages in thread
From: Pablo Rodríguez @ 2012-01-01 14:34 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 01/01/2012 02:46 PM, Khaled Hosny wrote:
> On Sun, Jan 01, 2012 at 02:26:39PM +0100, Pablo Rodríguez wrote:
>> Hi there,
>>
>> I have the following sample:
>>
>> \define[1]\url{\goto{\hyphenatedurl{#1}}[url(#1)]}
>> \starttext
>> \url{http://buscon.rae.es/dpdI/SrvltGUIBusDPD?lema=puntos\%20suspensivos}
>> \stoptext
>>
>> in which I try to escape %, but using the above approach I also get the
>> \ printed.
>>
>> Which is the proper way to do it? (Not replacing %20 with a blank space.)
>
> I use \asciimode which leaves only 3 special characters \ { }, and the
> rest (including # and %) can be used normally. But then, your \define
> should be before \asciimode or moved to environment file. %% can be used
> as comment char.
Thanks for your reply, Kahled.
Typing \asciimode after \starttext does the job.
Thank again,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: escaping % in urls
2012-01-01 13:26 escaping % in urls Pablo Rodríguez
2012-01-01 13:46 ` Khaled Hosny
@ 2012-01-01 13:48 ` Peter Münster
2012-01-01 14:34 ` Pablo Rodríguez
1 sibling, 1 reply; 5+ messages in thread
From: Peter Münster @ 2012-01-01 13:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sun, Jan 01 2012, Pablo Rodríguez wrote:
> Which is the proper way to do it? (Not replacing %20 with a blank space.)
This works (I don't know, if proper way or not...):
\startasciimode
\url{http://buscon.rae.es/dpdI/SrvltGUIBusDPD?lema=puntos%20suspensivos}
\stopasciimode
or
\url{http://buscon.rae.es/dpdI/SrvltGUIBusDPD?lema=puntos\letterpercent20suspensivos}
--
Peter
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-01 14:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-01 13:26 escaping % in urls Pablo Rodríguez
2012-01-01 13:46 ` Khaled Hosny
2012-01-01 14:34 ` Pablo Rodríguez
2012-01-01 13:48 ` Peter Münster
2012-01-01 14:34 ` Pablo Rodríguez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).