summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/pinlabel
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/pinlabel
Initial commit
Diffstat (limited to 'macros/latex/contrib/pinlabel')
-rw-r--r--macros/latex/contrib/pinlabel/pinlabdoc.pdfbin0 -> 262033 bytes
-rw-r--r--macros/latex/contrib/pinlabel/pinlabel.sty1097
-rw-r--r--macros/latex/contrib/pinlabel/src/fig3.pdfbin0 -> 2021 bytes
-rw-r--r--macros/latex/contrib/pinlabel/src/fig6.pdfbin0 -> 2812 bytes
-rw-r--r--macros/latex/contrib/pinlabel/src/gtpart.cls818
-rw-r--r--macros/latex/contrib/pinlabel/src/pinlabdoc.tex1258
l---------macros/latex/contrib/pinlabel/src/pinlabel.sty1
-rw-r--r--macros/latex/contrib/pinlabel/src/put.fig14
-rw-r--r--macros/latex/contrib/pinlabel/src/put.pdfbin0 -> 1297 bytes
-rw-r--r--macros/latex/contrib/pinlabel/src/put2.fig14
-rw-r--r--macros/latex/contrib/pinlabel/src/put2.pdf74
-rw-r--r--macros/latex/contrib/pinlabel/src/screen.pdfbin0 -> 29879 bytes
12 files changed, 3276 insertions, 0 deletions
diff --git a/macros/latex/contrib/pinlabel/pinlabdoc.pdf b/macros/latex/contrib/pinlabel/pinlabdoc.pdf
new file mode 100644
index 0000000000..8baf3a23ed
--- /dev/null
+++ b/macros/latex/contrib/pinlabel/pinlabdoc.pdf
Binary files differ
diff --git a/macros/latex/contrib/pinlabel/pinlabel.sty b/macros/latex/contrib/pinlabel/pinlabel.sty
new file mode 100644
index 0000000000..cb0f798b1a
--- /dev/null
+++ b/macros/latex/contrib/pinlabel/pinlabel.sty
@@ -0,0 +1,1097 @@
+%%%% pinlabel.sty v1.2
+%%%%
+%%%% Written by Colin Rourke
+%%%%
+%%%% Based on geompsfi.sty by Silvio Levy
+%%%% Based on psfig.sty by Trevor Darrell
+%%%%
+%%%% Copyright 2006-11 Mathematical Sciences Publishers (MSP)
+%%%%
+%%%% NOTICE
+%%%%
+%%%% This package may be distributed and/or modified under the
+%%%% conditions of the LaTeX Project Public License, either version
+%%%% 1.3 of this license or (at your option) any later version.
+%%%% The latest version of this license is in
+%%%%
+%%%% http://www.latex-project.org/lppl.txt
+%%%%
+%%%% and version 1.3 or later is part of all distributions of LaTeX
+%%%% version 2005/12/01 or later.
+%%%%
+%%%% This package has the LPPL maintenance status `maintained' and is
+%%%% currently maintained by MSP: contact@mathscipub.org
+%%%%
+%%%% It comprises the files: pinlabel.sty (this file) and the manual
+%%%% pinlabdoc.pdf where full documentation may be found, togther
+%%%% with the source files for the documentation.
+%%%%
+%%%%
+%%%% pinlabel.sty is designed for inserting perfectly formatted TeX
+%%%% labels in eps or pdf files for inclusion in documents.
+%%%% It uses the coordinates provided by ghostview (or gv) to
+%%%% position the label and reads the relevant bounding box
+%%%% information from the eps file (or alternatively ps or pdf
+%%%% file). You must supply one of these three. To label a jpg
+%%%% for example, you need to convert it first to eps or pdf.
+%%%% Several features are provided which facilitate perfect
+%%%% first-time label positioning, of which the most important
+%%%% is auto-spacing, which sets the label a predetermined gap
+%%%% away from the figure object which is being labelled. The
+%%%% gap is \hair (a TeX dimension, preset to 3pt, but settable
+%%%% on the fly) and the direction of the spacing is chosen
+%%%% automatically. The result is consistent and eye-pleasing
+%%%% spacing.
+%%%% In use, read the position of the object that you wish to
+%%%% label and do not guess the position of the actual label.
+%%%% Then choose the orientation of the label (eg [tr] which
+%%%% means top-right) and the label will automatically be set
+%%%% so that top-right of the label bounding box is set one
+%%%% \hair away from the object being labelled.
+%%%%
+%%%%
+%%%% pinlabel.sty was written specifically for the use of editors and
+%%%% authors of MSP papers and is the recommended package for
+%%%% use for labelling diagrams for MSP.
+%%%%
+%%%% pinlabel.sty is a revised version of geomsfig.sty with improved
+%%%% functionality and simpler syntax. The old syntax remains
+%%%% available for backwards compatibility, see below.
+%%%%
+%%%% new syntax: \pinlabel {label} by x-pin y-pin at x-location y-location
+%%%% and \pinlabel* {label} by x-pin y-pin at x-location y-location
+%%%%
+%%%% where "x-pin y-pin" is the point in intrinsic coords in label
+%%%% space where we are placing the pin and "x-location y-location"
+%%%% is the point in diagram space (in PS points as read in gv) where
+%%%% the label is pinned. \pinlabel uses \hair autospacing \pinlabel*
+%%%% does not. See the manual for full details.
+%%%% \mathsurround is set to 0pt for parsing the label
+%%%%
+%%%% options: "by x-pin y-pin" may be omitted the default is 0 0
+%%%% orientation commands [r], [l] etc may replace "by x-pin y-pin"
+%%%% [r] is right-centre (same as "by 0 1") etc
+%%%% a manual adjustment "<x-adj, y-adj>" may be added before "at"
+%%%% or directly after the label
+%%%%
+%%%% Examples \pinlabel $a^b$ [l] <-2pt,1pt> at 231 47
+%%%% Same as \pinlabel $a^b$ by -1 0 <-2pt,1pt> at 231 47
+%%%% Same as \pinlabel $a^b$ <-2pt,1pt> [l] at 231 47
+%%%% Same as \pinlabel $a^b$ <-2pt,1pt> by -1 0 at 231 47
+%%%%
+%%%% which pins "$a^b$" by centre-left at 231 47 with two
+%%%% adjustments: \hair (autospacing) and then (-2pt,1pt) manual
+%%%%
+%%%% \pinlabel* {A nice figure} [Bl] <-5pt,0pt> at 231 47
+%%%%
+%%%% which pins "A nice figure" by baseline-left at 231 47
+%%%% with one adjustment: (-5pt,0pt)
+%%%%
+%%%% Full list of orientation commands: r=right, l=left, t=top, b=bottom
+%%%% and B=baseline, default is centre and any sensible combination
+%%%% of two commands may be give (in either order) eg
+%%%% [tl]=[lt]=top-left of label bounding box
+%%%%
+%%%% NB the commands are syntax sensitive and use spaces as separators so
+%%%% they DON'T work with \obeyspaces set. Braces must be placed
+%%%% around labels containing spaces but may be omitted if there are
+%%%% no spaces in the label code (see the examples above and below).
+%%%%
+%%%% Label instructions go either in the file inside \labellist
+%%%% ... \endlabellist or in a separate .lab file (ie if fig
+%%%% is fig4-1.eps or .ps, then labels go in \figdir/fig4-1.lab
+%%%% where \figdir/ is the directory containing fig4-1.eps).
+%%%% The \labellist overrides a .lab file.
+%%%% \labellist ... \endlabellist can be given at any time before
+%%%% the next figure, but typically will be included in the figure
+%%%% code, as in the following example.
+%%%%
+%%%% Here is a complete example of a relabelled figure:
+%%%%
+%%%% \begin{figure}[ht!]
+%%%% \labellist\small\hair 2.5pt
+%%%% \pinlabel {$\partial _1 X$} by 1 0 at 156 426
+%%%% \pinlabel {$\partial _2 X$} by -1 1 at 334 429
+%%%% \pinlabel $X_1$ at 431 513
+%%%% \pinlabel $X_2$ at 428 460
+%%%% \pinlabel $H_X$ [lb] at 311 622
+%%%% \pinlabel* $H_X'$ [tr] <-1.5pt,-2pt> at 178 370
+%%%% \endlabellist
+%%%% \centerline{\psfig{file=\figdir/decomp,width=3in}}
+%%%% \caption{Labelling the boundary components of $X$}
+%%%% \label{Fig:decomp}
+%%%% \end{figure}
+%%%%
+%%%% The actual figure can be included by using either psfig or
+%%%% graphicx. psfig is used by the code, but graphicx
+%%%% commands are translated automatically, so in the above
+%%%% example the alternative code:
+%%%%
+%%%% \centerline{\includegraphics[width=3in]{\figdir/decomp}}
+%%%%
+%%%% would produce identical results. Automatic translation ONLY
+%%%% takes place is a labellist is present, so if you use a .lab
+%%%% file then you MUST use the psfig syntax.
+%%%%
+%%%%
+%%%% VERY IMPORTANT
+%%%% ==============
+%%%%
+%%%% The file extension MUST NOT be given. The program will find
+%%%% the correct file (\figdir/decomp.eps or .ps or .pdf).
+%%%%
+%%%% READ THE BUGS below before using \includegraphics with pinlabel.
+%%%%
+%%%%
+%%%% old syntax: \setlabel is unchanged (but \mathsurround is set to 0pt)
+%%%% \setlabel* is a new variant which sets \hair to 0pt (no
+%%%% autospacing) and an optional manual adjustment may be added
+%%%% eg:
+%%%%
+%%%% \setlabel<-2pt,-1pt>{a^b}{321}{33}{1}{1}
+%%%% \setlabel*<-2pt,-1pt>{a^b}{321}{33}{1}{1}
+%%%% \setlabel{a^b}{321}{33}{1}{1}
+%%%% \setlabel*{a^b}{321}{33}{1}{1}
+%%%%
+%%%% the first uses autospacing and adds a (-2pt,-1pt) manual
+%%%% adjustment; the second uses just the manual adjustment,
+%%%% the third just autospacing and the fourth nothing.
+%%%%
+%%%% old and new syntax may be mixed in a label list and given
+%%%% either in a .lab file or inside \labellist ... \endlabellist
+%%%%
+%%%% ***Users of geomsfig note the change to \mathsurround. If you
+%%%% do not use it, there will be no change in label positioning.
+%%%% If you do, labels may move a small amount horizontally.***
+%%%%
+%%%%
+%%%% !!!NBNB label is in horizontal mode in new syntax and math mode in old!!!
+%%%%
+%%%%
+%%%% BUGS: NO spaces are permitted in the file argument of \psfig
+%%%% Autotranslation of \includegraphics[]{} means that no
+%%%% spaces are permitted in the file argument to \includegraphics
+%%%% Eg \includegraphics[width=4in]{ foo } will produce errors,
+%%%% use \includegraphics[width=4in]{foo}. Spaces are permitted
+%%%% with other arguments.
+%%%%
+%%%% Many of the options in graphicx are not supported. The
+%%%% supported ones are: width, height, scale, bbllx, bblly
+%%%% bburx, bbury and clip. The syntax for clip is "clip=".
+%%%% Replace "keepaspectratio=true" by "proportional=".
+%%%%
+%%%% The command \reallyincludegraphics will force the use of
+%%%% graphicx (ie cancel autotranslation). Since code will use
+%%%% graphicx automatically if there is no labellist present,
+%%%% \reallyincludegraphics will only be needed if a labellist
+%%%% has already been given for a later figure.
+%%%%
+%%%% \graphicspath{} is not supported. Use \figdir instead.
+%%%%
+%%%%
+%%%% Automatic configuration for dvips and pdflatex is included
+%%%% in this file. No support is provided for other drivers.
+%%%%
+%%%% NB \psfig ouputs a vbox, which is not centred in latex' {center}
+%%%% environment. Either use \centerline{} or type \leavevmode
+%%%% before \psfig{..}. The translator adds \leavevmode for
+%%%% \includegraphics, which therefore centres correctly as usual
+%%%% in the {center} environment.
+%%%%
+%%%% PLAIN TeX compatibility: uses miniltx.tex and works with dvips
+%%%% but NOT with pdftex. For pdf output from plain TeX use dvips
+%%%% followed by ps2pdf.
+%%%%
+%%%% NEW FOR VERSION 1.2: Thanks to Mark Petelier, you no longer
+%%%% need to convert a pdf figure to eps. pinlabel now reads the
+%%%% BB from a pdf file if no ps or eps file is supplied.
+
+\edef\atcatcode{\the\catcode`\@} \catcode`@=11
+\def\@message#1{\immediate\write16{#1}}
+
+\newif\ifoldlabels \oldlabelsfalse
+\expandafter\ifx\csname @ifundefined\endcsname\relax
+\long\def\@ifundefined#1#2#3{\expandafter\ifx\csname
+ #1\endcsname\relax#2\else#3\fi}
+
+\def\@iden#1{#1}
+%\newdimen\@tempdima
+\alloc@1\dimen\dimendef\insc@unt\@tempdima
+\def\@warning#1{\@message{Warning: #1.}}
+\fi
+
+%%% if not latex \input miniltx (for plain tex compatibility)
+\@ifundefined{RequirePackage}{\input miniltx}{\relax}
+
+%%% make sure graphicx is loaded
+\RequirePackage{graphicx}
+\let\@includegraphics@\includegraphics %%% for auto translation of graphicx
+\let\reallyincludegraphics\@includegraphics@ %%% to override translation
+
+\@ifundefined{ps@init}{}{\endinput}
+
+\@ifundefined{hyperactivelabels}{\let\hyperactivelabels\relax}{}
+
+%%% in-line label list handling %%%
+\long\def\labellist#1\endlabellist{\gdef\thelabellist{#1}}
+\let\thelabellist\relax %%%% initialise
+
+\newif\if@topspecials %false for Rokicki's dvips: \special is at bottom of box
+ % true for dvitps, dvi2ps
+
+\newif\ifdvi\dvitrue
+\@ifundefined{pdfoutput}{}{\ifnum\pdfoutput>0 \dvifalse\fi}
+\ifdvi
+%%% start of driver.chg
+{\catcode`\p=12 \catcode`\t=12 \gdef\read@PT#1pt{#1}}
+\def\sp@topt#1#2{\psfig@dimen=#2sp \if\psfig@dimen=0pt \psfig@dimen=1sp\fi
+ \edef#1{\expandafter\read@PT \the\psfig@dimen}}
+\def\sp@tobp#1#2{\psfig@dimen=#2sp \if\psfig@dimen=0pt \psfig@dimen=1sp\fi
+ \expandafter\@tempdima\expandafter\read@PT \the\psfig@dimen bp
+ \advance\psfig@dimen-.5 \@tempdima \multiply\psfig@dimen 2
+ \edef#1{\expandafter\read@PT \the\psfig@dimen}}
+\def\ps@init{}
+\def\ps@begin{\sp@tobp\@tempa\@p@sbbllx \sp@tobp\@tempb\@p@sbblly
+ \sp@tobp\@tempc\@p@sbburx \sp@tobp\@tempd\@p@sbbury
+ \sp@tobp\@tempe{\@p@swidth0} \sp@tobp\@tempf{\@p@sheight0}
+ \special{PSfile=\@p@sfile\space llx=\@tempa\space lly=\@tempb\space
+ urx=\@tempc\space ury=\@tempd\space rwi=\@tempe\space rhi=\@tempf}}
+% rwi is the total width, in tenths of the units used for the
+% other dimensions (this is dvips's brain damage)
+\def\ps@prolog{}
+\def\ps@clip{} %
+\def\ps@include{} %
+\def\ps@postlog{} %
+\def\ps@end{} %
+%%% end of driver.chg
+\else
+\@ifundefined{usepackage}{\@message{}
+\@message {!!! pinlabel.sty cannot be used for direct pdf output except with latex !!!}
+\@message {For pdf output from plain tex use dvips and ps2pdf}
+\@message{}}{}
+%%% start of gpdftex.chg
+{\catcode`\p=12 \catcode`\t=12 \gdef\read@PT#1pt{#1}}
+\def\sp@topt#1#2{\psfig@dimen=#2sp \if\psfig@dimen=0pt \psfig@dimen=1sp\fi
+ \edef#1{\expandafter\read@PT \the\psfig@dimen}}
+\def\sp@tobp#1#2{\psfig@dimen=#2sp \if\psfig@dimen=0pt \psfig@dimen=1sp\fi
+ \expandafter\@tempdima\expandafter\read@PT \the\psfig@dimen bp
+ \advance\psfig@dimen-.5 \@tempdima \multiply\psfig@dimen 2
+ \edef#1{\expandafter\read@PT \the\psfig@dimen}}
+\def\ps@init{}
+\def\ps@begin{\sp@tobp\@tempa\@p@sbbllx \sp@tobp\@tempb\@p@sbblly
+ \sp@tobp\@tempc\@p@sbburx \sp@tobp\@tempd\@p@sbbury
+ \sp@tobp\@tempe\@p@swidth \sp@tobp\@tempf\@p@sheight%
+\edef\foobar{[width=\@p@swidth sp,height=\@p@sheight sp]{\@p@dffile}}%
+%,viewport=\@tempa\space\@tempb\space\@tempc\space\@tempd
+\@message{\string\@includegraphics@\foobar}%
+\rlap{\smash{\expandafter\@includegraphics@\foobar}}%
+}
+% rwi is the total width, in tenths of the units used for the
+% other dimensions (this is dvips's brain damage)
+\def\ps@prolog{}
+\def\ps@clip{} %
+\def\ps@include{} %
+\def\ps@postlog{} %
+\def\ps@end{} %
+%%%% end of gpdftex.chg
+\fi
+
+%%%% graphicx translation
+%%%% first set a flag to detect use of graphicx and initialise
+%%%% the default is \relax (graphicx not used) any other value
+%%%% means graphicx is used
+\let\inc@graph@flag\relax
+
+%%%% redefine \includegraphics to mimic \psfig ONLY IF a labellist is present
+\def\includegraphics{\ifx\thelabellist\relax\let\next\@includegraphicsnolist@%
+\else\let\next\@includegraphics@list@\fi\next}
+
+\let\@includegraphicsnolist@\reallyincludegraphics
+
+\def\@includegraphics@list@{\def\inc@graph@flag{1}%
+\@ifnextchar[{\includegraphicswithoptions}{\includegraphicsplain}}
+\def\includegraphicswithoptions[#1]#2{\leavevmode\psfig{file=#2,#1}}
+\def\includegraphicsplain#1{\leavevmode\psfig{file=#1}}
+
+
+\newcount\psfc@a
+\newcount\psfc@b
+\newcount\psfc@c
+\newcount\psfc@d
+\newcount\psfc@e
+\newcount\psfc@f
+\newcount\psfc@g
+\newcount\psfc@h
+\newcount\psfc@i
+\newcount\psfc@j
+\newcount\psscale@count
+\newtoks\psfigtoks@
+% A dimension register for temporarily storing a dimension in
+% \@pDimenToSpNumber.
+\newdimen\psfig@dimen
+%
+%\newwrite\@unused
+%\def\typeout#1{{\let\protect\string\immediate\write\@unused{#1}}}
+
+% Identifying message is here.
+% \typeout{psfig/tex 1.4.gcg / TeXPS}\fi
+%
+% @psdo control structure -- similar to Latex @for.
+% I redefined these with different names so that psfig can
+% be used with TeX as well as LaTeX, and so that it will not
+% be vunerable to future changes in LaTeX's internal
+% control structure.
+\def\@nnil{\@nil}
+\def\@empty{}
+\def\@psdonoop#1\@@#2#3{}
+\def\@psdo#1:=#2\do#3{\edef\@psdotmp{#2}\ifx\@psdotmp\@empty \else
+ \expandafter\@psdoloop#2,\@nil,\@nil\@@#1{#3}\fi}
+\def\@psdoloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else
+ #5\def#4{#2}\ifx #4\@nnil \else#5\@ipsdoloop #3\@@#4{#5}\fi\fi}
+\def\@ipsdoloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\@nnil
+ \let\@nextwhile=\@psdonoop \else
+ #4\relax\let\@nextwhile=\@ipsdoloop\fi\@nextwhile#2\@@#3{#4}}
+\def\@tpsdo#1:=#2\do#3{\xdef\@psdotmp{#2}\ifx\@psdotmp\@empty \else
+ \@tpsdoloop#2\@nil\@nil\@@#1{#3}\fi}
+\def\@tpsdoloop#1#2\@@#3#4{\def#3{#1}\ifx #3\@nnil
+ \let\@nextwhile=\@psdonoop \else
+ #4\relax\let\@nextwhile=\@tpsdoloop\fi\@nextwhile#2\@@#3{#4}}
+%
+\def\psdraft{%
+ \def\@psdraft{0}
+ %\typeout{draft level now is \@psdraft \space.}
+}
+\def\psfull{%
+ \def\@psdraft{100}
+ %\typeout{draft level now is \@psdraft \space.}
+}
+\psfull
+\newif\if@prologfile
+\newif\if@postlogfile
+\newif\if@noisy
+\def\pssilent{%
+ \@noisyfalse
+}
+\def\psnoisy{%
+ \@noisytrue
+}
+%\psnoisy
+\pssilent
+% These are for the option list:
+% a specification of the form a = b maps to calling \@p@@sa{b}.
+\newif\if@bbllx
+\newif\if@bblly
+\newif\if@bburx
+\newif\if@bbury
+\newif\if@height
+\newif\if@width
+\newif\if@rheight
+\newif\if@rwidth
+\newif\if@clip
+\newif\if@proportional
+\newif\if@scale
+\newif\if@verbose
+\def\@p@@sclip#1{\@cliptrue}
+\def\@p@@sproportional#1{\@proportionaltrue}
+\def\@p@@sfile#1{%
+ %\typeout{file is #1}
+ \def\@filestem{#1}%
+ \def\@p@dffile{#1.pdf}%
+ \def\@labfile{#1.lab}%
+}
+\let\@p@@sfigure\@p@@sfile
+% \@pDimenToSpNumber
+% ==================
+% Convert a dimension into scaled points.
+% #1: the name of macro which will expand to the dimension in
+% scaled points, without the unit 'sp' though, i.e. as a pure
+% integer.
+% #2: the dimension (not a dimension register, use
+% \the if dimension is stored in a dimension register).
+\def\@pDimenToSpNumber #1#2{%
+ \psfig@dimen = #2\relax
+ \edef#1{\number\psfig@dimen}%
+}
+\def\@p@@sbbllx#1{%
+ %\typeout{bbllx is #1}
+ \@bbllxtrue
+ \@pDimenToSpNumber{\@p@sbbllx}{#1}%
+}
+\def\@p@@sbblly#1{%
+ %\typeout{bblly is #1}
+ \@bbllytrue
+ \@pDimenToSpNumber{\@p@sbblly}{#1}%
+}
+\def\@p@@sbburx#1{%
+ %\typeout{bburx is #1}
+ \@bburxtrue
+ \@pDimenToSpNumber{\@p@sbburx}{#1}%
+}
+\def\@p@@sbbury#1{%
+ %\typeout{bbury is #1}
+ \@bburytrue
+ \@pDimenToSpNumber{\@p@sbbury}{#1}%
+}
+\def\@p@@sheight#1{%
+ \@heighttrue
+ \@pDimenToSpNumber{\@p@sheight}{#1}%
+ %\typeout{Height is \@p@sheight}
+}
+\def\@p@@swidth#1{%
+ %\typeout{Width is #1}
+ \@widthtrue
+ \@pDimenToSpNumber{\@p@swidth}{#1}%
+}
+\def\@p@@srheight#1{%
+ %\typeout{Reserved height is #1}
+ \@rheighttrue
+ \@pDimenToSpNumber{\@p@srheight}{#1}%
+}
+\def\@p@@srwidth#1{%
+ %\typeout{Reserved width is #1}
+ \@rwidthtrue
+ \@pDimenToSpNumber{\@p@srwidth}{#1}%
+}
+\def\@p@@ssilent#1{%
+ \@verbosefalse
+}
+\def\@p@@sscale #1{%
+ \def\@p@scale{#1}%
+ \@scaletrue
+}
+
+\def\@p@@sprolog#1{\@prologfiletrue\def\@prologfileval{#1}}
+\def\@p@@spostlog#1{\@postlogfiletrue\def\@postlogfileval{#1}}
+\def\@cs@name#1{\csname #1\endcsname}
+\def\@setparms#1=#2,{\def\@tempa{#2}\ifx\@tempa\@empty
+ \@warning{bad syntax (missing = or extra comma) in argument of \string\psfig}%
+ \else\@@setparms#1=#2,\fi}
+\def\@@setparms#1=#2=,{\@cs@name{@p@@s#1}{#2}}
+%
+% Initialize the defaults.
+%
+\def\ps@init@parms{%
+ \@bbllxfalse \@bbllyfalse
+ \@bburxfalse \@bburyfalse
+ \@heightfalse \@widthfalse
+ \@rheightfalse \@rwidthfalse
+ \@scalefalse
+ \def\@p@sbbllx{}\def\@p@sbblly{}%
+ \def\@p@sbburx{}\def\@p@sbbury{}%
+ \def\@p@sheight{}\def\@p@swidth{}%
+ \def\@p@srheight{}\def\@p@srwidth{}%
+ \def\@p@sfile{}%
+ \def\@labfile{}%
+ \def\@p@scost{10}%
+ \def\@sc{}%
+ \@prologfiletrue
+ \@postlogfilefalse
+ \@clipfalse
+ \@proportionalfalse
+ \if@noisy
+ \@verbosetrue
+ \else
+ \@verbosefalse
+ \fi
+}
+
+%%%% space bug fixes
+\expandafter\let\csname @p@@s scale \endcsname\@p@@sscale
+\expandafter\let\csname @p@@sscale \endcsname\@p@@sscale
+\expandafter\let\csname @p@@s scale\endcsname\@p@@sscale
+
+\expandafter\let\csname @p@@s file \endcsname\@p@@sfile
+\expandafter\let\csname @p@@sfile \endcsname\@p@@sfile
+\expandafter\let\csname @p@@s file\endcsname\@p@@sfile
+
+\expandafter\let\csname @p@@s width \endcsname\@p@@swidth
+\expandafter\let\csname @p@@swidth \endcsname\@p@@swidth
+\expandafter\let\csname @p@@s width\endcsname\@p@@swidth
+
+\expandafter\let\csname @p@@s rwidth \endcsname\@p@@srwidth
+\expandafter\let\csname @p@@srwidth \endcsname\@p@@srwidth
+\expandafter\let\csname @p@@s rwidth\endcsname\@p@@srwidth
+
+\expandafter\let\csname @p@@s height \endcsname\@p@@sheight
+\expandafter\let\csname @p@@sheight \endcsname\@p@@sheight
+\expandafter\let\csname @p@@s height\endcsname\@p@@sheight
+
+\expandafter\let\csname @p@@s rheight \endcsname\@p@@srheight
+\expandafter\let\csname @p@@srheight \endcsname\@p@@srheight
+\expandafter\let\csname @p@@s rheight\endcsname\@p@@srheight
+
+\expandafter\let\csname @p@@s bbllx \endcsname\@p@@sbbllx
+\expandafter\let\csname @p@@sbbllx \endcsname\@p@@sbbllx
+\expandafter\let\csname @p@@s bbllx\endcsname\@p@@sbbllx
+
+\expandafter\let\csname @p@@s bblly \endcsname\@p@@sbblly
+\expandafter\let\csname @p@@sbblly \endcsname\@p@@sbblly
+\expandafter\let\csname @p@@s bblly\endcsname\@p@@sbblly
+
+\expandafter\let\csname @p@@s bburx \endcsname\@p@@sbburx
+\expandafter\let\csname @p@@sbburx \endcsname\@p@@sbburx
+\expandafter\let\csname @p@@s bburx\endcsname\@p@@sbburx
+
+\expandafter\let\csname @p@@s clip \endcsname\@p@@sclip
+\expandafter\let\csname @p@@sclip \endcsname\@p@@sclip
+\expandafter\let\csname @p@@s clip\endcsname\@p@@sclip
+
+\expandafter\let\csname @p@@s proportional \endcsname\@p@@sproportional
+\expandafter\let\csname @p@@sproportional \endcsname\@p@@sproportional
+\expandafter\let\csname @p@@s proportional\endcsname\@p@@sproportional
+
+%
+% Go through the options setting things up.
+%
+\def\parse@ps@parms#1{%
+ \@psdo\@psfiga:=#1\do
+ {\expandafter\@setparms\@psfiga=,}%
+}
+
+\newif\ifno@file
+\newif\ifno@psfile
+\newif\ifno@bb
+\newif\ifnot@eof
+\newif\if@bbmatch
+\newread\ps@stream
+\newread\lab@stream
+\newcount\@linecount
+\newcount\maxheaderlines
+\maxheaderlines=100
+
+%
+% Scan header of file, looking for ``BoundingBox'' line
+%
+\def\scan@header{%
+ \openin\lab@stream=\@labfile
+ \openin\ps@stream=\@filestem.ps
+ \ifeof\ps@stream
+ \relax\closein\ps@stream
+ \openin\ps@stream=\@filestem.eps
+ \ifeof\ps@stream
+ \relax\closein\ps@stream\no@psfiletrue
+ \openin\ps@stream=\@filestem.pdf
+ \ifeof\ps@stream
+ \relax %needed here so the \@warning won't cause trouble
+ \@warning{cannot open \@filestem.ps or .eps or .pdf}
+ \closein\ps@stream
+ \no@filetrue
+ \else
+ \edef\@p@sfile{\@filestem.pdf}
+ \relax\closein\ps@stream
+ \ifno@bb
+%
+% Next five lines of code supplied by Mark Petelier
+%
+% Read BB from pdf file:
+%
+ \pdfximage cropbox {\@filestem.pdf}
+ \@p@@sbbllx{\pdfximagebbox\pdflastximage 1}
+ \@p@@sbblly{\pdfximagebbox\pdflastximage 2}
+ \@p@@sbburx{\pdfximagebbox\pdflastximage 3}
+ \@p@@sbbury{\pdfximagebbox\pdflastximage 4}
+ \no@bbfalse
+ \if@bbllx \else \no@bbtrue \fi
+ \if@bblly \else \no@bbtrue \fi
+ \if@bburx \else \no@bbtrue \fi
+ \if@bbury \else \no@bbtrue \fi
+ \fi\fi
+ \else
+ \relax
+ \edef\@p@sfile{\@filestem.eps}
+ \fi
+ \else
+ \relax
+ \edef\@p@sfile{\@filestem.ps}
+ \fi
+ \ifno@psfile\else
+ \not@eoftrue
+ \ifno@bb \@bbmatchfalse \else \@bbmatchtrue \fi
+ \catcode`\%=12
+ \catcode`\:=12 % in case punctuation is active (e.g., under french.sty)
+ \@linecount=\maxheaderlines
+ \loop
+ \read\ps@stream to \line@in
+ \global\psfigtoks@=\expandafter{\line@in}
+ \ifeof\ps@stream \not@eoffalse \fi
+ %\typeout{ looking at :: \the\psfigtoks@ }
+ \if@bbmatch \else \@bbtest{\psfigtoks@} \fi
+ \if@bbmatch \not@eoffalse \fi
+ \advance\@linecount-1
+ \ifnum\@linecount=0 \not@eoffalse \fi
+ \ifnot@eof \repeat
+ \fi
+ \catcode`\%=14
+}
+
+% '% ' becomes a regular character for a very short time.
+{
+ \catcode`\%=12
+ \catcode`\:=12
+ \gdef\@bbtest#1{\expandafter\@bb@\the#1%%BoundingBox:\@bbtest\@bb@}
+ \global\long\def\@bb@#1%%BoundingBox:#2#3\@bb@{\ifx\@bbtest#2
+ \else\@bbmatchtrue\expandafter\bb@cull\the\psfigtoks@\fi}
+}
+
+\def\bb@cull#1:{\expandafter\bb@@cull\@iden}
+\long\def\bb@@cull#1 #2 #3 #4 {%
+ \@pDimenToSpNumber{\@p@sbbllx}{#1bp}%
+ \@pDimenToSpNumber{\@p@sbblly}{#2bp}%
+ \@pDimenToSpNumber{\@p@sbburx}{#3bp}%
+ \@pDimenToSpNumber{\@p@sbbury}{#4bp}%
+ \no@bbfalse
+}
+
+% Compute \@bbw and \@bbh, the width and height of the
+% bounding box.
+\def\compute@bb{%
+ \no@bbfalse
+ \if@bbllx \else \no@bbtrue \fi
+ \if@bblly \else \no@bbtrue \fi
+ \if@bburx \else \no@bbtrue \fi
+ \if@bbury \else \no@bbtrue \fi
+ \scan@header
+ \ifno@file
+ \else
+ \ifno@bb
+ \@warning{no bounding box found in \@p@sfile}
+ \no@filetrue
+ \else
+ % Now compute the size of the bounding box.
+ \psfc@c=\@p@sbburx
+ \psfc@b=\@p@sbbury
+ \advance\psfc@c by -\@p@sbbllx
+ \advance\psfc@b by -\@p@sbblly
+ \edef\@bbw{\number\psfc@c}
+ \edef\@bbh{\number\psfc@b}
+ %\typeout{\string\compute@bb: bbh = \@bbh, bbw = \@bbw}
+ \fi
+ \fi
+}
+
+%
+% \in@hundreds performs #1 * (#2 / #3) correct to the hundreds,
+% then leaves the result in \@result.
+%
+% note: #3 should be a big number, or a multiple of 10.
+%
+\def\in@hundreds #1#2#3{%
+ \psfc@g=#2
+ \psfc@d=#3
+ \divide\psfc@d 10
+ \psfc@a=\psfc@g % First two digits #2/#3.
+ \divide\psfc@a by \psfc@d
+ \psfc@f=\psfc@a
+ \multiply\psfc@f by \psfc@d
+ \advance\psfc@g by -\psfc@f
+ \multiply\psfc@g by 10
+ \psfc@f=\psfc@g % Third digit of #2/#3.
+ \divide\psfc@f by \psfc@d
+ \psfc@j=\psfc@f
+ \multiply\psfc@j by \psfc@d
+ \advance\psfc@g by -\psfc@j
+ \multiply\psfc@g by 10
+ \psfc@j=\psfc@g % Third digit.
+ \divide\psfc@j by \psfc@d
+ \psfc@h=#1\psfc@i=0
+ \psfc@e=\psfc@h
+ \multiply\psfc@e by \psfc@a
+ \advance\psfc@i by \psfc@e
+ \psfc@e=\psfc@h
+ \divide\psfc@e by 10
+ \multiply\psfc@e by \psfc@f
+ \advance\psfc@i by \psfc@e
+ %
+ \psfc@e=\psfc@h
+ \divide\psfc@e by 100
+ \multiply\psfc@e by \psfc@j
+ \advance\psfc@i by \psfc@e
+ \divide\psfc@i 10
+ %
+ \edef\@result{\number\psfc@i}
+}
+% Scale a value #1 by the current scaling factor and reassign the new
+% scaled value.
+\def\@ScaleInHundreds #1{%
+ \in@hundreds{#1}{\@p@scale}{100}%
+ \edef#1{\@result}%
+}
+%
+%
+% Compute width from height.
+\def\compute@wfromh{%
+ % computing : width = height * (bbw / bbh)
+ \in@hundreds{\@p@sheight}{\@bbw}{\@bbh}%
+ %\typeout{ \@p@sheight * \@bbw / \@bbh, = \@result }
+ \edef\@p@swidth{\@result}%
+ %\typeout{w from h: width is \@p@swidth}%
+}
+%
+% Compute height from width.
+%
+\def\compute@hfromw{%
+ % computing : height = width * (bbh / bbw)
+ \in@hundreds{\@p@swidth}{\@bbh}{\@bbw}%
+ %\typeout{ \@p@swidth * \@bbh / \@bbw = \@result }
+ \edef\@p@sheight{\@result}%
+ %\typeout{h from w : height is \@p@sheight}%
+}
+%
+% Compute height and width when both are given and proportionality
+% must be preserved.
+%
+\def\compute@minhw{%
+ \in@hundreds{\@p@swidth}{\@bbh}{\@bbw}%
+ \ifnum\@p@sheight<\@result
+ \in@hundreds{\@p@sheight}{\@bbw}{\@bbh}%
+ \edef\@p@swidth{\@result}%
+ \else
+ \edef\@p@sheight{\@result}%
+ \fi
+}
+%
+% Compute height and width, i.e. \@p@sheight and \@p@swidth.
+%
+\def\compute@handw{%
+ % If height is given.
+ \if@height
+ % If width is given
+ \if@width
+ \if@proportional
+ \compute@minhw
+ \fi
+ \else
+ % Height, no width: compute width.
+ \compute@wfromh
+ \fi
+ \else
+ % No height.
+ \if@width
+ % Width is given, no height though: compute it.
+ \compute@hfromw
+ \else
+ % Neither width no height is give.
+ \edef\@p@sheight{\@bbh}
+ \edef\@p@swidth{\@bbw}
+ \fi
+ \fi
+}
+% Compute the amount of space to reserve. Unless defined
+% using rheight and rwidth when \psfig is called, these values
+% default to \@p@sheight and \@p@swidth.
+\def\compute@resv{%
+ \if@rheight \else \edef\@p@srheight{\@p@sheight} \fi
+ \if@rwidth \else \edef\@p@srwidth{\@p@swidth} \fi
+}
+%
+%
+% \psfig
+% ======
+% usage: \psfig{file=, height=, width=, bbllx=, bblly=, bburx=, bbury=,
+% rheight=, rwidth=, clip=, scale=, proportional=}
+%
+% "clip=" and "proportional=" are switches and take no value,
+% but the `=' must be present.
+%
+\def\partest{\par}
+\def\psfig#1{%
+ \vbox {%
+ \offinterlineskip
+ \ps@init@parms
+ \parse@ps@parms{#1}%
+ % Compute any missing sizes.
+ \compute@bb
+ \ifno@file\vbox{\hbox{\footnotesize{\tt\@filestem.\{ps,eps,pdf\}}
+ not found (or no BBox)}}%
+ \else
+ \compute@handw
+ \compute@resv
+ \if@scale
+ \ifx\inc@graph@flag\relax\else %% \graphicx syntax used so
+ \psfig@dimen=100sp %% multiply scale by 100
+ \psfig@dimen=\@p@scale\psfig@dimen
+ \def\@p@scale{\number\psfig@dimen}
+ \let\inc@graph@flag\relax %% reset
+ \fi
+ %\if@verbose \typeout{psfig: scaling by \@p@scale}\fi
+ %\if@verbose \typeout{psfig: scaling by \@p@scale}\fi
+ % We now scale the width and height as reported to the PS printer.
+ \@ScaleInHundreds{\@p@swidth}%
+ \@ScaleInHundreds{\@p@sheight}%
+ \@ScaleInHundreds{\@p@srwidth}%
+ \@ScaleInHundreds{\@p@srheight}%
+ \fi
+ %
+ \ifnum\@p@scost<\@psdraft
+ %\if@verbose \typeout{psfig: including \@p@sfile \space}\fi
+ \if@topspecials\do@specials\fi
+ % Create a vbox to reserve the proper amount of space for the figure.
+ \vbox to \@p@srheight sp{%
+ \hbox to \@p@srwidth sp{}%
+ \vss
+ }%
+ \if@topspecials\else\do@specials\fi
+ \ifx\thelabellist\relax %%% no labellist so look for .lab file
+ \ifeof\lab@stream
+ \else{%
+ \hyperactivelabels
+ \not@eoftrue
+ \loop
+ \read\lab@stream to \line@in \ifx\line@in\partest\else\line@in\fi
+ \ifeof\lab@stream \not@eoffalse \fi
+ \ifnot@eof \repeat
+ }\fi
+ \else
+ \hyperactivelabels\thelabellist %%% use labellist and
+ \global\let\thelabellist\relax %%% reset for next figure
+ \ifeof\lab@stream
+ \else{
+ \@message{}
+ \@message{I have found both a labellist AND a .lab file for \@p@sfile.}
+ \@message{I am using the labellist.}
+ \@message{If this is not what you want, then edit out the labellist.}
+ \@message{}
+ }\fi
+ \fi
+ \else
+ % Draft mode: reserve the space for the figure and print the path name.
+ \vbox to \@p@srheight sp{%
+ \hbox to \@p@srwidth sp{%
+ \if@verbose
+ \@p@sfile
+ \fi
+ }%
+ \vss
+ }%
+ \fi
+ \fi
+ }%
+}
+
+\def\do@specials{\ps@init\ps@begin
+ \if@clip
+ %\if@verbose \typeout{(clip)} \fi
+ \ps@clip \fi
+ \if@prologfile \ps@prolog \fi \ps@include \if@postlogfile \ps@postlog \fi
+ \ps@end}
+
+\newbox\label@box
+\newdimen\x@lab \newdimen\y@lab
+\newdimen\x@aux \newdimen\y@aux
+\newdimen\hair\hair=3pt
+
+%%%%% version without math mode, with \mathsurround set to 0pt
+%%%%% and final manual adjustment <#6,#7>
+\def\@setlabel@#1#2#3#4#5#6#7{%
+ \setbox\label@box\hbox{\mathsurround 0pt\ignorespaces#1}%
+ \x@lab.5\wd\label@box \x@lab#4\x@lab
+ \y@lab.5\ht\label@box\advance\y@lab.5\dp\label@box \y@lab#5\y@lab
+% rotate lab clockwise by 22.5 degrees to get aux
+ \x@aux.92388\x@lab \advance\x@aux.38268\y@lab
+ \y@aux-.38268\x@lab \advance\y@aux.92388\y@lab
+% choose
+ \ifdim\x@aux>0pt
+ \ifdim\y@aux>0pt
+ \ifdim\x@aux>\y@aux\advance\x@lab.7071\hair\advance\y@lab.7071\hair
+ \else\advance\y@lab\hair\fi
+ \else
+ \ifdim\x@aux>-\y@aux\advance\x@lab\hair
+ \else\advance\x@lab.7071\hair\advance\y@lab-.7071\hair\fi
+ \fi
+ \else
+ \ifdim\y@aux>0pt
+ \ifdim\x@aux>-\y@aux\advance\x@lab-.7071\hair\advance\y@lab.7071\hair
+ \else\advance\x@lab-\hair\fi
+ \else
+ \ifdim\x@aux>\y@aux\advance\y@lab-\hair
+ \else
+ \ifdim\x@aux<0pt
+ \advance\x@lab-.7071\hair\advance\y@lab-.7071\hair\fi
+ \fi
+ \fi
+ \fi
+ \advance\x@lab.5\wd\label@box
+ \advance\y@lab.5\ht\label@box\advance\y@lab.5\dp\label@box
+ \x@aux=#2bp \ifoldlabels \else \advance\x@aux by -\@p@sbbllx sp \fi
+ \y@aux=#3bp \ifoldlabels \else \advance\y@aux by -\@p@sbblly sp \fi
+ \in@hundreds{\x@aux}{\@p@swidth}{\@bbw}
+ \edef\@xpos{\@result}
+ \in@hundreds{\y@aux}{\@p@sheight}{\@bbh}
+ \edef\@ypos{\@result}
+ \vbox to 0pt{%
+ \vss\hbox to\@p@srwidth sp{\hskip \@xpos sp \hskip-\x@lab \hskip #6
+ \box\label@box\hss}\vskip \@ypos sp \vskip-\y@lab \vskip #7}}
+
+
+%%%% old syntax: \setlabel and variant \setlabel* (\hair set 0pt)
+%%%% both start in math mode for back-compatibility:
+\def\setlabel{\@ifnextchar*{\setlabel@nohair}{\setlabel@hair}}
+
+%%%% manual adjustment added?
+\def\setlabel@nohair*%
+{\@ifnextchar<{\setlabel@nohair@adj}{\setlabel@nohair@noadj}}
+\def\setlabel@hair%
+{\@ifnextchar<{\setlabel@hair@adj}{\setlabel@hair@noadj}}
+
+\def\setlabel@nohair@noadj#1#2#3#4#5%
+{{\hair 0pt\@setlabel@{$#1$}{#2}{#3}{#4}{#5}{0pt}{0pt}}}
+\def\setlabel@nohair@adj<#1,#2>#3#4#5#6#7%
+{{\hair 0pt\@setlabel@{$#3$}{#4}{#5}{#6}{#7}{#1}{#2}}}
+
+\def\setlabel@hair@noadj#1#2#3#4#5%
+{\@setlabel@{$#1$}{#2}{#3}{#4}{#5}{0pt}{0pt}}
+\def\setlabel@hair@adj<#1,#2>#3#4#5#6#7%
+{\@setlabel@{$#3$}{#4}{#5}{#6}{#7}{#1}{#2}}
+
+
+%%% \pinlabel macro starts here
+
+%%% set up two flags for killing autospacing and using baseline
+%%% and initialise:
+%%% \relax is default ie \hair used but baseline not used
+%%% any other value means \hair not used but baseline used
+\let\hair@flag\relax\let\baseline@flag\relax
+
+%%% define four control sequences to carry the auxiliary information
+%%% and set to default values
+\def\@labxpos@{0}\def\@labypos@{0}%
+\def\@xadj@{0pt}\def\@yadj@{0pt}
+
+%%%% endgame
+\def\finally@pinlabel #1 {\@ifnextchar a%
+{\finally@pinlabel@ {#1} }{\@message{}%
+\@message{There is something wrong with your syntax for label #1;}
+\@message{you must finish with " at XXX YYY " : the "at" and spaces are important!}
+\@message{I'm going to try to ignore this label: don't blame me if there are some}
+\@message{funny numbers in your diagram and later labels are out-of-position.}
+\@message{}}}
+
+\def\finally@pinlabel@ #1 at #2 #3 {%
+\ifx\hair@flag\relax%
+\@setlabel@{\ifx\baseline@flag\relax\the@label\else\smash{\the@label}\fi}%
+{#2}{#3}{\@labxpos@}{\@labypos@}{\@xadj@}{\@yadj@}%
+\else
+{\hair 0pt \@setlabel@{\ifx\baseline@flag\relax\the@label\else\smash{\the@label}\fi}%
+{#2}{#3}{\@labxpos@}{\@labypos@}{\@xadj@}{\@yadj@}}
+\fi
+%%%% don't forget to reset the flags etc to default values
+\let\hair@flag\relax\let\baseline@flag\relax%
+\def\@labxpos@{0}\def\@labypos@{0}%
+\def\@xadj@{0pt}\def\@yadj@{0pt}}
+
+%%%% start to parse the argument
+%%%% is this a starred form or not?
+\def\pinlabel{\@ifnextchar*%
+{\pin@nohair}{\@pinlabel@}}
+\def\pin@nohair* #1 {\def\hair@flag{0}\@pinlabel@ {#1} }
+
+%%%% store the label for safety then
+%%%% is there any label position information?
+\def\@pinlabel@ #1 {\def\the@label{#1}\@ifnextchar a%
+{\finally@pinlabel {#1} }{\@pinlabel@@ {#1} }}
+
+%%%% are we using "by" or [ or going directly to <..,..>
+\def\@pinlabel@@ #1 {\@ifnextchar [%
+{\pin@by@letters {#1} }{\@@pinlabel@@ {#1} }}
+
+\def\@@pinlabel@@ #1 {\@ifnextchar b
+{\pin@by@numbers {#1} }{\@@pinlabel@@@ {#1} }}
+
+\def\@@pinlabel@@@ #1 {\@ifnextchar <%
+{\pin@with@adj {#1} }{\@message{}%
+\@message{I don't understand your positioning information for label #1 and shall}
+\@message{ignore it; or perhaps your label has a space and needs braces.}
+\finally@pinlabel {#1} }}
+
+%%%% pin@with@adj recycles from the top (to allow <Xpt,Ypt> to come first)
+\def\pin@with@adj #1 <#2,#3> {%
+\def\@xadj@{#2}\def\@yadj@{#3}
+\@pinlabel@ {#1} }
+
+%%%% we are using letters, is there adjustment?
+\def\pin@by@letters #1 [#2] {\@ifnextchar <%
+{\pin@by@letters@with@adj {#1} [#2] }{\pin@by@letters@no@adj {#1} [#2] }}
+
+%%%% we are using numbers, is there adjustment?
+\def\pin@by@numbers #1 by #2 #3 {\@ifnextchar <%
+{\pin@by@numbers@with@adj {#1} by #2 #3 }{\pin@by@numbers@no@adj {#1} by #2 #3 }}
+
+\def\pin@by@numbers@with@adj #1 by #2 #3 <#4,#5> at #6 #7{%
+\def\@labxpos@{#2}\def\@labypos@{#3}%
+\def\@xadj@{#4}\def\@yadj@{#5}
+\finally@pinlabel {#1} at #6 #7}
+
+\def\pin@by@numbers@no@adj #1 by #2 #3 at #4 #5{%
+\def\@labxpos@{#2}\def\@labypos@{#3}%
+\def\@xadj@{0pt}\def\@yadj@{0pt}
+\finally@pinlabel {#1} at #4 #5}
+
+%%% read the letter pin positions to a control sequence
+\def\pin@by@letters@no@adj #1 [#2] {%
+\expandafter\ifx\csname position@#2\endcsname\relax
+\@message{}
+\@message{Unknown position code [#2]; I shall ignore it.}
+\@message{}\else
+\csname position@#2\endcsname\fi
+\finally@pinlabel {#1} }
+
+\def\pin@by@letters@with@adj #1 [#2] <#3,#4> {%
+\expandafter\ifx\csname position@#2\endcsname\relax
+\@message{}
+\@message{Unknown position code [#2]; I shall ignore it.}
+\@message{}\else
+\csname position@#2\endcsname\fi
+\def\@xadj@{#3}\def\@yadj@{#4}
+\finally@pinlabel {#1} }
+
+
+%%%% final task: parse the letter pin positions
+\def\position@t{\def\@labxpos@{0}\def\@labypos@{1}}
+\def\position@b{\def\@labxpos@{0}\def\@labypos@{-1}}
+\def\position@l{\square@left\def\@labxpos@{-1}\def\@labypos@{0}}
+\def\position@r{\square@right\def\@labxpos@{1}\def\@labypos@{0}}
+\def\position@B{\def\baseline@flag{1}\def\@labxpos@{0}\def\@labypos@{0}}
+\def\position@rt{\square@right\def\@labxpos@{1}\def\@labypos@{1}}
+\def\position@tr{\square@right\def\@labxpos@{1}\def\@labypos@{1}}
+\def\position@br{\square@right\def\@labxpos@{1}\def\@labypos@{-1}}
+\def\position@rb{\square@right\def\@labxpos@{1}\def\@labypos@{-1}}
+\def\position@lt{\square@left\def\@labxpos@{-1}\def\@labypos@{1}}
+\def\position@tl{\square@left\def\@labxpos@{-1}\def\@labypos@{1}}
+\def\position@bl{\square@left\def\@labxpos@{-1}\def\@labypos@{-1}}
+\def\position@lb{\square@left\def\@labxpos@{-1}\def\@labypos@{-1}}
+\def\position@lB{\square@left\def\baseline@flag{1}%
+\def\@labxpos@{-1}\def\@labypos@{0}}
+\def\position@Bl{\square@left\def\baseline@flag{1}%
+\def\@labxpos@{-1}\def\@labypos@{0}}
+\def\position@rB{\square@right\def\baseline@flag{1}%
+\def\@labxpos@{1}\def\@labypos@{0}}
+\def\position@Br{\square@right\def\baseline@flag{1}%
+\def\@labxpos@{1}\def\@labypos@{0}}
+
+%%%% \square@left and \square@right are hacks to force diagonal
+%%%% autospacing for the corner letter pin positions
+
+\def\square@left{%
+\setbox\label@box\hbox{\mathsurround 0pt\ignorespaces\the@label}%
+\y@lab\ht\label@box\advance\y@lab\dp\label@box\let\old@label\the@label
+\def\the@label{\hbox to \y@lab{\old@label\hss}}}
+
+\def\square@right{%
+\setbox\label@box\hbox{\mathsurround 0pt\ignorespaces\the@label}%
+\y@lab\ht\label@box\advance\y@lab\dp\label@box\let\old@label\the@label
+\def\the@label{\hbox to \y@lab{\hss \old@label}}}
+
+%%%% end of \pinlabel macro
+
+\catcode`@=\atcatcode
+
+\endinput
+
+%%%%% History: Version 1.1 released 25 March 2006
+%%%%% 28/Mar/06: bugfixes and code to detect mathematica/illustrator deleted
+%%%%% 5/Apr/06: bugfix and extra utility: <Xpt,Ypt> can come first
+%%%%% 20/Apr/06: \includegraphics uses graphicx if no labellist (Naom)
+%%%%% 1/May/06: bugfix to \includegraphics code
+%%%%% 23/Oct/06: LPPL license added (for CTAN)
+%%%%% 4/Nov/11: Version 1.2: Mark Petelier's code added to read BB from pdf file
+
diff --git a/macros/latex/contrib/pinlabel/src/fig3.pdf b/macros/latex/contrib/pinlabel/src/fig3.pdf
new file mode 100644
index 0000000000..906e03c790
--- /dev/null
+++ b/macros/latex/contrib/pinlabel/src/fig3.pdf
Binary files differ
diff --git a/macros/latex/contrib/pinlabel/src/fig6.pdf b/macros/latex/contrib/pinlabel/src/fig6.pdf
new file mode 100644
index 0000000000..9e67ebb434
--- /dev/null
+++ b/macros/latex/contrib/pinlabel/src/fig6.pdf
Binary files differ
diff --git a/macros/latex/contrib/pinlabel/src/gtpart.cls b/macros/latex/contrib/pinlabel/src/gtpart.cls
new file mode 100644
index 0000000000..609dbbfc76
--- /dev/null
+++ b/macros/latex/contrib/pinlabel/src/gtpart.cls
@@ -0,0 +1,818 @@
+%%%%%%%%%%%%%%%%% gtpart.cls %%%%%%%%%%%%%%%%%%
+%
+% Format file for articles written in LaTeX for publication in
+% Geometry & Topology Publications. This version inputs hyperref
+% and uses Times fonts where possible. It is for use from 2006
+% onwards. It is common to GT, AGT and GTM, uses MSP metadata
+% format and duplicates as far as practicable MSP style.
+%
+% Colin Rourke, December 2006
+%
+% For full instructions see gtpartdoc.pdf (available from the same
+% directory as this file).
+%
+% (gtart.cls v1.6 -- hyperref + times + MSP metadata)
+%
+%% Check for fairly recent version of latex2e :
+%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+%
+\LoadClass[11pt]{article}
+\usepackage{amsthm,amssymb}
+\usepackage[leqno]{amsmath}
+\newif\ifmicrotype
+\DeclareOption{microtype}{\microtypetrue}
+\ProcessOptions\relax
+\AtBeginDocument{%
+ \def\tempaa{\thesection.\arabic{equation}}%
+ \ifx\theequation\tempaa
+ \def\theequation{\thesection\hbox{--}\arabic{equation}}%
+ \fi
+ \ifmicrotype
+ \RequirePackage{microtype}%
+ \DeclareMicrotypeAlias{mnt}{ptm}%
+ \fi
+ \DeclareMathSizes{10} {10} {7}{6}% from msp.cls
+ \DeclareMathSizes{10.95}{10.95}{8}{6}% from msp.cls
+}
+%
+% Times fonts and Times math symbols
+%
+\renewcommand{\sfdefault}{cmr}
+\DeclareFontFamily{OT1}{ptm}{}
+\DeclareFontShape{OT1}{ptm}{m}{n} { <-> ptmr}{}
+\DeclareFontShape{OT1}{ptm}{m}{it}{ <-> ptmri}{}
+\DeclareFontShape{OT1}{ptm}{m}{sl}{ <->ptmro}{}
+\DeclareFontShape{OT1}{ptm}{m}{sc}{ <-> ptmrc}{}
+\DeclareFontShape{OT1}{ptm}{b}{n} { <-> ptmb}{}
+\DeclareFontShape{OT1}{ptm}{b}{it}{ <-> ptmbi}{}
+\DeclareFontShape{OT1}{ptm}{bx}{n} {<->ssub * ptm/b/n}{}
+\DeclareFontShape{OT1}{ptm}{bx}{it}{<->ssub * ptm/b/it}{}
+\def\rmdefault{ptm}
+\DeclareSymbolFont{bold}{OT1}{ptm}{b}{n}
+\DeclareMathAlphabet{\mathbf}{OT1}{ptm}{b}{n}
+\DeclareMathAlphabet{\mathrm}{OT1}{ptm}{m}{n}
+\let\bBB=\mathbb
+\let\Bbb=\mathbb
+%
+\DeclareFontFamily{OT1}{psy}{}
+\DeclareFontShape{OT1}{psy}{m}{n}{ <-> s * [0.9] psyr}{}
+%
+\DeclareFontFamily{OMS}{ptm}{}
+\DeclareFontShape{OMS}{ptm}{m}{n}{ <8> <9> <10> gen * cmsy }{}
+\DeclareFontFamily{OMS}{cmtt}{}
+\DeclareFontShape{OMS}{cmtt}{m}{n}{ <8> <9> <10> gen * cmsy }{}
+
+\SetSymbolFont{operators}{normal}{OT1}{ptm}{m}{n}
+\SetSymbolFont{operators}{bold}{OT1}{ptm}{b}{n}
+%
+\DeclareSymbolFont{emsy}{OT1}{ptm}{m}{it}
+\DeclareSymbolFont{emsr}{OT1}{ptm}{m}{n}
+\DeclareSymbolFont{emcmr}{OT1}{cmr}{m}{n}
+\DeclareSymbolFont{emsymb}{OT1}{psy}{m}{n}
+%
+\DeclareMathSymbol a{\mathalpha}{emsy}{"61}
+\DeclareMathSymbol b{\mathalpha}{emsy}{"62}
+\DeclareMathSymbol c{\mathalpha}{emsy}{"63}
+\DeclareMathSymbol d{\mathalpha}{emsy}{"64}
+\DeclareMathSymbol e{\mathalpha}{emsy}{"65}
+\DeclareMathSymbol f{\mathalpha}{emsy}{"66}
+\DeclareMathSymbol g{\mathalpha}{emsy}{"67}
+\DeclareMathSymbol h{\mathalpha}{emsy}{"68}
+\DeclareMathSymbol i{\mathalpha}{emsy}{"69}
+\DeclareMathSymbol j{\mathalpha}{emsy}{"6A}
+\DeclareMathSymbol k{\mathalpha}{emsy}{"6B}
+\DeclareMathSymbol l{\mathalpha}{emsy}{"6C}
+\DeclareMathSymbol m{\mathalpha}{emsy}{"6D}
+\DeclareMathSymbol n{\mathalpha}{emsy}{"6E}
+\DeclareMathSymbol o{\mathalpha}{emsy}{"6F}
+\DeclareMathSymbol p{\mathalpha}{emsy}{"70}
+\DeclareMathSymbol q{\mathalpha}{emsy}{"71}
+\DeclareMathSymbol r{\mathalpha}{emsy}{"72}
+\DeclareMathSymbol s{\mathalpha}{emsy}{"73}
+\DeclareMathSymbol t{\mathalpha}{emsy}{"74}
+\DeclareMathSymbol u{\mathalpha}{emsy}{"75}
+\DeclareMathSymbol v{\mathalpha}{emsy}{"76}
+\DeclareMathSymbol w{\mathalpha}{emsy}{"77}
+\DeclareMathSymbol x{\mathalpha}{emsy}{"78}
+\DeclareMathSymbol y{\mathalpha}{emsy}{"79}
+\DeclareMathSymbol z{\mathalpha}{emsy}{"7A}
+\DeclareMathSymbol A{\mathalpha}{emsy}{"41}
+\DeclareMathSymbol B{\mathalpha}{emsy}{"42}
+\DeclareMathSymbol C{\mathalpha}{emsy}{"43}
+\DeclareMathSymbol D{\mathalpha}{emsy}{"44}
+\DeclareMathSymbol E{\mathalpha}{emsy}{"45}
+\DeclareMathSymbol F{\mathalpha}{emsy}{"46}
+\DeclareMathSymbol G{\mathalpha}{emsy}{"47}
+\DeclareMathSymbol H{\mathalpha}{emsy}{"48}
+\DeclareMathSymbol I{\mathalpha}{emsy}{"49}
+\DeclareMathSymbol J{\mathalpha}{emsy}{"4A}
+\DeclareMathSymbol K{\mathalpha}{emsy}{"4B}
+\DeclareMathSymbol L{\mathalpha}{emsy}{"4C}
+\DeclareMathSymbol M{\mathalpha}{emsy}{"4D}
+\DeclareMathSymbol N{\mathalpha}{emsy}{"4E}
+\DeclareMathSymbol O{\mathalpha}{emsy}{"4F}
+\DeclareMathSymbol P{\mathalpha}{emsy}{"50}
+\DeclareMathSymbol Q{\mathalpha}{emsy}{"51}
+\DeclareMathSymbol R{\mathalpha}{emsy}{"52}
+\DeclareMathSymbol S{\mathalpha}{emsy}{"53}
+\DeclareMathSymbol T{\mathalpha}{emsy}{"54}
+\DeclareMathSymbol U{\mathalpha}{emsy}{"55}
+\DeclareMathSymbol V{\mathalpha}{emsy}{"56}
+\DeclareMathSymbol W{\mathalpha}{emsy}{"57}
+\DeclareMathSymbol X{\mathalpha}{emsy}{"58}
+\DeclareMathSymbol Y{\mathalpha}{emsy}{"59}
+\DeclareMathSymbol Z{\mathalpha}{emsy}{"5A}
+\DeclareMathSymbol{\bullet}{\mathalpha}{emsymb}{"B7}
+\DeclareMathSymbol{\regis}{\mathalpha}{emsymb}{"D2}
+\def\Bullet{\leavevmode\unkern{$\m@th\bullet$}\kern.32em\ignorespaces}
+\def\Regis{\leavevmode\raise.5ex\hbox{$\m@th\regis$}}
+\DeclareMathSymbol +{\mathbin}{emcmr}{`+}
+\DeclareMathSymbol ={\mathrel}{emcmr}{`=}
+\DeclareMathSymbol{\Gamma}{\mathalpha}{emcmr}{"00}
+\DeclareMathSymbol{\Delta}{\mathalpha}{emcmr}{"01}
+\DeclareMathSymbol{\Theta}{\mathalpha}{emcmr}{"02}
+\DeclareMathSymbol{\Lambda}{\mathalpha}{emcmr}{"03}
+\DeclareMathSymbol{\Xi}{\mathalpha}{emcmr}{"04}
+\DeclareMathSymbol{\Pi}{\mathalpha}{emcmr}{"05}
+\DeclareMathSymbol{\Sigma}{\mathalpha}{emcmr}{"06}
+\DeclareMathSymbol{\Upsilon}{\mathalpha}{emcmr}{"07}
+\DeclareMathSymbol{\Phi}{\mathalpha}{emcmr}{"08}
+\DeclareMathSymbol{\Psi}{\mathalpha}{emcmr}{"09}
+\DeclareMathSymbol{\Omega}{\mathalpha}{emcmr}{"0A}
+\DeclareMathSizes{7.6}{8}{6}{5}
+%
+% some accents and useful symbols (from L'Ensiegnment class file)
+%
+\def\`#1{{\accent"12 #1}} % grave accent
+\def\H#1{{\accent"CD #1}} % double acute accent
+\chardef\J="11
+\def\j{{\sf\J}} % j without dot
+\chardef\AA="C8 % Angstrom
+\chardef\gbp="A3 % pound sign
+\chardef\TIL="81 % tilde on line
+\chardef\endash="B1
+\chardef\emdash="D0
+\chardef\pourmille="BD % %sign
+\chardef\aoben="E3 % ^a
+\chardef\ooben="EB % ^o
+\def\S{\leavevmode\unkern{\char"A7}\kern.1em\ignorespaces}
+\def\D#1{{\accent"C7 #1}} % overdot
+\DeclareMathAccent{\dot}{\mathalpha}{operators}{"C7} % ditto math mode
+%
+% double diamond brackets, usage: \og TEXTE \fg or {\og}TEXTE{\fg}
+%
+\def\og{{\char"AB}\kern.15em}
+\def\fg{\relax\ifhmode\unskip\kern.15em\fi{\char"BB}}
+%
+% Polish cedilla:
+%
+\def\cedpol#1{\setbox0=\hbox{#1}\ifdim\ht0=1ex \accent"CE #1%
+ \else{\ooalign{\hidewidth\char"CE\hidewidth\crcr\unhbox0}}\fi}
+%
+% endgame (MUST COME BEFORE hyperref)
+%
+\AtEndDocument{{\small\parskip 0pt\vskip11pt minus 5pt\relax
+{\sl \def\\{\futurelet\next\nocommawithnl}\def\nocommawithnl
+ {\ifx\next\newline\else\unskip,\space\ignorespaces\fi}
+ \theaddress\par}
+{\rightskip0pt plus .4\hsize
+{\def\tempab{}\tt\def~{\lower3.5pt\hbox{\char'176}}\def\_{\char'137}%
+\ifx\theemail\tempab\else
+ \vskip5pt minus 3pt\theemail\par\fi
+ \ifx\theurl\tempab\else
+ \vskip5pt minus 3pt\theurl\par\fi}
+ \vskip11pt minus 5pt
+ \def\tempab{}\ifx\receiveddate\tempab\else Received:\qua\receiveddate\fi
+ \ifx\reviseddate\tempab\else\qquad Revised:\qua \reviseddate\fi\par}}}
+%
+% hyperref stuff
+%
+\usepackage{hyperref}
+\hypersetup{%
+ bookmarksnumbered=true,%
+ bookmarks=true,%
+ colorlinks=true,%
+ linkcolor=blue,%
+ citecolor=blue,%
+ filecolor=blue,%
+ menucolor=blue,%
+ pagecolor=blue,%
+ urlcolor=blue,%
+ pdfnewwindow=true,%
+ pdfstartview=FitBH}
+%
+% \arxiv and \MR are for use in the biblio eg:
+% \arxiv{math.GT/0102334} \MR{2002j:32027}
+%
+\def\arxiv#1{\relax\ifhmode\unskip\qua\fi
+ \href{http://arxiv.org/abs/#1}%
+{\tt arXiv:\penalty -100\unskip#1}}
+\let\arXiv\arxiv
+\def\MR#1{\relax\ifhmode\unskip\qua\fi
+ \href{http://www.ams.org/mathscinet-getitem?mr=#1}{MR#1}}
+%
+\def\xox#1{\csname xx#1\endcsname} %%% used by
+\let\xxarXiv\arxiv\let\xxMR\MR %%% gtart.bst
+\def\xxZBL#1{}
+\def\xxJFM#1{}
+\def\@url#1{{\tt\def~{\lower3.5pt\hbox{\char'176}}\def\_{\char'137}#1}}
+\let\fullref\autoref
+%
+% \autoref is very crude. It uses counters to distinguish environments
+% so that if say {lemma} uses the {theorem} counter, then autrorefs
+% which should come out Lemma X.Y in fact come out Theorem X.Y. To
+% correct this give each its own counter eg:
+% \newtheorem{theorem}{Theorem}[section]
+% \newtheorem{lemma}{Lemma}[section]
+% and then equate the counters by commands like:
+% \makeatletter
+% \let\c@lemma\c@theorem
+% \makeatother
+%
+% To work correctly the environment name must have a corrresponding
+% \XXXautorefname defined. The following command does the job:
+%
+\def\makeautorefname#1#2{\expandafter\def\csname#1autorefname\endcsname{#2}}
+%
+% Some standard autorefnames. If the environment name for an autoref
+% you need is not listed below, add a similar line to your TeX file:
+%
+\makeautorefname{equation}{Equation}%
+\makeautorefname{footnote}{footnote}%
+\makeautorefname{item}{item}%
+\makeautorefname{figure}{Figure}%
+\makeautorefname{table}{Table}%
+\makeautorefname{part}{Part}%
+\makeautorefname{appendix}{Appendix}%
+\makeautorefname{chapter}{Chapter}%
+\makeautorefname{section}{Section}%
+\makeautorefname{subsection}{Section}%
+\makeautorefname{subsubsection}{Section}%
+\makeautorefname{paragraph}{Paragraph}%
+\makeautorefname{subparagraph}{Paragraph}%
+\makeautorefname{theorem}{Theorem}%
+\makeautorefname{theo}{Theorem}%
+\makeautorefname{thm}{Theorem}%
+\makeautorefname{addendum}{Addendum}%
+\makeautorefname{addend}{Addendum}%
+\makeautorefname{add}{Addendum}%
+\makeautorefname{maintheorem}{Main theorem}%
+\makeautorefname{mainthm}{Main theorem}%
+\makeautorefname{corollary}{Corollary}%
+\makeautorefname{corol}{Corollary}%
+\makeautorefname{coro}{Corollary}%
+\makeautorefname{cor}{Corollary}%
+\makeautorefname{lemma}{Lemma}%
+\makeautorefname{lemm}{Lemma}%
+\makeautorefname{lem}{Lemma}%
+\makeautorefname{sublemma}{Sublemma}%
+\makeautorefname{sublem}{Sublemma}%
+\makeautorefname{subl}{Sublemma}%
+\makeautorefname{proposition}{Proposition}%
+\makeautorefname{proposit}{Proposition}%
+\makeautorefname{propos}{Proposition}%
+\makeautorefname{propo}{Proposition}%
+\makeautorefname{prop}{Proposition}%
+\makeautorefname{property}{Property}
+\makeautorefname{proper}{Property}
+\makeautorefname{scholium}{Scholium}%
+\makeautorefname{step}{Step}%
+\makeautorefname{conjecture}{Conjecture}%
+\makeautorefname{conject}{Conjecture}%
+\makeautorefname{conj}{Conjecture}%
+\makeautorefname{question}{Question}
+\makeautorefname{questn}{Question}
+\makeautorefname{quest}{Question}
+\makeautorefname{ques}{Question}
+\makeautorefname{qn}{Question}
+\makeautorefname{definition}{Definition}%
+\makeautorefname{defin}{Definition}%
+\makeautorefname{defi}{Definition}%
+\makeautorefname{def}{Definition}%
+\makeautorefname{dfn}{Definition}%
+\makeautorefname{notation}{Notation}
+\makeautorefname{nota}{Notation}
+\makeautorefname{notn}{Notation}
+\makeautorefname{remark}{Remark}%
+\makeautorefname{rema}{Remark}%
+\makeautorefname{rem}{Remark}%
+\makeautorefname{rmk}{Remark}%
+\makeautorefname{rk}{Remark}%
+\makeautorefname{remarks}{Remarks}%
+\makeautorefname{rems}{Remarks}%
+\makeautorefname{rmks}{Remarks}%
+\makeautorefname{rks}{Remarks}%
+\makeautorefname{example}{Example}%
+\makeautorefname{examp}{Example}%
+\makeautorefname{exmp}{Example}%
+\makeautorefname{exam}{Example}%
+\makeautorefname{exa}{Example}%
+\makeautorefname{algorithm}{Algorith}%
+\makeautorefname{algo}{Algorith}%
+\makeautorefname{alg}{Algorith}%
+\makeautorefname{axiom}{Axiom}%
+\makeautorefname{axi}{Axiom}%
+\makeautorefname{ax}{Axiom}%
+\makeautorefname{case}{Case}%
+\makeautorefname{claim}{Claim}%
+\makeautorefname{clm}{Claim}%
+\makeautorefname{assumption}{Assumption}%
+\makeautorefname{assumpt}{Assumption}%
+\makeautorefname{conclusion}{Conclusion}%
+\makeautorefname{concl}{Conclusion}%
+\makeautorefname{conc}{Conclusion}%
+\makeautorefname{condition}{Condition}%
+\makeautorefname{condit}{Condition}%
+\makeautorefname{cond}{Condition}%
+\makeautorefname{construction}{Construction}%
+\makeautorefname{construct}{Construction}%
+\makeautorefname{const}{Construction}%
+\makeautorefname{cons}{Construction}%
+\makeautorefname{criterion}{Criterion}%
+\makeautorefname{criter}{Criterion}%
+\makeautorefname{crit}{Criterion}%
+\makeautorefname{exercise}{Exercise}%
+\makeautorefname{exer}{Exercise}%
+\makeautorefname{exe}{Exercise}%
+\makeautorefname{problem}{Problem}%
+\makeautorefname{problm}{Problem}%
+\makeautorefname{probm}{Problem}%
+\makeautorefname{prob}{Problem}%
+\makeautorefname{solution}{Solution}%
+\makeautorefname{soln}{Solution}%
+\makeautorefname{sol}{Solution}%
+\makeautorefname{summary}{Summary}%
+\makeautorefname{summ}{Summary}%
+\makeautorefname{sum}{Summary}%
+\makeautorefname{operation}{Operation}%
+\makeautorefname{oper}{Operation}%
+\makeautorefname{observation}{Observation}%
+\makeautorefname{observn}{Observation}%
+\makeautorefname{obser}{Observation}%
+\makeautorefname{obs}{Observation}%
+\makeautorefname{ob}{Observation}%
+\makeautorefname{convention}{Convention}%
+\makeautorefname{convent}{Convention}%
+\makeautorefname{conv}{Convention}%
+\makeautorefname{cvn}{Convention}%
+\makeautorefname{warning}{Warning}%
+\makeautorefname{warn}{Warning}%
+\makeautorefname{note}{Note}%
+\makeautorefname{fact}{Fact}%
+%
+% *** End of hyperref stuff ***
+%
+% Basic layout :
+%
+% get print centerpage:
+%
+\headsep 23pt
+\footskip 35pt
+\hoffset -4truemm
+\voffset 12.5truemm
+%
+\newskip\stdskip % standard vertical space
+\stdskip=6.6pt plus3.3pt minus3.3pt
+%
+\setlength{\textheight}{7.5in}
+\setlength{\textwidth}{5.2in}
+\flushbottom
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{\stdskip}
+\setlength{\medskipamount}{\stdskip}
+\setlength{\mathsurround}{0.8pt}
+\setlength{\labelsep}{0.75em}
+\newcommand{\stdspace}{\hskip 0.75em plus 0.15em \ignorespaces}
+\let\qua\stdspace % useful abbreviation
+\renewcommand{\baselinestretch}{1.05} % open up a tad to match msp
+%
+% Some style commands (\ppar is for principal paragraph breaks, \sh is
+% for subheadings and \rk for remarks etc -- see also theorem style
+% below ) :
+%
+\newcommand{\ppar}{\par\goodbreak\medskip}
+\newcommand{\sh}[1]{\penalty-800\ppar{\bf #1}\par\medskip\nobreak}
+\newcommand{\rk}[1]{\ppar{\bf #1}\stdspace}
+%
+%
+% Theorem style. There are two recommended styles :
+%
+% plain : for theorems, corollaries etc with heading bold
+% and left justified, optional note bracketed in roman type
+% and statement in slanted type.
+%
+% definition : (alias remark) for definitions, remarks etc with
+% heading bold and left justified, optional note unbracketed in
+% slanted type and statement in roman type.
+%
+%
+% Redefine the amsthm styles plain, definition and remark to GTP style:
+%
+\newtheoremstyle{plain}{13.2pt plus6.6pt minus6.6pt}{6.6pt plus3.3pt minus3.3pt}%
+{\sl}{}{\bf}{}{0.75em}{\thmname{#1}\thmnumber{ #2}\thmnote{\rm\stdspace(#3)}}
+%
+\newtheoremstyle{definition}{13.2pt plus6.6pt minus6.6pt}{6.6pt plus3.3pt minus3.3pt}%
+{\rm}{}{\bf}{}{0.75em}{\thmname{#1}\thmnumber{ #2}\thmnote{\rm\stdspace(#3)}}
+%
+\newtheoremstyle{remark}{13.2pt plus6.6pt minus6.6pt}{6.6pt plus3.3pt minus3.3pt}%
+{\rm}{}{\bf}{}{0.75em}{\thmname{#1}\thmnumber{ #2}\thmnote{\rm\stdspace(#3)}}
+%
+% Default theorem style :
+\theoremstyle{plain}
+%
+% adapt the amsthm proof environment to GTP style
+%
+\renewenvironment{proof}[1][\proofname]{\par
+ \pushQED{\qed}%
+ \normalfont \topsep\stdskip
+ \trivlist
+ \item[\hskip\labelsep
+ \bf#1]\ignorespaces
+}{%
+ \popQED\endtrivlist\@endpefalse
+}
+% Knuth's \square macro :
+%
+\def\sqr#1#2{{\vcenter{\vbox{\hrule height.#2pt
+ \hbox{\vrule width.#2pt height#1pt \kern#1pt \vrule width.#2pt}
+ \hrule height.#2pt}}}}
+%
+\def\sq{\sqr55} % A small square for end-of-proofs.
+\def\qedsymbol{$\sqr55$} % (Define other size squares by varing the
+% % the two numbers.)
+%
+% some useful abbreviations :
+%
+\newcommand{\co}{\mskip0.5mu\colon\thinspace} % Colon for maps.
+\newcommand{\np}{\newpage} % Forced page break (new page).
+\newcommand{\nl}{\hfil\break} % New line.
+\newcommand{\cl}{\centerline} % Centerline
+%
+% metadata items:
+%
+% title
+%
+\def\title{\@ifnextchar[\doubletitle\singletitle}
+ \def\doubletitle[#1]#2{\def\thetitle{#2}\def\theshorttitle{#1}}
+ \def\singletitle#1{\def\thetitle{#1}\def\theshorttitle{#1}}
+%
+% author(s)
+%
+\def\author{\@ifnextchar[\doubleauthor\singleauthor}
+\def\doubleauthor[#1]#2{\edef\previousauthors{\theauthors}
+ \ifx\theauthors\relax\def\theauthors{#2}\else
+ \def\theauthors{\previousauthors\par#2}\fi
+ \edef\previousrootauthors{\rootauthors}
+ \ifx\rootauthors\relax
+ \ifx\lastauthor\relax\def\lastauthor{#1}\def\theshortauthors{#1}
+ \else\edef\rootauthors{\lastauthor}\def\lastauthor{#1}
+ \def\theshortauthors{\rootauthors\ and #1}\fi
+ \else\edef\rootauthors{\previousrootauthors, \lastauthor}
+ \def\lastauthor{#1}\def\theshortauthors{\rootauthors\ and #1}\fi}
+\def\singleauthor#1{\doubleauthor[#1]{#1}}
+%
+% address
+%
+\def\address#1{{\let\\\relax\let\newline\par\xdef\previousaddresses{\theaddress}}
+ \ifx\theaddress\relax\def\theaddress{#1}\else
+ \def\theaddress{\previousaddresses\par\vskip 3pt minus 2pt\par#1}\fi}
+%
+% email
+%
+\def\email#1{{\let\_\relax\let~\relax\let\href\relax
+ \xdef\previousemails{\theemail}}%
+ \def\tempab{}\def\tempba{#1}\ifx\tempab\tempba\else
+ \ifx\theemail\tempab{}\def\theemail{\href{mailto:#1}{#1}}\else
+ \gdef\theemail{\previousemails, \href{mailto:#1}{#1}}\fi\fi}
+%
+% url %%% needs linking
+%
+\def\urladdr#1{{\let\_\relax\let~\relax\let\href\relax\xdef\previousurls{\theurl}}
+ \def\tempab{}\def\tempba{#1}\ifx\tempab\tempba\else
+ \ifx\theurl\tempab\def\theurl{\href{#1}{#1}}\else
+ \def\theurl{\previousurls, \href{#1}{#1}}\fi\fi}
+%
+% main abstract
+%
+\long\def\abstract#1\end%
+{\long\gdef\theabstract{#1}\end}
+\let\endabstract\relax
+%
+% other abstracts (used just for publication)
+%
+\newenvironment{asciiabstract}{\eatabstract}{}%
+\newenvironment{webabstract}{\eatabstract}{}%
+\newenvironment{htmlabstract}{\eatabstract}{}%
+\newenvironment{mathmlabstract}{\eatabstract}{}%
+\long\def\eatabstract#1\end{\end}
+%
+% subject class (from msp.cls--simplified)
+%
+\def\subject#1#2#3{%
+ \def\@tempa{#1}\def\@tempb{primary}%
+ \ifx\@tempa\@tempb %%%% primary class
+ \ifx\@primclass\relax
+ \def\@primclass{#3}%
+ \else
+ \edef\old@primclass{\@primclass}\def\@primclass{\old@primclass, #3}%
+ \fi
+ \else\ifx\@secclass\relax% everything not marked primary is taken
+ \def\@secclass{#3}% to be secondary
+ \else
+ \edef\old@secclass{\@secclass}\def\@secclass{\old@secclass, #3}%
+ \fi
+ \fi
+}
+\def\@message#1{\immediate\write16{#1}}
+\def\subjclass#1{\@message{ }
+ \@message{\string\subjclass\space is not supported; use
+ \string\subject}\@message{You can use an
+ arbitrary number of commands of the form}
+ \@message{\string\subject{primary}{MSC2000}{99X88},}
+ \@message{\string\subject{secondary}{MSC2000}{77X66}... etc.}
+ \@message{ }}
+%
+% keywords (only used for publication)
+%
+\def\keyword#1{\relax}
+\def\keywords#1{\@message{ }\@message{\string\keywords\space not supported; use
+ \string\keyword}\@message{You can use an
+ arbitrary number of commands of the form}
+ \@message{\string\keyword{keyword},}
+ \@message{\string\keyword{key phrase}... etc.}\@message{ }}
+%
+% dedicatory and thanks
+%
+\def\dedicatory#1{\def\thededicatory{#1}\@message{ }
+\@message{Dedications are only permitted in exceptional cases.}
+\@message{Please consult the managing editors before adding a dedication.}
+\@message{Thanks etc should be given as acknowledgements at the end}
+\@message{of your introduction or at the end of the paper.}
+\@message{ }\relax}
+%
+\def\thanks#1{\@message{ }
+\@message{Thanks should not appear on the title page.}
+\@message{Please give thanks as acknowledgements at the end of your
+introduction}\@message{or at the end of the paper.}
+\@message{ }\relax}
+%
+%
+% set metadata items to \relax to initialise macros :
+%
+\let\thetitle\relax\let\theauthors\relax
+\let\theaddress\relax\let\theemail\relax\let\theurl\relax
+\let\theabstract\relax\let\theshorttitle\relax
+\let\theshortauthors\relax\let\rootauthors\relax
+\let\lastauthor\relax\let\@primclass\relax
+\let\@secclass\relax\let\thededicatory\relax
+\def\theemail{}\def\theurl{}
+%
+% metadata items used just for publication
+%
+\def\givenname#1{\relax}
+\def\surname#1{\relax}
+\def\doi#1{\relax}
+\def\MR#1{\relax}
+\def\Zbl#1{\relax}
+\def\issuenumber#1{\relax}
+\def\publishedonline#1{\relax}
+\def\proposed#1{\relax}
+\def\seconded#1{\relax}
+\def\corresponding#1{\relax}
+\def\editor#1{\relax}
+\def\version#1{\relax}
+\def\arxivreference#1{\relax}
+\def\arxivpassword#1{\relax}
+%
+% metadata items used in running heads etc
+%
+\def\volumenumber#1{\relax}
+\def\volumename#1{\relax}
+\def\publicationyear#1{\relax}
+\def\papernumber#1{\relax}
+\def\startpage#1{\relax}
+\def\endpage#1{\relax}
+\def\received#1{\def\receiveddate{#1}}
+\def\revised#1{\def\reviseddate{#1}}
+\let\reviseddate\relax
+\def\accepted#1{\def\accepteddate{#1}}
+\def\published#1{\relax}
+%
+% defaults for mockup
+%
+\newif\ifmockup
+\AtBeginDocument{\ifmockup
+\def\thevolumenumber{XX}
+\def\thepublicationyear{20XX}
+\def\publisheddate{XX Xxxember 20XX}
+\def\thestartpage{1001}
+\def\theendpage{999}\else
+\def\thestartpage{1}\fi}
+\received{}
+\revised{}
+\def\thedoi{10.2140/\stitle.\thepublicationyear.\thevolumenumber.\thestartpage}
+%
+% start of definition of \maketitle
+%
+\long\def\maketitle{
+\count0=\thestartpage\
+\vglue 10pt plus 3pt minus 3pt %% top space
+%
+% title :
+%
+{\parskip=0pt\leftskip 0pt plus 1fil{\def\\{\par\smallskip}\Large
+\bf\thetitle}\par\vskip 3pt}
+
+\medskip
+%
+% authors :
+%
+{\parskip=0pt\leftskip 0pt plus 1fil{\sc\theauthors}
+\par}
+
+\vglue 20pt plus 3pt minus 3pt
+%
+% abstract :
+%
+{\small\leftskip 25pt\rightskip 25pt\parskip 4pt plus 2pt
+\theabstract
+%
+% msc classes :
+%
+\vglue 7pt plus 2pt
+\href{http://www.ams.org/mathscinet/search/mscdoc.html?code=\ifx\@primclass\relax\@secclass\else\@primclass\ifx\@secclass\relax\else,(\@secclass)\fi\fi}{{\ifx\@primclass\relax\@secclass\else\@primclass\ifx\@secclass\relax\else; \@secclass\fi\fi}}
+%
+% dedicatory
+%
+ \ifx\thededicatory\relax\else
+ \vglue 7ptplus 2pt\it\thededicatory\fi\par\medskip}}
+%
+% end of definition of \maketitle
+%
+% journal titles in GTP style
+%
+\def\gt{{\mathsurround=0pt\it $\cal G\mskip-2mu$eometry \&\
+$\cal T\!\!$opology}} % The journal title in recommended style
+\def\gtm{{\mathsurround=0pt\it $\cal G\mskip-2mu$eometry \&\
+$\cal T\!\!$opology $\cal M\mskip-1mu$onographs}} % for monographs
+\def\agt{{\mathsurround=0pt\it$\cal A\mskip-.7mu$lgebraic \&\
+$\cal G\mskip-2mu$eometric $\cal T\!\!$opology}} % AGT
+\def\jtitle{\gt} %default
+\def\stitle{gt} %default
+\def\gtart{\mockuptrue}
+\def\agtart{\def\jtitle{\agt} %%% sets AGT as the journal title
+\def\stitle{agt}\mockuptrue}
+\def\gtmonart{\def\jtitle{\gtm} %%% sets GTM as the journal title
+\def\stitle{gtm}\mockuptrue}
+%
+% headline and footline
+%
+\def\@oddhead{{\small\it\ifnum\count0=\thestartpage
+\ifmockup\jtitle\ \thevolumenumber\ (\thepublicationyear)
+\thestartpage--\theendpage
+\hfill {\bf\number\count0}\fi\else\ifodd\count0
+\def\\{\unskip\space}\ifx\theshorttitle\relax \thetitle \else\theshorttitle\fi\hfill
+{\bf\number\count0}\else{\bf\number\count0}
+\hfill\ifx\theshortauthors\relax
+\theauthors\else\theshortauthors\fi\fi\fi}}
+\let\@evenhead\@oddhead
+\def\@oddfoot{{\ifmockup\small\it\ifnum\count0=\thestartpage
+{\it Published: \publisheddate}\hfil
+ \rm\href{http://dx.doi.org/\thedoi}{DOI: \thedoi}
+\else \jtitle\ \thevolumenumber\ (\thepublicationyear)\hfill\fi\fi}}
+\let\@evenfoot\@oddfoot
+%
+% hacks to get various items of style correct :
+%
+% set footnotes in 10pt type:
+%
+\let\@footnote@\footnote
+\def\footnote#1{\@footnote@{\small #1}}
+\let\fnote\footnote % useful abbreviation for \footnote
+%
+% set captions in 10pt type (hack of excerpt from hyperref.sty) :
+%
+\long\def\@caption#1[#2]#3{%
+ \hyper@makecurrent{\@captype}%
+ \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
+ \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
+ }%
+ \begingroup
+ \@parboxrestore
+ \if@minipage
+ \@setminipage
+ \fi
+ \small
+ \@makecaption{\csname fnum@#1\endcsname}{%
+ \ignorespaces
+ \ifHy@nesting
+ \hyper@@anchor{\@currentHref}{#3}%
+ \else
+ \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3%
+ \fi
+ }%
+ \par
+ \endgroup
+}
+%
+% command to suppress the colon in captions (hack from article.cls) :
+%
+\def\nocolon{%
+\long\def\@makecaption##1##2{%
+ \vskip\abovecaptionskip
+ \sbox\@tempboxa{##1##2}%
+ \ifdim \wd\@tempboxa >\hsize
+ ##1##2\par
+ \else
+ \global \@minipagefalse
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
+ \fi
+ \vskip\belowcaptionskip}}
+%
+% automate colon suppression
+%
+\let\oldcaption\caption
+\def\caption{\@ifnextchar[\doublecaption\singlecaption}
+\def\doublecaption[#1]#2{\oldcaption[#1]{#2}}
+\def\singlecaption#1{\def\tempab{}\def\tempba{#1}\ifx\tempab\tempba
+\nocolon\oldcaption{#1}\else\oldcaption{#1}\fi}
+%
+% set displayskips to correct values :
+%
+\AtBeginDocument{\setlength{\abovedisplayskip}{\stdskip}
+\setlength{\belowdisplayskip}{\stdskip}}
+%
+% get the biblio style correct (10pt with small gaps):
+%
+\let\@thebibliography@\thebibliography
+\def\thebibliography#1 {\@thebibliography@{999}\small\parskip0pt
+plus2pt\relax\addcontentsline{toc}{section}{Bibliography}}
+%
+%
+% Get item spacing reasonable :
+%
+\let\@itemize@\itemize
+\def\itemize{\@itemize@\parskip 0pt\relax}
+\def\@listi{\leftmargin28.5pt\parsep 0pt\topsep 0pt
+ \itemsep4pt plus3pt minus2pt}
+\let\@listI\@listi
+\@listi
+%
+% get enumeration labels to use \rm
+%
+\renewcommand{\labelenumi}{{\rm (\theenumi)}}
+\renewcommand{\labelenumii}{{\rm (\theenumii)}}
+\renewcommand{\labelenumiii}{{\rm (\theenumiii)}}
+
+% and spacing to match \itemize
+%
+\let\@enumerate@\enumerate
+\def\enumerate{\@enumerate@\parskip 0pt\relax}
+%
+% misc definitions for comptibility with amsthm, msp.cls etc
+%
+\def\bysame{\leavevmode\hbox to3em{\hrulefill}\thinspace}
+\def\figdir{figs}
+\def\makeop#1{\expandafter\def\csname #1\endcsname{\mathop{\mathrm{#1}}\nolimits}}
+\let\wtilde\widetilde
+\let\wwtilde\widetilde
+\let\what\widehat
+\let\wwhat\widehat
+\let\wbar\bar
+\let\wwbar\overline
+\let\proved\qedhere
+\def\Q{\mathbb{Q}}
+\def\R{\mathbb{R}}
+\def\C{\mathbb{C}}
+%\def\N{\mathbb{N}}
+\def\Z{\mathbb{Z}}
+\let\disablesubscriptcorrection\relax
+\newenvironment{nopartheorem}{}{}
+\def\half{\tfrac12}
+%
+\def\eqalign#1{%
+ \null\,\vcenter{\openup\jot\m@th
+ \ialign{\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil
+ \crcr#1\crcr}}\,}
+\def\eqalignbot#1{%
+ \null\,\vbox{\openup\jot\m@th
+ \ialign{\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil
+ \crcr#1\crcr}}\,}
+\def\eqaligntop#1{%
+ \null\,\vtop{\openup\jot\m@th
+ \ialign{\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil
+ \crcr#1\crcr}}\,}
+\def\eqalignn#1{%
+ \null\,\vcenter{\openup\jot\m@th
+ \ialign{\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil
+ &\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil\crcr#1\crcr}}\,}
+\endinput
+%
+% History of gtart.cls:
+% Version 1.1: 14 December 97
+% Version 1.2: (update for AGT) 18 October 00
+% Version 1.3: \gtart, \makegtmontitle and \gtmonart added 5.01.01
+% Version 1.4: hyperef version (new file name: gtart_h.cls 15.02.04)
+% Version 1.5: hyperef+times+MSP m-data (new file name: gtpart.cls 20.12.06)
+% Version 1.6: bug-fix for hyperref 6.75 (26.11.07)
diff --git a/macros/latex/contrib/pinlabel/src/pinlabdoc.tex b/macros/latex/contrib/pinlabel/src/pinlabdoc.tex
new file mode 100644
index 0000000000..4a09784cc5
--- /dev/null
+++ b/macros/latex/contrib/pinlabel/src/pinlabdoc.tex
@@ -0,0 +1,1258 @@
+
+\documentclass[microtype]{gtpart}
+\usepackage{pinlabel}
+
+
+%%% running feet for documentation files
+\makeatletter
+\def\@oddfoot{\ifnum\count0=1
+\small\copyright\ Copyright 2006--11 Mathematical Sciences
+ Publishers\hfill\else
+\small\it Mathematical Sciences Publishers: documentation\hfill\fi}
+\let\@evenfoot\@oddfoot
+\makeatother
+
+%%%% verbatim macro
+
+\def\dq{"} % define a code for " so it can be used when \verb is on
+\def\ttq{{\tt\dq}} % code for " in cmtt
+%
+\def\verb{\catcode`\"=\active} % The main
+\def\brev{\catcode`\"=12} % switches.
+%
+\brev % Prime switches and
+\verb % switch on.
+%
+{\obeyspaces\gdef {\ }}
+{\catcode`\`=\active\gdef`{\relax\lq}}
+\def"{%
+\begingroup\baselineskip=12pt\def\par{\leavevmode\endgraf}%
+\tt\obeylines\obeyspaces\parskip=0pt\parindent=0pt%
+\catcode`\$=12\catcode`\&=12\catcode`\^=12\catcode`\#=12%
+\catcode`\_=12\catcode`\~=12%
+\catcode`\{=12\catcode`\}=12\catcode`\%=12\catcode`\\=12%
+\catcode`\`=\active\let"\endgroup}
+%
+\brev % Finally switch the macro off (for safety)
+
+
+\def\cross{\vrule height 0.2pt depth 0.2pt width 12pt\kern -6.2pt
+\vrule height 6pt width 0.4pt depth 6pt}
+
+%%%% metadata
+
+\title[{\tt pinlabel}\qua A \TeX\ labelling package]{\texttt{pinlabel}\qua A \TeX\ labelling package}
+
+\author{Colin Rourke}
+\givenname{Colin}
+\surname{Rourke}
+\address{Mathematical Sciences Publishers\\
+Department of Mathematics\\\newline
+University of California\\
+CA 94720-3840\\USA}
+\email{contact@mathscipub.org}
+\urladdr{http://www.mathscipub.org}
+
+\volumenumber{1}
+\issuenumber{}
+\publicationyear{2006}
+\papernumber{}
+\startpage{1}
+\endpage{15}
+
+\doi{}
+\MR{}
+\Zbl{}
+
+\keyword{manual}
+\keyword{labelling}
+\keyword{diagram}
+\keyword{figure}
+\subject{primary}{msc2000}{68-01}
+\subject{secondary}{msc2000}{68N01}
+
+\received{}
+\revised{}
+\accepted{}
+\published{2006}
+\publishedonline{2006}
+\proposed{}
+\seconded{}
+\corresponding{}
+\editor{}
+\version{}
+
+\arxivreference{}
+\arxivpassword{}
+
+\begin{document}
+
+\begin{asciiabstract}
+pinlabel is a labelling package designed for attaching perfectly
+formatted TeX labels to figures and diagrams in both eps and pdf
+formats. It is a tool for use by both authors and editors and can be
+used both for labelling a new diagram and for relabelling an existing
+diagram. It is the recommended package for (re)labelling diagrams or
+figures in papers intended for publication by Mathematical Sciences
+Publishers. The main features of the package are that it uses
+coordinates read from the diagram in ghostview (or gv) and that labels
+are placed with automatic and consistent spacing from the object that
+they are labelling. Many adjustment and positioning options are
+provided. The end result is a package which is easy and quick to use
+and which provides accurate and eye-pleasing labelling, completely
+consistent with the text.
+\end{asciiabstract}
+
+\begin{abstract}
+{\tt pinlabel} is a labelling package designed for attaching perfectly
+formatted \TeX\ labels to figures and diagrams in both eps and pdf
+formats. It is a tool for use by both authors and editors and can be
+used both for labelling a new diagram and for relabelling an existing
+diagram. It is the recommended package for (re)labelling diagrams or
+figures in papers intended for publication by Mathematical Sciences
+Publishers. The main features of the package are that it uses
+coordinates read from the diagram in {\tt GhostView} (or {\tt gv}) and
+that labels are placed with automatic and consistent spacing from the
+object that they are labelling. Many adjustment and positioning
+options are provided. The end result is a package which is easy and
+quick to use and which provides accurate and eye-pleasing labelling,
+completely consistent with the text.
+
+For a comparison of {\tt pinlabel} with other labelling packages which
+allow one to attach \TeX\ labels, see \fullref{sec:why}.
+
+\end{abstract}
+
+\maketitle
+\verb %%% switch on verbatim
+
+
+\section{Essential ingredients}\label{sec:ess}
+
+
+\subsection{Input files}
+
+To use "pinlabel" you need just one file "pinlabel.sty".
+
+If you are using "latex", then you need only add the line
+"\usepackage{pinlabel}" near the top of your file; if using plain
+"tex" then add the line "\input pinlabel.sty" instead.
+
+Occasionally there will be a paragraph labelled {\small{\bf
+Smallprint}}, which can safely be omitted on first reading, but which
+you may need to read if problems arise. There is a whole section of
+smallprint near the end.
+
+
+{\small{\bf Smallprint}\qua The package calls a standard latex package
+"graphicx.sty" which all recent "tex" installations will have
+available, so you should not have to worry about this. If you are
+using plain "tex" then it also calls "miniltx.tex"---a basic latex
+interpreter for plain "tex"---which should also be available, but if
+not, can be collected from the CTAN server.}
+
+\subsection{Graphics files}\label{subsec:graph}
+
+Your figures must exist either as ".eps" or as ".pdf" files. If you
+ are using only "pdflatex" then you can create and label using ".pdf"
+ figures throughout if you wish.
+
+{\small{\bf Smallprint}\qua This is a major change introduced in
+ version 1.2. In version 1.1 it was necessary to create ".eps" copies
+ of all figure files. However this {\em does not mean\/} that you can
+ now safely discard the ".eps" versions for figures already labelled.
+ There is a problem with bounding boxes and your labels are likely to
+ move to unexpected places. Read smallprint note \ref{subsec:bb}.}
+
+If you are creating your figures from scratch, for example by using
+ "xfig" (highly recommended) then export as ``EPS (Encapsulated
+ Postscript)'' if you are using plain "tex" or if you may need to
+ compile using "latex", and as ``PDF (Portable Document Format)'' if
+ you are using only "pdflatex". If you want to be able to compile
+ using both "latex" and "pdflatex" then export as EPS and create a PDF
+ version by running "epstopdf". The syntax is:
+
+\medskip
+"epstopdf fig.eps"
+
+{\bf Note}\qua Do not use the similar sounding program "eps2pdf" which
+may change the bounding box.
+
+Do not draw your labels in your drawing package.
+
+
+\subsection{GhostView}
+
+You will also need a working copy of "GhostView" or "gv" or "GSview"
+ for reading coordinate positions. Most "unix" or "linux"
+ installations include this program, as does "cywin" running under
+ Windows, and you can collect a stand-alone copy for Windows or
+ Macintosh by visiting:
+
+\href{http://www.cs.wisc.edu/~ghost/gsview/}{\tt http://www.cs.wisc.edu/\char'176ghost/gsview/}\quad or\newline
+\href{http://www.cs.wisc.edu/~ghost/macos/}{\tt http://www.cs.wisc.edu/\char'176ghost/macos/}
+
+\section{Basic use}\label{sec:bas}
+
+\subsection{Labelling a new figure}
+
+Load your figure (the ".eps" version if you have made one, or the
+ ".pdf" version if not) into "GhostView" or equivalent. You will
+ notice that the cursor position is recorded (in PS points) either at
+ the bottom or the side. This position is what you will read as your
+ labelling coordinates.
+
+Assuming that you are using "latex" or "pdflatex" (the changes for
+ plain "tex" are indicated later) then include your figure using
+ instructions as in the following typical example:
+
+\medskip
+"\begin{figure}[ht!]
+\labellist
+\small\hair 2pt
+\pinlabel $B^3_+$ at 57 246
+\pinlabel $B^3_-$ [l] at 187 207
+\pinlabel {$(S^3 \times I,A)$} [tr] at 76 26
+\pinlabel $O$ [t] at 233 63
+\pinlabel $K$ [r] at 125 272
+\pinlabel $S^3$ [bl] at 253 283
+\pinlabel $A$ [r] at 125 153
+\endlabellist
+\centering
+\includegraphics[scale=0.65]{fig6}
+\caption{A concordance between $K$ and the unknot}
+\label{fig:cobo}
+\end{figure}"
+
+The result is shown in \fullref{fig:cobo}, taken from Kim \cite[Figure
+6]{kim}.
+
+%with the unlabelled figure
+%included on the left (rather smaller) for reference. (This example is
+
+\begin{figure}[ht!]
+\centering
+%\mbox{\raise 30pt\hbox{\includegraphics[scale=0.4]{fig6}}}
+%\qquad\qquad
+\labellist
+\small\hair 2pt
+\pinlabel $B^3_+$ at 57 246
+\pinlabel $B^3_-$ [l] at 187 207
+\pinlabel {$(S^3 \times I,A)$} [tr] at 76 26
+\pinlabel $O$ [t] at 233 63
+\pinlabel $K$ [r] at 125 272
+\pinlabel $S^3$ [bl] at 253 283
+\pinlabel $A$ [r] at 125 153
+\endlabellist
+\includegraphics[scale=0.65]{fig6}
+\caption{A concordance between $K$ and the unknot}
+\label{fig:cobo}
+\end{figure}
+
+Let's look at this example line-by-line.
+
+\medskip
+"\begin{figure}[ht!]"
+
+opens the figure environment and instructs "latex" that we want the
+figure to be printed either {\bf h}ere or at the {\bf t}op of the page
+({\bf !} and no-where else).
+
+\medskip
+"\labellist"
+
+opens the list of labels.
+
+\medskip
+"\small" and "\hair 2pt"
+
+are formatting commands which apply to all the labels: "\small"
+typesets them approximately 1 point smaller than the text
+(recommended) and "\hair 2pt" adjusts the spacing between the label
+and the point which is being labelled (more on this below). Now come
+the actual labels. The first label instruction:
+
+\medskip
+"\pinlabel $B^3_+$ at 57 246"
+
+is the simplest form. It tells "latex" to pin the label $B^3_+$ with
+its centre at the point with coordinates $(57,246)$ in the figure. The
+remaining labels all have optional position codes.
+
+\medskip
+"\pinlabel $B^3_-$ [l] at 187 207"
+
+tells "latex" to pin the label $B^3_-$ by the point centre-left of its
+bounding box (this is what the position code "[l]" tells it to
+do) at the point with with coordinates $(187,207)$. But "pinlabel"
+does not do this. It applies automatic spacing. The point with
+coordinates $(187,207)$ is the end of the arrow we are labelling. We
+want the label to be placed a little way away and this is what
+"pinlabel" does. It sets the label exactly 2 points away. The "tex"
+dimension "\hair" is this spacing and we just set it equal to 2
+points. The default for "\hair" is "3pt", but you can reset it to any
+dimension you like for a particular label (or set of labels). If you
+want no autospacing, then use the starred form of the command:
+
+\medskip
+"\pinlabel* $B^3_-$ [l] at 187 207"
+
+which will set the label with the centre-left of its bounding box
+{\em exactly\/} at the point $(187,207)$.
+
+The next label:
+
+\medskip
+"\pinlabel {$(S^3 \times I,A)$} [tr] at 76 26"
+
+introduces an important point. The label code "$(S^3 \times I,A)$"
+has spaces in it. But "pinlabel" uses spaces to separate the various
+instructions, so to avoid "pinlabel" attempting to use "$(S^3" as the
+label (and falling over in the process) the label must be enclosed in
+braces. The position code in this label is "[tr]" (top-right) and
+this makes "pinlabel" pin this label by the point which is top-right
+of the label bounding box (with autospacing) at $(76,26)$, which are
+the coordinates read off from a point on the bottom curve of the
+figure. A full list of position codes will be given shortly.
+
+In \fullref{fig:screen} is a screenshot showing how the coordinates
+are read in "GSview". The label being processed is "$S^3$", the end
+of the arrow is located at $(253,283)$ and these coordinates are being
+copied into the "latex" file.
+
+\begin{figure}[ht!]
+\centering
+\labellist\small
+\pinlabel $\cross$ <-2pt,1pt> at 428 512
+\pinlabel {{\tt GSview} cursor} [b] <-10pt,20pt> at 428 512
+\pinlabel $\downarrow$ [b] <1pt,7pt> at 428 512
+\pinlabel $\uparrow$ [t] at 281 1
+\pinlabel {coords read here} [t] <0pt,-10pt> at 281 1
+\pinlabel {$\leftarrow$ coords copied here} [l] <0pt,0pt> at 753 516
+\endlabellist
+\includegraphics[width=.97\hsize]{screen}
+\vspace{3mm}
+\caption{Screenshot}
+\label{fig:screen}
+\end{figure}
+
+In the screenshot the text editor "Emacs" is the active window on top
+of "GSview" but the mouse is pointing at the point in "GSview" whose
+coordinates are being read (from the bottom of the "GSview" window).
+By using cursor keys in emacs, the mouse is not disturbed and the
+coordinates can be copied across very rapidly and accurately. In this
+example, the transcription of the coordinates took just a couple of
+minutes.
+
+Continuing with the example, there are further labels which do not
+introduce anything new and then the list of labels is closed with:
+
+\medskip
+"\endlabellist"
+
+after which come the commands for including the figure, the caption,
+the label (for cross-referencing) and for closing the "figure"
+environment:
+
+\medskip
+"\includegraphics[scale=0.65]{fig6}
+\caption{A concordance between $K$ and the unknot}
+\label{fig:cobo}
+\end{figure}"
+
+\medskip {\bf Important note}\qua The filename of the figure to be
+included (ie "fig6") {\em must be given without extension\/}. The
+program automatically looks for the correct file which would be
+"fig6.ps" or "fig6.eps", if using "tex" or "latex", and would be
+"fig6.pdf" if using "pdflatex". If you type
+"\includegraphics[scale=0.65]{fig6.eps}" then the program will give a
+warning:
+
+\medskip
+"cannot open figure fig6.eps.ps or .eps or .pdf on input line ..."
+
+and no figure will appear.
+
+
+
+\subsection{Position codes}\label{subsec:pos}
+
+Here is a full list of position codes: "r"=right, "l"=left, "t"=top,
+"b"=bottom and "B"=baseline. The default is centre and any sensible
+combination of two codes may be give (in either order) eg
+"[tl]"="[lt]"=top-left of label bounding box. The baseline is the
+line that "tex" uses for lining up characters. In \fullref{fig:ori}
+we illustrate all the possible position codes for a simple piece of
+text.
+
+\labellist\hair 1.5pt
+\pinlabel "[tr]" [bl] at 162 86
+\pinlabel "[br]" [tl] at 162 4
+\pinlabel "[tl]" [br] at 29 86
+\pinlabel "[bl]" [tr] at 29 4
+\pinlabel "[t]" [b] at 96 86
+\pinlabel "[b]" [t] at 96 4
+\pinlabel "[r]" [l] at 162 45
+\pinlabel "[l]" [r] at 29 45
+\pinlabel "[Br]" [bl] at 162 21
+\pinlabel "[Bl]" [br] at 29 21
+\pinlabel "[B]" [b] at 96 21
+\pinlabel {\Large .} at 96 21.7
+\pinlabel {\Large .} at 162.3 21.7
+\pinlabel {\Large .} at 28.6 21.7
+\pinlabel {\Large .} at 162.3 86
+\pinlabel {\Large .} at 162.3 3.7
+\pinlabel {\Large .} at 28.6 86
+\pinlabel {\Large .} at 28.6 3.7
+\pinlabel {\Large .} at 96 86
+\pinlabel {\Large .} at 96 3.7
+\pinlabel {\Large .} at 162.3 45
+\pinlabel {\Large .} at 28.6 45
+\pinlabel {\Large .} at 96 45
+\pinlabel {baseline} [l] <0pt,2pt> at 187 21
+\pinlabel {$\leftarrow$ bounding box} [l] <0pt,1pt> at 162 65
+\endlabellist
+
+
+\begin{figure}[ht!]\small
+\centering\vspace{1.5mm}
+\includegraphics[width=.5\hsize]{put}
+\vspace{1.5mm}
+\caption{Position codes}
+\label{fig:ori}
+\end{figure}
+
+If no position code is given then the label is pinned by the centre
+(unlabelled dot in the figure).
+
+\subsection{Relabelling an existing figure}
+
+Print the figure (with its labels) as a record of how the labels go.
+Then edit the ".eps" file to remove the given labels. This is usually
+easier than it sounds. Text in a PostScript file is usually enclosed
+in round brackets. For example here is an excerpt from the file
+"put.eps" used in \fullref{fig:ori}:
+
+\medskip
+"% Polyline
+7.500 slw
+ [60] 0 sd
+n 5492 3949 m 7720 3949 l 7720 2577 l 5491 2576 l
+ cp gs col0 s gr [] 0 sd
+/Helvetica-Bold ff 1500.00 scf sf
+5422 3615 m
+gs 1 -1 sc (put) col11 sh gr
+% here ends figure;
+%
+% here starts figure with depth 0
+% Polyline
+7.500 slw
+n 5027 3649 m"
+
+The text "(put)" is obvious and easily searchable. In this example
+``put'' is in fact a graphic element, rather than a label, so we would
+not edit it out, but a label would be given in the file in a similar
+format. If ``put'' were a label to be removed, you would edit it out
+by replacing "(put)" with "()". Do the same for all labels. Of
+course if you have the source code (eg the ".fig" file for "xfig")
+then you can edit the figure directly and then re-export it as an
+".eps" file.
+
+If your figure only exists as a ".pdf" file, then you can try
+ coverting to ".eps" by running "epstops -eps fig.pdf" and then
+ looking for text as above. After removing labels, convert back. If
+ these dodges fail then you will have to remake the figure without
+ labels using the original graphics program.
+
+Once the old labels have been removed, relabelling is identical to
+labelling a new figure as described above.
+
+
+
+
+\subsection{Rotated and other exotic labels}\label{rotate}
+
+Nothing has been said so far about the actual label. As far as
+"pinlabel" is concerned the label is just a box. Any valid "(la)tex"
+code can be used inside that box. For example you can use a
+"\rotatebox" for your label which results in a rotated label:
+
+\medskip
+"\pinlabel \rotatebox{-35}{$a^b$} at 50 30"
+
+You could even label by another picture:
+
+\medskip
+"\pinlabel \reallyincludegraphics[height=1cm]{pic} at 50 30"
+
+where "pic.eps" is the labelling picture.
+
+The reason for using the command "\reallyincludegraphics" rather than
+the usual "\includegraphics" is that it has the effect of suppressing
+labelling in the small picture. This is necessary because otherwise
+\TeX\ will go into an infinite loop as it tries to label by a picture,
+which is in turn labelled by a picture, which \dots\ \ For more detail
+about the command "\reallyincludegraphics" see the
+\hyperlink{really}{smallprint note (3)} near the end of
+\fullref{sec:adv}.
+
+\fullref{fig:exotic} shows an exotic example where we have used the
+whole picture as a rotated label inside itself. The code for this
+figure is as follows:
+
+\medskip
+"\begin{figure}[ht!]
+\labellist\hair 1.5pt
+\pinlabel \rotatebox{57}{\reallyincludegraphics[width=1cm]{put}}
+ [bl] at 162 86
+\endlabellist
+\centering\vspace{4.5mm}
+\includegraphics[width=.5\hsize]{put}
+\vspace{1.5mm}
+\caption{An exotic label}
+\label{fig:exotic}
+\end{figure}"
+
+
+\begin{figure}[ht!]
+\labellist\hair 1.5pt
+\pinlabel \rotatebox{57}{\reallyincludegraphics[width=1cm]{put}}
+ [bl] at 162 86
+\endlabellist
+\centering\vspace{4.5mm}
+\includegraphics[width=.5\hsize]{put}
+\vspace{1.5mm}
+\caption{An exotic label}
+\label{fig:exotic}
+\end{figure}
+
+
+\subsection{Using plain tex}
+
+Since the package automatically loads "miniltx.tex", all the "latex"
+commands connected with graphics will be available. So the basic
+commands for relabelling are the same. Probably you will have a
+figure inclusion macro included in whatever package you are using.
+Assuming this is "\fig ... \endfig" a pinlabelled figure might look
+this:
+
+\medskip
+"\fig
+\labellist\ninepoint\hair 2.5pt
+\pinlabel {$\partial_1 X$} [r] at 156 426
+\pinlabel {$\partial_2 X$} [tl] at 334 429
+\pinlabel $X_1$ at 431 513
+\pinlabel $X_2$ at 428 460
+\pinlabel $H_X$ [lb] at 311 622
+\pinlabel* $H_X'$ [tr] at 178 370
+\endlabellist
+\centerline{\includegraphics[width=3in]{decomp}}
+\centerline{Figure 23: Labelling the boundary components of $X$}
+\endfig"
+
+\section{Advanced features}\label{sec:adv}
+
+There are three features which give the package immense flexibility in
+pinning labels: pinning by coordinates, fine adjustment and the use of
+an external label file.
+
+\subsection{Pinning by coordinates}
+
+You can pin a label by {\em any\/} point, not just by the 12 points
+illustrated in \fullref{fig:ori}. Intrinsic coordinates are defined
+in the ``label-space'' by taking the origin at the centre and using
+affine coordinates with horizontal unit half the width of the bounding
+box and vertical half the height plus depth. These are illustrated in
+\fullref{fig:coords}.
+
+\begin{figure}[ht!]
+\centering\vspace{1.5mm}
+\labellist\small\hair 1.5pt
+\pinlabel $(1,1)$ [b] at 162 86
+\pinlabel $(1,-1)$ [tl] at 162 4
+\pinlabel $(-1,1)$ [br] at 29 86
+\pinlabel $(-1,-1)$ [tr] at 29 4
+\pinlabel $(0,1)$ [b] at 96 86
+\pinlabel $(0,-1)$ [t] at 96 4
+\pinlabel $(1,0)$ [l] at 162 45
+\pinlabel $(-1,0)$ [r] at 29 45
+\pinlabel {\Large .} at 162.3 86
+\pinlabel {\Large .} at 162.3 3.7
+\pinlabel {\Large .} at 28.6 86
+\pinlabel {\Large .} at 28.6 3.7
+\pinlabel {\Large .} at 96 86
+\pinlabel {\Large .} at 96 3.7
+\pinlabel {\Large .} at 162.3 45
+\pinlabel {\Large .} at 28.6 45
+{\hair 0pt \pinlabel {\Large .} at 96 45 }
+\pinlabel $(0,0)$ [t] at 96 45
+\pinlabel {\Large .} at 129 65
+\pinlabel $(0.5,0.5)$ [t] at 129 65
+\pinlabel {\Large .} at 228 86
+\pinlabel $(2,1)$ [b] at 228 86
+\pinlabel {\Large .} at -71 45
+\pinlabel $(-2.5,0)$ [l] at -71 45
+\pinlabel {$\leftarrow$ bounding box} [l] <0pt,1pt> at 162 65
+\endlabellist
+\includegraphics[width=.5\hsize]{put2}
+\vspace{1.5mm}
+\caption{Intrinsic coordinates in label-space}
+\label{fig:coords}
+\end{figure}
+
+Then the command:
+
+\medskip
+"\pinlabel* $a^b$ by -1.5 0 at 231 47"
+
+will pin the label $a^b$ so that the point $(-1.5,0)$ in label space
+(the ``label-point'') coincides with the point with (PostScript)
+coordinates $(231,47)$ in the diagram (the ``diagram point''). You
+can imagine a pin inserted through the label (on an extended
+transparent sheet if necessary) at the label-point and then this used
+to pin the label to the diagram at the diagram-point. This is the
+reason for the name that we have adopted for the package.
+
+We have used the starred form of "\pinlabel" in this example. If you use
+the unstarred form:
+
+\medskip
+"\pinlabel $a^b$ by -1.5 0 at 231 47"
+
+then the label is pinned so that the point $(-1.5,0)$ in label space
+is pinned to a point exactly "\hair" away from the point $(231,47)$ in
+the diagram. The direction of this autospacing is determined by the
+program. In practice you let the program decide on this direction,
+but if you want to know exactly how it decides, read part (2) of the
+next smallprint.
+
+You will now observe that there are several equivalent ways to pin
+labels using standard points. For example the following are all
+exactly equivalent:
+
+\medskip
+"\pinlabel* $t-u^2$ by -1 -1 at 231 47
+\pinlabel* $t-u^2$ [lb] at 231 47
+\pinlabel* $t-u^2$ [bl] at 231 47
+{\hair 0pt \pinlabel $t-u^2$ by -1 -1 at 231 47 }
+{\hair 0pt \pinlabel $t-u^2$ [lb] at 231 47 }
+{\hair 0pt \pinlabel $t-u^2$ [bl] at 231 47 }"
+
+Note the space after the final coordinate in the above examples. The
+commands use spaces as separators and are syntax sensitive. There
+must be a space (or a line return) after the final coordinate. The
+program will attempt to recover if the syntax is wrong, but often
+crashes with strange errors. If you copy the syntax in the examples
+in this file, then all will be well. For more about syntax and errors
+see \fullref{subsec:syn} and \fullref{subsec:err}.
+
+{\small{\bf Smallprint}\qua (1)\qua The use of spaces as separators
+means that the commands will not work with "\obeyspaces" set.
+
+(2)\qua There are eight directions for autospacing: E, NE, N, NW, W,
+SW, S, SE. The choice of a discrete set of directions makes the
+spacing look consistent over the diagram, whilst allowing sufficient
+flexibility to space labels away from the points being labelled. If
+you use the position code "[tl]" etc then the choice of direction is
+determined by the position code in the obvious way, eg "[tl]"
+determines NW, ie the label is set so that the diagram-point is
+"\hair" away from the label-point in the north-west direction. The
+position code "[B]" suppresses autospacing and "[Bl]" chooses W, "[Br]"
+chooses E as you would expect. When pinning by coordinates rather
+than by letters, the program uses the direction (of the eight
+available) closest to direction from $(0,0)$ to the label-point. If
+the label-point is $(0,0)$ then autospacing is again suppressed. The
+effect of these rules is that for example:
+
+\medskip
+"\pinlabel {label} by 1 1 at 231 56"
+
+is not always equivalent to:
+
+\medskip
+"\pinlabel {label} [tr] at 231 56"
+
+If the label is rather wide, then $(1,1)$ in diagram space may be
+closer to E than NE and the first command will autospace using E and
+the second NE.}
+
+\subsection{Fine adjustment}
+
+There is an optional manual ``fine adjustment'' that can be applied to
+any label which moves the label a specified amount. This may be
+inserted before "at" or directly after the label. The adjustment
+goes inside diamond brackets "<x-adj,y-adj>" where "x-adj" and "y-adj"
+are arbitrary "tex" dimensions.
+
+For example the following commands are all equivalent:
+
+\medskip
+"\pinlabel $a^b$ [l] <-2pt,1pt> at 231 47
+\pinlabel $a^b$ by -1 0 <-2pt,1pt> at 231 47
+\pinlabel $a^b$ <-2pt,1pt> [l] at 231 47
+\pinlabel $a^b$ <-2pt,1pt> by -1 0 at 231 47"
+
+They all pin the label $a^b$ by centre-left at $(231,47)$ with two
+adjustments: "\hair" (autospacing) and then "(-2pt,1pt)" manual (in other
+words the label is moved 2 points to the left and 1 point upwards).
+
+\medskip
+"\pinlabel* $a^b$ [l] <-2pt,1pt> at 231 47"
+
+will do the same but with "\hair" set to "0pt" (ie autospacing
+suppressed).
+
+In practice, you label your diagram as described in \fullref{sec:bas}
+using either position codes or coordinates. Then you inspect it in a
+viewer and make final adjustments by (a) adjusting "\hair" (this can
+be done for each label separately if necessary) and (b) adding a final
+manual adjustment "<x-adj,y-adj>" again, if necessary. For example,
+inspecting \fullref{fig:cobo}, we see that the label $B^3_-$ has been
+placed a little too far from the arrow tail, because of the sloping
+italic type, and that $K$ is also a tad too far from its arrow because
+of the shape of the letter $K$. So to perfect the labelling you could
+make fine adjustments as follows:
+
+\medskip
+"...
+\pinlabel $B^3_-$ [l] <-1pt,0pt> at 187 207
+\pinlabel {$(S^3 \times I,A)$} [tr] at 76 26
+\pinlabel $O$ [t] at 233 63
+\pinlabel $K$ [r] <1pt,0pt> at 125 272
+..."
+
+It is worth stressing that both "\hair" and the fine adjustment
+"<x-adj,y-adj>" are absolute dimensions. They do not change if the
+figure is rescaled. By contrast the coordinates of the diagram point,
+"at XXX YYY", are given in PostScript points scaled by any scaling
+applied to the figure and are therefore instrinsic to the figure.
+This means that if the figure is rescaled, the diagram point moves
+with the scaling (as you would expect) but the spacing given by
+autospacing and fine adjustment stays fixed. Thus you can make
+last-minute changes of scale to a labelled diagram and the labels will
+continue to be perfectly positioned.
+
+
+\subsection{Using a .lab file}\label{labfile}
+
+Labels can either be given as a list in the "tex" file (they must come
+between "\labellist" and "\endlabellist") as described above or given
+in the form of an external ".lab" file. This is particularly useful
+if you have a complicated diagram with labels generated by an external
+program, for example the "mathfig" software, which automatically
+generates ".lab" files from Mathematica input. The syntax is identical
+but the commands "\labellist" and "\endlabellist" must not be given.
+The filename must be exactly the same as the figure being labelled
+(but with a ".lab" extension instead of a ".eps" or ".ps" or ".pdf"
+extension) and the label file must be in the same directory as the
+figure file.
+
+The program is based on "psfig" and uses "psfig" internally. In the
+examples above, we have used "graphicx" commands for figure insertion
+but we could equally well have used "psfig" commands. In the first
+example, \fullref{fig:cobo} we used:
+
+\medskip
+"\includegraphics[scale=0.65]{fig6}"
+
+but we could equivalently have used:
+
+\medskip
+"\psfig{file=fig6,scale=65}"
+
+This works because the program automatically translates to "psfig"
+(and adjusts the scale command correctly). However it only does this
+if there is a "labellist" waiting to be used. This is a feature that
+allows you to use "\includegraphics" in its full power (eg with
+rotation) for figures that are not being pinlabelled. But it means
+that if you use an external ".lab" file then you {\em must\/} use
+"psfig" syntax. For example, suppose that your figure is "diag.eps"
+in the subdirectory "figs" then if you type:
+
+\medskip
+"\centerline{\psfig{file=figs/diag,width=.7\hsize}}"
+
+and if the file "figs/diag.lab" reads:
+
+\medskip
+"\small\hair 2pt
+\pinlabel $(-1,-1)$ [tr] at 29 4
+\pinlabel $(0,1)$ [b] at 96 86
+\normalsize\hair 3pt
+\pinlabel $(0,-1)$ [t] at 96 4
+\pinlabel $(1,0)$ [l] at 162 45
+\pinlabel $(-1,0)$ [r] at 29 45
+\pinlabel {\Large .} at 162.3 86
+\pinlabel {\Large .} at 162.3 3.7"
+
+Then these labels will be pinned to the diagram exactly as if they had
+been typed in the main file. Note the change of formatting
+instructions within this list of labels. The labels after the change
+will be typeset "\normalsize" instead of "\small" with "\hair" set to
+"3pt".
+
+
+{\small{\bf Smallprint}\qua (1)\qua Labelling instructions do not have
+to be given inside the "figure" environment. Indeed they can be given
+at any time before the next "\includegraphics" or "\psfig" command.
+If there are both a "labellist" pending {\em and\/} an appropriate
+".lab" file available, then the "labellist" will override the ".lab"
+file (and you will get a warning to that effect). Any formatting that
+is in force when the "labellist" is typed is ignored and the
+formatting that is in force inside the figure environment is used
+instead. For example the command "\small" can be given either at the
+start of the "labellist" or at the start of the ".lab" file or after
+"\begin{figure}[ht!]" with identical effect.
+
+(2)\qua Formatting instructions can be given at any stage within the
+labellist or the ".lab" file as in the above example (the change of
+formatting in that example would work equally well within a
+"labellist"). There is a facility for setting a global format that
+automatically applies to all labels. If you type:
+
+\medskip
+"\gdef\hyperactivelabels{\small\sl\hair2.5pt}"
+
+at the start of your file (or anywhere else you like) then all figures
+that come after that line will have formatting applied exactly as if
+you had typed:
+
+\medskip
+"\small\sl\hair2.5pt"
+
+at the start of the "labellist" or ".lab" file. This facility is
+extremely useful for machine generated ".lab" files. You can reset
+"\hyperactivelabels" between figures. To cancel this automatic
+formatting between any two figures, type:
+
+\medskip
+"\global\let\hyperactivelabels\relax"
+
+\hypertarget{really}{(3)}\qua You can force the program to use "graphicx" rather than
+autotranslating to the appropriate "psfig" command by typing
+"\reallyincludegraphics". Since autotranslation only takes place when
+there is a "labellist" pending, this will only be necessary if, for
+some reason, a labellist has been supplied that applies to a later
+figure. Labelling will take not place if autotranslation is
+suppressed and the "labellist" will be saved and applied to the next
+figure. An example where this was essential was given in
+\fullref{rotate}. When using a picture as a label, you need to
+suppress labelling in the label or \TeX\ will go into an infinte loop
+
+
+(4)\qua Autotranslation of "\includegraphics" is far from perfect.
+Many of the options are not supported. Read \fullref{sec:bugs} (on
+bugs) below if you run into trouble.}
+
+
+\section{Smallprint}\label{sec:smallprint}
+
+{\small\subsection{Syntax}\label{subsec:syn}
+
+{\bf Basic syntax}
+
+\medskip
+"\pinlabel {label} by x-pin y-pin at x-location y-location"
+
+or
+
+\medskip
+"\pinlabel* {label} by x-pin y-pin at x-location y-location"
+
+where "x-pin y-pin" is the point in intrinsic coords in label space
+where we are placing the pin and "x-location y-location" is the point
+in diagram space (in PS points as read in gv) where the label is
+pinned. "\pinlabel" uses "\hair" autospacing "\pinlabel*" does not.
+"\mathsurround" is set to "0pt" for parsing the label. If the label
+contains spaces, it {\em must\/} be enclosed in braces "{}".
+
+\medskip
+"x-pin", "y-pin", "x-location" and "y-location" are pure numbers,
+{\em not\/} dimensions. The program converts them to the relevant
+dimension. The "by" and "at" are essential as are all the spaces.
+
+
+{\bf Options}
+
+\medskip
+"by x-pin y-pin" may be omitted, the default is "0 0".
+
+\medskip
+"by x-pin y-pin" may be replaced by position codes "[r]", "[Bl]"
+etc (see \fullref{subsec:pos} for full detail of these codes).
+
+A manual adjustment "<x-adj, y-adj>" may be added either after the label or
+before "at". Here "x-adj" and "y-adj" are "tex" dimensions, eg "5pt" or
+"-2mm".
+
+Full examples (for more examples see earlier):
+
+\medskip
+"\pinlabel $B^3_-$ <-1pt,0pt> by -1 0 at 187 207
+\pinlabel* $K$ [r] <1pt,0pt> at 125 272"
+
+
+\subsection{Old syntax}\label{subsec:old}
+
+"pinlabel.sty" is a revised version of "geompsfi.sty" and the old
+syntax remains available for backwards compatibility. The simplest
+version is:
+
+\medskip
+"\setlabel{a^b}{321}{33}{1}{1}"
+
+which pins the label $a^b$ by (1,1) (ie "[tr]") to $(321,33)$ with
+autospacing applied. Note that the "$$"'s for math mode are not given
+with the label in this syntax. Two new options have been added to the
+old syntax. There is a starred form:
+
+\medskip
+"\setlabel*{a^b}{321}{33}{1}{1}"
+
+which is the same but with autospacing suppressed, and fine
+adjustments may be added:
+
+\medskip
+"\setlabel<-2pt,-1pt>{a^b}{321}{33}{1}{1}
+\setlabel*<-2pt,-1pt>{a^b}{321}{33}{1}{1}"
+
+which are the same but with a "(-2pt,-1pt)" adjustment added.
+
+The old and new syntax may be mixed in a "labellist" or inside a
+".lab" file.
+
+{\bf Important notes}\qua (1)\qua "\mathsurround" is set to zero when
+parsing the label. This was not done in "geompsfi", so the command is
+{\em not quite\/} backwards compatible. If no "\mathsurround" is used
+there is no change in label positioning. If "\mathsurround" is used
+then labels may move a small amount horizontally.
+
+(2)\qua The label is in horizontal mode in standard ("\pinlabel")
+syntax but in math mode in the old ("\setlabel") syntax, so care
+should be taken if the syntaxes are mixed.
+
+\subsection{Errors}\label{subsec:err}
+
+
+The program will attempt to recover from syntax errors. Roughly
+speaking, provided the "\pinlabel" command terminates with%
+" at XXX YYY" where there are spaces round the "at" and "XXX", "YYY"
+are pure numbers, then the label (the code after "\pinlabel" up
+to the first unbraced space) will appear in the diagram. If the
+program does not recognise the syntax between the label and the "at"
+then you will get the following warning:
+
+\medskip
+"I don't understand your positioning information for label #1 and shall
+ignore it; or perhaps your label has a space and needs braces."
+
+where "#1" is replaced by the actual label code. If there is no "at"
+then the program has a harder time recovering but you should get the
+following warning:
+
+\medskip
+"There is something wrong with your syntax for label #1;
+you must finish with "\ttq" at XXX YYY"\ttq" : the "\ttq"at"\ttq" and spaces are important!
+I'm going to try to ignore this label: don't blame me if there are some
+funny numbers in your diagram and later labels are out-of-position."
+
+By looking at the finished diagram, you should be able to pick out
+where the error lies. If all that is wrong with the syntax is that
+the position code has been mistyped then you should just get the
+following warning:
+
+\medskip
+"Unknown position code [#2]; I shall ignore it."
+
+where "[#2]" is the mistyped code. If you make a basic "tex" error
+(unmatched "$..$"'s for example) then you should get an error
+"missing $" or similar. If all else fails, check each "\pinlabel"
+command against the samples given here.
+
+\subsection{Bounding boxes}\label{subsec:bb}
+
+In \ref{subsec:graph} it was mentioned that conversion from ".eps" to
+ ".pdf" may change the bounding box. In a ".pdf" file the bounding
+ box always has bottom-left corner at "0 0" but this is not true for
+ an ".eps" file. The recommended converter "epstopdf" does not change
+ the {\em size} of the bounding box but merely moves the bottom-left
+ corner to "0 0". This implies that an ".eps" file used to position
+ labels can safely be discarded if and only if the bottom-left corner
+ in the bounding box in the ".eps" file is in fact at "0 0".
+
+
+If you need to know the deep detail on how "pinlabel" reads the
+ bounding box, read on. If a bounding box is supplied via options to
+ "\includegraphics" or "\psfig", eg
+
+{\footnotesize\medskip
+ "\includegraphics[bbllx=10bp,bblly=12bp,bburx=150bp,bbury=273bp,width=2in]{fig}",}
+
+ which specifies the box "10 12 150 273" (the "bp" specifies
+ postscript points), then this specification is used {\em whatever the
+ actual bounding box is for the graphics files.} Otherwise pinlabel
+ looks for a file named "fig.ps" or "fig.eps" or "fig.pdf" {\em in
+ that order}. If it finds such a file, it reads the bounding box and
+ uses that. If there is no file "fig.ps" or "fig.eps" or "fig.pdf" or
+ if "pinlabel" cannot find a bounding box in the first of these that
+ exists, then you get an error message and no figure is typeset.}
+
+
+
+
+\section{Bugs}\label{sec:bugs}
+
+No spaces are permitted in the file argument of "\psfig".
+Autotranslation of "graphicx" means that no spaces are permitted in
+the file argument to "\includegraphics". \newline Thus
+"\includegraphics[width=4in]{ foo }" will produce errors. It should
+be typed "\includegraphics[width=4in]{foo}". Spaces are permitted
+with other arguments.
+
+Many of the options in "graphicx" are not supported by
+ autotranslation. The supported ones are: "width", "height", "scale",
+ "bbllx", "bblly", "bburx", "bbury" and "clip". The syntax for clip
+ is "clip=". Replace "keepaspectratio=true" by "proportional=". The
+ arguments to "bbllx" etc must be specified in postscript points (see
+ the example above).
+
+\medskip
+"\graphicspath{}" is not supported.
+
+Automatic configuration for "dvips" and "pdflatex" is included in the
+program. No support is provided for other drivers.
+
+The program is fully compatible with plain "tex" via the "latex"
+interpreter "miniltx.tex" written by David Carlisle. It works with
+"dvips" but {\em not\/} with "pdftex". For pdf output from plain
+"tex" use "dvips" followed by "ps2pdf".
+
+{\bf Note}\qua "\psfig" ouputs a vbox, which is not centred in the
+"latex" "{center}" environment. Either use "\centerline{}" or type
+"\leavevmode" before "\psfig{..}". The translator adds "\leavevmode"
+for "\includegraphics", which therefore centres correctly as usual
+in the "{center}" environment.
+
+\section{Why pinlabel?}\label{sec:why}
+
+This section reviews other labelling packages and attempts to answer
+the obvious question: why do we need a new package? Well the first
+obvious comment is that the package is not new. It is the old package
+"geompfsi", rewritten, with extra functionality and new syntax.
+However it is fully backwardly compatible and all "geompfsi" diagrams
+should compile perfectly with "pinlabel" (with one small caveat, see
+note (1) in \fullref{subsec:old}).
+
+
+\subsection{rlepsf and psfrag}
+
+Turning to other packages which are capable of perfect \TeX\ formatted
+labels, there are two relabelling packages "rlepsf" and "psfrag" which
+replace dummy labels in the ".eps" file with "tex" labels specified in
+the ".tex" file. Both of these are incompatible with "pdflatex",
+which makes them now unsuitable for figures created from scratch.
+They depend on low level interfacing with PostScript via "\special"
+commands. Indeed both are somewhat sensitive as to the precise nature
+of the ".eps" file being relabelled. If you have a file with figures
+relabelled using "rlepsf" or "psfrag", the most robust way to make it
+"pdflatex" compatible is to relabel the figures using "pinlabel".
+(But you can also treat the figures like "pstricks" figures etc, see
+\fullref{subsec:pst}.)
+
+
+\subsection{Combined output from xfig}
+
+\medskip
+"xfig" is capable of creating figures with properly formatted "tex"
+ labels using "combined ps/latex (pstex)" or "combined pdf/latex"
+ output. This works well, and existing figures using this system can
+ be used with "pdflatex" with only minor changes: if you export as
+ "combined ps/latex (pstex)" you have to rename the ".pstex" file
+ (which is in fact an ".eps" file) to an ".eps" file and convert to
+ ".pdf" and in both cases you have edit the "\includegraphics{}"
+ command to remove the ".pstex" or ".pdf" extension.
+
+However starting from scratch, it is much more efficient to create
+ unlabelled ".eps" or ".pdf" files in "xfig" and then add labels with
+ "pinlabel". The positioning of the labels in "xfig" is hit-and-miss
+ and difficult to adjust: you have to keep the ".fig" file open, move
+ the label a little, re-export, reconvert to ".pdf", recompile, repeat
+ \ldots. Using "pinlabel" the label is usually positioned perfectly
+ first time and can be adjusted without reopening "xfig", which is far
+ more efficient.
+
+
+\subsection{overpic, labelfig, xyoverpic and WARMreader}
+
+There are three packages which, like "pinlabel" add the labels as an
+overlay on an existing ".eps" figure and therefore produce robust code
+suitable for "pdflatex". "overpic" is the most basic. Reading label
+positioning is pure guesswork (using a simple grid) and there are no
+fine adjustments for positioning, which makes the final tuning very
+time-consuming (and highly sensitive to any last-minute change of
+scale). "labelfig" is slightly more sophisticated, but reading label
+positioning is the same guesswork as for "overpic", there are some
+position codes, but again there is no fine adjustment and moreover
+the syntax is {\em awful\/}:
+
+\medskip
+"\SetLabels
+\E(.18*.68) $F$\\
+\E(.39*.68) $G$\\
+...
+\E(.75*.2) or\\
+\E(.88*.2) $F$\\
+\endSetLabels
+%\ShowGrid
+\AffixLabels{\BoxedEPSF{Mutant.ART scaled 500}}}"
+
+\medskip "xyoverpic" is much more sophisticated, offering a good deal
+of the functionality of "pinlabel". But accurate positioning of
+labels requires a preprocessor such as "WARMreader". You can also
+read the label positions using "ghostview" but you have to be clever
+to do this. Firstly you need to make sure that your ".eps" file has
+its bounding box starting at "(0,0)" then you need to supply the other
+bounding box coordinates directly after "\begin{xyoverpic*}" (they are
+"(280,210)" in the example below) to set the scaling; then the
+"ghostview" coordinates can be used. The syntax for the actual labels
+is, if anything, worse than "labelfig" but it does have both a
+position code and an element of fine positioning built in:
+
+\medskip
+"\begin{xyoverpic*}{(280,210)}{scale=0.75}{figures/pgl-orbifold}
+ ,(0, 107)*++!R{4}
+ ,(64,178)*++!DR{4}
+ ,(278,107)*++!L{2}
+ ,(130, 136)*++!LD{2}
+ ,(172,107)*++!U{3}
+\end{xyoverpic*}}"
+
+By contrast, "pinlabel" uses "ghostview" coordinates for files whose
+bounding box does not start at "(0,0)" and the syntax is transparent.
+
+\subsection{Summary}
+
+To summarise the advantages of "pinlabel" over existing packages which
+do a broadly similar job: only "xyoverpic" with the the tweaks
+described above (or with "WARMreader" input) gets location in diagram
+accurate first time. But it is marred by impossible syntax and
+limited fine adjustment.
+
+\medskip "pinlabel" gets a similar accuracy in positioning and has
+transparent syntax and arbitrary fine adjustment. Moreover "pinlabel"
+has a powerful feature not shared by any other package: the ability to
+pin labels using arbitrary pin positions, specified in instrinsic
+coordinates in the label. This has not been stressed in this manual
+because it is rarely necessary in hand constructed diagrams, but for
+machine generated code it is very useful indeed. For example Silvio
+Levy (who originated this feature) writes:
+
+{\leftskip 15pt\rightskip 15pt\leavevmode\llap{``}{\em I find it very convenient to
+place (small, "mathematica"-generated) labels around a circle, say, by
+pinning the label at $(-\cos\theta,-\sin \theta)$ in label
+coordinates. This works very well.}''\par}
+
+\subsection{pstricks, eepic, specials}\label{subsec:pst}
+
+Before leaving the topic of other packages, there are a number of
+packages which, like "rlepsf" and "psfrag" interface directly with
+PostScript. All are unsuitable for use with "pdflatex" for this
+reason. If faced with a file containing such figures, you need to
+precompile the figures using "latex" then "dvips -E" (or "dvips"
+followed by "ps2epsi", which is more robust about bounding box
+placement) and then "epstopdf" to produce a ".pdf" file for inclusion
+in the usual way.
+
+
+\section{Pinlabeler and labelpin}
+
+Peter Storm has written an extremely useful extension to "gv", called
+ "pinlabeler" which automatically copies the coordinates of the cursor
+ in "gv" to a text file open for editing. To be precise it writes a
+ line like:
+
+\medskip
+"\pinlabel {$$} [] at XXX YYY "
+
+into the file at the position of the cursor (in the editor) where
+ " XXX YYY " are the PS coordinates of the cursor in "gv". It does this
+ when you click on a point in the "gv" window. This makes
+ transcribing coordinates much simpler: you just click on the label
+ position and then fill in the label and positioning code.
+
+You can find full details (including installation instructions) at:
+
+\href{http://hans.math.upenn.edu/~pstorm/pinlabeler.html}{\tt
+ http://hans.math.upenn.edu/\char'176pstorm/pinlabeler.html}
+
+
+Nathan Dunfield has written a similar program "labelpin", which is a
+ python script and therefore, unlike Storm's program, does not need
+ compilation. Both work perfectly with "cygwin" under Windows
+ ("pinlabeler" comes ready compiled for "cygwin") and both work
+ perfectly with ".pdf" figures, moreover "labelpin" works on a Mac.
+
+The script and instructions for "labelpin" can be downloaded from:
+
+\href{http://www.math.uiuc.edu/~nmd/software/}{\tt
+ http://www.math.uiuc.edu/\char'176nmd/software/}
+
+
+
+
+\section{Acknowledgements and copyright notice}
+
+"pinlabel" is based on "geompsfi.sty" written by Silvio Levy which in
+turn is based on "psfig.sty" written by Trevor Darrell. Their
+agreement to this development is gratefully acknowledged. Silvio Levy
+has made several helpful suggestions and done extensive testing and
+debugging.
+
+Thanks also to Walter Neumann, Paulo Ney de Souza, Nicholas Jackson
+ and Noam Shomron for helpful suggestions, testing and debugging, and
+ also to Mark Peletier for providing the code that reads the bounding
+ box from a ".pdf" file, thus making ".eps" versions of figure files
+ unnecessary when using "pdflatex".
+
+\subsection*{Copyright notice}
+
+
+The following notice appears at the start of the source file:
+
+{\small
+\medskip
+"
+ Copyright 2006-11 Mathematical Sciences Publishers (MSP)
+
+ NOTICE
+
+ This package may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either version
+ 1.3 of this license or (at your option) any later version.
+ The latest version of this license is in"
+
+\noindent\hspace{1in}\href{http://www.latex-project.org/lppl.txt}{{\tt http://www.latex-project.org/lppl.txt}}
+
+\medskip
+" and version 1.3 or later is part of all distributions of LaTeX
+ version 2005/12/01 or later.
+
+ This package has the LPPL maintenance status `maintained' and is
+ currently maintained by MSP: contact@mathscipub.org
+
+ It comprises the files: pinlabel.sty (this file) and the manual
+ pinlabdoc.pdf where full documentation may be found, together with
+ the source files for the documentation."}
+
+
+
+\begin{thebibliography}
+
+\bibitem{kim}
+\textbf{H\,J Kim}, \href{http://dx.doi.org/10.2140/gt.2006.10.27}{\emph{Modifying surfaces in 4--manifolds by twist spinning}}, Geom.
+ Topol. 10 (2006) 27--56
+
+\end{thebibliography}
+
+\end{document}
+
diff --git a/macros/latex/contrib/pinlabel/src/pinlabel.sty b/macros/latex/contrib/pinlabel/src/pinlabel.sty
new file mode 120000
index 0000000000..8018542dad
--- /dev/null
+++ b/macros/latex/contrib/pinlabel/src/pinlabel.sty
@@ -0,0 +1 @@
+../pinlabel.sty \ No newline at end of file
diff --git a/macros/latex/contrib/pinlabel/src/put.fig b/macros/latex/contrib/pinlabel/src/put.fig
new file mode 100644
index 0000000000..62fc91be5c
--- /dev/null
+++ b/macros/latex/contrib/pinlabel/src/put.fig
@@ -0,0 +1,14 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+2 3 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
+ 5492 3949 7720 3949 7720 2577 5491 2576 5492 3949
+2 1 0 1 0 7 0 -1 -1 0.000 0 0 -1 0 0 2
+ 5027 3649 8117 3649
+4 0 11 50 -1 18 100 0.0000 4 1320 2295 5422 3615 put\001
diff --git a/macros/latex/contrib/pinlabel/src/put.pdf b/macros/latex/contrib/pinlabel/src/put.pdf
new file mode 100644
index 0000000000..d0175b4085
--- /dev/null
+++ b/macros/latex/contrib/pinlabel/src/put.pdf
Binary files differ
diff --git a/macros/latex/contrib/pinlabel/src/put2.fig b/macros/latex/contrib/pinlabel/src/put2.fig
new file mode 100644
index 0000000000..2882a6e1ac
--- /dev/null
+++ b/macros/latex/contrib/pinlabel/src/put2.fig
@@ -0,0 +1,14 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+2 3 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
+ 5492 3949 7720 3949 7720 2577 5491 2576 5492 3949
+2 1 0 1 7 7 100 -1 -1 0.000 0 0 -1 0 0 2
+ 5027 3649 8117 3649
+4 0 11 50 -1 18 100 0.0000 4 1320 2295 5422 3615 put\001
diff --git a/macros/latex/contrib/pinlabel/src/put2.pdf b/macros/latex/contrib/pinlabel/src/put2.pdf
new file mode 100644
index 0000000000..280736b2ac
--- /dev/null
+++ b/macros/latex/contrib/pinlabel/src/put2.pdf
@@ -0,0 +1,74 @@
+%PDF-1.3
+%쏢
+5 0 obj
+<</Length 6 0 R/Filter /FlateDecode>>
+stream
+xmO
+A )I
+bX)'FfL+2 a&mc-C;HND9a~3,a.FmlFMl,F3sOS`٨&O=Z˾*5k`J¾U m:\Xv+ 5v<,.Ǹ`V`QY:endstream
+endobj
+6 0 obj
+183
+endobj
+4 0 obj
+<</Type/Page/MediaBox [0 0 187 88]
+/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
+>>
+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-Bold/Type/Font
+/Subtype/Type1>>
+endobj
+2 0 obj
+<</Producer(MiKTeX GPL Ghostscript 8.50)
+/CreationDate(D:20060519211147)
+/ModDate(D:20060519211147)
+/Title(put2.fig)
+/Creator(fig2dev Version 3.2 Patchlevel 4)
+/Author(Colin@poincare \(Colin\))>>endobj
+xref
+0 11
+0000000000 65535 f
+0000000495 00000 n
+0000000712 00000 n
+0000000436 00000 n
+0000000287 00000 n
+0000000015 00000 n
+0000000268 00000 n
+0000000543 00000 n
+0000000643 00000 n
+0000000584 00000 n
+0000000613 00000 n
+trailer
+<< /Size 11 /Root 1 0 R /Info 2 0 R
+/ID [<847BD07207F47F11EAAC19811F84CED2><847BD07207F47F11EAAC19811F84CED2>]
+>>
+startxref
+922
+%%EOF
diff --git a/macros/latex/contrib/pinlabel/src/screen.pdf b/macros/latex/contrib/pinlabel/src/screen.pdf
new file mode 100644
index 0000000000..e5b024d206
--- /dev/null
+++ b/macros/latex/contrib/pinlabel/src/screen.pdf
Binary files differ