Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Hyphens, minuses, and dashes (was: Re: How to impose a numeric sort on negative numbers?)



Peter Stephenson wrote on Thu, 02 Jul 2020 12:00 +00:00:
> So it's sort of doing the right thing at least from the point of what's visible
> in text.
> 
> However(!), what we really want here is indeed an ASCII hyphen, because this
> is what your're typing.

To be clear, I never proposed to change the definition of DASH(); I only said
the new text shouldn't use that macro.  We seem to be in agreement on that.

Thanks for the background on TeX's handling of hyphens.  (I was already
familiar with most of those details, actually, though not with info(1)'s
handling of runs of hyphens.)

> (It's not even actually a minus sign because this is an input code,
> not a mathematical expression. For what it's worth, which is very
> little, this would be different in TeX, $-$, but no other format I
> know of really cares.)

TeX is not the only format that distinguishes hyphen and minus; Unicode
does, too.  (There's U+2010 HYPHEN, U+2212 MINUS SIGN, and even U+00AD
SOFT HYPHEN.)

> I have a vague memory we got into problems with such things in YODL
> once, which is why I used the macro.  But looking at the current doc
> source doesn't suggest any trace of it, so I'll abandon that.  There
> have been many improvements in YODL since then.

Hmm.  This reminds me: in the HTML FAQ emdash() renders as «"---"»,
whereas in the HTML manual «DASH()-» is rendered as "—".

Looking at the respective Makefiles, I suspect this might be because the
FAQ is built by yodl2html(1), whereas the manual is built by yodl +
texi2any(1) [= $(TEXI2HTML)].

> pws

Cheers,

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author