[[TeXstudio]] > [[設定>TeXstudio/設定]] > Windows

----
#contents
----

**コマンド [#zdc6ab74]
-コマンドの LaTeX に設定されている latex.exe を uplatex.exe に変更して -src を -synctex=1 に変更します.
-コマンドの DviPdf に設定されている dvipdfm.exe を dvipdfmx.exe に変更します.
-コマンドの BibTeX に設定されている bibtex.exe を upbibtex.exe に変更します.
-コマンドの Biber に設定されている biber を biber --bblencoding=utf8 -u -U --output_safechars に変更します.
-Latexmk-upLaTeX-pdfdvi を使用する場合は コマンドの PdfLaTeX に設定されている pdflatex.exe -synctex=1 -interaction=nonstopmode %.tex を latexmk.exe -e "$latex=q/uplatex %%O -kanji=utf8 -no-guess-input-enc -synctex=1 -interaction=nonstopmode %%S/" -e "$bibtex=q/upbibtex %%O %%B/" -e "$biber=q/biber %%O --bblencoding=utf8 -u -U --output_safechars %%B/" -e "$makeindex=q/upmendex %%O -o %%D %%S/" -e "$dvipdf=q/dvipdfmx %%O -o %%D %%S/" -norc -gg -pdfdvi -silent % に変更します.pdfLaTeX を実行したくなった場合は Latexmk の変数 $pdflatex が pdflatex コマンドに設定されていれば [ツール(T)] > [コマンド(C)] > [LaTeXmk] から Latexmk で pdfLaTeX を実行できます.
----
&color(#3F43EF,#3F43EF){%%%                              &color(Black){''TeXstudioの設定''};                        &color(#3F43EF,#3F43EF){%%%[ &color(Black){''?''}; ]%%%};&color(#DD4444,#DD4444){%%%[ &color(White){''×''}; ]%%%};%%%};&br;

#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_general.png,left,around,nolink,37x37,一般)
一般&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_commands.png,left,around,nolink,37x37,コマンド)
&color(Black,#DAEAFF){コマンド          };&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_quickbuild.png,left,around,nolink,37x37,ビルド)
ビルド&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_shortcut.png,left,around,nolink,37x37,キーボードショートカット)
キーボードショートカット&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_editor.png,left,around,nolink,37x37,エディタ)
エディタ&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_highlighting.png,left,around,nolink,37x37,構文の強調表示)
構文の強調表示&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_completion.png,left,around,nolink,37x37,コマンドの補完)
コマンドの補完&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_editor.png,left,around,nolink,37x37,文法)
文法&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_preview.png,left,around,nolink,37x37,プレビュー)
プレビュー&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_svn.png,left,around,nolink,37x37,SVN)
SVN&br;
&br;
&br;
&br;
&br;
&br;
 ☐ 高度なオプションの表示
&br;
----
詳細な設定をする場合は高度なオプションの表示を ON にします.~
----
&color(#3F43EF,#3F43EF){%%%                              &color(Black){''TeXstudioの設定''};                        &color(#3F43EF,#3F43EF){%%%[ &color(Black){''?''}; ]%%%};&color(#DD4444,#DD4444){%%%[ &color(White){''×''}; ]%%%};%%%};&br;

#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_general.png,left,around,nolink,37x37,一般)
一般&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_commands.png,left,around,nolink,37x37,コマンド)
&color(Black,#DAEAFF){コマンド          };&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_quickbuild.png,left,around,nolink,37x37,ビルド)
ビルド&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_shortcut.png,left,around,nolink,37x37,キーボードショートカット)
キーボードショートカット&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_latexmenus.png,left,around,nolink,37x37,メニュー)
メニュー&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_toolbars.png,left,around,nolink,37x37,ツールバー)
ツールバー&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_editor.png,left,around,nolink,37x37,エディタ)
エディタ&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_advancededitor.png,left,around,nolink,37x37,詳細なエディタ設定)
詳細なエディタ設定&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_highlighting.png,left,around,nolink,37x37,構文の強調表示)
構文の強調表示&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_highlighting.png,left,around,nolink,37x37,カスタム強調表示)
カスタム強調表示&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_completion.png,left,around,nolink,37x37,コマンドの補完)
コマンドの補完&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_editor.png,left,around,nolink,37x37,文法)
文法&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_preview.png,left,around,nolink,37x37,プレビュー)
プレビュー&br;
#ref(http://hg.code.sf.net/p/texstudio/hg/raw-file/tip/images/config_svn.png,left,around,nolink,37x37,SVN)
SVN&br;
&br;
&br;
&br;
&br;
&br;
 ☑ 高度なオプションの表示
