Skip to content

This repository contains a step by step guide on how to install and use Asymptote on MacOS

Notifications You must be signed in to change notification settings

DomHaus/Install-Asymptote-on-MacOS-Silicon-GUIDE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

How to Install Asymptote on Mac

Note: This guide is designed specifically for Macs with Apple Silicon chips (M1, M2, M3, etc.). If you are using a Mac with an Intel CPU, please be aware that this guide may not be fully compatible with your system.


Follow these steps to install Asymptote on your Mac. This guide assumes you're starting from scratch, without Homebrew or MacTeX installed.

If you already installed Homebrew, you can proceed with step 2 (or step 3, if Homebrew is already working on your machine).

Step 1: Install Homebrew

Homebrew is a package manager for macOS that simplifies the installation of software.
You can read more about it on the official Website brew.sh or on Githubhomebrew

  1. Open the Terminal app.

  2. Paste the following command and press Enter:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. You may be prompted to enter your password. Go ahead and do so.

  4. Wait until the whole installation process is finished.

Step 2: Verify Homebrew Installation

Let's make sure Homebrew is properly installed.

  1. Restart your Terminal (you can do this by closing it with the keys CMD+Q and opening it again).

  2. Type brew and press Enter to check if Homebrew commands are recognized.

    • If you see a list of commands and how to use them, proceed to Step 3.

    • If not, enter the following command to add homebrew to your PATH Variables:

      echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc

    Then, restart your Terminal again (CMD+Q) and check if the command brew is working now. If it still doesnt work, please make sure you installed homebrew properly.

Step 3: Install MacTeX

MacTeX is a distribution of TeX/LaTeX for macOS. Asymptote works with TeX to produce high-quality technical graphics and comes directly with the installation of MacTeX.
You can read more about it on the official Website tug.org/mactex.

Please note that this installation process can take some time, as it is largely dependent on your network speed. MacTeX requires a download of approximately 6GB. Additionally, ensure that there is sufficient space available on your hard drive before proceeding.

  1. Install MacTeX by running:

    brew install --cask mactex
  2. Enter your password if prompted and wait for the installation to finish.

  3. Restart your Terminal (CMD+Q) after the installation is complete.

Step 4: Validate Asymptote installation

Now, you're ready to install Asymptote.

  1. First, check if the asy command is available by typing asy in your Terminal. If it's not recognized, proceed with the next step.

  2. Add TeX to your PATH by typing the following in command in your Terminal:

    echo "export PATH=/Library/TeX/texbin/:$PATH" >> ~/.zshrc
  3. Restart your Terminal (CMD+Q) and type asy again. You should see some text about Asymptote now.

Step 5: Use Asymptote

To work with Asymptote and to check if the installation process was successfull, follow the steps below:

  1. Open your Terminal and navigate to your desired output folder (for example cd downloads to navigate to your Downloads folder).

  2. Try the following command to create a PDF from your .asy file. If you dont have one, you can download the example.asy file from this repository, which should only print a circle like in the image below.

    asy -f pdf example.asy

    Note: If you prefer a .eps file, you can simple use the following command:

     asy example.asy

Replace example.asy with the path to an actual Asymptote file (if its in another folder than your Terminal or has another name).

If you get a PDF output, congratulations, you've successfully installed Asymptote on your Mac! ✅

example.asy result

About

This repository contains a step by step guide on how to install and use Asymptote on MacOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published