0

There was one very difficult question, maybe you can help, give recommendations!

Statement of a question:

It is necessary to prepare a course of lectures on "Linear Algebra", there will be many figures and tables, slide format 16:9, output file in .pdf format. However, I choose LaTeX directly as a source. The main problem is this:

For now, the preamble looks like this (compile in overleaf):

\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}

My troubleshooting: the template was chosen other authors, of course, all the text and formulas are just for testing and demonstrating the possibilities, I note that the manual for the beamer class describes very little about the elements of setting and setting the parameters of the template, for example, one of the problems is clearly reflected in the Mathematics block (Readable Mathematics) -- in fact, we can consider that the beginning of each section is the subtitle of each single lecture, and chapter is the lecture itself. For the Readable Mathematics section, the problem is that when you create an additional frame, it automatically creates a numbering and subtitle Readable Mathematics I, Readable Mathematics II - it's enough for me to create Readable Mathematics I alone, and the material on other slides was a continuation and slide was empty, and all its space could be filled with text until I created a new subsection. In documents of classes article or book, such problems are solved, and you can create a structure similar to a book, there is no such thing in beamer (more precisely, I did not find it, probably).

The figure below is an illustration of the situation described above: enter image description here

How to set such options for beamer template?

8
  • All your "problems" sound solvable in beamer, but having them all in one question is way too broad. If you would ask them in individual questions, I'm sure you would get solutions. Aug 22, 2023 at 11:04
  • ... also the code in your question does not compile Aug 22, 2023 at 11:05
  • @ samcarter_is_at_topanswers.xyz I work in Overleaf, sorry for my not clarify question, I will eit this question
    – Alex
    Aug 22, 2023 at 11:06
  • Just because overleaf is good at hiding error messages, does not mean that the code as shown in this questions works there. There is still a missing % in the preamble. Aug 22, 2023 at 11:08
  • 1
    Note that you should not use $$ or \indent in a document and you should change comments if changing code (to avoid confusing yourself later). All your initial comments do not match the lines you comment, eg % 2. Indent margin 1.25 cm \setlength{\parindent}{1.15cm} Aug 22, 2023 at 11:16

1 Answer 1

2

You can redefine the frametitle so that it is only shown on the first slide of an allowframebreaks frame:

\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}

enter image description here

5
  • This is solution, but after compiling I get the same error \insertframetitle ...insertframetitlecontinuation \fi } Undefined control sequence. -- Probably, this bug only in overleaf!
    – Alex
    Aug 22, 2023 at 11:32
  • Overleaf's beamer version is too old, this needs at least beamer v3.69. Aug 22, 2023 at 11:38
  • @Alex For the ancient beamer version from overleaf, you could use something like overleaf.com/read/bxnzskmvmpwh Aug 22, 2023 at 11:42
  • Thanks a lot, tempalte work perfectly!
    – Alex
    Aug 22, 2023 at 11:50
  • @Alex You're welcome! Aug 22, 2023 at 11:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .