From: Felix W. <Fel...@gm...> - 2004-10-21 15:21:12
|
With the current implementations, some documents are specifically written for the LaTeX writer (because they rely on the dash-transformation) and some are written specifically for the HTML writer (because they rely on multiple dashes not to be transformed). Considering the commonness of both en-/em-dashes and unix-style options, it is indeed probable that this writer dependence exists for many documents. Furthermore, in LaTeX there are probably frequent false-positives, because the dash-transformation is applied unconditionally, and it isn't even escapable. So we have a problem which needs to be solved. After re-reading David's posting, I too finally came to the conclusion that an intelligent guessing-algorithm might be a bad idea. A somewhat radical but nonetheless simple and effective solution might be to deactivate the transformation in the LaTeX writer. However, then it should be possible to easily enter en-/em-dashes with ASCII characters. * I'd suggest adding built-in substitution definitions for "|--|" to en-dash and "|---|" to em-dash. * And it would be necessary to write em-dashes without spaces around. The latter thing doesn't work, however: $ quicktest.py foo|---| <document source="<stdin>"> <paragraph> foo|---| $ quicktest.py foo|---|bar <stdin>:1: (WARNING/2) Inline substitution_reference start-string without end-string. <document source="<stdin>"> <paragraph> foo|--- <problematic id="id2" refid="id1"> | bar <system_message backrefs="id2" id="id1" level="2" line="1" source="<stdin>" type="WARNING"> <paragraph> Inline substitution_reference start-string without end-string. IMO the trailing space should be made omittable. (I think it won't cause any existing documents to break, because this change would only turn invalid constructs into valid ones.) -- When replying to my email address, please ensure that the mail header contains 'Felix Wiemann'. http://www.ososo.de/ |