I have some trouble with beamer: I start with a simple example:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{default}
\begin{document}
\begin{frame}
first frame
\end{frame}
\end{document}
now I want to add some "logic", so I want to define something that helps me to controll the begin of the frames:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{default}
\newcommand{\myframe}{\begin{frame}}
\newcommand{\myend}{\end{frame}}
\begin{document}
\myframe
first frame
\myend
\myframe
second frame
\myend
\end{document}
and get errors when compiling:
Runaway argument?
\let \AtEndDocument \@firstofone \@enddocumenthook \@checkend {docume\ETC.
! File ended while scanning use of \beamer@collect@@body
Any Idea how can I redefine the beginning of beamer frames?
added simple example for if/then/else:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{default}
\usepackage{ifthen}
\newcommand{\myframe}{\begin{frame}}
\newcommand{\myend}{\end{frame}}
\newboolean{boolvar}
\setboolean{boolvar}{false}
\begin{document}
\begin{frame}
\ifthenelse{\boolean{boolvar}}{truecase}{falsecase}
\end{frame}
\end{document}
I want to have slides with different frametitels and/or subtitles, one of the problems are the repeated frametitles in articlemode. And I can't use allowframebreaks because that will break overlays including /pause. So the easiest solution, I guess, would be adding new frames (/end{frame}/begin{frame}{/oldframetitle}{newsubtitle}) for second/third slide of frame when in presentation mode and when in article mode ignore it or just add a newline or maybe the new subtile as a paragraph headline.
So the idea is:
\documentclass{beamer}
\newcommand{\nextslideyesno}{\ifthenelse{\boolean{boolvar}}{\end{frame}\begin{frame}}{falsecase}}
\usepackage[utf8]{inputenc}
\usepackage{default}
\newcommand{\myframe}{\begin{frame}}
\newcommand{\myend}{\end{frame}}
\begin{document}
\begin{frame}
first text
\nextslideyesno{}
second text
\end{frame}
\end{document}
but it also returns lots of errors.
\frame{ contents}
no re-defining needed!\newenvironment
to define amyframe
environment instead.