LaTeX 文档编译错误

LaTeX 文档编译错误

我的教授给了我一个 LaTeX 文件来完成测验。

\pagestyle{headandfoot}
\firstpageheader{MAT 577/777: Fall 2016}{Quiz 1}{Name:~~~~~~~~~~~~~~~~~~~~~~~~~~~~}

\begin{questions}
\question
Who is considered the father of modern communications?
\begin{solution}
\end{solution}
\question
What is redundancy?
\begin{solution}
\end{solution}
\question
Explain how to convert a binary symmetric channel with probability of transmission $p_1$ where $0<p_1\leq{1\over 2}$ into a binary symmetric channel with probability of transmission $p_2$ where ${1\over 2}\leq p_2<1$.
\begin{solution}
\end{solution}
\question
Let $A=\{0,1\}$ and $C=\{001,101\}$, a $3$-length binary code. Assume we are using a binary symmetric channel with a probability of transmission greater than ${1\over 2}$. If $001$ is sent, for which of the 8 possible received words, will CMLD make the correct guess?
\begin{solution}
\end{solution}
\question
In the error correcting code example of the class notes ``Introduction to Codes'', how would the information word 1011 get encoded and how would the received word 1010101 get decoded? If IMLD is used, (considering a symmetric channel with ${1\over q-1}<p<1$), would there ever be a case where retransmission was necessary? Explain.
\begin{solution}
\end{solution}
\end{questions}

但我对 LaTeX 还不熟悉,无法编译。我不确定文档是否不完整,或者他在某处打错了。

错误提示未定义页面样式。

有人能帮我编译一下吗?谢谢!

答案1

听起来阅读一些基础知识是个好主意。http://www.dickimaw-books.com/latex/novices/可能是个不错的起点。

简而言之,每个 LaTeX 文档首先需要一个文档类,该类通过

\documentclass{<name of class>}

这将设置文档的基本功能。之后,您可以添加自定义项和包,从而获得附加功能。

文本本身应该写在document环境中,即\begin{document}和之间\end{document}。 之前的所有内容\begin{document}称为前言

您显示的代码似乎是为该类编写的exam,因此如果您按照下面的代码进行更改,它就可以正常工作。

\documentclass{exam}
\pagestyle{headandfoot}
\firstpageheader{MAT 577/777: Fall 2016}{Quiz 1}{Name:~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
\begin{document}
\begin{questions}
\question
Who is considered the father of modern communications?
\begin{solution}
\end{solution}
\question
What is redundancy?
\begin{solution}
\end{solution}
\question
Explain how to convert a binary symmetric channel with probability of transmission $p_1$ where $0<p_1\leq{1\over 2}$ into a binary symmetric channel with probability of transmission $p_2$ where ${1\over 2}\leq p_2<1$.
\begin{solution}
\end{solution}
\question
Let $A=\{0,1\}$ and $C=\{001,101\}$, a $3$-length binary code. Assume we are using a binary symmetric channel with a probability of transmission greater than ${1\over 2}$. If $001$ is sent, for which of the 8 possible received words, will CMLD make the correct guess?
\begin{solution}
\end{solution}
\question
In the error correcting code example of the class notes ``Introduction to Codes'', how would the information word 1011 get encoded and how would the received word 1010101 get decoded? If IMLD is used, (considering a symmetric channel with ${1\over q-1}<p<1$), would there ever be a case where retransmission was necessary? Explain.
\begin{solution}
\end{solution}
\end{questions}
\end{document}

相关内容