ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Projects and URLs
@ 2018-11-02  9:10 Axel Kielhorn
  2018-11-02 12:08 ` Wolfgang Schuster
  2018-11-02 13:30 ` Henning Hraban Ramm
  0 siblings, 2 replies; 5+ messages in thread
From: Axel Kielhorn @ 2018-11-02  9:10 UTC (permalink / raw)
  To: ntg-context

Hello!

Where is the best way to define URLs in a project?

I currently define them when I need them, but wouldn’t it be better to keep them in a project file and have only one location to edit when they change?

Greetings Axel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Projects and URLs
  2018-11-02  9:10 Projects and URLs Axel Kielhorn
@ 2018-11-02 12:08 ` Wolfgang Schuster
  2018-11-03  9:25   ` Axel Kielhorn
  2018-11-02 13:30 ` Henning Hraban Ramm
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2018-11-02 12:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Axel Kielhorn

Axel Kielhorn schrieb am 02.11.18 um 10:10:
> Hello!
>
> Where is the best way to define URLs in a project?
>
> I currently define them when I need them, but wouldn’t it be better to keep them in a project file and have only one location to edit when they change?

When you use \useurl in combination with \url or \from you can define 
them in a environment file. To make themeasier to handle you can use a 
separate environment file only for the urls.


\setupinteraction[state=start]

\useurl [garden] [https://wiki.contextgarden.net/] [ConTeXt garden]

\starttext

\url [garden]

\from[garden]

\stoptext


You can also avoid this two step method when you use the \goto command 
with the url keyword in the second argument.


\setupinteraction[state=start]

\starttext

\goto{\hyphenatedurl{https://wiki.contextgarden.net/}}[url(https://wiki.contextgarden.net/)]

\goto{ConTeXt garden}[url(https://wiki.contextgarden.net/)]

\stoptext


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Projects and URLs
  2018-11-02  9:10 Projects and URLs Axel Kielhorn
  2018-11-02 12:08 ` Wolfgang Schuster
@ 2018-11-02 13:30 ` Henning Hraban Ramm
  1 sibling, 0 replies; 5+ messages in thread
From: Henning Hraban Ramm @ 2018-11-02 13:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2018-11-02 um 10:10 schrieb Axel Kielhorn <tex@axelkielhorn.de>:

> Hello!
> 
> Where is the best way to define URLs in a project?
> 
> I currently define them when I need them, but wouldn’t it be better to keep them in a project file and have only one location to edit when they change?

It that’s what you need, then \useURL is the way to go.

For me, writing two commands to use an URL only once is mostly too much.

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Projects and URLs
  2018-11-02 12:08 ` Wolfgang Schuster
@ 2018-11-03  9:25   ` Axel Kielhorn
  2018-11-03 16:25     ` Alan Braslau
  0 siblings, 1 reply; 5+ messages in thread
From: Axel Kielhorn @ 2018-11-03  9:25 UTC (permalink / raw)
  To: ntg-context

> Am 02.11.2018 um 13:08 schrieb Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>:
> 
> Axel Kielhorn schrieb am 02.11.18 um 10:10:
>> Hello!
>> 
>> Where is the best way to define URLs in a project?
>> 
>> I currently define them when I need them, but wouldn’t it be better to keep them in a project file and have only one location to edit when they change?
> 
> When you use \useurl in combination with \url or \from you can define them in a environment file. To make themeasier to handle you can use a separate environment file only for the urls.
> 
> 
> \setupinteraction[state=start]
> 
> \useurl [garden] [https://wiki.contextgarden.net/] [ConTeXt garden]
> 
> \starttext
> 
> \url [garden]
> 
> \from[garden]
> 
> \stoptext


Is there a way to loop over all defined urls to generate a link list (like a bibliography)?

Axel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Projects and URLs
  2018-11-03  9:25   ` Axel Kielhorn
@ 2018-11-03 16:25     ` Alan Braslau
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Braslau @ 2018-11-03 16:25 UTC (permalink / raw)
  To: Axel Kielhorn; +Cc: mailing list for ConTeXt users

On Sat, 3 Nov 2018 10:25:23 +0100
Axel Kielhorn <tex@axelkielhorn.de> wrote:

> Is there a way to loop over all defined urls to generate a link list (like a bibliography)?

You can use the bibliography subsystem to create a database of urls.
Look at "other uses" in the bibliography manual.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-03 16:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02  9:10 Projects and URLs Axel Kielhorn
2018-11-02 12:08 ` Wolfgang Schuster
2018-11-03  9:25   ` Axel Kielhorn
2018-11-03 16:25     ` Alan Braslau
2018-11-02 13:30 ` Henning Hraban Ramm

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).