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
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
Am 02.11.2018 um 13:08 schrieb Wolfgang Schuster
: 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
Am 2018-11-02 um 10:10 schrieb Axel Kielhorn
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
participants (4)
-
Alan Braslau
-
Axel Kielhorn
-
Henning Hraban Ramm
-
Wolfgang Schuster