[Tex/LaTex] Make an exam format with a logo

diagramsexamgraphicssyntax

I am trying to make a header of an exam page but with logo. Below is my code.

\usepackage{graphicx}

\begin{document}

\firstpageheadrule
\begin{figure}[]
\includegraphics[width=20mm]{logo.png}
\label{overflow}
\end{figure}
\chead{Department of Mathematics}

\begin{questions}
Question one
\end{questions}

\end{document}

I am trying to make something like
enter image description here

But my code does not give a desired output. I have little clue why my code is not working. I am wondering how can I fix the code.

Helps are really appreciated. Many thanks!

Best Answer

Let us add some spice! Here is a not so minimal template which you can adjust to have another design with some bling.

\documentclass[11pt,addpoints,answers]{exam}
\usepackage{graphicx,lastpage}
\hyphenpenalty 10000
\usepackage[paperheight=5.8in,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 Physcis}
{\footnotesize Physics --- Sixth semester}
{\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}
%
%
%==============================================================
\begin{document}
%%
%% \thispagestyle{empty}
%
\noindent
\begin{minipage}[l]{.1\textwidth}%
\noindent
\includegraphics[width=\textwidth]{example-image-a}
\end{minipage}%
%
\hfill
\begin{minipage}[r]{.68\textwidth}%
\begin{center}
 {\large \bfseries DEPARTMENT OF PHYSICS \par
 \Large Institute\\[2pt]
 \large Subject {(\normalsize Sixth semester)}  \par}
%  \vspace{0.5cm}
\end{center}
\end{minipage}%
%
\fbox{\begin{minipage}[l]{.175\textwidth}%
\noindent
{\bfseries Your name}\\
Professor\\
{\footnotesize Date: {17.01.2013}}
\end{minipage}}%
%
\par
\noindent
\uline{Time: 1 hour   \hfill \normalsize\emph{\underline{Internal Assessment test - I}} \hfill        Maximum Marks: 20}
%
\begin{questions}

\pointsinrightmargin
\pointsdroppedatright
\marksnotpoints
% \marginpointname{mark}
\pointpoints{mark}{marks}
\pointformat{\boldmath\themarginpoints}
\bracketedpoints
%
\question[08]
\label{Q:perunit}
Some question here
\droppoints
\question[08]
\label{Q:zbus}
Some question here
\droppoints
%
\newpage
\question[08]
\label{Q:ybus}
Some question here
\droppoints
\question[02]
\label{Q:puq}
Some question here
\droppoints
%%
%
\question[02]
\label{Q:power}
Some question here
\droppoints

%
\end{questions}
 \begin{center}
  \rule{.5\textwidth}{1pt}
 \end{center}
\end{document}

enter image description here

enter image description here

Related Question