I've been trying to use the Olympiad package for Asymptote on my Mac to use in TexShop (I'm working with pdfTeX). I just tried to put import olympiad; in front of my code, but it gives an error:

Processing file
error: could not load module 'olympiad'

On the following link's post, it says I have to install the olympiad package somehow? I'm fairly new to Asymptote in TeXShop, so I don't know how I should install/download/set up the package.

Installing the olympiad package on Mac

How do I use the package? All I want to do is use the add(pathticks()); method, although I suppose if I can't figure it out I can try doing it by hand.

Thanks in advance! Any help would be greatly appreciated.

  • 2
    Did you follow the instructions from the answer that you have linked? Specifically: create the directory .asy/ in your home folder if it does not exist, download the package, and copy the file olympiad.asy into the .asy/ folder.
    – Marijn
    Jan 4, 2020 at 10:08
  • At math.berkeley.edu/~monks/images/olympiad.asy.
    – user194703
    Jan 4, 2020 at 15:05
  • Thanks. Where can I put the olypmiad.asy file? I didn't really understand the directions on the linked post. Am I supposed to create a .asy/ or ~asy/ folder? And where do I put it? In Library or in Users/name/ somewhere? I'm sorry, I've just been having a lot of trouble with my Asymptote and don't want to mess everything up.
    – user202112
    Jan 4, 2020 at 15:10
  • You only need to say export ASYMPTOTE_DIR=<the directory where you put it>. Of course, you may want add this line to your /.profile file that is (should be) in your home directory. BTW, if you want to notify a certain user with the comment, you need to add their user name with an @ in front.
    – user194703
    Jan 4, 2020 at 15:22
  • 1
    @Schrödinger's cat: Oh yeah, sorry. That's what I meant. But thank you so much! Using your and Marjin's help, I was able to solve the problem! I moved olympiad.asy into the ~/.asy directory through terminal, and my code worked!
    – user202112
    Jan 4, 2020 at 16:04


Browse other questions tagged or ask your own question.