0

According to example from http://texdoc.net/texmf-dist/doc/latex/beamer/beameruserguide.pdf#subsubsection.8.2.2 the following code I think should work:

\documentclass{beamer}
\usepackage{lipsum}

\begin{document}

\begin{frame}{E}
\hskip-\beamer@leftmargin
\lipsum[2]
\end{frame}

\end{document}

However compilation with pdflatex -synctex=1 -interaction=nonstopmode test.tex fails with subj error at line 180 of the log https://pastebin.com/HmRdN0Vc .

Can anyone explain what's going wrong here?

  • @siracusa Thank you for pointing to the right direction! Adding those commands around the frame environment solved the problem. Curiously, those commands seem to be disabled inside the frame environment. I think your comment can be made into the answer. – Roman Orekhov Aug 22 '19 at 22:12
1

@ normally cannot be part of a command name because it has catcode 12 (other), while command name characters need to have catcode 11 (letter). The solution is to wrap your frame in \makeatletter ... \makeatother to change the catcode of @ properly (see also this question):

\makeatletter
\begin{frame}{E}
\hskip-\beamer@leftmargin
\lipsum[2]
\end{frame}
\makeatother

As for the issue of using these macros inside the frame, beamer doesn't seem to process the frame's content in normal paragraph building mode, but reads its content in form of the argument of a macro call. At that moment all catcodes inside the frame are fixed and cannot be changed anymore. \makeatletter thus won't have any effect. There's an option fragile to allow contents with catcode changes, though:

\begin{frame}[fragile]{E}
\makeatletter
\hskip-\beamer@leftmargin
\makeatother
\lipsum[2]
\end{frame}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.