IguanaTex Documentation
repository·master·Indexed 23 days ago
https://github.com/jonathan-leroux/iguanatexA free, open-source PowerPoint add-in for Windows and Mac that enables the insertion of LaTeX equations into presentations. Includes installation guides, system requirements for GhostScript and ImageMagick, configuration settings for LaTeX binaries, and debugging instructions for display generation.
What's inside IguanaTex
- IguanaTex is a free PowerPoint add-in for Windows and Mac that allows users to insert LaTeX equations directly into PowerPoint presentations. The project is open-source, and the repository contains the source code with VBA exported for easier tracking and discussion.
Use keyboard shortcuts for IguanaTex commands
masterYou can use accelerator keys (modifier keys + a single letter) to trigger IguanaTex commands. The specific letter is indicated by an underline in the button's label (e.g., "<u>G</u>enerate").
- Windows: Use
Alt + [letter]. Example:Alt + gfor Generate. - Mac: Use
Ctrl + ⌘ + [letter]. Example:Ctrl + ⌘ + gfor Generate.
- Windows: Use
System Requirements for Mac
masterTo use IguanaTex on Mac, ensure you meet the following requirements:
- Hardware: Intel or Apple Silicon Mac.
- PowerPoint for Mac: Office 365, 2021 (including LTSC), 2019, or 2016 (Version 16.16.7 190210 or later).
- SVG Support: Required for Shape conversion. Available in Office 365 and recent retail versions (2019 and 2021). Volume licensed (LTSC) versions may not support SVG conversion to Shape.
- LaTeX: MacTeX.
- Ghostscript library: For SVG/Shape support, install
Ghostscript-10.04.0.pkgandGhostscript-10.04.0-Extras.pkg(Note: This requirement may change once MacTeX 2025 is released). - Optional Components:
- LaTeXiT-metadata: Used to convert LaTeXiT displays into IguanaTex displays.
System Requirements for Windows
masterTo use IguanaTex on Windows, ensure you meet the following requirements:
- OS: Windows 2000 or later (32- or 64-bit).
- PowerPoint: Tested with Office 365, 2019, 2021 (including LTSC), and versions 2003, 2010, 2013, 2016, 2019 (32 and 64 bit).
- SVG Support: Required for Shape conversion. Available in Office 365 and recent retail versions (e.g., PowerPoint 2021 version 2108+). Note that volume licensed (LTSC) versions may not support SVG conversion to Shape.
- LaTeX: TeXLive or MiKTeX.
- GhostScript: Required (if the latest version causes issues, use
gs9.26). - ImageMagick: Required.
- Optional Components:
- TeX2img: Used for Shape output via EMF.
- LaTeXiT-metadata: Used to convert LaTeXiT displays (from Mac) into IguanaTex displays.
Install IguanaTex on Mac
masterOption 1: Automatic installation with Homebrew
If you use Homebrew, run:
brew tap tsung-ju/iguanatexmac brew install --cask iguanatexmac latexit-metadataOption 2: Manual installation
- Download Files: Get the "prebuilt files for Mac" zip from the Releases page. You need
IguanaTex.scpt,libIguanaTexHelper.dylib, and the.ppamfile. - Install AppleScript:
mkdir -p ~/Library/Application\ Scripts/com.microsoft.Powerpoint cp ./IguanaTex.scpt ~/Library/Application\ Scripts/com.microsoft.Powerpoint/IguanaTex.scpt- Install Library:
sudo mkdir -p '/Library/Application Support/Microsoft/Office365/User Content.localized/Add-Ins.localized' sudo cp ./libIguanaTexHelper.dylib '/Library/Application Support/Microsoft/Office365/User Content.localized/Add-Ins.localized/libIguanaTexHelper.dylib'- Load Add-in: Restart PowerPoint. Go to Tools > PowerPoint Add-ins... > '+' and select the
.ppamfile. IflibIguanaTexHelper.dylibis blocked, allow it in System Settings > Security & Privacy. - Configure Paths: In Main Settings:
- Temp Folder: Recommended to select "Absolute" and leave the path empty to use the PowerPoint sandbox.
- Verify Binaries: Use the
...button to verify paths for GhostScript, LaTeX binaries, and libgs.dylib (if using older MacTeX). If paths are missing, uselocate gsorlocate pdflatexin the terminal to find them.
- Download Files: Get the "prebuilt files for Mac" zip from the Releases page. You need
Build IguanaTexHelper using Swift
masterTo build the
IguanaTexHelpercomponent from source, use the Swift Package Manager with the release configuration to ensure optimal performance.swift build -c releaseInstall IguanaTex on Windows
masterFollow these steps to install the IguanaTex PowerPoint add-in on Windows:
- Download and Secure the Add-in: Download the
.ppamfile from the Releases page. Save it in a Trusted Location such as%appdata%\Microsoft\Addins. If a malware warning appears, right-click the file, select Properties, and click Trust. - Load the Add-in: In PowerPoint, go to File > Options > Add-Ins. In the Manage: dropdown at the bottom, select PowerPoint Add-Ins and click Go.... Click Add New, select your
.ppamfile, and click Close. - Configure Temporary Folder: IguanaTex requires a folder with read/write permissions.
- Default:
C:\Temp\. If you can create this, you are done. - Custom: If you cannot use
C:\Temp\, go to the IguanaTex tab, select Main Settings, and specify a different path (e.g.,.for the presentation folder).
- Default:
- Install Dependencies (Required for Picture outputs):
- Install GhostScript and ImageMagick.
- In Main Settings, use the
...button to set the full path togswin32c.exeorgswin64c.exeandmagick.exe.
- Optional: TeX2img: For EMF vector graphics support, install TeX2img and set the full path to
TeX2imgc.exein Main Settings. - Optional: LaTeXiT-metadata: To convert LaTeXiT displays, download
LaTeXiT-metadata-Win.zipfrom the Releases page, unzip it, and set the path toLaTeXiT-metadata.exein Main Settings.
- Download and Secure the Add-in: Download the
Configure IguanaTex Main Settings
masterThe Main Settings window in the IguanaTex ribbon allows for advanced configuration:
- Temporary Folder: Set the path for file conversions. Leaving it empty with "Absolute" selected uses the PowerPoint sandbox.
- External LaTeX/Tectonic:
- For non-standard installations, specify the folder containing executables or a prefix (e.g.,
wsl -efor WSL). - If using Tectonic, ensure it is either in the specified path/prefix or available on your system
PATH.
- For non-standard installations, specify the folder containing executables or a prefix (e.g.,
- External Editor: Specify a path to an external editor (e.g., for debugging LaTeX source). Check "use as default" to use it instead of the built-in IguanaTex edit window.
- Dependency Paths: Set full paths to
gswin32c.exe/gswin64c.exe,magick.exe,TeX2imgc.exe, orLaTeXiT-metadata.exeusing the...button.
Resolve scaling and format issues
masterWhen changing the format of a display (e.g., switching between Picture and Shape, or between different SVG/EMF formats), scaling issues may occur.
To fix this, use the "Convert to Shape" or "Convert to Picture" functions. These functions regenerate the display in the target format while keeping the physical size fixed, ensuring correct scaling.
Known issues with Mac and Windows compatibility
masterBe aware of the following platform-specific behaviors:
- Cropped Pictures: "Picture" displays created on Mac (inserted as PDFs) may appear cropped when opened on Windows. To fix this, regenerate the display directly on the Windows machine.
- Quick Access Toolbar: On Mac, IguanaTex macros cannot be added to the Quick Access Toolbar due to a known Microsoft limitation.
Debug IguanaTex display generation
masterIf you encounter an error while generating a LaTeX display, use the built-in debugging tools to identify the failure point:
Editor Debug Mode: In the IguanaTex Editor window, check the "Debug" box before clicking "Generate". This steps through the generation process and allows you to copy individual commands to run them manually in a Terminal or Command Prompt to isolate errors.
VBA Debugging: If the error occurs outside the generation process, debug directly in the VBA Editor:
- Open the
.pptmfile in PowerPoint. - Open the VBA Editor (
Alt+F11on Windows,Tools > Macro > Visual Basic Editoron Mac). - Locate the
NewLatexEquationmacro under theMacrosmodule in the left pane. - Set a breakpoint (e.g., at
Load LatexForm). - Run the macro:
- Windows: Click the "New LaTeX Display" button in the IguanaTex ribbon, or use
Tools > Macros...in the VBA Editor. - Mac: Use
Tools > Macro > Macros...and selectNewLatexEquation(ribbon buttons may not work for.pptmfiles on Mac).
- Windows: Click the "New LaTeX Display" button in the IguanaTex ribbon, or use
- Use Step Over (
Shift+F8on Windows,Shift+⌘+Oon Mac) or Step Into (F8on Windows,Shift+⌘+Ion Mac) to find the specific line causing the bug.
- Open the
Recommended settings for Shape (vector) displays
masterWhen creating Shape (vector graphics) displays, it is recommended to use the "SVG via DVI w/ dvisvgm" mode. Other modes have known issues:
- EMF w/ TeX2img or EMF w/ pdfiumdraw: May result in distorted displays due to a PowerPoint bug when ungrouping EMF files into Shape objects.
- SVG via PDF w/ dvisvgm: May result in missing symbols or parts of symbols because certain lines are represented as open paths in PDF, which PowerPoint handles differently during conversion.