ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Philipp Gesang <gesang@stud.uni-heidelberg.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: disabling onum in url
Date: Sun, 2 Oct 2011 13:34:46 +0200	[thread overview]
Message-ID: <20111002113446.GB17128@aides> (raw)
In-Reply-To: <4E8843DD.3040500@web.de>


[-- Attachment #1.1: Type: text/plain, Size: 2362 bytes --]

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 #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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	other threads:[~2011-10-02 11:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-02 10:58 Pablo Rodríguez
2011-10-02 11:34 ` Philipp Gesang [this message]
2011-10-02 15:40   ` Pablo Rodríguez
2011-10-02 16:40     ` Philipp Gesang
2011-10-02 17:53       ` Pablo Rodríguez
2011-10-02 18:00         ` Wolfgang Schuster
2011-10-02 18:41           ` Pablo Rodríguez
2011-10-02 18:20         ` Philipp Gesang
2011-10-02 18:54           ` Pablo Rodríguez

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=20111002113446.GB17128@aides \
    --to=gesang@stud.uni-heidelberg.de \
    --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).