# Make an exam format with a logo

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

\usepackage{graphicx}

\begin{document}

\begin{figure}[]
\includegraphics[width=20mm]{logo.png}
\label{overflow}
\end{figure}

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

\end{document}


I am trying to make something like

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!

-
Don't use figure environment. Use only \includegraphics. –  Harish Kumar Feb 5 '14 at 2:19
@HarishKumar thanks. But the very top line will still be 'Department of Mathematics' and the logo will be inserted below. I would like to have the logo and the 'Department of Mathematics' on the same line. –  Henry Feb 5 '14 at 2:22
Please post compilable code. We don't even know which class you are using! –  cfr Feb 5 '14 at 2:29
If I may, that's a very odd place to put a logo. It should probably go in the top-left corner, if you have a choice in the matter. See tex.stackexchange.com/a/44183/17423 for a how-to on that. –  Sean Allred Feb 5 '14 at 3:20

\documentclass{exam}
\usepackage[demo]{graphicx}

\begin{document}

\begin{center}
AAA School\par\bigskip
Class A\par
First Exam--Functions\par
\end{center}

\vspace{0.8cm}

\noindent\begin{tabular}{@{}p{.35\textwidth}@{\hspace{4cm}}p{.20\textwidth}@{}}
Name:\enspace\hrulefill & Marks:\enspace\hrulefill \\[2ex]
Time: 60 minutes\hfill & Date:\enspace\hrulefill
\end{tabular}\par\bigskip

\noindent\hrulefill

\vspace{0.5cm}

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

\end{document}


The demo option for graphicx simply replaces actual figures with black rectangles; do not use that option in your actual document.

-

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

\newcommand{\continuedmessage}{%
\ifcontinuation{\footnotesize Question \ContinuedQuestion\ continues\ldots}{}%
}
{\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
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}


-

For the logo, I would use two adjacent minipages, in this way:

\documentclass{exam}
\usepackage{graphicx}

\begin{document}

\begin{center}
\begin{minipage}{2.5cm}
\includegraphics[width=20mm]{logo.png}
\end{minipage}%
\begin{minipage}{4.5cm}
Department of Mathematics\\
AAA School
\end{minipage}
\end{center}

\bigskip

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

\end{document}


-