[Tex/LaTex] How to make the Question Paper in LaTeX

exampaper-size

enter image description here

\documentclass[11pt,paper=a4,answers]{exam}
\usepackage{graphicx,lastpage}
\usepackage{upgreek}
\usepackage{censor}
\censorruledepth=-.2ex
\censorruleheight=.1ex
\hyphenpenalty 10000
   \usepackage[paperheight=10.5in,paperwidth=8.27in,bindingoffset=0in,left=0.8in,right=1in,
top=0.7in,bottom=1in,headsep=.5\baselineskip]{geometry}
\flushbottom
\usepackage[normalem]{ulem}
\renewcommand\ULthickness{2pt}   %%---> For changing thickness of underline
\setlength\ULdepth{1.5ex}%\maxdimen ---> For changing depth of underline
\renewcommand{\baselinestretch}{1}
\pagestyle{empty}

\pagestyle{headandfoot}
\headrule
\newcommand{\continuedmessage}{%
\ifcontinuation{\footnotesize Question \ContinuedQuestion\ continues\ldots}{}%
 }
\runningheader{\footnotesize Mathematics}
{\footnotesize Mathematics --- Differential Geometry}
{\footnotesize Page \thepage\ of \numpages}
\footrule
\footer{\footnotesize Student's name:}
{}
{\ifincomplete{\footnotesize Question \IncompleteQuestion\ continues
on the next page\ldots}{\iflastpage{\footnotesize End of exam}     {\footnotesize Please go        on to the next page\ldots}}}

\usepackage{cleveref}
\crefname{figure}{figure}{figures}
\crefname{question}{question}{questions}
%==============================================================
\renewcommand\thequestion{Q.\arabic{question}}
\renewcommand{\questionlabel}{\thequestion)}
\renewcommand{\questionshook}{%
\setlength{\leftmargin}{0pt}%
\setlength{\labelwidth}{-\labelsep}%
}


\pointsinrightmargin
\pointsdroppedatright
\marksnotpoints
\marginpointname{ \points}
\pointformat{\boldmath\themarginpoints}
%\bracketedpoints
\begin{document}

\thispagestyle{empty}

\noindent
\begin{minipage}[t]{\textwidth}%
\centering
\includegraphics[width=1cm]{por} \par
\underline{Name of the University}\par
\underline{Campus name} \par
\underline{Mid term examination -- Spring 2013} \par
\underline{SUBJECTIVE}
\end{minipage}
\par
\bigskip\bigskip
\begin{minipage}[t]{.5\textwidth}%
Degree Program: Mathematics \par
Course Title:  Course Title\par
Date of Examination: 9.6.2014 \par
Teacher's name: ABCD \par
Student's name: \makebox[1.5in]{\hrulefill} \par
Course Code: Math-506
\end{minipage}%
\hfill
\begin{minipage}[t]{.4\textwidth}%
Class: BS \par
Semester: 2nd \par
Time duration: 3 hours \par
Total Marks: 60 \par
Roll No: \makebox[1in]{\hrulefill}
\end{minipage}
\par
\bigskip
\begin{questions}

\question[6]
\label{Q:perunit}
For a surface $\vec{r}= \vec{r} (u \cos v, u \sin v, f(u))$. Write down   the first fundamental form of the surface. Show that the parametric curves  are orthogonal.
\droppoints
\question[10]
\label{Q:zbus}
Prove that necessary conditions for the curve $u = u(t), v = v(t)$ on a surface $\vec(r) = \vec(r)(u,v)$ to be geodesic is that \begin{equation}U    \frac{\partial T}{\partial \dot{v}} - V    \frac{\partial T}{\partial    \dot{u}}\end{equation}
where
$$ U = \frac{d}{dt} \Big(\frac{\partial T}{\partial \dot{u}}\Big) -    \frac{\partial T}{\partial u} = \frac{1}{2T}\frac{dT}{dt}\frac{\partial T}{\partial \dot{u}}$$
$$ V = \frac{d}{dt} \Big(\frac{\partial T}{\partial    \dot{v}}\Big) - \frac{\partial T}{\partial v} = \frac{1}{2T}\frac{dT}{dt}\frac{\partial T} {\partial \dot{v}}$$
\droppoints
\question[8]
\label{Q:zbus}
For the curve
$$
x = a(3u - u^{3}),\qquad y = 3au^{2},\qquad z = a(3u + u^{3})
$$
show that $$\uptau = k  =  \frac{1}{3a(1+u^{2})^{2}}$$
\droppoints
\question[8]
\label{Q:zbus}
 A curve is uniquely determined except as the position in space, when its   curvature and            torsion are given functions of its arc length.
