|
|
Subscribe / Log in / New account

Development

A look at LyX 2.0

November 24, 2010

This article was contributed by Joe 'Zonker' Brockmeier.

The LyX project has been quietly, but effectively, hammering away at a major update to its document processing program for about two years. On November 10, the LyX project unveiled the first beta for LyX 2.0. With better revision control, document previews, and new support for many LaTeX commands, LyX 2.0 is shaping up very nicely.

For the uninitiated, LyX is a multi-platform "document processor," essentially a front-end for editing TeX/LaTeX documents without having to muck with the actual TeX/LaTeX markup. At least, not unless one wants to fiddle with the markup. LyX does make it possible to insert TeX/LaTeX markup, but you don't generally need to.

[LyX navigation menu]

The difference between LyX and, say, LibreOffice Writer or Microsoft Word goes beyond the document format on the backend. LyX doesn't attempt to render documents in a "What You See Is What You Get" (WYSIWYG) style. Instead, the LyX motto is "What You See Is What You Mean" (WYSIWYM). LyX presents the structure of the document instead of the exact presentation. One reason for that is that the LyX folks want users to focus on the writing rather than bit-twiddling the presentation. Another is that LyX can export to a number of formats (PDF, HTML, plain text, etc.) and the presentation is going to change depending on the stylesheet and target format.

Though LyX works differently than Word or Writer, it has many of the features that users would like to have. For instance, LyX has spell checking, version tracking, and even revision control. It can produce simple documents, or entire books with beautifully (thanks to TeX/LaTeX) rendered equations.

Looking at 2.0

Binaries haven't shown up for LyX 2.0 yet, but there's very little difficulty in compiling from source. For users who want to test LyX 2.0 alongside an existing 1.6.x release, there are two options. One is to run LyX from the src directory after compiling, the other is to use the --with-version-suffix option when running ./configure.

After compiling LyX 2.0 beta I set about creating a few documents and testing some of the new features listed for 2.0. From the limited testing I've done this week, the first LyX 2.0 beta seems stable enough to use for day-to-day work. One word of caution, though, for those who wish to test out 2.0: the document format seems to be backward-incompatible with 1.6.x. When trying to open a document created in 2.0, LyX 1.6.7 complained about being unable to convert the format.

Major New Features

At first glance, there's not an enormous difference between LyX 1.6.x and 2.0. Open LyX 2.0 and 1.6.7 side by side and it's difficult to tell them apart. But the two years of LyX development have generated quite a few major and minor new features.

The idea is that the formatting of LyX documents is set by the document type. For instance, the layout of a presentation is set by the Beamer class. If you want to change those things, you make changes in the class, not the document itself. It's been possible to embed layout information in a LyX document previously, but the 2.0 release adds a way to do this via the "Local Layout" tab under "Document Settings". Now users can easily define specific tweaks to a layout without having to muck with the class itself. Even so, the LyX folks caution that it's "not a good idea to mess with a layout when you are actually working on a document".

Most books or other works include only one index — but some works call for more than one index. For example, in a book discussing the history of the Linux kernel one might want to have an index of names, and an index for features. LyX 2.0 introduces multiple indexes so users can do just that. If more than one index is defined, LyX adds menu entries for each under the "Insert" menu so that users can choose between the relevant indexes, and separate entries to place the target indexes in the document.

LyX has had thesaurus support for some time, but that support has been limited to English. This is, obviously, not terribly useful for much of the world. LyX 2.0 adds support for the MyThes library, which happens to be what OpenOffice.org uses as well. This makes all of the OpenOffice.org thesauri available to LyX 2.0 users as well. Likewise, LyX has had spell check support for some time, but it required running the spell check manually. 2.0 adds support for continual spell checking, though it can be turned off for users who prefer the manual way.

It seems that several of the changes are moving LyX towards being more directly fussy with formatting. A new feature in LyX 2.0 is support for LaTeX commands that were not previously supported in LyX. For example, by adding the "Initials" module (under "Document Settings"), users can define initial caps (where the first letter of a paragraph or section of text is larger than the surrounding text). But it does not automatically set an initial cap for any structure in the document — it adds an "Initial" entry under the menu, which allows users to define initial caps manually. There's also support for several types of new underlines (via the LaTeX ulem package). One addition that seems like it should have been available earlier is the introduction of support for the LaTeX \rule command, which inserts a horizontal line in the document.

For those who wish to typeset songbooks, or just add a bit of musical notation to a document, LyX now supports the Lilypond LaTeX module and can import from Lilypond.

[LyX file comparison]

One of the most interesting additions is the "compare documents" feature. LyX already had version control support and support for tracking changes, but this new feature produces a document that incorporates the changes between two documents and produces output from that. At least in theory. To test the theory I tried comparing the User Guide for 1.6.7 and 2.0 beta. It took about a minute to produce the differences document, which can be viewed in LyX. However, trying to produce output (like a PDF) of that document failed with a spectacular number of errors.

