Re: Find All and Emphasize

2009-08-21 Thread Tommaso Cucinotta

Pavel Sanda ha scritto:

Tommaso Cucinotta wrote:
  

Hi all,

I'd like to mention that, with the patch I committed right now on the SVN, 
the current version of LyX from trunk implements correctly this kind of 
feature, i.e., you can search for a plain word and replace it with its 
emphasized or boldface version, or search for some text (i.e., X1) and 
replace it with a math symbol ($X_1$), or you can search for some maths 
(i.e., $X^1$) and replace it with some rework of it (i.e., $Y_1$), etc.. I 
know there are many use-cases, and I hope somebody helps in identifying the 
most important ones and/or possible issues.



can you write some documentation in our manuals? this or the hint in bug 3095
wouldn't occur to me ... :)
pavel

  

I've committed right now the original manual I wrote at the times the
feature was not yet in trunk (probably Abdel forgot to consider this
file when he ported the patch to trunk). I'll extend it with further
details, such as the use-case under discussion, or the replace feature.

   T.




Re: Find All and Emphasize

2009-08-21 Thread Pavel Sanda
Tommaso Cucinotta wrote:
 I've committed right now the original manual I wrote at the times the
 feature was not yet in trunk (probably Abdel forgot to consider this
 file when he ported the patch to trunk). I'll extend it with further
 details, such as the use-case under discussion, or the replace feature.

finally we should merge this file inside other manuals since we have far
too much entries in help menu, but for the time being its ok this way.
nice work.

pavel


Re: Find All and Emphasize

2009-08-21 Thread Tommaso Cucinotta

Pavel Sanda ha scritto:

Tommaso Cucinotta wrote:
  

Hi all,

I'd like to mention that, with the patch I committed right now on the SVN, 
the current version of LyX from trunk implements correctly this kind of 
feature, i.e., you can search for a plain word and replace it with its 
emphasized or boldface version, or search for some text (i.e., X1) and 
replace it with a math symbol ($X_1$), or you can search for some maths 
(i.e., $X^1$) and replace it with some rework of it (i.e., $Y_1$), etc.. I 
know there are many use-cases, and I hope somebody helps in identifying the 
most important ones and/or possible issues.



can you write some documentation in our manuals? this or the hint in bug 3095
wouldn't occur to me ... :)
pavel

  

I've committed right now the original manual I wrote at the times the
feature was not yet in trunk (probably Abdel forgot to consider this
file when he ported the patch to trunk). I'll extend it with further
details, such as the use-case under discussion, or the replace feature.

   T.




Re: Find All and Emphasize

2009-08-21 Thread Pavel Sanda
Tommaso Cucinotta wrote:
 I've committed right now the original manual I wrote at the times the
 feature was not yet in trunk (probably Abdel forgot to consider this
 file when he ported the patch to trunk). I'll extend it with further
 details, such as the use-case under discussion, or the replace feature.

finally we should merge this file inside other manuals since we have far
too much entries in help menu, but for the time being its ok this way.
nice work.

pavel


Re: Find All and Emphasize

2009-08-21 Thread Tommaso Cucinotta

Pavel Sanda ha scritto:

Tommaso Cucinotta wrote:
  

Hi all,

I'd like to mention that, with the patch I committed right now on the SVN, 
the current version of LyX from trunk implements correctly this kind of 
feature, i.e., you can search for a plain word and replace it with its 
emphasized or boldface version, or search for some text (i.e., X1) and 
replace it with a math symbol ($X_1$), or you can search for some maths 
(i.e., $X^1$) and replace it with some rework of it (i.e., $Y_1$), etc.. I 
know there are many use-cases, and I hope somebody helps in identifying the 
most important ones and/or possible issues.



can you write some documentation in our manuals? this or the hint in bug 3095
wouldn't occur to me ... :)
pavel

  

