On Mon, May 29, 2017 at 12:23:29PM -0400, Scott Kostyshak wrote:
> 
> I think (if I did git bisect correctly) this commit caused a change in
> LaTeX and PDF output that I would like to make sure is expected.
> 
> See the attached mwe.lyx file (in 2.2.x format). mwe_before.tex and
> mwe_before.pdf are the outputs before this commit, and mwe_after.tex and
> mwe_after.pdf are the outputs after this commit.
> 
> Note the differences in vertical spacing around "point2".
> 
> The only difference in the .tex files is that after this commit there is
> no empty line after the \vspace command.
> 
> Is this change desired?

At first, it seemed strange to me that a commit dealing with language
nesting could have such an effect on pretty unrelated code. But, going
through the commit, I discovered the following hunk:

> @@ -1000,7 +1103,7 @@ void TeXOnePar(Buffer const & buf,
>                         // prevent unwanted whitespace
>                         os << '%';
>                 if (!os.afterParbreak() && !last_was_separator)
> -                       os << '\n';
> +                       os << breakln;
>         }
> 
>         // if this is a CJK-paragraph and the next isn't, close CJK
> 

which is responsible for the change. I really don't remember why I made
that change, which seems completely unrelated.

However, given the semantics of \vspace, that change should not have an
effect. Indeed, when used within a paragraph, the vertical space is added
after the line in which the \vspace appears. So, for example, if you have
the following snippet:

    Here is a vspace\vspace{1cm} after this line. How can be seen it only
    appears after the first line of this paragraph.

Supposing that the first line ends at the word "appears", the output would be

    Here is a vspace after this line. How can be seen it only appears
         ↕ 1cm
    after the first line of this paragraph.

Thus, given that after that \vspace the line ends, one can think that 
a following blank line is irrelevant, but apparently it is not so.
Moreover, the subsequent \vspace is not followed by a blank line
(and this is not due to the above hunk).

Anyway, neither the change is desired, nor I can explain how that hunk
slipped in, so I am going to revert it.

-- 
Enrico

Reply via email to