I've italicized certain words in a LyX document which I shouldn't have. Is is possible to search for or highlight only italicized words within the document?

I'd make the changes manually but the word count is currently over 52 000.


  • I use regular expressions for these tasks (TeXworks, Lua, Python, Perl, ...) over the TeX file. It might be a starting point for you even over the LyX file. If you add an MWE of your real document with comments, which tagged words you want to change and which you don't, people could help you. – Malipivo Apr 5 '15 at 18:39
  • if you have theorems in your document, it is useful to remember that usually their text is italicized. – barbara beeton Apr 5 '15 at 20:08

You can do this with advanced find: Edit > Find & Replace (Advanced). A panel will open on the right. First go to the "Settings" tab in that panel and uncheck "ignore format". Then go back to the "Search" panel, and click in the "Find" field and go to Insert > Insert Regular Expression > Anything. Highlight the whole box that appear (not just the inside), and apply the emphasis. Then click on "Find Next".

Note that it is not possible to remove emphasize. The above is just for finding them. I don't think we currently support capture groups in our regular expression machinery.

Also be careful with the terminology. Note the difference between "italics" and "emphasize". Search for this difference if you're not sure of it.

  • Perfect, thanks! You are correct about the terminology, I meant "emphasize". Apologies for the late reply. – Bataleon May 11 '15 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.