Asymptote installation and setup 2026 (Windows)

0. Overview

This is the installation and configuration steps of Asymptote, which is tailored to a specific research & development environment:

  • Windows (x64)
  • MiKTeX
  • Python managed via pyenv (pyenv-win)

This combination is non-standard and may differ from typical setups (e.g., TeX Live-based environments or system-managed Python installations).

Note that the subsections 0.1~0.3 are completely generated by ChatGPT 5.3, for reader’s convenience.

0.1 Brief History

Asymptote is a vector graphics language designed for producing high-quality technical figures, particularly for mathematics and scientific publications. It was developed in the early 2000s by Andy Hammerlindl, John C. Bowman, and Tom Prince.

Asymptote was created to address limitations of manual drawing tools and earlier LaTeX-based graphics systems by providing:

  • a programmatic, C++-like syntax for constructing figures,
  • precise control over geometry and layout, and
  • native integration with LaTeX for typesetting mathematical labels.

It is widely used in mathematics and theoretical physics for generating publication-quality, reproducible figures.

0.2 Intended Use Cases

Asymptote is particularly well-suited for:

  • Reproducible, code-driven figure generation
  • Exact geometric constructions (e.g., topology, differential geometry, combinatorics)
  • Tight integration with LaTeX, especially for mathematical notation
  • Consistent styling across figures in academic documents

Typical users include:

  • researchers in mathematics and theoretical physics,
  • authors of journal articles, lecture notes, and technical reports,
  • and practitioners who prefer programmatic graphics workflows over GUI-based tools.

0.3 When to Use Asymptote

Asymptote is recommended when:

  • figures must be precisely specified and reproducible,
  • diagrams encode mathematical structure rather than illustration,
  • or LaTeX-quality typesetting is required within figures.

For purely illustrative or highly stylized graphics, general-purpose vector editors may be more appropriate.

1. Prerequisites

1.1 System Specifications

  • RAM: 16.0 GB (15.7 GB usable)
  • System type: 64-bit OS, x64-based processor
  • OS: Windows 11 Home

1.2 TeX Framework (for label typesetting)

  • MiKTeX 2.9

1.3 Python Environment

  • Version manager: pyenv (pyenv-win)
  • Python version: 3.10.5

2. Installation

2.1 Asymptote

Download and install the standalone distribution from the official source.

2.2 Ghostscript

Download and install the standalone distribution from the official source.

Note:

  • MiKTeX bundles Ghostscript as mgs.exe to avoid conflicts with the standard executable (gswin64c.exe).
  • This bundled version is intended for internal use and is not discoverable by external tools.

Therefore:

  • Install the official standalone Ghostscript to provide gswin64c.exe.

Without a proper Ghostscript installation:

  • Compilation fails for labels typeset via TeX (label("$...$"))
  • EPS files cannot be rendered correctly

2.3 Python Prerequisites

Install required packages:

python -m pip install --upgrade pip
pip install pillow tkinter numpy PySide6 cson

3. Environment-Specific Setup

3.1 GUI Execution (Xasy)

In a pyenv-based environment on Windows, the default GUI launcher may fail to resolve the Python path correctly.

Workaround: Create a shortcut with the following settings:

Target:

C:\Windows\System32\cmd.exe /c ""C:\{PATH-TO-USERDIR}\.pyenv\pyenv-win\shims\python.bat" "C:\Program Files\Asymptote\GUI\xasy.py""

Start in:

%USERPROFILE%

3.2 Enabling SVG Uploads in WordPress

By default, SVG uploads may be blocked depending on the theme configuration. To enable SVG uploads, add the following to functions.php:

function add_file_types_to_uploads($file_types) {
    $new_filetypes = array();
    $new_filetypes['svg'] = 'image/svg+xml';
    $file_types = array_merge($file_types, $new_filetypes);
    return $file_types;
}
add_filter('upload_mimes', 'add_file_types_to_uploads');

Note: Enabling SVG uploads may introduce security risks. Apply with caution.

4. Result

Example output:

  • A vector graphic created using the GUI version of Asymptote (Xasy)
  • Exported as an SVG file