我为我主持的一场智力竞赛节目设计了几张幻灯片。这个问题是关于在每张幻灯片中以不同方式编辑标题。作为参考,请参阅我的输出 pdf 在此处。
- 在第一张幻灯片中,标题应保持空白。
- 在第二张幻灯片中,第一个(红色)标题应包含单词“规则”。
- 第三张幻灯片的第一个(红色)标题应该有“1. 问题”。
- 第四张幻灯片的第二个(灰色)标题中应该有“1. 答案”。
- 幻灯片 5、6、7 应该有“问题编号.问题”在第一个(红色)标题中。
- 第八张幻灯片的第二个(灰色)标题中应该有“答案”,依此类推。
请告诉我如何实现这一点。另外,我需要有一个计数器和子计数器用于问题,另一个计数器用于答案,它们将分布在不同的幻灯片中。我的意思是这样的:
\begin{questions}
\begin{frame}
\question
question. %Output will have the question no. "1. Question"
\end{frame}
\begin{frame}
\subquestion
question. %Output will have the question no. "1.1. Question"
\end{frame}
\end{questions}
类似地,答案也一样。我在这里问两个问题,因为我认为我的第一个关于标题的查询可以通过定义计数器来实现。我的完整代码如下:
\documentclass[a4paper]{beamer}
\usepackage{nccmath}
\usefonttheme{serif}
\usepackage{xcolor}
\definecolor{sapphire}{rgb}{0.03, 0.15, 0.4}
\definecolor{zinnwalditebrown}{rgb}{0.17, 0.09, 0.03}
\newcommand{\bg}[1]{\usebackgroundtemplate{\includegraphics[width=\paperwidth,height=\paperheight]{#1}}}
\setbeamertemplate{enumerate subitem}{(\textbf{\alph{enumii}})}
\setbeamertemplate{enumerate item}{\textbf{\alph{enumi}.}}
\usepackage{tfrupee}
\usepackage{ragged2e}
\usepackage{etoolbox}
\usetheme{CambridgeUS}
\author[\textsc{Wagon Round}]{}
\title[QUIZZOMANIA]{\color{sapphire}\huge \textsc{Wagon Round}}
\date[\today]{}
\begin{document}
%
%Title Page
%
\bg{qn.jpg}
\begin{frame}
\titlepage
\end{frame}
%
%Rules
%
\bg{qn.jpg}
\begin{frame}[c]\huge
\vspace{2ex}
\begin{center}
\color{zinnwalditebrown}\Large\underline{\textbf{RULEs:}}
\end{center}
\begin{itemize}\color{black}\large
\item There will be four main questions with 3 bonus questions to each question.
\item You need to press the buzzer to answer the main question. If you answer it correctly, three bonus questions will be there only for your team to answer.
\item Correct answer to the main questions will fetch you 20 points and wrong answer will deduct 20 points.
\item Bonus questions will carry 10 marks each. You need to answer them within 10 seconds. There is no negative marking for the bonus questions.
\end{itemize}
\end{frame}
%
%
%Qn 1.
%
%
\bg{qn.jpg}
\begin{frame}[c]
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{1. Question:}}
\end{center}
\Large\normalcolor What is the value of \[ \dfrac{1^{3}+2^{3}+3^{3}+4^{3}+5^{3}}{1+2+3+4+5}? \]
\end{frame}
%
%Ans 1.
%
\bg{ans.jpg}
\begin{frame}[c]\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{1. Answer:}}
\end{center}
\vspace{5ex} \normalcolor\centering\textbf{\huge 15.}\vspace{2ex}
\large\[ \dfrac{1^{3}+2^{3}+3^{3}+4^{3}+5^{3}}{1+2+3+4+5}=\dfrac{(1+2+3+4+5)^{2}}{1+2+3+4+5}=15. \]
\end{frame}
%
%Qn 1.1.
%
\bg{qn.jpg}
\begin{frame}[c]
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{1.1. Question:}}
\end{center}
\centering\Large\normalcolor Which instrument is used to measure the force and velocity of the wind?
\end{frame}
%
%Qn 1.2.
%
\bg{ans.jpg}
\begin{frame}[c]\vspace{2ex}
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{1.2. Question:}}
\end{center}
\centering\Large\normalcolor Which probability distribution has its expectation same as its variance?
\end{frame}
%
%Qn 1.3.
%
\bg{qn.jpg}
\begin{frame}[c]
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{1.3. Question:}}
\end{center}
\centering\Large\normalcolor Which company invented the GUI (Graphical User Interface)?
\end{frame}
%
%Ans 1.1-1.3.
%
\bg{ans.jpg}
\begin{frame}[c]\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{Answers:}}
\end{center}
\vspace{2ex} \normalcolor
\Large\begin{itemize}
\item 1.1: Anemometer.
\item 1.2: Poisson distribution.
\item 1.3: Xerox.
\end{itemize}
\end{frame}
%
%
%Qn 2.
%
%
\bg{qn.jpg}
\begin{frame}[c]
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{2. Question:}}
\end{center}
\Large\normalcolor The measure of kurtosis of a distribution is \[ \gamma_2=\frac{\mu_4}{\mu_2^2}-3. \]
Why do we subtract 3 from $ \frac{\mu_4}{\mu_2^2} $?
\end{frame}
%
%Ans 2.
%
\bg{ans.jpg}
\begin{frame}[c]\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{2. Answer:}}
\end{center}
\vspace{5ex} \normalcolor\Large To compare it with Normal distribution. For a Normal distribution, $ \frac{\mu_4}{\mu_2^2}=3 $.
\end{frame}
%
%Qn 2.1.
%
\bg{qn.jpg}
\begin{frame}[c]
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{2.1. Question:}}
\end{center}
\centering\Large\normalcolor What is the SI unit of magnetic field strength?
\end{frame}
%
%Qn 2.2.
%
\bg{ans.jpg}
\begin{frame}[c]\vspace{2ex}
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{2.2. Question:}}
\end{center}
\centering\Large\normalcolor Which company invented BlueTooth technology?
\end{frame}
%
%Qn 2.3.
%
\bg{qn.jpg}
\begin{frame}[c]
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{2.3. Question:}}
\end{center}
\centering\Large\normalcolor Which principle does optical fibre work on?
\end{frame}
%
%Ans 2.1-2.3.
%
\bg{ans.jpg}
\begin{frame}[c]\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{Answers:}}
\end{center}
\vspace{2ex} \normalcolor
\Large\begin{itemize}
\item 2.1: Tesla.
\item 2.2: Ericsson.
\item 2.3: Total internal reflection.
\end{itemize}
\end{frame}
%
%
%Qn 3.
%
%
\bg{qn.jpg}
\begin{frame}[c]
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{3. Question:}}
\end{center}
\Large\normalcolor What is the value of \[ \int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}xe^{-\frac{x^2}{2}}dx\ ? \]
\end{frame}
%
%Ans 3.
%
\bg{ans.jpg}
\begin{frame}[c]\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{3. Answer:}}
\end{center}
\vspace{5ex}
\begin{center}
\normalcolor\textbf{\huge 0.}
\end{center}
\Large It is an odd function integrated over a symmetric interval around 0. Also it is the first order central moment of the standard normal distribution.
\end{frame}
%
%Qn 3.1.
%
\bg{qn.jpg}
\begin{frame}[c]
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{3.1. Question:}}
\end{center}
\Large\normalcolor What is the minimum number of steps required to shift a Tower of Hanoy with $ n $ disks and 3 pegs from one peg to other?
\end{frame}
%
%Qn 3.2.
%
\bg{ans.jpg}
\begin{frame}[c]\vspace{2ex}
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{3.2. Question:}}
\end{center}
\Large\normalcolor\centering What is the anti-particle of electron?
\end{frame}
%
%Qn 3.3.
%
\bg{qn.jpg}
\begin{frame}[c]
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{3.3. Question:}}
\end{center}
\Large\normalcolor\centering What is the fastest memory in a Computer system?
\end{frame}
%
%Ans 3.1-3.3.
%
\bg{ans.jpg}
\begin{frame}[c]\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{Answers:}}
\end{center}
\vspace{2ex} \normalcolor
\Large\begin{itemize}
\item 3.1: $ 2^{n}-1 $.
\item 3.2: Positron.
\item 3.3: Register.
\end{itemize}
\end{frame}
%
%
%Qn 4. NOT DONE!!!!!!
%
%
\bg{qn.jpg}
\begin{frame}[c]
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{4. Question}}
\end{center}
\Large\normalcolor What is the simplified boolean expression of the function \[ F(A,B,C)=\sum_{m}(0,2,3,4,6,7)\ ? \]
\end{frame}
%
%Ans 3.
%
\bg{ans.jpg}
\begin{frame}[c]\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{4. Answer:}}
\end{center}
\begin{center}
\normalcolor\textbf{\huge \[ B+\bar{C}. \]}
\end{center}
\end{frame}
%
%Qn 4.1.
%
\bg{qn.jpg}
\begin{frame}[c]
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{4.1. Question:}}
\end{center}
\Large\normalcolor\centering Which programming language was used mostly to develop MicroSoft Office?
\end{frame}
%
%Qn 4.2.
%
\bg{ans.jpg}
\begin{frame}[c]\vspace{2ex}
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{4.2. Question:}}
\end{center}
\Large\normalcolor\centering Which phenomenon is involved in the soaking of ink by blotting papers?
\end{frame}
%
%Qn 4.3.
%
\bg{qn.jpg}
\begin{frame}[c]
\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{4.3. Question:}}
\end{center}
\Large\normalcolor\centering Which American Computer company is also known as the ``Big Blue"?
\end{frame}
%
%Ans 4.1-4.3.
%
\bg{ans.jpg}
\begin{frame}[c]\vspace{2ex}
\begin{center}\Large
\color{zinnwalditebrown}{\textbf{Answers:}}
\end{center}
\vspace{2ex} \normalcolor
\Large\begin{itemize}
\item 4.1: C++.
\item 4.2: Capillary action.
\item 4.3: IBM.
\end{itemize}
\end{frame}
%
%
%
\end{document}