On 2010-01-15, rgheck wrote:
> Before we have any more of this discussion, let me just emphasize that > my original concern was with the use of the Unicode emdash in the User's > Guide and Tutorial, where it gives bad results, according to the > standards of English typography. That is what I was proposing to change. > The issue about unicodesymbols was raised by someone else and is quite > orthogonal. > Nonetheless, we can discuss it. There is another issue about > how these things are rendered on-screen, and yet another about output, > again all orthogonal. But they too can be discussed. In my view, the issues are: a) What to use in the tutorial, --- or em-dash? b) How to export the em-dash Unicode char to LaTeX? c) Shall we pass --- directly to LaTeX even if it is not ERT also if this breaks the WYSIWYM principle? In my view, * a) and b) are related, as if the Unicode glyph (correctly applied) results in proper typography, it can be used in the Guide and Tutorial without adverse effects. * a) and c) are related too: we should not use --- if this results in three hyphens in the printout. > On 01/14/2010 05:06 PM, Guenter Milde wrote: >> On 2010-01-14, rgheck wrote: >>> On 01/14/2010 11:39 AM, Jean-Marc Lasgouttes wrote: >>>> rgheck<rgh...@bobjweil.com> writes: >> The input ligature can have unwanted side-effects. ... >> # ls --help >> Look at the PDF. ... > But if you put it in listings, or in a LyXCode environment, you get > what you would expect to get in those cases. In the LyXCode case, > that's because we find this: > ls~-{}-help > in the source. So LyX just handles this for you. I don't see anything > confusing about it. >> Why does LyX handle this differently from "~" and "\"? --- Typing three hyphens to get an em-dash is a "TeX typing convention". (TeX realises it with a font feature called "input ligature".) ~ Typing a tilde to get a non-break space is another "TeX typing convention" realised at the font level. " The quotation mark is an active character in some document languages (e.g. German). LyX handles this input in a way that ~ results in what I see (converted to \textasciitilde{}). -> confusing for TeXperts. " is handled by the smart-quotes feature (converted to typographically correct quotes which I see in the LyX window). If " is copied from somewhere else or if the "-key is unbound, it is (at least in German documents) converted to \textquotedbl{}. To access the special features for German typography that babel provides via "<something>, I have to use ERT. --- is passed to LaTeX as-is also outside ERT and **without any visible feedback**! -> confusing for non-TeXers >>>> As Jürgen said, do you have an example? >> Now, change the command to typewriter font and try again. This time it >> helps, as typewriter is one example of a font without this input >> ligature. But you also don't get an em-dash even if you mean one. > This makes perfect sense: Typewriters don't have em-dash keys. So the > em-dash is rendered as "---". Which is pretty much how people used to > type it. I agree that this TeX feature in many cases gets it right. But nowadays typewriter fonts have more characters than there are keys on a typewriter, I would not like rendering of ä as "a just because this is how people used to type it in a (German) LaTeX source. Another, more relevant example is XeTeX: If (like in the default LyX-svn setup) system fonts are used, --- is rendered as three hyphens. -> Even if we decide to keep this TeX feature accessible without ERT, we must not use it for the em-dash Unicode char. >>>>> And, as I've said, the Unicode version gives the wrong spacing. >> In the GUI window or in the output? > Output. If you enter "text[emdash]text", you do not get a line break > after the emdash. To get it, you have to mess around in ways you > shouldn't have to mess around. I'm not worried about spacing around the > em-dash. Well, so I was misled by the wording "wrong spacing" to denote wrong line breaks. So my suggestion for issue b) boils down to: EM DASH (U+2014) -> \textemdash\textzerowidthspace with \textzerowidthspace == ZERO WIDTH SPACE (U+200B):: \providecommand*{\textzerowidthspace}{\hski...@skip} also accessible as Insert>Formatting>Zero Width Hyphenation Point > Though... ... > ...it seems to me that this is *exactly* the kind of thing writers > should not have to worry about, i.e., that ought to be handled > automatically by the typesetting engine. If LaTeX doesn't do that, then > there should be a package that does it, if there isn't one already. If > there's no such package, then I'd be happy to consider special, > language-specific handling of spacing around "---" and "--", if you > wanted to propose that. But I would not want to have special spacing > around the Unicode glyph, since it is just a character, and maybe I > don't want special spacing around it: I meant to be able to use it as a > normal character, if I want to do so. OK, this makes issue d): d) Do we want a em-dash ("Gedankenstrich") macro choosing the typographically correct dash depending on the language? At the LaTeX or LyX level? (An implementation on the LyX level would be something similar to the smart-quotes feature.) Günter