%                   SCALARSETUP(9).TEX
% CALLED BY FEYNMAN(34).
% USED FOR GENERATING SCALAR LINES IN  FEYNMAN DIAGRAMS IN LATEX.
\newcount\scalarlength
\newcount\scalarlengthx
\newcount\scalarlengthy
\newcount\scalarfrontx  %}(x,y) co-ord of left of scalar
\newcount\scalarfronty  %}
\newcount\scalarbackx
\newcount\scalarbacky
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\gdef\ALLscalar{
\global\scalarfrontx=\particlefrontx   % READ IN FROM FEYNMAN \selectscalar
\global\scalarfronty=\particlefronty   % READ IN FROM FEYNMAN \selectscalar
% \gaplength=850  \seglength=1416  % Default defined in FEYNMAN.TEX.
\numlineparts = 1      \numupperunits=\unitboxnumber
\ifcase\LINECONFIGURATION
\global\upperlineadjx=-200     \global\upperlineadjy=0
\slanttest(\seglength,\gaplength)   %SEE FEYNMAN22.TEX.
\gdef\upperunitbox{\line(\XDIR,\YDIR){\seglength}}
\else \UNIMPERROR % etc.
\fi
\global\unitboxwidth=\seglength  \global\advance\unitboxwidth by \gaplength
\global\multiply \unitboxwidth by \XDIR
\global\unitboxheight=\seglength  \global\advance\unitboxheight by \gaplength
\global\multiply \unitboxheight by \YDIR
\global\particleadjustx=\gaplength \global\multiply\particleadjustx by \XDIR
\global\particleadjusty=\gaplength \global\multiply\particleadjusty by \YDIR
\negate\particleadjustx   \negate\particleadjusty   % SUBTRACT from linelength
\setparticle  %SCALAR8
\global\scalarlengthx=\particlelengthx  %SCALAR8
\global\scalarlengthy=\particlelengthy  %SCALAR8
% Warning message for overly-long lines.  See FEYNMAN for negative-lengths.
\ifnum\boxlengthx > 50000
\message{   *** WARNING *** Scalar of length in excess of 50000cp
requested!}\fi
\ifnum\boxlengthy > 50000
\message{   *** WARNING *** Scalar of length in excess of 50000cp
requested!}\fi
\global\scalarbackx=\pbackx      \global\scalarbacky=\pbacky   %SCALAR8
}
