我不明白为什么第 40 行会出现错误,尽管我看不出这里有什么问题。请帮忙。我知道这个问题可能会被搁置,因为它可能对其他人没有用。
\documentclass[]{beamer}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{makeidx}
\usepackage{graphicx}
\author{}
\title{Upper GI bleeding}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
%---------------------------------------------------------------------------------
\section*{Presentation of upper GI bleeding}
\begin{frame}{Presentation of upper gastrointestinal bleeding}
\begin{itemize}
\item hematemesis or melena
\item iron deficiency anemia
\end{itemize}
\begin{description}
\item[Hematemesis ] Vomiting containing fresh or altered blood
\item[Melena] tarry black stool with offensive smell
\item[hematochezia] fresh blooding per rectum
\end{description}
\end{frame}
%--------------------------------------------------------------------------------------------------
\subsection{Hematemesis and melena}
\begin{frame}
\frametitle{Hematemesis or melena}
\begin{itemize}
\item Significant amount of bleeding required
\item blood is an irritant for GIT- vomited or will produce diarrhea
\item At least $500 ml$ of blood is required to produce melena.
\item Depending upon amount of bleeding, patient will have
\begin{itemize}
\item tachycardia,
\item tachycardia and postural hypotension
\item tachycardia, hypotension, and altered mentation
\end{itemize}
\end{itemize}
\end{frame}
%---------------------------------------------------------------------------
\subsection*{Iron deficiency anemia}
\begin{frame}
\frametitle {Iron deficiency anemia}
\begin{description}\item [Iron deficirncy anemia]
develops when the person bleeds slowly for a long period .
\end{description}
\end{frame}
%----------------------------------------------------------------------------------
\section*{The primary management}
\subsection*{Airway, breathing and circulation}
\subsection*{blood products}
\subsection*{Specific Drugs}
\section*{Source Identification}
\subsection*{Upper gi endoscopy}
\subsection*{Angiography}
\subsection*{Imaging }
\subsection*{Surgery}
\section*{Treatment of source}
\subsection*{Endoscopic management}
\subsection*{Angiography}
\subsection*{Surgery}
\section*{Prognosis}
\end{document}
答案1
该代码在另一个类中是合法的,尽管它不会给出预期的结果,因为由于部分编号尚未分步,因此子部分编号为“0.1”。
问题是\subsection
,中的beamer
必须与明确的章节编号相关。因此您需要\section{Presentation of upper GI bleeding}
或完全避免编号 ( \setcounter{secnumdepth}{0}
)。
答案2
错误原因已经解释过了egreg 的评论。因此本答案增加了一个提示。
如果您不想有编号部分,则可以通过设置计数器来关闭编号secnumdepth
,例如:
\setcounter{secnumdepth}{0}
这样做的好处是可以生成书签。
为了更快地更新书签,我建议添加包bookmark
:
\documentclass{beamer}
\usepackage{bookmark}