In general, LyX has had dozens of small enhancements for better control over output, document presentation, and support for new types of layout. See the "what's new" document for the full list of new features. Though most are incremental updates, taken together it adds up to quite a major revision.

LyX users who aren't itching to upgrade will be happy to know that many, but not all, of the features new to LyX 2.0 have been backported to the 1.6.8 LyX release that came out on November 15th. The 1.6.8 release is the recommended upgrade for users who want a "solid and polished" version. The LyX project hasn't yet released Linux binaries for 1.6.8, but one can find installers for Windows and Mac OS X if they want or need to use LyX on those platforms.

The release schedule for 2.0 calls for a final release in December. Since the project has hit its targets so far, it seems likely that (barring any major show-stoppers), users will have a stable LyX 2.0 in time for the holidays. Though on the surface LyX 2.0 doesn't look that different, it has a fairly significant set of improvements. What's coming in later versions? There's no roadmap for LyX releases beyond the 2.0.x series, but users can add to the wishlists, which have gotten long enough that they've been broken into two lists roughly lined up by internal features (tools, citing, inline editing) and external (saving, exporting, installing).

Assuming one wants to produce PDF, HTML, or other non-Word and ODF documents, LyX is a top-notch document processor. The 2.0 release is well worth the two years it's taken to produce.

Comments (7 posted)

Brief items

Report from the Buildroot Developer Day, 29th October 2010

Buildroot is "a set of Makefiles and patches that makes it easy to generate a complete embedded Linux system." The Buildroot developers held a meeting at the end of October; Thomas Petazzoni has posted a report from that gathering. "This Developer Day has been very productive in terms of discussion, and for some complicated topics, we know have a better understanding on what should be implemented and how it should be implemented. The participants were all very satisfied of the day spent discussing Buildroot future." (Thanks to Sam Ravnborg).

Full Story (comments: none)

Claws Mail 3.7.7 Unleashed

Version 3.7.7 of the Claws Mail email client is out. Enhancements include command-line searching and an option to add a margin to the compose window so that it's possible to actually read what you've written.

Full Story (comments: none)

Coccinelle 0.2.4 released

Version 0.2.4 of the Coccinelle code transformation tool is out. Improvements include better scripting support, a number of new metavariable types, and more. See this LWN article for an introduction to what can be done with Coccinelle.

Full Story (comments: none)

The state of Mozilla

Mitchell Baker has posted an annual report on the state of the Mozilla project. "The Internet is in a period of dramatic change. We've built the traits we care about -- innovation, opportunity, interoperability, individual control -- into one layer of Internet life through the browser. We also need to build these traits into the new ways people use the browser and the Internet. Three of our largest areas of focus are mobile, 'Open Web Apps' and the social and data sharing aspects of the Web. We're also increasing participation and collaboration with the Mozilla Drumbeat project."

Comments (none posted)

Wayland switching to LGPLv2

The main Wayland libraries will be changing to version 2 of the Lesser GPL (from the MIT license) in the near future. The clients are changing too: "The demo compositor and clients are currently under GPLv2, but I'm changing them to LGPLv2 as well. This is a bit odd on the face of it, but the point of these applications is to prototype new functionality that will eventually migrate into either the client or server wayland libraries or one of the above toolkits. As we move forward and start adding developers, I just want to make sure that that won't be a problem."

Comments (none posted)

Newsletters and articles

Development newsletters from the last week

Comments (none posted)

Comparing MySQL and Postgres 9.0 Replication (TheServerSide)

TheServerSide.com has a comparison of the replication features offered by MySQL and PostgreSQL. "As demonstrated above, there are both feature and functional differences between how MySQL and PostgreSQL implement replication. However, for many general application use cases, either MySQL or PostgreSQL replication will serve just fine; technically speaking, from a functional and performance perspective, it won't matter which solution is chosen. That said, there still are some considerations to keep in mind in deciding between the different offerings."

Comments (9 posted)

Image Processing with OpenGL and Shaders (LinuxJournal)

The Linux Journal has an article on computing with the GPU. "This article discusses using OpenGL shaders to perform image processing. The images are obtained from a device using the Video4Linux 2 (V4L2) interface. Using horsepower from the graphics card to do some of the image processing reduces the load on the CPU and may result in better throughput. The article describes the Glutcam program, which I developed, and the pieces behind it."

Comments (1 posted)

systemd for administrators - killing services

The fourth installment of Lennart Poettering's "systemd for administrators" series has been posted. This installment looks at killing system daemons. "So again, what is so new and fancy about killing services in systemd? Well, for the first time on Linux we can actually properly do that. Previous solutions were always depending on the daemons to actually cooperate to bring down everything they spawned if they themselves terminate. However, usually if you want to use SIGTERM or SIGKILL you are doing that because they actually do not cooperate properly with you."

Comments (99 posted)

Page editor: Jonathan Corbet
Next page: Announcements>>


Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds