Hi Pablo,

On 2011-10-02 12:58, Pablo Rodríguez wrote:
> Hi there,
> 
> I'm a ConTeXt newbie that I have the following options and a command for
> URLs in the document preamble (what comes before \starttext [I don't
> know if it is named so in ConTeXt]):
> 
>       \definefontfeature[default][default][onum=yes]
>       \setupbodyfontenvironment[default][em=italic]
>       \setupinteraction[state=start,color=,style=
>               em,contrastcolor=,focus=standard]
> 
>       \def\href#1{\goto{\hyphenatedurl{#1}}[url(#1)]}

·································································

\definefontfeature[default][default][onum=yes]
\setupbodyfontenvironment[default][em=italic]
\setupinteraction[state=start,color=,style=em,contrastcolor=,focus=standard]

%%% First, define the switch for text figures:
\definefontfeature[url][default][onum=no]

%%% Best use context’s default url commands:
\useURL[aurl][http://www.pragma-ade.com/download-1.htm]

%%% It comes with a proper setup for everything.
\setupurl[style={\tf\addff{url}}]

%%% If you must use the “href” macro, disable the font feature locally.
\define[1]\href{%
  \begingroup
    \addff{url}%
    \goto{\hyphenatedurl{#1}}[url(#1)]%
  \endgroup%
}

\starttext

42
%%% With the internal command:
\from[aurl]
42
%%% Your way:
\href{0123456789abcdef}
42

\stoptext

·································································

HTH, Philipp


> 
> My question is: how can I disable old style numbers for the \href command?
> 
> 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
> ___________________________________________________________________________________

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Attachment: pgpCYM2U1Y0jr.pgp
Description: PGP signature

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to