LaTeX forum ⇒ LyXSearch for missing blanks after math environments

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
kai2nd
Posts: 4
Joined: Fri Mar 22, 2019 11:47 am

Search for missing blanks after math environments

Postby kai2nd » Mon Aug 19, 2019 2:49 pm

Hi all!

I've been using LyX for a while now for collaborative writing, especially for the support of tracked changes and commenting. It has made life a whole lot easier! But here's something I haven't been able to figure out:

Quite often, blank characters (space) is missing following an inline math equation. The way LyX sets this, it's not always easy to detect visually. So what I want is to automatically find inline math followed by anything but the blank character. Is there a way to do this in LyX?

Best wishes
Kai

kai2nd
Posts: 4
Joined: Fri Mar 22, 2019 11:47 am

Postby kai2nd » Wed Aug 21, 2019 8:39 am

Hm, so nobody knows? Then maybe it's not possible.
Can you point me to another LyX Forum where I might get an answer?

cheers,
Kai

User avatar
Ijon Tichy
Posts: 92
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Wed Aug 21, 2019 8:49 am

I even do not understand your problem. I'm not a LyX user and for me your description is not very clear. Maybe it is that you try to insert the space at the end of the math instead of after the math? However, for another LyX forum see https://www.lyx.org/MailingLists.

kai2nd
Posts: 4
Joined: Fri Mar 22, 2019 11:47 am

Postby kai2nd » Wed Aug 21, 2019 9:10 am

Hi Ijon,

thanks for the feedback, that's good to know.

So let me try to be clearer:

I have a long document with lots of inline math equations ($…$ in LaTeX) where there is no blank following the equation (in LaTeX, this will look like this: "$…$next word" but I want "$…$ next word").

As this is a recurring issue for me, I would like to do a search and replace which finds all occurrences or these "missing blanks" and fills in the missing blank.

Thanks also for the pointer to the mailing list, I'll hold off posting there for a while – maybe my problem is clearer now.

Kai

User avatar
Ijon Tichy
Posts: 92
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Wed Aug 21, 2019 9:36 am

LyX files are simple text documents (like LaTeX). So you should be able to write e.g. a pearl or awk script to fix such code. However, if you do not want the space, e.g., at »$NP$-complete«, such an automatic correction would break things. So, already input correctly would always be better than trying to fix wrong input afterwards.

kai2nd
Posts: 4
Joined: Fri Mar 22, 2019 11:47 am

Postby kai2nd » Wed Aug 21, 2019 11:21 am

I like the idea of coming up with a script to fix this. If I come up with something useful, I'll report back.
Thanks Ijon!


Return to “LyX”

Who is online

Users browsing this forum: No registered users and 2 guests