
texmaker から xelatex ドキュメントをコンパイルしようとしたときにエラーが発生しました。 これは私のシステムに関する情報です
Ubuntu 15.10 で
Texmaker 4.4.1 (Synaptic からインストール)
texlive-2015 を DVD ISO から完全インストール (Debian パッケージではありません) (ルートとしてインストール)
$ type xelatex
xelatex is /usr/local/texlive/2015/bin/x86_64-linux/xelatex
$ ls -l /usr/local/texlive/2015/bin/x86_64-linux/
lrwxrwxrwx 1 root root 5 Aug 14 2014 xelatex -> xetex
lrwxrwxrwx 1 root root 5 Aug 14 2014 xelollipop -> xetex
-rwxr-xr-x 1 root root 22473712 May 7 2015 xetex
これは私がコンパイルしようとした文書です。(エラーを生成する最小の文書)
\documentclass[]{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\begin{document}
some text.
\end{document}
私が試してみたのはこれです
ドキュメントを開いて、まずクイックビルドを試しましたが、texmakerがpdflatexでクイックビルドに設定されていたため、予想通り失敗しました。fontspecパッケージはxelatexまたはlualatexを使用するように要求するエラーを投げました。そこで、手動でツール-> Xelatexを選択しました。これも失敗した同じfonstpec からのエラーエラーメッセージは
LOG FILE :
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex 2016.1.15) 23 FEB 2016 19:51
entering extended mode
restricted \write18 enabled.
<< 多くの行を省略 >>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.43 }
|'''''''''''''''''''''''''''''''''''''''''''''''
| This is a fatal error: LaTeX will abort.
|...............................................
メニューからxelatexを選択してもtexmakerがxelatexを呼び出していないのではないかと思ったのでTools->XeLatex
、ターミナルを開いて次のように入力しました。
$ xelatex myfile.tex
そしてエラーなしでコンパイルされ、PDF が生成されました。
そこで、ネット/SE を検索して、texmaker の古いバージョンで使用されていた回避策を見つけました。(Texmaker では pdfLaTeX の代わりに XeLaTeX を使用する指示に従って(texmakerのバージョン4.4.1を使用していますが)、User->UserCommandsに行き、次のように新しいコマンドを作成しました。
xelatex -synctex=1 -interaction=nonstopmode %.tex
これもpdflatexを呼び出し、コンパイルに失敗しました。そこで、ユーザーコマンドを次のように変更しました。
notify-send sometext | xelatex -synctex=1 -interaction=nonstopmode %.tex
これにより、texmaker は、notify-send (画面にポップアップを表示するだけのプログラム) を呼び出し、次に xelatex を呼び出し、コンパイルが成功しました。
問題が texmaker によって発生しているのか (ターミナル xelatex は動作するため)、またはパスの問題によって発生しているのか (非 Debian texlive パッケージをインストールし、xelatex の前にダミー コマンドを追加したため、texlive が xelatex を正しく呼び出すようになったため) はわかりません。
これらの投稿を確認しましたが、同じ問題は発生していないようです
XeLaTex と TexMaker は「pdftex を使用できません」