On Tue, Jan 24, 2017 at 12:00:02PM +0000, Guenter Milde wrote: > On 2017-01-24, Enrico Forestieri wrote: > > On Mon, Jan 23, 2017 at 10:14:39PM +0000, Guenter Milde wrote: > > >> Below is an incomplete patch (see FIXME). > >> Could someone with more C++ knowledge complete and test, please? > > > This would be a step forward. However, I am more radical and would like > > that the automatic transformation of -- and --- to \textendash and > > \textemdash be removed. If I enter -- I want to get --, otherwise > > strange things and obscure bugs can happen. For example: > > 1) start a new document and input "--" and you get \textendash > > 2) now enter another "-" and you get \textemdash > > 3) now enter another "-" and everything gets replaced by "-" > > This could be changed to gets replaced by "----"
I don't know how easily, didn't have a look at the sources. > > This means that I am not able to enter "---------", for example. > > At least not easily. (It works if you insert with spaces and delete them > later.) Not at all. You get -{}-{}-{}-{}-{}-{}-{}-{}- which is worse. You have to use ERT to introduce four hyphens? How's that? > OTOH, with the old behaviour strange things happen on export: > > 1) start a new document and insert this---foo > 2) copy from another source bar—bar (with Unicode emdash literal) > > In LyX <2.2, both emdashes look completely identical, but one allows > line breaks after the dash and the other not! But packages that expect to see two hyphens instead of \textendash are not broken... -- Enrico