# Using getmap for xelatex: how to --enable-write18 on MikTex

I want to use the LaTeX package getmap to create maps in my pdf-documents. I use Windows 10, MikTex 2.9, and the editor TexWorks in XeLaTeX mode. The getmap manual (p.12) tells me I have to enable \write18 by using the command --enable-write18 in MikTex.

Unfortunately, I have not clue as to how to add this command to my system.

How do I add the command?

Will getmap work with XeLaTeX?

• do not add it permanently. It is disabled by default with good reason. If you run with shell escape enabled and you run any tex document that you find on the internet (eg this site) then it could do anything that you could do on the machine. delete all your files, mail your files to some other site.... – David Carlisle Apr 12 '19 at 15:41
• in the texworks properties, tab "typesetting" (or something like that) create a new profile e.g. xelatex-shell-escape, copy the settings from the existing xelatex profile and add --shell-escape to the arguments. – Ulrike Fischer Apr 12 '19 at 15:43
• Once -shell-escape is active the getmapdl (map downloader) application should be available to use from any file format. To test if it is an active package in MiKTeX run MiKTeX-console and look for the package installed date also there will be an example tex file in the MiKTeX texmfs\install\doc\latex\getmap folder to copy then play with – user170109 Apr 23 '19 at 13:18

Yes getmap example will work with XeLaTeX (as stated by the author Josef in comments below it should work with all engines not just pdfLaTeX) so here is the package example that was processed by XeLaTeX and a string of instructions to add shell escape to existing typesetting choices (note David Carlisle's warning to NOT USE these elevated compilation commands on files or links you do not trust)
• As author of getmap, I just want to add that there is no implicit recommendation to use pdflatex! Read the hint in the example as 'You must use the --shell-escape switch'. The download of maps will work will all engines. Otherwise nice answer! ;-) +1 – Josef Apr 13 '19 at 9:30