Notepad++ > NppExec



NppExec → 問題が発生する場合は jN を使用する

NppExec を使うと LaTeX 環境を簡単に作ることができます.
https://sourceforge.net/projects/npp-plugins/files/NppExec/ から NppExec の 64-bit プラグインあるいは 32-bit プラグインがダウンロードできます.
[プラグイン]-[NppExec]-[Show Console Dialog] にチェックをいれた場合は,NPP_CONSOLE 1 の処理は書かなくても OK です.
[プラグイン]-[NppExec]-[Follow $(CURRENT_DIRECTORY)] にチェックをいれた場合は,cd /d "$(CURRENT_DIRECTORY)" && の処理は書かなくても OK です.
[プラグイン]-[NppExec]-[Execute...] または F6 キーで設定および実行ができます.
コマンドを設定して名前を付けて保存します.
設定した後で [プラグイン]-[NppExec]-[Advanced Options...] の Menu item から設定した項目を登録します.
[設定]-[ショートカット管理...]-[Plugin commands] から登録した項目のショートカットの設定をします.

License

GPLv3

pdfupLaTeX


                            Execute...                         [ 🗙 ]

  Command(s):
   NPP_SAVE
   NPP_CONSOLE 1
   cmd /c cd /d "$(CURRENT_DIRECTORY)" && ptex2pdf -u -l -ot "-synctex=1 -no-guess-input-enc -kanji=utf8 -sjis-terminal" "$(NAME_PART)"




   Script name:                     
    [pdfupLaTeX                  ]


             Shortcut             [🗙]

      Name : pdfupLaTeX
   ☑CTRL
          + ☐SHIFT  +  [J         ]
   ☑ALT

      [   OK   ]     [  Cancel  ]


LuaLaTeX


                            Execute...                         [ 🗙 ]

  Command(s):
   NPP_SAVE
   NPP_CONSOLE 1
   cmd /c cd /d "$(CURRENT_DIRECTORY)" && lualatex -synctex=1 "$(NAME_PART)"




   Script name:                     
    [LuaLaTeX                   ]


             Shortcut             [🗙]

      Name : pdfupLaTeX2
   ☑CTRL
          + ☐SHIFT  +  [K         ]
   ☑ALT

      [   OK   ]     [  Cancel  ]


SumatraPDF との連携

forward and inverse search (SumatraPDF を前面に表示したい場合)

SumatraPDF


                            Execute...                         [ 🗙 ]

  Command(s):
   NPP_CONSOLE 1
   cmd /c cd /d "$(CURRENT_DIRECTORY)" && set CURRENT_LINE=$(CURRENT_LINE) && set /a CURRENT_LINE=CURRENT_LINE+1 && echo rundll32 shell32,ShellExec_RunDLL SumatraPDF -reuse-instance "$(NAME_PART).pdf" -inverse-search "\"$(#0)\" \"%f\" -n%l -c%c" -forward-search "$(FILE_NAME)" %CURRENT_LINE% | cmd




   Script name:                     
    [SumatraPDF                  ]


             Shortcut             [🗙]

      Name : SumatraPDF
   ☑CTRL
          + ☐SHIFT  +  [O         ]
   ☑ALT

      [   OK   ]     [  Cancel  ]


forward search (SumatraPDF を前面に表示したくない場合)

SumatraPDF/fwdsumatrapdf の fwdsumatrapdf.exe を使用します.

fwdsumatrapdf

以下のように設定します.


                            Execute...                         [ 🗙 ]

  Command(s):
   NPP_CONSOLE 1
   cmd /c cd /d "$(CURRENT_DIRECTORY)" && fwdsumatrapdf.exe "$(NAME_PART).pdf" "$(FILE_NAME)" $(CURRENT_LINE)




   Script name:                     
    [fwdsumatrapdf                 ]


             Shortcut             [🗙]

      Name : pdfLaTeX
   ☐CTRL
          + ☑SHIFT  +  [H         ]
   ☑ALT

      [   OK   ]     [  Cancel  ]


inverse search

Notepad++#SumatraPDF との連携 を参照.

TeXworks との連携

forward search

TeXworks


                            Execute...                         [ 🗙 ]

  Command(s):
   NPP_CONSOLE 1
   cmd /c cd /d "$(CURRENT_DIRECTORY)" && set CURRENT_LINE=$(CURRENT_LINE) && set /a CURRENT_LINE=CURRENT_LINE+1 && echo synctex view -i "%CURRENT_LINE%:0:$(FILE_NAME)" -o "$(NAME_PART).pdf" -x "texworks --position=%{page+1} "%{output}"" | cmd




   Script name:                     
    [TeXworks                   ]


             Shortcut             [🗙]

      Name : pLaTeX-ng
   ☑CTRL
          + ☐SHIFT  +  [N         ]
   ☑ALT

      [   OK   ]     [  Cancel  ]


Adobe Acrobat Reader DC との連携

forward search

pdfupLaTeXA


                            Execute...                         [ 🗙 ]

  Command(s):
   NPP_SAVE
   NPP_CONSOLE 1
   cmd /c cd /d "$(CURRENT_DIRECTORY)" && tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | findstr "AcroRd32.exe" > nul && pdfopen --file "$(NAME_PART).pdf" && pdfclose --file "$(NAME_PART).pdf" & ptex2pdf -u -l -ot "-no-guess-input-enc -kanji=utf8 -synctex=1 -sjis-terminal" "$(NAME_PART)" && set CURRENT_LINE=$(CURRENT_LINE) && set /a CURRENT_LINE=CURRENT_LINE+1 && echo synctex view -i "%CURRENT_LINE%:0:$(FILE_NAME)" -o "$(NAME_PART).pdf" -x "pdfopen --file "%{output}" --page %{page+1}" | cmd




   Script name:                     
    [pdfupLaTeXA                 ]


             Shortcut             [🗙]

      Name : LuaLaTeX
   ☐CTRL
          + ☑SHIFT  +  [J         ]
   ☑ALT

      [   OK   ]     [  Cancel  ]


LuaLaTeXA


                            Execute...                         [ 🗙 ]

  Command(s):
   NPP_SAVE
   NPP_CONSOLE 1
   cmd /c cd /d "$(CURRENT_DIRECTORY)" && tasklist /fi "IMAGENAME eq AcroRd32.exe" /nh | findstr "AcroRd32.exe" > nul && pdfopen --file "$(NAME_PART).pdf" && pdfclose --file "$(NAME_PART).pdf" & lualatex -synctex=1 "$(NAME_PART)" && set CURRENT_LINE=$(CURRENT_LINE) && set /a CURRENT_LINE=CURRENT_LINE+1 && echo synctex view -i "%CURRENT_LINE%:0:$(FILE_NAME)" -o "$(NAME_PART).pdf" -x "pdfopen --file "%{output}" --page %{page+1}" | cmd




   Script name:                     
    [LuaLaTeXA                  ]


             Shortcut             [🗙]

      Name : LuajitLaTeX
   ☐CTRL
          + ☑SHIFT  +  [K         ]
   ☑ALT

      [   OK   ]     [  Cancel  ]


関連リンク


Last-modified: 2018-04-20 (金) 22:06:39 (453d)