On Fri, Dec 15, 2017 at 4:27 PM, Guenter Milde <mi...@users.sf.net> wrote:

> 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.
>

This is a fair point.


> > 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.
>

OK.  Thank you for confirming.


> ...
>
> > *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.
>

Understood.  I thought something like this might be the case.  When I get
home in January, I'll play with 2.3 more in this regard.


> 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:
>

In Excel, this solution is fine; however, I rarely use Excel.  Instead,
I'll have to encode the proper unicode in my Fortran / C++ codes (which I'm
somewhat, perhaps unnecessarily, reluctant to do).  That is why using
two/three hyphens and letting LaTeX take care of everything is easier (for
me).  Usually, what I do is have my code create a .tex file that I
\input{...} and so I don't run into this; however, in this case, I just
needed one, single-use, table.


> 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.
>

Fair point.  This is probably what I'll do in the limited cases where this
is an issue for me.

Thank you for the quick and thorough reply!

- Joel

Reply via email to