LaTeXSnipper Office Plugin

August 23, 2026 ยท View on GitHub

Released Windows VSTO add-in for Microsoft Word and PowerPoint. It inserts and maintains LaTeXSnipper OLE formulas and provides native Word OMML and PowerPoint PNG alternatives. Formula editing and rendering are fully local; screenshot recognition uses the desktop Automation API as an ordinary authenticated client.

OLE formulas use local MathJax layout and EMF vector presentations. Complete LaTeX source, rendering options, numbering information, and object identity are stored with each managed formula.

Supported Office Versions

  • Microsoft 365 Apps (Current or Monthly Enterprise Channel)
  • Office 2024 / 2021 / 2019 (Retail or Volume License)
  • Office LTSC 2024 / 2021
  • 32-bit and 64-bit Windows desktop Office
  • Requires .NET Framework 4.8 and WebView2 Runtime

Office 2016 is not officially supported (requires manual .NET 4.8 and WebView2 installation).

Features

Word

  • OLE formula insertion and update
  • Native OMML formula insertion (inline, display, numbered)
  • Load, update, and delete managed formulas
  • Chapter/section-aware automatic numbering, references, boundaries, and Renumber All
  • In-place conversion between managed OLE and OMML formulas, plus explicit conversion of selected native Word OMML formulas to LaTeXSnipper OLE
  • Parsing of $...$, \(...\), $$...$$, and \[...\] LaTeX in the selected range or main document body, including table cells
  • Selected formula style reset and document-wide natural-size restoration
  • Screenshot OCR via Automation API

PowerPoint

  • OLE and PNG formula insertion
  • Load, update, and delete managed formulas
  • In-place conversion of selected managed formulas between OLE and PNG
  • Selected formula style reset and presentation-wide natural-size restoration
  • User-resized formulas preserve their scale when updated
  • Screenshot OCR via Automation API

Shared

  • Reusable WebView2/MathLive formula editor
  • 18-category shared symbol and formula library
  • Chinese and English Ribbon, task pane, editor, settings, and help
  • Status task pane with connection test and formula preview

Project Layout

PathRole
src/LaTeXSnipper.OfficePlugin.AbstractionsStable contracts shared by hosts, renderer, editor, and automation client
src/LaTeXSnipper.OfficePlugin.AutomationAuthenticated Automation API client and local connection-file discovery
src/LaTeXSnipper.OfficePlugin.RenderingEngine-neutral render pipeline for MathJax intermediate rendering, OLE presentation generation, and PNG rendering
src/LaTeXSnipper.OfficePlugin.EditorFormula editor session boundary
hosts/WordAddInWord workflows: Ribbon, OLE/OMML insertion, numbering, metadata, controller
hosts/WordVstoAddInThin VSTO shell loaded by Word
hosts/PowerPointAddInPowerPoint workflows: Ribbon, OLE/PNG insertion, metadata, controller
hosts/PowerPointVstoAddInThin VSTO shell loaded by PowerPoint
tests/LaTeXSnipper.OfficePlugin.MetadataSafety.TestsDeterministic metadata storage and identity tests
tests/LaTeXSnipper.OfficePlugin.WordParsingE2EReal-Word OMML/OLE parsing regression test
installer/Inno Setup installer and release build entry point
tools/Build, installer, metadata, and Word parsing test entry points
hosts/OleFormulaObjectNative/Native C++ COM/OLE in-proc handler DLL registered as the Office formula object for 32-bit and 64-bit Office

Shared libraries target net48;net9.0. Office hosts target .NET Framework 4.8. The native OLE handler is built for x64 and Win32 Office.

Build

The release build requires Visual Studio 2022 with Office/SharePoint and Visual C++ ATL workloads, .NET 9 SDK, and Inno Setup 6. Run from the repository root:

office_plugin\installer\build.bat Release

The build reads the shared product version from the repository VERSION file.

Output: office_plugin\release\OfficePluginSetup-3.0.0.exe

Run the installer as administrator. Close Word and PowerPoint before installation, upgrade, or removal.

Metadata Safety Tests

Run:

office_plugin\tools\Test-MetadataSafety.ps1

The deterministic tests validate current-schema writes, copied metadata identity, corrupt metadata rejection, and document identity without starting Office.

Word Parsing E2E Test

Close every Word window and run:

office_plugin\tools\Test-WordFormulaParsingE2E.ps1

The test exercises both OMML and OLE backends through the production controller. Disposable DOCX/PDF evidence is written to the test project's ignored artifacts directory.