Re: Find and Replace math

2008-12-07 Thread Pavel Sanda
 Richard Heck [EMAIL PROTECTED] writes:
  This is a long-standing desire, for round trip LaTeX editing, or the
  ability to edit directly in the ViewSource pane. Unfortunately, LyX's
  own internal format isn't LaTeX, and the tex2lyx importer isn't ready
  for this kind of thing. 
 
 Basically, it is easy to offer this feature of latex editing, but the
 result would be so dissatisfyng that people would complain endlessly
 about it. LyX is only able to _produce_ some restricted form of LaTeX,
 not to edit arbitrary latex. 

this is so often reiterated question that i started to think on wiki page
where we put the enhacenment requests, we are _not_ going to implement +
the reasons why :)

pavel


Re: Find and Replace math

2008-12-07 Thread Pavel Sanda
 Richard Heck [EMAIL PROTECTED] writes:
  This is a long-standing desire, for round trip LaTeX editing, or the
  ability to edit directly in the ViewSource pane. Unfortunately, LyX's
  own internal format isn't LaTeX, and the tex2lyx importer isn't ready
  for this kind of thing. 
 
 Basically, it is easy to offer this feature of latex editing, but the
 result would be so dissatisfyng that people would complain endlessly
 about it. LyX is only able to _produce_ some restricted form of LaTeX,
 not to edit arbitrary latex. 

this is so often reiterated question that i started to think on wiki page
where we put the enhacenment requests, we are _not_ going to implement +
the reasons why :)

pavel


Re: Find and Replace math

2008-12-07 Thread Pavel Sanda
> Richard Heck <[EMAIL PROTECTED]> writes:
> > This is a long-standing desire, for "round trip" LaTeX editing, or the
> > ability to edit directly in the View>Source pane. Unfortunately, LyX's
> > own internal format isn't LaTeX, and the tex2lyx importer isn't ready
> > for this kind of thing. 
> 
> Basically, it is easy to offer this feature of latex editing, but the
> result would be so dissatisfyng that people would complain endlessly
> about it. LyX is only able to _produce_ some restricted form of LaTeX,
> not to edit arbitrary latex. 

this is so often reiterated question that i started to think on wiki page
where we put the enhacenment requests, we are _not_ going to implement +
the reasons why :)

pavel


Re: Find and Replace math

2008-12-06 Thread Erez Yerushalmi
Hi Tommaso,

Thanks for your mail, and for the time you spent writing it!

LyX is really a good tool for me, especially because I have
horrible/unorganized writing.
So, I actually work-out all the math directly with LyX.

What I liked about your video was that I could find and replace math.
Sometimes/many times, I change my mind and decide to call a parameter with a
different name.
But LyX 1.6 doesn't seem to be able (yet) to do it.
I have no problems with actual text, just the math.

Is it true, like others on the forum had said, that this feature will be
incorporated into LyX 2 ver?  I hope so.

This is the main reason why I need to export, then find and replace.

So, thanks for your mail,

Regards,  Erez


On Fri, Dec 5, 2008 at 2:58 PM, Cucinotta Tommaso [EMAIL PROTECTED]wrote:

 On Wed, 3 Dec 2008 21:57:33 +
  Erez Yerushalmi [EMAIL PROTECTED] wrote:

 Hi JMarc,

 Thanks for your answer!
 Is it you in youtube??? :-)


 Actually, it's me, hope you could get at least a few words out of what I
 say :-)

  The easiest option at the moment to find and replace would be to export as
 latex into an editor, and find and replace y_{1t}  into x_{1t}. Then
 import
 it again.


 If you really want it, you can write a script that
 exports to latex, invokes your favorite text editor,
 then imports back to lyx. But LyX is not designed
 for such purpose, as pointed out by core developers,
 therefore the process is likely to fail because lyx cannot manage to parse
 all of the latex stuff that you can ever write, the tex2lyx process is lossy
 and non-perfectly-reversable, and you can make a mistake (most common is
 unmatched parenthesis or $ in maths) and then all blows up.

 This is the same rationale for which I like LyX how it is now, it
 (theoretically / ideally) does not allow you to make LaTeX mistakes, because
 everything you enter into LyX is syntactically correct, except if you use
 (at your own risk) ERT blocks.

  If LyX is an editor for Latex, why don't we have a special button that
 enables us to switch from regular LyX view to a programing editor
 view?


 Use View-Source, I use it for didactic purposes, while writing pure
 LaTeX with Emacs, when I can't remember how you can do certain constructs.

  Then, I would find and replace like I will do now in a programming editor.


 ... and you would end up into the usual compilation errors that you are so
 accustomed to (see above) ... I don't think that editing a text file should
 imply being an expert of any syntax but it's just a view of the world ...

  Another side benefit would be that it actually helps us to understand what
 underlying latex commands were actually used in LyX, which would bring me
 back to the basics, closer to the LyX/Latex idea.


 View-Source again, here

  What do you say??


 As of the current code status, it would not be too difficult to incorporate
 a replace option, where you could be able to enter the text to replace in
 yet another LyX-enabled WorkArea: the matching text is already selected, so
 it is just a matter of cutting it from the document (I'm sure there is some
 LFUN for that), plus pasting the replacement text like if we were pasting
 from the clipboard (I'm sure there should be some LFUN for doing almost this
 as well). As a quick hack, one could temporarily copy the replacement text
 into the clipboard, just to get fast to a proof of concept.

 Actually, some people would love to redesign the entire feature (including
 myself), but nobody has time, so maybe I'll work to the quick hack for the
 replace, one of these days, maybe while flying ...
 ... replacing with regexp-enabled for back-references may be more complex
 to realise ...

 My 2 cents,

  T.




-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi


Re: Find and Replace math

2008-12-06 Thread James Sutherland
I must admit that I haven't followed this thread much, so take this  
for what it's worth.


When doing a find/replace on math entries, I simply open the original  
LyX document in a text editor and then do a search/replace as  
appropriate.  Then re-open in LyX.  This works much better than export  
to LaTeX and re-import to LyX since that often produces many ERT  
boxes...  However, using this approach, one should back up your  
original LyX document in case you accidentally break it when editing  
externally.


James


On Dec 6, 2008, at 7:23 AM, Erez Yerushalmi wrote:


Hi Tommaso,

Thanks for your mail, and for the time you spent writing it!

LyX is really a good tool for me, especially because I have
horrible/unorganized writing.
So, I actually work-out all the math directly with LyX.

