IguanaTex Documentation

repository·master·Indexed 23 days ago

https://github.com/jonathan-leroux/iguanatex

A 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.

Tokens
2.2K
Snippets
2
Records
12
Agent score
31%

What's inside IguanaTex

  1. Overview of IguanaTex

    master
    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.
  2. Use keyboard shortcuts for IguanaTex commands

    master

    You 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 + g for Generate.
    • Mac: Use Ctrl + ⌘ + [letter]. Example: Ctrl + ⌘ + g for Generate.
  3. System Requirements for Mac

    master

    To 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.pkg and Ghostscript-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.
  4. System Requirements for Windows

    master

    To 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.
  5. Install IguanaTex on Mac

    master

    Option 1: Automatic installation with Homebrew

    If you use Homebrew, run:

    brew tap tsung-ju/iguanatexmac
    brew install --cask iguanatexmac latexit-metadata

    Option 2: Manual installation

    1. Download Files: Get the "prebuilt files for Mac" zip from the Releases page. You need IguanaTex.scpt, libIguanaTexHelper.dylib, and the .ppam file.
    2. Install AppleScript:
    mkdir -p ~/Library/Application\ Scripts/com.microsoft.Powerpoint
    cp ./IguanaTex.scpt ~/Library/Application\ Scripts/com.microsoft.Powerpoint/IguanaTex.scpt
    1. 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'
    1. Load Add-in: Restart PowerPoint. Go to Tools > PowerPoint Add-ins... > '+' and select the .ppam file. If libIguanaTexHelper.dylib is blocked, allow it in System Settings > Security & Privacy.
    2. 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, use locate gs or locate pdflatex in the terminal to find them.
  6. Install IguanaTex on Windows

    master

    Follow these steps to install the IguanaTex PowerPoint add-in on Windows:

    1. Download and Secure the Add-in: Download the .ppam file 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.
    2. 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 .ppam file, and click Close.
    3. 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).
    4. Install Dependencies (Required for Picture outputs):
      • Install GhostScript and ImageMagick.
      • In Main Settings, use the ... button to set the full path to gswin32c.exe or gswin64c.exe and magick.exe.
    5. Optional: TeX2img: For EMF vector graphics support, install TeX2img and set the full path to TeX2imgc.exe in Main Settings.
    6. Optional: LaTeXiT-metadata: To convert LaTeXiT displays, download LaTeXiT-metadata-Win.zip from the Releases page, unzip it, and set the path to LaTeXiT-metadata.exe in Main Settings.
  7. Configure IguanaTex Main Settings

    master

    The 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 -e for WSL).
      • If using Tectonic, ensure it is either in the specified path/prefix or available on your system PATH.
    • 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, or LaTeXiT-metadata.exe using the ... button.
  8. Resolve scaling and format issues

    master

    When 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.

  9. Known issues with Mac and Windows compatibility

    master

    Be 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.
  10. Debug IguanaTex display generation

    master

    If you encounter an error while generating a LaTeX display, use the built-in debugging tools to identify the failure point:

    1. 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.

    2. VBA Debugging: If the error occurs outside the generation process, debug directly in the VBA Editor:

      • Open the .pptm file in PowerPoint.
      • Open the VBA Editor (Alt+F11 on Windows, Tools > Macro > Visual Basic Editor on Mac).
      • Locate the NewLatexEquation macro under the Macros module 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 select NewLatexEquation (ribbon buttons may not work for .pptm files on Mac).
      • Use Step Over (Shift+F8 on Windows, Shift+⌘+O on Mac) or Step Into (F8 on Windows, Shift+⌘+I on Mac) to find the specific line causing the bug.
  11. Recommended settings for Shape (vector) displays

    master

    When 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.