LyXunderscore in bibliography label

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Church_Mouse
Posts: 2
Joined: Fri Jul 09, 2021 12:46 am

underscore in bibliography label

Post by Church_Mouse »

I have a large number of LyX documents that use bibliographic references.

Each reference is labelled with a key and a label.

Clicking on the gray box pops up a window where the key and label may be altered.

I almost always have connected multi-word labels with underscores, for example:

a_multi_word_label

Previously, this has not been an issue. Currently I am using LyX 2.2.4.

When I type such a label, the underscore gets replaced by \_{}. This has happened before, and as I recall, I simply re-edited and deleted the {}, which made the unadorned underscore appear in the label .

This no longer works, or I can not recall the exact incantation I used to get what I want.

I understand that \_ is a shorthand for typesetting a subscript (something I never do - I point and click). I also understand that using underscores in a label is completely reasonable.

How do I fix this? I've spent half an hour now trying various permutations with no useful results. The closest I can get is changing:

a\_{}multi\_{}word\_{}label

to:

a_multi_word\_{}label

Which shows the wysiwym label as:

a_multi_word\_{}label

Close, but no cigar. Removing more simply starts the replacement cycle over.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Church_Mouse
Posts: 2
Joined: Fri Jul 09, 2021 12:46 am

underscore in bibliography label

Post by Church_Mouse »

A solution that works under ubuntu bionic:

Go to:

https://launchpad.net/~lyx-devel/+archi ... tu/release

and follow the instructions to install the ppa to your software sources.

Then do:

Code: Select all

sudo apt-get dist-upgrade
and enter Y to install LyX version 2.3.6.1

Then reconfigure your menu and user interface preferences, as a LyX update always seems to reset those to defaults.

Evidently there were some intermediate versions that messed up the underscores and that has now been fixed in the newer version. As always, the ubuntu repositories are a little behind, and perhaps for bionic, will not catch up before end of support.
Post Reply