[[Texmaker]] > [[設定>Texmaker/設定]] > [[Windows>Microsoft Windows]]

&color(White,#5F2F2F){  ''◆目次◆''  };&br;

#contents

**コマンド [#cab65285]

[オプション(O)]-[Texmaker の設定]-[コマンド]

W32TeX と TeX Live の場合の設定を書きます.~
PDF ビューアは,組み込みビューアと外部ビューアを選択するようになっているので好きな方を選択してください.~
PDF ビューアに 組み込みビューア,TeXworks,SumatraPDF を使用する場合は,LaTeX コマンド, PdfLaTeX コマンド, XeLaTeX コマンドのオプションに -synctex=1 を追加します.~
PDF ビューアに TeXworks を使用する場合は [[TeXworks#組み込みの PDF ビューアに日本語を表示させる>TeXworks#t5313ebc]] を参照してフォントの埋め込みの設定を行います.~
コマンドの LaTeX の latex を platex または uplatex に変更します.~
コマンドの Dvipdfm の dvipdfm を dvipdfmx に変更します.~
[[LuaLaTeX>LuaTeX]] を使用したい場合は,コマンドの PdfLaTeX の pdflatex を lualatex に変更して使用してください.~
[[LuaJITLaTeX>LuaJITTeX]] を使用したい場合は,コマンドの PdfLaTeX の pdflatex を luajitlatex に変更して使用してください.~

***[[W32TeX]] (自動判別の場合) [#cd578b1e]

W32TeX はデフォルトでは ptexenc を用いて自動判別します.

----
&color(Black,#9BC527){%%%  &color(White){''Texmaker の設定''};                                                                               &color(Black,#8BB517){%%%[ &color(White){''?''}; ]%%%};&color(Black,#CC3333){%%%[  &color(White){''✕''};  ]%%%}; %%%};&br;

#ref(https://bitbucket.org/srazi/biditexmaker3/raw/tip/images/configtools.png,left,around,nolink,コマンド)
&color(Black,#F5F5F5){コマンド (% : 拡張子を除いたファイル名 - @ : 行番号)};&br;
&color(Black,#F5F5F5){LaTeX    };%%%platex -guess-input-enc -synctex=1 -interaction=nonstopmode -jobname=% %.tex%%%&br;
&color(Black,#F5F5F5){PdfLaTeX  };%%%pdflatex -synctex=1 -interaction=nonstopmode %.tex%%% または %%%lualatex -synctex=1 -interaction=nonstopmode %.tex%%% または %%%luajitlatex -synctex=1 -interaction=nonstopmode %.tex%%%&br;
&color(Black,#F5F5F5){☐ 出力ファイルを "build" サブフォルダーに出力する};&br;
  &color(Black,#DAEAFF){   ''コマンド''   };  &color(Black,#F5F5F5){XeLaTeX  };%%%xelatex -synctex=1 -interaction=nonstopmode %.tex%%%&br;
#img(,clear)
#ref(https://bitbucket.org/srazi/biditexmaker3/raw/tip/images/configquick.png,left,around,nolink,クイックビルド)
&color(Black,#F5F5F5){Latexmk   };%%%latexmk -gg -pdfdvi %.tex%%% または %%%latexmk -gg -pdfps %.tex%%%&br;または %%%latexmk -e "$pdflatex=q/pdflatex -synctex=1 -interaction=nonstopmode/" -norc -gg -pdf %.tex%%%&br;または %%%latexmk -e "$pdflatex=q/lualatex -synctex=1 -interaction=nonstopmode/" -norc -gg -pdf %.tex%%%&br;または %%%latexmk -e "$pdflatex=q/luajitlatex -synctex=1 -interaction=nonstopmode/" -norc -gg -pdf %.tex%%%&br;
   ''クイックビルド''   または %%%latexmk -e "$pdflatex=q/xelatex -synctex=1 -interaction=nonstopmode/" -norc -gg -xelatex %.tex%%%&br;
#img(,clear)
#ref(https://bitbucket.org/srazi/biditexmaker3/raw/tip/images/configeditor.png,left,around,nolink,エディタ)
&color(Black,#F5F5F5){[[Bib(la)tex>BibTeX関連ツール]]   };%%%pbibtex %%%% または %%%biber %%%%&br;
&color(Black,#F5F5F5){Makeindex  };%%%mendex %.idx%%%&br;
&color(Black,#F5F5F5){[[dvips]]     };%%%dvips -Ppdf -o %.ps %.dvi%%%&br;
&color(Black,#F5F5F5){Dvipdfm   };%%%dvipdfmx -f dlbase14.map %.dvi%%%&br;
     ''エディタ''     &color(Black,#F5F5F5){ps2pdf    };%%%ps2pdf.bat %.ps%%%&br;
#img(,clear)
#ref(https://bitbucket.org/srazi/biditexmaker3/raw/tip/images/configkeys.png,left,around,nolink,ショートカット)
&color(Black,#F5F5F5){[[metapost>MetaPost]]  };%%%pmpost -interaction=nonstopmode %%%%&br;
&color(Black,#F5F5F5){[[Asymptote]] };%%%asy %.asy%%%&br;
&color(Black,#F5F5F5){[[ghostscript>Ghostscript]] };%%%gswin32c.exe%%%&br;
&color(Black,#F5F5F5){R Sweave  };%%%R CMD Sweave %.Rnw%%%&br;
   ''ショートカット''   &color(Black,#F5F5F5){Add to PATH    };&br;
----
                  &color(Black,#F5F5F5){''DVI ビューア''};&br;
%%%"C:/w32tex/dviout/dviout.exe" -1 %.dvi%%%&br;
                  &color(Black,#F5F5F5){''PS ビューア''};&br;
%%%"C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance %.ps%%% または %%%"C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe" -reuse-instance %.ps%%% または %%%"C:/Program Files/Ghostgum/gsview/gsview32.exe" -e %.ps%%% または %%%"C:/Program Files (x86)/Ghostgum/gsview/gsview32.exe" -e %.ps%%%&br;
%%%"C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance %.ps%%% または %%%"C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe" -reuse-instance %.ps%%%&br;
                  &color(Black,#F5F5F5){''PDF ビューア''};&br;
&color(Black,#F5F5F5){&color(#3333CC){◎}; 組み込みビューア};&br;
&color(Black,#F5F5F5){☑ 埋め込み};&br;
&color(Black,#F5F5F5){◯ 外部ビューア};&br;
%%%"C:/w32tex/share/texworks/TeXworks.exe" %.pdf%%% または %%%"C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance %.pdf -forward-search #.tex @%%% または %%%"C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe" -reuse-instance %.pdf -forward-search #.tex @%%% または %%%"C:/Program Files/Adobe/Reader 11.0/Reader/AcroRd32.exe" %.pdf%%% または %%%"C:/Program Files (x86)/Adobe/Reader 11.0/Reader/AcroRd32.exe" %.pdf%%%&br;
#img(,clear)
&br;
                                                                                &color(Black,#EEEEEE){[   OK   ]}; &color(Black,#EEEEEE){[ キャンセル ]};&br;
----

***[[W32TeX]] (UTF-8 の場合) [#q9c95374]

Texmaker のデフォルトの文字コードは UTF-8 です.~
OS X, Linux など Windows 以外の OS でファイルを編集したり [[TeXworks]] とファイルを共有したりする場合は UTF-8 がおすすめです.~
コンパイルエラーが発生する場合は[[サクラエディタ]]で文字コードセットを UTF-8,改行コードを CR+LF にして保存するとコンパイルが通るそうです. → [[やっと見つけたTeXエディタ:http://yaplog.jp/stdwave/archive/215]]

----
&color(Black,#9BC527){%%%  &color(White){''Texmaker の設定''};                                                                               &color(Black,#8BB517){%%%[ &color(White){''?''}; ]%%%};&color(Black,#CC3333){%%%[  &color(White){''✕''};  ]%%%}; %%%};&br;

#ref(https://bitbucket.org/srazi/biditexmaker3/raw/tip/images/configtools.png,left,around,nolink,コマンド)
&color(Black,#F5F5F5){コマンド (% : 拡張子を除いたファイル名 - @ : 行番号)};&br;
&color(Black,#F5F5F5){LaTeX    };%%%platex -no-guess-input-enc -kanji=utf8 -synctex=1 -interaction=nonstopmode -jobname=% %.tex%%% または %%%uplatex -no-guess-input-enc -kanji=utf8 -synctex=1 -interaction=nonstopmode %.tex%%%&br;
&color(Black,#F5F5F5){PdfLaTeX  };%%%pdflatex -synctex=1 -interaction=nonstopmode %.tex%%% または %%%lualatex -synctex=1 -interaction=nonstopmode %.tex%%% または %%%luajitlatex -synctex=1 -interaction=nonstopmode %.tex%%%&br;
&color(Black,#F5F5F5){☐ 出力ファイルを "build" サブフォルダーに出力する};&br;
  &color(Black,#DAEAFF){   ''コマンド''   };  &color(Black,#F5F5F5){XeLaTeX  };%%%xelatex -synctex=1 -interaction=nonstopmode %.tex%%%&br;
#img(,clear)
#ref(https://bitbucket.org/srazi/biditexmaker3/raw/tip/images/configquick.png,left,around,nolink,クイックビルド)
&color(Black,#F5F5F5){Latexmk   };%%%latexmk -gg -pdfdvi %.tex%%% または %%%latexmk -gg -pdfps %.tex%%%&br;または %%%latexmk -e "$pdflatex=q/pdflatex -synctex=1 -interaction=nonstopmode/" -norc -gg -pdf %.tex%%%&br;または %%%latexmk -e "$pdflatex=q/lualatex -synctex=1 -interaction=nonstopmode/" -norc -gg -pdf %.tex%%%&br;または %%%latexmk -e "$pdflatex=q/luajitlatex -synctex=1 -interaction=nonstopmode/" -norc -gg -pdf %.tex%%%&br;
   ''クイックビルド''   または %%%latexmk -e "$pdflatex=q/xelatex -synctex=1 -interaction=nonstopmode/" -norc -gg -xelatex %.tex%%%&br;
#img(,clear)
#ref(https://bitbucket.org/srazi/biditexmaker3/raw/tip/images/configeditor.png,left,around,nolink,エディタ)
&color(Black,#F5F5F5){[[Bib(la)tex>BibTeX関連ツール]]   };%%%pbibtex -kanji=utf8 %%%% または %%%upbibtex %%%% または %%%biber %%%%&br;
&color(Black,#F5F5F5){Makeindex  };%%%mendex -U %.idx%%%&br;
&color(Black,#F5F5F5){[[dvips]]     };%%%dvips -Ppdf -o %.ps %.dvi%%%&br;
&color(Black,#F5F5F5){Dvipdfm   };%%%dvipdfmx -f dlbase14.map %.dvi%%%&br;
     ''エディタ''     &color(Black,#F5F5F5){ps2pdf    };%%%ps2pdf.bat %.ps%%%&br;
#img(,clear)
#ref(https://bitbucket.org/srazi/biditexmaker3/raw/tip/images/configkeys.png,left,around,nolink,ショートカット)
&color(Black,#F5F5F5){[[metapost>MetaPost]]  };%%%pmpost -kanji=utf8 -interaction=nonstopmode %%%% または %%%upmpost -kanji=utf8 -interaction=nonstopmode %%%%&br;
&color(Black,#F5F5F5){[[Asymptote]] };%%%asy %.asy%%%&br;
&color(Black,#F5F5F5){[[ghostscript>Ghostscript]] };%%%gswin32c.exe%%%&br;
&color(Black,#F5F5F5){R Sweave  };%%%R CMD Sweave %.Rnw%%%&br;
   ''ショートカット''   &color(Black,#F5F5F5){Add to PATH    };&br;
----
                  &color(Black,#F5F5F5){''DVI ビューア''};&br;
%%%"C:/w32tex/dviout/dviout.exe" -1 %.dvi%%%&br;
                  &color(Black,#F5F5F5){''PS ビューア''};&br;
%%%"C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance %.ps%%% または %%%"C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe" -reuse-instance %.ps%%% または %%%"C:/Program Files/Ghostgum/gsview/gsview32.exe" -e %.ps%%% または %%%"C:/Program Files (x86)/Ghostgum/gsview/gsview32.exe" -e %.ps%%%&br;
%%%"C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance %.ps%%% または %%%"C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe" -reuse-instance %.ps%%%&br;
                  &color(Black,#F5F5F5){''PDF ビューア''};&br;
&color(Black,#F5F5F5){&color(#3333CC){◎}; 組み込みビューア};&br;
&color(Black,#F5F5F5){☑ 埋め込み};&br;
&color(Black,#F5F5F5){◯ 外部ビューア};&br;
%%%"C:/w32tex/share/texworks/TeXworks.exe" %.pdf%%% または %%%"C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance %.pdf -forward-search #.tex @%%% または %%%"C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe" -reuse-instance %.pdf -forward-search #.tex @%%% または %%%"C:/Program Files/Adobe/Reader 11.0/Reader/AcroRd32.exe" %.pdf%%% または %%%"C:/Program Files (x86)/Adobe/Reader 11.0/Reader/AcroRd32.exe" %.pdf%%%&br;
#img(,clear)
&br;
                                                                                &color(Black,#EEEEEE){[   OK   ]}; &color(Black,#EEEEEE){[ キャンセル ]};&br;
----

***[[TeX Live]] [#p3874cc2]

-[[TeX Live 2012 と日本語:http://torip.whitesnow.jp/?p=1020]]
-[[TeX Live 2012 on Windows (改訂版):http://blogs.yahoo.co.jp/igproj_fusion/15803621.html]]

を参照.

//[[TeX Live 2012 on Windows:http://blogs.yahoo.co.jp/igproj_fusion/15776344.html]] を参照.

*[[SumatraPDF]] との連携 [#f10825ae]

LaTeX コマンド, PdfLaTeX コマンド, XeLaTeX コマンドのオプションに -synctex=1 を追加します.

**forward search [#y08c577b]

***SumatraPDF を前面に表示したい場合 [#id9fc839]

forward search は PDFビューアに

■ 32bit Windows の場合

 "C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance %.pdf -forward-search #.tex @

■ 64bit Windows の場合

 "C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe" -reuse-instance %.pdf -forward-search #.tex @

です.

***SumatraPDF を前面に表示したくない場合 [#j0fbd66f]

[[SumatraPDF#fwdsumatrapdf.exe>SumatraPDF#n8da77e2]] の fwdsumatrapdf.exe を使用します.~

forward search は PDFビューアに

 fwdsumatrapdf.exe %.pdf #.tex @

です.

**inverse search [#p850b553]
inverse search は SumatraPDF の [設定(S)]-[オプション(O)...]-[逆順検索コマンドラインの設定] に

 C:\Texmaker\texmaker.exe "%f" -line %l

です.

ダブルクリックで対応する TeX 文書の該当箇所にジャンプします.

*[[Adobe Reader]] との連携 [#u27e1718]

**pdfpLaTeXA [#c1deb4e2]

pdfplatex1A-nonstopmode.bat を作成します.

----
-C:\w32tex\bin\pdfplatex1A-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --rxi --file "%~n1.pdf" && ^
 pdfclose --rxi --file "%~n1.pdf" & ^
 platex -kanji=utf8 -guess-input-enc -interaction=nonstopmode -jobname="%~n1" %1 && ^
 dvipdfmx "%~n1" && ^
 powershell -Command "& {$pdf = """%~n1.pdf"""; $pages = (pdfinfo $pdf | Select-String "^Pages:"); $page = (-split $pages)[1]; pdfopen --rxi --file $pdf --page $page}"
----

クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で
 pdfplatex1A-nonstopmode.bat %
を入力します.

**pdfpLaTeX2A [#x150a7a4]

pdfplatex2A-nonstopmode.bat を作成します.

----
-C:\w32tex\bin\pdfplatex2A-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --rxi --file "%~n1.pdf" && ^
 pdfclose --rxi --file "%~n1.pdf" & ^
 platex -kanji=utf8 -guess-input-enc -interaction=nonstopmode -jobname="%~n1" %1 && ^
 dvips -Ppdf -z -f "%~n1.dvi" | ^
 convbkmk -g > "%~n1.ps" && ^
 ps2pdf.bat "%~n1.ps" && ^
 powershell -Command "& {$pdf = """%~n1.pdf"""; $pages = (pdfinfo $pdf | Select-String "^Pages:"); $page = (-split $pages)[1]; pdfopen --rxi --file $pdf --page $page}"
----

クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で
 pdfplatex2A-nonstopmode.bat %
を入力します.

**pdfupLaTeXA [#v915ab85]

pdfuplatex1A-nonstopmode.bat を作成します.

----
-C:\w32tex\bin\pdfuplatex1A-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --rxi --file "%~n1.pdf" && ^
 pdfclose --rxi --file "%~n1.pdf" & ^
 uplatex -kanji=utf8 -no-guess-input-enc -interaction=nonstopmode %1 && ^
 dvipdfmx "%~n1" && ^
 powershell -Command "& {$pdf = """%~n1.pdf"""; $pages = (pdfinfo $pdf | Select-String "^Pages:"); $page = (-split $pages)[1]; pdfopen --rxi --file $pdf --page $page}"
----

クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で
 pdfuplatex1A-nonstopmode.bat %
を入力します.

**pdfupLaTeX2A [#pf77769a]

pdfuplatex2A-nonstopmode.bat を作成します.

----
-C:\w32tex\bin\pdfuplatex2A-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --rxi --file "%~n1.pdf" && ^
 pdfclose --rxi --file "%~n1.pdf" & ^
 uplatex -kanji=utf8 -no-guess-input-enc -interaction=nonstopmode %1 && ^
 dvips -Ppdf -z -f "%~n1.dvi" | ^
 convbkmk -u > "%~n1.ps" && ^
 ps2pdf.bat "%~n1.ps" && ^
 powershell -Command "& {$pdf = """%~n1.pdf"""; $pages = (pdfinfo $pdf | Select-String "^Pages:"); $page = (-split $pages)[1]; pdfopen --rxi --file $pdf --page $page}"
----

クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で
 pdfuplatex2A-nonstopmode.bat %
を入力します.

**pdfLaTeXA [#j7c9b397]

pdflatexA-nonstopmode.bat を作成します.

----
-C:\w32tex\bin\pdflatexA-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --rxi --file "%~n1.pdf" && ^
 pdfclose --rxi --file "%~n1.pdf" & ^
 pdflatex -interaction=nonstopmode %1 && ^
 powershell -Command "& {$pdf = """%~n1.pdf"""; $pages = (pdfinfo $pdf | Select-String "^Pages:"); $page = (-split $pages)[1]; pdfopen --rxi --file $pdf --page $page}"
----

クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で
 pdflatexA-nonstopmode.bat %
を入力します.

**LuaLaTeXA [#b2053ddc]

lualatexA-nonstopmode.bat を作成します.

----
-C:\w32tex\bin\lualatexA-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --rxi --file "%~n1.pdf" && ^
 pdfclose --rxi --file "%~n1.pdf" & ^
 lualatex -interaction=nonstopmode %1 && ^
 powershell -Command "& {$pdf = """%~n1.pdf"""; $pages = (pdfinfo $pdf | Select-String "^Pages:"); $page = (-split $pages)[1]; pdfopen --rxi --file $pdf --page $page}"
----

クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で
 lualatexA-nonstopmode.bat %
を入力します.

**LuaJITLaTeXA [#z4aadf43]

luajitlatexA-nonstopmode.bat を作成します.

----
-C:\w32tex\bin\luajitlatexA-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --rxi --file "%~n1.pdf" && ^
 pdfclose --rxi --file "%~n1.pdf" & ^
 luajitlatex -interaction=nonstopmode %1 && ^
 powershell -Command "& {$pdf = """%~n1.pdf"""; $pages = (pdfinfo $pdf | Select-String "^Pages:"); $page = (-split $pages)[1]; pdfopen --rxi --file $pdf --page $page}"
----

クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で
 luajitlatexA-nonstopmode.bat %
を入力します.

**XeLaTeXA [#md09c195]

xelatexA-nonstopmode.bat を作成します.

----
-C:\w32tex\bin\xelatexA-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --rxi --file "%~n1.pdf" && ^
 pdfclose --rxi --file "%~n1.pdf" & ^
 xelatex -interaction=nonstopmode %1 && ^
 powershell -Command "& {$pdf = """%~n1.pdf"""; $pages = (pdfinfo $pdf | Select-String "^Pages:"); $page = (-split $pages)[1]; pdfopen --rxi --file $pdf --page $page}"
----

クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で
 xelatexA-nonstopmode.bat %
を入力します.