Installing AMC on macOS with MacPorts

The installation guide requires some knowledge about Unix tools, the use of command lines, the installation of MacPorts. You must also have administrative rights on the computer. It is therefore not intended for everyone.


To work with its interface, AMC requires the Linux Libertine, the MacPorts installation system and an X Window System or X11 graphical environment.

Linux Libertine font

Linux Libertine font is a free font that covers code pages for Latin languages​​, Greek, Cyrillic languages​​, Hebrew, the International Phonetic Alphabet (and other). You need to download the package "OTF" on sourceforge site.

Caution: X Window Ssstem does not recognize the fonts installed in the user's folder. You must install the fonts by moving them in the "/Library/Fonts" folder.


MacPorts is a system that compiles, installs and manages open source software. You need to download the installation package for your version of macOS from the MacPorts and install MacPorts. Follow the instructions carefully and don't forget to install Xcode.


Auto-Multiple-Choice is a tool developed with the Perl programming language. MacPorts allows the installation of several versions of Perl. Some inconsistencies in the management of these versions make that if the version of Perl expected for the installation of AMC is not the default version, some of the modules on which AMC depends will not be installed in the right place and AMC will not work or will not work correctly. To avoid this problem, the first thing to do is to install the version of Perl that AMC expects and make that version the default version. This is done with the following command.

sudo port install perl5 +perl5_30

X Window System environment

MacOS does not contain the standard X11 graphical environment. If you haven't the XQuartz application installed you should install X Window with MacPorts.

To install X Window with MacPorts, use the following command.

sudo port install xorg-server xterm xman xlogo

Caution: for the X Window System environment to be correctly taken into account, after its installation you must leave your session and connect again.

Installing AMC

It is possible to install one of the two versions of AMC. Either the stable version (currently, version 1.5.0-1-g7ad0c6c6 of 9/10/2021), or the development version (currently, version 1.5.0-3-g3f13eaba of 9/19/2021). The stable version evolves slowly and version changes are infrequent. Several months or years may pass between two version changes. The development version is subject to more frequent changes. Some of the new features have not been fully tested and may not work as expected.

It is not possible to install both the stable and the development version. If one of these versions is installed, you must uninstall it before installing the other version.

For installation and operation AMC requires a LaTeX environment. The standard installation will use MacPorts to install this environment. If you are using MacTeX and want AMC to use MacTeX instead of the MacPort environment, the installation process differs from the standard installation. You should follow either the instructions of the standard installation, or those of the installation of a version of AMC using MacTeX. These descriptions assume that you have a fresh and up-to-date MacPorts installation.

If needed, update you Macports installation with the following commands.

sudo port selfupdate
sudo port upgrade outdated

Standard installation

The standard installation uses MacPorts to install the LaTeX environment needed by AMC. Use the following command to install the stable version of AMC.

sudo port install auto-multiple-choice

Or use the following command to install the development version of AMC.

sudo port install auto-multiple-choice-devel

Installing AMC for use with MacTeX

MacPorts build tools must be able to access MacTeX tools. For example, with the MacTeX 2018 installation, these tools are available in the "/Library/TeX/texbin" folder. The MacPorts configuration needs to be changed to include this folder in MacPorts path.

Be careful, as noted in the MacPorts documentation, changing MacPorts' path can have unpredictable effects and consequences for others tools. It must be avoided.

Edit the /opt/local/etc/macports/macports.conf file to add the following line.

binpath               /opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/Library/TeX/texbin

For the stable version of AMC, you must start the installation with the following command.

sudo port install auto-multiple-choice +mactex

And for the development version of AMC it is necessary to use the command which follows.

sudo port install auto-multiple-choice-devel +mactex

The installation may take a while. When it is complete and if there is no error, AMC is ready to be used.

Using AMC

You can start from the terminal or from the X Window system.

In the Terminal


This command will launch XQuartz and AMC application.

In the X Window System

The X Window system can be provided by the XQuartz application (in the Applications folder) or the X11 application (in the Applications/MacPorts folder). Launch the application.

We can immediately set the application to facilitate the launch of AMC. Open the Applications > Customize... menu.

In the Personalization window, click the button Add an entry.

Set "Auto Multiple Choice" in the Name column and "LANG=fr_FR.UTF-8 auto-multiple-choice" in the Command column of the new menu item.

Close the Customize window, then select the Applications > Auto Multiple Choice menu.

AMC window should appear.

amc desktop (French)

Auto-multiple-choice is now ready to work.


auto-multiple-choice-window.png - amc desktop (French) (48.8 kB) Pieter Van den Hombergh, 06/19/2013 08:07 pm

xquartz-menu-applications-amc.png (21.9 kB) Pieter Van den Hombergh, 06/19/2013 08:07 pm

xquartz-fenetre-personnaliser-menu-applications.png (23.8 kB) Pieter Van den Hombergh, 06/19/2013 08:07 pm

xquartz.png (3.1 kB) Pieter Van den Hombergh, 06/19/2013 08:07 pm

xquartz-menu-applications-personnaliser.png (20.2 kB) Pieter Van den Hombergh, 06/19/2013 08:07 pm

xquartz-fenetre-personnaliser-menu-applications-2.png (27.9 kB) Joël Brogniart, 05/28/2015 04:01 pm

port-hierarchy.png - AMC portfile hierarchy (5.4 kB) Joël Brogniart, 05/19/2016 02:02 pm