Equations copied from Apple Pages not appearing in Safari

I copied the equation from Apple Workspace platform like Apple Pages. Pasting it, It didn't show up in Safari browser.

What should I do when I want to paste the equation copied from Apple Workspace platform like Apple Pages?

iPhone 13 mini, iOS 26

Posted on Jan 2, 2026 7:51 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 3, 2026 4:44 AM

An equation in Pages is a very specific, embedded MathML data object. It is not an image, nor is it a PDF data object. You can copy/paste this equation data object between compatible versions of Pages, Numbers, or Keynote documents where Apple purposely supports it. Safari expects a compatible image or PDF, so no go for browsers.


There are dedicated Internet sites that allow you to generate LaTeX or MathML equations and provide image or PDF download options. Google "Math Equation builder" and several sites are shown. I have no recommendation for any of them as I have MacTeX 2025 installed.

3 replies
Question marked as Top-ranking reply

Jan 3, 2026 4:44 AM in response to 배고파

An equation in Pages is a very specific, embedded MathML data object. It is not an image, nor is it a PDF data object. You can copy/paste this equation data object between compatible versions of Pages, Numbers, or Keynote documents where Apple purposely supports it. Safari expects a compatible image or PDF, so no go for browsers.


There are dedicated Internet sites that allow you to generate LaTeX or MathML equations and provide image or PDF download options. Google "Math Equation builder" and several sites are shown. I have no recommendation for any of them as I have MacTeX 2025 installed.

Jan 6, 2026 3:11 PM in response to 배고파

Let's say I have opened the following equation in Pages in its Equation Editor:

\mathrm{G(\mathit{z})} = \mathit{e}^{ln\,G(z)}
= \mathrm{exp}
\mathopen\bigg{(}\sum\limits_{k\,\ge{\,1}}\frac{S_kz^k}{k}
\mathclose\bigg{)} = \prod_{k\,\ge{\,1}} e^{S_kz^k/k}


and I copy it to the clipboard.


Here is that rendered equation image:



Here is the source to a Python3 script that gets the LaTeX syntax from the clipboard, prepends some other features to it, and then sends it off to a website that converts the LaTeX into an image (here a png) that it returns to be written in the same directory as the Python script was run.


#!/usr/bin/env python3

# reference: https://editor.codecogs.com/docs/4-LaTeX_rendering.php
# requires: pypy.org Requests library installed as: pip3 install -U requests
# There must be an intelligible LaTeX equation on the clipboard
# some of the code was sourced and tested from Google AI results
# Python 3.14.2 was installed from Python.org (/usr/local/bin/python3, /usr/local/bin/pip3)
# and tested on Sequoia 15.7.3

import subprocess
import requests
import urllib.parse
import sys

def get_clipboard_content():
    try:
        # Run the 'pbpaste' command and capture its output
        process = subprocess.Popen(['pbpaste'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
        stdout, stderr = process.communicate()
        
        if process.returncode == 0:
            return stdout.strip()
        else:
            print(f"Error executing pbpaste: {stderr}")
            return None
    except FileNotFoundError:
        print("The 'pbpaste' command was not found. Are you sure you are on macOS?")
        return None
    except Exception as e:
        print(f"An unexpected error occurred: {e}")
        return None


def main():
    content = get_clipboard_content()
    if content is not None:
        print("Content from clipboard:")
        latex_source = r"\large\fg{40826D}\dpi{300}" + content
        # print(f"{latex_source}")
    else:
        sys.exit("No LaTeX source on clipboard")

    #latex_source = r"\large\fg{00FF3F}\dpi{300}\frac{x}{y^2} + \sqrt{z}"
    encoded_latex = urllib.parse.quote(latex_source)
    url = f"https://latex.codecogs.com/png.image?{encoded_latex}"
    # Make the request and save the image
    response = requests.get(url, auth=None)
    if response.status_code == 200:
        with open("equation.png", "wb") as f:
            f.write(response.content)
        print("Image saved as equation.png")
    else:
        print(f"Error: {response.status_code}")


if __name__ == '__main__':
    sys.exit(main())

I named this Python3 source as latexsvc.py. From the Terminal:

chmod +x ./latexsvc.py
# open Pages equation object and copy its source to the clipboard
./latexsvc.py

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.

Equations copied from Apple Pages not appearing in Safari

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