&br;
----

:LaTeX|
:|uplatex.exe -no-guess-input-enc -kanji=utf8 -synctex=1 -interaction=nonstopmode %.tex
:PdfLaTeX|
:|latexmk.exe -e "$latex=q/uplatex %%O -kanji=utf8 -no-guess-input-enc -synctex=1 -interaction=nonstopmode %%S/" -e "$bibtex=q/upbibtex %%O %%B/" -e "$biber=q/biber %%O --bblencoding=utf8 -u -U --output_safechars %%B/" -e "$makeindex=q/upmendex %%O -o %%D %%S/" -e "$dvipdf=q/dvipdfmx %%O -o %%D %%S/" -norc -gg -pdfdvi -silent %
//:|pdflatex.exe -synctex=1 -interaction=nonstopmode %.tex
:XeLaTeX|
:|xelatex.exe -synctex=1 -interaction=nonstopmode %.tex
:LuaLaTeX|
:|lualatex.exe -synctex=1 -interaction=nonstopmode %.tex
:|luajitlatex.exe -synctex=1 -interaction=nonstopmode %.tex
:外部PDFビューア|
:|"C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance -inverse-search """"C:\Program Files (x86)\TeXstudio\texstudio.exe""" """%%f""" -line %%l" "?am.pdf" -forward-search "?c:am.tex" @
:|"C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance -inverse-search """"C:\Program Files\TeXstudio\texstudio.exe""" """%%f""" -line %%l" "?am.pdf" -forward-search "?c:am.tex" @
:|dde:///"C:\Program Files\SumatraPDF\SumatraPDF.exe":SUMATRA/control/[ForwardSearch("?am.pdf","?c:am.tex",@,0,0,1)]
:|dde:///"C:\Program Files\SumatraPDF\SumatraPDF.exe":SUMATRA/control/[ForwardSearch("?am.pdf","?c:am.tex",@,0,0,0)]
:|synctex view -i "@:0:?c:am.tex" -o "?am.pdf" -x "texworks --position=%%{page+1} '%%{output}'"
:DviPs|
:|ruby.exe -e "cmd='dvips -Ppdf -z -f '+0x22.chr+'?am.dvi'+0x22.chr+' '+0x7c.chr+' '+'convbkmk -u'+' '+0x3e.chr+' '+0x22.chr+'?am.ps'+0x22.chr;system(cmd)"
:DviPng|
:|dvipng.exe -T tight -D 120 %.dvi
:Ps2Pdf|
:|ps2pdf.exe %.ps
:DviPdf|
:|dvipdfmx.exe %.dvi
:BibTeX|
:|upbibtex.exe %
:BibTex 8ビット|
:|bibtex8.exe %
:Biber|
:|biber.exe --bblencoding=utf8 -u -U --output_safechars %
:Makeindex|
:|upmendex.exe %.idx
:Texindy|
:|ptexindy.exe %.idx
:|texindy.exe %.idx
:Makeglossary|
:|makeglossaries.exe
:Metapost|
:|upmpost.exe -interaction=nonstopmode ?me)
:Asymptote|
:|asy.exe %m*.asy
:Ghostscript|
:|rungs.exe
:Latexmk|
:|latexmk -pdf -silent -latexoption="-synctex=1" %
:SVN|
:|svn.exe
:SVNADMIN|
:|svnadmin.exe
----

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

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

