Re: Re: Re: Q: long table and chemical formula

2001-07-13 Thread Andre Poenitz

 I, see. Thus, it will be removed, once we have a scripting language, right?

Correctly so.

 Still, we could have it in the documentation (e.g. in an example-bind-file) 
 with a clear warning about it beeing liable to change.

It is semi-documented by its use in several bind files. Anybody actively
messing around with keybinding will stumble over it and I really do not
want to make it more visible (aka I am too lazy)

Andre'

PS: OTOH if you volunteered to document it... ;-}

-- 
André Pönitz . [EMAIL PROTECTED]



Re: Re: Re: Q: long table and chemical formula

2001-07-13 Thread Andre Poenitz

 I, see. Thus, it will be removed, once we have a scripting language, right?

Correctly so.

 Still, we could have it in the documentation (e.g. in an example-bind-file) 
 with a clear warning about it beeing liable to change.

It is semi-documented by its use in several bind files. Anybody actively
messing around with keybinding will stumble over it and I really do not
want to make it more visible (aka I am too lazy)

Andre'

PS: OTOH if you volunteered to document it... ;-}

-- 
André Pönitz . [EMAIL PROTECTED]



Re: Re: Re: Q: long table and chemical formula

2001-07-13 Thread Andre Poenitz

> I, see. Thus, it will be removed, once we have a scripting language, right?

Correctly so.

> Still, we could have it in the documentation (e.g. in an example-bind-file) 
> with a clear warning about it beeing liable to change.

It is semi-documented by its use in several bind files. Anybody actively
messing around with keybinding will stumble over it and I really do not
want to make it more visible (aka "I am too lazy")

Andre'

PS: OTOH if you volunteered to document it... ;-}

-- 
André Pönitz . [EMAIL PROTECTED]



Re: Re: Q: long table and chemical formula

2001-07-12 Thread Guenter Milde

On Wed, 11 Jul 2001 15:47:39 +0200 wrote Thomas de Grenier de Latour 
[EMAIL PROTECTED]:

 Guenter Milde wrote:
  
  PS:  Question to the gurus:
  
  Could I have a function or macro that does this but
  also changes the font to roman?
  
  \bind C-S-underscoremath-insert _\mathrm{}does not work
 
 There is a lyx function called command-sequence which can help to
 define strange shortcuts. Try something like this:
 \bind C-S-underscorecommand-sequence math-insert _;
 math-insert mathrm;
 But this work only for the first char after the mathrm, because there is
 no {}.

Thanks for the tip with command-sequence.

(Dear documenters: could I have found it somewhere in the documentation?? 
 -otherwise this is a documentation request)

Actually, 
 \bind C-S-underscore command-sequence math-insert _; math-insert mathrm;
did not do what I wanted either (especially becouse then I have a red mathrm
in my Text.)

However, it brought me on the right track: in my bind.gm I have now

# subscript and superscript with roman fonts
\bind C-S-underscorecommand-sequence math-insert _; font-roman;
\bind C-asciicircum   command-sequence math-insert ^; font-roman;

and this works like expected (and WYSIWYM).

Guenter

--
[EMAIL PROTECTED]




Re: Q: long table and chemical formula

2001-07-12 Thread Juergen Vigna


Sorry for being late on this but it is possible to create a tabular with

M-x tabular-insert 80 2

were 80 is the rows and 2 the columns! This should help to create tabulars
in ANY size.

  Jürgen

P.S.: This is with lyx-1.1.6xxx.

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Italienallee 13/N   Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen   Web: http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

When in doubt, do it.  It's much easier to apologize than to get permission.
-- Grace Murray Hopper




Re: Re: Q: long table and chemical formula

2001-07-12 Thread Andre Poenitz

 (Dear documenters: could I have found it somewhere in the documentation?? 
  -otherwise this is a documentation request)

command-sequence is an awful hack and it not being documeented is a
feature that should prevent users from using it excessivly in case the
hack will change/be removed.

Andre'

-- 
André Pönitz . [EMAIL PROTECTED]



Re: Q: long table and chemical formula

2001-07-12 Thread Thomas de Grenier de Latour

Guenter Milde wrote:
 
 Thanks for the tip with command-sequence.
 

