Regression in spacing before lstlisting environment with version 2018/09/02 after paragraph break











up vote
1
down vote

favorite












Anyone else noticed a difference in the spacing before a lstlisting environment since upgrading to version 1.7 2018/09/02?



Here's a MWE with output with version 1.7 and version 1.6 for comparison.



I can get same output be removing the empty line before the lstlisting environment, but I'd rather not go through old files and do that. And it seems like wrong behaviour anyway.



Is this a bug?



Can anyone suggest a workaround to return things to the old behaviour?



MWE



documentclass{article}
usepackage{listings}
begin{document}
Preceding paragraph.

begin{lstlisting}{}
documentclass{article}
begin{document}
end{document}
end{lstlisting}

Subsequent paragraph.
end{document}


Output with listings 1.7 2018/09/02



1.7 output



Output with listings 1.6 2015/06/04



1.6 output










share|improve this question


















  • 1




    There is a new leavevmode in the definition. It looks rather odd there. Make a bug report to the author.
    – Ulrike Fischer
    19 hours ago










  • @UlrikeFischer, I just saw this while comparing the style files. I emailed the maintainer. I'm still interested in the easiest temporary workaround.
    – David Purton
    19 hours ago















up vote
1
down vote

favorite












Anyone else noticed a difference in the spacing before a lstlisting environment since upgrading to version 1.7 2018/09/02?



Here's a MWE with output with version 1.7 and version 1.6 for comparison.



I can get same output be removing the empty line before the lstlisting environment, but I'd rather not go through old files and do that. And it seems like wrong behaviour anyway.



Is this a bug?



Can anyone suggest a workaround to return things to the old behaviour?



MWE



documentclass{article}
usepackage{listings}
begin{document}
Preceding paragraph.

begin{lstlisting}{}
documentclass{article}
begin{document}
end{document}
end{lstlisting}

Subsequent paragraph.
end{document}


Output with listings 1.7 2018/09/02



1.7 output



Output with listings 1.6 2015/06/04



1.6 output










share|improve this question


















  • 1




    There is a new leavevmode in the definition. It looks rather odd there. Make a bug report to the author.
    – Ulrike Fischer
    19 hours ago










  • @UlrikeFischer, I just saw this while comparing the style files. I emailed the maintainer. I'm still interested in the easiest temporary workaround.
    – David Purton
    19 hours ago













up vote
1
down vote

favorite









up vote
1
down vote

favorite











Anyone else noticed a difference in the spacing before a lstlisting environment since upgrading to version 1.7 2018/09/02?



Here's a MWE with output with version 1.7 and version 1.6 for comparison.



I can get same output be removing the empty line before the lstlisting environment, but I'd rather not go through old files and do that. And it seems like wrong behaviour anyway.



Is this a bug?



Can anyone suggest a workaround to return things to the old behaviour?



MWE



documentclass{article}
usepackage{listings}
begin{document}
Preceding paragraph.

begin{lstlisting}{}
documentclass{article}
begin{document}
end{document}
end{lstlisting}

Subsequent paragraph.
end{document}


Output with listings 1.7 2018/09/02



1.7 output



Output with listings 1.6 2015/06/04



1.6 output










share|improve this question













Anyone else noticed a difference in the spacing before a lstlisting environment since upgrading to version 1.7 2018/09/02?



Here's a MWE with output with version 1.7 and version 1.6 for comparison.



I can get same output be removing the empty line before the lstlisting environment, but I'd rather not go through old files and do that. And it seems like wrong behaviour anyway.



Is this a bug?



Can anyone suggest a workaround to return things to the old behaviour?



MWE



documentclass{article}
usepackage{listings}
begin{document}
Preceding paragraph.

begin{lstlisting}{}
documentclass{article}
begin{document}
end{document}
end{lstlisting}

Subsequent paragraph.
end{document}


Output with listings 1.7 2018/09/02



1.7 output



Output with listings 1.6 2015/06/04