**forward and inverse search [#m8df4b15]

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

forward and inverse search は 外部PDFビューア に以下のように設定します.~

■ 64-bit Windows の場合 (コマンドラインオプションを使用する場合)
 "C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance -inverse-search """"C:\Program Files (x86)\TeXstudio\texstudio.exe""" """%%f""" -line %%l" "?am.pdf" -forward-search "?c:am.tex" @
■ 32-bit Windows の場合 (コマンドラインオプションを使用する場合)
 "C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance -inverse-search """"C:\Program Files\TeXstudio\texstudio.exe""" """%%f""" -line %%l" "?am.pdf" -forward-search "?c:am.tex" @

**forward search [#xd4d4cea]

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

forward search は 外部PDFビューア に以下のように設定します.~

 dde:///"C:\Program Files\SumatraPDF\SumatraPDF.exe":SUMATRA/control/[ForwardSearch("?am.pdf","?c:am.tex",@,0,0,1)]

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

forward search は 外部PDFビューア に以下のように設定します.~

 dde:///"C:\Program Files\SumatraPDF\SumatraPDF.exe":SUMATRA/control/[ForwardSearch("?am.pdf","?c:am.tex",@,0,0,0)]

**inverse search [#bbb88480]
inverse search は SumatraPDF の [☰]-[設定(S)]-[オプション(O)...] の逆順検索コマンドラインの設定に以下のように設定します.~

■ 64-bit Windows の場合
 "C:\Program Files (x86)\TeXstudio\texstudio.exe" "%f" -line %l
■ 32-bit Windows の場合
 "C:\Program Files\TeXstudio\texstudio.exe" "%f" -line %l

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

*[[TeXworks]] との連携 [#nbf2fe80]

**forward search [#rd52a42f]

forward search は 外部PDFビューア に以下のように設定します.~

 synctex view -i "@:0:?c:am.tex" -o "?am.pdf" -x "texworks --position=%%{page+1} '%%{output}'"

*Adobe Acrobat Reader DC との連携 [#b8db9f79]

**forward search [#qc0a4b5f]

***pdfupLaTeXA [#v47e9095]

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

----
-pdfuplatexA-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --r15 --file "%~n1.pdf" && ^
 pdfclose --r15 --file "%~n1.pdf" & ^
 ptex2pdf -u -l -ot "-kanji=utf8 -no-guess-input-enc -synctex=1 -interaction=nonstopmode" %1 && ^
 synctex view -i "%~n3:0:%~n2.tex" -o "%~n1.pdf" -x "pdfopen --r15 --file '%%{output}' --page %%{page+1}"
----

ユーザーコマンドに
 pdfuplatexA-nonstopmode.bat % "?c:am.tex" @
を入力します.

***pdfupLaTeX2A [#u3863aaf]

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

----
-pdfuplatex2A-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --r15 --file "%~n1.pdf" && ^
 pdfclose --r15 --file "%~n1.pdf" & ^
 uplatex -kanji=utf8 -no-guess-input-enc -synctex=1 -interaction=nonstopmode %1 && ^
 dvips -Ppdf -z -f "%~n1.dvi" | ^
 convbkmk -u > "%~n1.ps" && ^
 ps2pdf.exe "%~n1.ps" && ^
 synctex view -i "%~n3:0:%~n2.tex" -o "%~n1.pdf" -x "pdfopen --r15 --file '%%{output}' --page %%{page+1}"
----

ユーザーコマンドに
 pdfuplatex2A-nonstopmode.bat % "?c:am.tex" @
を入力します.

***pdfLaTeXA [#s8c5a7ef]

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

----
-pdflatexA-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --r15 --file "%~n1.pdf" && ^
 pdfclose --r15 --file "%~n1.pdf" & ^
 pdflatex -synctex=1 -interaction=nonstopmode %1 && ^
 synctex view -i "%~n3:0:%~n2.tex" -o "%~n1.pdf" -x "pdfopen --r15 --file '%%{output}' --page %%{page+1}"
----

ユーザーコマンドに
 pdflatexA-nonstopmode.bat % "?c:am.tex" @
を入力します.

***LuaLaTeXA [#q18a41f2]

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

----
-lualatexA-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --r15 --file "%~n1.pdf" && ^
 pdfclose --r15 --file "%~n1.pdf" & ^
 lualatex -synctex=1 -interaction=nonstopmode %1 && ^
 synctex view -i "%~n3:0:%~n2.tex" -o "%~n1.pdf" -x "pdfopen --r15 --file '%%{output}' --page %%{page+1}"
----

ユーザーコマンドに
 lualatexA-nonstopmode.bat % "?c:am.tex" @
を入力します.

***LuaJITLaTeXA [#ie839257]

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

----
-luajitlatexA-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --r15 --file "%~n1.pdf" && ^
 pdfclose --r15 --file "%~n1.pdf" & ^
 luajitlatex -synctex=1 -interaction=nonstopmode %1 && ^
 synctex view -i "%~n3:0:%~n2.tex" -o "%~n1.pdf" -x "pdfopen --r15 --file '%%{output}' --page %%{page+1}"
----

ユーザーコマンドに
 luajitlatexA-nonstopmode.bat % "?c:am.tex" @
を入力します.

***XeLaTeXA [#h2489244]

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

----
-xelatexA-nonstopmode.bat
----
 @echo off
 tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | ^
 findstr "AcroRd32.exe" > nul && ^
 pdfopen --r15 --file "%~n1.pdf" && ^
 pdfclose --r15 --file "%~n1.pdf" & ^
 xelatex -synctex=1 -interaction=nonstopmode %1 && ^
 synctex view -i "%~n3:0:%~n2.tex" -o "%~n1.pdf" -x "pdfopen --r15 --file '%%{output}' --page %%{page+1}"
----

ユーザーコマンドに
 xelatexA-nonstopmode.bat % "?c:am.tex" @
を入力します.