Re: [NTG-context] URLs: interaction, color/style, hyphenation

2009-06-15 Thread Peter Münster
On Thu, 11 Jun 2009, Peter Münster wrote:

 Here a general test-file with all possibilities to print URLs, that I'm
 aware of:
 
 \setupinteraction[state=start]
 \useURL[myURL][http://url.com/index.html]
 \starttext
 \hsize1pt
 % hyphen introduced in url, no special color/style:
 \from[myURL]
 % same as \from, but \tt style:
 \url[myURL]
 % hyphenated without hyphens but no color/style/interaction:
 \hyphenatedurl{http://url.com/index.html}
 % interaction and color, but not hyphenated:
 \goto{http://url.com/index.html}[url(http://url.com/index.html)]
 \stoptext
 
 The best would be, to have a command that:
 - makes interactive links like \from[]
 - uses \tt style like \url[]
 - breaks URLs like \hyphenatedurl{}
 - uses color like \goto{}[]

Just a hint: the \from command of version 2009.01.18 MKIV worked very well:
- there was color
- tt-style
- interaction was ok
- hyphenation as with \hyphenatedurl was also ok
- possibility to add number-signs in url with \#

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] URLs: interaction, color/style, hyphenation

2009-06-15 Thread Hans Hagen

Peter Münster wrote:

On Thu, 11 Jun 2009, Peter Münster wrote:


Here a general test-file with all possibilities to print URLs, that I'm
aware of:

\setupinteraction[state=start]
\useURL[myURL][http://url.com/index.html]
\starttext
\hsize1pt
% hyphen introduced in url, no special color/style:
\from[myURL]
% same as \from, but \tt style:
\url[myURL]
% hyphenated without hyphens but no color/style/interaction:
\hyphenatedurl{http://url.com/index.html}
% interaction and color, but not hyphenated:
\goto{http://url.com/index.html}[url(http://url.com/index.html)]
\stoptext

The best would be, to have a command that:
- makes interactive links like \from[]
- uses \tt style like \url[]
- breaks URLs like \hyphenatedurl{}
- uses color like \goto{}[]


Just a hint: the \from command of version 2009.01.18 MKIV worked very well:
- there was color
- tt-style
- interaction was ok
- hyphenation as with \hyphenatedurl was also ok
- possibility to add number-signs in url with \#


all referencing code has been rewritten so as with structure it will 
take some time for it to reach the desired state; i'm currently 
rewriting all backend code


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] URLs: interaction, color/style, hyphenation (was: Re: Argument of \doswitchtotypeface has an extra })

2009-06-11 Thread Peter Münster
On Thu, 11 Jun 2009, Wolfgang Schuster wrote:

 Am 11.06.2009 um 10:08 schrieb Peter Münster:
 
   Or is there perhaps another command (for example \fromURL{})
   that does
 
   just this: \useURL[dummy][http://my-url/]\from[dummy];
 
 
   Perhaps with alternative optional argument:
 
   \fromURL[#1]{#2} = \useURL[dummy][#2][][#1]\from[dummy]
 
 
 Hans gave *you* a while ago this solution: \goto{...}[url(...)]

Indeed, I suppose you mean
http://archive.contextgarden.net/message/20090504.084528.4e8ad6f9.en.html

I did not need this solution, because

1.) my little helper-macro
   \def\gotoURL{\dosingleempty\dogotoURL}
   \def\dogotoURL[#1]#2{\iffirstargument\useURL[dummyRefUseURL][#2][][#1]\else
 \useURL[dummyRefUseURL][#2]\fi\from[dummyRefUseURL]}
   worked just fine

2.) \goto{...}[url(...)] does not break URLs

But now I see, that even \from[...] does not breaks URLs neither...

It seems, the only way to get hyphenated url is without interaction.

Here a general test-file with all possibilities to print URLs, that I'm
aware of:

\setupinteraction[state=start]
\useURL[myURL][http://url.com/index.html]
\starttext
\hsize1pt
% hyphen introduced in url, no special color/style:
\from[myURL]
% same as \from, but \tt style:
\url[myURL]
% hyphenated without hyphens but no color/style/interaction:
\hyphenatedurl{http://url.com/index.html}
% interaction and color, but not hyphenated:
\goto{http://url.com/index.html}[url(http://url.com/index.html)]
\stoptext

The best would be, to have a command that:
- makes interactive links like \from[]
- uses \tt style like \url[]
- breaks URLs like \hyphenatedurl{}
- uses color like \goto{}[]

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___