diff options
author | Karl Berry <karl@freefriends.org> | 2022-06-05 21:02:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-06-05 21:02:04 +0000 |
commit | 80aa3b5de37b11d9f895cf844adcd9bb8fc127d2 (patch) | |
tree | 1453475e0f24bea856956c6326dfba3ceb01fc3a /Master/texmf-dist/doc/lualatex/pyluatex/example/beamer.tex | |
parent | 4d435df3faff5acb9f1c0f0b94944c4285980c9e (diff) |
pyluatex (5jun22)
git-svn-id: svn://tug.org/texlive/trunk@63491 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/lualatex/pyluatex/example/beamer.tex')
-rw-r--r-- | Master/texmf-dist/doc/lualatex/pyluatex/example/beamer.tex | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/lualatex/pyluatex/example/beamer.tex b/Master/texmf-dist/doc/lualatex/pyluatex/example/beamer.tex index 6dea2ea6c96..31ba69db821 100644 --- a/Master/texmf-dist/doc/lualatex/pyluatex/example/beamer.tex +++ b/Master/texmf-dist/doc/lualatex/pyluatex/example/beamer.tex @@ -8,7 +8,7 @@ %% and version 1.3c or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\documentclass{beamer} +\documentclass[t]{beamer} \usepackage{pyluatex} \usepackage{listings} @@ -64,13 +64,17 @@ end %%%%%%%%%%%%%%%%%%%%%% frame \begin{frame}{Important} -Using PyLuaTeX environments (\emph{python} or \emph{pythonq}) inside BEAMER frames -requires the \emph{fragile} option for those frames. +Using PyLuaTeX environments (\texttt{python}, \texttt{pythonq}, or \texttt{pythonrepl}) inside BEAMER frames +requires the \texttt{fragile} option for those frames. + +\medskip +If you don't use overlays in a frame, i.e. the frame contains only a single slide, +you can use the \texttt{fragile=singleslide} option. \end{frame} %%%%%%%%%%%%%%%%%%%%%% frame -\begin{frame}[fragile]{Slide 1} +\begin{frame}[fragile=singleslide]{Python environment inside frame} \begin{pythonq} msg = 'Hello slide 1' @@ -96,27 +100,31 @@ msg = 'Hello slide 2' print(msg) \end{pythonq} -\begin{frame}{Slide 1} +\begin{frame}{Python environment outside frame} \pytypeset -The \emph{fragile} option is not required in this frame because -the \emph{pythonq} environment is outside the frame. -Only the macro \emph{\textbackslash pytypeset} for typesetting the code and output is inside +The \texttt{fragile} option is not required in this frame because +the \texttt{pythonq} environment is outside the frame. +Only the macro \texttt{\textbackslash pytypeset} for typesetting the code and output is inside the frame. + +\medskip +Inline Python still works: The result of \pyq{17 + 300}$\coderaw$ is \outputraw \end{frame} %%%%%%%%%%%%%%%%%%%%%% frame -\newenvironment{typesetpython} - {\PyLTVerbatimEnv\begin{pythonq}} - {\end{pythonq}\pytypeset} - -\begin{frame}[fragile]{Slide 2} -\begin{typesetpython} +\begin{frame}[fragile]{Overlays} +\begin{pythonq} msg = 'Custom environment' print(msg) -\end{typesetpython} +\end{pythonq} +\pytypeset +\pause + +In this frame, \texttt{fragile} is required instead of \texttt{fragile=singleslide}, +because we use overlays. \end{frame} \end{document} |