%% mpicp-pictex.tex
%% mathsPIC manual

\documentclass[mathsPICmanual.tex]{subfiles}
\begin{document}
%%=============================

%%-----------------------------------------
\chapter[PiCTeX]{\PiCTeX}
\label{ch:pictex}

{\PiCTeX} is an excellent small graphics package, which is  available on the \TeXLive\ DVD and from CTAN.
If you  have a  recent  \TeX\ installation then it is likely that  \PiCTeX\ is  already installed\footnote{Check for any \PiCTeX\ directories by typing the command \texttt{\$ locate pictex}}. If \PiCTeX\ is not installed, then
create a \PiCTeX\ subdirectory in your `local' \TeX\ space, typically at
\begin{verbatim}
/usr/local/texlive/texmf-local/tex/latex/local/pictex/ 
\end{verbatim}
Now copy into this new subdirectory  all the \PiCTeX\ files in the following  CTAN directories:
\begin{Verbatim}
CTAN:/tex-archive/graphics/pictex/
CTAN:/tex-archive/graphics/pictex/addon/
\end{Verbatim}


 Unfortunately, the \textit{\PiCTeX\  Manual} is not available
from  CTAN---the manual has  to be purchased separately (see Section~\ref{sec:pictexmanual}).
However, {\mathsPIC} users will mostly find this
unnecessary, since those \PiCTeX\ commands
which are particularly useful in conjunction with {\mathsPIC}
are described here in Chapter~\ref{chap:pictex}.

In the following, we present some  background,  including  details about how to obtain a copy of the \PiCTeX\ manual.

%%%--------------------
\section{The original files (1986)}

\noindent\texttt{CTAN/tex-archive/graphics/pictex/}

\medskip

The original {\PiCTeX} package by Michael  Wichura (21/09/1987)
originally consisted of the 4 files listed below.
On the left is the MS-DOS name (truncated to 8 characters), and
on the right is the full UNIX name).

The file \texttt{latexpic.tex} gives Plain \TeX\  users the
option of using the \LaTeX\ Picture macros \verb!\line!, \verb!\vector!,
\verb!\circle!, \verb!\oval!, \verb!\thicklines! and
\verb!\thinlines! (for syntax and use with \PiCTeX\ see
Wichura, 1992).

\pagebreak

Note that only two of the following files are required  when 
using  plain {\TeX}, while three files are
 required when using  \LaTeX.

\begin{verbatim}
latexpic.tex  11243 bytes (latexpicobjs.tex - for plain TeX only)
prepicte.tex   1293 bytes (prepictex.tex    - for LaTeX)
pictex.tex   133388 bytes (pictex.tex       - for LaTeX & plain TeX)
postpict.tex   1614 bytes (postpictex.tex   - for LaTeX)
\end{verbatim}


The three files required for use with \LaTeX\
need to be loaded (input) \textit{in the order
shown above}.
 Note that when using {\PiCTeX} with \LaTeXe\
it is necessary to redefine the \LaTeX\ 2.09 command \verb!\fiverm!
(because {\PiCTeX} was originally written for \LaTeX\ 2.09).
This is most easily done as follows ( and hence it is included in the \texttt{mathspic.sty} file).
\begin{verbatim}
\newcommand{\fiverm}{\rmfamily\tiny}
\end{verbatim}


Alternatively you can use the more robust method (i.e.\ for
\textit{wizards}) suggested
by Michael J Downes  as follows (I believe
Michael Downes suggested this originally on the
\textsl{comp.text.tex} usenet group---see also
the file \texttt{fntguide.tex} among the \LaTeXe\ documents).

\begin{verbatim}
\declarefixedfont{\fiverm}{\encodingdefault}{\rmdefault}{m}{n}{5}
\end{verbatim}

A significant problem with the original \PiCTeX\ package was
that it was very memory hungry. However, in 1994
this problem was overcome by a significant rewrite by Andreas
Schrell, as described in the next section.

%%--------------------
\section{The new updated  files (1994)}
\label{sec:schrell}

\begin{verbatim}
CTAN/tex-archive/graphics/pictex/addon/
\end{verbatim}

In 1994 Andreas Schrell uploaded  a set of updated \PiCTeX\ files into the
\newline\verb!CTAN: .../graphics/pictex/addon/! directory. One of these additional files
 of Schrell's (\verb!pictexwd.tex!) is a replacement for the original
(\verb!pictex.tex!), and is  extremely
economic in its use of {\TeX}'s dimension registers,
 allowing significantly better memory usage
 with exactly the same functionality.
The other files correct some errors (\verb!piccorr.sty!),
and add new functionality (\verb!picmore.tex!).

\begin{verbatim}
pictexwd.sty         416 bytes
pictexwd.tex      133232 bytes
picmore.tex         2952 bytes
piccorr.sty         4608 bytes
pictex.sty           311 bytes
\end{verbatim}


%--------
\begin{itemize}

 \item \verb!pictexwd.sty!

For \LaTeX\ users. This  replaces  \verb!pictex.sty!. It inputs
\verb!prepictex.tex!, \verb!pictexwd.tex!, and
\verb!postpictex.tex!, as well as inputting \verb!piccorr.sty!
and \verb!picmore.tex! if these are available.

 \item \verb!pictexwd.tex!

For \TeX\ users.

  \item \verb!picmore.tex!

An extension  for drawing impulse diagrams.

  \item \verb!piccorr.sty!

A correction  for the
original \PiCTeX\ \verb!\betweenarrows! command.

\item \verb!pictex.sty!

The \LaTeX\ style-option for loading the \textit{original}
\PiCTeX\ files. Note that it also inputs \verb!piccorr.sty!
and \verb!picmore.tex! if these are available.


 \end{itemize}
%------
  All the necessary files required for
running \PiCTeX\ are automatically input in
the correct order by \verb!pictexwd.sty! (\LaTeX\ users), or by
\verb!pictexwd.tex! (\TeX\ users).
Users of {\LaTeXe} should include the following command in the
preamble.

\begin{verbatim}
\usepackage{pictexwd}
\end{verbatim}

Users of plain {\TeX} need to  include the following.

\begin{verbatim}
\input latexpic.tex
\input pictexwd.tex
\end{verbatim}
Note that  even when using Andreas Schrell's new files, all the original \PiCTeX\ files are still required.


%%----------------------
\section{Pictex2.sty}


\begin{verbatim}
CTAN/tex-archive/macros/latex/contrib/supported/pictex2.sty
16418 bytes 09/05/1999
\end{verbatim}


William Park has written a style option (\texttt{pictex2.sty})
which adds two useful commands to standard {\PiCTeX},
which force the use of the \verb!\putrule! command where lines are
either horizontal or vertical, thus saving on memory (note that
{\mathsPIC} automatically implements the use of \verb!\putrule!
in these circumstances).
These two commands are as follows.

\begin{itemize}
\item  \texttt{$\backslash$putanyline}

This command invokes the {\PiCTeX} \verb!\putrule! command
(instead of  \verb!\plot!) in cases where lines are either
vertical or  horizontal.


\item \texttt{$\backslash$setanyline}

This is a line-drawing mode (similar to \verb!\setlinear!) which
forces  subsequent \verb!\plot! commands to invoke \verb!\putrule!
whenever the line is either horizontal or vertical.

\end{itemize}



%%----------------------
\section{Errorbars.tex}
\label{sec:errorbar}

\begin{verbatim}
CTAN/tex-archive/graphics/pictex/errorbars.tex
3041 bytes 20/04/1988
\end{verbatim}

In 1988 Dirk Grunwald implemented a new \PiCTeX\ command
for drawing error bars using
a modified \verb!\plot! command, as follows.
\begin{itemize}
\item  \texttt{$\backslash$plotWithErrorBars}

This command, which is case sensitive, has the format
\begin{verbatim}
\plotWithErrorBars mark M at
   x1 y1 e1
   ...
   xn yn en /
\end{verbatim}
where \verb!M! is  a \TeX\ character (e.g.\ \verb!$\bullet$!),
and \verb!e! is the size of vertical error bars which are
plotted above and below the point. The default cross-bar length
is 5pt, but can be changed, say to 7pt,  using the command
\verb!\crossbarlength=7pt!.

To use this command, input the file \verb!errorbars.tex! after
all the \PiCTeX\ files.

\end{itemize}



%%----------------------
\section{DCpic}

DCpic  (by Pedro Quaresma) is a package of \TeX\ macros for drawing commutative diagrams in a \LaTeX\ or Con\TeX\ document. It uses \PiCTeX\ to implement commands which manipulate its various `objects' and arrows.
This package (February 2002) is available on CTAN  (and \texlive) at
\begin{verbatim}
CTAN: tex-archive/macros/generic/diagrams/dcpic/
\end{verbatim}
and includes the following documentation files:
\begin{verbatim}
manPT_dcpic.pdf
man_dcpic.pdf
\end{verbatim}



