<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Formula OCR on Jingyuan</title>
        <link>https://jingyuan-zheng.github.io/tags/formula-ocr/</link>
        <description>Recent content in Formula OCR on Jingyuan</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-US</language>
        <copyright>Jingyuan Zheng</copyright>
        <lastBuildDate>Thu, 22 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://jingyuan-zheng.github.io/tags/formula-ocr/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>MixTeX for Mac: Turn Formula Images into Editable LaTeX</title>
            <link>https://jingyuan-zheng.github.io/p/mixtex-latex-ocr-macos/</link>
            <pubDate>Mon, 15 Sep 2025 00:00:00 +0000</pubDate>
            <guid>https://jingyuan-zheng.github.io/p/mixtex-latex-ocr-macos/</guid>
            <description>&lt;img src=&#34;https://jingyuan-zheng.github.io/img/mixtex-latex-ocr-macos/icon.png&#34; alt=&#34;Featured image of post MixTeX for Mac: Turn Formula Images into Editable LaTeX&#34; /&gt;&lt;p&gt;MixTeX converts images containing printed formulas, mixed Chinese-English text, and simple tables into editable LaTeX, with a macOS package available in this repository&amp;rsquo;s Releases.&lt;/p&gt;&#xA;&lt;p&gt;For research notes, the difficult part of copying a formula is often its structure: a fraction inside a summation, a subscript that belongs to the next symbol, or a table whose alignment matters. OCR can provide a draft of that structure, leaving you to verify it against the original.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/MixTeX-Latex-OCR-MacOS&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MixTeX-Latex-OCR-MacOS&lt;/a&gt; is a fork of &lt;a class=&#34;link&#34; href=&#34;https://github.com/RQLuo/MixTeX-Latex-OCR&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;RQLuo/MixTeX-Latex-OCR&lt;/a&gt;. The recognition model comes from upstream; this fork supplies a macOS installer.&lt;/p&gt;&#xA;&lt;h2 id=&#34;download-the-mac-release&#34;&gt;Download the Mac release&#xA;&lt;/h2&gt;&lt;p&gt;Open the &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/MixTeX-Latex-OCR-MacOS/releases/tag/MixTeX-v3.2.4macOS&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MixTeX-v3.2.4macOS release&lt;/a&gt; and download &lt;strong&gt;MixTex.dmg&lt;/strong&gt;. The release notes describe mounting the disk image and dragging the app into Applications.&lt;/p&gt;&#xA;&lt;p&gt;The repository&amp;rsquo;s general README still contains Windows-specific instructions, including Win+V. Those are not Mac shortcuts. Use the Mac release as the installation entry point rather than following the Windows walkthrough literally.&lt;/p&gt;&#xA;&lt;p&gt;The release page does not list a complete macOS and CPU compatibility table. Launch the app on your own Mac and try one clear formula crop before using it in daily work.&lt;/p&gt;&#xA;&lt;h2 id=&#34;start-with-a-small-clear-crop&#34;&gt;Start with a small, clear crop&#xA;&lt;/h2&gt;&lt;p&gt;Use a clean image of one printed formula or a small text-and-formula block. Keep subscripts, superscripts, and equation boundaries inside the crop. Large page captures, tiny characters, and adjacent columns create more ambiguity.&lt;/p&gt;&#xA;&lt;p&gt;The project example below shows how an image can become editable LaTeX.&lt;/p&gt;&#xA;&lt;div class=&#34;post-figure&#34;&gt;&#xA;&lt;img src=&#34;https://jingyuan-zheng.github.io/img/mixtex-latex-ocr-macos/recognition-example-en.png&#34; alt=&#34;MixTeX repository recognition example&#34;&gt;&#xA;&lt;div class=&#34;caption&#34;&gt;Figure 1: A formula-recognition example from the project; results depend on image quality.&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;After recognition, paste the LaTeX into a scratch document and render it. Compare the rendered equation with the source image rather than checking only whether the code compiles.&lt;/p&gt;&#xA;&lt;p&gt;If the source is a paper PDF, export its page as an image and crop the formula rather than including the page number, surrounding column, and neighbouring equations. Keep the crop beside the generated code. When &lt;code&gt;x_1&lt;/code&gt; turns into &lt;code&gt;x_l&lt;/code&gt;, you can check the source immediately instead of discovering the error in your notes later.&lt;/p&gt;&#xA;&lt;h2 id=&#34;send-an-image-to-the-clipboard-on-mac&#34;&gt;Send an image to the clipboard on Mac&#xA;&lt;/h2&gt;&lt;p&gt;The graphical interface reads an image from the clipboard and writes recognized LaTeX back as text. The workflow is copy image, wait for recognition, then paste code. The Windows README’s Win+V instructions are not the Mac shortcut sequence.&lt;/p&gt;&#xA;&lt;p&gt;With MixTeX running, press &lt;strong&gt;Control-Shift-Command-4&lt;/strong&gt; and select one formula to copy the screenshot directly to the clipboard. Wait for the output, switch to your editor, and paste with ⌘V. Ordinary Shift-Command-4 generally saves a screenshot file instead. Copying that file in Finder is not necessarily the image data the application expects.&lt;/p&gt;&#xA;&lt;p&gt;Begin with one simple equation. If nothing appears, check the clipboard input and any model-loading or image error shown in the window. Avoid capturing several images during initialization. Waiting for each result keeps its source clear. Since recognition replaces clipboard contents with text, save anything you needed from the previous clipboard first.&lt;/p&gt;&#xA;&lt;h2 id=&#34;render-in-a-minimal-document-first&#34;&gt;Render in a minimal document first&#xA;&lt;/h2&gt;&lt;p&gt;A large paper template can hide the cause of an error. Start with a small document and replace the expression below with the recognized formula:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-latex&#34; data-lang=&#34;latex&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\documentclass&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;article&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\usepackage&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;amsmath,amssymb&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\begin&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;document&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;sb&#34;&gt;\[&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;\sum&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;_{i&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;}^{n} x_i &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;\frac&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{n&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;n&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;}{&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;\]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;\end&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;{&lt;/span&gt;document&lt;span class=&#34;nb&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;p&gt;Inspect the recognized text’s outer math environment. If it already includes &lt;code&gt;\[ ... \]&lt;/code&gt; or an &lt;code&gt;align*&lt;/code&gt; block, do not blindly nest it inside another display-math wrapper. A compilation failure can come from duplicate wrappers even when the expression is readable.&lt;/p&gt;&#xA;&lt;p&gt;For an undefined command, inspect the named command and determine whether it needs a package, contains a typo, or was misrecognized. Deleting a symbol just to make compilation proceed can change the meaning. Once the minimal document works, move the expression into your notes or paper template. For Chinese text, use an environment supporting the README’s &lt;code&gt;ctexart&lt;/code&gt; example.&lt;/p&gt;&#xA;&lt;h2 id=&#34;split-a-dense-page-into-logical-pieces&#34;&gt;Split a dense page into logical pieces&#xA;&lt;/h2&gt;&lt;p&gt;For a two-column paper or a long derivation, crop complete expressions separately. Too tight a crop can remove integral limits; too wide a crop can include neighboring text. Keep one full expression and its necessary punctuation so each result has a clear source.&lt;/p&gt;&#xA;&lt;p&gt;Check alignment and line breaks in multi-line derivations. A term moving to the next line may still compile while changing how the equation is read. For tables, verify row and column correspondence as well as individual numbers. Place the original crop beside the rendered result and compare line by line before copying it into a final document.&lt;/p&gt;&#xA;&lt;p&gt;Keep the paper title, page number, and crop with long-term research notes. If you later question a subscript or need the original derivation, you can return to the source immediately. OCR saves transcription time; retaining that source keeps the editable result useful.&lt;/p&gt;&#xA;&lt;h2 id=&#34;check-mathematical-meaning&#34;&gt;Check mathematical meaning&#xA;&lt;/h2&gt;&lt;p&gt;Small OCR changes can alter an equation while leaving it syntactically valid. Check minus signs, equality and inequality signs, indices, Greek letters, brackets, and matrix dimensions.&lt;/p&gt;&#xA;&lt;p&gt;Tables need separate attention. A table that looks plausible can still have a value in the wrong row or column. Treat OCR as assisted transcription, especially when the output will appear in an assignment, paper, or calculation.&lt;/p&gt;&#xA;&lt;p&gt;The Chinese README limits the intended input to clear printed Chinese/English text, formulas, and relatively simple tables. Do not assume support for handwriting, arbitrary languages, or complex table reconstruction.&lt;/p&gt;&#xA;&lt;h2 id=&#34;local-inference-and-practical-setup&#34;&gt;Local inference and practical setup&#xA;&lt;/h2&gt;&lt;p&gt;The upstream project describes CPU-based local inference. That is useful for a workflow that should not require sending each screenshot to an online recognition service, although installation can still require obtaining the application, model files, or dependencies.&lt;/p&gt;&#xA;&lt;p&gt;Rendering the result also requires a suitable LaTeX setup. For Chinese text, the README suggests a document using &lt;code&gt;ctexart&lt;/code&gt;; mathematical output may need packages such as &lt;code&gt;amsmath&lt;/code&gt; and &lt;code&gt;amssymb&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;If your source is a PDF, &lt;a class=&#34;link&#34; href=&#34;https://jingyuan-zheng.github.io/p/pdf-page-extractor/&#34; &gt;PDF Page Extractor&lt;/a&gt; can first export a page as an image. Keep the PDF and original crop beside the recognized text so corrections remain easy to verify. The &lt;a class=&#34;link&#34; href=&#34;https://github.com/Jingyuan-Zheng/MixTeX-Latex-OCR-MacOS/blob/main/READMEzh.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Chinese README&lt;/a&gt; documents recognition limits more directly than the repository&amp;rsquo;s short description.&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