I've committed right now the original manual I wrote at the times the
feature was not yet in trunk (probably Abdel forgot to consider this
file when he ported the patch to trunk). I'll extend it with further
details, such as the use-case under discussion, or the replace feature.

   T.




Re: Find All and Emphasize

2009-08-21 Thread Pavel Sanda
Tommaso Cucinotta wrote:
> I've committed right now the original manual I wrote at the times the
> feature was not yet in trunk (probably Abdel forgot to consider this
> file when he ported the patch to trunk). I'll extend it with further
> details, such as the use-case under discussion, or the replace feature.

finally we should merge this file inside other manuals since we have far
too much entries in help menu, but for the time being its ok this way.
nice work.

pavel


Re: Find All and Emphasize

2009-08-19 Thread Pavel Sanda
Tommaso Cucinotta wrote:
 Hi all,

 I'd like to mention that, with the patch I committed right now on the SVN, 
 the current version of LyX from trunk implements correctly this kind of 
 feature, i.e., you can search for a plain word and replace it with its 
 emphasized or boldface version, or search for some text (i.e., X1) and 
 replace it with a math symbol ($X_1$), or you can search for some maths 
 (i.e., $X^1$) and replace it with some rework of it (i.e., $Y_1$), etc.. I 
 know there are many use-cases, and I hope somebody helps in identifying the 
 most important ones and/or possible issues.

can you write some documentation in our manuals? this or the hint in bug 3095
wouldn't occur to me ... :)
pavel


Re: Find All and Emphasize

2009-08-19 Thread Tommaso Cucinotta

Hi all,

I'd like to mention that, with the patch I committed right now on the 
SVN, the current version of LyX from trunk implements correctly this 
kind of feature, i.e., you can search for a plain word and replace it 
with its emphasized or boldface version, or search for some text (i.e., 
X1) and replace it with a math symbol ($X_1$), or you can search for 
some maths (i.e., $X^1$) and replace it with some rework of it (i.e., 
$Y_1$), etc.. I know there are many use-cases, and I hope somebody helps 
in identifying the most important ones and/or possible issues.


Regards,

 Tommaso

Tommaso Cucinotta ha scritto:

Bruce Pourciau ha scritto:

On Aug 12, 2009, at 5:38 PM, rgheck wrote:

On 08/12/2009 04:34 PM, Bruce Pourciau wrote:

Is there a simple way to go back through a document and italicize
(emphasize) all occurrences of a certain word?


Not within LyX itself. The best way to do it is to run a script of some
sort on the .lyx file. E.g.:

sed -e 's/ that / \n\n\\emph on\nthat\n\\emph default\n /g'  t.lyx 
tt.lyx


is a dumb sed one-liner that almost does it.
This is acutally the usage scenario I'm trying to target with the 
Find LyX... (a.k.a., Advanced Search or Find Advanced) feature of 
LyX 2.0.0 from svn. There, you can enter arbitrarily complex LyX text 
inside the Replace... area, so that you can do (in principle) exactly 
what you are seeking for. It doesn't work perfectly fine, as of now, 
for example, in your case, after the replacement, you would get a set 
of \emph{word} instead of the word emphasized, but I think it won't 
be difficult to fix such issues.


Of course, for the advanced user, the text-based search/replace made 
directly on the .lyx file with a text editor, is the only thing you 
can do with the current official LyX releases, and it works (unless 
you make mistakes -- backup first).


Bye,

   Tommaso






Re: Find All and Emphasize

2009-08-19 Thread Pavel Sanda
Tommaso Cucinotta wrote:
 Hi all,

 I'd like to mention that, with the patch I committed right now on the SVN, 
 the current version of LyX from trunk implements correctly this kind of 
 feature, i.e., you can search for a plain word and replace it with its 
 emphasized or boldface version, or search for some text (i.e., X1) and 
 replace it with a math symbol ($X_1$), or you can search for some maths 
 (i.e., $X^1$) and replace it with some rework of it (i.e., $Y_1$), etc.. I 
 know there are many use-cases, and I hope somebody helps in identifying the 
 most important ones and/or possible issues.

