ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez <oinos@gmx.es>
To: ntg-context@ntg.nl
Subject: Re: (My) problem with percent sign in URLs
Date: Mon, 14 Aug 2017 21:52:20 +0200	[thread overview]
Message-ID: <94e26a17-c0e6-2d72-9693-0febd785cdb6@gmx.es> (raw)
In-Reply-To: <20170814162758.GC6614@akela.mendelu.cz>

On 08/14/2017 06:27 PM, Tomas Hala wrote:
> Hi all,
> 
> I came across the problem with typesetting long URLs containing special
> characters transformed to hexadecimal form. Hyphenation of URLs is needed. 
> 
> Minimal examples (URL taken from our garden and adopted):
> 
> 1. \hyphenatedurl{http://bits.blogs.nytimes.com/2010/03/05/a-former-book-designer-says-good-riddance-to-print/?hpw\%20hpw}

Hi Tomas,

I think \letterpercent is what you need.

Inside a little more complex sample:

    \setupinteraction[state=start]
    \unexpanded\def\mypersonalurl#1{%
            \bgroup\tt\goto{\hyphenatedurl{#1}}[url(#1)]\egroup}
    \starttext
    \hsize\zeropoint

\mypersonalurl{http://bits.blogs.nytimes.com/2010/03/05/a-former-book-designer-says-good-riddance-to-print/?hpw\letterpercent20hpw}
    \stoptext

Please update the garden (another command is \letterhash), when the
reply solved your problem.

Many thanks (for the update ;-)),

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2017-08-14 19:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-14 16:27 Tomas Hala
2017-08-14 19:52 ` Pablo Rodriguez [this message]
2017-08-15  8:25   ` Tomas Hala
2017-08-15  8:36     ` Aditya Mahajan
2017-08-15 16:12       ` Tomas Hala
2017-08-15 16:52   ` (My) problem with percent sign in URLs -- about Wiki Tomas Hala
2017-08-15 17:07     ` Wolfgang Schuster
2017-08-15 18:28       ` Alan Braslau
2017-08-15 19:07         ` Pablo Rodriguez
2017-08-15 18:55       ` Pablo Rodriguez
2017-08-15 19:49         ` Tomas Hala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=94e26a17-c0e6-2d72-9693-0febd785cdb6@gmx.es \
    --to=oinos@gmx.es \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).