From bitmap formulas to LaTeX with ChatGPT

Scanned PDFs, screenshots, and old lecture notes often store equations as bitmaps (images), not editable text. That’s fine for reading, but terrible for reuse: you can’t search, copy, or cleanly paste formulas into a WordPress article or a Word document. ChatGPT can help you convert those bitmap formulas into LaTeX, which is the de‑facto plain‑text notation for math.

1) Capture the formulas cleanly

Your input quality determines your output quality.

  • Crop tightly around the formula (remove surrounding paragraphs).
  • Keep it sharp: avoid motion blur and heavy JPEG artifacts.
  • Prefer a light background and high contrast.
  • If the formula is small, upscale the crop (2×) before uploading.

Tip: If the image contains several formulas, split them into separate crops. One image → one formula is usually the most reliable.

2) Ask ChatGPT for “LaTeX only”

Upload the cropped formula image(s) and use a prompt that forces an unambiguous output format.

Recommended prompt (copy/paste):

Convert the formula in this image to LaTeX. Output only a single LaTeX block (no explanation). Preserve subscripts/superscripts, Greek letters, units in \mathrm{}, and use \cdot for multiplication when appropriate.

If you want inline math, add:

Give it as inline LaTeX (no [ ]).

If you want display math, add:

Give it as display LaTeX using [ ... ].

3) Verify and iterate (fast)

Even when the conversion is good, you should verify it.

  • Check symbols: 1 vs l, 0 vs O, ν vs v, and “−” vs “–”.
  • Check grouping: parentheses/brackets, fraction scopes, and radicals.
  • Check formatting: use \mathrm{Hz}, \mathrm{F}, \mu\mathrm{H}, etc.

If something looks off, don’t retype—iterate:

The denominator should be (f_2 - f_1), and the constant is 145.9 (decimal point). Please correct the LaTeX.

Or ask for alternatives:

Provide two equivalent LaTeX versions: one compact, one fully parenthesized.

4) Insert LaTeX into WordPress

Option A: WordPress with a math plugin (recommended)

Install a LaTeX/MathJax plugin and paste your LaTeX into the post.

Typical patterns:

  • Inline: \( a^2 + b^2 = c^2 \)
  • Display: \[ \frac{1}{2\pi\sqrt{LC}} \]

Most MathJax-based plugins support standard LaTeX math commands.

Option B: Gutenberg blocks

Some setups offer a dedicated Math or LaTeX block. Paste the LaTeX there and preview the post.

Option C: Render to SVG/PNG

If you don’t want a plugin, you can render LaTeX to an image (SVG/PNG) and upload it. This keeps layout stable but loses search/copy unless you also provide the LaTeX as text.

5) Insert LaTeX into a Word document

Word does not natively “speak LaTeX everywhere”, but you have good options.

Option A: Word equation editor with LaTeX input

  1. Insert → Equation
  2. In the equation box, set input to LaTeX (depending on Word version).
  3. Paste the LaTeX and press Space/Enter to convert.

Option B: Convert LaTeX to MathML (for maximum compatibility)

If your Word version is picky, convert LaTeX → MathML using an online converter, then paste via Word’s equation tools. (This is more steps, but robust.)

Option C: Use rendered SVG for perfect appearance

For publication-grade layout (especially with complex fractions), render to SVG/EMF and insert as a figure.

6) A practical workflow that scales

If you have many formulas (e.g., a lab manual):

  1. Screenshot/crop each formula → numbered files (eq01.png, eq02.png, …)
  2. Upload a batch to ChatGPT with: “Return a numbered list: eq01 → LaTeX, eq02 → LaTeX…”
  3. Paste into WordPress/Word
  4. Do a final pass: units, parentheses, constants, and symbol consistency

7) Common pitfalls and how to avoid them

  • Units: keep them upright: \mathrm{V}, \mathrm{Hz}, \mu\mathrm{H}, \mathrm{pF}.
  • Decimal comma vs point: clarify your locale: “Use decimal comma” or “Use decimal point”.
  • Ambiguous letters: tell ChatGPT whether it’s v or \nu, l or \ell.
  • Multiplication: use \cdot where needed (especially between symbols and constants).

Example workflow (bitmap → LaTeX)

  1. Crop the image so only the equation remains.
  2. Upload the crop to ChatGPT.
  3. Use this prompt:

Convert the formula in this image to LaTeX. Output only a single LaTeX block. Use \mathrm{} for units and fully parenthesize fractions.

  1. Review the result for symbol ambiguities (e.g., 1 vs l, v vs \nu) and constants.
  2. Paste the LaTeX directly into WordPress (MathJax) or into a Word equation.

If you have multiple equations, you do not need to write a new prompt for each one: simply upload the images one after another in the same conversation. ChatGPT will convert each formula sequentially using the same instructions.

This round-trip typically takes under a minute per formula once you get used to it.

Leave a comment