\documentclass[12pt]{article}

\usepackage{gamelan}
\usepackage{amsmath}

\begin{document}
\begin{gmlfile}

\begin{gmlcode}
  color col.default;
  col.default = 0.9white;
  picture dot; dot = image (fill circle scaled 1.5mm);
\end{gmlcode}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\noindent\textbf{\large\texttt{WHIZARD} integration results}\hfill\today
\begin{flushleft}
\textbf{Process:} 
  \verb|sznu_l0mumu| ($ e^- e^+ \to \nu_e \bar\nu_e \mu^- \mu^+$)
\\
\end{flushleft}
%
\begin{displaymath}
  \sqrt{s} =   500.0    \;\textrm{GeV}\qquad
\end{displaymath}
\begin{center} \unitlength 1mm
\begin{gmlgraph*}(         130 ,           90 )[dat]
  comment "!";
  endkey "&process_input";
  sigma.min := sigma.max := zero;
  integral.lo := integral.hi := zero;
  it := one;
  fromfile "whizard.sznu_l0mumu.out":
    for i withinblock:
      get it, calls, integral, error;
      plot(dat)(it,integral) vbar error;
      integral.lo := integral minus error;
      integral.hi := integral plus error;
      sigma.min :=
        if sigma.min = zero: integral.lo
        elseif sigma.min greater integral.lo: integral.lo
        else: sigma.min
        fi;
      sigma.max :=
        if sigma.max less integral.hi: integral.hi
        else: sigma.max
        fi;
    endfor
  endfrom
  if sigma.max greater zero:
    sigma.max := #1.05 times sigma.max;
    sigma.min := #0.95 times sigma.min;
  else:
    sigma.max := #1;
    sigma.min := #-1;
  fi
  sigma.lo := integral.lo;
  sigma.hi := integral.hi;
  it.lo := zero;
  it.hi := it plus one;
  setup(linear,linear); graphrange (#0.5,sigma.min), (it plus #0.5,sigma.max);
  plot(dat.band) (it.lo, sigma.lo), (it.hi, sigma.lo);
  plot(dat.band) (it.hi, sigma.hi), (it.lo, sigma.hi);
  fill from (dat.band) withcolor col.default;
  draw piecewise from(dat) withsymbol dot withticks;
  label.ulft(<<$\sigma$ [fb]>>, out);
  label.bot(<<Iteration>>, out);
\end{gmlgraph*}
\end{center}
%
\begin{align*}
  \sigma_{\rm tot} &=   201.64     \quad \pm  0.796    \;\textrm{fb}
   \quad [\pm    0.39\;\%]
\end{align*}
%
%
\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\noindent\textbf{\large\texttt{WHIZARD} integration results}\hfill\today
\begin{flushleft}
\textbf{Process:} 
  \verb|sznu_l0tautau| ($ e^- e^+ \to \nu_e \bar\nu_e \tau^- \tau^+$)
\\
\end{flushleft}
%
\begin{displaymath}
  \sqrt{s} =   500.0    \;\textrm{GeV}\qquad
\end{displaymath}
\begin{center} \unitlength 1mm
\begin{gmlgraph*}(         130 ,           90 )[dat]
  comment "!";
  endkey "&process_input";
  sigma.min := sigma.max := zero;
  integral.lo := integral.hi := zero;
  it := one;
  fromfile "whizard.sznu_l0tautau.out":
    for i withinblock:
      get it, calls, integral, error;
      plot(dat)(it,integral) vbar error;
      integral.lo := integral minus error;
      integral.hi := integral plus error;
      sigma.min :=
        if sigma.min = zero: integral.lo
        elseif sigma.min greater integral.lo: integral.lo
        else: sigma.min
        fi;
      sigma.max :=
        if sigma.max less integral.hi: integral.hi
        else: sigma.max
        fi;
    endfor
  endfrom
  if sigma.max greater zero:
    sigma.max := #1.05 times sigma.max;
    sigma.min := #0.95 times sigma.min;
  else:
    sigma.max := #1;
    sigma.min := #-1;
  fi
  sigma.lo := integral.lo;
  sigma.hi := integral.hi;
  it.lo := zero;
  it.hi := it plus one;
  setup(linear,linear); graphrange (#0.5,sigma.min), (it plus #0.5,sigma.max);
  plot(dat.band) (it.lo, sigma.lo), (it.hi, sigma.lo);
  plot(dat.band) (it.hi, sigma.hi), (it.lo, sigma.hi);
  fill from (dat.band) withcolor col.default;
  draw piecewise from(dat) withsymbol dot withticks;
  label.ulft(<<$\sigma$ [fb]>>, out);
  label.bot(<<Iteration>>, out);
\end{gmlgraph*}
\end{center}
%
\begin{align*}
  \sigma_{\rm tot} &=   77.154     \quad \pm  0.184    \;\textrm{fb}
   \quad [\pm    0.24\;\%]
\end{align*}
%
%

\end{gmlfile}
\end{document}