\droppoints
\question[8]
\label{Q:zbus}
Show that there exists an infinite family of involutes for a  gives curve.
\droppoints
\newpage
\question[08]
\label{Q:ybus}
Give short answers of the following questions.
\begin{enumerate}
\item
\item If equation of the circle is $x^{2} + y^{2} = a^{2}$ then the  parametric equations            of circles are \xblackout{forty     two}?
\end{enumerate}
\end{questions}
\begin{center}
\rule{.5\textwidth}{1pt}
\end{center}
\end{document} 

I want the icon (logo) to be at the left side. My code puts it above the university name.

How do I put the logo at the left side of university name etc.

Best Answer

Use tabular; I set a 1cm separation between the image and the header, adjust it to suit you.

Note that the header is centered, because the image is included in a zero width box.

Please, use boldface or italic for emphasis, not underlining. Also avoid $$ in LaTeX; I showed the usage of gather* in the second question.

\documentclass[11pt,paper=a4,answers]{exam}

\usepackage[
  paperheight=10.5in,
  paperwidth=8.27in,
  bindingoffset=0in,
  left=0.8in,
  right=1in,
  top=0.7in,
  bottom=1in,
  headsep=.5\baselineskip
]{geometry}

\usepackage{amsmath,graphicx,lastpage}

\usepackage{upgreek}
\usepackage{censor}
\censorruledepth=-.2ex
\censorruleheight=.1ex

\flushbottom

\usepackage{cleveref}

\pagestyle{headandfoot}
\headrule
\newcommand{\continuedmessage}{%
  \ifcontinuation{\footnotesize Question \ContinuedQuestion\ continues\ldots}{}%
}
\runningheader{\footnotesize Mathematics}
  {\footnotesize Mathematics --- Differential Geometry}
  {\footnotesize Page \thepage\ of \numpages}
\footrule
\footer{\footnotesize Student's name:}
  {}
  {\ifincomplete{\footnotesize Question \IncompleteQuestion\ continues
   on the next page\ldots}{\iflastpage{\footnotesize End of exam}
  {\footnotesize Please go on to the next page\ldots}}}

\crefname{figure}{figure}{figures}
\crefname{question}{question}{questions}
%==============================================================
\renewcommand\thequestion{Q.\arabic{question}}
\renewcommand{\questionlabel}{\thequestion)}
\renewcommand{\questionshook}{%
  \setlength{\leftmargin}{0pt}%
  \setlength{\labelwidth}{-\labelsep}%
}


\pointsinrightmargin
\pointsdroppedatright
\marksnotpoints
\marginpointname{ \points}
\pointformat{\boldmath\themarginpoints}
%\bracketedpoints

\begin{document}

\thispagestyle{empty}

\begin{center}
\makebox[0pt][r]{%
  \begin{tabular}{@{}c@{}}
  \includegraphics[width=1cm]{example-image-9x16}
  \end{tabular}%
  \hspace{1cm}% <----- CHANGE HERE THE SEPARATION
}%
\begin{tabular}{@{}c@{}}
\bfseries Name of the University\\
\itshape Campus name \\
\bfseries Mid term examination -- Spring 2013 \\
\bfseries SUBJECTIVE
\end{tabular}
\end{center}

\begin{tabular}[t]{@{}l@{}}%
Degree Program: Mathematics \\
Course Title:  Course Title\\
Date of Examination: 9.6.2014 \\
Teacher's name: ABCD \\
Student's name: \makebox[1.5in]{\hrulefill} \\
Course Code: Math-506
\end{tabular}\hspace{\stretch{2}}%
\begin{tabular}[t]{@{}l@{}}
Class: BS \\
Semester: 2nd \\
Time duration: 3 hours \\
Total Marks: 60 \\
Roll No: \makebox[1in]{\hrulefill}
\end{tabular}\hspace*{\stretch{1}}

\bigskip


\begin{questions}

\question[6]
\label{Q:perunit}
For a surface $\vec{r}= \vec{r} (u \cos v, u \sin v, f(u))$. Write down the first fundamental form of 
the surface. Show that the parametric curves are orthogonal.
\droppoints

\question[10]
\label{Q:zbus}
Prove that necessary conditions for the curve $u = u(t), v = v(t)$ on a surface $\vec(r) = 
\vec(r)(u,v)$ to be geodesic is that
\begin{equation}
U \frac{\partial T}{\partial \dot{v}} - V \frac{\partial T}{\partial \dot{u}}
\end{equation}
where
\begin{gather*}
U = \frac{d}{dt} \Bigl(\frac{\partial T}{\partial \dot{u}}\Bigr) - 
    \frac{\partial T}{\partial u} = \frac{1}{2T}\frac{dT}{dt}\frac{\partial T}{\partial \dot{u}}
\\
V = \frac{d}{dt} \Bigl(\frac{\partial T}{\partial \dot{v}}\Bigr) -
    \frac{\partial T}{\partial v} = \frac{1}{2T}\frac{dT}{dt}\frac{\partial T} {\partial \dot{v}}
\end{gather*}
\droppoints

\end{questions}

\end{document} 

enter image description here

Related Question