How to enter Unicode (or other) symbols in LaTeX within Keynote (iWork)

fontiworkkeynotelatexpages

In Keynote and other iWork apps, it is possible to enter formulas (and text) in LaTeX. This is an immensely valuable feature. But…

  • How can I enter an astronomical (or other) symbol, via Unicode or by other means, directly in a LaTeX formula (ie. without copying and pasting from the Character Viewer — which doesn’t work anyway directly in the LaTeX formula editor within Keynote)?
    • For example, I wish to get the Mars symbol ♂ or the Venus symbol ♀ by entering \mars or \venus.

This Apple page claims that one can also enter (ASCII) Unicode characters, but no indication is given there, in the blahtex documentation, or anywhere else about how to enter a Unicode character.

I’d also be happy with any non-Unicode route that allows me to enter such characters directly within the LaTeX coding within Keynote. Any approach by which I could use any of the astronomical symbols in the LaTeX Comprehensive Symbol List would be a dream.

Best Answer

Thanks to the tip from tom-gewecke, I have a functioning workaround.

  • First, you have to enable the Unicode Hex Input keyboard in your System Preferences > Keyboard > Input Sources.
  • Then, of course, you activate it, for example, by ticking Show Input menu in menu bar, then selecting Unicode Hex Input with your cursor in the menu bar.
  • Once this keyboard is enabled, you can enter Unicode characters by holding down the Alt/Option key ⌥ on your keyboard and, while holding it down, typing the code for the Unicode character.
  • You can find code for Unicode characters by, for example, from the same keyboard menu bar item, selecting Show Emoji & Symbols, which opens the Character Viewer.

That much was known. The workaround to get a Unicode character directly into a LaTeX formula with an iWork application (eg. Keynote, Pages) is:

  • Once you open the editor for equations ( Insert > Equation... or ⌥⌘E ) to enter LaTeX code, you type \text{ }, and when your cursor is between those brackets in the text field, you type the code for the Unicode character as described above.
  • Et voila, you have any Unicode character directly in your formula. For example:
    • \text{⌥2642} produces ♂
    • \vec{R}_\text{⌥2642} produces vector R with subscript MarsSymbol