can you write some documentation in our manuals? this or the hint in bug 3095
wouldn't occur to me ... :)
pavel


Re: Find All and Emphasize

2009-08-19 Thread Tommaso Cucinotta

Hi all,

I'd like to mention that, with the patch I committed right now on the 
SVN, the current version of LyX from trunk implements correctly this 
kind of feature, i.e., you can search for a plain word and replace it 
with its emphasized or boldface version, or search for some text (i.e., 
X1) and replace it with a math symbol ($X_1$), or you can search for 
some maths (i.e., $X^1$) and replace it with some rework of it (i.e., 
$Y_1$), etc.. I know there are many use-cases, and I hope somebody helps 
in identifying the most important ones and/or possible issues.


Regards,

 Tommaso

Tommaso Cucinotta ha scritto:

Bruce Pourciau ha scritto:

On Aug 12, 2009, at 5:38 PM, rgheck wrote:

On 08/12/2009 04:34 PM, Bruce Pourciau wrote:

Is there a simple way to go back through a document and italicize
(emphasize) all occurrences of a certain word?


Not within LyX itself. The best way to do it is to run a script of some
sort on the .lyx file. E.g.:

sed -e 's/ that / \n\n\\emph on\nthat\n\\emph default\n /g'  t.lyx 
tt.lyx


is a dumb sed one-liner that almost does it.
This is acutally the usage scenario I'm trying to target with the 
Find LyX... (a.k.a., Advanced Search or Find Advanced) feature of 
LyX 2.0.0 from svn. There, you can enter arbitrarily complex LyX text 
inside the Replace... area, so that you can do (in principle) exactly 
what you are seeking for. It doesn't work perfectly fine, as of now, 
for example, in your case, after the replacement, you would get a set 
of \emph{word} instead of the word emphasized, but I think it won't 
be difficult to fix such issues.


Of course, for the advanced user, the text-based search/replace made 
directly on the .lyx file with a text editor, is the only thing you 
can do with the current official LyX releases, and it works (unless 
you make mistakes -- backup first).


Bye,

   Tommaso






Re: Find All and Emphasize

2009-08-19 Thread Pavel Sanda
Tommaso Cucinotta wrote:
> Hi all,
>
> I'd like to mention that, with the patch I committed right now on the SVN, 
> the current version of LyX from trunk implements correctly this kind of 
> feature, i.e., you can search for a plain word and replace it with its 
> emphasized or boldface version, or search for some text (i.e., X1) and 
> replace it with a math symbol ($X_1$), or you can search for some maths 
> (i.e., $X^1$) and replace it with some rework of it (i.e., $Y_1$), etc.. I 
> know there are many use-cases, and I hope somebody helps in identifying the 
> most important ones and/or possible issues.

can you write some documentation in our manuals? this or the hint in bug 3095
wouldn't occur to me ... :)
pavel


Re: Find All and Emphasize

2009-08-19 Thread Tommaso Cucinotta

Hi all,

I'd like to mention that, with the patch I committed right now on the 
SVN, the current version of LyX from trunk implements correctly this 
kind of feature, i.e., you can search for a plain word and replace it 
with its emphasized or boldface version, or search for some text (i.e., 
X1) and replace it with a math symbol ($X_1$), or you can search for 
some maths (i.e., $X^1$) and replace it with some rework of it (i.e., 
$Y_1$), etc.. I know there are many use-cases, and I hope somebody helps 
in identifying the most important ones and/or possible issues.


Regards,

 Tommaso

Tommaso Cucinotta ha scritto:

Bruce Pourciau ha scritto:

On Aug 12, 2009, at 5:38 PM, rgheck wrote:

On 08/12/2009 04:34 PM, Bruce Pourciau wrote:

