> >>>>> "Bruce" == Bruce Momjian <[EMAIL PROTECTED]> writes:
>
> Bruce> I am wondering why LyX uses the non-wrapping space ~ in
> Bruce> TeX-style areas?
>
> I am not sure I understand what you mean? Could you send the original
> lyx file and the faulty output you get?
I am sorry. I am very stupid about getting my mode names right. My
problem is with:
\family typewriter
SELECT city FROM friends
\family default
This code is the one that gets translated to:
SELECT~city~FROM~friends
and when this text is part of a paragraph, no wrapping can occur within
this text. That is my problem. My patch prevents ~ translation for
'typewriter' mode, not TeX mode as I state.
I have retained the rest of the message for your reference. I have
fixed the naming of the modes.
>
> Bruce> I understand in LyX-Code blocks that using the ~ prevents
> Bruce> wrapping and forces the text to appear exactly as you enter it.
>
> Yes.
>
> Bruce> However, when you are doing a paragraph, and have a few words
> Bruce> of typewriter output, the tex will not allow a
> Bruce> linebreak inside the typewriter area because of the use of ~.
>
> That's where I stop to understand ;) It does not seem to me that TeX
> style uses ~. Unless I am really stupid (which is very possible), the
> part of code that you change is _not_ triggered in TeX style:
>
> } else if (font.latex() == LyXFont::OFF) {
> ! if (font.family() == LyXFont::TYPEWRITER_FAMILY) {
> file += '~';
>
> Bruce> OK, here is a patch that does what I needed. It uses ~ for
> Bruce> LyX-Code environment, but spaces for typewriter in other
> Bruce> environments. The test is to compare the current environment to
> Bruce> LyX-Code, and do the ~ only in those cases.
>
> Testing explicitely for the name of the environment is certainly not a
> good idea. However, once we get to know what the actual problem is,
> we'll certainly manage to find a fix.
>
> JMarc
>
Thanks.
--
Bruce Momjian | http://www.op.net/~candle
[EMAIL PROTECTED] | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026