White-space after `[fragile]end{frame}` breaks beamer?











up vote
6
down vote

favorite












I have detected a very strange behaviour when creating beamer slides with the [fragile] option. I read and know that the line end{frame} must not be indented and must not have a comment directly after it. Though making sure all this, I got a compiling error saying something like Extra }, or forgotten endgroup. end{frame}. Trying to find out the reason nearly drove me crazy, as I detected that there was an empty space after end{frame}. Removing the empty space lead to a successfull compilation. However, on adding the empty space again still lead to no further error (though removing auxiliary files). So I just copied the old, not working part into it, and the error was there again. I use TeXstudio and had the idea to turn on the option "show whitespaces". Having a close look I saw that the error-producing whitespace was indeed different from that one which I can produce pressing space!



In the end is the MWE, but it doesn help, as the whitespace is converted into a "normal" whitespace when either pasting it into here or copying it from here. So I took a screenshot of my code in TeXstudio, where you can see the different whitespaces.



different whitespaces



Can anybody explain me, what whitespace this is and how it has been produced? Is this problem known to a a problem for the [fragile] slides in beamer?



By the way, the problem occured at a colleague, when moving to a new PC with a new MikTeX installation. The .tex files were just copied to the new PC and compiled well on the old system.



documentclass{beamer}
begin{document}
begin{frame}[fragile]{working}
working frame
end{frame}
begin{frame}[fragile]{not working}
not working frame
end{frame}
end{document}









share|improve this question






















  • Which beamer release do you have? I fixed this ...
    – Joseph Wright
    Nov 15 at 9:53










  • packaged on 21.09.2018, version 3.54
    – Ktree
    Nov 15 at 9:57






  • 3




    Ah, you've got a tab not a space: that's more tricky ...
    – Joseph Wright
    Nov 15 at 10:02










  • You're right, I saw this exatly in this moment, the arrow is just so narrow because the next tab-stop is exactly in one whitespace's distance to the end{frame}. So is this a general issue, that no tabs are allowed after the fragile end{frame}? And why did it work in a former version?
    – Ktree
    Nov 15 at 10:06















up vote
6
down vote

favorite












I have detected a very strange behaviour when creating beamer slides with the [fragile] option. I read and know that the line end{frame} must not be indented and must not have a comment directly after it. Though making sure all this, I got a compiling error saying something like Extra }, or forgotten endgroup. end{frame}. Trying to find out the reason nearly drove me crazy, as I detected that there was an empty space after end{frame}. Removing the empty space lead to a successfull compilation. However, on adding the empty space again still lead to no further error (though removing auxiliary files). So I just copied the old, not working part into it, and the error was there again. I use TeXstudio and had the idea to turn on the option "show whitespaces". Having a close look I saw that the error-producing whitespace was indeed different from that one which I can produce pressing space!



In the end is the MWE, but it doesn help, as the whitespace is converted into a "normal" whitespace when either pasting it into here or copying it from here. So I took a screenshot of my code in TeXstudio, where you can see the different whitespaces.



different whitespaces



Can anybody explain me, what whitespace this is and how it has been produced? Is this problem known to a a problem for the [fragile] slides in beamer?



By the way, the problem occured at a colleague, when moving to a new PC with a new MikTeX installation. The .tex files were just copied to the new PC and compiled well on the old system.



documentclass{beamer}
begin{document}
begin{frame}[fragile]{working}
working frame
end{frame}
begin{frame}[fragile]{not working}
not working frame
end{frame}
end{document}









share|improve this question






















  • Which beamer release do you have? I fixed this ...
    – Joseph Wright
    Nov 15 at 9:53










  • packaged on 21.09.2018, version 3.54
    – Ktree
    Nov 15 at 9:57






  • 3




    Ah, you've got a tab not a space: that's more tricky ...
    – Joseph Wright
    Nov 15 at 10:02










  • You're right, I saw this exatly in this moment, the arrow is just so narrow because the next tab-stop is exactly in one whitespace's distance to the end{frame}. So is this a general issue, that no tabs are allowed after the fragile end{frame}? And why did it work in a former version?
    – Ktree
    Nov 15 at 10:06













up vote
6
down vote

favorite









up vote
6
down vote

favorite











I have detected a very strange behaviour when creating beamer slides with the [fragile] option. I read and know that the line end{frame} must not be indented and must not have a comment directly after it. Though making sure all this, I got a compiling error saying something like Extra }, or forgotten endgroup. end{frame}. Trying to find out the reason nearly drove me crazy, as I detected that there was an empty space after end{frame}. Removing the empty space lead to a successfull compilation. However, on adding the empty space again still lead to no further error (though removing auxiliary files). So I just copied the old, not working part into it, and the error was there again. I use TeXstudio and had the idea to turn on the option "show whitespaces". Having a close look I saw that the error-producing whitespace was indeed different from that one which I can produce pressing space!