What I liked about your video was that I could find and replace  
math.
Sometimes/many times, I change my mind and decide to call a  
parameter with a

different name.
But LyX 1.6 doesn't seem to be able (yet) to do it.
I have no problems with actual text, just the math.

Is it true, like others on the forum had said, that this feature  
will be

incorporated into LyX 2 ver?  I hope so.

This is the main reason why I need to export, then find and replace.

So, thanks for your mail,

Regards,  Erez


On Fri, Dec 5, 2008 at 2:58 PM, Cucinotta Tommaso  
[EMAIL PROTECTED]wrote:



On Wed, 3 Dec 2008 21:57:33 +
Erez Yerushalmi [EMAIL PROTECTED] wrote:


Hi JMarc,

Thanks for your answer!
Is it you in youtube??? :-)



Actually, it's me, hope you could get at least a few words out of  
what I

say :-)

The easiest option at the moment to find and replace would be to  
export as

latex into an editor, and find and replace y_{1t}  into x_{1t}. Then
import
it again.



If you really want it, you can write a script that
exports to latex, invokes your favorite text editor,
then imports back to lyx. But LyX is not designed
for such purpose, as pointed out by core developers,
therefore the process is likely to fail because lyx cannot manage  
to parse
all of the latex stuff that you can ever write, the tex2lyx process  
is lossy
and non-perfectly-reversable, and you can make a mistake (most  
common is

unmatched parenthesis or $ in maths) and then all blows up.

This is the same rationale for which I like LyX how it is now, it
(theoretically / ideally) does not allow you to make LaTeX  
mistakes, because
everything you enter into LyX is syntactically correct, except if  
you use

(at your own risk) ERT blocks.

If LyX is an editor for Latex, why don't we have a special button  
that
enables us to switch from regular LyX view to a programing  
editor

view?



Use View-Source, I use it for didactic purposes, while writing  
pure
LaTeX with Emacs, when I can't remember how you can do certain  
constructs.


Then, I would find and replace like I will do now in a programming  
editor.




... and you would end up into the usual compilation errors that you  
are so
accustomed to (see above) ... I don't think that editing a text  
file should
imply being an expert of any syntax but it's just a view of the  
world ...


Another side benefit would be that it actually helps us to  
understand what
underlying latex commands were actually used in LyX, which would  
bring me

back to the basics, closer to the LyX/Latex idea.



View-Source again, here

What do you say??




As of the current code status, it would not be too difficult to  
incorporate
a replace option, where you could be able to enter the text to  
replace in
yet another LyX-enabled WorkArea: the matching text is already  
selected, so
it is just a matter of cutting it from the document (I'm sure there  
is some
LFUN for that), plus pasting the replacement text like if we were  
pasting
from the clipboard (I'm sure there should be some LFUN for doing  
almost this
as well). As a quick hack, one could temporarily copy the  
replacement text

into the clipboard, just to get fast to a proof of concept.

Actually, some people would love to redesign the entire feature  
(including
myself), but nobody has time, so maybe I'll work to the quick hack  
for the

replace, one of these days, maybe while flying ...
... replacing with regexp-enabled for back-references may be more  
complex

to realise ...

My 2 cents,

T.





--
Erez Yerushalmi
PhD Student
Warwick University, UK
http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi




Re: Find and Replace math

2008-12-06 Thread Stefan Schimanski


Am 06.12.2008 um 15:23 schrieb Erez Yerushalmi:


Hi Tommaso,

Thanks for your mail, and for the time you spent writing it!

LyX is really a good tool for me, especially because I have
horrible/unorganized writing.
So, I actually work-out all the math directly with LyX.

What I liked about your video was that I could find and replace  
math.
Sometimes/many times, I change my mind and decide to call a  
parameter with a

different name.
But LyX 1.6 doesn't seem to be able (yet) to do it.
I have no problems with actual text, just the math.


You know math macros? It's exactly for this kind of thing when you do  
not know the final notation yet. You can insert a math macro  
definition using the \foo := button the extra-toolbar, and insert an  
instance using \yourmacroname in the math editor.


Stefan



Re: Find and Replace math

2008-12-06 Thread Erez Yerushalmi
Hi Tommaso,

Thanks for your mail, and for the time you spent writing it!

LyX is really a good tool for me, especially because I have
horrible/unorganized writing.
So, I actually work-out all the math directly with LyX.

What I liked about your video was that I could find and replace math.
Sometimes/many times, I change my mind and decide to call a parameter with a
different name.
But LyX 1.6 doesn't seem to be able (yet) to do it.
I have no problems with actual text, just the math.

Is it true, like others on the forum had said, that this feature will be
incorporated into LyX 2 ver?  I hope so.

This is the main reason why I need to export, then find and replace.

So, thanks for your mail,

Regards,  Erez


On Fri, Dec 5, 2008 at 2:58 PM, Cucinotta Tommaso [EMAIL PROTECTED]wrote:

 On Wed, 3 Dec 2008 21:57:33 +
  Erez Yerushalmi [EMAIL PROTECTED] wrote:

 Hi JMarc,

 Thanks for your answer!
 Is it you in youtube??? :-)


 Actually, it's me, hope you could get at least a few words out of what I
 say :-)

  The easiest option at the moment to find and replace would be to export as
 latex into an editor, and find and replace y_{1t}  into x_{1t}. Then
 import
 it again.


 If you really want it, you can write a script that
 exports to latex, invokes your favorite text editor,
 then imports back to lyx. But LyX is not designed
 for such purpose, as pointed out by core developers,
 therefore the process is likely to fail because lyx cannot manage to parse
 all of the latex stuff that you can ever write, the tex2lyx process is lossy
 and non-perfectly-reversable, and you can make a mistake (most common is
 unmatched parenthesis or $ in maths) and then all blows up.

 This is the same rationale for which I like LyX how it is now, it
 (theoretically / ideally) does not allow you to make LaTeX mistakes, because
 everything you enter into LyX is syntactically correct, except if you use
 (at your own risk) ERT blocks.

  If LyX is an editor for Latex, why don't we have a special button that
 enables us to switch from regular LyX view to a programing editor
 view?


 Use View-Source, I use it for didactic purposes, while writing pure
 LaTeX with Emacs, when I can't remember how you can do certain constructs.

  Then, I would find and replace like I will do now in a programming editor.


 ... and you would end up into the usual compilation errors that you are so
 accustomed to (see above) ... I don't think that editing a text file should
 imply being an expert of any syntax but it's just a view of the world ...

  Another side benefit would be that it actually helps us to understand what
 underlying latex commands were actually used in LyX, which would bring me
 back to the basics, closer to the LyX/Latex idea.


 View-Source again, here

  What do you say??


 As of the current code status, it would not be too difficult to incorporate
 a replace option, where you could be able to enter the text to replace in
 yet another LyX-enabled WorkArea: the matching text is already selected, so
 it is just a matter of cutting it from the document (I'm sure there is some
 LFUN for that), plus pasting the replacement text like if we were pasting
 from the clipboard (I'm sure there should be some LFUN for doing almost this
 as well). As a quick hack, one could temporarily copy the replacement text
 into the clipboard, just to get fast to a proof of concept.

 Actually, some people would love to redesign the entire feature (including
 myself), but nobody has time, so maybe I'll work to the quick hack for the
 replace, one of these days, maybe while flying ...
 ... replacing with regexp-enabled for back-references may be more complex
 to realise ...

 My 2 cents,

  T.




-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi


Re: Find and Replace math

2008-12-06 Thread James Sutherland
I must admit that I haven't followed this thread much, so take this  
for what it's worth.


When doing a find/replace on math entries, I simply open the original  
LyX document in a text editor and then do a search/replace as  
appropriate.  Then re-open in LyX.  This works much better than export  
to LaTeX and re-import to LyX since that often produces many ERT  
boxes...  However, using this approach, one should back up your  
original LyX document in case you accidentally break it when editing  
externally.


James


On Dec 6, 2008, at 7:23 AM, Erez Yerushalmi wrote:


Hi Tommaso,

Thanks for your mail, and for the time you spent writing it!

LyX is really a good tool for me, especially because I have
horrible/unorganized writing.
So, I actually work-out all the math directly with LyX.

What I liked about your video was that I could find and replace  
math.
Sometimes/many times, I change my mind and decide to call a  
parameter with a

different name.
But LyX 1.6 doesn't seem to be able (yet) to do it.
I have no problems with actual text, just the math.

Is it true, like others on the forum had said, that this feature  
will be

incorporated into LyX 2 ver?  I hope so.

This is the main reason why I need to export, then find and replace.

So, thanks for your mail,

Regards,  Erez


On Fri, Dec 5, 2008 at 2:58 PM, Cucinotta Tommaso  
[EMAIL PROTECTED]wrote:



On Wed, 3 Dec 2008 21:57:33 +
Erez Yerushalmi [EMAIL PROTECTED] wrote:


Hi JMarc,

Thanks for your answer!
Is it you in youtube??? :-)



Actually, it's me, hope you could get at least a few words out of  
what I

say :-)

The easiest option at the moment to find and replace would be to  
export as

latex into an editor, and find and replace y_{1t}  into x_{1t}. Then
import
it again.



If you really want it, you can write a script that
exports to latex, invokes your favorite text editor,
then imports back to lyx. But LyX is not designed
for such purpose, as pointed out by core developers,
therefore the process is likely to fail because lyx cannot manage  
to parse
all of the latex stuff that you can ever write, the tex2lyx process  
is lossy
and non-perfectly-reversable, and you can make a mistake (most  
common is

unmatched parenthesis or $ in maths) and then all blows up.

This is the same rationale for which I like LyX how it is now, it
(theoretically / ideally) does not allow you to make LaTeX  
mistakes, because
everything you enter into LyX is syntactically correct, except if  
you use

(at your own risk) ERT blocks.

If LyX is an editor for Latex, why don't we have a special button  
that
enables us to switch from regular LyX view to a programing  
editor

view?



Use View-Source, I use it for didactic purposes, while writing  
pure
LaTeX with Emacs, when I can't remember how you can do certain  
constructs.


Then, I would find and replace like I will do now in a programming  
editor.




... and you would end up into the usual compilation errors that you  
are so
accustomed to (see above) ... I don't think that editing a text  
file should
imply being an expert of any syntax but it's just a view of the  
world ...


Another side benefit would be that it actually helps us to  
understand what
underlying latex commands were actually used in LyX, which would  
bring me

back to the basics, closer to the LyX/Latex idea.



View-Source again, here

What do you say??




As of the current code status, it would not be too difficult to  
incorporate
a replace option, where you could be able to enter the text to  
replace in
yet another LyX-enabled WorkArea: the matching text is already  
selected, so
it is just a matter of cutting it from the document (I'm sure there  
is some
LFUN for that), plus pasting the replacement text like if we were  
pasting
from the clipboard (I'm sure there should be some LFUN for doing  
almost this
as well). As a quick hack, one could temporarily copy the  
replacement text

into the clipboard, just to get fast to a proof of concept.

Actually, some people would love to redesign the entire feature  
(including
myself), but nobody has time, so maybe I'll work to the quick hack  
for the

replace, one of these days, maybe while flying ...
... replacing with regexp-enabled for back-references may be more  
complex

to realise ...

My 2 cents,

T.





--
Erez Yerushalmi
PhD Student
Warwick University, UK
http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi




Re: Find and Replace math

2008-12-06 Thread Stefan Schimanski


Am 06.12.2008 um 15:23 schrieb Erez Yerushalmi:


Hi Tommaso,

Thanks for your mail, and for the time you spent writing it!

LyX is really a good tool for me, especially because I have
horrible/unorganized writing.
So, I actually work-out all the math directly with LyX.

What I liked about your video was that I could find and replace  
math.
Sometimes/many times, I change my mind and decide to call a  
parameter with a

different name.
But LyX 1.6 doesn't seem to be able (yet) to do it.
I have no problems with actual text, just the math.


You know math macros? It's exactly for this kind of thing when you do  
not know the final notation yet. You can insert a math macro  
definition using the \foo := button the extra-toolbar, and insert an  
instance using \yourmacroname in the math editor.


Stefan



Re: Find and Replace math

2008-12-06 Thread Erez Yerushalmi
Hi Tommaso,

Thanks for your mail, and for the time you spent writing it!

LyX is really a good tool for me, especially because I have
horrible/unorganized writing.
So, I actually work-out all the math directly with LyX.

What I liked about your video was that I could "find and replace" math.
Sometimes/many times, I change my mind and decide to call a parameter with a
different name.
But LyX 1.6 doesn't seem to be able (yet) to do it.
I have no problems with actual text, just the math.

Is it true, like others on the forum had said, that this feature will be
incorporated into LyX 2 ver?  I hope so.

This is the main reason why I need to export, then find and replace.

So, thanks for your mail,

Regards,  Erez


On Fri, Dec 5, 2008 at 2:58 PM, Cucinotta Tommaso <[EMAIL PROTECTED]>wrote:

> On Wed, 3 Dec 2008 21:57:33 +
>  "Erez Yerushalmi" <[EMAIL PROTECTED]> wrote:
>
>> Hi JMarc,
>>
>> Thanks for your answer!
>> Is it you in youtube??? :-)
>>
>
> Actually, it's me, hope you could get at least a few words out of what I
> say :-)
>
>  The easiest option at the moment to find and replace would be to export as
>> latex into an editor, and find and replace y_{1t}  into x_{1t}. Then
>> import
>> it again.
>>
>
> If you really want it, you can write a script that
> exports to latex, invokes your favorite text editor,
> then imports back to lyx. But LyX is not designed
> for such purpose, as pointed out by core developers,
> therefore the process is likely to fail because lyx cannot manage to parse
> all of the latex stuff that you can ever write, the tex2lyx process is lossy
> and non-perfectly-reversable, and you can make a mistake (most common is
> unmatched parenthesis or $ in maths) and then all blows up.
>
> This is the same rationale for which I like LyX how it is now, it
> (theoretically / ideally) does not allow you to make LaTeX mistakes, because
> everything you enter into LyX is "syntactically correct", except if you use
> (at your own risk) ERT blocks.
>
>  If LyX is an editor for Latex, why don't we have a special button that
>> enables us to switch from "regular" LyX view to a "programing" editor
>> view?
>>
>
> Use View->Source, I use it for "didactic" purposes, while writing pure
> LaTeX with Emacs, when I can't remember how you can do certain constructs.
>
>  Then, I would find and replace like I will do now in a programming editor.
>>
>
> ... and you would end up into the usual compilation errors that you are so
> accustomed to (see above) ... I don't think that editing a text file should
> imply being an expert of any syntax but it's just a view of the world ...
>
>  Another side benefit would be that it actually helps us to understand what
>> underlying latex commands were actually used in LyX, which would bring me
>> back to the basics, closer to the LyX/Latex idea.
>>
>
> View->Source again, here
>
>  What do you say??
>>
>
> As of the current code status, it would not be too difficult to incorporate
> a "replace" option, where you could be able to enter the text to replace in
> yet another LyX-enabled WorkArea: the matching text is already selected, so
> it is just a matter of cutting it from the document (I'm sure there is some
> LFUN for that), plus pasting the replacement text like if we were pasting
> from the clipboard (I'm sure there should be some LFUN for doing almost this
> as well). As a quick hack, one could temporarily copy the replacement text
> into the clipboard, just to get fast to a "proof of concept".
>
> Actually, some people would love to redesign the entire feature (including
> myself), but nobody has time, so maybe I'll work to the quick hack for the
> replace, one of these days, maybe while flying ...
> ... replacing with regexp-enabled for back-references may be more complex
> to realise ...
>
> My 2 cents,
>
>  T.
>



-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi


Re: Find and Replace math

2008-12-06 Thread James Sutherland
I must admit that I haven't followed this thread much, so take this  
for what it's worth.


When doing a find/replace on math entries, I simply open the original  
LyX document in a text editor and then do a search/replace as  
appropriate.  Then re-open in LyX.  This works much better than export  
to LaTeX and re-import to LyX since that often produces many ERT  
boxes...  However, using this approach, one should back up your  
original LyX document in case you accidentally break it when editing  
externally.


James


On Dec 6, 2008, at 7:23 AM, Erez Yerushalmi wrote:


Hi Tommaso,

Thanks for your mail, and for the time you spent writing it!

LyX is really a good tool for me, especially because I have
horrible/unorganized writing.
So, I actually work-out all the math directly with LyX.

What I liked about your video was that I could "find and replace"  
math.
Sometimes/many times, I change my mind and decide to call a  
parameter with a

different name.
But LyX 1.6 doesn't seem to be able (yet) to do it.
I have no problems with actual text, just the math.

Is it true, like others on the forum had said, that this feature  
will be

incorporated into LyX 2 ver?  I hope so.

This is the main reason why I need to export, then find and replace.

So, thanks for your mail,

Regards,  Erez


On Fri, Dec 5, 2008 at 2:58 PM, Cucinotta Tommaso  
<[EMAIL PROTECTED]>wrote:



On Wed, 3 Dec 2008 21:57:33 +
"Erez Yerushalmi" <[EMAIL PROTECTED]> wrote:


Hi JMarc,

Thanks for your answer!
Is it you in youtube??? :-)



Actually, it's me, hope you could get at least a few words out of  
what I

say :-)

The easiest option at the moment to find and replace would be to  
export as

latex into an editor, and find and replace y_{1t}  into x_{1t}. Then
import
it again.



If you really want it, you can write a script that
exports to latex, invokes your favorite text editor,
then imports back to lyx. But LyX is not designed
for such purpose, as pointed out by core developers,
therefore the process is likely to fail because lyx cannot manage  
to parse
all of the latex stuff that you can ever write, the tex2lyx process  
is lossy
and non-perfectly-reversable, and you can make a mistake (most  
common is

unmatched parenthesis or $ in maths) and then all blows up.

This is the same rationale for which I like LyX how it is now, it
(theoretically / ideally) does not allow you to make LaTeX  
mistakes, because
everything you enter into LyX is "syntactically correct", except if  
you use

(at your own risk) ERT blocks.

If LyX is an editor for Latex, why don't we have a special button  
that
enables us to switch from "regular" LyX view to a "programing"  
editor

view?



Use View->Source, I use it for "didactic" purposes, while writing  
pure
LaTeX with Emacs, when I can't remember how you can do certain  
constructs.


Then, I would find and replace like I will do now in a programming  
editor.




... and you would end up into the usual compilation errors that you  
are so
accustomed to (see above) ... I don't think that editing a text  
file should
imply being an expert of any syntax but it's just a view of the  
world ...


Another side benefit would be that it actually helps us to  
understand what
underlying latex commands were actually used in LyX, which would  
bring me

back to the basics, closer to the LyX/Latex idea.



View->Source again, here

What do you say??




As of the current code status, it would not be too difficult to  
incorporate
a "replace" option, where you could be able to enter the text to  
replace in
yet another LyX-enabled WorkArea: the matching text is already  
selected, so
it is just a matter of cutting it from the document (I'm sure there  
is some
LFUN for that), plus pasting the replacement text like if we were  
pasting
from the clipboard (I'm sure there should be some LFUN for doing  
almost this
as well). As a quick hack, one could temporarily copy the  
replacement text

into the clipboard, just to get fast to a "proof of concept".

Actually, some people would love to redesign the entire feature  
(including
myself), but nobody has time, so maybe I'll work to the quick hack  
for the

replace, one of these days, maybe while flying ...
... replacing with regexp-enabled for back-references may be more  
complex

to realise ...

My 2 cents,

T.





--
Erez Yerushalmi
PhD Student
Warwick University, UK
http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi




Re: Find and Replace math

2008-12-06 Thread Stefan Schimanski


Am 06.12.2008 um 15:23 schrieb Erez Yerushalmi:


Hi Tommaso,

Thanks for your mail, and for the time you spent writing it!

LyX is really a good tool for me, especially because I have
horrible/unorganized writing.
So, I actually work-out all the math directly with LyX.

What I liked about your video was that I could "find and replace"  
math.
Sometimes/many times, I change my mind and decide to call a  
parameter with a

different name.
But LyX 1.6 doesn't seem to be able (yet) to do it.
I have no problems with actual text, just the math.


You know math macros? It's exactly for this kind of thing when you do  
not know the final notation yet. You can insert a math macro  
definition using the "\foo :=" button the extra-toolbar, and insert an  
instance using \yourmacroname in the math editor.


Stefan



Re: Find and Replace math

2008-12-05 Thread Cucinotta Tommaso

On Wed, 3 Dec 2008 21:57:33 +
 Erez Yerushalmi [EMAIL PROTECTED] wrote:

Hi JMarc,

Thanks for your answer!
Is it you in youtube??? :-)


Actually, it's me, hope you could get at least a few words 
out of what I say :-)


The easiest option at the moment to find and replace 
would be to export as
latex into an editor, and find and replace y_{1t}  into 
x_{1t}. Then import

it again.


If you really want it, you can write a script that
exports to latex, invokes your favorite text editor,
then imports back to lyx. But LyX is not designed
for such purpose, as pointed out by core developers,
therefore the process is likely to fail because lyx cannot 
manage to parse all of the latex stuff that you can ever 
write, the tex2lyx process is lossy and 
non-perfectly-reversable, and you can make a mistake (most 
common is unmatched parenthesis or $ in maths) and then 
all blows up.


This is the same rationale for which I like LyX how it is 
now, it (theoretically / ideally) does not allow you to 
make LaTeX mistakes, because everything you enter into LyX 
is syntactically correct, except if you use (at your own 
risk) ERT blocks.


If LyX is an editor for Latex, why don't we have a 
special button that
enables us to switch from regular LyX view to a 
programing editor view?


Use View-Source, I use it for didactic purposes, while 
writing pure LaTeX with Emacs, when I can't remember how 
you can do certain constructs.


Then, I would find and replace like I will do now in a 
programming editor.


... and you would end up into the usual compilation errors 
that you are so accustomed to (see above) ... I don't 
think that editing a text file should imply being an 
expert of any syntax but it's just a view of the world ...


Another side benefit would be that it actually helps us 
to understand what
underlying latex commands were actually used in LyX, 
which would bring me

back to the basics, closer to the LyX/Latex idea.


View-Source again, here


What do you say??


As of the current code status, it would not be too 
difficult to incorporate a replace option, where you 
could be able to enter the text to replace in yet another 
LyX-enabled WorkArea: the matching text is already 
selected, so it is just a matter of cutting it from the 
document (I'm sure there is some LFUN for that), plus 
pasting the replacement text like if we were pasting from 
the clipboard (I'm sure there should be some LFUN for 
doing almost this as well). As a quick hack, one could 
temporarily copy the replacement text into the clipboard, 
just to get fast to a proof of concept.


Actually, some people would love to redesign the entire 
feature (including myself), but nobody has time, so maybe 
I'll work to the quick hack for the replace, one of these 
days, maybe while flying ...
... replacing with regexp-enabled for back-references may 
be more complex to realise ...


My 2 cents,

  T.


Re: Find and Replace math

2008-12-05 Thread Cucinotta Tommaso

On Wed, 3 Dec 2008 21:57:33 +
 Erez Yerushalmi [EMAIL PROTECTED] wrote:

Hi JMarc,

Thanks for your answer!
Is it you in youtube??? :-)


Actually, it's me, hope you could get at least a few words 
out of what I say :-)


The easiest option at the moment to find and replace 
would be to export as
latex into an editor, and find and replace y_{1t}  into 
x_{1t}. Then import

it again.


If you really want it, you can write a script that
exports to latex, invokes your favorite text editor,
then imports back to lyx. But LyX is not designed
for such purpose, as pointed out by core developers,
therefore the process is likely to fail because lyx cannot 
manage to parse all of the latex stuff that you can ever 
write, the tex2lyx process is lossy and 
non-perfectly-reversable, and you can make a mistake (most 
common is unmatched parenthesis or $ in maths) and then 
all blows up.


This is the same rationale for which I like LyX how it is 
now, it (theoretically / ideally) does not allow you to 
make LaTeX mistakes, because everything you enter into LyX 
is syntactically correct, except if you use (at your own 
risk) ERT blocks.


If LyX is an editor for Latex, why don't we have a 
special button that
enables us to switch from regular LyX view to a 
programing editor view?


Use View-Source, I use it for didactic purposes, while 
writing pure LaTeX with Emacs, when I can't remember how 
you can do certain constructs.


Then, I would find and replace like I will do now in a 
programming editor.


... and you would end up into the usual compilation errors 
that you are so accustomed to (see above) ... I don't 
think that editing a text file should imply being an 
expert of any syntax but it's just a view of the world ...


Another side benefit would be that it actually helps us 
to understand what
underlying latex commands were actually used in LyX, 
which would bring me

back to the basics, closer to the LyX/Latex idea.


View-Source again, here


What do you say??


As of the current code status, it would not be too 
difficult to incorporate a replace option, where you 
could be able to enter the text to replace in yet another 
LyX-enabled WorkArea: the matching text is already 
selected, so it is just a matter of cutting it from the 
document (I'm sure there is some LFUN for that), plus 
pasting the replacement text like if we were pasting from 
the clipboard (I'm sure there should be some LFUN for 
doing almost this as well). As a quick hack, one could 
temporarily copy the replacement text into the clipboard, 
just to get fast to a proof of concept.


Actually, some people would love to redesign the entire 
feature (including myself), but nobody has time, so maybe 
I'll work to the quick hack for the replace, one of these 
days, maybe while flying ...
... replacing with regexp-enabled for back-references may 
be more complex to realise ...


My 2 cents,

  T.


Re: Find and Replace math

2008-12-05 Thread Cucinotta Tommaso

On Wed, 3 Dec 2008 21:57:33 +
 "Erez Yerushalmi" <[EMAIL PROTECTED]> wrote:

Hi JMarc,

Thanks for your answer!
Is it you in youtube??? :-)


Actually, it's me, hope you could get at least a few words 
out of what I say :-)


The easiest option at the moment to find and replace 
would be to export as
latex into an editor, and find and replace y_{1t}  into 
x_{1t}. Then import

it again.


If you really want it, you can write a script that
exports to latex, invokes your favorite text editor,
then imports back to lyx. But LyX is not designed
for such purpose, as pointed out by core developers,
therefore the process is likely to fail because lyx cannot 
manage to parse all of the latex stuff that you can ever 
write, the tex2lyx process is lossy and 
non-perfectly-reversable, and you can make a mistake (most 
common is unmatched parenthesis or $ in maths) and then 
all blows up.


This is the same rationale for which I like LyX how it is 
now, it (theoretically / ideally) does not allow you to 
make LaTeX mistakes, because everything you enter into LyX 
is "syntactically correct", except if you use (at your own 
risk) ERT blocks.


If LyX is an editor for Latex, why don't we have a 
special button that
enables us to switch from "regular" LyX view to a 
"programing" editor view?


Use View->Source, I use it for "didactic" purposes, while 
writing pure LaTeX with Emacs, when I can't remember how 
you can do certain constructs.


Then, I would find and replace like I will do now in a 
programming editor.


... and you would end up into the usual compilation errors 
that you are so accustomed to (see above) ... I don't 
think that editing a text file should imply being an 
expert of any syntax but it's just a view of the world ...


Another side benefit would be that it actually helps us 
to understand what
underlying latex commands were actually used in LyX, 
which would bring me

back to the basics, closer to the LyX/Latex idea.


View->Source again, here


What do you say??


As of the current code status, it would not be too 
difficult to incorporate a "replace" option, where you 
could be able to enter the text to replace in yet another 
LyX-enabled WorkArea: the matching text is already 
selected, so it is just a matter of cutting it from the 
document (I'm sure there is some LFUN for that), plus 
pasting the replacement text like if we were pasting from 
the clipboard (I'm sure there should be some LFUN for 
doing almost this as well). As a quick hack, one could 
temporarily copy the replacement text into the clipboard, 
just to get fast to a "proof of concept".


Actually, some people would love to redesign the entire 
feature (including myself), but nobody has time, so maybe 
I'll work to the quick hack for the replace, one of these 
days, maybe while flying ...
... replacing with regexp-enabled for back-references may 
be more complex to realise ...


My 2 cents,

  T.


Re: Find and Replace math

2008-12-04 Thread Manveru
2008/12/3 Richard Heck [EMAIL PROTECTED]:
[...]

 This is a long-standing desire, for round trip LaTeX editing, or the
 ability to edit directly in the ViewSource pane. Unfortunately, LyX's own
 internal format isn't LaTeX, and the tex2lyx importer isn't ready for this
 kind of thing. But rest assured people keep thinking about it, and JMarc's
 recent work updating tex2lyx, so that it will at least produce the 1.6
 format---I can't remember if this has actually been completely done yet---is
 at least a step in the right direction.

I think many people want to see LyX as tool similar to Kompozer (HTML
editor). The problem with LaTeX language is that it is not
hierarchical as HTML (subset of XML). LyX itself tries to hold
document structure as hierarchical, what is much clearer. LaTeX is
used to format text according to some definitions from document
classes. But it large number of places it allows users doing things
not exchangeable in both directions, if structure has to be kept.

Personally I see this as large disadvantage of LaTeX, but there is
nothing better that to flowing text automatically. LyX is good balance
between structured documents and LaTeX strengths.

-- 
Manveru
jabber: [EMAIL PROTECTED]
 gg: 1624001
   http://www.manveru.pl


Re: Find and Replace math

2008-12-04 Thread Manveru
2008/12/3 Richard Heck [EMAIL PROTECTED]:
[...]

 This is a long-standing desire, for round trip LaTeX editing, or the
 ability to edit directly in the ViewSource pane. Unfortunately, LyX's own
 internal format isn't LaTeX, and the tex2lyx importer isn't ready for this
 kind of thing. But rest assured people keep thinking about it, and JMarc's
 recent work updating tex2lyx, so that it will at least produce the 1.6
 format---I can't remember if this has actually been completely done yet---is
 at least a step in the right direction.

I think many people want to see LyX as tool similar to Kompozer (HTML
editor). The problem with LaTeX language is that it is not
hierarchical as HTML (subset of XML). LyX itself tries to hold
document structure as hierarchical, what is much clearer. LaTeX is
used to format text according to some definitions from document
classes. But it large number of places it allows users doing things
not exchangeable in both directions, if structure has to be kept.

Personally I see this as large disadvantage of LaTeX, but there is
nothing better that to flowing text automatically. LyX is good balance
between structured documents and LaTeX strengths.

-- 
Manveru
jabber: [EMAIL PROTECTED]
 gg: 1624001
   http://www.manveru.pl


Re: Find and Replace math

2008-12-04 Thread Manveru
2008/12/3 Richard Heck <[EMAIL PROTECTED]>:
[...]
>
> This is a long-standing desire, for "round trip" LaTeX editing, or the
> ability to edit directly in the View>Source pane. Unfortunately, LyX's own
> internal format isn't LaTeX, and the tex2lyx importer isn't ready for this
> kind of thing. But rest assured people keep thinking about it, and JMarc's
> recent work updating tex2lyx, so that it will at least produce the 1.6
> format---I can't remember if this has actually been completely done yet---is
> at least a step in the right direction.

I think many people want to see LyX as tool similar to Kompozer (HTML
editor). The problem with LaTeX language is that it is not
hierarchical as HTML (subset of XML). LyX itself tries to hold
document structure as hierarchical, what is much clearer. LaTeX is
used to format text according to some definitions from document
classes. But it large number of places it allows users doing things
not exchangeable in both directions, if structure has to be kept.

Personally I see this as large disadvantage of LaTeX, but there is
nothing better that to flowing text automatically. LyX is good balance
between structured documents and LaTeX strengths.

-- 
Manveru
jabber: [EMAIL PROTECTED]
 gg: 1624001
   http://www.manveru.pl


Find and Replace math

2008-12-03 Thread Erez Yerushalmi
Dear All,

I need to change many symbols in a document.
In LyX-wiki and in youtube http://www.youtube.com/watch?v=JxjMVvn7d3M
I find that I should be able to use the advanced search with control-shift-f

But this does't work.  Does anyone know why?

I'm using
lyx 1.6.0
window xp


-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi


Re: Find and Replace math

2008-12-03 Thread Erez Yerushalmi
Hi JMarc,

Thanks for your answer!
Is it you in youtube??? :-)

I had an idea regarding this issue, which could be useful a wide range of
issues

The easiest option at the moment to find and replace would be to export as
latex into an editor, and find and replace y_{1t}  into  x_{1t}. Then import
it again.

If LyX is an editor for Latex, why don't we have a special button that
enables us to switch from regular LyX view to a programing editor view?

Then, I would find and replace like I will do now in a programming editor.
Furthermore, this would cover all the latex command possible in one shot.

When I'm done, I press again regular lyx view, and continue my work.

Another side benefit would be that it actually helps us to understand what
underlying latex commands were actually used in LyX, which would bring me
back to the basics, closer to the LyX/Latex idea.

The bad part in Scientific Workplace is that they are getting further and
further away from Latex.  I like LyX because it somehow the best of both
worlds.

What do you say??

Best regards,  Erez


On Wed, Dec 3, 2008 at 9:43 PM, Jean-Marc Lasgouttes [EMAIL PROTECTED]wrote:

 Erez Yerushalmi [EMAIL PROTECTED] writes:

  Dear All,
 
  I need to change many symbols in a document.
  In LyX-wiki and in youtube http://www.youtube.com/watch?v=JxjMVvn7d3M
  I find that I should be able to use the advanced search with
 control-shift-f
 
  But this does't work.  Does anyone know why?

 It is only available in development trunk (that will become 2.0). But it
 does not work as well as we would like yet.

 JMarc




-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi


Re: Find and Replace math

2008-12-03 Thread Richard Heck

Erez Yerushalmi wrote:

I had an idea regarding this issue, which could be useful a wide range of
issues

The easiest option at the moment to find and replace would be to export as
latex into an editor, and find and replace y_{1t}  into  x_{1t}. Then import
it again.

If LyX is an editor for Latex, why don't we have a special button that
enables us to switch from regular LyX view to a programing editor view?

Then, I would find and replace like I will do now in a programming editor.
Furthermore, this would cover all the latex command possible in one shot.

When I'm done, I press again regular lyx view, and continue my work.

Another side benefit would be that it actually helps us to understand what
underlying latex commands were actually used in LyX, which would bring me
back to the basics, closer to the LyX/Latex idea.

  
This is a long-standing desire, for round trip LaTeX editing, or the 
ability to edit directly in the ViewSource pane. Unfortunately, LyX's 
own internal format isn't LaTeX, and the tex2lyx importer isn't ready 
for this kind of thing. But rest assured people keep thinking about it, 
and JMarc's recent work updating tex2lyx, so that it will at least 
produce the 1.6 format---I can't remember if this has actually been 
completely done yet---is at least a step in the right direction.


rh



Re: Find and Replace math

2008-12-03 Thread Jean-Marc Lasgouttes
Richard Heck [EMAIL PROTECTED] writes:
 This is a long-standing desire, for round trip LaTeX editing, or the
 ability to edit directly in the ViewSource pane. Unfortunately, LyX's
 own internal format isn't LaTeX, and the tex2lyx importer isn't ready
 for this kind of thing. 

Basically, it is easy to offer this feature of latex editing, but the
result would be so dissatisfyng that people would complain endlessly
about it. LyX is only able to _produce_ some restricted form of LaTeX,
not to edit arbitrary latex. 

 But rest assured people keep thinking about it, and JMarc's recent
 work updating tex2lyx, so that it will at least produce the 1.6
 format---I can't remember if this has actually been completely done
 yet---is at least a step in the right direction.

I am not sure it is much of a step in this particular direction. LaTeX
handling will always remain in the import/export dept, that is an
imperfect transformation.

JMarc


Find and Replace math

2008-12-03 Thread Erez Yerushalmi
Dear All,

I need to change many symbols in a document.
In LyX-wiki and in youtube http://www.youtube.com/watch?v=JxjMVvn7d3M
I find that I should be able to use the advanced search with control-shift-f

But this does't work.  Does anyone know why?

I'm using
lyx 1.6.0
window xp


-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi


Re: Find and Replace math

2008-12-03 Thread Erez Yerushalmi
Hi JMarc,

Thanks for your answer!
Is it you in youtube??? :-)

I had an idea regarding this issue, which could be useful a wide range of
issues

The easiest option at the moment to find and replace would be to export as
latex into an editor, and find and replace y_{1t}  into  x_{1t}. Then import
it again.

If LyX is an editor for Latex, why don't we have a special button that
enables us to switch from regular LyX view to a programing editor view?

Then, I would find and replace like I will do now in a programming editor.
Furthermore, this would cover all the latex command possible in one shot.

When I'm done, I press again regular lyx view, and continue my work.

Another side benefit would be that it actually helps us to understand what
underlying latex commands were actually used in LyX, which would bring me
back to the basics, closer to the LyX/Latex idea.

The bad part in Scientific Workplace is that they are getting further and
further away from Latex.  I like LyX because it somehow the best of both
worlds.

What do you say??

Best regards,  Erez


On Wed, Dec 3, 2008 at 9:43 PM, Jean-Marc Lasgouttes [EMAIL PROTECTED]wrote:

 Erez Yerushalmi [EMAIL PROTECTED] writes:

  Dear All,
 
  I need to change many symbols in a document.
  In LyX-wiki and in youtube http://www.youtube.com/watch?v=JxjMVvn7d3M
  I find that I should be able to use the advanced search with
 control-shift-f
 
  But this does't work.  Does anyone know why?

 It is only available in development trunk (that will become 2.0). But it
 does not work as well as we would like yet.

 JMarc




-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi


Re: Find and Replace math

