On 24.05.05, Sven Schreiber wrote:
> Martin A. Hansen wrote:
> 
> > but if lyx already removes double-spaces, when why not remove space
> > before , . : ; etc.?
> 
> Because going from one to two spaces is a matter of degree and --given
> that the space length is usually variable in latex, at least for
> justified text-- indicates that the user is using blanks as a
> quick-and-especially-dirty shortcut for layout.
> 
> In contrast, going from zero to one blank is like 1:\infty and arguably
> a qualitative difference, rather than only a quantitative one. It is not
> a matter of dirty layout tricks.

LyX already removes empty paragraphs -- something not done in LaTeX but
sensible in most cases (but sometimes forcing you to ugly tricks). So this
feature would IMHO fit in the picture very well. (Solve a common problem and
make life a bit more complicated in special cases.)

OTHOH, in the existing cases, the suppression does (generally) not change
the LaTeX output, while the new feature would.
 
> Can you be 100% sure that there is no good reason to ever introduce a
> blank before punctuation? I doubt that, and then you would have guess
> from the context what the user had in mind.

I am 99.99% sure that in all cases of a blank before and after
punctuation, the first should be a protected blank (or a half-space). I
do not know of any language that allows linebreaks before the
punctuation. (Well, my language knowledge is restricted to European
languages.)

OTHOH, I could imagine cases of punctuation signs starting a "word" (like
the shorthand .5 for 0.5). The feature should not apply to math
anyway, but there might be non-math cases as well.

> Having said that, of course your suggestion makes sense as a user
> option. And you already suggested how to implement that option: The user
> should use protected blanks.

And Format>Document should have a toggle for the feature, e.g.

  Suppress spaces before any of [.,:;?!]  <- editable textbox

E.g. Spanish documents will probabely set this to 

  Suppress spaces before any of [.,:;¡¿]

While I suppose that even in French language the space before the
punctuation should be either protected or half, typing a normal space is
faster and the babel replacement mechanism is established.

  Changing the babel rule from <space>? --> \,? to ? --> \,? is not 
  sensible, because it would
     1. break existing documents
     2. need some new way to tell the occasions where no (half) space is
        desired (just now it is "if there is a space, I want a space").


Günter

-- 
G.Milde web.de

Reply via email to