LyXHow to replace one specific word into Latex Code?

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
fluorescein
Posts: 1
Joined: Fri Apr 03, 2015 1:08 pm

How to replace one specific word into Latex Code?

Post by fluorescein »

I have a word "life" used several times in my document. By Ctrl+F I can write "life" replace to "\index{life}" and select REPLACE ALL.

However if I do this Lyx recognize this pattern as text.

Can I write in the field something like "Ctrl+L \index{life}"? I know in this way it doesn'work.

- Replace to: Add a regular expression?
- Write a code: Use active characters?

Is it possible to do this process by a special code?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: How to replace one specific word into Latex Code?

Post by Stefan Kottwitz »

Welcome to the forum!

You could use any text editor with search & replace on the .lyx document file, since it's text format. If you are not sure, try it on a copy of the original file.

Stefan
LaTeX.org admin
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

How to replace one specific word into Latex Code?

Post by scottkosty »

fluorescein wrote: Can I write in the field something like "Ctrl+L \index{life}"?
In Advanced Find you can:

Edit > Find & Replace (Advanced)
Post Reply