## LaTeX forum ⇒ LEd ⇒ Per project configuration of tools in LEd

Information and discussion about LEd, an integrated LaTeX environment for Windows
T3.
Posts: 208
Joined: Fri Mar 14, 2008 12:58 pm

### Per project configuration of tools in LEd

While doing recently some LaTeX writing in LEd, I found the supplied batches for calling different tools somewhat awkward in use. I wanted to have differently configured tools on per project/file basis and, since other people might have similar desire, here's how this can be done.

Replace the default batches in <LEd dir>\Batches with the following generic batch:
@echo offsetlocal%3cd %1set CD=if "%~dp0"=="%CD%\" (   echo cannot be run from directory "%~dp0">&2   exit /b 1)call %~n0 %2

The whole idea behind the above batch is to call, e.g. 'pdflatex ...' rather than 'pdflatex.exe ...'. While this might seem like a cosmetic change, it does in fact make a lot of difference if there is a wrapper script 'pdflatex.bat' (or any other executable format for that matter) present in the current directory or on the search path. If the wrapper is found before pdflatex.exe it will be called instead. It goes without saying that the same trick can be used for any other tool supported by LEd.

As an example I used the following pdflatex.bat (placed together with the main .tex file) to work smoothly with PDF-XChange viewer (see also this topic):
@echo offsetlocalset pdfview=C:\path\to\PDF-XChangeViewerecho on"%pdfview%\PDFXCview.exe" /close:discard "%~dpn1.pdf"pdflatex.exe %1

Cheers,

Tomek

Return to “LEd”

### Who is online

Users browsing this forum: No registered users and 1 guest