The RTextDoc LaTeX editor put to the test

Ba1969, Freeimages

Ba1969, Freeimages

Labeling

The RTextDoc LaTeX editor promises ease of use when entering complex markup. We look at its advantages and also its shortcomings.

Those daring to use LaTeX for the first time might want to start off with an editor – a program such as RTextDoc [1]. Such a program promises a lot of additional comfort functions beyond checking syntax that allow correct document formatting with minimal mouse clicks.

The fact that GPL app RTextDoc is written in Java, which means you need the corresponding runtime environment (see the "Installation" box), but it also means it runs just as well on Linux as Mac OS X and Windows. Additional plugins add flexibility extending the base editor. Technically, the software is based on the RText [2] editor also implemented in Java.

Installation

The developers suggest a simple installation – in fact, you can unzip the archive with the current version, directly into /opt/ , and start the program with the accompanying rtextdoc.sh script.

Unfortunately, this process doesn't always work and the editor hangs on startup. When confronted with this result, the developers suggested a workaround – deleting the .rtextdoc/ folder in the home directory, After doing this, I was still having startup problems. The best advice is to test it using the following command:

$ java -jar /RTextDoc_path/rtextdoc.jar

If you already have the RText predecessor installed, it shouldn't be in the $CLASSPATH variable. And, if it is, you need to unset it with unset CLASSPATH . With Ubuntu, you absolutely need a new Java Runtime – at least version 1.7. To see if you have it, run

java --version<C>

RTextDoc requires more than 220MB of disk space and starts up relatively slowly as a Java program, although not as slowly as some other IDEs of similar complexity.

A glance at the list of features shows why it's worthwhile giving this program a try. The software supports more than 20 languages, including spell-checking and a built-in grammar checker through LanguageTool [3]. You can also add simple drawings, with the software highlighting the LaTeX syntax and other markup languages directly in the source code. RTextDoc handles bookmarks and grouping of sections, as well as line numbering and bracket pairing testing. Finally, it supports syntax highlighting for programming languages, along with references and BibTeX checking. A WYSIWYG mode is available for math formulas, and additional functions can be added to menus and macros.

GPL at Cost

There is a catch, however. Many of the options are available in a fee-activated version (see Table 1). Unlocking them costs $20 for private users. This approach is something, in fact, that the GPL allows, as long as the source code is freely accessible.

The fee-based nature also applies to the detailed documentation, which only activated versions have access to (Figure 1). Fortunately, online help is available for each menu item (Figure 2), which you can find as HTML files in the doc/ directory of your installation. The help can clarify some details but is primarily aimed at Java programmers, for which RText was originally developed.

Figure 1: The comprehensive documentation is available only for paying RTextDoc customers.
Figure 2: The sparse online help for menus is available even without activation.

Activation was not without some problems in my test. Even though the administrators set up the account within a day to enable access to the documentation, enabling the additional editor functions required deleting the ~/.rtextdoc/ directory after installation.

LaTeX Skills

The developers tout RTextDoc as a specialized LaTeX editor. As a compiler, it's based on the now obsolete pdfLaTeX and Dvips, which is not being developed anymore. Native support for XeLaTeX, currently the most used variant, is nowhere to be found. In principle, however, other TeX compilers can be used. You can add them in Macros or use them as a basis for your own. In this context, macros have nothing to do with those used in LaTeX but are more related to JavaScript and Groovy routines callable from the editor.

An example of how this works is shown in Figure 3. The example shows the Run pdfLaTeX.groovy script. By replacing the // do not modify line with it, you can call XeLaTeX instead of pdfLaTeX. However, saving the script as xelatex.groovy so that the editor can find it, won't work. The documentation suggests dropping it in macros/ in the ~/.rtextdoc directory.

Figure 3: Integrating modern compilers in the software requires some effort, without much support from developers.

The program actually supports linguistic adjustments for menus and dialogs, which worked fine in the Java-written predecessor. In the current version of RTextDoc, you can also find a comprehensive dialog in Edit | Options that allows language settings, although it didn't work for me in either the free or the activated version of the software.

Another special feature the program provides is an environment for creating drawings for LaTeX documents. This currently works much better with graphics programs such as Inkscape, MyPaint, or GIMP instead, including exporting in a supported bitmap format. These applications are optimized for graphics creation and allow special effects, such as filling selected regions with gradients or the like. RTextDoc instead bases its drawing function on the Java-developed LaTeXDraw (Figure 4).

Figure 4: LaTeXDraw lets you create drawings, but with little chance of modifying them.

This not-so-powerful program doesn't allow moving, adding, or removing set points in most tools. It also relies on the PSTricks package developed for PostScript output that is mostly no longer used – for good reason. The drawing module also doesn't support the much more powerful PGF/TikZ for PDF output.

Functions

RTextDoc supports several structured formats apart from LaTeX, including the AsciiDoc [4] markup language that, unlike SGML or DocBook, avoids cryptic structures, which makes source documents more readable. LaTeX can be considered more of a back end in this context in that it implements much broader structures. In fact, LaTeX recognizes many more lists, tables, and figure types than other markup languages. The same goes for math structures, such as complex formulas and their symbols.

A major strength of structured texts lies in automatic syntax checking, which RTextDoc also supports according to its own description. However, weaknesses show up even when structures are added. LaTeX makes extensive use of curly brackets that group text sections and separate arguments from commands. RTextDoc provides a way to show paired brackets, but not for those added directly by the user, which would require using a special macros in JavaScript or some other similar language.

RTextDoc was developed, according to sources, with the needs of professional LaTeX writers in mind, which is why the editor had to be designed for unknown structures to exist in the code. In practice, however, the program fails in this task. New structures can be added in principle for the folding mechanism, but the documentation is silent about how this actually works. The default editor allowed toggling the folding of source code only in the LaTeX environment.

The search and replace function doesn't have a mechanism for skipping over hits. You either need to replace all hits or manage every single occurrence individually.

Spelling and Grammar

The editor integrates the LibreOffice- and OpenOffice-based LanguageTool for spelling and grammar checking. To configure it, use the following command:

$ java -jar languagetool-standalone.jar

Many distributions provide a script named languagetool that controls configuration and startup. The option settings determine what the program recognizes as errors. Unfortunately, RTextDoc currently doesn't let you set the language manually, which is a limitation for some languages.

Conclusion

RTextDoc lags significantly behind in fulfilling the promises of its developers. Even simple functions are often inadequately implemented, with complex features such as vertical editing falling completely flat.

With a price of $20, it is certainly not expensive software. However, because the free RText editor is lurking behind RTextDoc, which the developers have extended with some not so well-integrated functions, you may want to spend your cash elsewhere or use it to support a free software crowdfunding project. l

Table 1

One Program, Two Versions

Function Demo Version Full Version
Spell-checker + +
Languages English 42 per download
Grammar-checker +
Syntax highlighting + +
Bookmarks + +
Folding text + +
Line numbers + +
Bracket pair testing + +
Text formatting + +
BibTeX checking +
WYSIWYG for equations +
Integration in existing LaTeX environments +
LaTeX error checking +
LaTeX tools +
LaTeX structures +
Previews (PDF) +
Previews (Bibtex) +
PdfLaTeX support +
PDF viewer +
LaTeX-to-HTML-to-LaTeX + +
AsciiDoc-to-HTML +
AsciiDoc-to-DocBook +
AsciiDoc-to-PDF +
Automatic updates +
Support and documentation +