抱歉,如果这是愚蠢的,不知道乳胶现在在抱怨什么
\newif\ifhandout
\input{mytalk11.tex}
\setbeamertemplate{itemize items}[square] % change to default circle later
%\setbeamertemplate{theorems}[numbered]
\usepackage[algosection,ruled,lined,linesnumbered,longend]{algorithm2e}
\usepackage{algorithmic}
\usepackage[english]{babel}
\usepackage[normalem]{ulem}
\usepackage{minipage-marginpar}
\newcommand{\ECT}{\ensuremath{\textsc{ECT}}}
\usepackage{dsfont}
\def\theorem{\par\noindent{\bf Theorem.\ } \ignorespaces}
\usepackage{soul}
\newtheorem{nmbrs}[theorem]{Numbering}
\newtheorem{assump}[theorem]{Assumption}
\newtheorem{rem}[theorem]{Remark}
\newtheorem{conj}[theorem]{Conjecture}
\newtheorem{alg}[theorem]{Algorithm}
\newtheorem{result}[theorem]{Result}
\newtheorem{coroll}[theorem]{Corollary}
\newtheorem{theo}[theorem]{Theorem}
\newtheorem{defin}[theorem]{Definition}
\newtheorem*{theoreem}{Theorem}
\usepackage{floatrow}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=orange!30]
\begin{document}
\begin{frame}{}
\begin{figure}
\centering
\includegraphics[scale=0.27]{pic1.png}
\caption{}
\label{onethird}
\end{figure}
\end{frame}
\结束{文档}
mytalk.texcode:
%\handouttrue
\ifhandout
\documentclass[mathserif,11pt,handout]{beamer}
\else
\documentclass[onlymath,11pt]{beamer}
\usefonttheme{serif}
\fi
\usepackage{ifthen}
\usepackage{framed}
\usepackage{amsmath}
\usepackage{amssymb,graphicx}
\usepackage{mathbbol}
\usetheme{boxes}
%colour definition
\definecolor{mylightblue}{RGB}{204, 230, 230} %Remark
\definecolor{mydarkblue}{RGB}{0, 77, 77} %Remark Title
\definecolor{mylightpink}{RGB}{255, 217, 217} %Exercise
\definecolor{mydarkpink}{RGB}{166, 0, 0} %Exercise Title
\definecolor{mylightyellow}{RGB}{255, 255, 166}%Definition
\definecolor{mydarkbrown}{RGB}{125, 77, 0}%Definition Title
\definecolor{mylightpurple}{RGB}{217, 217, 255}%Theorem
\definecolor{mydarkpurple}{RGB}{0, 0, 128}%Theorem Title
\definecolor{mylightgreen}{RGB}{217, 255, 217}%Example
\definecolor{mydarkgreen}{RGB}{0, 128, 0} %Example Title
\definecolor{mygraydark}{RGB}{160,160,160}
\definecolor{mygraylight}{RGB}{240,240,240}
\definecolor{mybluedark}{HTML}{002239}
\definecolor{mybluelight}{HTML}{4FA2D7}
\definecolor{myyellow}{HTML}{BC9830}
\definecolor{myred}{HTML}{BE3100}
\definecolor{myblue}{HTML}{044B7A}
\definecolor{myalertred}{HTML}{BE3100} %alert colour
\definecolor{approvedgreen}{RGB}{0,85,0} % #006E00
%title bar grey
%change structure colors
\setbeamercolor{blue text}{fg=myblue}
\setbeamercolor{green text}{fg=mydarkgreen}
\setbeamercolor{red text}{fg=myred}
\setbeamercolor{structure}{fg=mygraydark}
\setbeamercolor{alerted text}{fg=myred}
\setbeamercolor{palette primary}{fg=black,bg=mybluedark}
\setbeamercolor{palette secondary}{fg=mybluedark,bg=mybluelight}
\setbeamercolor{palette tertiary}{fg=white,bg=mybluedark}
%\setbeamercolor{palette quaternary}{fg=black,bg=white}
%Add footline
\addfootbox{palette secondary}{\hfill\insertshorttitle\quad}
\addfootbox{palette tertiary}{\quad
\insertsection
\ifx\insertsubsection\empty \else ~-- \insertsubsection \fi
}
%Titles
\setbeamercolor{titlelike}{parent=palette secondary}
\setbeamerfont{title}{series=\bfseries}
\setbeamerfont{frametitle}{series=\bfseries}
\setbeamerfont{block title}{series=\bfseries}
\newcommand{\heading}[1]{\textcolor{mygraydark}{\textbf{#1}} \vspace{0.7em}}
%remove navigation symbols
\setbeamertemplate{navigation symbols}{}
%itemized and enumerated lists
\setbeamertemplate{itemize items}[triangle]
\setbeamertemplate{enumerate items}[square]
\setbeamercolor{item}{fg=black}
\setbeamercolor{enumerate item}{fg=black}
%create green box for examples
\setbeamercolor*{block title example}{fg=mydarkgreen,
bg= mylightgreen}
\setbeamercolor*{block body example}{fg= black,
bg= mylightgreen}
%remark block
\newenvironment<>{remark}
{\setbeamercolor{block title}{fg=mydarkblue,bg=mylightblue}%
\setbeamercolor{block body}{fg=black,bg=mylightblue}%
\begin{block}{Remark} #1}
{\end{block}}
%remarks block
\newenvironment<>{remarks}
{\setbeamercolor{block title}{fg=mydarkblue,bg=mylightblue}%
\setbeamercolor{block body}{fg=black,bg=mylightblue}%
\begin{block}{Remarks} #1}
{\end{block}}
%Exercise block
\newenvironment<>{exercise}
{\setbeamercolor{block title}{fg=mydarkpink, bg=mylightpink}%
\setbeamercolor{block body}{fg=black,bg=mylightpink}%
\begin{block}{Exercise} #1}
{\end{block}}
%Definition block
\newenvironment<>{defn}
{\setbeamercolor{block title}{fg=mydarkbrown, bg=mylightyellow}%
\setbeamercolor{block body}{fg=black,bg=mylightyellow}%
\begin{block}{Definition} #1}
{\end{block}}
%Theorem block
\newenvironment<>{theorem}
{\setbeamercolor{block title}{fg=mydarkpurple, bg=mylightpurple}%
\setbeamercolor{block body}{fg=black,bg=mylightpurple}%
\begin{block}{Theorem} #1}
{\end{block}}
\newenvironment<>{lemma}
{\setbeamercolor{block title}{fg=mydarkpurple, bg=mylightpurple}%
\setbeamercolor{block body}{fg=black,bg=mylightpurple}%
\begin{block}{Lemma} #1}
{\end{block}}
\newenvironment<>{lem}[1]
{\setbeamercolor{block title}{fg=mydarkpink, bg=mylightpink}%
\setbeamercolor{block body}{fg=black,bg=mylightpink}%
\begin{block}{#1} #2}
{\end{block}}
\newenvironment<>{cor}
{\setbeamercolor{block title}{fg=mydarkpurple, bg=mylightpurple}%
\setbeamercolor{block body}{fg=black,bg=mylightpurple}%
\begin{block}{Corollary} #1}
{\end{block}}
\newenvironment<>{prop}
{\setbeamercolor{block title}{fg=mydarkpurple, bg=mylightpurple}%
\setbeamercolor{block body}{fg=black,bg=mylightpurple}%
\begin{block}{Proposition} #1}
{\end{block}}
\newenvironment<>{claim}
{\setbeamercolor{block title}{fg=mydarkpurple, bg=mylightpurple}%
\setbeamercolor{block body}{fg=black,bg=mylightpurple}%
\begin{block}{Claim} #1}
{\end{block}}
\newenvironment<>{thm}[1]
{\setbeamercolor{block title}{fg=black, bg=mygraydark}%
\setbeamercolor{block body}{fg=black,bg=mygraylight}%
\begin{block}{#1} #2}
{\end{block}}
\newenvironment<>{mybox}[1]
{\setbeamercolor{block title}{fg=black, bg=mygraydark}%
\setbeamercolor{block body}{fg=black,bg=mygraylight}%
\begin{block}{#1} #2}
{\end{block}}
%Question block
\newenvironment<>{question}[1]
{\setbeamercolor{block title}{fg=mydarkpink, bg=mylightpink}%
\setbeamercolor{block body}{fg=black,bg=mylightpink}%
\begin{block}{Question} #1 #2}
{\end{block}}
\newenvironment<>{obs}[1]
{\setbeamercolor{block title}{fg=mydarkblue, bg=mylightblue}%
\setbeamercolor{block body}{fg=black,bg=mylightblue}%
\begin{block}{#1} #2}
{\end{block}}
%recap block
\newenvironment<>{recap}
{\setbeamercolor{block title}{fg=mydarkblue,bg=mylightblue}%
\setbeamercolor{block body}{fg=black,bg=mylightblue}%
\begin{block}{Recap} #1}
{\end{block}}
\newenvironment<>{idea}
{\setbeamercolor{block title}{fg=mydarkbrown, bg=mylightyellow}%
\setbeamercolor{block body}{fg=black,bg=mylightyellow}%
\begin{block}{Idea} #1}
{\end{block}}
\newenvironment<>{myproof}
{\setbeamercolor{block title}{fg=mygraydark, bg=mygraylight}%
\setbeamercolor{block body}{fg=black,bg=mygraylight}%
\begin{block}{Proof} #1}
{\end{block}}
\newenvironment<>{myproblem}
{\setbeamercolor{block title}{fg=mygraydark, bg=mygraylight}%
\setbeamercolor{block body}{fg=black,bg=mygraylight}%
\begin{block}{Problem} #1}
{\end{block}}
%
\renewenvironment{proof}{{\bf Proof: }}{\qed}
%new Commands
% Sets
\newcommand{\A}{{\mathbb{A}}}
\newcommand{\C}{{\mathbb{C}}}
\newcommand{\N}{{\mathbb{N}}}
\newcommand{\Q}{{\mathbb{Q}}}
\newcommand{\R}{{\mathbb{R}}}
\newcommand{\Z}{{\mathbb{Z}}}
\newcommand{\F}{{\mathbb{F}}}
% bases
\newcommand{\mA}{\mathcal{A}}
\newcommand{\mB}{\mathcal{B}}
\newcommand{\mC}{\mathcal{C}}
\newcommand{\mD}{\mathcal{D}}
\newcommand{\mP}{\mathcal{P}}
\newcommand{\mS}{\mathcal{S}}
\newcommand{\mT}{\mathcal{T}}
% vector spaces/subspaces
\newcommand{\vsD}{\mathbb{D}}
\newcommand{\vsL}{\mathbb{L}} % vector space of linear mappings
\newcommand{\vsP}{\mathbb{P}}
\newcommand{\vsS}{\mathbb{S}}
\newcommand{\vsT}{\mathbb{T}}
\newcommand{\vsU}{\mathbb{U}}
\newcommand{\vsV}{\mathbb{V}}
\newcommand{\vsW}{\mathbb{W}}
\newcommand{\W}{\mathbb{W}}
% commonly used notations
\newcommand{\sys}[2]{\left[ #1 \mid #2 \right]}
% functions + special set operators
\newcommand{\real}{\operatorname{Re}}
\newcommand{\imag}{\operatorname{Im}}
\newcommand{\diag}{\operatorname{diag}}
\newcommand{\adj}{\operatorname{adj}}
\newcommand{\rank}{\operatorname{rank }}
\newcommand{\spn}{\operatorname{Span}}
\newcommand{\proj}{\operatorname{proj}}
\newcommand{\prp}{\operatorname{perp}}
\newcommand{\refl}{\operatorname{refl}}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\nul}{\operatorname{Null}}
\newcommand{\nully}{\operatorname{nullity}}
\newcommand{\range}{\operatorname{Range}}
\newcommand{\col}{\operatorname{Col}}
\newcommand{\row}{\operatorname{Row}}
\newcommand{\cof}{\operatorname{cof}}
\newcommand{\Num}{\operatorname{Num}}
\newcommand{\Id}{\operatorname{Id}}
\newcommand{\inj}{\operatorname{inj}}
\newcommand{\DOT}{\operatorname{DOT}}
\newcommand{\CROSS}{\operatorname{CROSS}}
\newcommand{\ip}[2]{\langle #1, #2\rangle} % inner products
%vectors in R^n
\newcommand{\vzero}{\overrightarrow{0}}
\newcommand{\va}{\overrightarrow{a}}
\newcommand{\vb}{\overrightarrow{b}}
\newcommand{\vc}{\overrightarrow{c}}
\newcommand{\vd}{\overrightarrow{d}}
\newcommand{\ve}{\overrightarrow{e}}
\newcommand{\vf}{\overrightarrow{f}}
\newcommand{\vg}{\overrightarrow{g}}
\newcommand{\vh}{\overrightarrow{h}}
\newcommand{\vJ}{\overrightarrow{J}}
\newcommand{\vm}{\overrightarrow{m}}
\newcommand{\vn}{\overrightarrow{n}}
\newcommand{\vp}{\overrightarrow{p}}
\newcommand{\vq}{\overrightarrow{q}}
\newcommand{\vr}{\overrightarrow{r}}
\newcommand{\vs}{\overrightarrow{s}}
\newcommand{\vt}{\overrightarrow{t}}
\newcommand{\vtt}{\overrightarrow{t}\thinspace ^2}
\newcommand{\vu}{\overrightarrow{u}}
\newcommand{\vv}{{\overrightarrow{v}}}
\newcommand{\vw}{\overrightarrow{w}}
\newcommand{\vx}{\overrightarrow{x}}
\newcommand{\vy}{\overrightarrow{y}}
\newcommand{\vz}{\overrightarrow{z}}
\newcommand{\pfx}{\frac{\partial f}{\partial x}}
\newcommand{\pfy}{\frac{\partial f}{\partial y}}
\newcommand{\px}{\frac{\partial}{\partial x}}
\newcommand{\pxn}[1]{\frac{\partial f}{\partial x_{#1}}}
\newcommand{\py}{\frac{\partial}{\partial y}}
\newcommand{\jacu}{\frac{\partial(u,v)}{\partial(x,y)}}
\newcommand{\jacx}{\frac{\partial(x,y)}{\partial(u,v)}}
\newcommand{\defbf}[1]{{\bf #1}}
%environments
\def\soln{\vskip10pt\noindent {\bf Solution:} }
%\newcommand{\lec}[1]{\vskip15pt\noindent\underline{\bf Lecture #1 :}\vskip10pt}
%\newcommand{\con}{\noindent\underline{Content:} \hskip5pt}
\newcommand{\prob}{\vskip10pt\noindent\underline{Problem:} \hskip5pt}
\newcommand{\ex}[1]{\vskip10pt\noindent\underline{Example #1:}\hskip7pt}
%\newcommand{\defn}{\vskip10pt\noindent\underline{Definition:}\hskip7pt}
\renewcommand{\note}{\vskip5pt\noindent{\bf Note:}\hskip5pt}
\newcommand{\rema}{\vskip5pt\noindent{\bf Remark:}\vskip5pt\noindent}
\newcommand{\notes}{\vskip5pt\noindent{\bf Notes:}\vskip5pt\noindent}
\newcommand{\proofd}{\vskip5pt\noindent{\bf Proof:}\hskip7pt}
\newcommand{\proofno}{\vskip5pt\noindent{\bf Proof:}\thickspace}
\newcommand{\notation}{\vskip5pt\noindent{\bf Notation:}\vskip5pt\noindent}
%my stuff
\newcommand{\squeeze}[2]{
\begin{center}\begin{minipage}{#1\textwidth}
#2 \end{minipage}\end{center}}
\newcommand{\squeezenc}[2]{
\begin{minipage}{#1\textwidth}
#2 \end{minipage}}
\newcommand{\cols}[4]{
\begin{columns}[T]
\begin{column}{#1\textwidth}
#3
\end{column}
\begin{column}{#2\textwidth}
#4
\end{column}
\end{columns}
}
\newcommand{\ovl}[2]{
\begin{overlayarea}{\textwidth}{#1\textheight}
#2
\end{overlayarea}
}
\newcommand{\opt}{\ensuremath{\mbox{opt}}}
\newcommand{\blue}[1]{{\usebeamercolor[fg]{blue text} #1}}
\newcommand{\green}[1]{\textcolor{approvedgreen}{#1}}
\newcommand{\red}[1]{{\usebeamercolor[fg]{red text} #1}}
\newcommand{\0}{\mathbb{0}}
\newcommand{\1}{\mathbb{1}}
% \newcommand{\st}{\mbox{s.t.}}
\newlength{\wideitemsep}
\newlength{\origitemsep}
\setlength{\origitemsep}{\itemsep}
\setlength{\wideitemsep}{\itemsep}
\addtolength{\wideitemsep}{1pt}
\let\olditem\item
\renewcommand{\item}{\setlength{\itemsep}{\wideitemsep}\olditem}
答案1
发布的示例完全不合理。您可以通过删除测试文档中未使用的代码来制作一个最小示例,如下所示
\documentclass[onlymath,11pt]{beamer}
\usepackage{floatrow}
\begin{document}
\begin{frame}{}
\begin{figure}
\centering
\includegraphics[scale=0.27]{example-image.png}
\caption{}
\label{onethird}
\end{figure}
\end{frame}
\end{document}
beamer
不支持浮点数,但它定义了figure
和table
其工作方式与[H]
浮点包中的浮点数类似,并且始终在使用时进行排版。
该floatrow
包假设一个正常的浮动环境,并figure
以与以下方式不兼容的方式定义beamer
定义,您可以简单地将其删除。