Thanks for the tip with font-something, I was thinking it was only a
text mode feature (I don't know why, this kind of fix idea you never
verify). No more mathrm{blabla} in my formulas!

--
Thomas.



Re: Q: long table and chemical formula

2001-07-12 Thread Dekel Tsur

On Wed, Jul 11, 2001 at 03:47:39PM +0200, Thomas de Grenier de Latour wrote:
  Could I have a function or macro that does this but
  also changes the font to roman? 

 define strange shortcuts. Try something like this:
 \bind C-S-underscorecommand-sequence math-insert _;
 math-insert mathrm;
 But this work only for the first char after the mathrm, because there is
 no {}.

\bind C-S-underscore command-sequence math-insert _; font-roman



Re: Re: Q: long table and chemical formula

2001-07-12 Thread Guenter Milde

On Wed, 11 Jul 2001 15:47:39 +0200 wrote Thomas de Grenier de Latour 
[EMAIL PROTECTED]:

 Guenter Milde wrote:
  
  PS:  Question to the gurus:
  
  Could I have a function or macro that does this but
  also changes the font to roman?
  
  \bind C-S-underscoremath-insert _\mathrm{}does not work
 
 There is a lyx function called command-sequence which can help to
 define strange shortcuts. Try something like this:
 \bind C-S-underscorecommand-sequence math-insert _;
 math-insert mathrm;
 But this work only for the first char after the mathrm, because there is
 no {}.

Thanks for the tip with command-sequence.

(Dear documenters: could I have found it somewhere in the documentation?? 
 -otherwise this is a documentation request)

Actually, 
 \bind C-S-underscore command-sequence math-insert _; math-insert mathrm;
did not do what I wanted either (especially becouse then I have a red mathrm
in my Text.)

However, it brought me on the right track: in my bind.gm I have now

# subscript and superscript with roman fonts
\bind C-S-underscorecommand-sequence math-insert _; font-roman;
\bind C-asciicircum   command-sequence math-insert ^; font-roman;

and this works like expected (and WYSIWYM).

Guenter

--
[EMAIL PROTECTED]




Re: Q: long table and chemical formula

2001-07-12 Thread Juergen Vigna


Sorry for being late on this but it is possible to create a tabular with

M-x tabular-insert 80 2

were 80 is the rows and 2 the columns! This should help to create tabulars
in ANY size.

  Jürgen

P.S.: This is with lyx-1.1.6xxx.

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Italienallee 13/N   Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen   Web: http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

When in doubt, do it.  It's much easier to apologize than to get permission.
-- Grace Murray Hopper




Re: Re: Q: long table and chemical formula

2001-07-12 Thread Andre Poenitz

 (Dear documenters: could I have found it somewhere in the documentation?? 
  -otherwise this is a documentation request)

command-sequence is an awful hack and it not being documeented is a
feature that should prevent users from using it excessivly in case the
hack will change/be removed.

Andre'

-- 
André Pönitz . [EMAIL PROTECTED]



Re: Q: long table and chemical formula

2001-07-12 Thread Thomas de Grenier de Latour

Guenter Milde wrote:
 
 Thanks for the tip with command-sequence.
 

Thanks for the tip with font-something, I was thinking it was only a
text mode feature (I don't know why, this kind of fix idea you never
verify). No more mathrm{blabla} in my formulas!

--
Thomas.



Re: Q: long table and chemical formula

2001-07-12 Thread Dekel Tsur

On Wed, Jul 11, 2001 at 03:47:39PM +0200, Thomas de Grenier de Latour wrote:
  Could I have a function or macro that does this but
  also changes the font to roman? 

 define strange shortcuts. Try something like this:
 \bind C-S-underscorecommand-sequence math-insert _;
 math-insert mathrm;
 But this work only for the first char after the mathrm, because there is
 no {}.

\bind C-S-underscore command-sequence math-insert _; font-roman



Re: Re: Q: long table and chemical formula

2001-07-12 Thread Guenter Milde

On Wed, 11 Jul 2001 15:47:39 +0200 wrote Thomas de Grenier de Latour 
<[EMAIL PROTECTED]>:

> Guenter Milde wrote:
> > 
> > PS:  Question to the gurus:
> > 
> > Could I have a function or macro that does this but
> > also changes the font to roman?
> > 
> > \bind "C-S-underscore""math-insert _\mathrm{}"does not work
 
