Go to page:

Search:   Help

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

LyX /

New in LyX 2.3

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

About the new features in LyX 2.3.

What is new in LyX 2.3?

The LyX Team

July 2017

§ New features brought by the new file format

§ Biblatex support

DocumentedAt long last, LyX 2.3 introduces native support for the state of the art bibliography package, Biblatex. This addresses one of the most frequent user requests.

Biblatex support is not comprehensive in the sense that each and every of the many features of the package is (already) natively supported via the GUI, but is is now possible to

  • select Biblatex alternatively to "Basic", "Jurabib", or "Natbib" in the Document Settings,
  • set bibliography (*.bbx) and citation (*cbx) style files (LyX will propose sensible defaults for author-year and numerical),
  • set arbitrary biblatex package options via a simple line edit widget,
  • set options to the \printbibliography command via a simple line edit widget in the Bib(la)TeX inset dialog.

The support furthermore includes the following features:

  • As for Natbib and Jurabib, LyX will offer a range of citation styles for Biblatex in the citation dialog/context menu and output the appropriate citation commands.
  • LyX also supports Biblatex's "qualified citation lists", i.e. multi-cite references with an optional pre- and postnote field for each individual item.
  • LyX is now aware of Biblatex's rather different bibliography handling and outputs the appropriate commands (\printbibliography and \addbibresource) at the appropriate places in the LaTeX output.
  • Support for multiple bibliographies (refsections), including cumulated output of these sections (Biblatex's \bibbysection command)
  • LyX now scans and detects the relevant files (package, style files)
  • By default, LyX automatically selects biber as processor (if installed) if Biblatex is used (and bibtex otherwise).
  • If bibtex or bibtex8 is selected as a bibliography processor (instead of biber), the relevant backend option is automatically set
  • Biblatex citation styles are also correctly exported to xhtml and plain text.

Simply put, you can now do (almost*) everything with Biblatex you could already do with Natbib or Jurabib in previous versions of LyX, and more (*with the exception of "Subdivided [aka "Sectioned"] Bibliographies", which are easily possible with Biblatex, but too different to be supported by the current "Subdivided Bibliography" check box. See the Biblatex manual for details).

We have put most energy into a design that enables portability between the diverse citation engines as much as possible, so it should be rather straightforward to switch an existing document from, say, Natbib to Biblatex and (to a limited degree, since the feature set is larger) back.

§ Multiple bibliographies

LyX has supported subdivided bibliographies for a long time, drawing on the bibtopic package. LyX 2.3 introduces support for multiple bibliographies (per part, chapter, section, subsection or child document). This uses Biblatex's features, if Biblatex is used (see above). For classic BibTeX, either the bibtopic or the chapterbib package is used (depending on the setting). Since we draw on bibtopic, it is possible to combine multiple with subdivided bibliographies.

§ Inverted branches

Documented

LyX now supports "inverted" branch insets: Ones whose content will be output if the branch is not activated. This allows users more easily to define alternative text for two versions of a document.

§ Quotation marks enhancements

The quotation marks inset has undergone a thorough revision. Several long-standing bugs have been fixed and some enhancements have been implemented, most notably

  • DocumentedLyX now features "dynamic quotation marks". These automatically adapt to the global quotation mark style (and its changes).
  • DocumentedSo-called "plain" (i.e., non-typographical) quotation marks are now properly supported.
  • DocumentedThe following new quote styles have been added:
    • ‘british’ (“inner quotation”)
    • 「cjk」 (『inner quotation』)
    • 《cjkangle》 (〈inner quotation〉)
    • «french» (“inner quotation”)
    • «frenchin» («inner quotation») ["in" = Imprimerie Nationale]
    • «russian» („inner quotation“)
    • »swedishg» (’inner quotation’) ["g" = Guillemets]
  • DocumentedThe quotation mark style, level and side can be easily switched via context menu.
  • DocumentedLyX now exports proper typographical quotation marks to XHTML and plain text.
  • The automatism to set opening or closing marks has been improved significantly.
  • The internal functions (lfuns) have been extended, so it is now easy to insert a specific quotation mark (e.g., German single opening) via lfun (quote-insert inner opening german in the example case) or change some characteristics (e.g. the style) of all existing quotation marks via the minibuffer (e.g., inset-forall Quotes inset-modify changetype g.. to change all quote insets to German style, while maintaining side and level); see the description of the inset-modify and quote-insert functions in Help > LyXFunctions).

