2

This is what I got with the following code:

enter image description here

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}

\usepackage{graphicx}
\usepackage{calligra}
\usetikzlibrary{positioning}

\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{xcolor}
\usepackage[colorlinks=true,urlcolor=blue]{hyperref}




\begin{document}



\begin{tikzpicture}

\node (UAF) at (0, 0) {\Huge \sc  University of Agriculture, Faisalabad};
\node [below of = UAF] (Dept) {\Huge {\calligra Department of Mathematics \& Statistics}};

\node [below left of = Dept] (Phone1) {\Large \phone ~ +41-9200161-70/3317};
\node [below left of = Phone1] (Phone2) {\Large \phone ~ +41-9200457};

\node [below left of = Phone2] (Email1) {\Large \Email ~ \href{mailto:myaseen208@gmail.com}{myaseen208@gmail.com}};
\node [below left of = Email1] (Email2) {\Large \Email ~ \href{mailto:myaseen208@uaf.edu.pk}{myaseen208@uaf.edu.pk}};


\node [right of = Phone2] (MS) {\Large M\&S No:\hrulefill{}};
\node [right of = Email2] (Date) {\Large Dated:\hrulefill{}};



\node[inner sep=0pt, left = of Dept.west] (LogoUAF)  {\includegraphics[width=0.25\textwidth]{LogoUAF.png}};



\end{tikzpicture}

\end{document}

enter image description here

I have few issues with the node placements.

  1. I want phone numbers and emails aligned left and should start right below D of Department.
  2. M&S No and Dated should be right aligned and end with \hrulefill{} output.
  3. Logo should be left aligned and should cover all six lines.

Any help will be highly appreciated. Thanks

MYaseen208
  • 8,587

4 Answers4

7

Without TikZ, just for fun.

\documentclass[border=5]{standalone}
\usepackage{graphicx}
\usepackage{calligra}
\usepackage{marvosym,wasysym}
\usepackage[colorlinks=true,urlcolor=blue]{hyperref}

\newsavebox{\logobox}
\newsavebox{\databox}
\newlength{\institutionwidth}
\newlength{\departmentwidth}
\newlength{\departmentindent}

\newcommand{\institution}{University of Agriculture, Faisalabad}
\newcommand{\department}{Department of Mathematics \& Statistics}

\begin{document}

\sbox{\logobox}{\includegraphics[width=2.5cm]{IuTEV.png}}%
\settowidth{\institutionwidth}{\Large\scshape\institution}%
\settowidth{\departmentwidth}{\large\calligra\department}%
\setlength{\departmentindent}{\dimexpr(\institutionwidth-\departmentwidth)/2}%
\addtolength{\departmentwidth}{\departmentindent}%
\sbox{\databox}{%
  \small
  \begin{tabular}[b]{@{}l@{}}
  \phone\ +41-9200161-70/3317 \\
  \phone\ +41-9200457 \\
  \Email\ \href{mailto:myaseen208@gmail.com}{myaseen208@gmail.com} \\
  \Email\ \href{mailto:myaseen208@uaf.edu.pk}{myaseen208@uaf.edu.pk}
  \end{tabular}%
}%

\usebox{\logobox}\hspace{2mm}% <--- adjust the spacing
\begin{minipage}[b][\ht\logobox][s]{\institutionwidth}
{\Large\scshape\institution}\par
\vspace{\stretch{1}}%
\hspace*{\departmentindent}{\large\calligra\department}\par
\vspace{\stretch{3}}%
\hspace*{\departmentindent}%
  \usebox{\databox}\hspace{2em}%
  \begin{minipage}[b]{\dimexpr\departmentwidth-2em-\wd\databox}
  \makebox[\linewidth]{M\&S No: \hrulefill}\par
  \medskip
  \makebox[\linewidth]{Dated: \hrulefill}
  \end{minipage}
\end{minipage}

\end{document}

enter image description here

If you want rules, here they are:

\documentclass[border=5]{standalone}
\usepackage{graphicx}
\usepackage{calligra}
\usepackage{marvosym,wasysym}
\usepackage[colorlinks=true,urlcolor=blue]{hyperref}

\newsavebox{\logobox}
\newsavebox{\databox}
\newlength{\institutionwidth}
\newlength{\departmentwidth}
\newlength{\departmentindent}

\newcommand{\institution}{University of Agriculture, Faisalabad}
\newcommand{\department}{Department of Mathematics \& Statistics}

\begin{document}

\sbox{\logobox}{\includegraphics[width=2.5cm]{IuTEV.png}}%
\settowidth{\institutionwidth}{\Large\scshape\institution}%
\settowidth{\departmentwidth}{\large\calligra\department}%
\setlength{\departmentindent}{\dimexpr(\institutionwidth-\departmentwidth)/2}%
\addtolength{\departmentwidth}{\departmentindent}%
\sbox{\databox}{%
  \small
  \begin{tabular}[b]{@{}l@{}}
  \phone\ +41-9200161-70/3317 \\
  \phone\ +41-9200457 \\
  \Email\ \href{mailto:myaseen208@gmail.com}{myaseen208@gmail.com} \\
  \Email\ \href{mailto:myaseen208@uaf.edu.pk}{myaseen208@uaf.edu.pk}
  \end{tabular}%
}%

\begin{minipage}{\dimexpr\institutionwidth+\wd\logobox+2mm}
\hrule\vspace{3pt}
\usebox{\logobox}\hspace{2mm}% <--- adjust the spacing
\begin{minipage}[b][\ht\logobox][s]{\institutionwidth}
{\Large\scshape\institution}\par
\vspace{\stretch{1}}%
\hspace*{\departmentindent}{\large\calligra\department}\par
\vspace{\stretch{3}}%
\hspace*{\departmentindent}%
  \usebox{\databox}\hspace{2em}%
  \begin{minipage}[b]{\dimexpr\departmentwidth-2em-\wd\databox}
  \makebox[\linewidth]{M\&S No: \hrulefill}\par
  \medskip
  \makebox[\linewidth]{Dated: \hrulefill}
  \end{minipage}
\end{minipage}

\vspace{3pt}\hrule
\end{minipage}

\end{document}

enter image description here

egreg
  • 1,121,712
  • Thanks @egreg for your help. I like your solution. Would appreciate if you guide me how to put horizontal lines above and below the whole part. Thanks again for your help. – MYaseen208 Dec 16 '16 at 12:51
  • 1
    @MYaseen208 I added the rules – egreg Dec 16 '16 at 15:52
6

Here is a solution without tikz, designed for the width of a document in the article class. It can be easily adjusted for another \textwidth.

enter image description here

\documentclass{article}
\usepackage{graphicx}
\usepackage{calligra}
\usepackage{marvosym,wasysym}
\usepackage{tabularx}
\usepackage[colorlinks=true,urlcolor=blue]{hyperref}
\newcommand\fillarea{\makebox[6em]{\hrulefill}}
\let\sizeA\Large
\let\sizeB\footnotesize
\begin{document}
\newsavebox\UAF
\savebox\UAF{\scalebox{0.97}{\sizeA\scshape University of Agriculture, Faisalabad}}%
\noindent
\includegraphics[width=2.3cm]{LogoUAF.png}%
\hspace{-0.2em}%
\begin{tabular}[b]{@{}c@{}}
\usebox\UAF\\[0.7ex]
\begin{tabularx}{\wd\UAF}[b]{@{}X@{}l@{}>{\raggedleft\arraybackslash}X@{}}
&\sizeA\calligra Department of Mathematics \& Statistics&\\[1.4ex]
&\sizeB\phone ~ +41-9200161-70/3317                     &\\
&\sizeB\phone ~ +41-9200457                             &\makebox[0em][r]{\sizeB M\&S No: \fillarea}\\
&\sizeB\Email ~ \href{mailto:myaseen208@gmail.com}{myaseen208@gmail.com}&\\
&\sizeB\Email ~ \href{mailto:myaseen208@uaf.edu.pk}{myaseen208@uaf.edu.pk}&\makebox[0em][r]{\sizeB Dated: \fillarea}
\end{tabularx}
\end{tabular}
\end{document}
gernot
  • 49,614
  • Thanks a lot @gernot for very useful answer. Would highly appreciate if you guide me how to reduce the space between logo and text. Thanks – MYaseen208 Dec 15 '16 at 18:02
  • @MYaseen208 I have now reduced the space, just to show that it works. – gernot Dec 15 '16 at 23:37
6

Using some tikz libraries to make our lives easier: fit, calc, shapes.multipart and the already in use positioning.

enter image description here

By using the fit library we can bundle all elements into a Box node and then with the calc library we can measure this node size, to then feed this value to \includegraphics

\documentclass[margin=5mm]{standalone}
\usepackage{tikz,graphicx}
\usetikzlibrary{positioning, shapes.multipart, fit, calc}
\usepackage{marvosym,wasysym,calligra}
\usepackage[colorlinks=true,urlcolor=blue]{hyperref}