%%------------------------------------------
\section{The \PiCTeX\  Manual}
\label{sec:pictexmanual}

I would recommend purchasing the excellent \textsl{The {\PiCTeX} Manual}
by Michael J.\ Wichura (The University of Chicago, Chicago,
Illinois, USA). %%%; \textit{wichur@galton.uchicago.edu}).
This small booklet (version 1.1, third printing, March 1992; 85 pages)
used to be available from TUG as Publication No.\ 6 in
the TUG {\TeX}niques series.
Unfortunately, TUG (\url{http://www.tug.org/})
has now stopped publishing the manual, and
so \textsl{The \PiCTeX\ Manual}
is currently only available from \textsl{Personal \TeX\
Inc.} (\textit{texsales@pctex.com}, \linebreak \texttt{http://www.pctex.com/books.html}).




%%---------------------------------
\subsection*{Summary of the manual}

Probably the  most useful alternative document is the  excellent and detailed 8-page summary of \PiCTeX\ commands made by  Angus Duggan (1990), available on CTAN (as \textit{summary.zip}) at
\begin{verbatim}
CTAN: ../info/pictex/summary/pictexsum.pdf
CTAN: ../info/pictex/summary/pictexsum.tex   (Latex209 version)
CTAN: ../info/pictex/summary/useful.sty
CTAN: ../info/pictex/summary/ukdate.sty
\end{verbatim}
These are also included in the CTAN section of the {\texlive}-2010 DVD.
Note that both of the style files \texttt{useful.sty} and \texttt{ukdate.sty} are required to easily  latex his \texttt{.tex} file.

A short 3-page German summary  by Siart (2008)  is available at
\newline\verb!http://www.siart.de/typografie/pictex-referenz.pdf!






%%---------------------------------
\subsection*{Other info}

 Lueck (2008)  is a useful list of further information.
Note some other documentation is available on the {\texlive}-2010 DVD, and is typically installed at the following locations:
\begin{verbatim}
/usr/local/texlive/2010/texmf-dist/doc/generic/FAQ-en/html/FAQ-docpictex.html
/usr/local/texlive/2010/texmf-dist/doc/generic/FAQ-en/html/FAQ-usepictex.html
/usr/local/texlive/2010/texmf-dist/doc/generic/doc-pictex
/usr/local/texlive/2010/texmf-dist/doc/generic/doc-pictex/Doc-PiCTeX.txt
\end{verbatim}



\iffalse

%% =======wait until we have spoken to Lueck for permission
%% check out the German website he mentions



The file \texttt{Doc-PiCTeX.txt} by Uwe Lueck 
available at 
\begin{verbatim}
/usr/local/texlive/2010/texmf-dist/doc/generic/doc-pictex/Doc-PiCTeX.txt
\end{verbatim}
 gives the following useful information:


\begin{center}
\textbf{Documentation for \PiCTeX}
\end{center}
\begin{quote}
This file by Uwe Lueck (the wrong author for an overview) 2008/08/15
(based on web search 2008/02/15); add-ons/edits invited! To inform me 
about lacunae etc.: \texttt{http://contact-ednotes.sty.de.vu}
\end{quote}

\begin{enumerate}


\item  The macro file pictex.tex (or pictexwd.tex) contains a sober yet 
comprehensive documentation. (Something similar holds for contributions 
from other authors.)

\item  Michael Wichura presented a description in TUGboat 9 (2), pp. 193-197 
(1988), see 

      http://www.tug.org/TUGboat/Articles/tb09-2/tb21wichura-pictex.pdf

\item  Michael Wichura's MANUAL -- today called `PiCTeX and Table Manual' -- 
is distributed by PCTeX: 

      http://www.pctex.com/books.html

\item  Other overviews have been presented at least in Helmut Kopka's GERMAN 
books on LaTeX extensions in the 1990s. [Lazy, I know.]

\item  Another GERMAN reference list, a quite RECENT one, is Uwe Siart's PDF 
on the web at

      http://www.siart.de/typografie/pictex-referenz.pdf

\item  An early command summary has been Angus Duggan's PDF on the web at 

      http://mirror.ctan.org/info/pictex/summary/pictexsum.pdf

\item  You may like short descriptions of pictex including HINTS concerning 
basic problems with PiCTeX 

-- in the TeX Catalogue: 

      http://mirror.ctan.org/help/Catalogue/entries/pictex.html

or in the TUG.org package information: 

      http://ctan.tug.org/pkg/pictex

-- in the UK TeX FAQ:

      http://www.tex.ac.uk/cgi-bin/texfaq2html?label=usepictex

      http://www.tex.ac.uk/cgi-bin/texfaq2html?label=docpictex

\end{enumerate}

\fi

%%-------------------
\end{document}
