From ad98b47f0dda551b0f4a90b03905f3fd8e21a83e Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Wed, 18 May 2016 15:34:25 +0200
Subject: [PATCH] + Graphics post-processing manual 0.1.0gamma1

---
 doc/ps/FixMdframed.tex                | 171 +++++++++
 doc/ps/FridaGraphicPostprocessing.tex |  36 ++
 doc/ps/GraphicPostprocessing.tex      | 501 ++++++++++++++++++++++++++
 doc/ps/Setup.tex                      | 271 ++++++++++++++
 doc/ps/Title.tex                      |  48 +++
 doc/ps/ex2.pdf                        |  92 +++++
 doc/ps/legend.pdf                     | Bin 0 -> 4691 bytes
 doc/ps/symbols.pdf                    | Bin 0 -> 16083 bytes
 pub/share/wups11a.ps                  |  36 +-
 9 files changed, 1132 insertions(+), 23 deletions(-)
 create mode 100644 doc/ps/FixMdframed.tex
 create mode 100644 doc/ps/FridaGraphicPostprocessing.tex
 create mode 100644 doc/ps/GraphicPostprocessing.tex
 create mode 100644 doc/ps/Setup.tex
 create mode 100644 doc/ps/Title.tex
 create mode 100644 doc/ps/ex2.pdf
 create mode 100644 doc/ps/legend.pdf
 create mode 100644 doc/ps/symbols.pdf