Is there a simple way to go back through a document and italicize
(emphasize) all occurrences of a certain word?


Not within LyX itself. The best way to do it is to run a script of some
sort on the .lyx file. E.g.:

sed -e 's/ that / \n\n\\emph on\nthat\n\\emph default\n /g' < t.lyx 
>tt.lyx


is a dumb sed one-liner that almost does it.
This is acutally the usage scenario I'm trying to target with the 
"Find LyX..." (a.k.a., Advanced Search or Find Advanced) feature of 
LyX 2.0.0 from svn. There, you can enter arbitrarily complex LyX text 
inside the Replace... area, so that you can do (in principle) exactly 
what you are seeking for. It doesn't work perfectly fine, as of now, 
for example, in your case, after the replacement, you would get a set 
of "\emph{word}" instead of the word emphasized, but I think it won't 
be difficult to fix such issues.


Of course, for the advanced user, the text-based search/replace made 
directly on the .lyx file with a text editor, is the only thing you 
can do with the current official LyX releases, and it works (unless 
you make mistakes -- backup first).


Bye,

   Tommaso






Re: Find All and Emphasize

2009-08-13 Thread Bruce Pourciau


On Aug 12, 2009, at 5:38 PM, rgheck wrote:


On 08/12/2009 04:34 PM, Bruce Pourciau wrote:

Is there a simple way to go back through a document and italicize
(emphasize) all occurrences of a certain word?

Not within LyX itself. The best way to do it is to run a script of  
some

sort on the .lyx file. E.g.:

sed -e 's/ that / \n\n\\emph on\nthat\n\\emph default\n /g'  t.lyx  
tt.lyx


is a dumb sed one-liner that almost does it.

rh



Thanks, Richard


Re: Find All and Emphasize

2009-08-13 Thread Erez Yerushalmi
Same idea as Richard's,

Open your .lyx file in another editor such as notepad++  and find and
replace the WORD
with
\emph on WORD \emph default

I tried it and wit worked for me.

erez



On Wed, Aug 12, 2009 at 9:34 PM, Bruce Pourciau 
bruce.h.pourc...@lawrence.edu wrote:

 Is there a simple way to go back through a document and italicize
 (emphasize) all occurrences of a certain word?

 Bruce




-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
homepage: http://go.warwick.ac.uk/ep/pg/ecrfaw


Re: Find All and Emphasize

2009-08-13 Thread Bruce Pourciau


On Aug 13, 2009, at 10:30 AM, Erez Yerushalmi wrote:


Same idea as Richard's,

Open your .lyx file in another editor such as notepad++  and find  
and replace the WORD

with
\emph on WORD \emph default

I tried it and wit worked for me.

erez



On Wed, Aug 12, 2009 at 9:34 PM, Bruce Pourciau bruce.h.pourc...@lawrence.edu 
 wrote:
Is there a simple way to go back through a document and italicize  
(emphasize) all occurrences of a certain word?


Bruce


Thanks, Erez. That should save me some time.

Re: Find All and Emphasize

2009-08-13 Thread rgheck

On 08/13/2009 11:30 AM, Erez Yerushalmi wrote:

Same idea as Richard's,

Open your .lyx file in another editor such as notepad++  and find and
replace the WORD
with
\emph on WORD \emph default

I tried it and wit worked for me.

   
Then you got lucky...unless you had the newlines in there, too. You 
usually do need to be careful about that.


rh



Re: Find All and Emphasize

2009-08-13 Thread Erez Yerushalmi
Yes, you are right!!!

On Thu, Aug 13, 2009 at 5:43 PM, rgheck rgh...@bobjweil.com wrote:

 On 08/13/2009 11:30 AM, Erez Yerushalmi wrote:

 Same idea as Richard's,

 Open your .lyx file in another editor such as notepad++  and find and
 replace the WORD
 with
 \emph on WORD \emph default

 I tried it and wit worked for me.



 Then you got lucky...unless you had the newlines in there, too. You usually
 do need to be careful about that.

 rh




-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
homepage: http://go.warwick.ac.uk/ep/pg/ecrfaw


Re: Find All and Emphasize

2009-08-13 Thread Bruce Pourciau


On Aug 12, 2009, at 5:38 PM, rgheck wrote:


On 08/12/2009 04:34 PM, Bruce Pourciau wrote:

Is there a simple way to go back through a document and italicize
(emphasize) all occurrences of a certain word?

Not within LyX itself. The best way to do it is to run a script of  
some

sort on the .lyx file. E.g.:

sed -e 's/ that / \n\n\\emph on\nthat\n\\emph default\n /g'  t.lyx  
tt.lyx


is a dumb sed one-liner that almost does it.

rh



Thanks, Richard


Re: Find All and Emphasize

2009-08-13 Thread Erez Yerushalmi
Same idea as Richard's,

Open your .lyx file in another editor such as notepad++  and find and
replace the WORD
with
\emph on WORD \emph default

I tried it and wit worked for me.

erez



On Wed, Aug 12, 2009 at 9:34 PM, Bruce Pourciau 
bruce.h.pourc...@lawrence.edu wrote:

 Is there a simple way to go back through a document and italicize
 (emphasize) all occurrences of a certain word?

 Bruce




-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
homepage: http://go.warwick.ac.uk/ep/pg/ecrfaw


Re: Find All and Emphasize

2009-08-13 Thread Bruce Pourciau


On Aug 13, 2009, at 10:30 AM, Erez Yerushalmi wrote:


Same idea as Richard's,

Open your .lyx file in another editor such as notepad++  and find  
and replace the WORD

with
\emph on WORD \emph default

I tried it and wit worked for me.

erez



On Wed, Aug 12, 2009 at 9:34 PM, Bruce Pourciau bruce.h.pourc...@lawrence.edu 
 wrote:
Is there a simple way to go back through a document and italicize  
(emphasize) all occurrences of a certain word?


Bruce


Thanks, Erez. That should save me some time.

Re: Find All and Emphasize

2009-08-13 Thread rgheck

On 08/13/2009 11:30 AM, Erez Yerushalmi wrote:

Same idea as Richard's,

Open your .lyx file in another editor such as notepad++  and find and
replace the WORD
with
\emph on WORD \emph default

I tried it and wit worked for me.

   
Then you got lucky...unless you had the newlines in there, too. You 
usually do need to be careful about that.


rh



Re: Find All and Emphasize

2009-08-13 Thread Erez Yerushalmi
Yes, you are right!!!

On Thu, Aug 13, 2009 at 5:43 PM, rgheck rgh...@bobjweil.com wrote:

 On 08/13/2009 11:30 AM, Erez Yerushalmi wrote:

 Same idea as Richard's,

 Open your .lyx file in another editor such as notepad++  and find and
 replace the WORD
 with
 \emph on WORD \emph default

 I tried it and wit worked for me.



 Then you got lucky...unless you had the newlines in there, too. You usually
 do need to be careful about that.

 rh




-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
homepage: http://go.warwick.ac.uk/ep/pg/ecrfaw


Re: Find All and Emphasize

2009-08-13 Thread Bruce Pourciau


On Aug 12, 2009, at 5:38 PM, rgheck wrote:


On 08/12/2009 04:34 PM, Bruce Pourciau wrote:

Is there a simple way to go back through a document and italicize
(emphasize) all occurrences of a certain word?

Not within LyX itself. The best way to do it is to run a script of  
some

sort on the .lyx file. E.g.:

sed -e 's/ that / \n\n\\emph on\nthat\n\\emph default\n /g' < t.lyx  
>tt.lyx


is a dumb sed one-liner that almost does it.

rh



Thanks, Richard


Re: Find All and Emphasize

2009-08-13 Thread Erez Yerushalmi
Same idea as Richard's,

Open your .lyx file in another editor such as notepad++  and find and
replace the WORD
with
\emph on WORD \emph default

I tried it and wit worked for me.

erez



On Wed, Aug 12, 2009 at 9:34 PM, Bruce Pourciau <
bruce.h.pourc...@lawrence.edu> wrote:

> Is there a simple way to go back through a document and italicize
> (emphasize) all occurrences of a certain word?
>
> Bruce
>



-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
homepage: http://go.warwick.ac.uk/ep/pg/ecrfaw


Re: Find All and Emphasize

2009-08-13 Thread Bruce Pourciau


On Aug 13, 2009, at 10:30 AM, Erez Yerushalmi wrote:


Same idea as Richard's,

Open your .lyx file in another editor such as notepad++  and find  
and replace the WORD

with
\emph on WORD \emph default

I tried it and wit worked for me.

erez



On Wed, Aug 12, 2009 at 9:34 PM, Bruce Pourciau  wrote:
Is there a simple way to go back through a document and italicize  
(emphasize) all occurrences of a certain word?


Bruce


Thanks, Erez. That should save me some time.

Re: Find All and Emphasize

2009-08-13 Thread rgheck

On 08/13/2009 11:30 AM, Erez Yerushalmi wrote:

Same idea as Richard's,

Open your .lyx file in another editor such as notepad++  and find and
replace the WORD
with
\emph on WORD \emph default

I tried it and wit worked for me.

   
Then you got lucky...unless you had the newlines in there, too. You 
usually do need to be careful about that.


rh



Re: Find All and Emphasize

2009-08-13 Thread Erez Yerushalmi
Yes, you are right!!!

On Thu, Aug 13, 2009 at 5:43 PM, rgheck  wrote:

> On 08/13/2009 11:30 AM, Erez Yerushalmi wrote:
>
>> Same idea as Richard's,
>>
>> Open your .lyx file in another editor such as notepad++  and find and
>> replace the WORD
>> with
>> \emph on WORD \emph default
>>
>> I tried it and wit worked for me.
>>
>>
>>
> Then you got lucky...unless you had the newlines in there, too. You usually
> do need to be careful about that.
>
> rh
>
>


-- 
Erez Yerushalmi
PhD Student
Warwick University, UK
homepage: http://go.warwick.ac.uk/ep/pg/ecrfaw


Re: Find All and Emphasize

2009-08-12 Thread rgheck

On 08/12/2009 04:34 PM, Bruce Pourciau wrote:
Is there a simple way to go back through a document and italicize 
(emphasize) all occurrences of a certain word?


Not within LyX itself. The best way to do it is to run a script of some 
sort on the .lyx file. E.g.:


sed -e 's/ that / \n\n\\emph on\nthat\n\\emph default\n /g'  t.lyx tt.lyx

is a dumb sed one-liner that almost does it.

rh



Re: Find All and Emphasize

2009-08-12 Thread rgheck

On 08/12/2009 04:34 PM, Bruce Pourciau wrote:
Is there a simple way to go back through a document and italicize 
(emphasize) all occurrences of a certain word?


Not within LyX itself. The best way to do it is to run a script of some 
sort on the .lyx file. E.g.:


sed -e 's/ that / \n\n\\emph on\nthat\n\\emph default\n /g'  t.lyx tt.lyx

is a dumb sed one-liner that almost does it.

rh



Re: Find All and Emphasize

2009-08-12 Thread rgheck

On 08/12/2009 04:34 PM, Bruce Pourciau wrote:
Is there a simple way to go back through a document and italicize 
(emphasize) all occurrences of a certain word?


Not within LyX itself. The best way to do it is to run a script of some 
sort on the .lyx file. E.g.:


sed -e 's/ that / \n\n\\emph on\nthat\n\\emph default\n /g' < t.lyx >tt.lyx

is a dumb sed one-liner that almost does it.

rh