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.
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
add a comment |
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.
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
Whichbeamer
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 theend{frame}
. So is this a general issue, that no tabs are allowed after the fragileend{frame}
? And why did it work in a former version?
– Ktree
Nov 15 at 10:06
add a comment |
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.
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
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.
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
beamer texstudio white-space fragile
asked Nov 15 at 9:51
Ktree
42329
42329
Whichbeamer
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 theend{frame}
. So is this a general issue, that no tabs are allowed after the fragileend{frame}
? And why did it work in a former version?
– Ktree
Nov 15 at 10:06
add a comment |
Whichbeamer
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 theend{frame}
. So is this a general issue, that no tabs are allowed after the fragileend{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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 fragileend{frame}
? And why did it work in a former version?– Ktree
Nov 15 at 10:06