diff --git a/doc/ps/FixMdframed.tex b/doc/ps/FixMdframed.tex
new file mode 100644
index 00000000..9db59a5a
--- /dev/null
+++ b/doc/ps/FixMdframed.tex
@@ -0,0 +1,171 @@
+% Prevents erroneous page breaks,
+% as proposed by David Carlisle,
+% http://tex.stackexchange.com/questions/241543.
+
+\makeatletter
+
+\def\mdf@put@frame@ii{%
+  \setlength{\mdf@freevspace@length}{\vsize}%
+    \ifbool{mdf@repeatframetitle}%
+      {%repeating title -- more robust using hooks.
+       \toggletrue{mdf@notfirstframetitle}%
+       \splitmaxdepth\z@ \splittopskip\z@%
+       \setbox\mdf@splitbox@one=\vbox{\break\unvbox\mdf@splitbox@one}%
+       \mdf@ignorevbadness%
+       \setbox0=\vsplit\mdf@splitbox@one to \z@\relax%
+       \setbox\mdf@splitbox@one=\vbox{\unvbox\mdf@splitbox@one}%
+       \setbox\mdf@splitbox@one\vbox%
+          {%
+           \parskip\z@\relax%
+           \parindent\z@\relax%
+           \vskip\mdf@frametitleaboveskip@length%
+           \unvcopy\mdf@frametitlebox\relax%
+           \mdf@@frametitlerule\relax%
+           \unvbox\mdf@splitbox@one\relax%
+          }%
+       \setbox\mdf@splitbox@one=\vbox{\unvbox\mdf@splitbox@one}%
+      }{}%
+  \setlength{\dimen@}{\dimexpr\ht\mdf@splitbox@one+\dp\mdf@splitbox@one\relax}%
+  \mdf@dolist{\mdf@advancelength@add{\dimen@}}%
+        {innerbottommargin,innerlinewidth,middlelinewidth,outerlinewidth}%
+  \ifboolexpr { bool {mdf@everyline} and bool {mdf@topline} }%
+    {%
+     \mdf@dolist{\mdf@advancelength@add{\dimen@}}%
+        {innerlinewidth,middlelinewidth,outerlinewidth}%
+    }{}%
+   \notbool{mdf@bottomline}%remove bottom if neccessary
+     {%
+       \mdf@dolist{\mdf@advancelength@sub{\dimen@}}%
+         {innerlinewidth,middlelinewidth,outerlinewidth}%
+     }{}%
+   \ifdimgreater{\dimen@}{\mdf@freevspace@length}%
+    {%have a middle box
+     \advance\mdf@freevspace@length by -\mdf@splitbottomskip@length\relax%
+     \ifbool{mdf@everyline}%regard top and bottom if everyline is used
+       {%
+        \ifbool{mdf@topline}%
+          {%
+           \mdf@dolist{\mdf@advancelength@sub{\mdf@freevspace@length}}%
+             {innerlinewidth,middlelinewidth,outerlinewidth}%
+          }{}%
+        \ifbool{mdf@bottomline}%
+          {%
+           \mdf@dolist{\mdf@advancelength@sub{\mdf@freevspace@length}}%
+             {innerlinewidth,middlelinewidth,outerlinewidth}%
+          }{}%
+       }{}%
+     \setbox\mdf@splitbox@save=\vbox{\unvcopy\mdf@splitbox@one}%
+     \splitmaxdepth\z@ \splittopskip\mdf@splittopskip@length%
+     \mdf@ignorevbadness%
+     \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \mdf@freevspace@length%
+     \setbox\mdf@splitbox@two\vbox{\unvbox\mdf@splitbox@two}%
+     \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}%
+     \ifdimgreater{\ht\mdf@splitbox@two+\dp\mdf@splitbox@two}%
+                  {\mdf@freevspace@length}%
+       {%splitted wrong
+        \mdf@PackageInfo{Box was splittet wrong^^J
+                         starting loop to iterate
+                         the splitting point\MessageBreak}%
+        \dimen@i=\mdf@freevspace@length%\relax
+        \@tempcnta=\z@\relax
+        \loop
+        \ifdim\dimexpr\ht\mdf@splitbox@two+\dp\mdf@splitbox@two\relax>%
+              \mdf@freevspace@length\relax
+          \advance\dimen@i by -\p@\relax%
+          \advance\@tempcnta by \@ne\relax%
+          \ifnum\@tempcnta>100
+            \let\iterate\relax%
+            \mdf@PackageWarning{correct box splittet fails^^J
+                                It seems you are using a non splittable
+                                contents\MessageBreak}%
+          \fi
+          \mdf@ignorevbadness%
+          \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}%
+          \splitmaxdepth\z@ \splittopskip\mdf@splittopskip@length%
+          \mdf@ignorevbadness%
+          \setbox\mdf@splitbox@two\vsplit\mdf@splitbox@one to \dimen@i\relax%
+          \setbox\mdf@splitbox@two\vbox{\unvbox\mdf@splitbox@two}%
+          \setbox\mdf@splitbox@one\vbox{\unvbox\mdf@splitbox@one}%
+        \repeat%
+       }{}%
+     \ifvoid\mdf@splitbox@one\relax%
+        \mdf@PackageWarning{You got a bad break because the splittet box is
+                            empty^^J
+                            You have to change the page settings^^J
+                            like enlargethispage or something else^^J
+                            the package increases do
+                            \enlargethispage{\baselineskip}\MessageBreak}%
+        \setbox\mdf@splitbox@one=\vbox{\unvcopy\mdf@splitbox@save}%
+        \enlargethispage{\baselineskip}%
+        \def\mdf@reserved@a{\mdf@put@frame@ii}%
+     \else
+      \setbox\mdf@splitbox@two=\vbox%
+                   {%
+                    \hrule \@height\z@ \@width\mdfboundingboxwidth\relax%
+                    \unvcopy\mdf@splitbox@two%
+                   }%
+        \begingroup%
+          \mdf@@setzref%
+          \booltrue{mdfmiddleframe}%
+          \mdf@beforebreak%
+          \mdf@putbox@middle%
+          \mdf@afterbreak%
+        \endgroup%
+          \hrule \@height\z@ \@width\hsize%
+          \vfill\eject%
+          \def\mdf@reserved@a{\mdf@put@frame@ii}%
+        \fi
+     }%End middle box case
+     {%start last box case
+      \ifvoid\mdf@splitbox@one
+           \mdf@PackageWarning{You got a bad break\MessageBreak
+                               because the last split box is empty\MessageBreak
+                               You have to change the settings1}%%
+%CHANGE:  leave final box as void
+\iffalse
+ \setbox\mdf@splitbox@one=\vbox%
+                  {%
+                   \unvbox\mdf@splitbox@one%
+                   \hrule \@height\z@ \@width\mdfboundingboxwidth
+                  }%
+\fi
+%end CHANGE
+      \fi%
+      \ifdimless{\ht\mdf@splitbox@one}{1sp}%
+         {%
+          \mdf@PackageWarning{You got a bad break\MessageBreak
+                              because the last split box is empty\MessageBreak
+                              You have to change the settings2}%
+
+          \let\mdf@reserved@a\relax%
+%CHANGE: add discard final box
+\iffalse
+ \setbox\mdf@splitbox@one=\vbox%
+                 {%
+                  \unvbox\mdf@splitbox@one%
+                  \hrule \@height\z@ \@width\mdfboundingboxwidth
+                 }%
+\fi
+%END CHANGE
+\setbox\mdf@splitbox@one\box\voidb@x
+         }{}%
+      \begingroup%
+      \toggletrue{mdflastframe}%
+      \mdf@beforebreak%
+%Debug{\color{red}\rule{\textwidth}{1pt}}
+      \begingroup%
+        \mdf@@setzref%
+        \booltrue{mdflastframe}%
+        \mdf@beforelastframe%
+        \mdf@putbox@second%
+        \mdf@afterlastframe%
+      \endgroup%
+      \hrule \@height\z@ \@width\hsize%
+      \mdf@afterbreak%
+      \endgroup%
+      \let\mdf@reserved@a\relax%
+     }%
+  \mdf@reserved@a%
+}
+
+\makeatother
diff --git a/doc/ps/FridaGraphicPostprocessing.tex b/doc/ps/FridaGraphicPostprocessing.tex
new file mode 100644
index 00000000..31d29322
--- /dev/null
+++ b/doc/ps/FridaGraphicPostprocessing.tex
@@ -0,0 +1,36 @@
+\documentclass[a4paper,11pt,twoside,fleqn]{article}\usepackage[final]{graphicx}
+%\documentclass[a4paper,11pt,fleqn,draft]{article}\usepackage[draft]{graphicx}
+
+% TODO: revert article -> report, as soon as there is more than one \chapter
+
+\input jwu2.sty
+\input{Setup}
+\usepackage{cleveref}
+
+\def\E#1{\textsl{#1}}
+
+\def\UserManualVersionNumber{0.1.0$\gamma$1}
+
+\begin{document}
+\flushbottom
+
+% \input{Macros}
+\input{Title}
+
+\tableofcontents %\cleardoublepage
+
+%\include{Introduction}
+\include{GraphicPostprocessing}
+
+%\otherchapter{Bibliography}
+%\bibliographystyle{switch}
+%\bibliography{jw7}
+
+%\otherchapter{\nomname}\label{Snomencl}
+%\printnomenclature[6em]
+
+\otherchapter{Index}
+\small
+\printindex
+
+\end{document}
diff --git a/doc/ps/GraphicPostprocessing.tex b/doc/ps/GraphicPostprocessing.tex
new file mode 100644
index 00000000..60842383
--- /dev/null
+++ b/doc/ps/GraphicPostprocessing.tex
@@ -0,0 +1,501 @@
+\def\ttbs{\symbol{92}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Introduction}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+Frida is a versatile data-analysis program.
+From a command-line interface, it offers various methods to
+visualize, manipulate and fit tabular data.
+Frida is especially designed for the analysis of spectral data,
+in particular from quasielastic neutron scattering (QENS).
+
+Frida is currently in maintenance mode, which means:
+bugs will be fixed speedily,
+new features will be implemented occasionally,
+but development at large is stalled until a decision is taken
+which QENS software shall be institutionally supported at MLZ and
+partner institutes.
+
+The following notes describe how to post-process PostScript graphics files
+generated by Frida, in order to obtain publication-grade figure.
+These notes have grown out of an oral tutorial.
+They will be gradually converted from slide-show format to written-manual style.
+
+In Frida, two different methods are used to visualize data.
+For screen display in interactive sessions,
+Frida spawns a Gnuplot session.
+Plot commands are sent from Frida to Gnuplot through a first-in, first-out pipe.
+For saving graphics (command \texttt{gp}),
+Frida does \E{not} use Gnuplot's PostScript backend,
+but directly writes PostScript commands to a file.
+In the following,
+the structure of this Frida-generated PostScript file is explained,
+and it is shown how to embellish a plot by a few edits to this file.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Graphic formats, workflow}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\subsection{Graphic formats}
+
+Graphics can be stored in many different file formats.
+\Cref{Tgformats} lists formats that are in wide-spread use.
+One distinction is between \E{proprietary} and \E{open} standards.
+It strongly correlates with the distinction between \E{platform-specific}
+and \E{cross-platform} formats.
+To facilitate cooperation,
+we should prefer open, cross-platform standards whenever possible.
+Platform-specific formats like Windows Metafile (wmf)
+or Enhanced Metafile (emf) should be avoided.
+
+The most important distinction, however, is between \E{raster graphics}
+(bitmaps, pixel maps) and \E{vector graphics}.
+In raster graphics, the coloring of each single pixel in an image
+is specified.
+Typically, for each of the three base colors,
+values between 0 and 255 can be specified.
+Additional, there may be a fourth number to indicate transparency.
+So there are three or four bytes per pixel.
+Accordingly,
+an image with $1000\times1000$ pixels (1~Megapixel) is stored in a file
+of size 3~or 4~MByte.
+
+In contrast, a graphics file in vector format specifies an image in
+terms of basic plotting operations.
+Such operations include: choice of color, pen, font;
+coordinate system transformations;
+specification of path, clippath, region;
+drawing lines, arcs, Bezier curves using chosen pen;
+printing text using characters from chosen font.
+In this way, complex plots can be stored in a file
+that takes only a few kBytes.
+
+\begin{table}
+    \begin{center}
+    \btabb @{}p{.32\TW}@{}p{.42\TW}@{} 1.1
+    \hline
+    ps, eps &vector\\
+    svg &vector, XML-based, for WWW\\
+    pbm, pgm, ppm, pnm & bitmap (b/w, grey, color, any)\\
+    bmp & bitmap, reinvented by MS\\
+    png & compressed bitmap, lossless\\
+    gif & ditto, was patented, now obsolete\\
+    jpg & compressed bitmap, lossy\\
+    tiff & container\\
+    exif & container, for multimedia\\
+    wmf, emf & container, by MS\\
+    pdf &ps-based container\\
+    \hline
+    \etabb
+    \end{center}
+\caption{Frequently used data formats}
+\label{Tgformats}
+\end{table}
+
+Advantages of vector format over bitmap:
+    \bitem
+    \I scaling without quality loss
+    \I easier manipulation
+    \I smaller files
+    \eitem
+    \bigskip
+    Therefore:
+    \bitem
+    \I don't convert to bitmap until unavoidable
+    \I usually, leave conversion to
+    \bitem \I printer / printer driver
+           \I screen viewer (\texttt{acrobat}, \texttt{evince}, \ldots) \eitem
+    \I since 2013, even MS Words understands PDF
+    \eitem
+
+\subsection{Figures in LaTeX}
+
+  [from memory, needs verification]
+
+    classic LaTeX:\\
+    \bitem \I generates PS \I includes only PS\eitem
+    \bigskip
+    pdfLaTeX:\\
+    \bitem \I generates PDF \I includes PDF and many others, but no PS\eitem
+    \bigskip
+    XeLaTeX:\\
+    \bitem \I generates PDF \I includes all current graphic formats\eitem
+
+\subsection{Workflow for Frida figures}
+    \bitem
+    \I plot commands \texttt{p}, \texttt{a}
+    \I \texttt{gp} creates e.~g.\ \url{~/gnew/l97.ps}
+    \I rename file, move to appropriate folder
+    \I open with viewer (e.~g.\ \texttt{evince})
+    \I in parallel, open with editor and modify
+    \I \texttt{bboxx -insert <filename>.ps}
+    \I \texttt{ps2pdf -dEPSCrop <filename>.ps <filename>.pdf}
+    \eitem
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Postscript}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\subsection{PostScript}\label{STEST}
+  Basic facts:
+  \bitem
+  \I Created around 1981, few additions
+  \I Open standard: Red Book
+  \I Lossless convertible $\leftrightarrow$ PDF, SVG
+  \I Programmable in plain ASCII
+  \eitem
+  \bigskip
+  To come:
+  \bitem
+  \I 4 slides on programming
+  \I 2 slides on plotting
+  \I then back to Frida
+  \eitem
+
+
+\subsection{Programming PostScript}
+    Compute $(780-120)/2$:
+    \bigskip
+\lstset{basicstyle=\ttfamily\normalsize}
+\begin{lstlisting}
+   780 120 sub 2 div
+\end{lstlisting}
+
+
+\subsection{Programming PostScript}
+    Convert $r=7$, $\varphi=36^\circ$ to Cartesian coordinates
+\lstset{basicstyle=\ttfamily\normalsize}
+\begin{lstlisting}
+  7 36     % -> 7 36
+  2 copy   % -> 7 36 7 36
+  cos      % -> 7 36 7 cos(36)
+  mul      % -> 7 36 x [where x=7*cos(36)]
+  3 1 roll % -> x 7 36
+  sin      % -> x 7 sin(36)
+  mul      % -> x y [where y=7*sin(36)]
+\end{lstlisting}
+
+
+\subsection{Programming PostScript}
+    Convert $r=7$, $\varphi=36^\circ$ to Cartesian coordinates
+\lstset{basicstyle=\ttfamily\normalsize}
+\begin{lstlisting}
+  7 36
+  /phi exch def
+  /r exch def
+  r phi cos mul % -> x
+  r phi sin mul % -> x y
+\end{lstlisting}
+\bigskip
+Easier and clearer, but does not allow iteration\\
+(only global namespace)
+
+
+\subsection{Programming PostScript}
+    Subroutine to convert $r$, $\varphi$ to Cartesian coordinates
+\lstset{basicstyle=\ttfamily\normalsize}
+\begin{lstlisting}
+  /polar2xy { % r phi | x y
+     2 copy   % -> r phi r phi
+     cos mul  % -> r phi x
+     3 1 roll % -> x r phi
+     sin mul  % -> x y
+  } def
+\end{lstlisting}
+\bigskip
+Application:
+\begin{lstlisting}
+  7 36 polar2xy % yields 7*cos(36) 7*sin(36)
+\end{lstlisting}
+
+
+\subsection{Programming PostScript}
+\subsubsection*{Exercises}
+This code fragment takes one operand. What does it return?
+\lstset{basicstyle=\ttfamily\normalsize}
+\begin{lstlisting}
+  dup sin exch cos div
+\end{lstlisting}
+\bigskip
+Here a piece of code that takes two operands:
+\lstset{basicstyle=\ttfamily\normalsize}
+\begin{lstlisting}
+   2 copy gt { exch } if pop
+\end{lstlisting}
+
+
+\subsection{Plotting with PostScript}
+\lstset{basicstyle=\ttfamily\normalsize}
+\begin{lstlisting}
+%!PS
+/Helvetica 20 selectfont
+70 700 moveto
+(Hello world!) show
+showpage
+\end{lstlisting}
+
+
+\subsection{Plotting with PostScript}
+\begin{minipage}[b]{.4\textwidth}
+\begin{lstlisting}
+%!PS
+
+150 250 moveto
+0 400 rlineto
+200 0 rlineto
+stroke
+
+1 0 0 setrgbcolor
+/Helvetica 24 selectfont
+225 580 moveto
+(Hello world!) show
+
+0 1 0 setrgbcolor
+10 setlinewidth
+newpath
+250 450 80 0 270 arc
+250 450 40 270 0 arcn
+stroke
+
+0 0 1 setrgbcolor
+310 290 2 copy 2 copy
+moveto
+40 20 340 arc
+moveto
+closepath fill
+
+showpage
+\end{lstlisting}
+\end{minipage}
+\hfill
+\begin{minipage}[b]{.45\textwidth}
+\includegraphics[width=1\textwidth]{ex2.pdf}
+\end{minipage}
+\hfill\strut
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Postprocessing Frida graphics}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\subsection{PostScript generated by Frida}
+\subsubsection*{Basic structure of Frida .ps file}
+\begin{lstlisting}
+%!PS-Adobe-2.0
+... [ca 1600 lines with macro definitions]
+%%  Mark "ewu", the end of the wups.. macro definition file
+
+... [ca 50 lines to set up page and plot style]
+%%  Mark "ecu", end of the customization section
+
+%% output created by frida2
+... [ca 20 lines to plot frame and labels]
+... [data blocks]
+... [metadata]
+\end{lstlisting}
+
+
+\subsection{Global settings}
+\subsubsection*{plot frame}
+
+after mark "ewu", in each Frida .ps file, or globally in g3.ps
+
+\begin{lstlisting}
+10 dup autolabel defsiz   % overall size (sublinear labels)
+1 dup geld stdred         % linear reduction; aspect ratio
+2 -11 setnewpage newpage  % offset
+\end{lstlisting}
+\bigskip
+use aspect ratio macros:
+\begin{lstlisting}
+/gyld {0.447214 mul} def /Gyld {0.447214 div} def
+/guld {0.547723 mul} def /Guld {0.547723 div} def
+/gold {0.618034 mul} def /Gold {0.618034 div} def
+/gild {0.707107 mul} def /Gild {0.707107 div} def
+/geld {0.759836 mul} def /Geld {0.759836 div} def
+/gald {0.817765 mul} def /Gald {0.817765 div} def
+\end{lstlisting}
+or none for a square frame
+
+\subsubsection*{global switches}
+\begin{lstlisting}
+1 1 InfSet
+% argument 1 : print file name ? (0=no, 1=yes)
+% argument 2 : print metadata ? (ditto)
+
+1 dup 2 SymGSet
+% argument 1 : size of plot symbols
+% argument 2 : linewidth for plot symbols
+% argument 3 : print error bar ? (0=no, 1=yes, 2=depends)
+\end{lstlisting}
+
+\subsubsection*{plot symbol selection}
+\begin{lstlisting}
+F /pcol x def % change F -> T for black & white
+{ 8 aCol5 iColA } /ipCol x bind def
+  % number of colors
+  % colour style aCol1,..,aCol5
+
+/pStyles [
+% now different lines for pstyle = 1, 2, 3, ...
+{ pcol {1 1 0 1. 1. pset} {11 0 0 1. 1. pset 0 ipCol} ifelse }
+...
+% first variant is black&white, second is color (default)
+
+% arguments of pset:
+% - plot symbol (1=square, 2=diamond, ..., 11=plus, ...)
+% - filled ? (0=no, 1=yes)
+% - with error bar? (0=no, 1=yes, unless preset!=2)
+% - symbol size, relativ to global preset
+% - symbol line width, relativ to global preset
+\end{lstlisting}
+
+\subsubsection*{line style selection for curves}
+\begin{lstlisting}
+T /ccol x def % change T -> F for color
+{ 8 aCol2 iColA } /icCol x bind def % as above
+
+/cStyles [
+% now different lines for cstyle = 1, 2, 3, ...
+{ ccol { 1. [ ] lset } { 1. [ ] lset  0 icCol } ifelse }
+...
+% first variant is black&white (default), second is color
+
+% arguments of lset:
+% - linewidth
+% - dashes, e.g. [.1 .1] [.15 .05] [.12 .06 .03 .06]
+\end{lstlisting}
+
+
+\subsection{Coordinate frame}
+
+After mark "ecu", in each Frida .ps file.
+Here for x (similar for y):
+
+\begin{lstlisting}
+0 -32 32 xSetCoord % log_flag x_low x_hig [read only]
+
+/xPlotFrame {
+  [
+    1.875000 {(-20)}
+    5.000000 {(0)}
+    8.125000 {(20)}
+  ] SetTacVec
+  -1.25 11.25 5 4 SetTicVecLin
+  {(E  (ueV))} % label [often needs postprocessing]
+   0 10   0  0     0  90 OneAxx Axx Tic Tac xNumL %% low x axis
+   0 10   0 10     0 270 OneAxx Axx Tic Tac       %% top x axis
+  xCL
+} def
+\end{lstlisting}
+
+\subsection{Text}
+\subsubsection*{using Frida's PostScript macros}
+Generic format:\\[.8ex]
+\texttt{\{$X*$ (text)\}}\\[.8ex]
+where \texttt{$X*$} stands for 0,1,\ldots\ repeats of\\[.8ex]
+\texttt{(normal\_text) (modifiable\_text) operator}
+\bigskip
+
+Operators:\\
+\btabb @{}p{.1\TW}@{}p{.3\TW}@{}p{.44\TW}@{}p{.16\TW}@{} 1.2
+\texttt{g} & greek & \texttt{\{()(e)g()\}} & $\epsilon$\\
+\texttt{sb} & subscript & \texttt{\{(E)(f)sb( - E)(i)sb()\}} & $E_f - E_i$ \\
+\texttt{sp} & superscript & \texttt{\{(m c)(2)sp()\}} & $m\,c^2$ \\
+\texttt{sbgr} & greek subscript & \texttt{\{(K)(a)sbgr()\}} & $K_\alpha$ \\
+\texttt{spgr} & greek superscript & \texttt{\{(n)(3-)sp()(h)spgr()\}} & $n^{3-\eta}$\\
+\etabb
+
+
+\subsection{Text}
+
+Greek character set also contains special symbols:
+
+\btabb @{}p{.44\TW}@{}p{.36\TW}@{} 1.2
+\texttt{\{()(\ttbs341t\ttbs361)g()\}} & $\langle \tau\rangle$\\
+\texttt{\{()(\ttbs261)g(60)(\ttbs260)g()\}} & $\pm 60^\circ$\\
+\etabb
+
+
+\includegraphics[width=1\textwidth]{symbols.pdf}
+
+
+\subsection{Text}
+
+\subsubsection*{Parentheses}
+PostScript string may contain matched parentheses:\\
+\btabb @{}p{.64\TW}@{}p{.36\TW}@{} 1.2
+\texttt{\{(E  (meV))\}} & E (meV)\\
+\etabb\\
+\bigskip
+Unmatched parentheses must be escaped:\\
+\btabb @{}p{.64\TW}@{}p{.36\TW}@{} 1.2
+\texttt{\{(E  \ttbs() (m)g(eV\ttbs))\}} & E ($\mu$eV)\\
+\texttt{\{(S  \ttbs(q,)(w)g(\ttbs)  \ttbs()(m)g(eV\ttbs))(-1)sp()\}} & $S(q,\omega)$  ($\mu$eV$^{-1}$)\\
+\etabb
+
+
+\subsection{Text}
+\subsubsection*{Macros}
+Generic format:\\[.8ex]
+\texttt{\{$X*$ (text)\}}\\[.8ex]
+where \texttt{$X*$} stands for 0,1,\ldots\ repeats of any of the following\\[.8ex]
+\texttt{(normal\_text) (modifiable\_text) operator}\\
+\texttt{(normal\_text) macro}\\
+\bigskip
+\begin{minipage}[t]{.51\textwidth}
+\btabb @{}p{.58\TW}@{}p{.42\TW}@{} 1.2
+\texttt{\{()hbar()\}} & $\hbar$\\
+\texttt{\{()hbarw()\}} & $\hbar\omega$\\
+\texttt{\{()Sqw()\}} & $S(q,\omega)$\\
+\texttt{\{()ueV()\}} & $\mu$eV\\
+\texttt{\{()inueV()\}} & ($\mu$eV)\\
+\texttt{\{()inueVr()\}} & ($\mu$eV)$^{-1}$\\
+\texttt{\{()inmeVr()\}} & (meV)$^{-1}$\\
+\texttt{\{()Sqw(  )inueVr()\}} & $S(q,\omega)$ ($\mu$eV)$^{-1}$\\
+\etabb\\
+\end{minipage}
+\hfill
+\begin{minipage}[t]{.48\textwidth}
+\btabb @{}p{.72\TW}@{}p{.28\TW}@{} 1.2
+\texttt{\{()wbar()\}} & $\omega/2\pi$\\
+\texttt{\{()taumean()\}} & $\bar{\tau}$\\
+\texttt{\{()Angstr()\}} & \AA\\
+\texttt{\{()Angr()\}} & \AA$^{-1}$\\
+\texttt{\{()inAngr()\}} & (\AA$^{-1}$)\\
+\texttt{\{()inAngrr()\}} & (\AA$^{-2}$)\\
+\texttt{\{(q)(2)sp(  )inAngrr()\}} & $q^2$ (\AA$^{-2}$)\\ &\\
+\etabb\\
+\end{minipage}
+
+
+\subsection{Legend}
+\begin{minipage}[b]{.58\textwidth}
+\begin{lstlisting}
+2 8 21 1.8 NewList
+% arguments: x y fontsize linespacing
+{(q = 1.2 )Angr()} TxLine
+1 {(    4 K)} PtTxLine
+2 {(200 K)} PtTxLine
+3 {(240 K)} PtTxLine
+4 {(280 K)} PtTxLine
+\end{lstlisting}
+\end{minipage}
+\hfill
+\begin{minipage}[b]{.26\textwidth}
+\includegraphics[width=1\textwidth]{legend.pdf}
+\end{minipage}
+
+
+\subsection{Other text in figure}
+\begin{lstlisting}
+21 setown % set font size
+
+5 5 {(centered text)} textCM
+1 1 {(bottom left aligned)} textLB
+9 9 {(top right aligned)} textRT
+
+5 5 60 {(rotated by 60)(\260)g()} rtextCM
+\end{lstlisting}
diff --git a/doc/ps/Setup.tex b/doc/ps/Setup.tex
new file mode 100644
index 00000000..996aa7df
--- /dev/null
+++ b/doc/ps/Setup.tex
@@ -0,0 +1,271 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%%   BornAgain User Manual
+%%
+%%   homepage:   http://www.bornagainproject.org
+%%
+%%   copyright:  Forschungszentrum Jülich GmbH 2015
+%%
+%%   license:    Creative Commons CC-BY-SA
+%%
+%%   authors:    Scientific Computing Group at MLZ Garching
+%%               C. Durniak, M. Ganeva, G. Pospelov, W. Van Herck, J. Wuttke
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\let\angstrom=\AA
+
+%-------------------------------------------------------------------------------
+%  Page layout
+%-------------------------------------------------------------------------------
+
+% Horizontal setup
+\textwidth=410pt
+\hoffset=210mm % width of A4
+\advance\hoffset by -1\textwidth
+\hoffset=0.5\hoffset
+\advance\hoffset by -1in
+% Now a slight assymmetry to leave more blank on the side of the fold
+\evensidemargin=0pt
+\oddsidemargin=5pt
+\advance\evensidemargin by -1\oddsidemargin
+
+\def\myparindent{5ex}
+\setlength{\parindent}{\myparindent} % workaround, for colorboxes
+
+% Vertical setup
+\setlength{\headheight}{0pt}
+\setlength{\headsep}{10pt}
+\setlength{\textheight}{630pt} % default=592pt
+\setlength{\footskip}{45pt}
+\setlength{\marginparwidth}{7em}
+\renewcommand{\baselinestretch}{1.02}
+
+\renewcommand{\arraystretch}{1.3}
+
+%-------------------------------------------------------------------------------
+%  Symbols, fonts
+%-------------------------------------------------------------------------------
+
+\usepackage{amsmath}
+\usepackage{mathtools} % has \coloneqq for :=
+% \usepackage{manfnt} % for \dbend
+\usepackage{dingbat}
+\usepackage{amssymb}
+
+\usepackage[bold-style=ISO]{unicode-math} % must come after ams and symbols
+% from unicode-0.8, use \symbf instead of \mathbf
+% see https://github.com/wspr/unicode-math/issues/340
+%     http://apps.jcns.fz-juelich.de/redmine/issues/1293
+\newif\ifolducm
+\makeatletter
+\@ifpackagelater{unicode-math}{2014/07/01}{\olducmfalse}{\olducmtrue}
+\makeatother
+
+%-------------------------------------------------------------------------------
+%  Sectioning
+%-------------------------------------------------------------------------------
+
+% Add rubber to white space around chapter header
+\makeatletter
+\newif\ifnumberedchapter
+\def\@makechapterhead#1{\numberedchaptertrue\mychapterhead{#1}}
+\def\@makeschapterhead#1{\numberedchapterfalse\mychapterhead{#1}}
+
+\def\mychapterhead#1{%
+  \vspace*{50\p@ plus 10\p@ minus 10\p@}%
+  {\parindent \z@ \normalfont
+    \ifnumberedchapter
+    \raggedright
+    \Large\bfseries \@chapapp\space \thechapter
+    \par\nobreak
+    \vskip 20\p@ plus 4\p@ minus 4\p@
+    \interlinepenalty\@M
+    \fi
+%    \hrule
+    \vskip 10\p@ plus 2\p@ minus 2\p@
+    \interlinepenalty\@M
+    \raggedright
+  \huge \bfseries #1\par\nobreak
+    \interlinepenalty\@M
+    \vskip 10\p@ plus 2\p@ minus 2\p@
+%    \hrule
+    \interlinepenalty\@M
+    \vskip 40\p@ plus 8\p@ minus 8\p@
+  }}
+
+\def\otherchapter#1{
+  \clearpage
+  \phantomsection
+  \addcontentsline{toc}{chapter}{#1}
+  \markboth{#1}{#1}}
+
+\def\ichapter#1{\chapter*{#1}\addcontentsline{toc}{chapter}{#1}}
+\def\isection#1{\section*{#1}\addcontentsline{toc}{section}{#1}}
+
+\renewcommand\section{\@startsection {section}{1}{\z@}%
+                                   {-3.5ex \@plus -1.5ex \@minus -.5ex}%
+                                   {2.3ex \@plus .8ex \@minus .5ex}%
+                                   {\normalfont\Large\bfseries}}
+\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
+                                     {-3.25ex\@plus -1.3ex \@minus -.4ex}%
+                                     {1.5ex \@plus .5ex \@minus .3ex}%
+                                     {\normalfont\large\bfseries}}
+% from size11.clo
+\renewcommand\normalsize{
+   \@setfontsize\normalsize\@xipt{13.6}%
+   \abovedisplayskip 11\p@ \@plus7\p@ \@minus6\p@
+   \abovedisplayshortskip \z@ \@plus3\p@
+   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
+   \belowdisplayskip \abovedisplayskip
+   \let\@listi\@listI}
+\makeatother
+
+\setcounter{secnumdepth}{3}
+\setcounter{tocdepth}{3}
+%\usepackage[toc,page]{appendix}
+\usepackage{titlesec}
+
+%-------------------------------------------------------------------------------
+%  Index, List of Symbols
+%-------------------------------------------------------------------------------
+
+\usepackage{imakeidx}
+\makeindex
+
+\usepackage[refpage]{nomencl}
+\makenomenclature
+\renewcommand{\nomname}{List of Symbols}
+  % see nomencl.txt for how to force the ordering of symbols
+
+%-------------------------------------------------------------------------------
+%  Improve LaTeX basics
+%-------------------------------------------------------------------------------
+
+\usepackage{enumitem}
+\usepackage{subfigure}
+
+\usepackage{placeins} % defines \FloatBarrier
+\usepackage{float}
+\usepackage[font={small}]{caption}
+
+%-------------------------------------------------------------------------------
+%  Tables, code listings, ...
+%-------------------------------------------------------------------------------
+
+\usepackage{longtable}
+%\usepackage{booktabs} % defines \toprule &c for use in tabular
+% see http://tex.stackexchange.com/questions/78075/multi-page-with-tabulary
+\usepackage{tabulary}
+
+\usepackage[final]{listings}
+% \usepackage{lstcustom}
+\lstset{basicstyle=\ttfamily\footnotesize,language=postscript,commentstyle=\color{blue}}
+% ,style=eclipseboxed,numbers=none,nolol,escapeinside={<@}{@>}} % usage: <@\textcolor{red}{red text}@>
+
+%-------------------------------------------------------------------------------
+%  Tikz pictures
+%-------------------------------------------------------------------------------
+
+\usepackage{tikz}
+%\usepackage{tikz-uml}
+\usetikzlibrary{trees,matrix,positioning,decorations.pathreplacing,calc}
+
+\newcommand{\ntikzmark}[2]
+           {#2\thinspace\tikz[overlay,remember picture,baseline=(#1.base)]
+             {\node[inner sep=0pt] (#1) {};}}
+
+\newcommand{\makebrace}[3]{%
+    \begin{tikzpicture}[overlay, remember picture]
+        \draw [decoration={brace,amplitude=0.6em},decorate]
+        let \p1=(#1), \p2=(#2) in
+        ({max(\x1,\x2)}, {\y1+1.5em}) -- node[right=0.6em] {#3} ({max(\x1,\x2)}, {\y2});
+    \end{tikzpicture}
+}
+
+%-------------------------------------------------------------------------------
+%  Highlighting
+%-------------------------------------------------------------------------------
+
+\usepackage{ifdraft}
+\usepackage{mdframed}
+\input FixMdframed % bug fix to prevent erroneous page breaks
+% doesnt work:
+%\newcommand\widow{%
+%  \widowpenalty=10000
+%
+%  \widowpenalty=150}
+
+\def\defineBox#1#2#3#4#5{
+  \newmdenv[
+    usetwoside=false,
+    skipabove=3pt minus 1pt plus 3pt,
+    skipbelow=3pt minus 1pt plus 3pt,
+    leftmargin=-4pt,
+    rightmargin=-4pt,
+    innerleftmargin=2pt,
+    innerrightmargin=2pt,
+    innertopmargin=4pt,
+    innerbottommargin=4pt,
+    backgroundcolor=#3,
+    topline=false,
+    bottomline=false,
+    linecolor=#4,
+    linewidth=2pt,
+    ]{#2*}
+  \newenvironment{#1}
+    {\begin{#2*}\makebox[0pt][r]{\smash{#5}}\ignorespaces}
+    {\end{#2*}\mdbreakon}
+}
+
+\def\mdbreakoff{\makeatletter\booltrue{mdf@nobreak}\makeatother}
+\def\mdbreakon{\makeatletter\boolfalse{mdf@nobreak}\makeatother}
+
+\def\marginSymbolLarge#1#2{\ifdraft{\textbf{#2~~~~}}{\raisebox{-3ex}%
+{\includegraphics[width=3em]{#1}\hspace{10pt}}}}
+
+\defineBox{boxWork}{boxxWork}{magenta!40}{magenta}
+  {\marginSymbolLarge{fig/icons/Arbeiten.png}{TODO}}
+\defineBox{boxWarn}{boxxWarn}{magenta!40}{magenta}
+  {\marginSymbolLarge{fig/icons/Achtung.png}{WARN}}
+\defineBox{boxNote}{boxxNote}{yellow!33}{yellow}{{}}
+\defineBox{boxTuto}{boxxTuto}{blue!20}{blue}{{}}
+\defineBox{boxEmph}{boxxEmph}{green!20}{green}{{}}
+
+\def\Warn#1{\begin{boxWarn}#1\end{boxWarn}}
+\def\Work#1{\begin{boxWork}#1\end{boxWork}}
+\def\Note#1{\begin{boxNote}#1\end{boxNote}}
+\def\Tuto#1{\begin{boxTuto}#1\end{boxTuto}}
+\def\Emph#1{\begin{boxEmph}#1\end{boxEmph}}
+\def\Emphc#1{\begin{boxEmph}#1\vskip -5pt\end{boxEmph}}
+
+\def\MissingSection{\begin{boxWork}\ldots\ to be written \ldots\end{boxWork}}
+
+% % OLD STYLE:
+%
+% \newcommand{\BareRemark}[1]%
+% {\noindent\smallpencil\colorbox{blue!10}%
+% {\parbox{\dimexpr\linewidth-8\fboxsep}{#1}}}
+%
+% \newcommand{\MakeRemark}[2]{\BareRemark{\underline{#1} #2 }}
+%
+% \newcommand{\ImportantPoint}[2]
+% {\noindent
+%   {\huge\danger}\colorbox{magenta!40}{\parbox{\dimexpr\linewidth-8\fboxsep}
+%  {\underline{#1} #2}}}
+
+
+%-------------------------------------------------------------------------------
+%  Hyperref
+%-------------------------------------------------------------------------------
+
+\usepackage[final]{hyperref} % wants to be included last
+\hypersetup{
+    colorlinks,
+    linkcolor={red!50!black},
+    citecolor={blue!50!black},
+    urlcolor={blue!80!black},
+    pdftitle={BornAgain User Manual} % seems to be ignored
+}
+\def\tuto#1#2{\href{http://bornagainproject.org/node/#1}{#2}}
+\ifdraft{\usepackage[right]{showlabels}}{}
diff --git a/doc/ps/Title.tex b/doc/ps/Title.tex
new file mode 100644
index 00000000..4e3aa5e1
--- /dev/null
+++ b/doc/ps/Title.tex
@@ -0,0 +1,48 @@
+
+% \input{UserManualVersion} % defines command UserManualVersionNumber
+
+%-------------------------------------------------------------------------------
+%  Title page
+%-------------------------------------------------------------------------------
+
+\thispagestyle{empty}
+\strut\vspace{10mm}
+\begin{center}
+\Huge
+{\bf Frida}\\[10mm]
+\Large
+Graphics postprocessing\\[10mm]
+\large
+Version \UserManualVersionNumber\ (\today)\\\vfill
+\Large
+Joachim Wuttke\\[10mm]
+\large
+Scientific Computing Group\\[.2ex]
+J\"ulich Centre for Neutron Science\\[.2ex]
+at Heinz Maier-Leibnitz Zentrum Garching\\[.2ex]
+Forschungszentrum J\"ulich GmbH
+\end{center}
+\newpage
+
+%------------------------------------------------------------------------------
+%	DOCUMENT
+%------------------------------------------------------------------------------
+
+
+% Back of title page.
+\thispagestyle{empty}
+~\vfill
+\noindent
+\begin{tabular}{@{}p{7em}@{}l@{}}
+Homepage:  &\url{http://apps.jcns.fz-juelich.de/frida}\\[2ex]
+Copyright:  &  Forschungszentrum Jülich GmbH 2016--\the\year\\[2ex]
+Licenses:   &Software: GNU General Public License version 3 or higher\\
+            &Documentation: Creative Commons CC-BY-SA\\[2ex]
+Author :    &Joachim Wuttke\\
+            &Scientific Computing Group\\
+            &at Heinz Maier-Leibnitz Zentrum (MLZ) Garching\\[2ex]
+Disclaimer: &Software and documentation are work in progress.\\
+            &We cannot guarantee correctness and accuracy.\\
+            &If in doubt, contact us for assistance or scientific collaboration.
+\end{tabular}
+\newpage
diff --git a/doc/ps/ex2.pdf b/doc/ps/ex2.pdf
new file mode 100644
index 00000000..506fee5a
--- /dev/null
+++ b/doc/ps/ex2.pdf
@@ -0,0 +1,92 @@
+%PDF-1.4
+%Ç쏢
+5 0 obj
+<</Length 6 0 R/Filter /FlateDecode>>
+stream
+xœMQËNÃ@¼û+Ì
.ËÚñ>rEBåJ›?´JTµúûØëM©V‘_ã±Ç¹`„Ñ^·ó
+¯û‚§_ ˆ7ˆ¸ÓOÝUDuàïþ¼íz‚‹uØëf^ñmR²Š,8;°$Âi…çïe9ãí|]¾ž^¦xŸàSY|°á÷; ª1Ƕ‚û’(TFi–+ÙL«˜7CJ5PÉòCoL³i@JY7<ñFÔ¼ÜÏMh)cˆ£GÙÒ¥¶Dþçl.1Œ*Òá,÷ÝÄ)™[ÝòÐá3ÀO¥W%cW?–ªî+9T%_4C5KÕ'º”)ÊØ.b~|›–6幏äÎm{™&—´Á7tjKö©DÉïÖ÷â2­)ø¨¿ñvÿtmendstream
+endobj
+6 0 obj
+293
+endobj
+4 0 obj
+<</Type/Page/MediaBox [0 0 201 402]
+/Rotate 0/Parent 3 0 R
+/Resources<</ProcSet[/PDF /Text]
+/ExtGState 9 0 R
+/Font 10 0 R
+>>
+/Contents 5 0 R
+>>
+endobj
+3 0 obj
+<< /Type /Pages /Kids [
+4 0 R
+] /Count 1
+>>
+endobj
+1 0 obj
+<</Type /Catalog /Pages 3 0 R
+/Metadata 11 0 R
+>>
+endobj
+7 0 obj
+<</Type/ExtGState
+/OPM 1>>endobj
+9 0 obj
+<</R7
+7 0 R>>
+endobj
+10 0 obj
+<</R8
+8 0 R>>
+endobj
+8 0 obj
+<</BaseFont/Helvetica/Type/Font
+/Subtype/Type1>>
+endobj
+11 0 obj
+<</Type/Metadata
+/Subtype/XML/Length 1344>>stream
+<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
+<?adobe-xap-filters esc="CRLF"?>
+<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
+<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
+<rdf:Description rdf:about='uuid:ed4a5f8c-5467-11f1-0000-03e49cbc6693' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 9.19'/>
+<rdf:Description rdf:about='uuid:ed4a5f8c-5467-11f1-0000-03e49cbc6693' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2016-05-17T18:21:15+02:00</xmp:ModifyDate>
+<xmp:CreateDate>2016-05-17T18:21:15+02:00</xmp:CreateDate>
+<xmp:CreatorTool>UnknownApplication</xmp:CreatorTool></rdf:Description>
+<rdf:Description rdf:about='uuid:ed4a5f8c-5467-11f1-0000-03e49cbc6693' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='uuid:ed4a5f8c-5467-11f1-0000-03e49cbc6693'/>
+<rdf:Description rdf:about='uuid:ed4a5f8c-5467-11f1-0000-03e49cbc6693' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description>
+</rdf:RDF>
+</x:xmpmeta>
+                                                                        
+                                                                        
+<?xpacket end='w'?>
+endstream
+endobj
+2 0 obj
+<</Producer(GPL Ghostscript 9.19)
+/CreationDate(D:20160517182115+02'00')
+/ModDate(D:20160517182115+02'00')>>endobj
+xref
+0 12
+0000000000 65535 f 
+0000000615 00000 n 
+0000002265 00000 n 
+0000000556 00000 n 
+0000000397 00000 n 
+0000000015 00000 n 
+0000000378 00000 n 
+0000000680 00000 n 
+0000000780 00000 n 
+0000000721 00000 n 
+0000000750 00000 n 
+0000000844 00000 n 
+trailer
+<< /Size 12 /Root 1 0 R /Info 2 0 R
+/ID [<9F212B772493F43C7E6401617033D592><9F212B772493F43C7E6401617033D592>]
+>>
+startxref
+2388
+%%EOF
diff --git a/doc/ps/legend.pdf b/doc/ps/legend.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..8db8dcba6c62fb020f01565774b2aa45de535041
GIT binary patch
literal 4691
zcmb^#30M<Xx?a0Dvg&$Esg4&BA<RtfL=uF=fI<K{6hzb^nS_xflgvy=q_x(w9%uzy
zZ7oRM6-8_7s#vvDK~eFj6&FRTWs9ZWMWw6Oqw2mH2;k9f`+bIwFYo>L`>*%EjEL9i
zg;<CL8d3Grd;fr>FbY!{Goa8=B!;kC*i2XkAPI<`w6X*ZBYG>&5<0?2nFx&rVpy8M
zZIGv+IDcF0LDYAlJ8VIfvEpEC!TC<zdiAbZw{QRc<cPEDs>DA}RqVaKsB`bLzF+uX
zc<^gkw}6b8M(aJavhv0|H3BrYdT4%Pgn4UH(Aw`W4mj1dU;R#BIrCu?nVX>fW_WO?
z<&nEfO}UFcgu2IstaTRPyXuFDy1revY;aa#qAd3ObqO?M_xS4tovY;M>X_)a2H`#S
z`=w9mG`TM8XUF!k$jdY5PA)NHr#-?CawpHN`f0{f`CQ$O&3%&>C(nALLqpL0e>-h`
z$_wl14eJ(7-=v@C_f3Uzf}d~nxdRI~X2oWwQn7|5`NQ2xd4;9hvf?ebd!;p2U+B@Z
z<k)P{m86mD3x*t?w6v)hP4$^Q*Rv!zyQ%k{4yZNl%CSi~nw!~m^A?285gNW;HZS$)
z`oLZ5rgoA$`flH{xj%Yi|GnFP3oG4_MA%I&t^_O2{hZUeZ?Oo2T0oMv$Ry2l5J)_3
zArJ#$BJl{y1E-+?EtA3uX*z@?P%MZNi~<^(u(Pn33n2g#4CSJY1OtK_PgBN3f=xp}
z_+cc8@UVbytcQ(E<XJIJ9AME?fE~m54Tv|Q1$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StJXKLX;tx5EBQ(W*T&HH$`W`
zScpsjMA9a+Dgn$}%>uzrEy!e9hYCU5Zg+@V9753+1XC)N2r5EEA|ap<GBfQg?h)FV
zVL%^m2$|B#W@kcpn?j6~4IxtyECfZoio7=pN!ejeF`hxWShc|AB26lVJOfu|C>27f
zM4=F3m>CnI;3JfpQIkk&!c3@?@TzmPGxHgJ009(=fgiw11qMo!%Sg~_L1cUk9GOWm
zZ1Wrh19vC|NXzkGl~o`%FZTinXp0*{0gcK4?s@Y}9T<l-A{3JeQK=A<Cy7KVOrjDi
zf>4nPMMIJ2C_(T6s}{U%z+2}Ju(qRY$4b#jASE=(_AEQ)wud_$;KIdO5RPVjJW~rz
zD8fakoo`;Xw{VBS@caI<*|>z}=u|q&=(2%PVVv&Iq|2+0u*ukJu){@L`PwiU5yDDv
zwlN^c7_iu6RGBH-hJ(z;+dPbbj1*`>0g@$IE1}^lFWkyDFRUb2Nh&LDx2Odkp@}f#
zE-Nblk>aUM&C#%un&t)1hqTFhNvwDfsB926q_uBoAovx1UY($}W(iubTHxkd;S0^U
z-9YB8>X9!i>Oe3Xay0@{nyZqLIu%!9s1%cnM3{uHE&+-P02!#l-=%1Mp?PS+45oQZ
z3UU3Y`2)sWsaOh|VJ}Q30Tyx}*zSc%Fbup%pM{}P1(@!igGod$(xETmm7w4y^&GDp
z1#hP3U<wqx*Pex8V&#iE<dPTYP&xP3dyZEI-tf=E#4qX)$&}!A=jCN-9E{d9_|XPN
z63H9__zwm@0#M+c&CS{{GR|(MV1DiflfMp53mq#GV@jP!FO85$^m=`S7?Vn5GA(!=
iNp&KLQmgs@6zSX(o?&sC<%1>>i51X@5o6=@(Ek8GGa4ZP

literal 0
HcmV?d00001

diff --git a/doc/ps/symbols.pdf b/doc/ps/symbols.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..7d64fe163f81b093b7d5fab8bf906e48c14c6ca0
GIT binary patch
literal 16083
zcmc(G2|U!@{=YS%Bt;AATh<aY-`Ph<wiL1qNwx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ocog(vNuV4ODF-!!B=!GjF)0o5|DHraQ<%bpmY*WwhF_Oped!cO
z*#6-KU@iFb1>mq)D134RChO1y=uR=~5#T;q2V(F9$UA{wzv_@^0_;@Is>5L*mvUwu
z5(#^QGwaYeIE0#2M}&j88Fe6t#Lu1sL=j=%bVfTQmPmkHkr{O$ggHdJ8Ffekj=(lA
z2923LFA|T0!^jzZK_nK*HXaraIYcwtAqmiZ?Adh~Bo6YsW{ih~;A5Ku1;SzJ%yxJJ
zfeiyBioG2c1N%!e`hrkmWOiR9q==!D>>2HlcpMzu&a8ttm%T3zI~!*t4nGH`L?jyq
zL^P3YJRBCuwiXNy!-f?RWaler$!zWLXgFM-u@8ua*m;*ggyWYP?T`@JX7@#6kZkJ%
zAqJei4=5sqW11P`fhds3UPpkl9W&dZQE+-<Rvj8nKupy!=wzxZg%15@96*q${!q#U
z4?y?*X^?G&l#>Z`mEYZw20(*AzBppL7GS9YqHz%SZ`DF!F(3}L6^F-Qv~{4BgLrME
jwx*7b+W+0c8op%j$sp4iETsWrhy<d5jEuISj==u|nP<cH

literal 0
HcmV?d00001

diff --git a/pub/share/wups11a.ps b/pub/share/wups11a.ps
index 7c2d7d3e..e84f9e98 100644
--- a/pub/share/wups11a.ps
+++ b/pub/share/wups11a.ps
@@ -3,7 +3,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%  FRIDA: fast reliable interactive data analysis                           %%
 %%  wups11a.ps: graphic macros                                               %%
-%%  (C) Joachim Wuttke 1990-2011                                             %%
+%%  (C) Joachim Wuttke 1990-2016                                             %%
 %%  http://www.messen-und-deuten.de/frida                                    %%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -586,7 +586,7 @@ WuGdict11a begin
    blabla endall
    xwidth % has been determined
    } def
-/textw { % obj textW y : dito, in 0..10-units
+/textw { % obj | y : dito, in 0..10-units
    textW xmm div
    } def
 
@@ -1476,13 +1476,15 @@ WuGdict11a begin
 
 %%  special objects
 
+/pfeilangle 36.87 def
 /pfeilspitze { % x[local] y[local] rot siz
    % draw with current linestyle, as set e.g. by linsetAxx
    x 4 2 roll % siz rot x y
    gsave
      xym translate 180 add rotate dup dup dup
      [] 0 setdash
-     .8 mul x .6 mul np mv 0 0 li .8 mul x -.6 mul li st
+     pfeilangle cos mul x pfeilangle sin mul np mv
+     0 0 li pfeilangle cos mul x pfeilangle sin neg mul li st
    grestore
    } def
 /pfeiL { % (arrow anchored at base) x y rot siz len
@@ -1554,27 +1556,15 @@ WuGdict11a begin
       splng -.5 mul fm 0 np mv splng fm 0 rl st grestore
    } def
 
-% broken:
-/setBemasz { % textsize textspace arrowsize arrowthick | -
-    /bmszTH x def
-    /bmszSZ x def
-    /bmszSP x def
-    /bmszOW x def
-   } def
-18 .2 .5 .01 setBemasz
-/Bemasz { % x y dx ang text_ang text | -
+/bemasz { % x y L ang text | - %% precede by '24 setown 1 [] lset /pfeilangle 90 def'
     gsave
-    6 4 roll offset % consumes x and y
-    3 2 roll rotate % consumes ang | dx text_ang text
-    bmszOW setown
-    x /bmszRT x def
-    x 2 div x 2 copy % dx/2 text dx/2 text
-    textw 2 div bmszSP add % dx/2 text dx/2 halflabelwidth
-       % ACHTUNG: fuer bmszRT <> 0 ist textw NOCH FALSCH
-    4 1 roll 0 3 2 roll bmszRT x rtextCM % hlw dx/2
-    dup 2 mul 3 1 roll x sub dup % dx len len
-    0 0 180 4 -1 roll bmszSZ bmszTH arrow % dx len
-    x 0 0 4 -1 roll  bmszSZ bmszTH arrow
+    5 3 roll offset % consumes x and y
+    x rotate % consumes ang | L text
+    dup textw .5 mul fontheight .4 mul add /bmszDT x def % => half text width
+    0 0 3 2 roll textCM % L
+    .5 mul /bmszDX x def % => half bemasz length
+    bmszDX     0   0 fontheight .67 mul bmszDX bmszDT sub Pfeil
+    bmszDX neg 0 180 fontheight .67 mul bmszDX bmszDT sub Pfeil
     grestore
    } def
 
-- 
GitLab