In the end is the MWE, but it doesn help, as the whitespace is converted into a "normal" whitespace when either pasting it into here or copying it from here. So I took a screenshot of my code in TeXstudio, where you can see the different whitespaces.



different whitespaces



Can anybody explain me, what whitespace this is and how it has been produced? Is this problem known to a a problem for the [fragile] slides in beamer?



By the way, the problem occured at a colleague, when moving to a new PC with a new MikTeX installation. The .tex files were just copied to the new PC and compiled well on the old system.



documentclass{beamer}
begin{document}
begin{frame}[fragile]{working}
working frame
end{frame}
begin{frame}[fragile]{not working}
not working frame
end{frame}
end{document}









share|improve this question













I have detected a very strange behaviour when creating beamer slides with the [fragile] option. I read and know that the line end{frame} must not be indented and must not have a comment directly after it. Though making sure all this, I got a compiling error saying something like Extra }, or forgotten endgroup. end{frame}. Trying to find out the reason nearly drove me crazy, as I detected that there was an empty space after end{frame}. Removing the empty space lead to a successfull compilation. However, on adding the empty space again still lead to no further error (though removing auxiliary files). So I just copied the old, not working part into it, and the error was there again. I use TeXstudio and had the idea to turn on the option "show whitespaces". Having a close look I saw that the error-producing whitespace was indeed different from that one which I can produce pressing space!



In the end is the MWE, but it doesn help, as the whitespace is converted into a "normal" whitespace when either pasting it into here or copying it from here. So I took a screenshot of my code in TeXstudio, where you can see the different whitespaces.



different whitespaces



Can anybody explain me, what whitespace this is and how it has been produced? Is this problem known to a a problem for the [fragile] slides in beamer?



By the way, the problem occured at a colleague, when moving to a new PC with a new MikTeX installation. The .tex files were just copied to the new PC and compiled well on the old system.



documentclass{beamer}
begin{document}
begin{frame}[fragile]{working}
working frame
end{frame}
begin{frame}[fragile]{not working}
not working frame
end{frame}
end{document}






beamer texstudio white-space fragile






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 at 9:51









Ktree

42329




42329












  • Which beamer release do you have? I fixed this ...
    – Joseph Wright
    Nov 15 at 9:53










  • packaged on 21.09.2018, version 3.54
    – Ktree
    Nov 15 at 9:57






  • 3




    Ah, you've got a tab not a space: that's more tricky ...
    – Joseph Wright
    Nov 15 at 10:02










  • You're right, I saw this exatly in this moment, the arrow is just so narrow because the next tab-stop is exactly in one whitespace's distance to the end{frame}. So is this a general issue, that no tabs are allowed after the fragile end{frame}? And why did it work in a former version?
    – Ktree
    Nov 15 at 10:06


















  • Which beamer release do you have? I fixed this ...
    – Joseph Wright
    Nov 15 at 9:53










  • packaged on 21.09.2018, version 3.54
    – Ktree
    Nov 15 at 9:57






  • 3




    Ah, you've got a tab not a space: that's more tricky ...
    – Joseph Wright
    Nov 15 at 10:02










  • You're right, I saw this exatly in this moment, the arrow is just so narrow because the next tab-stop is exactly in one whitespace's distance to the end{frame}. So is this a general issue, that no tabs are allowed after the fragile end{frame}? And why did it work in a former version?
    – Ktree
    Nov 15 at 10:06
















Which beamer release do you have? I fixed this ...
– Joseph Wright
Nov 15 at 9:53




Which beamer release do you have? I fixed this ...
– Joseph Wright
Nov 15 at 9:53












packaged on 21.09.2018, version 3.54
– Ktree
Nov 15 at 9:57




packaged on 21.09.2018, version 3.54
– Ktree
Nov 15 at 9:57




3




3




Ah, you've got a tab not a space: that's more tricky ...
– Joseph Wright
Nov 15 at 10:02




Ah, you've got a tab not a space: that's more tricky ...
– Joseph Wright
Nov 15 at 10:02












You're right, I saw this exatly in this moment, the arrow is just so narrow because the next tab-stop is exactly in one whitespace's distance to the end{frame}. So is this a general issue, that no tabs are allowed after the fragile end{frame}? And why did it work in a former version?
– Ktree
Nov 15 at 10:06




