[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-users
Subject:    Re: Creating macros in Lyx
From:       Pascal Francq <pfrancq () ulb ! ac ! be>
Date:       2009-02-06 7:58:50
Message-ID: 200902060858.51230.pfrancq () ulb ! ac ! be
[Download RAW message or body]


Thanks. In fact, when I using the dialog box to modify the character type, it 
does not show any function in the status bar. Moreover, when I use "textstyle-
update color 3", the color is set to red, but other attributes are reset (such 
as an italic text becomes regular). I think I have to play with this function.

On jeudi 05 février 2009, rgheck wrote:
> Pascal Francq wrote:
> > Hi,
> > Does anybody know if it is possible to create macro in Lyx and how to do
> > it ? In practice, I want to add some shortcuts to action such as "putting
> > the text in red" or "the text is in English".
> > Thanks.
>
> Anything you can do in LyX---any sequence of actions---can be assigned
> (bound) to a key. Two ways. (i) The file that sets the bindings is just
> a text file, *.bind; you can find out which one you are using in
> Tools>Preferences>Editing>Shortcuts. Copy that file to your LyX user
> directory, and then edit as you wish. The syntax is reasonably
> straightforward. (ii) Use the Shortcuts editor in
> Tools>Preferences>Editing>Shortcuts.
>
> The only problem now is to know function what to assign. The available
> functions are described in Help>LyX Functions, so you can look them up
> there. But an easier way is to watch the status line when you perform
> some action: LyX will usually pop up the name of the function you just
> used. If you want to perform a sequence of actions, then you'll need to
> use the command-sequence LFUN to do it, e.g.:
>     command-sequence word-select; textstyle-update color 3
> That selects the current word and makes it red. (Getting the
> textstyle-update syntax right is less easy than with other things.)
>
> rh


-- 

Pascal Francq


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic