Re: Diff two versions of document

2009-01-13 Thread Cucinotta Tommaso

On Tue, 13 Jan 2009 18:38:27 +0100
 Konrad Hofbauer hofba...@sbox.tugraz.at wrote:

Tommaso Cucinotta wrote:

Export to LaTeX both documents, use latexdiff, ...


Have not heard about this before - WOW !!!


Me neither since a few months ago, when Enrico Forestieri 
told me about latexdiff.



Thanks for sharing!


Just say thanks to Enrico.

  T.


Re: Diff two versions of document

2009-01-13 Thread Cucinotta Tommaso

On Tue, 13 Jan 2009 18:38:27 +0100
 Konrad Hofbauer hofba...@sbox.tugraz.at wrote:

Tommaso Cucinotta wrote:

Export to LaTeX both documents, use latexdiff, ...


Have not heard about this before - WOW !!!


Me neither since a few months ago, when Enrico Forestieri 
told me about latexdiff.



Thanks for sharing!


Just say thanks to Enrico.

  T.


Re: Diff two versions of document

2009-01-13 Thread Cucinotta Tommaso

On Tue, 13 Jan 2009 18:38:27 +0100
 Konrad Hofbauer  wrote:

Tommaso Cucinotta wrote:

Export to LaTeX both documents, use latexdiff, ...


Have not heard about this before - WOW !!!


Me neither since a few months ago, when Enrico Forestieri 
told me about latexdiff.



Thanks for sharing!


Just say thanks to Enrico.

  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-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.