Dear Joel,

On 2017-12-15, Joel Kulesza wrote:


> I know there has been extensive discussion on changes to en/em-dash
> handling.  Regrettably, I haven't followed it closely.  However, I ran
> across an issue related to these recently that made me wonder whether it
> has been addressed.  Unfortunately, I'm currently traveling and cannot test
> with 2.3.0, so my question may be moot.

> *Summary: when pasting en/em-dashes into a table, they do not get converted
> and will render as double/triple hyphens.

You are actually not pasting en/em-dashes but rows of hyphens. While in
LyX <=2.1, these were passed to the backends as-is, resulting in rows of
hyphens in HTML documents but converted to em and en dashes by TeX-based
backends. 

This behaviour comes handy in your case but is not good when, e.g., 
pasting a command line: `ls --help` becomes `ls —help` which will not give
the expected result.

> Steps to reproduce (in v2.2.3):

>    1. Insert a 2x2 table to a new LyX document.
>    2. Paste the block below my signature into the upper-left cell to have
>    all 4 cells populated.

As far as I see, the issue you have with 2.2 is due to the above feature
change. 

...

> *Any thoughts you can provide on whether this paste-conversion behavior has
> been fixed are appreciated.*

LyX 2.3 enables you to selecte to output the dashes as -- and ---
(instead of literal characters) on LaTeX export but keeps the feature to
treat rows of hyphens as rows of hyphens on input.
See http://www.lyx.org/trac/ticket/10543 for the many details.

> Example block:

> 1 --
> --- 2

You may consider using literate dash characters in your excel. Depending on
the OS, this can be as simple as pressing AltGr + - or Shift + AltGr + -:
Example:

1 –
— 2

For single cells or running text, you could also consider pasting with 
Edit>Paste Special>Paste from LaTeX.

As last ressort, a run of Search&Replace will do the desired conversion.

Günter

Reply via email to