Setting up a „development“ environment for LaTeX is quite complicated compared to installing Microsoft Word 😉 And it gets even more complicated, if you decide to use Eclipse as the platform for writing your documents. However, as I had to setup such an environment from scratch today, here’s how I did it with minimum impact on the system.
- (Optionally) create a base directory in which all of the programs below will get installed, e.g.
- Download MikTeX – Portable Edition and extract it to
- Download and install the JDK: Java SE Downloads. If you have security concerns like me, make sure to download the latest version and enable daily updates and/or disable the Java plugin in your browser.
- Download Eclipse (the most basic version will do, e.g. „classic“ or „for Java developers“) and extract it to
- Start Eclipse and choose a convenient path for the workspace (where your LaTeX projects will get saved), e.g.
- Install TeXlipse into Eclipse: Help – Install New Software – Add a new repository with name „TeXlipse“ and location „http://texlipse.sourceforge.net/“. Select all installable items as shown below. As you can see, Pdf4Eclipse will already be installed, too.
Simply click through the installation wizard and restart Eclipse after the installation is finished.
Warning: Starting with Eclipse Photon the version of TeXlipse shown above doesn’t work anymore. Please use the Eclipse Marketplace to install a newer version like 2.0.2.
- After TeXlipse is installed, you should already be able to open the LaTeX perpective in Eclipse.
- Now it’s time to tell TeXlipse where it can find your LaTeX executables and therefore be able to compile your LaTeX documents. Go to Window – Preferences – Texlipse – Builder Settings, enter the path to your MikTeX executables –
D:\LaTeX\MikTeX\miktex\bin– into Bin directory of TeX distribution, and click Apply. That should automatically fill in all the needed programs in Programs used for building the document for you.
- Now you should already be able to create and compile your first LaTeX project. Right-click into your Project Explorer and create a new project.
If you save
document.tex, it should automatically be compiled. Take a look at the corresponding console output.
- If you double-click on the created
document.pdffile in the Project Explorer (a Refresh may be needed to show the file), it should be opened with Pdf4Eclipse. If you double-click a line in the PDF file, Eclipse should now jump to the corresponding position in your LaTeX source. And that’s it! Now you can start writing your LaTeX document. If you need a template, take a look at these blog posts (they are in German):