[[Texmaker]] > [[設定>Texmaker/設定]] > [[Windows>Microsoft Windows]] &color(White,#5F2F2F){ ''◆目次◆'' };&br; #contents *設定 [#ha179b3b] **コマンド [#cab65285] [オプション(O)]-[Texmaker の設定]-[コマンド] PDF ビューアは,組み込みビューアと外部ビューアを選択するようになっているので好きな方を選択してください.~ コマンドの LaTeX に設定されている latex を uplatex に変更してコマンドのオプションに -synctex=1 を追加します.~ コマンドの LuaLaTeX に設定されているコマンドのオプションに -synctex=1 を追加します.~ コマンドの Bib(la)tex に設定されている bibtex を upbibtex に変更します.~ コマンドの Dvipdfm に設定されている dvipdfm を dvipdfmx に変更します.~ Texmaker のデフォルトの文字コードは UTF-8 です.~ コンパイルエラーが発生する場合は[[サクラエディタ]]で文字コードを UTF-8,改行コードを CR+LF にして保存するとコンパイルが通るそうです. → [[やっと見つけたTeXエディタ:http://yaplog.jp/stdwave/archive/215]]~ W32TeX の場合は latexmk の実行には [[Strawberry Perl:http://strawberryperl.com/]] が必要です.~ ---- &color(#9BC527,#9BC527){%%% &color(Black){''Texmaker の設定''}; &color(#9BC527,#9BC527){%%%[ &color(Black){''?''}; ]%%%};&color(#DD4444,#DD4444){%%%[ &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 };%%%uplatex -no-guess-input-enc -kanji=utf8 -synctex=1 -interaction=nonstopmode %.tex%%%&br; &color(Black,#F5F5F5){PdfLaTeX };%%%pdflatex -synctex=1 -interaction=nonstopmode %.tex%%%&br; &color(Black,#F5F5F5){☐ 出力ファイルを "build" サブフォルダーに出力する};&br; &color(Black,#DAEAFF){ ''コマンド'' }; &color(Black,#F5F5F5){XeLaTeX };%%%xelatex -synctex=1 -interaction=nonstopmode %.tex%%% &color(Black,#F5F5F5){LuaLaTeX };%%%lualatex -synctex=1 -interaction=nonstopmode %.tex%%% または %%%luajitlatex -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 };%%%powershell -Command "& {$s = """%.tex"""; $latex = [char]0x24+'latex'; $bibtex = [char]0x24+'bibtex'; $makeindex = [char]0x24+'makeindex'; $dvipdf = [char]0x24+'dvipdf'; $opt = [char]0x25+'O'; $base = [char]0x25+'B'; $dst = [char]0x25+'D'; $src = [char]0x25+'S'; latexmk -e """$latex=q/uplatex $opt -kanji=utf8 -no-guess-input-enc -synctex=1 -interaction=nonstopmode $src/""" -e """$bibtex=q/upbibtex $opt $base/""" -e """$makeindex=q/mendex $opt -U -o $dst $src/""" -e """$dvipdf=q/dvipdfmx $opt -o $dst $src/""" -norc -gg -pdfdvi $s}"%%%&br;または %%%powershell -Command "& {$s = """%.tex"""; $pdflatex = [char]0x24+'pdflatex'; $bibtex = [char]0x24+'bibtex'; $makeindex = [char]0x24+'makeindex'; $opt = [char]0x25+'O'; $base = [char]0x25+'B'; $dst = [char]0x25+'D'; $src = [char]0x25+'S'; latexmk -e """$pdflatex=q/pdflatex $opt -synctex=1 -interaction=nonstopmode $src/""" -e """$bibtex=q/bibtex $opt $base/""" -e """$makeindex=q/makeindex $opt -o $dst $src/""" -norc -gg -pdf $s}"%%%&br;または %%%powershell -Command "& {$s = """%.tex"""; $pdflatex = [char]0x24+'pdflatex'; $bibtex = [char]0x24+'bibtex'; $makeindex = [char]0x24+'makeindex'; $opt = [char]0x25+'O'; $base = [char]0x25+'B'; $dst = [char]0x25+'D'; $src = [char]0x25+'S'; latexmk -e """$pdflatex=q/lualatex $opt -synctex=1 -interaction=nonstopmode $src/""" -e """$bibtex=q/bibtexu $opt $base/""" -e """$makeindex=q/texindy $opt -o $dst $src/""" -norc -gg -pdf $s}"%%%&br;または %%%powershell -Command "& {$s = """%.tex"""; $pdflatex = [char]0x24+'pdflatex'; $bibtex = [char]0x24+'bibtex'; $makeindex = [char]0x24+'makeindex'; $opt = [char]0x25+'O'; $base = [char]0x25+'B'; $dst = [char]0x25+'D'; $src = [char]0x25+'S'; latexmk -e """$pdflatex=q/luajitlatex $opt -synctex=1 -interaction=nonstopmode $src/""" -e """$bibtex=q/bibtexu $opt $base/""" -e """$makeindex=q/texindy $opt -o $dst $src/""" -norc -gg -pdf $s}"%%%&br;または %%%powershell -Command "& {$s = """%.tex"""; $pdflatex = [char]0x24+'pdflatex'; $bibtex = [char]0x24+'bibtex'; $makeindex = [char]0x24+'makeindex'; $opt = [char]0x25+'O'; $base = [char]0x25+'B'; $dst = [char]0x25+'D'; $src = [char]0x25+'S'; latexmk -e """$pdflatex=q/xelatex $opt -synctex=1 -interaction=nonstopmode $src/""" -e """$bibtex=q/bibtexu $opt $base/""" -e """$makeindex=q/texindy $opt -o $dst $src/""" -norc -gg -pdf $s}"%%%&br; ''クイックビルド''&br; #img(,clear) #ref(https://bitbucket.org/srazi/biditexmaker3/raw/tip/images/configeditor.png,left,around,nolink,エディタ) &color(Black,#F5F5F5){[[Bib(la)tex>BibTeX関連ツール]] };%%%upbibtex %%%% または %%%bibtex %%%% または %%%bibtexu %%%% または %%%biber --bblencoding=utf8 -u -U --output_safechars %%%%&br; &color(Black,#F5F5F5){Makeindex };%%%mendex -U %.idx%%% または %%%makeindex %.idx%%% または %%%texindy %.idx%%%&br; &color(Black,#F5F5F5){[[dvips]] };%%%dvips -Ppdf -o %.ps %.dvi%%%&br; &color(Black,#F5F5F5){Dvipdfm };%%%dvipdfmx %.dvi%%%&br; ''エディタ'' &color(Black,#F5F5F5){ps2pdf };%%%ps2pdf.bat %.ps%%% または %%%ps2pdf.exe %.ps%%%&br; #img(,clear) #ref(https://bitbucket.org/srazi/biditexmaker3/raw/tip/images/configkeys.png,left,around,nolink,ショートカット) &color(Black,#F5F5F5){[[metapost>MetaPost]] };%%%upmpost -interaction=nonstopmode %%%% または %%%mpost -interaction=nonstopmode %%%%&br; &color(Black,#F5F5F5){[[Asymptote]] };%%%asy %.asy%%%&br; &color(Black,#F5F5F5){[[ghostscript>Ghostscript]] };%%%rungs.exe%%% または %%%gswin64c.exe%%% または %%%gswin32c.exe%%%&br; &color(Black,#F5F5F5){R Sweave };%%%R CMD Sweave %.Rnw%%%&br; ''ショートカット'' &color(Black,#F5F5F5){Add to PATH };&br; ---- &color(Black,#F5F5F5){''PDF ビューア''};&br; &color(Black,#F5F5F5){(●) 組み込みビューア};&br; &color(Black,#F5F5F5){☑ 埋め込み};&br; &color(Black,#F5F5F5){◯ 外部ビューア};&br; %%%"C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe" -reuse-instance %.pdf -forward-search #.tex @%%%&br; %%%"C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance %.pdf -forward-search #.tex @%%%&br; %%%powershell -Command "& {$param=[char]0x22+'@:0:#.tex'+[char]0x22; $pdf=[char]0x22+'%.pdf'+[char]0x22; $page=[char]0x25+'{page+1}'; $o=[char]0x27+[char]0x25+'{output}'+[char]0x27; synctex view -i $param -o $pdf -x """texworks --position=$page $o"""}"%%%&br; //%%%texworks %.pdf%%%&br; //%%%cmd /c start firefox -new-window %.pdf%%%&br; //%%%cmd /c start chrome --new-window !/%.pdf%%%&br; //%%%pdfopen --rxi --file %.pdf%%%&br; #img(,clear) &br; &color(Black,#EEEEEE){[ OK ]}; &color(Black,#EEEEEE){[ キャンセル ]};&br; ---- *[[SumatraPDF]] との連携 [#f10825ae] LaTeX コマンド, PdfLaTeX コマンド, XeLaTeX コマンド, LuaLaTeX コマンドのオプションに -synctex=1 を追加します. **forward search [#y08c577b] ***SumatraPDF を前面に表示したい場合 [#id9fc839] forward search は PDFビューアの外部ビューアに以下のように設定します.~ ■ 64-bit Windows の場合~ "C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe" -reuse-instance %.pdf -forward-search #.tex @ ■ 32-bit Windows の場合~ "C:\Program Files\SumatraPDF\SumatraPDF.exe" -reuse-instance %.pdf -forward-search #.tex @ ***SumatraPDF を前面に表示したくない場合 [#j0fbd66f] [[SumatraPDF/fwdsumatrapdf]] の fwdsumatrapdf.exe を使用します.~ forward search は PDFビューアの外部ビューアに以下のように設定します.~ fwdsumatrapdf.exe %.pdf #.tex @ **inverse search [#p850b553] inverse search は SumatraPDF の [設定(S)]-[オプション(O)...]-[逆順検索コマンドラインの設定] に以下のように設定します.~ ■ 64-bit Windows の場合 "C:\Program Files (x86)\Texmaker\texmaker.exe" "%f" -line %l ■ 32-bit Windows の場合 "C:\Program Files\Texmaker\texmaker.exe" "%f" -line %l ダブルクリックで対応する TeX 文書の該当箇所にジャンプします. *[[TeXworks]] との連携 [#o9f4b99c] **forward search [#a41fe59c] forward search は PDFビューアの外部ビューアに以下のように設定します.~ powershell -Command "& {$param=[char]0x22+'@:0:#.tex'+[char]0x22; $pdf=[char]0x22+'%.pdf'+[char]0x22; $page=[char]0x25+'{page+1}'; $o=[char]0x27+[char]0x25+'{output}'+[char]0x27; synctex view -i $param -o $pdf -x """texworks --position=$page $o"""}" *[[Adobe Reader]] との連携 [#u27e1718] **forward search [#l5bfe340] ***pdfupLaTeXA [#v915ab85] pdfuplatexA-nonstopmode.bat を作成します. ---- -pdfuplatexA-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" & ^ 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 --rxi --file '%%{output}' --page %%{page+1}" ---- クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で pdfuplatexA-nonstopmode.bat % #.tex @ を入力します. ***pdfupLaTeX2A [#pf77769a] pdfuplatex2A-nonstopmode.bat を作成します. ---- -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 -synctex=1 -interaction=nonstopmode %1 && ^ dvips -Ppdf -z -f "%~n1.dvi" | ^ convbkmk -u > "%~n1.ps" && ^ ps2pdf.bat "%~n1.ps" && ^ synctex view -i "%~n3:0:%~n2.tex" -o "%~n1.pdf" -x "pdfopen --rxi --file '%%{output}' --page %%{page+1}" ---- クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で pdfuplatex2A-nonstopmode.bat % #.tex @ を入力します. ***pdfLaTeXA [#j7c9b397] pdflatexA-nonstopmode.bat を作成します. ---- -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 -synctex=1 -interaction=nonstopmode %1 && ^ synctex view -i "%~n3:0:%~n2.tex" -o "%~n1.pdf" -x "pdfopen --rxi --file '%%{output}' --page %%{page+1}" ---- クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で pdflatexA-nonstopmode.bat % #.tex @ を入力します. ***LuaLaTeXA [#b2053ddc] lualatexA-nonstopmode.bat を作成します. ---- -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 -synctex=1 -interaction=nonstopmode %1 && ^ synctex view -i "%~n3:0:%~n2.tex" -o "%~n1.pdf" -x "pdfopen --rxi --file '%%{output}' --page %%{page+1}" ---- クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で lualatexA-nonstopmode.bat % #.tex @ を入力します. ***LuaJITLaTeXA [#z4aadf43] luajitlatexA-nonstopmode.bat を作成します. ---- -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 -synctex=1 -interaction=nonstopmode %1 && ^ synctex view -i "%~n3:0:%~n2.tex" -o "%~n1.pdf" -x "pdfopen --rxi --file '%%{output}' --page %%{page+1}" ---- クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で luajitlatexA-nonstopmode.bat % #.tex @ を入力します. ***XeLaTeXA [#md09c195] xelatexA-nonstopmode.bat を作成します. ---- -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 -synctex=1 -interaction=nonstopmode %1 && ^ synctex view -i "%~n3:0:%~n2.tex" -o "%~n1.pdf" -x "pdfopen --rxi --file '%%{output}' --page %%{page+1}" ---- クイックビルドのコマンドのユーザー定義または [ユーザー(U)]-[ユーザー定義コマンド(C)]-[ユーザー定義コマンドの編集(C)] で xelatexA-nonstopmode.bat % #.tex @ を入力します.