Re: a way of building macros?

2007-09-06 Thread Andre Poenitz
On Thu, Sep 06, 2007 at 06:24:29PM +0100, Roberto Gorjão wrote:
 Hi,
 
 Is there any way of building macros in LyX? As we do in Open Office, 
 macros that ease the process of inserting frequent strings of data, for 
 instance. Ideally, I would like to be able to build a new toolbar with 
 buttons to activate different macros... Is this possible?

Sort of. Have a look at /lib/bin/*, especially the use of 'repeat'
and 'command-sequence'.

Andre'


Re: a way of building macros?

2007-09-06 Thread roberto
Hi Andre,

I have not a clue about where to begin looking for /lib/bin/*. Could you 
be
more specific? I'm on Win XP.

I've also found this page in the LyX's Wiki --
http://wiki.lyx.org/Tips/CommandSequences -- but I must confess that I didn't
understand what was meant by .bind-file and how to use it... I guess I'll try
again tomorrow -- I'm getting too tired today.

Thanks!

Roberto
 
--
On Thu Sep  6 11:26 , Andre Poenitz [EMAIL PROTECTED] sent:

Sort of. Have a look at /lib/bin/*, especially the use of 'repeat'
and 'command-sequence'.

Andre'





Re: a way of building macros?

2007-09-06 Thread Richard Heck

[EMAIL PROTECTED] wrote:

Hi Andre,

I have not a clue about where to begin looking for /lib/bin/*. Could you 
be
more specific? I'm on Win XP.
  

Probably somewhere like c:\Program Files\LyX\..., but others will know.

I've also found this page in the LyX's Wiki --
http://wiki.lyx.org/Tips/CommandSequences -- but I must confess that I didn't
understand what was meant by .bind-file and how to use it... I guess I'll try
again tomorrow -- I'm getting too tired today.
  

Can someone on Windows say where the .bind files are?

Once you know that, have a look at these files: The map keys to LyX 
commands or command sequences. They are completely customizable, and you 
can try out new commands and command-sequences in the `mini-buffer' 
before modifying the bind files.


Richard

--
==
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto



Re: a way of building macros?

2007-09-06 Thread Paul A. Rubin

Richard Heck wrote:

[EMAIL PROTECTED] wrote:

Hi Andre,

I have not a clue about where to begin looking for /lib/bin/*. 
Could you be

more specific? I'm on Win XP.
  



Probably somewhere like c:\Program Files\LyX\..., but others will know.


No such beast under Windows.  There's a bin directory but no lib 
directory (at least in the distributed application).  I'm guessing Andre 
was referring to source code, but I'm not sure where to find it.



I've also found this page in the LyX's Wiki --
http://wiki.lyx.org/Tips/CommandSequences -- but I must confess that I 
didn't
understand what was meant by .bind-file and how to use it... I guess 
I'll try

again tomorrow -- I'm getting too tired today.
  



Can someone on Windows say where the .bind files are?


The ones that ship with LyX are in lyxroot\Resources\bind, where 
lyxroot is usually C:\Program Files\LyX15 (give or take).  There are 
subdirectories for a few non-English variants.  Bind files added or 
edited by the user go in home\bind, where home is usually 
C:\Documents and Settings\your login id\Application Data\lyx15. 
Help-About will identify both lyxroot (labeled Library directory) 
and home (labeled User directory).  It's important to put the edited 
files there, lest the changes be lost when a new version of LyX is 
installed.


Once you know that, have a look at these files: The map keys to LyX 
commands or command sequences. They are completely customizable, and you 
can try out new commands and command-sequences in the `mini-buffer' 
before modifying the bind files.


One thing to keep in mind is that bind files can (and do) load other 
bind files.  For instance, at the bottom of cua.bind, you'll find 
\bind_file commands that load other files.  The reason I mention this is 
that when you bind keys to a macro, you'll obviously want to try to pick 
an unused key combination -- but what's unused in the file you're 
editing may be used in a file it subsequently loads, which would 
overwrite your definition.


The syntax is pretty simple, and is explained on the wiki: 
http://wiki.lyx.org/Tips/KeyboardShortcuts.  Command sequences are also 
explained on the wiki (http://wiki.lyx.org/Tips/CommandSequences), and 
you can find a list of LFUNS (the functions you can use in command 
sequences) as well (http://wiki.lyx.org/LyX/LyxFunctions).


One other thing to keep in mind:  separate from the bind file(s) you are 
using, some key combinations are bound to menu actions (see stdmenus.inc 
in the ...\Resources\ui folder).  AFAIK, if you bind a macro to a key 
combination already in use in a menu, the menu version trumps your new 
binding, unless you edit stdmenus.inc to change the key bound to the menu.


/Paul



Re: a way of building macros?

2007-09-06 Thread Andre Poenitz
On Thu, Sep 06, 2007 at 06:24:29PM +0100, Roberto Gorjão wrote:
 Hi,
 
 Is there any way of building macros in LyX? As we do in Open Office, 
 macros that ease the process of inserting frequent strings of data, for 
 instance. Ideally, I would like to be able to build a new toolbar with 
 buttons to activate different macros... Is this possible?

Sort of. Have a look at /lib/bin/*, especially the use of 'repeat'
and 'command-sequence'.

Andre'


Re: a way of building macros?

2007-09-06 Thread roberto
Hi Andre,

I have not a clue about where to begin looking for /lib/bin/*. Could you 
be
more specific? I'm on Win XP.

I've also found this page in the LyX's Wiki --
http://wiki.lyx.org/Tips/CommandSequences -- but I must confess that I didn't
understand what was meant by .bind-file and how to use it... I guess I'll try
again tomorrow -- I'm getting too tired today.

Thanks!

Roberto
 
--
On Thu Sep  6 11:26 , Andre Poenitz [EMAIL PROTECTED] sent:

Sort of. Have a look at /lib/bin/*, especially the use of 'repeat'
and 'command-sequence'.

Andre'





Re: a way of building macros?

2007-09-06 Thread Richard Heck

[EMAIL PROTECTED] wrote:

Hi Andre,

I have not a clue about where to begin looking for /lib/bin/*. Could you 
be
more specific? I'm on Win XP.
  

Probably somewhere like c:\Program Files\LyX\..., but others will know.

I've also found this page in the LyX's Wiki --
http://wiki.lyx.org/Tips/CommandSequences -- but I must confess that I didn't
understand what was meant by .bind-file and how to use it... I guess I'll try
again tomorrow -- I'm getting too tired today.
  

Can someone on Windows say where the .bind files are?

Once you know that, have a look at these files: The map keys to LyX 
commands or command sequences. They are completely customizable, and you 
can try out new commands and command-sequences in the `mini-buffer' 
before modifying the bind files.


Richard

--
==
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto



Re: a way of building macros?

2007-09-06 Thread Paul A. Rubin

Richard Heck wrote:

[EMAIL PROTECTED] wrote:

Hi Andre,

I have not a clue about where to begin looking for /lib/bin/*. 
Could you be

more specific? I'm on Win XP.
  



Probably somewhere like c:\Program Files\LyX\..., but others will know.


No such beast under Windows.  There's a bin directory but no lib 
directory (at least in the distributed application).  I'm guessing Andre 
was referring to source code, but I'm not sure where to find it.



I've also found this page in the LyX's Wiki --
http://wiki.lyx.org/Tips/CommandSequences -- but I must confess that I 
didn't
understand what was meant by .bind-file and how to use it... I guess 
I'll try

again tomorrow -- I'm getting too tired today.
  



Can someone on Windows say where the .bind files are?


The ones that ship with LyX are in lyxroot\Resources\bind, where 
lyxroot is usually C:\Program Files\LyX15 (give or take).  There are 
subdirectories for a few non-English variants.  Bind files added or 
edited by the user go in home\bind, where home is usually 
C:\Documents and Settings\your login id\Application Data\lyx15. 
Help-About will identify both lyxroot (labeled Library directory) 
and home (labeled User directory).  It's important to put the edited 
files there, lest the changes be lost when a new version of LyX is 
installed.


Once you know that, have a look at these files: The map keys to LyX 
commands or command sequences. They are completely customizable, and you 
can try out new commands and command-sequences in the `mini-buffer' 
before modifying the bind files.


One thing to keep in mind is that bind files can (and do) load other 
bind files.  For instance, at the bottom of cua.bind, you'll find 
\bind_file commands that load other files.  The reason I mention this is 
that when you bind keys to a macro, you'll obviously want to try to pick 
an unused key combination -- but what's unused in the file you're 
editing may be used in a file it subsequently loads, which would 
overwrite your definition.


The syntax is pretty simple, and is explained on the wiki: 
http://wiki.lyx.org/Tips/KeyboardShortcuts.  Command sequences are also 
explained on the wiki (http://wiki.lyx.org/Tips/CommandSequences), and 
you can find a list of LFUNS (the functions you can use in command 
sequences) as well (http://wiki.lyx.org/LyX/LyxFunctions).


One other thing to keep in mind:  separate from the bind file(s) you are 
using, some key combinations are bound to menu actions (see stdmenus.inc 
in the ...\Resources\ui folder).  AFAIK, if you bind a macro to a key 
combination already in use in a menu, the menu version trumps your new 
binding, unless you edit stdmenus.inc to change the key bound to the menu.


/Paul



Re: a way of building macros?

2007-09-06 Thread Andre Poenitz
On Thu, Sep 06, 2007 at 06:24:29PM +0100, Roberto Gorjão wrote:
> Hi,
> 
> Is there any way of building macros in LyX? As we do in Open Office, 
> macros that ease the process of inserting frequent strings of data, for 
> instance. Ideally, I would like to be able to build a new toolbar with 
> buttons to activate different macros... Is this possible?

Sort of. Have a look at /lib/bin/*, especially the use of 'repeat'
and 'command-sequence'.

Andre'


Re: a way of building macros?

2007-09-06 Thread roberto
Hi Andre,

I have not a clue about where to begin looking for "/lib/bin/*". Could you 
be
more specific? I'm on Win XP.

I've also found this page in the LyX's Wiki --
http://wiki.lyx.org/Tips/CommandSequences -- but I must confess that I didn't
understand what was meant by ".bind-file" and how to use it... I guess I'll try
again tomorrow -- I'm getting too tired today.

Thanks!

Roberto
 
--
On Thu Sep  6 11:26 , Andre Poenitz <[EMAIL PROTECTED]> sent:
>
>Sort of. Have a look at /lib/bin/*, especially the use of 'repeat'
>and 'command-sequence'.
>
>Andre'
>




Re: a way of building macros?

2007-09-06 Thread Richard Heck

[EMAIL PROTECTED] wrote:

Hi Andre,

I have not a clue about where to begin looking for "/lib/bin/*". Could you 
be
more specific? I'm on Win XP.
  

Probably somewhere like c:\Program Files\LyX\..., but others will know.

I've also found this page in the LyX's Wiki --
http://wiki.lyx.org/Tips/CommandSequences -- but I must confess that I didn't
understand what was meant by ".bind-file" and how to use it... I guess I'll try
again tomorrow -- I'm getting too tired today.
  

Can someone on Windows say where the .bind files are?

Once you know that, have a look at these files: The map keys to LyX 
commands or command sequences. They are completely customizable, and you 
can try out new commands and command-sequences in the `mini-buffer' 
before modifying the bind files.


Richard

--
==
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto



Re: a way of building macros?

2007-09-06 Thread Paul A. Rubin

Richard Heck wrote:

[EMAIL PROTECTED] wrote:

Hi Andre,

I have not a clue about where to begin looking for "/lib/bin/*". 
Could you be

more specific? I'm on Win XP.
  



Probably somewhere like c:\Program Files\LyX\..., but others will know.


No such beast under Windows.  There's a bin directory but no lib 
directory (at least in the distributed application).  I'm guessing Andre 
was referring to source code, but I'm not sure where to find it.



I've also found this page in the LyX's Wiki --
http://wiki.lyx.org/Tips/CommandSequences -- but I must confess that I 
didn't
understand what was meant by ".bind-file" and how to use it... I guess 
I'll try

again tomorrow -- I'm getting too tired today.
  



Can someone on Windows say where the .bind files are?


The ones that ship with LyX are in \Resources\bind, where 
 is usually C:\Program Files\LyX15 (give or take).  There are 
subdirectories for a few non-English variants.  Bind files added or 
edited by the user go in \bind, where  is usually 
C:\Documents and Settings\\Application Data\lyx15. 
Help->About will identify both  (labeled "Library directory") 
and  (labeled "User directory").  It's important to put the edited 
files there, lest the changes be lost when a new version of LyX is 
installed.


Once you know that, have a look at these files: The map keys to LyX 
commands or command sequences. They are completely customizable, and you 
can try out new commands and command-sequences in the `mini-buffer' 
before modifying the bind files.


One thing to keep in mind is that bind files can (and do) load other 
bind files.  For instance, at the bottom of cua.bind, you'll find 
\bind_file commands that load other files.  The reason I mention this is 
that when you bind keys to a macro, you'll obviously want to try to pick 
an unused key combination -- but what's unused in the file you're 
editing may be used in a file it subsequently loads, which would 
overwrite your definition.


The syntax is pretty simple, and is explained on the wiki: 
http://wiki.lyx.org/Tips/KeyboardShortcuts.  Command sequences are also 
explained on the wiki (http://wiki.lyx.org/Tips/CommandSequences), and 
you can find a list of LFUNS (the functions you can use in command 
sequences) as well (http://wiki.lyx.org/LyX/LyxFunctions).


One other thing to keep in mind:  separate from the bind file(s) you are 
using, some key combinations are bound to menu actions (see stdmenus.inc 
in the ...\Resources\ui folder).  AFAIK, if you bind a macro to a key 
combination already in use in a menu, the menu version trumps your new 
binding, unless you edit stdmenus.inc to change the key bound to the menu.


/Paul