% This style is not suitable for inclusion into other documents, common 
% command definitions have been used which could easily cause problems

% Use TikZ for the logo
\usepackage{tikz}

% No page number nor headings etc.
\pagestyle{empty}

% Set page size and margins
\topskip 0mm
\topmargin -15truemm
\headsep 0mm
\headheight 0mm
\textheight 280truemm
\textwidth 190truemm
\oddsidemargin -15truemm
\evensidemargin -15truemm
\marginparwidth 0mm
\marginparsep 0mm
%\footheight 0mm
\footskip 0mm
\parskip=5mm
\parindent=0mm

% Define ESRF logo
\def\InRad{10.0}
\def\ESRFlogo{
\begin{tikzpicture}[line cap=round, blue]
\begin{scope}[rotate=-90]
\draw[line width=0.45*\InRad pt, dash pattern=on 0pt off pi*\InRad/5.5] (0,0) circle (\InRad pt);
\draw[line width=0.28*\InRad pt, dash pattern=on 0pt off pi*1.48*\InRad/11] (0,0) circle (1.48*\InRad pt);
\draw[line width=0.22*\InRad pt, dash pattern=on 0pt off pi*1.85*\InRad/11] (0,0) circle (1.85*\InRad pt);
\draw[line width=0.16*\InRad pt, dash pattern=on 0pt off pi*2.2*\InRad/11] (0,0) circle (2.2*\InRad pt);
\end{scope}
\draw[line width=0.1*\InRad pt] (-2.95*\InRad pt,-2.2*\InRad pt) -- (-1.33*\InRad pt,-2.2*\InRad pt);
\draw[line width=0.1*\InRad pt] (1.33*\InRad pt,-2.2*\InRad pt) -- (2.95*\InRad pt,-2.2*\InRad pt);
\draw[line width=0.1*\InRad pt] (-2.95*\InRad pt,-4.4*\InRad pt) -- (2.95*\InRad pt,-4.4*\InRad pt) node[pos=0.5, above=-0.1*\InRad pt] {\LARGE\bf ESRF};
\end{tikzpicture}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% page 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Scientific background and detailed description
\newcommand{\ProposalSummary}[1]{\def\ProProposalSummary{#1}}
\newcommand{\ScientificBackground}[1]{\def\ProScientificBackground{#1}}
\newcommand{\ExperimentalTechniques}[1]{\def\ProExperimentalTechniques{#1}}

% Command to make the front page of the application
\newcommand{\PageOne}
{
% Set standard unit length to mm
\unitlength=1mm

% Enter picture mode
\begin{picture}(190,280)(0,0)

% Create page header
\put(5,274){\large\bf {\Huge\bf E}UROPEAN\hspace{1.5mm}{\Huge\bf
S}YNCHROTRON\hspace{1.5mm}{\Huge\bf R}ADIATION\hspace{1.5mm}{\Huge\bf 
F}ACILITY}
\put(166,255){\ESRFlogo}

%%% now centered, 1.3.99 >ta<
\put(1,260){\parbox{16.8cm}{\centering{\bf ESRF User Office}\\
CS 40220, F-38043 GRENOBLE Cedex 9, France\\
{\small Delivery address: 71 avenue des Martyrs, 38000 GRENOBLE, France}\\
{\small Tel: +33\,(0)4\,7688\,2552, 
fax: +33\,(0)4\,7688\,2020; email: useroff@esrf.fr; web: http://www.esrf.fr}
}}

\put(-3,250){\rule{195mm}{0.3mm}}

\put(10,242){\parbox{16.8cm}{\centering%
{\large\textbf{Application for beam time at ESRF -- Experimental Method}}
}}

\put(1,233){\parbox[t]{185mm}{%
\underline{\textbf{Proposal Summary:}}

\smallskip{\ProProposalSummary}

\smallskip
\underline{\textbf{Scientific background:}}

\smallskip{\ProScientificBackground}

\smallskip
\textbf{\underline{Experimental technique(s),
 required set-up(s), measurement strategy, sample details:}}

\smallskip{\ProExperimentalTechniques}

}}

\put (0,2){\makebox(190,277){ }}
%
% Proposal form version
\put (0,0){\tiny ESRF Proposal Form September 2016}
\end{picture}
\newpage
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page Two set-up commands
%

%Scientific background and detailed description (continued)
\newcommand{\TechniquesContinued}[1]{\def\ProTechniquesContinued{#1}}

% Results boxes etc.
\newcommand{\BeamlinesRequired}[1]{\def\ProBeamlinesRequired{#1}}
\newcommand{\ResultsExpected}[1]{\def\ProResultsExpected{#1}}
\newcommand{\References}[1]{\def\ProReferences{#1}}


% Command to make the fourth page of the application
\newcommand{\PageTwo}
{
% Set standard unit length to mm
\unitlength1mm
% Enter picture mode
\begin{picture}(190,280)(0,0)
% Frame and main text
\put (3,265){\parbox[t]{184mm}{%
{\ProTechniquesContinued}

\smallskip\underline{\textbf{Beamline(s) and beam time requested with
    justification:}}

\smallskip{\ProBeamlinesRequired}

\smallskip\underline{\textbf{Results expected and their significance
 in the respective field of research:}}

\smallskip{\ProResultsExpected}

\smallskip\underline{\textbf{\rule[-1mm]{0mm}{5mm}References}}

\smallskip{\ProReferences}

}}

% Proposal form version
\put (0,0){\tiny ESRF Proposal Form September 2016}
\end{picture}
}
