[texworks] Definition of a XeTeX processing tool tailored to pstricks

Bruno Voisin bvoisin at icloud.com
Thu Nov 11 22:36:29 CET 2021


Hello,

Owing to recent changes in Ghostscript, the way to use pstricks with XeTeX in TeX live is to load the additional config file dvipdfmx-unsafe.cfg, by calling xetex with argument -output-driver="xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E". The effect of dvipdfmx-unsafe.cfg is to run gs with options -dALLOWPSTRANSPARENCY -dNOSAFER.

I've been trying to define a TeXworks processing tool performing all that, namely a tool XeLaTeX-Unsafe say with

Program:	xelatex
Arguments:	-output-driver
		xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E
		$synctexoption
		$fullname

in the Preferences > Typesetting > Processing tools interface.

This doesn't work: I've been experimenting putting the second argument inside double quotes, single quotes, backquotes, on the same line as the first argument, separated from it by a space or by "=", escaping the quotes, combining them, etc. Nothing works, I always end up with errors like

	sh: /usr/local/texlive/2021/bin/universal-darwin/xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E: No such file or directory

	xdvipdfmx:fatal: File ended prematurely

I've also tried to edit tools.ini directly: same result.

Is there a way of using the Processing tools GUI to do exactly that, ie call xetex with -output-driver="xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E"? Or is it mandatory to write a shell script?

I've looked at

	https://github.com/TeXworks/texworks/wiki/AdvancedTypesettingTools
	https://tex.stackexchange.com/questions/85417/configuring-texworks-processing-tools
	https://tex.stackexchange.com/questions/18936/configure-latexmk-in-texworks-0-2-3
	https://tex.stackexchange.com/questions/85154/knitr-with-texworks

but feel none the wiser.

I'm not a TeXworks user myself, I use TeXShop on the Mac which has dedicated engine files (actually bash scripts) doing just that, ie

	xelatex -output-driver="xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E" -file-line-error -synctex=1 "$1"

but I was trying to help a Linux user achieve the same, using TeXworks' Processing tools.

Bruno Voisin 




More information about the texworks mailing list.