有一个非常难的问题,也许您可以帮忙,给出建议!
问题陈述:
需要准备一门关于“线性代数”的讲座课程,会有很多图表,幻灯片格式为 16:9,输出文件为 .pdf 格式。不过我直接选择 LaTeX 作为来源。主要问题是:
目前,序言如下所示(在背面编译):
\documentclass[aspectratio=169, 10pt]{beamer}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usefonttheme{professionalfonts}
\usepackage{concmath}
\usefonttheme{serif}
\usepackage{setspace}
\usepackage{indentfirst}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{ragged2e}
\usepackage{etoolbox}
% 1. Line spacing 1.15
\setstretch{1.0}
% 2. Indent margin 1.25 cm
\setlength{\parindent}{1.15cm}
% 3. Indentation between adjacent paragraphs 12pt (double)
\setlength{\parskip}{4pt}
\setlength{\emergencystretch}{3em}
\expandafter\def\expandafter\normalsize\expandafter{%
\normalsize
\setlength\abovedisplayskip{4pt}
\setlength\belowdisplayskip{4pt}
\setlength\abovedisplayshortskip{4pt}
\setlength\belowdisplayshortskip{4pt}
}
\makeatletter
\newcommand{\repar}{\vspace{-4pt}}
\renewcommand{\indent}{\hspace*{20pt}}
\setbeamertemplate{frametitle}[default][center]
\setbeamersize{text margin left=2em,text margin right=2em}
\setbeamerfont{title}{size=\LARGE}
\setbeamerfont{subtitle}{size=\Large}
\setbeamerfont{frametitle}{size=\Large}
\setbeamerfont{block title}{size=\normalsize}
\setbeamerfont{footline}{size=\normalsize}
\usebeamercolor{structure}
\setbeamercolor{normal text}{fg=black}
\setbeamercolor{structure}{bg=black!20,fg=black}
% \addtobeamertemplate{frametitle}{}{\vspace*{-1ex}\rule{\textwidth}{1pt}}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{footline}{%
\centering
\begin{minipage}{\dimexpr\paperwidth-\beamer@leftmargin-\beamer@rightmargin\relax}
\vspace{-4ex}
\centering
\rule{\linewidth}{1pt} \vskip 1pt
\usebeamerfont{footline}%
\usebeamercolor{footline}%
% \hfill\insertpagenumber/\inserttotalframenumber
\hfill\insertpagenumber
\hfill%
\llap{\insertframenavigationsymbol\insertbackfindforwardnavigationsymbol}\par
\end{minipage}\vskip1pt
}
\makeatother
\title{\textbf{Linear Algebra}}
\author{Author}
\date{Date}
\apptocmd{\frame}{}{\justifying}{}
\begin{document}
\begin{frame}
\thispagestyle{empty}
\titlepage
\end{frame}
\begin{frame}{Contents}
\tableofcontents[sections=1]
\tableofcontents[sections=2]
\end{frame}
\section{Introduction}
\begin{frame}{Introduction}
\begin{itemize}
\item Your introduction goes here!
\item Use \texttt{itemize} to organize your main points.
\end{itemize}
\vskip 1cm
\end{frame}
\section{Mathematics}
\begin{frame}[allowframebreaks,allowdisplaybreaks]{Readable Mathematics}
\indent Let $X_1, X_2, \ldots, X_n$ be a sequence of independent and identically distributed random variables with $\text{E}[X_i] = \mu$ and $\text{Var}[X_i] = \sigma^2 < \infty$, and let
$$S_n = \frac{X_1 + X_2 + \cdots + X_n}{n}
= \frac{1}{n}\sum_{i}^{n} X_i = \int_{a}^{b} f(x_i) dx$$
\repar denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$.
\indent denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$. denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$. denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$. denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$.
denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$. denote their mean.
Let $X_1, X_2, \ldots, X_n$ be a sequence of independent and identically distributed random variables with $\text{E}[X_i] = \mu$ and $\text{Var}[X_i] = \sigma^2 < \infty$, and let
$$S_n = \frac{X_1 + X_2 + \cdots + X_n}{n}
= \frac{1}{n}\sum_{i}^{n} X_i = \int_{a}^{b} f(x_i) dx$$
\repar denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$.
\indent denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$. denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$. denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$. denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$.
denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$. denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge \textbf{in distribution} to a normal $\mathcal{N}(0, \sigma^2)$.
\end{frame}
\end{document}
我的故障排除:该模板是其他作者选择的,当然,所有的文字和公式只是为了测试和展示可能性,我注意到,beamer 类的手册很少描述设置元素和设置模板的参数,例如,其中一个问题清楚地反映在数学块(可读数学)中 - 事实上,我们可以认为每个部分的开头是每个单个讲座的副标题,而章节是讲座本身。对于可读数学部分,问题是当您创建一个附加框架时,它会自动创建一个编号和副标题可读数学 I,可读数学 II - 对我来说,单独创建可读数学 I 就足够了,其他幻灯片上的材料是延续,幻灯片是空的,它的所有空间都可以用文本填充,直到我创建新的小节。在课程article
或的文档中book
,这样的问题得到了解决,你可以创建一个类似于书的结构,在 beamer 中没有这样的东西(更准确地说,我没有找到它,可能)。
如何为 beamer 模板设置这样的选项?
答案1
您可以重新定义框架标题,以便它仅显示在框架的第一张幻灯片上allowframebreaks
:
\documentclass[aspectratio=169, 10pt]{beamer}
\makeatletter
\long\def\beamer@@frametitle[#1]#2{%
\ifblank{#2}{}{%
\ifnum\beamer@autobreakcount<2
\gdef\insertframetitle{{%
#2%
}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
\fi%
}%
}
\makeatother
\usepackage{lipsum}
\setbeamertemplate{frametitle}[default][center]
\begin{document}
\section{Mathematics}
\begin{frame}[allowframebreaks,allowdisplaybreaks]
\frametitle{Readable Mathematics}
\lipsum
\end{frame}
\end{document}