Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdflatex fails on fragile frame if \end{frame} is preceded by whitespace on its line #326

Closed
josephwright opened this issue Nov 26, 2015 · 6 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@josephwright
Copy link
Owner

Originally reported by: Johannes Rauh (Bitbucket: jarauh, GitHub: Unknown)


The following program fails (also attached):

#!latex

\documentclass{beamer}
\begin{document}
\begin{frame}[fragile]

 \end{frame}
\end{document}

Note the space in the second-last row: " \end{frame}". The manual beameruserguide.pdf states: "(...) the \end{frame} must be alone on a single line." So either this is a bug that can be solved, or it should be mentioned in the manual.

I'm using beamer 3.33 with pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian).


@josephwright josephwright added minor bug Something isn't working and removed minor labels Nov 27, 2016
@josephwright josephwright self-assigned this Nov 27, 2016
@josephwright
Copy link
Owner Author

Yes, I know about this: I'm not sure there's a good solution other than documentation! I will take a look (I'm having a review of beamer bugs).

@ghost
Copy link

ghost commented Nov 27, 2016

I may be biased, because I personally don't really like this "new" behaviour of beamer, but maybe it would be a solution to add some option to switch this off or on?

As far as I understood, this is a trade-off between allowing tabs in listings and allowing the \end{frame} to be indented. I would even go as far and have the "allowing the \end{frame} to be indented" as default behaviour and make "allowing tabs in listings" as optional for the following reasons:

  • Besides the explicit questions I linked above, there were many cases on TeX.SE where this caused problems, especially because the resulting error message is not really obvious for the majority of users. For me, such discussions manly occurred in comments, so not really easy to search for with the on-site search function, but I can dig for a few of these discussions, if this would be helpful. One example http://tex.stackexchange.com/questions/325468/errors-when-incorporating-a-plot-into-a-beamer-document/325472#comment795454_325472

  • I can not give any representative numbers, but I feel as if the number of fragile frames used together with tabs in listings may not be the majority of use-cases as a) not every listings uses tabs and b) not every fragile frame has a listing - there are many cases where it is simply used for something tikz related or similar

  • No representative numbers for this either, but based on my experience on TeX.SE, a significant number of users indents their frames.

Con: this makes it easy to get rep points on TeX.SE once one knows the error message :)

@josephwright josephwright added this to the v3.38 milestone Nov 27, 2016
@josephwright
Copy link
Owner Author

@samcarter8 I'll take another look at this and see if I can find a technical solution. What I note here is that if I don't allow for tabs in the core code then users have no easy approach, whereas if I say 'no indenting \end{frame} for fragile frames' then they can format their so things work. I do agree the error message is unhelpful!

@josephwright
Copy link
Owner Author

For tab business, see #310

@josephwright
Copy link
Owner Author

See http://tex.stackexchange.com/questions/343717/why-cant-beamer-skip-white-spaces-when-looking-for-endframe-in-a-fragile-fra/34372 for discussion and at least one solution: just a question of what to go with,

@josephwright josephwright changed the title pdflatex fails on fragile frame if \end{frame} is preceded by whitespace on its line pdflatex fails on fragile frame if \end{frame} is preceded by whitespace on its line Dec 12, 2016
@josephwright josephwright modified the milestones: v3.37, v3.38 Dec 13, 2016
@josephwright josephwright added enhancement New feature or request and removed bug Something isn't working labels Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant