Pages Math Equations LaTeX ML Shortcuts/Text Replacement

How to script keyboard shortcuts for LaTeX Math Symbols in Pages to enable code editing suggestions, show missing brackets, unclosed arrays and matrices, basic source code error troubleshooting and general inline text replacement for superscript, subscript, Greek math variables notation?

iPad Pro, iPadOS 15

Posted on Dec 11, 2021 5:40 PM

Reply

Similar questions

3 replies

Dec 11, 2021 6:14 PM in response to Mz_KM

You can launch the Pages equation editor with ⌥⌘E. You can input limited LaTeX/MathML syntax to generate embedded equations. I suggest that you carefully read About LaTeX and MathML support in Pages, Numbers, Keynote, and iBooks Author article including the blahtex translator utility's PDF guide which indicates what limited LaTeX syntax is supported. Pages does not recognize that one may have any TeX (e.g. MacTeX) distribution installed.


There is no Pages AppleScript support for the equation editor. You must directly enter supported LaTeX syntax to produce equations. There are no shortcuts to do this for you. There is no error diagnostic when you enter incorrect syntax.

Dec 12, 2021 4:55 AM in response to Mz_KM

There are already keyboard shortcuts for superscript and subscript that have nothing to do with the equation editor. Contrary to what shortcuts are shown for Format > Font > Baseline, the superscript shortcut for selected text is really shift-ctrl-command-+, and for subscript, it is the same keyboard shortcut using a minus (-).


If you want to shove an embedded equation into the current insertion location within inline text, then the following AppleScript will do that for an open Pages document:



use scripting additions

tell application "Pages" to launch
tell application "System Events"
	activate
	tell application process "Pages"
		set frontmost to true
		keystroke "e" using {option down, command down}
		keystroke "x_{(i,1)}^2"
		click button "Insert" of sheet 1 of front window
		keystroke space
	end tell
end tell
return


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Pages Math Equations LaTeX ML Shortcuts/Text Replacement

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.