About the new features in LyX 2.0.

What is new in LyX 2.0?



The LyX Team



September 2012



Look Tommaso Cucinotta has contributed a very much desired feature: Searching with format consideration. With this tool, you can insert everything in the search bar that can be inserted into the LyX window: formatted characters, math, insets, etc. On top of it regular expressions can be used as well. You can also replace existing text with formatted text, including searching for mathematics and replacing with mathematics. Finally, you can also search for paragraph styles.Look here for more information including some screen casts.



The feature's implementation was sponsored by a group of LyX users. Of course, it can be toggled on and off in the preferences.

... provide the two documents that you want to compare, and LyX now creates a new document that highlights the changes. The feature's implementation was sponsored by a group of LyX users.

MyThes thesaurus library, which has been included into LyX itself. Since MyThes is what OpenOffice uses, LyX can now deal with OpenOffice thesauri, which exist in many languages.

LyX has long supported "formatted" cross-references, where a reference to a chapter, say, can automatically be rendered as "Chapter 3". Support for this, in LaTeX, has been provided by the prettyref package. Unfortunately, however, prettyref provides no support for internationalization of references, so non-English users have largely been shut out. (There were also some conflicts between prettyref and babel.)

After much discussion among users and developers, Richard Heck has added the ability to use the refstyle package, instead. This is controlled by a selection under Document→Settings→Document Class. It is enabled by default for new documents, but older documents will, by default, use prettyref, so that existing

ewrefformat definitions will not have to be changed. Users are encouraged, however, to switch to refstyle, if it does not cause too much of a headache, especially because prettyref support should be regarded as "deprecated", meaning that it may be phased out.

Converting

ewrefformat declarations is easy. If you have something like



ewrefformat{for}{...LaTeX here...}

you need only replace it with:



ewref{for}{refcmd = {...LaTeX here...}}

Note, however, that you should not use capitalized label prefixes with refstyle, e.g., "For:label" instead of "for:label". This is because refstyle automatically lowercases the

ewref argument, so that

ewref{For} has the same effect as

ewref{for}. LyX knows nothing about this, and it will lead to errors.



You can define (an unlimited list of) additional indices (e.g., an "Index of Names") in the Document Settings dialog.

This feature uses Markus Kohm's splitindex package, which is included in the major LaTeX distributions.

XeTeX typesetting system. XeTeX is an alternative processor to LaTeX that aims at supporting a broad range of scripts (via direct Unicode support) and fonts. For instance, with XeTeX you directly use one of your system fonts – specific LaTeX font handling is not needed anymore.

The XeTex support also includes polyglossia support. That is to say, LyX uses XeTeX's new language interface instead of the babel package, given that the polyglossia package is installed and given that your language(s) are already supported by polyglossia.

LuaTeX typesetting system. LuaTeX, deriving from the well-known PDFTeX, is another new, alternative processor to LaTeX that aims at supporting a broad range of scripts (via direct Unicode support) and fonts. Like with XeTeX, you directly use one of your system fonts – specific LaTeX font handling is not needed anymore.

LuaTeX is a rather new project, it's not yet as mature as XeTeX and not yet really stable (although already usable). Thus, our LuaTeX backend is also still to be considered experimental. We provide it particularly for those who want to give LuaTeX a first try.

Richard Heck has given LyX the ability to output XHTML without relying upon any external converter, such as tex4ht or eLyXer. At present, the implementation is not completely finished and should be regarded as experimental. Some more complex constructs (glossaries and external material, for example) do not work at all, and some of the more complicated math stuff doesn't quite work. But most LyX documents (such as the User Guide) can be output very nicely.

The generated HTML and CSS can be controlled through layout files and, in many cases, the CSS is automatically generated by LyX, to match the appearance on the screen.

Math can be output in four different forms.

MathML, which looks great in browsers that support it, but isn't universally supported.

HTML, which is universally supported, but works well only for quite simple formulas.

Images, which are very precise, since they are generated by LaTeX, but can be fiddly, don't scale well, and can't be cut and pasted, etc.

LaTeX, for use with such things as jsMath.

LyX falls back automatically from e.g. MathML to an image, if it can't manage to produce the MathML.

