Define Spacing from top margin

marginsoverleafpdftex

I have to follow these writing rules.

enter image description here

I can set the top margin to 3 cm. for the first sentence. But the others I don't know.

So, my question is how to measure the exact space from the top margin to meet the rules?

Best Answer

The following provides what you're looking for:

\documentclass{report}

\usepackage[top=3cm]{geometry}

\begin{document}

\thispagestyle{empty}
\begingroup
  \centering
  UNIVERSITY

  \vspace{\dimexpr3.5cm-\baselineskip}

  INSTITUTION

  \vspace{\dimexpr3.5cm-\baselineskip}

  TITLE

  \vspace{\dimexpr4cm-\baselineskip}

  NAME
  \par
\endgroup

\clearpage

Rest of your document \ldots

\end{document}

The use of \dimexpr<len>-\baselineskip in measuring the vertical space between title elements ensures that you don't include consideration for the line of text being printed.

enter image description here

The above vertical rules highlighting the lengths were printed using eso-pic. Here's the complete code:

\documentclass{report}

\usepackage[top=3cm]{geometry}

\usepackage{eso-pic}

\begin{document}

\AddToShipoutPictureBG*{%
  \AtPageUpperLeft{%
    \hspace{.4\paperwidth}\rule[-3cm]{1pt}{3cm}%
  }%
  \AtPageUpperLeft{%
    \hspace{\dimexpr.4\paperwidth+1em}\raisebox{-3cm}{3cm}%
  }%
  \AtPageUpperLeft{%
    \hspace{\dimexpr.4\paperwidth-1em}\raisebox{-3cm}{\rule[-3.5cm]{1pt}{3.5cm}}%
  }%
  \AtPageUpperLeft{%
    \hspace{.4\paperwidth}\raisebox{-6.5cm}{3.5cm}%
  }%
  \AtPageUpperLeft{%
    \hspace{\dimexpr.4\paperwidth-2em}{\raisebox{-3cm}{\rule[-7cm]{1pt}{7cm}}}%
  }%
  \AtPageUpperLeft{%
    \hspace{\dimexpr.4\paperwidth-1em}{\raisebox{-10cm}{7cm}}%
  }%
  \AtPageUpperLeft{%
    \hspace{\dimexpr.4\paperwidth-3em}{\raisebox{-3cm}{\rule[-11cm]{1pt}{11cm}}}%
  }%
  \AtPageUpperLeft{%
    \hspace{\dimexpr.4\paperwidth-2em}{\raisebox{-14cm}{11cm}}%
  }%
}%

\thispagestyle{empty}
\begingroup
  \centering
  UNIVERSITY

  \vspace{\dimexpr3.5cm-\baselineskip}

  INSTITUTION

  \vspace{\dimexpr3.5cm-\baselineskip}

  TITLE

  \vspace{\dimexpr4cm-\baselineskip}

  NAME
  \par
\endgroup

\clearpage

Rest of your document \ldots

\end{document}