Subject: mailing-list for TeXmacs Users
List archive
From : Joris van der Hoeven <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] Macros with hyperlinks
- Date: Fri, 7 Jan 2011 10:30:37 +0100
Hi,
The following macro should be helpful to look at:
<assign|hop|<macro|x|y|<arg|x>, <if|<equal|<arg|y>|<uninit>>|--|<arg|y>>>>
You may find more information in the documentation on writing style files.
Best, --Joris
On Thu, Jan 06, 2011 at 09:34:22PM -0600, Oscar Gerardo Lazo Arjona wrote:
> On 06/01/11 02:21, Joris van der Hoeven wrote:
>> On Wed, Jan 05, 2011 at 10:08:01PM -0600, Oscar Gerardo Lazo Arjona wrote:
>>
>>> I am interested in using texmacs as a wiki. One of the essential parts
>>> of wikis is links between documents. At this point I can link several
>>> texmacs documents using
>>>
>>> <hlink|NAME|/route/of/wiki/NAME.tm>
>>>
>>> But that is time consuming, as I have to write the route in every link,
>>> so I tried to make a macro that would do the job for me, like
>>>
>>> <assign|wlink2|<macro|name|<hlink|<arg|name>|/route/of/wiki/<arg|name>.tm>>>
>>>
>> The second argument of hlink should be an url *string*. Hence, you should
>> use
>> the 'merge' primitive for the concatenation of strings in order to write
>> your macro.
>>
>> Best, --Joris
>>
> Thank you! That worked perfectly. Now I want to do some more intrincate
> things to make the links more wiki-like. Two things mainly:
>
> 1 .- Make it so that <wlink can accept either one or two arguments, so
> it can be either <wlink|Name> or <wlink|Name_of_file|Name as it should
> appear in the text>. My guess is that there some be some way to make the
> second argument optional (as is donde in other programming languages),
> and use an if then else statement in the macro so as to use or not use
> the second argument.
>
> 2.- Make the link appear blue if the file exists, and red if it doesn't
> exist.
>
> Thank you!
>
> Oscar.
- [TeXmacs] Macros with hyperlinks, Oscar Gerardo Lazo Arjona, 01/06/2011
- Re: [TeXmacs] Macros with hyperlinks, Joris van der Hoeven, 01/06/2011
- Re: [TeXmacs] Macros with hyperlinks, Oscar Gerardo Lazo Arjona, 01/07/2011
- Re: [TeXmacs] Macros with hyperlinks, Joris van der Hoeven, 01/07/2011
- Re: [TeXmacs] Macros with hyperlinks, Oscar Gerardo Lazo Arjona, 01/07/2011
- Re: [TeXmacs] Macros with hyperlinks, Joris van der Hoeven, 01/07/2011
- Re: [TeXmacs] Macros with hyperlinks, Oscar Gerardo Lazo Arjona, 01/07/2011
- Re: [TeXmacs] Macros with hyperlinks, Joris van der Hoeven, 01/09/2011
- Re: [TeXmacs] Macros with hyperlinks, Oscar Gerardo Lazo Arjona, 01/07/2011
- Re: [TeXmacs] Macros with hyperlinks, Sam Liddicott, 01/07/2011
- Re: [TeXmacs] Macros with hyperlinks, Joris van der Hoeven, 01/07/2011
- Re: [TeXmacs] Macros with hyperlinks, Joris van der Hoeven, 01/07/2011
- Re: [TeXmacs] Macros with hyperlinks, Oscar Gerardo Lazo Arjona, 01/07/2011
- Re: [TeXmacs] Macros with hyperlinks, Joris van der Hoeven, 01/07/2011
- Re: [TeXmacs] Macros with hyperlinks, Oscar Gerardo Lazo Arjona, 01/07/2011
- Re: [TeXmacs] Macros with hyperlinks, Joris van der Hoeven, 01/06/2011
Archive powered by MHonArc 2.6.19.