You're right, I saw this exatly in this moment, the arrow is just so narrow because the next tab-stop is exactly in one whitespace's distance to the end{frame}. So is this a general issue, that no tabs are allowed after the fragile end{frame}? And why did it work in a former version?
– Ktree
Nov 15 at 10:06










1 Answer
1






active

oldest

votes

















up vote
6
down vote



accepted










Spaces at end of line are removed by TeX's file reading code at the very lowest level (before any catcodes or macro definitions are considered).



There is essentially no way in tex to make even "verbatim" code see such spaces.



For some years in web2c based tex implementations tabs were also removed in the same stage, however it was raised as a potential bug/misunderstanding of the intentions in the tex reference code, and so the 2018 release changed this and now only strips spaces and not tabs at ends of lines.



To the macro layer the end of the verbatim "fragile" frame has to be exactly end{frame} so it is affected by this change in the underlying tex engine's file reading code.






share|improve this answer

















  • 1




    ! You gave me another reason to set "strip trailing spaces (and tabs) on save" also for .tex files... (thanks).
    – Rmano
    Nov 15 at 10:41











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%2f460087%2fwhite-space-after-fragile-endframe-breaks-beamer%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
6
down vote



accepted










Spaces at end of line are removed by TeX's file reading code at the very lowest level (before any catcodes or macro definitions are considered).



There is essentially no way in tex to make even "verbatim" code see such spaces.



For some years in web2c based tex implementations tabs were also removed in the same stage, however it was raised as a potential bug/misunderstanding of the intentions in the tex reference code, and so the 2018 release changed this and now only strips spaces and not tabs at ends of lines.



To the macro layer the end of the verbatim "fragile" frame has to be exactly end{frame} so it is affected by this change in the underlying tex engine's file reading code.






share|improve this answer

















  • 1




    ! You gave me another reason to set "strip trailing spaces (and tabs) on save" also for .tex files... (thanks).
    – Rmano
    Nov 15 at 10:41















up vote
6
down vote



accepted










Spaces at end of line are removed by TeX's file reading code at the very lowest level (before any catcodes or macro definitions are considered).



There is essentially no way in tex to make even "verbatim" code see such spaces.



For some years in web2c based tex implementations tabs were also removed in the same stage, however it was raised as a potential bug/misunderstanding of the intentions in the tex reference code, and so the 2018 release changed this and now only strips spaces and not tabs at ends of lines.



To the macro layer the end of the verbatim "fragile" frame has to be exactly end{frame} so it is affected by this change in the underlying tex engine's file reading code.






share|improve this answer

















  • 1




    ! You gave me another reason to set "strip trailing spaces (and tabs) on save" also for .tex files... (thanks).
    – Rmano
    Nov 15 at 10:41













up vote
6
down vote



accepted







up vote
6
down vote



accepted






Spaces at end of line are removed by TeX's file reading code at the very lowest level (before any catcodes or macro definitions are considered).



There is essentially no way in tex to make even "verbatim" code see such spaces.



For some years in web2c based tex implementations tabs were also removed in the same stage, however it was raised as a potential bug/misunderstanding of the intentions in the tex reference code, and so the 2018 release changed this and now only strips spaces and not tabs at ends of lines.



To the macro layer the end of the verbatim "fragile" frame has to be exactly end{frame} so it is affected by this change in the underlying tex engine's file reading code.






share|improve this answer












Spaces at end of line are removed by TeX's file reading code at the very lowest level (before any catcodes or macro definitions are considered).



There is essentially no way in tex to make even "verbatim" code see such spaces.



For some years in web2c based tex implementations tabs were also removed in the same stage, however it was raised as a potential bug/misunderstanding of the intentions in the tex reference code, and so the 2018 release changed this and now only strips spaces and not tabs at ends of lines.



To the macro layer the end of the verbatim "fragile" frame has to be exactly end{frame} so it is affected by this change in the underlying tex engine's file reading code.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 15 at 10:21









David Carlisle

476k3811061840




476k3811061840








  • 1




    ! You gave me another reason to set "strip trailing spaces (and tabs) on save" also for .tex files... (thanks).
    – Rmano
    Nov 15 at 10:41














  • 1




    ! You gave me another reason to set "strip trailing spaces (and tabs) on save" also for .tex files... (thanks).
    – Rmano
    Nov 15 at 10:41








1




1




! You gave me another reason to set "strip trailing spaces (and tabs) on save" also for .tex files... (thanks).
– Rmano
Nov 15 at 10:41




! You gave me another reason to set "strip trailing spaces (and tabs) on save" also for .tex files... (thanks).
– Rmano
Nov 15 at 10:41


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460087%2fwhite-space-after-fragile-endframe-breaks-beamer%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

Quarter-circle Tiles

build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

Mont Emei