xelatex で、TeXLive に付属の ghostscript ではなく、手動でインストールした ghostscript を呼び出すにはどうすればよいですか?

xelatex で、TeXLive に付属の ghostscript ではなく、手動でインストールした ghostscript を呼び出すにはどうすればよいですか?

私の調査では、TeXLive インストーラーは次のように GhostScript (32 ビット バージョン) を自動的にインストールします。

ここに画像の説明を入力してください

xelatexこのGSに依存するかどうかはわかりません。

私は手動でインストールしたGSを使うことを好みます。それで質問は

GS を呼び出す場合xelatex(よくわかりません)、xelatexTeXLive によってインストールされた GS ではなく、手動でインストールした GS を呼び出すにはどうすればよいですか?

つまり、xelatexを呼び出す場合gswin32c、手動でインストールしたものを呼び出すにはどうすればよいのでしょうかgswin64c?

答え1

関連する部分は次のとおりですdvipdfmx.cfg:

137 %% In TeX Live, we use the rungs wrapper instead of ps2pdf, becuse we
138 %% must omit the -dSAFER which ps2pdf specifies: in order for pstricks
139 %% to work with xetex,
140 %% /usr/local/texlive/*/texmf-dist/dvips/pstricks/pstricks.pro (for
141 %% example) needs to be accessed.  (Also, it is better to use our
142 %% supplied gs on Windows.)  You can also add -dNOSAFER to the ps2pdf
143 %% command line.
144 %%
145 %% Incidentally, especially in TL, more than one dvipdfmx.cfg may be
146 %% extant.  You can find the one that is active by running:
147 %% kpsewhich -progname=dvipdfmx -format='other text files' dvipdfmx.cfg
148 %% and control which one is found by setting DVIPDFMXINPUTS.
149 %%
150 D  "rungs -q -dNOPAUSE -dBATCH -dEPSCrop -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='%o' '%i' -c quit"

このrungsスクリプトはTeX Liveのバイナリ配布に含まれています。実際には、これは.../texlive/2014/texmf-dist/scripts/texlive/rungs.tlu(Windowsではおそらくrungs.exe同じを呼び出すrungs.tlu)へのシンボリックリンクです。

if os.type == 'windows' then
   command={'gswin32c'}
else
   command={'gs'}
end

システムはgs現在の をスキャンした後、最初に見つかった実行可能ファイルを実行しますPATH。Windows では、 の実行はgswin32cハードワイヤードです。 のその行を変更してみてくださいrungs.tlu

関連情報