我正在尝试处理一张非常大的幻灯片,所以我用了allowframebreak
那个框架。在这种情况下它不起作用。
我制造了一个平均能量损失:
\documentclass[handout, hyperref={pdfpagelabels=false}]{beamer}
\usetheme{Madrid}
\let\Tiny=\tiny
\usecolortheme{whale}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usefonttheme{professionalfonts}
\usenavigationsymbolstemplate{}
\setbeamertemplate{footline}[frame number]
\setbeamertemplate{frametitle}[default][center]
\setbeamersize{text margin left=2em,text margin right=2em}
\usepackage[export]{adjustbox}
\usepackage{graphicx}
\usepackage{chemfig}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usepackage{ragged2e}
%%%<
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>
\AtBeginSection[]
{
\begin{frame}
\frametitle{Tabla de contenidos}
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
\section{Metodología}
\subsection{Consideraciones termodinámicas}
\begin{frame}[allowframebreaks]{Title} %HERE STARTS THE TROUBLE
\pagestyle{empty}
% Define block styles
\tikzstyle{block} = [rectangle, draw, fill=blue!20,
text width=8em, text centered, rounded corners, minimum height=3em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!20,
minimum height=2em]
\begin{tikzpicture}[node distance = 2cm, auto]
% Place nodes
\node [block] (react) {Reactantes};
\node [block, below of=react] (myc) {Generar microespecies y conformeros};
\node [block, below of=myc] (opt1) {Optimización (MOPAC)};
\node [block, below of=opt1] (solv) {Solvatación (programas)};
\node [block, below of=solv] (opt2) {Optimización (MOPAC)};
\node [block, left of=opt2, node distance=5cm] (metodo) {Revisar metodología};
\node [block, below of=opt2] (termo) {Cálculo termodinámico};
\node [block, below of=termo] (exp) {Contraste experiental};
\node [block, below of=exp] (decide) {¿Resultado aceptable?};
\node [block, below of=decide] (stop) {stop};
% Draw edges
\path [line] (react) -- (myc);
\path [line] (myc) -- (opt1);
\path [line] (opt1) -- (solv);
\path [line] (solv) -- (opt2);
\path [line] (opt2) -- (termo);
\path [line] (termo) -- (exp);
\path [line] (exp) -- (decide);
\path [line] (decide) -| node [near start] {no} (metodo);
\path [line] (decide) -- node {sí}(stop);
\path [line] (metodo) |- (myc);
\end{tikzpicture}
\end{frame}
\end{document}
您可以看到framebreak
已激活。图片对于幻灯片来说太长了,下面是一张:
答案1
不要破坏流程图,而是以另一种方式绘制它。
我已经使用了 来tikz matrix
帮tikz
你完成节点定位。
\documentclass[handout, hyperref={pdfpagelabels=false}]{beamer}
\usetheme{Madrid}
\let\Tiny=\tiny
\usecolortheme{whale}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usefonttheme{professionalfonts}
\usenavigationsymbolstemplate{}
\setbeamertemplate{footline}[frame number]
\setbeamertemplate{frametitle}[default][center]
\setbeamersize{text margin left=2em,text margin right=2em}
\usepackage[export]{adjustbox}
\usepackage{graphicx}
\usepackage{chemfig}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows.meta}
\usetikzlibrary{matrix}
\usepackage{ragged2e}
\AtBeginSection[]
{%
\begin{frame}
\frametitle{Tabla de contenidos}
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
\section{Metodología}
\subsection{Consideraciones termodinámicas}
\begin{frame}[fragile]{Title} % fragile otherwise you can't use % in matrix
\pagestyle{empty}
% Define block styles
\tikzset{% use tikzset instead of tikzstyle
block/.style ={rectangle, draw, fill=blue!20,
text width=4.7em, text centered, rounded corners, font={\scriptsize}, minimum height=7ex},
line/.style ={draw, -Stealth},
cloud/.style ={draw, ellipse,fill=red!20},
}
\begin{tikzpicture}
% Place nodes
\matrix[row sep=2ex,column sep=1em] {%
\node[block] (react) {Reactantes};&&&&[.8pt]\\
\node[block] (myc) {Generar microespecies y conformeros}; &
\node[block] (opt1) {Optimización (MOPAC)}; &
\node[block] (solv) {Solvatación (programas)}; &
\node[block] (opt2) {Optimización (MOPAC)}; \\
&&& \node[block] (termo) {Cálculo termodinámico}; \\
&&& \node[block] (exp) {Contraste experiental}; \\
\node[block] (metodo) {Revisar metodología};
&&& \node[block] (decide) {¿Resultado aceptable?}; &
\node[ellipse, draw, fill=blue!20, font={\scriptsize}] (stop) {stop};\\
};
% Draw edges
\path [line] (react) -- (myc);
\path [line] (myc) -- (opt1);
\path [line] (opt1) -- (solv);
\path [line] (solv) -- (opt2);
\path [line] (opt2) -- (termo);
\path [line] (termo) -- (exp);
\path [line] (exp) -- (decide);
\path [line] (decide) -- node[very near start, above, font={\scriptsize}] {no} (metodo);
\path [line] (decide) -- node[above, font={\scriptsize}] {sí} (stop);
\path [line] (metodo) -- (myc);
\end{tikzpicture}
\end{frame}
\end{document}