On 18/05/2017 6:45 p.m., Tommaso Cucinotta wrote:
All valuable comments, thanks for the detailed report.
This deserves a TT on trac.lyx.org.

I'd agree with 2. and 5., and for the others the issue
is that the regexp inset is a kind of math inset ATM,
but at the same time it is not, in that it matches non-math
text. The quickest thing I can think of, is to disable/forbid
boldface, emphasized and other font variations within it,
because the idea is that you use it to be generic in terms of
text to find, but you handle any formatting outside that inset.

If people start inserting full-fledged LyX capabilities within
a \regexp{...} (images, external materials, titles, captions,
references, bibliographies), everything will happen :-), as
it wasn't designed for such uses.

Would that make sense ?

    T.

I tried emphasis & bold because of item 2. in 6.13.3 of the User's Guide:

2. Searching for all text with a given style: for example, after unchecking the Ignore format option from the Settings tab, entering a .* regular expression and giving it an emphasized or bold face, finds all emphasized or bold face text respectively.

But I realise now that the styling should be applied to the whole regexp inset, not its contents, and yes, in this case emphasized text is found. Hence, as you suggest, some clarification of the documentation may be all that is needed. Perhaps

"entering a .* regular expression and giving it an ..." => "entering .* into the regular expression inset and giving the whole inset an ..."

Another paragraph emphasizing that styling cannot be applied inside the regexp inset would be helpful, but someone (like me) might still try and find, as I did, that my text was being gobbled up. Hence I think it would be good to disable styling inside the regexp inset (like an ERT inset).

Andrew

(I see that clicking the emphasis button inside a math inset turns on \mathcal. I hadn't known that.)

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Reply via email to