2008-12-03 Thread Richard Heck

Erez Yerushalmi wrote:

I had an idea regarding this issue, which could be useful a wide range of
issues

The easiest option at the moment to find and replace would be to export as
latex into an editor, and find and replace y_{1t}  into  x_{1t}. Then import
it again.

If LyX is an editor for Latex, why don't we have a special button that
enables us to switch from regular LyX view to a programing editor view?

Then, I would find and replace like I will do now in a programming editor.
Furthermore, this would cover all the latex command possible in one shot.

When I'm done, I press again regular lyx view, and continue my work.

Another side benefit would be that it actually helps us to understand what
underlying latex commands were actually used in LyX, which would bring me
back to the basics, closer to the LyX/Latex idea.

  
This is a long-standing desire, for round trip LaTeX editing, or the 
ability to edit directly in the ViewSource pane. Unfortunately, LyX's 
own internal format isn't LaTeX, and the tex2lyx importer isn't ready 
for this kind of thing. But rest assured people keep thinking about it, 
and JMarc's recent work updating tex2lyx, so that it will at least 
produce the 1.6 format---I can't remember if this has actually been 
completely done yet---is at least a step in the right direction.


rh



Re: Find and Replace math

2008-12-03 Thread Jean-Marc Lasgouttes
Richard Heck [EMAIL PROTECTED] writes:
 This is a long-standing desire, for round trip LaTeX editing, or the
 ability to edit directly in the ViewSource pane. Unfortunately, LyX's
 own internal format isn't LaTeX, and the tex2lyx importer isn't ready
 for this kind of thing. 

Basically, it is easy to offer this feature of latex editing, but the
result would be so dissatisfyng that people would complain endlessly
about it. LyX is only able to _produce_ some restricted form of LaTeX,
not to edit arbitrary latex. 

 But rest assured people keep thinking about it, and JMarc's recent
 work updating tex2lyx, so that it will at least produce the 1.6
 format---I can't remember if this has actually been completely done
 yet---is at least a step in the right direction.

I am not sure it is much of a step in this particular direction. LaTeX
handling will always remain in the import/export dept, that is an
imperfect transformation.

JMarc


Find and Replace math

2008-12-03 Thread Erez Yerushalmi
Dear All,

I need to change many symbols in a document.
In LyX-wiki and in youtube http://www.youtube.com/watch?v=JxjMVvn7d3M
I find that I should be able to use the advanced search with control-shift-f

But this does't work.  Does anyone know why?

I'm using
lyx 1.6.0
window xp


-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi


Re: Find and Replace math

2008-12-03 Thread Erez Yerushalmi
Hi JMarc,

Thanks for your answer!
Is it you in youtube??? :-)

I had an idea regarding this issue, which could be useful a wide range of
issues

The easiest option at the moment to find and replace would be to export as
latex into an editor, and find and replace y_{1t}  into  x_{1t}. Then import
it again.

If LyX is an editor for Latex, why don't we have a special button that
enables us to switch from "regular" LyX view to a "programing" editor view?

Then, I would find and replace like I will do now in a programming editor.
Furthermore, this would cover all the latex command possible in one shot.

When I'm done, I press again "regular" lyx view, and continue my work.

Another side benefit would be that it actually helps us to understand what
underlying latex commands were actually used in LyX, which would bring me
back to the basics, closer to the LyX/Latex idea.

The bad part in Scientific Workplace is that they are getting further and
further away from Latex.  I like LyX because it somehow the best of both
worlds.

What do you say??

Best regards,  Erez


On Wed, Dec 3, 2008 at 9:43 PM, Jean-Marc Lasgouttes <[EMAIL PROTECTED]>wrote:

> "Erez Yerushalmi" <[EMAIL PROTECTED]> writes:
>
> > Dear All,
> >
> > I need to change many symbols in a document.
> > In LyX-wiki and in youtube http://www.youtube.com/watch?v=JxjMVvn7d3M
> > I find that I should be able to use the advanced search with
> control-shift-f
> >
> > But this does't work.  Does anyone know why?
>
> It is only available in development trunk (that will become 2.0). But it
> does not work as well as we would like yet.
>
> JMarc
>



-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
http://www2.warwick.ac.uk/fac/soc/economics/research/phds/3rd_year/yerushalmi


Re: Find and Replace math

2008-12-03 Thread Richard Heck

Erez Yerushalmi wrote:

I had an idea regarding this issue, which could be useful a wide range of
issues

The easiest option at the moment to find and replace would be to export as
latex into an editor, and find and replace y_{1t}  into  x_{1t}. Then import
it again.

If LyX is an editor for Latex, why don't we have a special button that
enables us to switch from "regular" LyX view to a "programing" editor view?

Then, I would find and replace like I will do now in a programming editor.
Furthermore, this would cover all the latex command possible in one shot.

When I'm done, I press again "regular" lyx view, and continue my work.

Another side benefit would be that it actually helps us to understand what
underlying latex commands were actually used in LyX, which would bring me
back to the basics, closer to the LyX/Latex idea.

  
This is a long-standing desire, for "round trip" LaTeX editing, or the 
ability to edit directly in the View>Source pane. Unfortunately, LyX's 
own internal format isn't LaTeX, and the tex2lyx importer isn't ready 
for this kind of thing. But rest assured people keep thinking about it, 
and JMarc's recent work updating tex2lyx, so that it will at least 
produce the 1.6 format---I can't remember if this has actually been 
completely done yet---is at least a step in the right direction.


rh



Re: Find and Replace math

2008-12-03 Thread Jean-Marc Lasgouttes
Richard Heck <[EMAIL PROTECTED]> writes:
> This is a long-standing desire, for "round trip" LaTeX editing, or the
> ability to edit directly in the View>Source pane. Unfortunately, LyX's
> own internal format isn't LaTeX, and the tex2lyx importer isn't ready
> for this kind of thing. 

Basically, it is easy to offer this feature of latex editing, but the
result would be so dissatisfyng that people would complain endlessly
about it. LyX is only able to _produce_ some restricted form of LaTeX,
not to edit arbitrary latex. 

> But rest assured people keep thinking about it, and JMarc's recent
> work updating tex2lyx, so that it will at least produce the 1.6
> format---I can't remember if this has actually been completely done
> yet---is at least a step in the right direction.

I am not sure it is much of a step in this particular direction. LaTeX
handling will always remain in the import/export dept, that is an
imperfect transformation.

JMarc