2015-04-20 17:26 GMT+02:00 Jürgen Spitzmüller:

> 2015-04-20 17:21 GMT+02:00 Jean-Marc Lasgouttes:
>
>> We'll have to do something about FreeSpacing that implies that spaces are
>> output as ~. This prevent us from implementing alltt as a better version of
>> the horrible LyX-Code.
>>
>
> I just tested, and the following seems to work (consecutive spaces are
> output as I would expect it):
>
>         FreeSpacing           true
>         PassThruChars         "[] "
>
> Jürgen
>
>
Actually, I also need the attached. Is this what you have in mind?

Jürgen
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index da4dccf..444ae7c 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -898,7 +898,8 @@ bool Paragraph::Private::simpleTeXBlanks(OutputParams const 
& runparams,
                os << '\n';
                os.texrow().start(owner_->id(), i + 1);
                column = 0;
-       } else if (style.free_spacing) {
+       } else if (style.free_spacing && !contains(style.pass_thru_chars, ' ')
+                  && !contains(runparams.pass_thru_chars, ' ')) {
                os << '~';
        } else {
                os << ' ';

Reply via email to