On Thu, Apr 20, 2000 at 11:58:27AM +0200, Asger K. Alstrup Nielsen wrote:
> [Change of font data structure to be a sorted list and use special characters
>  to represent font change points]
> 
> Also, I have a feeling that it's the wrong approach. What problem are you
> *really* trying to solve?  Is it that difficult to control the formatting
> of text?

The main reason that I want this change ("the red dot") is for the RTL support:
Suppose that you have a Hebrew text, with the a "abc-ABC", where "abc-" is
in Hebrew, and "ABC" is English. This word is rendered as "ABC-cba" on screen.
Now suppose that you place the cursor (with the mouse) between "C" and "-".
You do have a problem here as there are two possible positions for the cursor:
abc-|ABC or abc-ABC| ! 
How do you know which position the user wants?
With my suggestion, the display is ".ABC.-cba". If the user wants to place
the cursor after "C", he should press to the left of the dot,
and if he wants it after "-", he should press to the right of the dot.

However, RTL is not the only reason. With the current CVS version, you can
write a document that contains several languages. But since changing the
language of a text segment does not have visual effect, it is easy to get
wrong results.

> Would it not be enough just to modify the semantics of font
> changes a bit?
> For instance, say that spaces around a font change are miminal:
> 
> I.e. enforce that stuff like
> 
>   This is\bold{ BOLD}.
> 
> would per default be reduced to
> 
>   This is \bold{BOLD}.
> 
> such that spaces want to be default font, unless told explicitly
> to be otherwise.

What you describe above is exactly what it currently done by LyX.
Doing this sort of things is not a good idea in general, and in particular,
there are cases where the above scheme gives wrong results:
If you have "ab CD ef" in \huge font size, and CD is also in bold, then LaTeX 
output of LyX will be "{\huge ab} \textbf{\huge CD} {\huge ef}", which causes
that the space between "ab" and "CD" to be too small.

Reply via email to