> There is a lyx function called "command-sequence" which can help to
> define strange shortcuts. Try something like this:
> \bind "C-S-underscore""command-sequence math-insert _;
> math-insert mathrm;"
> But this work only for the first char after the mathrm, because there is
> no {}.

Thanks for the tip with "command-sequence".

(Dear documenters: could I have found it somewhere in the documentation?? 
 ->otherwise this is a documentation request)

Actually, 
 \bind "C-S-underscore" "command-sequence math-insert _; math-insert mathrm;"
did not do what I wanted either (especially becouse then I have a red mathrm
in my Text.)

However, it brought me on the right track: in my bind.gm I have now

# subscript and superscript with roman fonts
\bind "C-S-underscore""command-sequence math-insert _; font-roman;"
\bind "C-asciicircum"   "command-sequence math-insert ^; font-roman;"

and this works like expected (and WYSIWYM).

Guenter

--
[EMAIL PROTECTED]




Re: Q: long table and chemical formula

2001-07-12 Thread Juergen Vigna


Sorry for being late on this but it is possible to create a tabular with

M-x tabular-insert 80 2

were 80 is the rows and 2 the columns! This should help to create tabulars
in ANY size.

  Jürgen

P.S.: This is with lyx-1.1.6xxx.

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen VignaE-Mail:  [EMAIL PROTECTED]
Italienallee 13/N   Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen   Web: http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

When in doubt, do it.  It's much easier to apologize than to get permission.
-- Grace Murray Hopper




Re: Re: Q: long table and chemical formula

2001-07-12 Thread Andre Poenitz

> (Dear documenters: could I have found it somewhere in the documentation?? 
>  ->otherwise this is a documentation request)

command-sequence is an awful hack and it not being documeented is a
"feature" that should prevent users from using it excessivly in case the
hack will change/be removed.

Andre'

-- 
André Pönitz . [EMAIL PROTECTED]



Re: Q: long table and chemical formula

2001-07-12 Thread Thomas de Grenier de Latour

Guenter Milde wrote:
> 
> Thanks for the tip with "command-sequence".
> 

Thanks for the tip with "font-something", I was thinking it was only a
text mode feature (I don't know why, this kind of fix idea you never
verify). No more mathrm{blabla} in my formulas!

--
Thomas.



Re: Q: long table and chemical formula

2001-07-12 Thread Dekel Tsur

On Wed, Jul 11, 2001 at 03:47:39PM +0200, Thomas de Grenier de Latour wrote:
> > Could I have a function or macro that does this but
> > also changes the font to roman? 
>
> define strange shortcuts. Try something like this:
> \bind "C-S-underscore""command-sequence math-insert _;
> math-insert mathrm;"
> But this work only for the first char after the mathrm, because there is
> no {}.

\bind "C-S-underscore" "command-sequence math-insert _; font-roman"



Re: Re: Q: long table and chemical formula

2001-07-11 Thread Guenter Milde

On Tue, 10 Jul 2001 23:58:50 +0300 wrote Dekel Tsur [EMAIL PROTECTED]:

 On Tue, Jul 10, 2001 at 04:38:33PM -0400, Wonil Chang wrote:
  Hello all,
  
  I need to convert a long data file (more than 100 rows and 5 columns) to a
  table in lyx. I tried to insert tabular by clicking on the table menubar, but
  the maximum row configured by default is 50. How can I increase the limit?
 
 You can change the limits only by changing the source.
 It is also possible to use script for converting a text file into a LyX table.
 See http://www.mail-archive.com/lyx-users@lists.lyx.org/msg11775.html

The csv2lyx script has improved much since this posting. (Would it be ok to
send it to the list?)

 
  I have to use subscripts and superscripts for chemical formula very often. Is
  there any package that can make my life a little bit easier?
 
 Since I'm not a chemist, I don't know about such packages.
 But you can use math macros (see the user guide).

Math macros are ok for a complex/long formula that appears quite often in
your text: you define it one time (which is a bit tedious) and then you can
use it all over the place. (See the attached lyx-file for an example)
If you have a lot of different fromulas, it might
be helpfull to define keybindings for sub- and superscript: In my
keybindings-file I have