1.6 output







spacing listings






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 19 hours ago









David Purton

8,3361834




8,3361834








  • 1




    There is a new leavevmode in the definition. It looks rather odd there. Make a bug report to the author.
    – Ulrike Fischer
    19 hours ago










  • @UlrikeFischer, I just saw this while comparing the style files. I emailed the maintainer. I'm still interested in the easiest temporary workaround.
    – David Purton
    19 hours ago














  • 1




    There is a new leavevmode in the definition. It looks rather odd there. Make a bug report to the author.
    – Ulrike Fischer
    19 hours ago










  • @UlrikeFischer, I just saw this while comparing the style files. I emailed the maintainer. I'm still interested in the easiest temporary workaround.
    – David Purton
    19 hours ago








1




1




There is a new leavevmode in the definition. It looks rather odd there. Make a bug report to the author.
– Ulrike Fischer
19 hours ago




There is a new leavevmode in the definition. It looks rather odd there. Make a bug report to the author.
– Ulrike Fischer
19 hours ago












@UlrikeFischer, I just saw this while comparing the style files. I emailed the maintainer. I'm still interested in the easiest temporary workaround.
– David Purton
19 hours ago




@UlrikeFischer, I just saw this while comparing the style files. I emailed the maintainer. I'm still interested in the easiest temporary workaround.
– David Purton
19 hours ago










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










For an unknown reason lstlistings adds a leavevmode in the code, you can try to disable it until the problem is resolved in the code:



documentclass{article}
usepackage{listings}
makeatletter
lst@AddToHook{PreSet}{letleavevmoderelax}
makeatother
begin{document}
Preceding paragraph.

begin{lstlisting}{}
xxx
end{lstlisting}


Subsequent paragraph.
end{document}





share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461673%2fregression-in-spacing-before-lstlisting-environment-with-version-2018-09-02-afte%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    For an unknown reason lstlistings adds a leavevmode in the code, you can try to disable it until the problem is resolved in the code:



    documentclass{article}
    usepackage{listings}
    makeatletter
    lst@AddToHook{PreSet}{letleavevmoderelax}
    makeatother
    begin{document}
    Preceding paragraph.

    begin{lstlisting}{}
    xxx
    end{lstlisting}


    Subsequent paragraph.
    end{document}





    share|improve this answer

























      up vote
      1
      down vote



      accepted










      For an unknown reason lstlistings adds a leavevmode in the code, you can try to disable it until the problem is resolved in the code:



      documentclass{article}
      usepackage{listings}
      makeatletter
      lst@AddToHook{PreSet}{letleavevmoderelax}
      makeatother
      begin{document}
      Preceding paragraph.

      begin{lstlisting}{}
      xxx
      end{lstlisting}


      Subsequent paragraph.
      end{document}





      share|improve this answer























        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        For an unknown reason lstlistings adds a leavevmode in the code, you can try to disable it until the problem is resolved in the code:



        documentclass{article}
        usepackage{listings}
        makeatletter
        lst@AddToHook{PreSet}{letleavevmoderelax}
        makeatother
        begin{document}
        Preceding paragraph.

        begin{lstlisting}{}
        xxx
        end{lstlisting}


        Subsequent paragraph.
        end{document}





        share|improve this answer












        For an unknown reason lstlistings adds a leavevmode in the code, you can try to disable it until the problem is resolved in the code:



        documentclass{article}
        usepackage{listings}
        makeatletter
        lst@AddToHook{PreSet}{letleavevmoderelax}
        makeatother
        begin{document}
        Preceding paragraph.

        begin{lstlisting}{}
        xxx
        end{lstlisting}


        Subsequent paragraph.
        end{document}






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 19 hours ago









        Ulrike Fischer

        182k7288662




        182k7288662






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461673%2fregression-in-spacing-before-lstlisting-environment-with-version-2018-09-02-afte%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            サソリ

            広島県道265号伴広島線

            Setup Asymptote in Texstudio