I'm using MiKTeX 2.9 on Windows. So far I've been using LeD to compile my PDFs (using pdflatex
). I want to start using Notepad++ to compile my LaTeX PDFs as I've lately become very fond of this editor.
Would anyone be able to point me to a way to configure Notepad++ with shortcuts to compile bibtex
and pdflatex
?
Best Answer
I managed to find the perfect solution! For some reason, this didn't show up on my previous Google searches. I tailored my version of this solution: http://nimal.info/blog/2010/latex-on-windows-with-miktex-and-notepad/
My version (on a 64-bit Windows 7 machine) is as follows:
miktex_to_latex.bat
and place it anywhereCopy-paste the following into the batch file and save it
Take care of the following:
::
are commentsSTART
command should have the installation path of SumatraPDFProgra~2
, notProgram Files (X86)
)-reuse-instance
allows us to edit and recompile without quitting the PDFDownload (if it does not already exist) the NppExec plugin and place the
.dll
file in [Notepad++ installation path]\pluginsOpen a
.tex
file in Notepad++, click on F6 to executeType the following lines in the window that pops up:
In my case, this is:
The above lines basically tell NppExec to "save the current
.tex
file, run the batch file, store results in current directory and name it the same as the.tex
file"Click on "Save" and type in a recognizable name such as 'PDFLaTex'
Go to the menubar, Plugins -> NppExec -> Advanced Options.. Under 'Menu item', choose the script we just created above, and 'Add/Modify' it to the Menu items with a suitable name. This allows us to assign shortcut keys through Settings -> Shortcut Mapper -> Plugin commands
Navigate to the script name and choose any shortcut key like Shift+F7
Press the shortcut key Shift+F7 to save and compile the
.tex
file. The SumatraPDF window should pop up and show the compiled PDF. Changes can be made and the file recompiled without having to close the PDF.The BEST parts about this method are:
Thanks Nimal, Jonas, Bert and the others who contributed to this awesome solution!