Go to page:

Search:   Help



LyX documentation


Shared groups


LyX /

New in LyX 2.4

Categories: Development, LyX_2_4
<< | Page list | >>

About the new features in LyX 2.4.

What is new in LyX 2.4?

The LyX Team

August 2019

§ New features brought by the new file format

Unicode is now default everywhere

LyX has been using Unicode (utf8) internally for a long time now. Unicode has also been used with the "modern" TeX engines (XeTeX, LuaTeX) by default. As of LyX 2.4, with LaTeX itself having switched to utf8 as default in 2018, LyX now also uses utf8 encoding per default in classic (pdf)latex ("per default" certainly means that the traditional encodings are still available and can still be made selected automatically).

Note that this does not affect existing documents (which are left untouched). Note also that LyX also does not touch personal defaults and templates. That is to say, if you still see traditional encoding preset for new documents, you can change that in Document→Settings...→Language by selecting "Unicode (utf8) [default]" and hitting "Save as Documents Defaults" afterwards. Your personal templates need to be changed manually if desired.

§ Table styles

LyX now provides several table styles from which you can select when inserting a table. For instance you can now select, either locally in the Insert→Table dialog or globally in Document→Settings...→Text Layout, that newly inserted tables automatically use the "formal" (a.k.a. booktabs) style, a simple grid style, or no border lines at all. A style pre-selection can also be made in the layout file. You can even define new styles, which is as simple as creating three LyX documents, each containing a table in your style (with one, two, and three rows, respectively).

§ Variable table column width

LyX now features a "variable" table column width that makes the column automatically expand to match the specified table width (this feature uses the tabularx package for single-page and the xltabular package for multi-page tables)

§ Less constraints in standard table columns

LyX now allows paragraph and line breaks as well as layout changes in non-fixed width table columns. Internally, the column type "V" provided by the varwidth package is used for this purpose.

§ Trimming of formal table's midrules

Formal tables often use disconnected midrules to indicate grouping of columns (the booktabs package that is used for formal tables supports this by means of the (l) and (r) arguments to \cmidrule). LyX now supports this as well:


§ Float alignment

It has been requested by many users to be able to globally specify an alignment for all float contents. This is now possible. The default alignment of floats contents can now be set in Document→Settings...→Float Settings and locally modified in the Float Settings dialog:


§ Flexible text fields

LyX since long had a rather crude Insert→Date function that inserted a static date formatted via the strftime programm. Its usability was rather limited. To improve this, LyX 2.4 introduces the concept of "Fields" known from word processors. Most notably, it features different date and time formats which adapt to the context language. Besides these, some other information types such as file name, user name/email and version control information are available as well (next to types that are mostly relevant to developers and used in the LyX manuals, such as LaTeX package availability, LyX function shortcuts etc.; this latter information has been available for a long time, but its use was all but transparent).


§ List/Bibliography preambles

Via Insert→List Preamble or Insert→Bibliography Preamble, you can now insert LaTeX code between the beginning of a list or bibliography environment and the first item. This is helpful if you want to redefine counters or lengths, something that was hitherto only possible via ugly hacks in LyX.

§ Bibliography encoding

The bibliography databases can now have a different encoding than the LyX file (you can specify the divergent encoding in the BibTeX/BiblaTeX dialog). With Biblatex, it is even possible to mix bib files with divergent encoding (this requires Biblatex 3.12 at least).

§ Fonts

New natively supported (LaTeX) fonts:

  • Cantarell (the sans serif font used by the GNOME desktop)
  • Extended Bitstream Charter (serif) fonts via the XCharter LaTeX package.
  • Chivo (sans serif)
  • Crimson Pro (serif), an extended redesign of Sebastian Kosch's (already supported) Crimson font by Jacques Le Bailly
  • DejaVu Serif, Sans, and Mono (also Condensed)
  • Fira Sans and Mono (in all available series)
  • Noto Serif, Sans, and Mono in all available series (Regular, Medium, Thin, Light, Extralight)
  • IBM's Plex Serif, Sans, and Mono
  • ParaType's PT Serif, Sans, and Mono ("Public Types of Rus­sian Fed­er­a­tion" that focus on Cyrillic but also contain Latin letters).
  • Adobe's Source Code Pro, Source Sans Pro, and Source Serif Pro

General enhancements:

  • Support for babel with non-TeX fonts has been enhanced (LyX now supports babel's \babelfont font loading interface if babel >= 3.15 is available).
  • It is now possible to enter additional options to font packages (or fontspec) via Document→Settings...→Fonts for selected fonts.
  • It is now possible to select "Old style figures" for Sans Serif and Typewriter fonts (separately), if this feature is provided by the respective font.

§ New supported document languages

  • Azerbaijani (Babel only)
  • Bengali (Polyglossia only)
  • Church Slavonic (Polyglossia only)
  • English (Canada) (Polyglossia; Babel already supported)
  • French (Canada) (Polyglossia; Babel already supported)
  • Malayalam (Polyglossia only)
  • Russian (Petrine orthography) (Polyglossia only)

§ Layout enhancements

  • The Memoir and KOMA layouts now support more paper sizes natively
  • The KOMA layouts now support more font sizes natively
  • Memoir now supports endnotes (pagenotes) natively.

§ Module enhancements

  • The support for linguistic glosses has been completely rewritten. LyX now uses the new and enhanced \digloss and \trigloss macros of covington rather than self-baked ones. The new macros are more stable and customizable. However, LyX now requires at least covington 2.3.
  • The Linguistics module now supports Discourse Representation Structures.
  • The Endnotes and Footnotes as Endnotes modules now natively support list of endnotes (via Insert→List/Contents/References→Endnotes). The header is now possibly translated to the current language.
  • The Footnotes as Endnotes module now really outputs endnotes rather than redefining footnotes.

§ New supported LaTeX commands

  • Support for the landscape environment of the [pdf]lscape packages has been added in form of the new Landscape module.
  • The markup commands of the soul package (\caps, \hl, \so, \st, \ul) is now supported by the Hyphenatable Text Markup (Soul) module
  • The Endnotes (Extended) and Footnotes as Endnotes (Extended) modules have been added. They support alternative ways to produce endnotes via the enotez package.

§ Line numbering in the output

It is possible to add line numbers in your typeset document via Document→Settings→Numbering & TOC→Line numbering. The lineno package is used in the background; its basic parameters can be passed through the accompanying Options widget.

§ Miscellaneous

  • With biblatex, it is now possible to refer to the same entry multiple times (with different pre- or postnotes)
  • The possibility to switch between raw LaTeX input and formatted input in some dialog widgets has been extended to included listing's captions.

§ General improvements (file format independent)

§ User Interface improvements

New Templates/Examples dialog

  • LyX 2.4 introduces a new dialog to access templates and example files (via File→New From Template... and File→Open Example..., respectively). This dialog lists those files in a transparent, structured way. It includes also examples and templates from the user directory (which have been hard to access with the native file dialog).
The example and template names are also more explanatory, and they are translated to the GUI language.
Furthermore, it is now easier to store new template files through the new menu item File→Save As Template..., which will guide you to the appropriate location in your user directory.

Redesigned Text Properties dialog

  • The Text Properties dialog, which has been very badly designed and thus subject to many bug reports and irritations, has been completely reworked and now looks and behaves more like users expect. Particularly the "toggling" behavior that irritated so many users has been dropped:
Furthermore, there is now an option to exclude text passages from spellchecking.

Redesigned Bib(la)TeX dialog

  • The Bib(la)tex settings dialog has undergone a major redesign as well. It now displays available and selected bibliography databases in one place, and has gained some new functionality (such as encoding selection, external editing of individual databases, and a filter for quick selection in large lists)

Redesigned Module selection dialog

  • The module selection in Document→Settings...→Modules now displays the available modules sorted by categories. This should make it easier to locate modules for specific tasks.
The information display has been improved.
Furthermore, there is now a filter for quick search of modules both by GUI name and module (file) name.

General dialog improvements

  • The dialogs adapt better to your OS/Desktop environment (e.g., order of OK/Apply/Cancel buttons).

Edit menu changes

  • The items on the Edit menu have been reordered, and many of the shortcuts have been changed so that they are more intuitive in the case of often used items. We understand that this may frustrate some users and apologize, while noting that menu shortcuts can always be customized by copying the stdmenus.inc file to the ui/ sub-directory of the user directory and editing it.

Toolbar extensions

  • The "Apply recent text properties" and "Paste" toolbar buttons now provide a history (and thus let you apply more than just the most recent thing).
    The "Apply recent text properties" button furthermore provides an option to reset all font settings to the default value with one click:
  • Both Custom Character Styles and Custom Insets can now be directly selected from the toolbar.
  • The icons that imply a text direction are now inverted when text is typeset right-to-left.

Further enhancements to the user experience

  • Collapsible insets can now be edited externally. This is enabled by the EditExternal inset layout tag. By default, Chunks and ERT can be so edited.
  • Clicking on an 'include' inset with the control key held down now opens the included file for editing, without having to go via the settings dialog.
  • The use of author-year citations (natbib) with the bibliography environment (rather than BibTeX) is now much more straightforward.

§ Display

  • Math equations numbers are now drawn outside of the inset, which makes them properly centered and easier to edit. In particular, an empty line can be added to accommodate long labels, similar to what LaTeX does when typesetting.
  • Superscripts and subscripts in text mode are now displayed correctly in a smaller size.
  • §The improvements to the "painter" (display of text and things in the LyX work area) have continued in this cycle, in particular by respecting better Qt's paint events. This leads to smoother editing, and enables smoother fonts on Linux (sub pixel aliasing).

Cancel Background Export

  • Since LyX 2.0, LyX has exported files in the background, allowing the user to continue working while the file is compiled. It has not been possible, however, to terminate such a process, except by killing it (or LyX) through the operating system. As of LyX 2.4, this is possible. When a file is exported, a new menu entry, "Cancel Background Process", appears on the Document menu: Selecting it will indeed cancel the export process. This can also be done by clicking on the 'spinner' that appears in the status bar when a file is being exported in the background.

§ Better Handling of Special Cases

  • LyX now has basic support for the cprotect package. This means that "verbatim" input can be used now at places where a LaTeX error would have occurred previously, such as verbatim paragraphs in frame boxes, URLs with characters such as '#' or '%' in section headings or footnotes or comment insets in captions, which allows us to resolve some really old bug reports.

§ New or changed LFUNs

The following functions have been added:

  • paragraph-select is a new convenience function to select the paragraph surrounding the actual cursor position.
  • buffer-write-as-template is a convenience function to ease saving a document in the (personal) templates folder.
  • export-cancel is used to cancel background export processes.
  • tabular-style-insert inserts a table in a specified style.
  • bidi is a helper function to implement icons that are different between LTR and RTL text.

The following functions have been changed:

  • file-insert: optional second parameter ignorelang to make the insertion ignore the inserted file's main language (and rather adapt it to the insertion context's language).
  • set-graphics-group was renamed to graphics-set-group.
  • info-insert buffer vcs-* was renamed to info-insert vcs *

The following functions have been removed:

  • date-insert: this function has been superseded info-insert date.

§ Miscellaneous

  • Advanced find has undergone significant improvements, most notably performance-wise (speedup) and with regard to searching while respecting the formatting.
  • The support for some languages has been further improved (this particularly concerns right-to-left languages and languages with non-latin script)
  • The math auto correction feature has been improved: the substitution can depend on more than two characters, can be undone and does not need anymore to be enabled using the ! key.
  • The default decimal separator (used in the tabular dialog for decimal separator alignment) is now language-sensitive.

§ Under the hood

§ Backported


Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2019-08-26 09:09 CEST