\bind C-S-underscoremath-insert _   # subscript
\bind C-asciicircum   math-insert ^   # superscript

So for water, I press H Ctrl-_ 2 Esc O. Note that I don't need to  switch to
math_mode with Ctrl-M, as Ctrl-_ does this for me (if not already in, but
then I could simply use _ without Ctrl).



PS:  Question to the gurus: 

Could I have a function or macro that does this but
also changes the font to roman?

\bind C-S-underscoremath-insert _\mathrm{}does not work

defining a (math-macro sub 1) does not work either (font changes cannot be
included in the macro definiton in a WYSIWYM manner, only via \textrm{#1}
all in red)


Guenter

--
[EMAIL PROTECTED]
 

#LyX 1.1 created this file. For more info see http://www.lyx.org/
\lyxformat 218
\textclass article
\language german
\inputencoding latin1
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize a4paper
\paperpackage a4
\use_geometry 1
\use_amsmath 0
\paperorientation portrait
\leftmargin 2cm
\topmargin 1cm
\rightmargin 2cm
\bottommargin 2cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language german
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle plain

\layout Standard


\begin_inset FormulaMacro 
\newcommand{\LiTa}{\textrm{LiTaO}_{3}}

\end_inset 


\layout Comment

The macro LiTa was created with
\layout Comment

M-x math-macro LiTa
\layout Comment

To make it available, copy to some place in the document.
\layout Comment

To use it, write 
\backslash 
LiTa in math-mode (^C) and you will get 
\begin_inset Formula \( \LiTa  \)
\end_inset 


\the_end



Re: Q: long table and chemical formula

2001-07-11 Thread Thomas de Grenier de Latour

Guenter Milde wrote:
 
 PS:  Question to the gurus:
 
 Could I have a function or macro that does this but
 also changes the font to roman?
 
 \bind C-S-underscoremath-insert _\mathrm{}does not work
 
 defining a (math-macro sub 1) does not work either (font changes cannot be
 included in the macro definiton in a WYSIWYM manner, only via \textrm{#1}
 all in red)
 
 Guenter
 


There is a lyx function called command-sequence which can help to
define strange shortcuts. Try something like this:
\bind C-S-underscorecommand-sequence math-insert _;
math-insert mathrm;
But this work only for the first char after the mathrm, because there is
no {}.
A very ugly solution is this one:
command-sequence math-insert _; tex-mode; type m; type a; type t; type
h; type r; type m; type {;
The closing } is added by LyX (type has the same behaviour as you with
your favorite keyboard).
But when I re-read it, the shame falls on me (I've got a lot of such
things in my perso.bind), and I expect real gurus will forgive me... 

--
Thomas.



Re: Q: long table and chemical formula

2001-07-11 Thread Thomas de Grenier de Latour

Thomas de Grenier de Latour (Hey! It's me!) wrote:
 
 command-sequence math-insert _; tex-mode; type m; type a; type t; type
 h; type r; type m; type {;
 

H... strange... it does work when entered in the minibuffer, but not
as a binded shortcut. Sorry for the mistake.


(In fact, when this thing is binded to a key, all the type stuff is
done behind the math box, where the first cursor stands. The second one,
the one of the math box, isn't activated until I touch the keyboard
again. Probably I'm bugy, or my LyX is drunk, but two cursors are one
too much.)


 --
 Thomas.



Re: Re: Q: long table and chemical formula

2001-07-11 Thread Guenter Milde

On Tue, 10 Jul 2001 23:58:50 +0300 wrote Dekel Tsur [EMAIL PROTECTED]:

 On Tue, Jul 10, 2001 at 04:38:33PM -0400, Wonil Chang wrote:
  Hello all,
  
  I need to convert a long data file (more than 100 rows and 5 columns) to a
  table in lyx. I tried to insert tabular by clicking on the table menubar, but
  the maximum row configured by default is 50. How can I increase the limit?
 
 You can change the limits only by changing the source.
 It is also possible to use script for converting a text file into a LyX table.
 See http://www.mail-archive.com/lyx-users@lists.lyx.org/msg11775.html

The csv2lyx script has improved much since this posting. (Would it be ok to
send it to the list?)

 
  I have to use subscripts and superscripts for chemical formula very often. Is
  there any package that can make my life a little bit easier?
 
 Since I'm not a chemist, I don't know about such packages.
 But you can use math macros (see the user guide).

Math macros are ok for a complex/long formula that appears quite often in
your text: you define it one time (which is a bit tedious) and then you can
use it all over the place. (See the attached lyx-file for an example)
If you have a lot of different fromulas, it might
be helpfull to define keybindings for sub- and superscript: In my
keybindings-file I have

\bind C-S-underscoremath-insert _   # subscript
\bind C-asciicircum   math-insert ^   # superscript

So for water, I press H Ctrl-_ 2 Esc O. Note that I don't need to  switch to
math_mode with Ctrl-M, as Ctrl-_ does this for me (if not already in, but
then I could simply use _ without Ctrl).



PS:  Question to the gurus: 

Could I have a function or macro that does this but
also changes the font to roman?

\bind C-S-underscoremath-insert _\mathrm{}does not work

defining a (math-macro sub 1) does not work either (font changes cannot be
included in the macro definiton in a WYSIWYM manner, only via \textrm{#1}
all in red)


Guenter

--
[EMAIL PROTECTED]
 

#LyX 1.1 created this file. For more info see http://www.lyx.org/
\lyxformat 218
\textclass article
\language german
\inputencoding latin1
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize a4paper
\paperpackage a4
\use_geometry 1
\use_amsmath 0
\paperorientation portrait
\leftmargin 2cm
\topmargin 1cm
\rightmargin 2cm
\bottommargin 2cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language german
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle plain

\layout Standard


\begin_inset FormulaMacro 
\newcommand{\LiTa}{\textrm{LiTaO}_{3}}

\end_inset 


\layout Comment

The macro LiTa was created with
\layout Comment

M-x math-macro LiTa
\layout Comment

To make it available, copy to some place in the document.
\layout Comment

To use it, write 
\backslash 
LiTa in math-mode (^C) and you will get 
\begin_inset Formula \( \LiTa  \)
\end_inset 


\the_end



Re: Q: long table and chemical formula

2001-07-11 Thread Thomas de Grenier de Latour

Guenter Milde wrote:
 
 PS:  Question to the gurus:
 
 Could I have a function or macro that does this but
 also changes the font to roman?
 
 \bind C-S-underscoremath-insert _\mathrm{}does not work
 
 defining a (math-macro sub 1) does not work either (font changes cannot be
 included in the macro definiton in a WYSIWYM manner, only via \textrm{#1}
 all in red)
 
 Guenter
 


There is a lyx function called command-sequence which can help to
define strange shortcuts. Try something like this:
\bind C-S-underscorecommand-sequence math-insert _;
math-insert mathrm;
But this work only for the first char after the mathrm, because there is
no {}.
A very ugly solution is this one:
command-sequence math-insert _; tex-mode; type m; type a; type t; type
h; type r; type m; type {;
The closing } is added by LyX (type has the same behaviour as you with
your favorite keyboard).
But when I re-read it, the shame falls on me (I've got a lot of such
things in my perso.bind), and I expect real gurus will forgive me... 

--
Thomas.



Re: Q: long table and chemical formula

2001-07-11 Thread Thomas de Grenier de Latour

Thomas de Grenier de Latour (Hey! It's me!) wrote:
 
 command-sequence math-insert _; tex-mode; type m; type a; type t; type
 h; type r; type m; type {;
 

H... strange... it does work when entered in the minibuffer, but not
as a binded shortcut. Sorry for the mistake.


(In fact, when this thing is binded to a key, all the type stuff is
done behind the math box, where the first cursor stands. The second one,
the one of the math box, isn't activated until I touch the keyboard
again. Probably I'm bugy, or my LyX is drunk, but two cursors are one
too much.)


 --
 Thomas.



Re: Re: Q: long table and chemical formula

2001-07-11 Thread Guenter Milde

On Tue, 10 Jul 2001 23:58:50 +0300 wrote Dekel Tsur <[EMAIL PROTECTED]>:

> On Tue, Jul 10, 2001 at 04:38:33PM -0400, Wonil Chang wrote:
> > Hello all,
> > 
> > I need to convert a long data file (more than 100 rows and 5 columns) to a
> > table in lyx. I tried to insert tabular by clicking on the table menubar, but
> > the maximum row configured by default is 50. How can I increase the limit?
> 
> You can change the limits only by changing the source.
> It is also possible to use script for converting a text file into a LyX table.
> See http://www.mail-archive.com/lyx-users@lists.lyx.org/msg11775.html

The csv2lyx script has improved much since this posting. (Would it be ok to
send it to the list?)

 
> > I have to use subscripts and superscripts for chemical formula very often. Is
> > there any package that can make my life a little bit easier?
> 
> Since I'm not a chemist, I don't know about such packages.
> But you can use math macros (see the user guide).

Math macros are ok for a complex/long formula that appears quite often in
your text: you define it one time (which is a bit tedious) and then you can
use it all over the place. (See the attached lyx-file for an example)
If you have a lot of different fromulas, it might
be helpfull to define keybindings for sub- and superscript: In my
keybindings-file I have

\bind "C-S-underscore""math-insert _"   # subscript
\bind "C-asciicircum"   "math-insert ^"   # superscript

So for water, I press H Ctrl-_ 2 Esc O. Note that I don't need to  switch to
math_mode with Ctrl-M, as Ctrl-_ does this for me (if not already in, but
then I could simply use _ without Ctrl).



PS:  Question to the gurus: 

Could I have a function or macro that does this but
also changes the font to roman?

\bind "C-S-underscore""math-insert _\mathrm{}"does not work

defining a (math-macro sub 1) does not work either (font changes cannot be
included in the macro definiton in a WYSIWYM manner, only via \textrm{#1}
all in red)


Guenter

--
[EMAIL PROTECTED]
 

#LyX 1.1 created this file. For more info see http://www.lyx.org/
\lyxformat 218
\textclass article
\language german
\inputencoding latin1
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize a4paper
\paperpackage a4
\use_geometry 1
\use_amsmath 0
\paperorientation portrait
\leftmargin 2cm
\topmargin 1cm
\rightmargin 2cm
\bottommargin 2cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language german
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle plain

\layout Standard


\begin_inset FormulaMacro 
\newcommand{\LiTa}{\textrm{LiTaO}_{3}}

\end_inset 


\layout Comment

The macro LiTa was created with
\layout Comment

M-x math-macro LiTa
\layout Comment

To make it available, copy to some place in the document.
\layout Comment

To use it, write 
\backslash 
LiTa in math-mode (^C) and you will get 
\begin_inset Formula \( \LiTa  \)
\end_inset 


\the_end



Re: Q: long table and chemical formula

2001-07-11 Thread Thomas de Grenier de Latour

Guenter Milde wrote:
> 
> PS:  Question to the gurus:
> 
> Could I have a function or macro that does this but
> also changes the font to roman?
> 
> \bind "C-S-underscore""math-insert _\mathrm{}"does not work
> 
> defining a (math-macro sub 1) does not work either (font changes cannot be
> included in the macro definiton in a WYSIWYM manner, only via \textrm{#1}
> all in red)
> 
> Guenter
> 
>

There is a lyx function called "command-sequence" which can help to
define strange shortcuts. Try something like this:
\bind "C-S-underscore""command-sequence math-insert _;
math-insert mathrm;"
But this work only for the first char after the mathrm, because there is
no {}.
A very ugly solution is this one:
"command-sequence math-insert _; tex-mode; type m; type a; type t; type
h; type r; type m; type {;"
The closing } is added by LyX (type has the same behaviour as you with
your favorite keyboard).
But when I re-read it, the shame falls on me (I've got a lot of such
things in my perso.bind), and I expect real gurus will forgive me... 

--
Thomas.



Re: Q: long table and chemical formula

2001-07-11 Thread Thomas de Grenier de Latour

Thomas de Grenier de Latour (Hey! It's me!) wrote:
> 
> "command-sequence math-insert _; tex-mode; type m; type a; type t; type
> h; type r; type m; type {;"
> 

H... strange... it does work when entered in the minibuffer, but not
as a binded shortcut. Sorry for the mistake.


(In fact, when this "thing" is binded to a key, all the "type" stuff is
done behind the math box, where the first cursor stands. The second one,
the one of the math box, isn't activated until I touch the keyboard
again. Probably I'm bugy, or my LyX is drunk, but two cursors are one
too much.)


> --
> Thomas.