1

My professor gave me a LaTeX file to use to complete a quiz.

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

But i'm new to LaTeX and can't get it to compile. I'm not sure if the document is incomplete or if he made a typo somewhere.

The error is saying Undefined Page Style.

Can someone help me get this to compile? Thank you!

  • You are right: This is not a complete LaTeX document. Are you sure that you are supposed to compile the document? Maybe your prof just wants you to complete the quiz with an ordinary text editor by adding the solutions between \begin{solution} and \end{solution} (though some questions are hard to read if you don't typeset them). Anyway: If you want to compile the document, you have to start with \documentclass followed by the name of an appropriate class; the questions have to be enclosed between \begin{document} and \end{document}. – gernot Sep 4 '16 at 21:22
1

Sounds as though reading up on some basics would be a good idea. http://www.dickimaw-books.com/latex/novices/ might be good place to start.

Very briefly though, every LaTeX document needs a document class first, which is selected with

\documentclass{<name of class>}

This sets up the basic features of the document. After that you can add customizations, and packages, which give you additional features.

The text itself should be written in a document environment, i.e. between \begin{document} and \end{document}. Everything before \begin{document} is called the preamble.

The code you show appears to be written for the exam class, so if you make the changes as seen in the code below it works fine.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.