§ Updates to reference handling

Documented
  • There is a new reference format, `label only', which prints just the LaTeX label. This allows for additional customization, should the user wish to put a custom command, not supported by LyX, into ERT.
  • The refstyle package allows for automatic capitalization and pluralization of formatted references. LyX now supports this feature. Note, however, that it only supports it insofar as refstyle itself does. So if you have a customized reference format (say, for corollaries), then you will need to define appropriate commands for caps and plurals. For example: \newref{cor}{name = corollary, names = corollaries, Name = Corollary, Names = Corollaries}. See the refstyle package documentation for more details, or have a look at the default refstyle.cfg.

§ Improved LaTeX handling in dialogs

No documentation available yet

Text that is added to the document via dialogs (e.g., "text after" in the citation dialog, "label" in the bibitem dialog, "name" in the hyperlink dialog, "index name" in the document dialog) is now properly prepared for the LaTeX output (special characters are transferred to LaTeX macros and necessary packages are loaded, special characters such as '&' are escaped). The affected dialogs furthermore provide a "literal" checkbox that allows the insertion of literal LaTeX code.

§ Fonts

No documentation available yetThe LaTeX package microtype (for micro-typographic enhancements) is natively supported via the document preferences.

The following (LaTeX) fonts are now supported natively:

  • Crimson (via the cochineal and newtxmath packages, with fall back to the crimson package)
  • Noto (font family designed to cover all the scripts encoded in the Unicode standard.)

§ New supported languages

  • Amharic
  • Asturian
  • Bosnian
  • Friulian
  • Kannada
  • Khmer
  • Macedonian
  • Piedmontese
  • Romansh
  • Syriac
  • Urdu

§ New supported LaTeX commands

  • No documentation available yetSupport for the command \xout that is provided by the LaTeX package ulem. This allows to cross out text via LyX's character dialog:
  • DocumentedSupport for the document class option fleqn and the length \mathindent. This allows to set that displayed formulas are indented instead of centered and to specify the indentation length:
  • No documentation available yetSupport for the length \baselineskip. It is now possible to select the unit "Line Distance %" as unit for all lengths in the dialogs. 100% Line Distance is the height between the baseline of two subsequent text lines.
  • DocumentedSupport for the document class options leqno and reqno. This allows place the formula number at the left or right side:

§ New template for Inkscape drawings

  • DocumentedLyX has now the new external inset template Inkscape figure. This allows to include drawings created with the program Inkscape whose text is typeset by LaTeX. For information, see sec. 7.1 of LyX's EmbeddedObjects manual.

§ General improvements

§ Improvements to on-screen display of math equations

The display of math has seen major changes. LyX now gives a good idea of the appearance of math equations in the typeset output, often matching the instant preview.

  • Several rules from the math typesetting algorithm described in Appendix G of the TeXbook have been implemented. Most importantly, the spacing between symbols is computed according to their class, including in complex situations involving math macros.
  • The display and selection of fonts has been improved. Text fonts are properly reset into a math font inside various insets as in the output; the font of math ERT has been fixed. The (absence of) kerning for \mathnormal, \mathscr, and \mathcal is more faithful to the output.
  • Spacing relies less on hardcoded pixel values and more on math units that depend on zoom and dpi. This should be good for HiDPI systems.
  • Font sizes and lengths in sub/superscripts are more accurate.
  • Math characters that behave like symbols in math (*, -, and :) are now displayed and spaced properly.
  • The display of fractions, binomials, and nice fractions has been fixed and improved.
  • The display of vertical and horizontal lines in math tables has been fixed.
  • DocumentedAMS environments now display the correct horizontal alignment and a more accurate column spacing. Only the alignment options that are reflected in the output can now be selected.

The biggest change is the spacing algorithm. One typical example is that “-a” has no spacing, contrary to “a - b”. This reflects the difference TeX makes between unary and binary minus that will indeed appear in typeset output. Macros are handled properly; the spacing inside a macro will depend on the values of the arguments and the elements that are before and after the macro.

Documented A consequence of these changes is that user macros that contain hand-crafted screen representations may have to be revised. Note that it is now possible to make use of the class macros: \mathrel, \mathbin, \mathop, \mathord, \mathopen, \mathclose, \mathinner, and \mathpunct. In particular \mathrel, \mathbin, \mathop, and \mathord are accessible from the “Styles & classes” toolbar.

§ Automatic detection of file changes

No documentation available yet

LyX detects external modifications to files in real-time and warns about it. It is also instantaneous for updating graphics when they change, and more battery-efficient.

§ Citation & reference dialogs

Along the way of the new Biblatex implementation, we have polished, streamlined and extended the bibliography-related code at many places. This also allowed us, en passant, to fix some bugs and implement some long-standing desiderata (such as the display of upper-cased names and full author lists in the GUI and the text/xhtml output).

The citation dialog has been simplified. A more important focus is given to the filter box. Keyboard navigation has been enriched: it is now possible to select and edit citations quickly using only the filter, arrow keys, Enter, Backspace and Ctrl+Enter. Similar improvements have been made for the references dialog.

§ Improvements to cursor movement and selection

  • No documentation available yetA new movement and selection mode in math has been implemented: word movement and selection (Ctrl+[Shift+]Left/Right). In this mode, the cursor does not enter nested insets, and moves according to “words” composed of symbols within the same math class.
  • Selection starts in the middle of insets both in math and in text. This makes selection with the mouse considerably more convenient.
  • No documentation available yetThe deletion protection mechanism from math has been generalised to text. Trying to delete a big inset selects the inset first.
  • The horizontal position of the cursor is now remembered when moving up/down.
  • Shift+click now correctly works to perform a selection across insets.
  • Various bugs when clicking and releasing with or without selection have been fixed (Tabular, InsetMathSpace and more).

§ Improvements to row breaking and alignment

  • Row breaking is improved for languages that do not rely on spaces, such as Chinese. This also improves the breaking of overlong words.
  • No documentation available yetJustification: stretching no longer produces illegible lines, thanks to a cap of 1.5em to the stretching of spaces. The stretch is now proportional to the em, for instance one will see if a space is set in a smaller or bigger font size.

§ Outliner and navigation menu

  • There are now a list of Theorems and Definitions from the various Theorems modules, and a list of Sweave and Knitr insets from the corresponding modules, and TODO notes from the todonotes module.
  • DocumentedMore generally, layouts can customize table of contents available in the UI using the “AddToToc” keyword.
  • The list of equations has been improved.
  • Although the outliner is still clumsy at times, full collapses have been fixed in several situations.

§ Forward/Reverse search and error reporting

  • Reverse search is more precise and no longer fails for no reason (e.g. when triggering reverse search on empty areas).
  • Reverse search centers and updates the screen.
  • Reverse-search and error reporting now selects the complete line.
  • No documentation available yetError reporting and reverse search now work for the InPreamble layout option. This opens the door to correct error reporting inside preambles, provided one writes the preamble using the InPreamble inset from the InPreamble module.
  • Correct forward/reverse search and error reporting for Inset arguments and captions.

§ Change tracking

  • The change tracking cues (strike if deleted, underline if added) now appear over insets, including collapsible insets, math insets, tables, graphics, and previews.
  • The change tracking toolbar is now shown automatically whenever there is a change in the document, not just when it is activated.
  • The review changes dialog has been improved.

§ Code preview & highlighting

  • DocumentedThe “Source Pane” has been renamed into “Code Preview Pane” to better reflect its purpose.
  • No documentation available yetDouble clicking on the code preview pane triggers reverse-search.
  • Command names containing @ are now correctly highlighted in the preamble. This reflects that \makeatletter is in effect in the preamble and should not be added a second tme.
  • Colours are now compatible with dark themes.

§ Shortcuts

  • LyX now prioritize the shortcuts from the work areas that start with Alt, over the menu accelerators. This partially fixes the behaviour under KDE which randomly changes the menu accelerators.
  • The shortcut preference pane has been improved with better feedback and error reporting.

§ New or changed LFUNs

  • Documented“buffer-export” and “buffer-export default” export to the default format of the document. File > Export now shows this option.
  • DocumentedNew LFUN paragraph-goto id_start pos_start id_end pos_end. This selects from start to end. id_end must be in the same buffer as id_start.

§ Layouts

  • New layout for the new acmart class.

§ Module enhancements

  • Colours have been fixed for the todonotes module.
  • Documented Passing final as document class option now disables the output of TODO notes.

§ External templates reorganization

DocumentedUp to LyX 2.2, all templates for formats that can be input to LyX via Insert→File→External Material were defined in one monolithic external_templates file, to the effect that you had to copy and change this whole file if you wanted to alter an existing template or add new ones. With LyX 2.3, the monolithic definition file has been dropped in favor of one file per template. These new template files use the filename suffix *.xtemplate and are now located in lib/xtemplates/. This change makes it much easier to add your own templates or modify existing ones.

Note: If you have modified the external_templates file, you will have to move the modifications to the respective *.xtemplate file manually.

§ Image formats and conversion

  • The converters definition syntax (LYX_HOME/lyxrc*) now supports a new option, 'needauth', to prevent completely automated execution of the converter, unless LyX acquired explicit consent by the user. This is a new security feature, useful for converters that are capable of executing arbitrary code, such as R scripts (used with sweave/knitr), embedded within LyX documents. The user needs to explicitly grant per-document permission on the first need for using the converter on each document, unless he/she checks the "Don't ask again for this document" checkbox in the permission dialog. The new behavior can be fine-tuned from two new options in the preferences dialog (see their description below). These also allow for disabling 'needauth' converters altogether, if desired (default behavior).
  • LyX now supports insertion and automated conversion of Gnuplot scripts, recognized by their typical extension ".gp" or ".gnuplot". These can directly be inserted in a LyX document using the "Insert->Graphics..." dialog, then selecting the Gnuplot script. LyX automatically adds a proper "set terminal ..." and "set output ..." line to convert the file to the needed output format (e.g., .eps, .pdf), depending on whether the document is being previewed on screen or compiled as PDF or other formats. Terminal options cannot be fine-tuned at the moment, but that's a capability that may come soon, also according to the received feedback from users. In order to try this out, a minimal .gp file can be the following:
        set grid
        set xlabel "Sample"
        set ylabel "My Value"
        plot exp(-x) t 'Titles'
    
    

§ New preferences settings

  • \use_converter_needauth
    when enabled, user is asked before calling any external converter with the 'needauth' option
  • \use_converter_needauth_forbidden
    when enabled, use of external converters with the 'needauth' option is forbidden

§ Miscellaneous

  • Remove question mark from dialogs in Windows.
  • Sorting strings based on the locale (e.g. É comes after E) has been improved.
  • The maximum number of remembered files has been increased.
  • The names of debug modes are shown in the message pane.
  • Allow swapping unmatched math delimiters.
  • DocumentedOption to use the LaTeX package minted for the typesetting of code listings.

§ Under the hood

  • Tooltips can be made more informative across the while application thanks to automatic formatting with rich text, and automatic line breaking. Several tooltips now use rich text: bibliographical references, the symbols selection dialog, the module selection.
  • New file monitoring mechanism.

§ Backported

Categories

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2017-08-18 10:53 CEST