\begin{document}
  \begin{tikzpicture}[caligraphic/.style={font=\Huge\calligra}, every node/.style={font=\Large}]
    \node[font=\Huge\scshape] (UAF) at (0, 0) {University of Agriculture, Faisalabad};
    \node [below =3mm of UAF, caligraphic] (Dept) {Department of Mathematics \& Statistics};

    \node [below right= 5mm and 3mm of Dept.text,
           rectangle split, rectangle split parts=4,
           rectangle split part align={left}] (Info)
    {\phone ~ +41-9200161-70/3317
    \nodepart{two}\phone ~ +41-9200457
    \nodepart{three}\Email ~ \href{mailto:myaseen208@gmail.com}{myaseen208@gmail.com}
    \nodepart{four}\Email ~ \href{mailto:myaseen208@uaf.edu.pk}{myaseen208@uaf.edu.pk}};

    \node [right = of Info.two east] (MS) {M\&S No:};
    \node [right = of Info.four east] (Date) {Dated:};

    \node[inner sep=0pt, fit=(UAF) (Info) (MS) (Date) (Dept)] (Box){};
    \draw (MS.south east) -- (MS.south east-|Box.south east);
    \draw (Date.south east) -- (Date.south east-|Box.south east);
    \path let \p1=($(Box.north)-(Box.south)$) in node[inner sep=0pt, left = 0mm of Box] (LogoUAF) {\includegraphics[height=\y1]{LogoUAF.png}};
  \end{tikzpicture}
\end{document}
  • Thanks @Guilherme for very useful answer. Thanks a lot. Would highly appreciate if you guide me how to bold the small caped University Title name. Thanks – MYaseen208 Dec 15 '16 at 18:16
  • It's not possible. It's a font issue... The Computer Modern font doesn't support bold faced small caps. I'm sorry. You can try using the countour package to make it look bold. – Guilherme Zanotelli Dec 15 '16 at 18:18
  • Would appreciate if you tell me how to put horizontal line above the all text and below the text too. Thanks – MYaseen208 Dec 15 '16 at 18:18
  • Should this line be over only the text part? Or the whole picture? If you could make a picture (even using paint) just to show exactly what you want it will be easier for everyone to understand. – Guilherme Zanotelli Dec 15 '16 at 18:20
  • Need horizontal lines above and below the whole part. Thanks for your help. – MYaseen208 Dec 15 '16 at 18:21
  • just add \draw[very thick] ([yshift=5mm]LogoUAF.north west) -- ([yshift=5mm]Box.north east) ([yshift=-5mm]Box.south east) -- ([yshift=-5mm]LogoUAF.south west); at the end of the tikzpicture, replace the 5mm for the desired separation between the line and the picture. – Guilherme Zanotelli Dec 15 '16 at 18:28
  • Thanks @Guilherme for your help. Much appreciated. Thanks again. – MYaseen208 Dec 15 '16 at 18:30
  • Thanks @Guilherme for your help. I have a follow up question here. Would appreciate if you can help me on this. Thanks – MYaseen208 Dec 15 '16 at 19:22
1

This is what I got so far: enter image description here

with the following code:

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\usepackage{graphicx}
\usepackage{calligra}
\usetikzlibrary{positioning}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{xcolor}
\usepackage[colorlinks=true,urlcolor=blue]{hyperref}

\begin{document}

\begin{tikzpicture}

\node (UAF) at (0, 0) {\Huge \sc  University of Agriculture, Faisalabad};
\node [below of = UAF] (Dept) {\Huge {\calligra Department of Mathematics \& Statistics}};

\node [below = of Dept.west, anchor=west, yshift=-0.07cm] (Phone1) {\Large \phone ~ +41-9200161-70/3317};
\node [below = of Phone1.west, anchor=west, yshift=0.50cm] (Phone2) {\Large \phone ~ +41-9200457};

\node [below = of Phone2.west, anchor=west, yshift=0.50cm] (Email1) {\Large \Email ~ \href{mailto:myaseen208@gmail.com}{myaseen208@gmail.com}};
\node [below = of Email1.west, anchor=west, yshift=0.50cm] (Email2) {\Large \Email ~ \href{mailto:myaseen208@uaf.edu.pk}{myaseen208@uaf.edu.pk}};


\node [right = of Phone2.east, anchor=west, xshift=3.50cm] (MS) {\Large M\&S No:\hrulefill{}};
\node [below = of MS.west, anchor=west] (Date) {\Large Dated:\hrulefill{}};

\node[inner sep=0pt, left = of Dept.west, xshift=-0.45cm, yshift=-0.60cm] (LogoUAF)  {\includegraphics[width=0.27\textwidth]{LogoUAF.png}};


\end{tikzpicture}

\end{document}
MYaseen208
  • 8,587