Conversion pages (Mac) from Inline LaTex document using Keyboard Maestro macro

Hi @11112, I hope I can offer you some help.

I've created a simple macro for you to start with. You can download it here Test Pages with LaTeX.kmmacros (2.8 KB)

It looks like this:

KM 1 2020-10-08 at 10.11.48

The first action is not strictly necessary, but all it does is it brings Pages to the front.

The macro assumes you have already copied your LaTeX expression (e.g. $x=4,$) in the normal way. It then extracts the part you are interested in - x=4, - and then inserts that as an equation into Pages.

By studying what I have done you may be able to modify it to suit your needs better: as I say, it's really just a starting point.

The main thing is:

  1. It shows how to extract information using a capture group in a regular expression using the KM Search Using Regular Expression action.
  2. it gives you an idea as to how to manipulate Pages using in-built KM actions.

Hope that helps and have fun!