I have a problem with latex ignoring text after \mode<presentation> or \mode<article> was set.
MWE description
I have a large document that changes modes often, and I also \include some more latex files. I've reduced it to the following MWE.
\documentclass{article}
\usepackage{beamerarticle}
%\documentclass{beamer}
\begin{document}
1. Text without a mode being set. This should be shown
in both presentation and article mode.
\mode
<presentation>
\begin{frame}
2. This is text inside a frame. It should only appear in presentation
\end{frame}
\mode
<article>
3. Text outside a frame. Only in article.
\mode
<all>
\include{in}
\end{document}
With the file in.tex closely following the example in the beamer user guide ver. 3.26, p. 210
\mode*
4. This is some text outside a frame. Shouldn't be shown in presentation mode.
\begin{frame}
5. This is text inside a frame. This is expected to show in article mode.
\end{frame}
\mode<all>
Problem description
There are two cases to be considered here, compiling with \documentclass{beamer}, or with \documentclass{article} and \usepackage{beamerarticle}.
As I understand the relevant documentation, I should get the results as described in the body of the MWE. Instead, I get the following:
Case "article"
- Everything after
\mode<presentation>seems to be ignored. I get a single page with sentence 1. Switching back to\mode<article>does not produce sentence 3, and the\includecommand does not seem to be processed.
- Everything after
Case "beamer"
- Sentence 1. and 2. get typest, the included file is ignored, even though it should be processed in all modes.
Experimentation with the third flavour of the mode command and ignorenonframetext has yielded the same results, please see the output here and here (can't include directly due to lack of reputation). I am using the second mode flavour for \include to work, and because I need to do fancy things like set backgrounds on some slides.
Question
What am I missing here? As far as I can tell I have structured the document correctly. Am I misunderstanding how modes are set and processed? Is this a bug in beamer or beamerarticle? I would like to achieve the result as described in the MWE.
I am compiling this document on Arch Linux with texlive 2012, which at the moment represents rev. 28273.
\modein your document? As the manual says, the line has to consist of\modeor\mode*alone for 'change mode' command to work. Also, I think you want\inputnot\include. – Joseph Wright♦ Feb 7 at 9:23\includewill be needed for a more complex document e.g. because article mode ignores\includeonlylecture. – fheub Feb 7 at 9:43\inputin my main document, so that I can\includefurther stuff from there. That just got lost somewhere in creating the MWE and cross-checking with the userguide, where they use\include. – halcyon Feb 7 at 10:09