More information is available in the Additional Features manual.

The way documents are output can now be controlled better:

Preferences ) and on a per-document-level (in Document→Settings ).

) and on a per-document-level (in ).







\includeonly , which allows you to exclude child documents from the output, is one of the few preamble commands that cannot be used verbatim in LyX's preamble, due to LyX's specific file name handling.

To overcome this limitation, Jürgen Spitzmüller implemented native \includeonly support. You can select a subset of child documents which will be included in the final output, while the others are omitted. If you wish, LyX even assures that the page numbers and the references to non-included children are maintained. The LaTeX command, which allows you to exclude child documents from the output, is one of the few preamble commands that cannot be used verbatim in LyX's preamble, due to LyX's specific file name handling.To overcome this limitation, Jürgen Spitzmüller implemented native \includeonly support. You can select a subset of child documents which will be included in the final output, while the others are omitted. If you wish, LyX even assures that the page numbers and the references to non-included children are maintained.

Document→Settings . One can think of this pane as providing an "included" layout file that is specific to the document. This is useful for defining environments or character styles that you only need for the one document, which would make a module overkill. It can also be useful for testing new ideas before committing them to a module. This should be used with care. It is not a good idea to mess with a layout when you are actually working on a document.

\textsuperscript and \textsubscript , so you do not have any longer to misuse math mode or ERT in order to produce a super- or subscript in Text.

and , so you do not have any longer to misuse math mode or ERT in order to produce a super- or subscript in Text. \phantom , \hphantom , and \vphantom via the phantom inset. This inset is used to insert space with exactly the dimension of the inset's content. The content can be formatted and can consist of text and/or formulas.

, , and via the phantom inset. This inset is used to insert space with exactly the dimension of the inset's content. The content can be formatted and can consist of text and/or formulas. Pavel Sanda added support for the LaTeX-package ulem . This way new character styles are available in the Text Style dialog in the field Misc: strikeout \sout (now bound to C+S+O), double underline \uuline and wavy underline \uwave . Also handling of the underlined text has been moved to ulem, so that underlined text can be broken across the lines.

. This way new character styles are available in the Text Style dialog in the field Misc: strikeout (now bound to C+S+O), double underline and wavy underline . Also handling of the underlined text has been moved to ulem, so that underlined text can be broken across the lines. \makebox using the box dialog; implemented by Uwe Stöhr.

using the box dialog; implemented by Uwe Stöhr.

ameref ) via the reference dialog. A named reference gives you the name of the referenced text part instead of its number.

) via the reference dialog. A named reference gives you the name of the referenced text part instead of its number. \mathscr ).

). Insert → Formatting → Horizontal Line are now customizable (LaTeX command \rule ): The vertical offset, the width and length of the line can be specified. The color of the line can be set like for text using the text style dialog.

are now customizable (LaTeX command ): The vertical offset, the width and length of the line can be specified. The color of the line can be set like for text using the text style dialog. \Diagram in the package "feyn").

in the package "feyn"). \iddots . It also supports the LaTeX-package mathdots via the menu Document → Settings → Math Options .

Support for Swiss German has been added by Jürgen Spitzmüller. This is not yet supported natively by LaTeX (i.e., no babel support, no specific hyphenation patterns), but at least spell checking and thesaurus use the variant-specific dictionaries now.

Support for the applemac (Macintosh Roman) encoding has been added.

Support for the language Turkmen was implemented by Uwe Stöhr.

you can now specify that (selected) active branch names are appended to the output file name; so if you have a file myfile with a branch comments, you can tell LyX to export the file as myfile-comments.pdf if that branch is active. branches can be activated and deactivated easily via context menu new branches can be directly inserted via the menu branches can be renamed and merged the document dialog now also lists undefined branches used in the document. Those can be added to the list of defined branches with one click. when pasting from another LyX document, LyX now checks if the pasted content contains unknown branches. Those will be added to the list of defined branches after user confirmation.



The table handling was improved by Vincent van Ravesteijn, Uwe Stöhr, Edwin Leuven and Abdelrazak Younes:

Uwe Stöhr implemented some new size features.

It is now possible to specify the paragraph indentation in the document dialog.

LyX supports now also the following paper sizes: A0, A1, A2, A6, B0, B1, B2, B6, the ISO C-series and the JIS B-series

Relative lengths like "10 textheight%" can now be used for the paragraph skip separation in the document dialog the horizontal space dialog the vertical space dialog

As result of the joint effort with Jürgen Spitzmüller it is now possible to use lengths with a specified range in the horizontal space dialog. Such a length is specified by inserting for example "5col%+1mm-2mm" in the text field of the dialog. For the vertical space dialog this feature was already available.

Peter Kümmel and Pavel Sanda added new debugging pane, which can be used to inspect various stages of latex compilation, debugging messages, output of external programs like subversion etc.

Document → Settings → Colors you can now set Uwe Stöhr added the feature to specify document-dependent color settings. In the menuyou can now set

a page background color for the whole document

a text color for the whole document

the background color of shaded boxes

the text color inside greyed-out notes

Tools→Preferences→Look & Feel→Colors . Jean-Marc Lasgouttes changed LyX's default color handling. LyX is now able to use the base colors of your operating system or window manager so that LyX will look like any other installed program on your system. You can enable this by using the option Use system colors in the menu

preview . Such an inset is inserted via the menu Insert→Preview Vincent van Ravesteijn introduced a long time requested feature - an instant preview inset, i.e. the possibility to have online preview for snippets of any LyX code, which is supported by the LaTeX package. Such an inset is inserted via the menu

LyX already supports inverse search - i.e. searching from the particular location of the generated .DVI/.PDF file to the correct row inside LyX document. Pavel Sanda and Enrico Forestieri added support for forward search - i.e. direct jump from particular row in your LyX document to the .DVI/.PDF document. Adding LaTeX macros to enable both forward and reverse search is now easily reachable inside user interface. Read the Additional Features manual for details.

LyX has long supported optional arguments to paragraph styles, through the Insert → Short Title menu entry. Thus, LyX can generate LaTeX like:

\section[Short Title]{This Would Be a Short Title If It Weren't So Long}

and one can have as many optional arguments as one likes. As of LyX 2.0, LyX also supports required arguments, so that LyX can generated LaTeX like:

\begin{block}{Title of Block}

This is the contents of the block.

\end{block}

Required arguments are entered using Insert → Short Title, as well. It is possible to mix optional and required arguments, too, though the optional arguments must precede the required ones. (Think here in terms of how the LaTeX commands

ewcommand and

ewenvironment allow for optional arguments.)

During the 2.0 development the support of SVN (<1.7) version tracking was enhanced by Pavel Sanda. Some of the features were backported to the latter versions of LyX 1.6.x (updating whole repositories, write-locking for the files), some are present only inside 2.0 - in particular:

Both features work to some extent with RCS too. Read Additional manual for further information.

The support of version tracking with CVS has been brought to a similar level by Stephan Witt.

It is now possible to create modules that generalize the existing Noweb literate programming support.

literate-xxx classes have been removed. New module for Noweb support allows to do literate programming in any latex document class. The olderclasses have been removed.

The R tool Sweave can be used out of the box with any document class using the sweave module.

lilypond-book module, by direct entry of LilyPond markup in LyX's window and processing through lilypond-book→(pdf)latex. In combination with the new lilypond.lyx . (implemented by Julien Rioux) LyX now supports LilyPond music notation with themodule, by direct entry of LilyPond markup in LyX's window and processing through lilypond-book→(pdf)latex. In combination with the new preview inset , you can view the score directly in the LyX window. For more information see LyX's example file. (implemented by Julien Rioux)

The format of the file that stores user preferences has always changed with major releases, but there has been no way to convert older preference files to the newer format. As a result, users have often seen strange errors and have had to remove their old preference files manually, losing many customizations. The same is true of bind files, which can become non-functional due to changes in the syntax used to call LyX functions, and similarly of customized versions of ui files. This is in contrast with the transparent way LyX converts older LyX files to the new format, using the lyx2lyx script, and converts older layout files and modules to the new format, using the layout2layout script.

LyX 2.0 will feature a sets of prefs2prefs scripts that convert preference, ui, and bind transparently, too. As with lyx2lyx and layout2layout, the script will not change the user's file on disk, but performs the conversion in the temporary directory. Users are encouraged, however, to run the prefs2prefs script manually to convert older files to the new format, since doing the conversion every time will slow LyX's start-up. The prefs2prefs script can be found at $LYXDIR/scripts/prefs2prefs.py. Running the script with no arguments will print usage information.

Users sometimes need to be able to "bundle" a LyX file together with all the images, and other files, on which it depends, either for sending to a publisher or for sharing with a co-author. LyX 2.0 includes a script, written by Enrico Forestieri, that automates this process. To use it, you must have either zip or tar installed on your system. At present, the script prefers tar and, if it is available, then it will compress the archive using gzip or bunzip2, preferring gzip. If the appropriate program is available, then LyX's configuration process will set the script up to export a "LyX Archive", and it will be available under File>Export.

Custom Header/Footerlines .

. Initials .

. fixltx2e module which simply loads the LaTeX-package fixltx2e.sty .

module which simply loads the LaTeX-package . new modules for more fine-grained control over theorem numbering, named theorems module.

modules to do equation/figure/table numbering sectionwise.

enumitem module for customizing the lists.

Many people contributed to the new available icon themes. Oxygen and LibreOffice icon themes were taken and tweaked for the particular needs of LyX UI.

LyX has now a template to write bachelor/master/Ph.D. theses (created by Uwe Stöhr)

Thanks to Georg Baum the names of math environments like "Claim" are now automatically translated in the output. It follows that if you use document set to non-english language the translations of math environments (and some specific floats from modules) can change in LyX 2.0 for your document.

Thanks to Vincent van Ravesteijn scrolling below the document end is now possible.





Jürgen Spitzmüller implemented UI localization for numbers (decimal sign).







The LaTeX Log dialog now also displays the BibTeX and MakeIndex logs (implemented by Jürgen Spitzmüller).

LyX is not dead any more while typesetting a huge document (implemented by Peter Kümmel).



LyX on Mac OS X now can use the native spell checker engine from Apple (implemented by Stephan Witt).

The spell checker dialog provides the possibility to switch the language while checking (implemented by Jürgen Spitzmüller).



The language can now be switched more easily (via menu or context menu) in multilingual documents.

The cross-reference dialog has a search and grouping facility (implemented by Jürgen Spitzmüller).

Thanks to Richard Heck LyX is no longer unusable if its configuration might be interrupted.

Double clicking in the empty area of the tab bar now creates a new buffer (implemented by Edwin Leuven)

A checkbox in the keyboard preferences now allows Mac users to swap Control and Meta keys (useful for emacs keybindings).



The View Source widget now uses the default output format instead of one of two hard-coded formats and provides the option to select from other output formats as well.

spreadsheets.lyx . (implemented by Helge Hafting)

. (implemented by Helge Hafting)

Jean-Marc Lasgouttes reworked the insets architecture.

John McCabe-Dansted contributed the system for automatic discovering of crashes.

Lot of work for better tex2lyx conversion has been done by Georg Baum.

Uwe Stöhr took the job of keeping the LyX documentation up-to-date.

Many new features have been backported to the 1.6.x stable branch during the 2.0.0 cycle, you can find the list here.

Although new features are primarily developed in the development branch ("trunk"), few of them were backported to the 2.0.x branch:

new environment variable TEXINPUTS, see the LyX 2.0.1 announcement for detailed info. (2.0.1)

LyX has now a menu entry Edit→Select Whole Inset . (2.0.2)

. (2.0.2) Improved creation of a LyX archive. Also files referenced in TeX-code in the document (e.g. via \input or \insertgraphics ) are now included in the archive. (2.0.2)

or ) are now included in the archive. (2.0.2) tex2lyx produces now the fileformat of LyX 2.0.x and supports things like, rotated floats, wrap- and subfloats, hyperlinks. See the LyX 2.0.2 and 2.0.3 announcement for detailed info. (2.0.2 and 2.0.3)

LyX now supports to spell check only the current selection. (2.0.5)

Categories