Discussion:
[Docutils-users] em-dash "--" in LaTeX output
Dima Diall
2005-08-19 17:57:24 UTC
Permalink
Dear docutils devs:

I was wondering what is the rationale for a double hyphen "--" being
transformed into "-{}-" in the rst2latex.py output? This causes the
PDF file to show two separate dashes instead of a single, longer one.

TIA.
--
/dima
Alan G Isaac
2005-08-19 18:48:05 UTC
Permalink
Post by Dima Diall
I was wondering what is the rationale for a double hyphen "--" being
transformed into "-{}-" in the rst2latex.py output? This causes the
PDF file to show two separate dashes instead of a single, longer one.
The rationale is that what goes in should be what comes out.
The idea is that if you want an en-dash, you should use one.
E.g., like this: 99 |--| 102.

.. |--| unicode:: U+02013 .. EN DASH
:trim:

Forbiding LaTeX-style ASCII punctuation shortcuts has been
controversial among the users but not among the developers,
as far as I can tell.

Cheers,
Alan Isaac
Dima Diall
2005-08-22 15:25:50 UTC
Permalink
Post by Alan G Isaac
Post by Dima Diall
I was wondering what is the rationale for a double hyphen "--" being
transformed into "-{}-" in the rst2latex.py output? This causes the
PDF file to show two separate dashes instead of a single, longer one.
The rationale is that what goes in should be what comes out.
Well, for instance the double quote character (as in "example") is
expanded to a opening and closing pair of backticks and apostrophes
(as in ``example'') to give the corresponding matching double quotes
in LaTeX.
Post by Alan G Isaac
The idea is that if you want an en-dash, you should use one.
E.g., like this: 99 |--| 102.
.. |--| unicode:: U+02013 .. EN DASH
Thanks for the tip... I could use this trick, but it wouldn't look
nice in plain text and I tend to use double hyphens quite a lot. Not
perfect, but I can live with that...
Post by Alan G Isaac
Forbiding LaTeX-style ASCII punctuation shortcuts has been
controversial among the users but not among the developers,
as far as I can tell.
In this case probably I'll have to hack up rst2latex.py myself if I
want the em dashes the way I like them :-)
--
/dima
Loading...