Subject: mailing-list for TeXmacs Users
List archive
From : address@hidden- To: Alain Herreman <address@hidden>
- Cc: address@hidden
- Subject: Re: Action in blue and restricted to a line
- Date: Mon, 7 Apr 2003 15:34:24 +0200
On Sun, Mar 09, 2003 at 06:10:44PM +0100, Alain Herreman wrote:
> In TeXmacs 1.0.1, which I use extensively, the command "action" sets the
> text in blue. I think it's not a good idea to impose any change in format or
> color. The same for hyperlink. Maybe I am wrong, but it seems to me more
> easy to add a color than to remove it when it is fixed by a primitive.
Well, I also think that 'action' should not set the color as hlink
does. However, at the moment there is not pointer feedback when over
hot text, so blue text is better than nothing.
If you really want action text in black, you can use
<with|color|black|...> inside action.
> What is the best solution to apply "action" to a text longer than a
> simple line? Why such a restriction?!
The best solution is to use 'decorate atoms'. You can see a small
example in the definition of the hyper-link function in
tmdoc-markup.ts.
(assign "myaction" (macro "x"
(datoms (macro "y" (action (with "color" "black" (arg "y"))
"(my-action)"))
(arg "x"))))
Paste in a document with Edit->Paste from->Scheme.
There is not good reason for the current restriction. Actually that
could be considered a bug in the typesetter.
> If only it were possible to apply "action" to the entire buffer it would be
> possible to anyone to create many interesting scheme procedures defining
> actions according to the position of the double click. This simple change
> (plus the knowledge of the key pressed during the click...) would improve a
> lot the possibilities of the interaction between scheme and TeXmacs.
Indeed, there was discussion to allow the keymap system to support
mouse button actions in the same way as key presses.
Joris, what is the status of this feature?
-- DDAA
- Re: Action in blue and restricted to a line, david, 04/07/2003
- Re: Action in blue and restricted to a line, Joris van der Hoeven, 04/07/2003
Archive powered by MHonArc 2.6.19.