A LaTeX macro bundle for jEdit

Version 11-October-2007.

Presentation of the macro bundle

jEdit is a free programmer's text editor written in Java.

What is the LaTeX macro bundle for ? See the panel screenshots below or a general screenshot.

The main macro (LaTeX.bsh) of this macro bundle is very similar to the jEdit Clipper and Xinsert plugins. It is expected to be more convenient because using tabs and icons, the number of visible commands is much larger, so, all commands can be attained with at most two mouse clicks. In addition, it is possible to invoke system (latex, pdflatex, aspell,....) or BeanShell (e.g., wizards) commands.

This macro is divided into two files LaTeX.bsh and LaTeX.c (configuration file). All customizations are in the second file. The first file is independent of the language considered, for example, it can be used for HTML (it suffices to adapt the configuration file to HTML) instead of LaTeX.

Default button panels (KDE, Kunststoff look and feel)

Buttons with title written in boldface (on light green or light blue background) correspond to macros invoked via LaTeX.bsh. Click these buttons for detailed information. The seventh panel will be referred to as the "commands panel".
 General panel #1 General panel #2
 Math symbols #1 Math symbols #2 Greek and Hebrew
 Presentation Commands Personal panel

All these tabs and buttons can be easily modified, for example, the above panels are concatenated here. The configuration file corresponding to the 8 panels is LaTeX.c available here in HTML.

Installation

First, you need jEdit 4.3pre9 or higher with Console plugin 4.3.2 or higher. The LaTeX.zip macro bundle has been tested on Solaris, Linux, Windows (2000 and XP), PC-BSD (not tested on the Mac) using jEdit 4.3pre9 with Console plugin version 4.3.2 and Java 6, however a bug (see below) still occurs at times. Of course, you also need a working installation of LaTeX with PDF, PostScript viewers and Aspell.

Installation: Installing jEdit creates a directory .jedit in the home directory (e.g., C:\Documents and settings\foo\.jedit or \$HOME/.jedit). The installation of the LaTeX macro bundle reduces to unzip the LaTeX.zip file in the subdirectory macros of .jedit. A sub-directory named LaTeX containing all files will be created.

Configuration: From version of 4-June-2007, the configuration of the LaTeX.bsh macro (main macro of the LaTeX macro bundle) is performed automatically the first time it is invoked (Unix/Linux and Windows, not Mac). If this configuration is not okay, see below for details.

Tool bar integration: You can invoke the main macro LaTeX.bsh from the jEdit Macros menu: Macros > LaTeX > LaTeX. All other macros appearing in this menu can be invoked via the main macro (buttons of the dialog). If you often use this macro bundle, you may add a button to the main tool bar (an icon is proposed in the goodies sub-directory). For adding this button: Utilities > Global options > Tool bar > + > Macros > LaTeX, then you can browse for choosing the icon from the same dialog.

Personal panel: Explanations available here. Save somewhere your modifications of the LaTeX.c file for next updates of the macro bundle.

Perl-based macros: Some actions ("Parse", "Errors", "Go to" of the commands panel, and the macro latexOpenBiblioInBrowser.bsh in the goodies sub-directory) use Perl. Perl is installed by default on most platforms. For Windows, you can get it from ActiveState (note that the Windows TeXLive installer installs Perl).

Bug: sometimes the caret disappears (Unix/Linux), in most cases you can get it back simply by clicking the "Console" button of the commands panel. In some cases (some Linux distributions) the above trick is not sufficient as you need to close and reopen the dialog. In order to avoid this second problem, first, get rid of the java version specific to you distribution and install the latest JRE/JDK from Sun.

Configuration

Click the button "Edit macro" of the command panel in order to open the configuration file LaTeX.c. Scroll down to the relevant area (around line 80) and define the 14 strings (from latexString to aspellString2) as illustrated below (select your system):

Getting started

It is assumed that you are familiar with LaTeX.

For a new project:

• Define a new main project file (button "New" of the first panel). You will have to choose between six classes (article, ieee, report, book, letter, beamer). Some options and packages are selected by default. Note that for avoiding some bugs it is better to minimize this file so that it doesn't contain any part of the document (link .tex files, see below).
• In principle a project is divided in several additional .tex, .eps, .pdf and .bib files. You can link these files to the file of the active buffer by clicking the "Link" button (first panel).
• Note that it is assumed that all .tex files are in the same directory as the master file one (or in a sub-directory but it is risky, some commands might not work). In addition, the names supported by most commands of the command panel are expected to be alphanumeric with possibly "_", "-", ":" or "=". For examples, supported names foo1_foo2.tex or foo1-foo2.tex, not supported foo1 foo2.tex, foo1%foo2.tex or foo1+foo2.tex.
• For compiling your project from a non-main file (active buffer) you must first indicate where is the main file by clicking the "Master" button (this information will be stored at the end of the file).

For navigation and for searching labels:

• For errors and warnings after compilation, use the "Errors" and "Go to" buttons or the "Log" button of the command panel.
• For navigation in a file with the jEdit "Markers menu" click the "Markers" button (first panel) and choose where markers should be added.
• For searching labels, use the "Parse" and "Go to" buttons of the command panel. After label parsing you can use the "\ref{}" (first panel) button to insert a reference in your LaTeX file.
• For searching citations in your .bib files, you can try an experimental (Perl-based) macro by clicking the button "Search bib". It is configured for Firefox (can be modified manually in goodies/latexOpenBiblioInBrowser.bsh).

Note that all macros of the bundle can also be invoked from jEdit Macros menu.