Jean-Marc Lasgouttes wrote:

> I'm not sure either we are talking about the same thing :) I tried
> what you describe and came up with the files appended. They seem
> alright to me.

Probally you highlited the text and past it into lyx, right ?
That is another strange thing Whenever you highlight text with several consecutives
spaces it pastes only one space.

Anyway, I am attaching another lyx file. Try that one.


> Edmar> The patch I did fixes the above: If you type a tilde char, then
> Edmar> you get a tilde char.  If you type a space char then you get a
> Edmar> space char.  Giving complete transparency to the user (within
> Edmar> latex paragraphs only).
>
> As I read your patch, it seems that you transform protected spaces (~)
> into plain spaces in LaTeX mode. This is certainly not a good thing...

> Could you explain again, please? It seems that I do not get it.
>
> JMarc

Ok, here it is:
The patch does the correct thing, because lyx stores every other space internally as
protected spaces.
When in latex mode, *if* the user want a protect space he has to type
a tilde char, which is stored internally as a tilde char (not as a protected space).
So, spaces are translated to spaces (wether stored internally as spaces ot protected)

and tilde chars are translated to tilde chars.
Otherwise the user can never get control when in latex paragraph.
The attached file demonstrates that clearly.


--
/*----------------------------------------------------------------------*/
/*      Edmar Wienskoski Jr.    - [EMAIL PROTECTED]           */
/*                              - http://www.cs.rice.edu/~wiensk        */
/*----------------------------------------------------------------------*/
     ____
    | [] |                                                 ______()_||_
 ---+----+---  ------------  ------------  ------------     | []       |
 | |      | |  |          |  |          |  |          |  ___|          |
 |_|______|_|  |__________|  |__________|  |__________|  |______________\
"o-o      o-o""o-o      o-o""o-o      o-o""o-o      o-o""o-o  O-O-O  o-o "


#This file was created by <wiensk> Wed Dec 23 12:50:52 1998
#LyX 1.0 (C) 1995-1998 Matthias Ettrich and the LyX Team
\lyxformat 2.15
\textclass article
\begin_preamble
\usepackage{verbatim}
\end_preamble
\language default
\inputencoding default
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout LaTeX


\backslash 
begin{verbatim} H~~H~~H~~H == H 
\protected_separator 
H 
\protected_separator 
H 
\protected_separator 
H == H~~H 
\protected_separator 
H~~H 
\backslash 
end{verbatim}
\the_end

Reply via email to