Configuring TeXShop for Gregorio

Automatic score compilation

Gregorio needs a lualatex engine that is able to launch the gregorio program during compilation in order to compile gabc scores automatically. If you’re using the version of Gregorio that comes with TeXLive, then this should be done for you (that version of the executable is on the list of allowed programs which can be called without special permission. Such users should be able to jump straight into using Gregorio with the LuaLaTeX (or LuaTeX, if you prefer) engines that come bundled with TeXShop.

If you have installed a version of Gregorio on top of the version that comes with MacTeX (an intermediate release or development version) then you will need to make use of an engine with the --shell-escape option active. Unfortunately, TeXShop does not come with such an engine configured by default.

To make life easier, we’ve included an engine which is set up correctly, in the contributed add-ons which were installed as part of Gregorio: LuaLaTeX+se.engine. You can find it in /Users/Shared/Gregorio/contrib/TeXShop if you used the installer or in #/gregorio-git/contrib/TeXShop if you cloned the repository (where # is the directory you cloned the repository to). Simply copy this file to ~/Library/TeXShop/Engines and the engine should show up in the drop down list the next time you start TeXShop (you may also need to set the executable bit if your security settings have deactivated it). There is also an auto-configure.command file in the contrib folder which will do this for you.

Nota Bene: If you have never opened TeXShop before then this directory will not exist on your system. Open and close TeXShop and it will create the missing directory (along with all the other configuration directories and files). You can also reset your configuration to the default by simply deleting all the configuration directory/files and then opening and closing TeXShop.

The name LuaLaTeX+se is arbitrary, but it’s important to use it, so that everyone can have the same scores. This will also serve to differentiate it from the normal LuaLaTeX engine where the shell escape option is not active (TeXShop comes with this engine in its Inactive folder).

Ease of use of .gabc files (optional)

Nota Bene: As of version 3.77, TeXShop is automatically configured to make editing gabc and other GregorioTeX files seamless. As a result, the additional configuration steps which were here are no longer needed with one possible exception: Because the gtex files do not share the same name as the root project file, they will not be deleted unless you ask TeXShop to aggressively go after the Aux files. This can be done by holding down the option button when clicking on “Trash Aux Files” or by setting the hidden preference to always do the aggressive delete:

defaults write TeXShop AggressiveTrashAUX YES

Using TeXShop

Once TeXShop is ready, refer to the introduction page to start using Gregorio!