<< | Page list | >>
About the new features in LyX 2.4.
What is new in LyX 2.4?
The LyX Team
DocBook 5 support
LyX 2.4 brings a rewritten support for DocBook, updated for DocBook 5. Most notably, all LyX documents can be output as DocBook, using a specific layout is no more required. This feature is implemented to work properly with most books and articles; support for Beamer may appear at a later stage; output from posters is likely to be useless.
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.
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:
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.
- 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.
- Math operators like \sum are now bigger in display style.
- Superscripts and subscripts in text mode are now displayed correctly in a smaller size and the spurious spacing around them has been removed.
- Italic font at the cursor position is now indicated by a slanted the caret.
- Lines of text are now correctly broken on screen after insets (spaces, hyphenation points...) which allow line breaking.
- 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). Note that this has been backported to 2.3.1.
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:
One powerful feature of LaTeX is its ability to manage counters. Mostly, this is handled automatically, but there are times one wants to modify counters directly. This has always been possible via ERT, but the new counter inset allows one to set a counter's value; to reset it (to zero); to add to the value (or subtract from it, since the value added can be negative); to save it; to restore the saved value; and to print the value. These effects can also be limited to LyX itself. And they will appear in HTML and DocBook output, as well as in LaTeX. You can find the new feature via Edit→Manage Counter Values.
Improved detection of broken citations and cross references
Cross references to non-existing (deleted) labels, citations to non-existing bibliographic references or inclusion of non-existing files can now be detected more easily per different measures:
- They are now colored in the workarea
- There is a dedicated outliner entry "Broken References and Citations" that collects all broken refs and lets you navigate to them quickly
- You get an error message if you want to output the document (you can still view it, but you have been warned)
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.
Change tracking improvements
- Change bars (for change tracking) can now be set from Document→Settings...→Change Tracking. The changebars module has been removed.
- LyX now has a preference setting to toggle underlining of added text (in change tracking mode) in the workarea.
- LyX now has a preference setting to maintain markup on copy/paste.
- Deleted graphics and floats are now marked in the output.
- The addition and deletion of tabular columns and rows is now properly tracked.
- Many long-standing deficiencies in the change tracking output have been fixed.
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).
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.
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).
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.
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.
- 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.
- 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.
- 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.
- AMS' \medspace and \thickspace (text mode spaces that accompany the respective math spaces) are now supported via the space inset.
- \nopagebreak which suppresses page breaks at the requested position has now its own inset which can be inserted via Insert→Formatting→No Page Break
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 preferences settings
- The new option Look and Feel→Display→Underline change tracking additions lets you disable the underlining of tracked insertions in the LyX workarea.
- The new option Editing→Control→Keep change tracking markup on copy and paste is for users who don't want tracked changes to be dissolved on copy and paste operations (i.e., inserted as new text with the deletions removed). If this is checked, the change-tracked text will be copied and pasted as is, independent if changes are currently tracked or not. This also applies to wrapping to/dissolving from insets.
- 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.
- LyX now automatically adds the appropriate language and codepage option to the Xindy index processor command.
- Makeindex and xindy errors are now reported in LyX's error dialog.
- The xindex index processor is now supported as well.
- The merging of non-default/plain layouts with different layouts is allowed, for example, a numbered list directly below an itemized list by pressing backspace at the first position of the latter layout.
- Opening the Library and User Directory is possible directly from the About dialog.
- Hyperlink inset now allows viewing entered URL via context menu.
- Citation inset now allows viewing the cited material (URL/PDF file) if a target link is provided or (optionally) if the file can be found on your disk. See User Guide, section "Opening cited documents from within LyX".
- The switching of font properties for certain insets (esp. tables and insets with multiple paragraphs) has been improved as far as the LaTeX output is concerned. This allowed us to address some longstanding bugs in this area.
- 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.
- The performance of compiling multi-part documents with only a subset of children included while maintaining counters and references has been improved.
- LyX now uses the parskip package to add vertical separation between paragraphs. This has the advantage that only paragraph separation is really affected, not separation in TOC and lists. For backwards compatibility reasons, old documents keep the previous settings, but we move them into the user preamble.
- 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.
- The dialogs adapt better to your OS/Desktop environment (e.g., order of OK/Apply/Cancel buttons).
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)
- The Libertinus family of fonts (including Libertinus Math).
- 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 Russian Federation" that focus on Cyrillic but also contain Latin letters).
- Adobe's Source Code Pro, Source Sans Pro, and Source Serif Pro
- 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
- Afrikaans (Polyglossia; Babel already supported)
- Azerbaijani (Babel only)
- Belarusian (Polyglossia; Babel already supported)
- Bengali (Polyglossia only)
- Bosnian (Polyglossia; Babel already supported)
- Church Slavonic (Polyglossia only)
- English (Canada) (Polyglossia; Babel already supported)
- French (Canada) (Polyglossia; Babel already supported)
- Georgian (Polyglossia; Babel already supported)
- Kurdish (Kurmanji) (Polyglossia; Babel already supported)
- Macedonian (Polyglossia; Babel already supported)
- Malayalam (Polyglossia only)
- Mongolian (Polyglossia; Babel already supported)
- Russian (Petrine orthography) (Polyglossia only)
- New Russian translation of UserGuide, Additional, Math, Beamer, and XY-pic manuals.
Under the hood
New or changed LFUNs
The following functions have been added:
buffer-reset-export advises LyX to remove the auxiliary files before doing the next export.
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.
ifrelatives is a helper function to check whether a buffer has a master or children.
master-buffer-forall executes an lfun in the master and all children of a document.
paragraph-select is a new convenience function to select the paragraph surrounding the actual cursor position.
tabular-style-insert inserts a table in a specified style.
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
set-graphics-group was renamed to
info-insert buffer vcs-* was renamed to
info-insert vcs *
The following functions have been removed:
date-insert: this function has been superseded
Full Release notes
The full Release notes can be found in lib/RELEASE-NOTES file.