% main.tex
\documentclass{myquiz}
\college{college of engineering \& Technology}
\department{Computer Enginnering} % Leave it empty if you don't want to provide the department info
\lecturer{Lecturer name}
\ta{TA name}
\course{Course Name}
\dateinfo{quiz/exam date} % Leave it empty if you don't want to provide specific date
\marksinfo{10} % Leave it empty if no marks info
\timeinfo{1 Hour} % Leave it empty if no time info
\paperTitle{Quiz}
\setStudentInfo{1} %\setStudentInfo{1} to show student info, \setStudentInfo{0} or \setStudentInfo{} to hide it
\begin{document}
% Rest of your quiz/exam content goes here between the begin and end of document tag
% Use the \pagenum command to create pages with optional empty pages
% \pagenum{Page Number}{Content}
% The first argument is the page number.
% The second argument is the content of this page.
% The pages must be consecutive, but you don't have to provide each page.
% Use the \question command to create a numbered question with an optional mark.
% \question[Mark]{Question}
% The optional argument [Mark] can be used to specify the mark for the question.
% The question text is provided as the second argument.
\pagenum{1}{% Page 1 content
\question[24]{
Lorem ipsum dolor sit amet, $\nabla \cdot \mathbf{E} = \frac{\rho}{\varepsilon_0}$ adipiscing elit. Sed eu turpis pellentesque, ultricies libero sit amet, cursus massa. Vestibulum risus augue.
\begin{equation}
E=mc^2
\end{equation}
Nam vel dui arcu. Integer ut velit metus. Quisque condimentum, felis eu semper.
Praesent luctus, neque neque sollicitudin urna, vel facilisis massa tortor.
}
}
\pagenum{4}{% Page 4 content
% To create a question and diagram side by side using minipage, you can adjust the width of each minipage by changing the value (e.g., 0.5\textwidth) so that the total width of both minipages equals 1. This allows you to control the placement of questions and images within the same figure environment.
\begin{minipage}{0.5\textwidth}
\question{
Lorem ipsum dolor sit amet, $\nabla \cdot \mathbf{E} = \frac{\rho}{\varepsilon_0}$ adipiscing elit. Sed eu turpis pellentesque, ultricies libero sit amet, cursus massa. Vestibulum risus augue.
\begin{equation}
E=mc^2
\end{equation}
Nam vel dui arcu. Integer ut velit metus. Quisque condimentum, felis eu semper.
Praesent luctus, neque neque sollicitudin urna, vel facilisis massa tortor.
Lorem ipsum dolor sit amet, $\frac{dV}{dt} = \frac{F}{m}$ adipiscing elit. Sed eu turpis pellentesque, ultricies libero sit amet, cursus massa. Vestibulum risus augue.
\begin{equation}
F = ma
\end{equation}
Nam vel dui arcu. Integer ut velit metus. Quisque condimentum, felis eu semper.
Praesent luctus, neque neque sollicitudin urna, vel facilisis massa tortor.
}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\includegraphics[width=\textwidth]{aast_logo.png}
% if you want to include an caption to the image
% \centering Caption for the diagram
\end{minipage}
}
% Unfortunately, it's not possible to include a code block within commands like \question or \pagenum due to their limitations.
\begin{minted}[frame=single, fontsize=\footnotesize]{java}
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
\end{minted}
\pagenum{5}{
% \multiplechoice Command:
% Usage: \multiplechoice[<columns>]{<question text>}{<choices>}
% - <columns> (optional): The number of columns to display choices. Default is 1.
% - <question text>: The text of the question.
% - <choices>: The list of choices for the question.
%
% Example Usage:
% \multiplechoice[2]{What is 2 + 2?}{
% \item Four
% \item Five
% \item Six
% \item Seven
% }
\question[3]{\textbf{choose the right answer}}
\begin{enumerate}
\multiplechoice{What is the capital of France?}{
\item Paris
\item Madrid
\item Berlin
\item Rome
}
\multiplechoice[3]{Which of the following are even numbers?}{
\item 2
\item 3
\item 4
\item 5
\item 6
\item 7
}
\end{enumerate}
}
\end{document}