Subject: mailing-list for TeXmacs Users
List archive
From : Henri Lesourd <address@hidden>- Cc: Alvaro Tejero Cantero <address@hidden>, address@hidden
- Subject: Re: [TeXmacs] Help on action
- Date: Wed, 26 Jan 2005 17:56:49 +0100
Alvaro Tejero Cantero wrote:
Hello,
I am trying to define a macro so that when I click in a certain text (actually, the key for a bibliographic item) the pdf file gets opened.
For this I am trying to use the following (inside a more complicated macro that will eventually also show the complete BibTeX record for the given key)
<action|text|(system "acroread name_of_the_file")>
does anybody know how can I pass a TeXmacs variable
You mean, a Scheme variable (inside TeXmacs) ? In this latter case, if your
Scheme variable is called 'name-of-the-file', you should write :
<<
<action|text|(system (string-append "acroread " name-of-the-file))>
>>
Or either, if the name of the file is contained in a TeXmacs variable inside the
document (i.e., the kind of variable you set using '<assign|my-variable|value>'),
then you can use (get-env "my-variable") from inside your Scheme code. So
you write :
<<
<action|text|(system (string-append "acroread " (get-env "name-of-the-file")))>
>>
For example, you can cut & paste the following markup in a TeXmacs document :
<<
<assign|var|123>
<action|abcde|(display (string-append "Hello!" (get-env "var")))>
>>
then when you double-click on the blue "abcde" text, you obtain :
<<
Hello!123
>>
on the TeXmacs console.
(containing the name of the file) to the (system ) scheme command?
If I suceed to do it I will publish the utility macro for 'active citations'.
That would be great.
- Help on action, Alvaro Tejero Cantero, 01/26/2005
- Re: [TeXmacs] Help on action, Henri Lesourd, 01/26/2005
- Re: [TeXmacs] Help on action, Alvaro Tejero Cantero, 01/27/2005
- Re: [TeXmacs] Help on action, Henri Lesourd, 01/27/2005
- Re: [TeXmacs] Help on action, Alvaro Tejero Cantero, 01/28/2005
- Re: [TeXmacs] Help on action, Henri Lesourd, 01/28/2005
- Re: [TeXmacs] Help on action, Alvaro Tejero Cantero, 01/28/2005
- Re: [TeXmacs] Help on action, Henri Lesourd, 01/29/2005
- Re: [TeXmacs] Help on action, Alvaro Tejero Cantero, 01/28/2005
- Re: [TeXmacs] Help on action, Henri Lesourd, 01/28/2005
- Re: [TeXmacs] Help on action, Alvaro Tejero Cantero, 01/28/2005
- Re: [TeXmacs] Help on action, Henri Lesourd, 01/27/2005
- Re: [TeXmacs] Help on action, Alvaro Tejero Cantero, 01/27/2005
- Re: [TeXmacs] Help on action, Henri Lesourd, 01/26/2005
Archive powered by MHonArc 2.6.19.