summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:09:02 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:09:02 +0000
commitaed24ac15c4446a14ffebfe4be461fcba94af705 (patch)
tree6ccf96f7a40a1cad0614c8011cc09cb45625a46d /Master
parent458ac1dc33cd1cb81d92e545482ce5a8d29bfba0 (diff)
textopo
git-svn-id: svn://tug.org/texlive/trunk@1384 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/tex/latex/textopo/biotex.sty77
-rw-r--r--Master/texmf-dist/tex/latex/textopo/textopo.def133
-rw-r--r--Master/texmf-dist/tex/latex/textopo/textopo.sty7589
3 files changed, 7799 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/textopo/biotex.sty b/Master/texmf-dist/tex/latex/textopo/biotex.sty
new file mode 100644
index 00000000000..8462e9ca240
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/textopo/biotex.sty
@@ -0,0 +1,77 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{biotex}[2001/08/08 LaTeX BioTeX Bundle (v1.1)]
+
+\catcode`\@=11
+
+\expandafter\ifx\csname BioTeX\endcsname\relax \else \endinput \fi
+
+\def\BioTeX{\mbox{\textsc{Bio}\kern-0.5ex\TeX}}
+
+\message{Welcome to the BioTeX Bundle Version 1.1 of 01/08/08}
+
+\DeclareOption*{%
+ \PassOptionsToPackage{\CurrentOption}{texshade}%
+ \PassOptionsToPackage{\CurrentOption}{textopo}%
+}
+\ProcessOptions
+
+\newread\in@file
+
+\expandafter\ifx\csname TeXshade\endcsname\relax
+ \openin\in@file = texshade.sty
+ \ifeof\in@file
+ \PackageError{BioTeX}
+ {`texshade.sty' not found}
+ {\MessageBreak
+ I can not find the TeXshade package on your computer.\MessageBreak
+ That means that neither setting of sequence alignments\MessageBreak
+ nor shading of topology plots or helical wheels\MessageBreak
+ can be applied.\MessageBreak
+ TeXshade is available from any CTAN site or from the\MessageBreak
+ BioTeX (TeXshade/TeXtopo) homepage: \MessageBreak
+ http://homepages.uni-tuebingen.de/beitz/tse.html
+ \MessageBreak\MessageBreak
+ You can proceed <return> or stop by typing X <return>. \MessageBreak
+}
+ \else \RequirePackage{texshade}
+ \expandafter\ifx\csname geneticcode\endcsname\relax
+ \PackageError{BioTeX}
+ {(actually a warning only) `texshade.sty' too old}
+ {\MessageBreak
+ The TeXshade version your are about to use is not\MessageBreak
+ compatible with TeXtopo. \MessageBreak
+ In order to apply shading on topology plots you\MessageBreak
+ need to install a more recent TeXshade package\MessageBreak
+ (v1.3 or newer). \MessageBreak
+ TeXshade is available from any CTAN site or from the \MessageBreak
+ BioTeX (TeXshade/TeXtopo) homepage: \MessageBreak
+ http://homepages.uni-tuebingen.de/beitz/tse.html
+ \MessageBreak\MessageBreak
+ You can proceed <return> or stop by typing X <return>. \MessageBreak
+}
+ \fi
+ \closein\in@file
+ \fi
+\fi
+
+\expandafter\ifx\csname TeXtopo\endcsname\relax
+ \openin\in@file = textopo.sty
+ \ifeof\in@file
+ \PackageError{BioTeX}
+ {`textopo.sty' not found}
+ {\MessageBreak
+ I can not find the TeXtopo package on your computer.\MessageBreak
+ That means that neither topology plots nor helical wheels\MessageBreak
+ can be set.\MessageBreak
+ TeXtopo is available from any CTAN site or from the\MessageBreak
+ BioTeX (TeXshade/TeXtopo) homepage: \MessageBreak
+ http://homepages.uni-tuebingen.de/beitz/tse.html
+ \MessageBreak\MessageBreak
+ You can proceed <return> or stop by typing X <return>. \MessageBreak
+}
+ \else \RequirePackage{textopo} \fi
+ \closein\in@file
+\fi
+
+\catcode`\@=12
+
diff --git a/Master/texmf-dist/tex/latex/textopo/textopo.def b/Master/texmf-dist/tex/latex/textopo/textopo.def
new file mode 100644
index 00000000000..5034fcf422b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/textopo/textopo.def
@@ -0,0 +1,133 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%% %%%%%
+%%%%% Default parameter settings for the LaTeX ``TeXtopo'' package %%%%%
+%%%%% %%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%% %%%%%
+%%%%% This example file contains all standard settings of the TeXtopo %%%%%
+%%%%% package. It can be used as a template for the creation of perso- %%%%%
+%%%%% nal parameter files. All TeXtopo user commands are allowed and %%%%%
+%%%%% functional when specified here. %%%%%
+%%%%% %%%%%
+%%%%% To activate these settings for your topology plot load this file %%%%%
+%%%%% by naming it as optional parameter at the beginning of the tex- %%%%%
+%%%%% topo environment, e.g. %%%%%
+%%%%% %%%%%
+%%%%% \begin{textopo}[myparameterfile] %%%%%
+%%%%% . %%%%%
+%%%%% . %%%%%
+%%%%% \end{textopo} %%%%%
+%%%%% %%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\Nterm{intra} % Assume N-terminus intracellular
+\loopextent{30} % Set loop extent to 30 residues
+\shadingcolors{blues} % Use color scheme `blues' for shading
+\showmembrane % Show the membrane
+\membranecolors{Black}{White} % as black lines w/o filling
+\labeloutside{extra} % Label extracellular side with `extra'
+\labelinside{intra} % Label intracellular side with `intra'
+\rulethickness{0.5pt} % Set thickness of label rules to 0.5pt
+\countercolor{Red} % Use red color for position counter
+\helixstyle{perspective} % Draw helical wheels in perspective
+\showbonds % Show bonds on helical wheels
+\hidemoment % Do not show hydrophobic moment
+\momentcolor{Lavender} % Lavender color for hydrophobic moment
+\scalemoment{100} % Moment rule length is 100%
+\showwheelnumbering % Show residue numbers on helical wheels
+\scalewheel{100} % Show full size helical wheel
+\symbolsize{medium} % Use medium sized symbols in wheels
+\donotshadestartMet % Do not shade the start methionine
+\showNterm % Show amino terminus as NH2
+\showCterm % Show carboxy terminus as COOH
+
+\setfamily{labels}{sf} % Use sans serif family for labels
+\setseries{labels}{md} % Use normal series for labels
+\setshape {labels}{up} % Use upright shape for labels
+\setfamily{membranelabels}{sf} % Use sans serif for membrane labels
+\setseries{membranelabels}{md} % Use normal series for membrane labels
+\setshape {membranelabels}{up} % Use upright shape for membrane labels
+\setfamily{looplabels}{sf} % Use sans serif for loop labels
+\setseries{looplabels}{bf} % Use bold face for loop labels
+\setshape {looplabels}{up} % Use upright shape for loop labels
+\looplabelcolor{Red} % Set loop label color to `Red'
+\setfamily{TMlabels}{sf} % Use sans serif for TM labels
+\setseries{TMlabels}{bf} % Use bold face for TM labels
+\setshape {TMlabels}{up} % Use upright shape for TM labels
+\TMlabelcolor{Blue} % Set TM label color to `Blue'
+\labelTMs{\Romancount} % Label the TMs with roman numbers
+\setfamily{legend}{sf} % Use sans serif font for legend texts
+\setseries{legend}{md} % Use normal series for legend texts
+\setshape {legend}{up} % Use upright shape for legend texts
+\setsize {legend}{normalsize} % Use normal font size for legends
+\legendcolor{Black} % Set legend text color to `Black'
+\showlegend % Show the legend
+\hidegrid % Do not show the grid
+
+\labelstyle{CONFLICT} % Label style definitions for
+ {diamond}{Black}{Blue}{White} %
+ {Conflicting reports in literatur} % SwissProt data files
+
+\labelstyle{VARIANT} % |
+ {diamond}{Black}{Orange}{Black} % |
+ {Sequence variants} % V
+
+\labelstyle{VARSPLIC} %
+ {diamond}{Black}{Apricot}{Black} %
+ {Splice variants} %
+
+\labelstyle{MUTAGEN} %
+ {diamond}{Black}{Red}{White} %
+ {Mutation sites} %
+
+\labelstyle{SIGNAL} %
+ {square}{Black}{Yellow}{Black} %
+ {Signal peptide} %
+
+\labelstyle{TRANSIT} %
+ {square}{Black}{Green}{Black} %
+ {Transit peptide} %
+
+\labelstyle{PROPEP} %
+ {square}{Black}{Red}{White} %
+ {Propeptide} %
+
+\labelstyle{CHAIN} %
+ {circ}{Black}{Aquamarine}{Blue} %
+ {Polypeptide chain} %
+
+\labelstyle{PEPTIDE} %
+ {circ}{Black}{Peach}{Black} %
+ {Released peptide} %
+
+\labelstyle{DOMAIN} %
+ {circ}{Black}{Turquoise}{Black} %
+ {Domain} %
+
+\labelstyle{CABIND} %
+ {circ}{Black}{Gray50}{White} %
+ {Calcium binding domain} %
+
+\labelstyle{DNABIND} %
+ {circ}{Black}{YellowGreen}{Black} %
+ {DNA binding domain} %
+
+\labelstyle{NPBIND} %
+ {circ}{Black}{Melon}{Black} %
+ {Nucleotide phosphate binding} %
+
+\labelstyle{ZNFING} %
+ {circ}{Black}{Lavender}{Black} %
+ {Zinc finger} %
+
+\labelstyle{SIMILAR} %
+ {circ}{Black}{SpringGreen}{Black} %
+ {Similar region} %
+
+\labelstyle{REPEAT} %
+ {circ}{Black}{Plum}{White} %
+ {Sequence repeat} %
+
+\labelstyle{SITE} %
+ {circ}{Black}{ForestGreen}{White} %
+ {Special site} %
diff --git a/Master/texmf-dist/tex/latex/textopo/textopo.sty b/Master/texmf-dist/tex/latex/textopo/textopo.sty
new file mode 100644
index 00000000000..11e92431b4b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/textopo/textopo.sty
@@ -0,0 +1,7589 @@
+%%
+%% This is file `textopo.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% textopo.dtx (with options: `textpo')
+%%
+%% A LaTeX package for shaded membrane protein topology plots
+%%
+%% Copyright (C) 2000-2005 Eric Beitz
+%% See the file textopo.txt
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{textopo}[2001/03/09 LaTeX TeXtopo (v1.4)]
+\message{Package `textopo', Version 1.4 of 05/02/14.}
+
+\PassOptionsToPackage{dvips}{color}
+\PassOptionsToPackage{dvips}{graphicx}
+\DeclareOption*{%
+ \PassOptionsToPackage{\CurrentOption}{color}%
+ \PassOptionsToPackage{\CurrentOption}{graphicx}%
+}
+\ProcessOptions
+\RequirePackage{color,graphics}
+
+\catcode`\@=11
+
+\expandafter\ifx\csname TeXtopo\endcsname\relax \else \endinput \fi
+
+\newread\structure@file \newwrite\feature@file
+\newread\in@file
+
+\newcount\x@pos
+\newcount\y@pos
+\newcount\x@p@s
+\newcount\y@p@s
+\newcount\x@offset
+\newcount\y@offset
+\newcount\x@min
+\newcount\y@min
+\newcount\x@max
+\newcount\mem@max
+\newcount\y@max
+\newcount\pos@count
+\newcount\pos@@count
+\newcount\loopcount
+\newcount\innerloopcount
+\newcount\iloopcount
+\newcount\temp@count
+\newcount\temp@@count
+\newcount\TM@@count
+\newcount\loop@@count
+\newcount\loop@calc
+\newcount\sincos
+\newcount\wheel@count
+
+\newlength\res@diam
+\newlength\res@@diam
+\newlength\unit@length
+\newlength\hor@offset
+\newlength\temp@length
+\newlength\bond@thickness
+\newlength\scale@factor
+\newlength\vspace@@legend
+\newlength\hspace@@legend
+\newlength\b@rder
+
+\newif\ifanalyze
+\newif\iffr@me
+\newif\ifmembr@ne
+\newif\ifshade
+\newif\ifall@shade
+\newif\ifsimilar@shade
+\newif\ifletter
+\newif\iffuncmode
+\newif\ifloop@label
+\newif\ifloop@series
+\newif\ifloopgo@
+\newif\ifTM@label
+\newif\ifTM@series
+\newif\ifTMgo@
+\newif\iflegend@
+\newif\iflegend@@
+\newif\ifshadelegend@@
+\newif\ifhelix@
+\newif\ifdo@it
+\newif\ifno@start@met
+\newif\ifinsert@
+\newif\ifwheel@numbers
+\newif\ifmu@H
+\newif\if@helix@pers
+\newif\if@net
+
+\def\ampers@nd{&}
+\def\@t{@}
+\def\y@{y}
+\def\n@{n}
+\def\s@{sp}
+\def\intr@{intra}
+\def\down@@{down}
+\def\up@@{up}
+\xdef\@pen{[}
+\xdef\cl@se{]}
+\xdef\br@cket@t{][@]}
+\xdef\st@r{*}
+\xdef\start@label{(}
+\xdef\stop@label{)}
+\def\n@me{Name:}
+\def\he@derend{//}
+\xdef\par@{\expandafter\string\par}
+\xdef\label@num{0}
+\xdef\amp@com@t{&,@}
+\xdef\center@{center}
+
+\expandafter\def\csname Mio-14\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[E;6],%
+2/5[W;6],7/6[E;6],%
+4/10[W;6],9/11[E;6],%
+1/14[W;6],6/15[E;6],%
+3/19[W;6],8/20[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[ESE;6],%
+11/30[E;6],@}
+\expandafter\def\csname Mio-15\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[E;6],%
+2/5[W;6],7/6[E;6],%
+4/10[W;6],9/11[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[E;6],%
+3/19[W;6],8/20[E;6],%
+0/23[W;6],5/24[NNW;6],10/25[ESE;6],%
+11/30[E;6],@}
+\expandafter\def\csname Mio-16\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[E;6],%
+2/5[W;6],7/6[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[E;6],%
+3/19[W;6],8/20[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[ESE;6],%
+11/30[E;6],@}
+\expandafter\def\csname Mio-17\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[E;6],%
+3/19[W;6],8/20[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[ESE;6],%
+11/30[E;6],@}
+\expandafter\def\csname Mio-18\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[E;6],%
+-2/18[W;6],3/19[WNW;12],8/20[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[ESE;6],%
+11/30[E;6],@}
+\expandafter\def\csname Mio-19\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[E;6],%
+2/5[W;6],7/6[WNW;1o],12/7[E;6],%
+4/10[W;6],9/11[WNW;12],14/12[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[E;6],%
+3/19[W;6],8/20[WNW;12],13/21[E;6],%
+5/24[W;6],10/25[NNW;8],15/26[ESE;6],%
+16/31[E;6],@}
+\expandafter\def\csname Mio-20\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[E;6],%
+4/10[W;6],9/11[WNW;12],14/12[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[E;6],%
+3/19[W;6],8/20[WNW;12],13/21[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[ESE;6],%
+16/31[E;6],@}
+\expandafter\def\csname Mio-21\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[ENE;12],14/12[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[E;6],%
+3/19[W;6],8/20[WNW;12],13/21[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[ESE;6],%
+16/31[E;6],@}
+\expandafter\def\csname Mio-22\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[ENE;12],14/12[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[ENE;12],16/17[E;6],%
+3/19[W;6],8/20[WNW;12],13/21[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[ESE;6],%
+16/31[E;6],@}
+\expandafter\def\csname Mio-23\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],%
+4/10[W;6],9/11[WNW;12],14/12[ENE;12],19/13[E;6],%
+6/15[W;6],11/16[WNW;12],16/17[E;6],%
+3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],%
+5/24[W;6],10/25[NNW;8],15/26[NNW;9],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-24\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[SSE;12],20/4[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],%
+4/10[W;6],9/11[WNW;12],14/12[ENE;12],19/13[E;6],%
+6/15[W;6],11/16[WNW;12],16/17[E;6],%
+3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],%
+5/24[W;6],10/25[NNW;8],15/26[NNW;9],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-25\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[W;6],20/4[SSE;12],%
+2/5[E;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],%
+4/10[W;6],9/11[WNW;12],14/12[ENE;12],19/13[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[ENE;12],16/17[E;6],%
+3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],%
+5/24[W;6],10/25[NNW;8],15/26[NNW;9],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-26\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[SSE;12],20/4[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],%
+4/10[W;6],9/11[WNW;12],14/12[ENE;12],19/13[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[ENE;12],16/17[E;6],%
+3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[NNW;12],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-27\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[SSE;12],20/4[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],%
+4/10[W;6],9/11[WNW;12],14/12[ENE;12],19/13[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[WNW;15],16/17[ENE;12],21/18[E;6],%
+3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[NNW;12],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-28\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[SSE;12],20/4[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[WNW;15],14/12[ENE;12],19/13[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[WNW;15],16/17[ENE;12],21/18[E;6],%
+3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[NNW;12],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-29\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[SSE;12],20/4[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],22/9[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[WNW;15],14/12[ENE;12],19/13[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[WNW;15],16/17[ENE;12],21/18[E;6],%
+3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[NNW;12],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-30\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[SSE;12],20/4[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],22/9[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[WNW;15],14/12[ENE;12],19/13[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[WNW;15],16/17[ENE;12],21/18[E;6],%
+3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],23/23[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[NNW;12],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-31\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[SSE;12],20/4[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],22/9[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[WNW;15],14/12[ENE;12],19/13[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[WNW;15],16/17[ENE;12],21/18[E;6],%
+-2/18[W;6],3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],23/23[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[NNW;12],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-32\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[SSE;12],20/4[E;6],%
+2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],22/9[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[WNW;15],14/12[ENE;12],19/13[E;6],24/14[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[WNW;15],16/17[ENE;12],21/18[E;6],%
+-2/18[W;6],3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],23/23[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[NNW;12],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-33\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[SSE;12],20/4[E;6],%
+-3/4[W;6],2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],22/9[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[WNW;15],14/12[ENE;12],19/13[E;6],24/14[E;6],%
+1/14[W;6],6/15[WNW;12],11/16[WNW;15],16/17[ENE;12],21/18[E;6],%
+-2/18[W;6],3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],23/23[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[NNW;12],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-34\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[SSE;12],20/4[E;6],%
+-3/4[W;6],2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],22/9[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[WNW;15],14/12[ENE;12],19/13[E;6],24/14[E;6],%
+-4/13[W;6],1/14[W;6],6/15[WNW;12],11/16[WNW;15],16/17[ENE;12],21/18[E;6],%
+-2/18[W;6],3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],23/23[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[NNW;12],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-35\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[SSE;12],20/4[E;6],25/5[E;6],%
+-3/4[W;6],2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],22/9[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[WNW;15],14/12[ENE;12],19/13[E;6],24/14[E;6],%
+-4/13[W;6],1/14[W;6],6/15[WNW;12],11/16[WNW;15],16/17[ENE;12],21/18[E;6],%
+-2/18[W;6],3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],23/23[E;6],%
+0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[NNW;12],20/27[ESE;6],%
+21/32[E;6],@}
+\expandafter\def\csname Mio-36\endcsname{%
+0/0[W;6],5/1[SSE;8],10/2[SSE;9],15/3[SSE;12],20/4[E;6],20/4[E;6],%
+-3/4[W;6],2/5[W;6],7/6[WNW;12],12/7[ENE;12],17/8[E;6],22/9[E;6],%
+-1/9[W;6],4/10[WNW;12],9/11[WNW;15],14/12[ENE;12],19/13[E;6],24/14[E;6],%
+-4/13[W;6],1/14[W;6],6/15[WNW;12],11/16[WNW;15],16/17[ENE;12],21/18[E;6],%
+-2/18[W;6],3/19[W;6],8/20[WNW;12],13/21[ENE;12],18/22[E;6],23/23[E;6],%
+-5/22[W;6],0/23[W;6],5/24[NNW;8],10/25[NNW;9],15/26[NNW;12],20/27[ESE;6],%
+21/32[E;6],@}
+
+\expandafter\def\csname Moi-14\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[E;6],%
+-4/-5[W;6],-9/-6[E;6],%
+-6/-10[W;6],-11/-11[E;6],%
+-3/-14[W;6],-8/-15[E;6],%
+-5/-19[W;6],-10/-20[E;6],%
+-2/-23[W;6],-7/-24[SSW;6],-12/-25[E;6],%
+-13/-30[E;6],@}
+\expandafter\def\csname Moi-15\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[E;6],%
+-4/-5[W;6],-9/-6[E;6],%
+-6/-10[W;6],-11/-11[E;6],%
+-3/-14[W;6],-8/-15[ESE;12],-13/-16[E;6],%
+-5/-19[W;6],-10/-20[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[E;6],%
+-13/-30[E;6],@}
+\expandafter\def\csname Moi-16\endcsname{%
+-2/0[W;6],-7/-1[NNW;8],-12/-2[E;6],%
+-4/-5[W;6],-9/-6[E;6],%
+-1/-9[W;6],-6/-10[ESE;12],-11/-11[E;6],%
+-3/-14[W;6],-8/-15[ESE;12],-13/-16[E;6],%
+-5/-19[W;6],-10/-20[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[E;6],%
+-13/-30[E;6],@}
+\expandafter\def\csname Moi-17\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[E;6],%
+-4/-5[W;6],-9/-6[ESE;12],-14/-7[E;6],%
+-1/-9[W;6],-6/-10[ESE;12],-11/-11[E;6],%
+-3/-14[W;6],-8/-15[ESE;12],-13/-16[E;6],%
+-5/-19[W;6],-10/-20[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[E;6],%
+-13/-30[E;6],@}
+\expandafter\def\csname Moi-18\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[E;6],%
+-4/-5[W;6],-9/-6[ESE;12],-14/-7[E;6],%
+-1/-9[W;6],-6/-10[ESE;12],-11/-11[E;6],%
+-3/-14[W;6],-8/-15[ESE;12],-13/-16[E;6],%
+0/-18[W;6],-5/-19[ESE;12],-10/-20[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[E;6],%
+-13/-30[E;6],@}
+\expandafter\def\csname Moi-19\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[E;6],%
+-4/-5[W;6],-9/-6[ESE;12],-14/-7[E;6],%
+-6/-10[W;6],-11/-11[ESE;12],-16/-12[E;6],%
+-3/-14[W;6],-8/-15[ESE;12],-13/-16[E;6],%
+-5/-19[W;6],-10/-20[ESE;12],-15/-21[5;6],%
+-7/-24[W;6],-12/-25[SSW;8],-17/-26[E;6],%
+-18/-31[E;6],@}
+\expandafter\def\csname Moi-20\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[E;6],%
+-4/-5[W;6],-9/-6[ESE;12],-14/-7[E;6],%
+-6/-10[W;6],-11/-11[ESE;12],-16/-12[E;6],%
+-3/-14[W;6],-8/-15[ESE;12],-13/-16[E;6],%
+-5/-19[W;6],-10/-20[ESE;12],-15/-21[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[E;6],%
+-18/-31[E;6],@}
+\expandafter\def\csname Moi-21\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[E;6],%
+-4/-5[W;6],-9/-6[ESE;12],-14/-7[E;6],%
+-1/-9[W;6],-6/-10[WSW;12],-11/-11[ESE;12],-16/-12[E;6],%
+-3/-14[W;6],-8/-15[ESE;12],-13/-16[E;6],%
+-5/-19[W;6],-10/-20[ESE;12],-15/-21[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[E;6],%
+-18/-31[E;6],@}
+\expandafter\def\csname Moi-22\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[E;6],%
+-4/-5[W;6],-9/-6[ESE;12],-14/-7[E;6],%
+-1/-9[W;6],-6/-10[WSW;12],-11/-11[ESE;12],-16/-12[E;6],%
+-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;12],-18/-17[E;6],%
+-5/-19[W;6],-10/-20[ESE;12],-15/-21[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[E;6],%
+-18/-31[E;6],@}
+\expandafter\def\csname Moi-23\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[E;6],%
+-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],%
+-6/-10[W;6],-11/-11[WSW;12],-16/-12[ESE;12],-21/-13[E;6],%
+-8/-15[W;6],-13/-16[ESE;12],-18/-17[E;6],%
+-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],%
+-7/-24[W;6],-12/-25[SSW;8],-17/-26[SSW;9],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-24\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],%
+-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],%
+-6/-10[W;6],-11/-11[WSW;12],-16/-12[ESE;12],-21/-13[E;6],%
+-8/-15[W;6],-13/-16[ESE;12],-18/-17[E;6],%
+-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],%
+-7/-24[W;6],-12/-25[SSW;8],-17/-26[SSW;9],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-25\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],%
+-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],%
+-6/-10[W;6],-11/-11[WSW;12],-16/-12[ESE;12],-21/-13[E;6],%
+-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;12],-18/-17[E;6],%
+-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],%
+-7/-24[W;6],-12/-25[SSW;8],-17/-26[SSW;9],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-26\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],%
+-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],%
+-6/-10[W;6],-11/-11[WSW;12],-16/-12[ESE;12],-21/-13[E;6],%
+-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;12],-18/-17[E;6],%
+-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[SSW;12],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-27\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],%
+-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],%
+-6/-10[W;6],-11/-11[WSW;12],-16/-12[ESE;12],-21/-13[E;6],%
+-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;15],-18/-17[ESE;12],-23/-18[E;6],%
+-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[SSW;12],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-28\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],%
+-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],%
+-1/-9[W;6],-6/-10[WSW;12],-11/-11[ESE;15],-16/-12[ESE;12],-21/-13[E;6],%
+-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;15],-18/-17[ESE;12],-23/-18[E;6],%
+-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[SSW;12],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-29\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],%
+-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],-24/-9[E;6],%
+-1/-9[W;6],-6/-10[WSW;12],-11/-11[ESE;15],-16/-12[ESE;12],-21/-13[E;6],%
+-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;15],-18/-17[ESE;12],-23/-18[E;6],%
+-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[SSW;12],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-30\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],%
+-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],-24/-9[E;6],%
+-1/-9[W;6],-6/-10[WSW;12],-11/-11[ESE;15],-16/-12[ESE;12],-21/-13[E;6],%
+-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;15],-18/-17[ESE;12],-23/-18[E;6],%
+-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],-25/-23[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[SSW;12],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-31\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],%
+-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],-24/-9[E;6],%
+-1/-9[W;6],-6/-10[WSW;12],-11/-11[ESE;15],-16/-12[ESE;12],-21/-13[E;6],-26/-14[E;6],%
+-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;15],-18/-17[ESE;12],-23/-18[E;6],%
+-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],-25/-23[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[SSW;12],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-32\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],%
+-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],-24/-9[E;6],%
+-1/-9[W;6],-6/-10[WSW;12],-11/-11[ESE;15],-16/-12[ESE;12],-21/-13[E;6],-26/-14[E;6],%
+-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;15],-18/-17[ESE;12],-23/-18[E;6],%
+0/-18[W;6],-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],-25/-23[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[SSW;12],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-33\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],%
+-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],-24/-9[E;6],%
+-1/-9[W;6],-6/-10[WSW;12],-11/-11[ESE;15],-16/-12[ESE;12],-21/-13[E;6],-26/-14[E;6],%
+2/-13[W;6],-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;15],-18/-17[ESE;12],-23/-18[E;6],%
+0/-18[W;6],-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],-25/-23[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[SSW;12],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-34\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],%
+1/-4[W;6],-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],-24/-9[E;6],%
+-1/-9[W;6],-6/-10[WSW;12],-11/-11[ESE;15],-16/-12[ESE;12],-21/-13[E;6],-26/-14[E;6],%
+2/-13[W;6],-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;15],-18/-17[ESE;12],-23/-18[E;6],%
+0/-18[W;6],-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],-25/-23[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[SSW;12],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-35\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],-27/-5[E;6],%
+1/-4[W;6],-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],-24/-9[E;6],%
+-1/-9[W;6],-6/-10[WSW;12],-11/-11[ESE;15],-16/-12[ESE;12],-21/-13[E;6],-26/-14[E;6],%
+2/-13[W;6],-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;15],-18/-17[ESE;12],-23/-18[E;6],%
+0/-18[W;6],-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],-25/-23[E;6],%
+-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[SSW;12],-22/-27[E;6],%
+-23/-32[E;6],@}
+\expandafter\def\csname Moi-36\endcsname{%
+-2/0[W;6],-7/-1[NNE;8],-12/-2[NNE;9],-17/-3[NNE;12],-22/-4[E;6],-27/-5[E;6],%
+1/-4[W;6],-4/-5[W;6],-9/-6[WSW;12],-14/-7[ESE;12],-19/-8[E;6],-24/-9[E;6],%
+-1/-9[W;6],-6/-10[WSW;12],-11/-11[ESE;15],-16/-12[ESE;12],-21/-13[E;6],-26/-14[E;6],%
+2/-13[W;6],-3/-14[W;6],-8/-15[WSW;12],-13/-16[ESE;15],-18/-17[ESE;12],-23/-18[E;6],%
+0/-18[W;6],-5/-19[W;6],-10/-20[WSW;12],-15/-21[ESE;12],-20/-22[E;6],-25/-23[E;6],%
+3/-22[W;6],-2/-23[W;6],-7/-24[SSW;8],-12/-25[SSW;9],-17/-26[SSW;12],-22/-27[E;6],%
+-23/-32[E;6],@}
+
+\expandafter\def\csname oloop-1\endcsname{2/-1[N;6],5/-5[NE;6],@}
+\expandafter\def\csname oloop-2\endcsname{2/-1[NW;6],7/-1[NE;6],10/-5[NE;6],@}
+\expandafter\def\csname oloop-3\endcsname{0/0[NW;6],4/3[N;6],8/0[NE;6],9/-5[ENE;6],@}
+\expandafter\def\csname oloop-4\endcsname{0/0[NW;6],3/4[NNW;6],8/4[NNE;6],11/0[NE;6],12/-5[W;6],@}
+\expandafter\def\csname oloop-5\endcsname{0/0[WNW;6],2/5[NW;6],6/8[N;6],10/5[NE;6],12/0[ENE;6],13/-5[W;6],@}
+\expandafter\def\csname oloop-6\endcsname{-1/0[NW;6],0/5[NW;6],3/9[NNW;6],%
+8/9[NNE;6],11/5[NE;6],12/0[NE;6],12/-5[W;6],@}
+\expandafter\def\csname oloop-7\endcsname{-1/0[WNW;6],0/5[NW;6],2/10[NW;6],6/13[NW;6],%
+10/10[N;6],12/5[NE;6],13/0[ENE;6],13/-5[W;6],@}
+
+\expandafter\def\csname iloop-1\endcsname{2/1[S;6],5/5[W;6],@}
+\expandafter\def\csname iloop-2\endcsname{2/1[SW;6],7/1[SE;6],10/5[W;6],@}
+\expandafter\def\csname iloop-3\endcsname{0/0[SW;6],4/-3[S;6],8/0[SE;6],9/5[W;6],@}
+\expandafter\def\csname iloop-4\endcsname{0/0[SW;6],3/-4[SSW;6],8/-4[SSE;6],11/0[SE;6],12/5[W;6],@}
+\expandafter\def\csname iloop-5\endcsname{0/0[WSW;6],2/-5[SW;6],6/-8[S;6],10/-5[SE;6],12/0[ESE;6],13/5[W;6],@}
+\expandafter\def\csname iloop-6\endcsname{-1/0[SW;6],0/-5[SW;6],3/-9[SSW;6],%
+8/-9[SSE;6],11/-5[SE;6],12/0[SE;6],12/5[W;6],@}
+\expandafter\def\csname iloop-7\endcsname{-1/0[WSW;6],0/-5[SW;6],2/-10[S;6],6/-13[S;6],%
+10/-10[SE;6],12/-5[SE;6],13/0[ESE;6],13/5[W;6],@}
+
+\expandafter\def\csname iTMloop-1\endcsname{17/3[S;6],27/5[W;6],@}
+\expandafter\def\csname iTMloop-2\endcsname{14/2[SW;6],21/2[SE;6],27/5[W;6],@}
+\expandafter\def\csname iTMloop-3\endcsname{13/2[SW;6],18/0[S;6],23/1[SE;6],%
+27/5[W;6],@}
+\expandafter\def\csname iTMloop-4\endcsname{8/1[SW;6],13/0[SSW;6],18/0[SSE;6],%
+23/1[SE;6],27/5[W;6],@}
+\expandafter\def\csname iTMloop-5\endcsname{5/1[WSW;6],10/-1[SW;6],15/-2[S;6],%
+20/-1[SE;6],25/1[ESE;6],28/5[W;6],@}
+\expandafter\def\csname iTMloop-6\endcsname{2/1[SW;6],6/-2[SW;6],11/-3[SSW;6],%
+16/-3[SSE;6],21/-2[SE;6],25/1[SE;6],28/5[W;6],@}
+\expandafter\def\csname iTMloop-7\endcsname{0/0[WSW;6],3/-4[SW;6],8/-6[S;6],13/-7[S;6],%
+18/-6[SE;6],23/-4[SE;6],26/0[ESE;6],27/5[W;6],@}
+
+\expandafter\def\csname oTMloop-1\endcsname{9/-2[N;6],27/-5[NE;6],@}
+\expandafter\def\csname oTMloop-2\endcsname{6/-2[NW;6],13/-2[NE;6],27/-5[NE;6],@}
+\expandafter\def\csname oTMloop-3\endcsname{4/-2[NW;6],9/0[N;6],14/-2[NE;6],%
+28/-5[ENE;6],@}
+\expandafter\def\csname oTMloop-4\endcsname{3/-1[NW;6],8/0[NNW;6],13/0[NNE;6],%
+18/-2[NE;6],28/-5[W;6],@}
+\expandafter\def\csname oTMloop-5\endcsname{3/-1[WNW;6],8/1[NW;6],13/2[N;6],%
+18/1[NE;6],23/-1[ENE;6],28/-5[W;6],@}
+\expandafter\def\csname oTMloop-6\endcsname{2/-1[NW;6],6/2[NW;6],11/3[NNW;6],%
+16/3[NNE;6],21/2[NE;6],25/-1[NE;6],28/-5[W;6],@}
+\expandafter\def\csname oTMloop-7\endcsname{0/0[WNW;6],3/4[NW;6],8/6[NW;6],13/7[NW;6],%
+18/6[N;6],23/4[NE;6],26/0[ENE;6],27/-5[W;6],@}
+
+\expandafter\def\csname iNterm-1\endcsname{0/0[SSE;6],1/5[W;6],@}
+\expandafter\def\csname iNterm-2\endcsname{0/0[SSE;6],3/4[SE;6],4/9[W;6],@}
+\expandafter\def\csname iNterm-3\endcsname{0/0[SSE;6],4/3[SE;6],6/8[ESE;6],7/13[W;6],@}
+
+\expandafter\def\csname oNterm-1\endcsname{0/0[NNE;6],1/-5[W;6],@}
+\expandafter\def\csname oNterm-2\endcsname{0/0[NNE;6],3/-4[NE;6],4/-9[W;6],@}
+\expandafter\def\csname oNterm-3\endcsname{0/0[NNE;6],4/-3[NE;6],6/-8[ENE;6],7/-13[W;6],@}
+
+\expandafter\def\csname iCterm-1\endcsname{0/0[SSW;6],4/-3[W;6],@}
+\expandafter\def\csname iCterm-2\endcsname{0/0[SW;6],3/-4[SSW;6],7/-7[W;6],@}
+\expandafter\def\csname iCterm-3\endcsname{0/0[WSW;6],2/-5[SW;6],6/-8[SSW;6],10/-11[W;6],@}
+
+\expandafter\def\csname oCterm-1\endcsname{0/0[NNW;6],4/3[W;6],@}
+\expandafter\def\csname oCterm-2\endcsname{0/0[NW;6],3/4[NNW;6],7/7[W;6],@}
+\expandafter\def\csname oCterm-3\endcsname{0/0[WNW;6],2/5[NW;6],6/8[NNW;6],10/11[W;6],@}
+
+\expandafter\def\csname ohalf-1\endcsname{3/2[N;6],7/5[W;6],@}
+\expandafter\def\csname ohalf-2\endcsname{2/1[NNW;6],7/1[NNE;6],10/5[W;6],@}
+\expandafter\def\csname ohalf-3\endcsname{0/0[NNW;6],4/-3[N;6],8/0[NNE;6],9/5[W;6],@}
+\expandafter\def\csname ohalf-4\endcsname{0/0[NW;6],3/-4[NNW;6],8/-4[NNE;6],11/0[NE;6],12/5[W;6],@}
+\expandafter\def\csname ohalf-5\endcsname{0/0[NW;6],2/-5[NNW;6],6/-8[N;6],%
+10/-5[NNE;6],12/0[NE;6],13/5[W;6],@}
+\expandafter\def\csname ohalf-6\endcsname{-1/0[WNW;6],0/-5[NW;6],3/-9[NNW;6],8/-9[NNE;6],11/-5[NE;6],12/0[ENE;6],12/5[W;6],@}
+
+\expandafter\def\csname ihalf-1\endcsname{3/-2[S;6],7/-5[W;6],@}
+\expandafter\def\csname ihalf-2\endcsname{2/-1[SSW;6],7/-1[SSE;6],10/-5[W;6],@}
+\expandafter\def\csname ihalf-3\endcsname{0/-0[SSW;6],4/3[S;6],8/0[SSE;6],9/-5[W;6],@}
+\expandafter\def\csname ihalf-4\endcsname{0/0[SW;6],3/4[SSW;6],8/4[SSE;6],11/0[SE;6],12/-5[W;6],@}
+\expandafter\def\csname ihalf-5\endcsname{0/0[SW;6],2/5[SSW;6],6/8[S;6],%
+10/5[SSE;6],12/0[SE;6],13/-5[W;6],@}
+\expandafter\def\csname ihalf-6\endcsname{-1/0[WSW;6],0/5[SW;6],3/9[SSW;6],8/9[SSE;6],11/5[SE;6],12/0[ESE;6],12/-5[W;6],@}
+
+\expandafter\xdef\csname H@R\endcsname{-25300}
+\expandafter\xdef\csname H@K\endcsname{-15000}
+\expandafter\xdef\csname H@D\endcsname{-9000}
+\expandafter\xdef\csname H@Q\endcsname{-8500}
+\expandafter\xdef\csname H@N\endcsname{-7800}
+\expandafter\xdef\csname H@E\endcsname{-7400}
+\expandafter\xdef\csname H@H\endcsname{-4000}
+\expandafter\xdef\csname H@S\endcsname{-1800}
+\expandafter\xdef\csname H@T\endcsname{-500}
+\expandafter\xdef\csname H@P\endcsname{1200}
+\expandafter\xdef\csname H@Y\endcsname{2600}
+\expandafter\xdef\csname H@C\endcsname{2900}
+\expandafter\xdef\csname H@G\endcsname{4800}
+\expandafter\xdef\csname H@A\endcsname{6200}
+\expandafter\xdef\csname H@M\endcsname{6400}
+\expandafter\xdef\csname H@W\endcsname{8100}
+\expandafter\xdef\csname H@L\endcsname{10600}
+\expandafter\xdef\csname H@V\endcsname{10800}
+\expandafter\xdef\csname H@F\endcsname{11900}
+\expandafter\xdef\csname H@I\endcsname{13800}
+
+\def\directE{0} \def\cosE{10000} \def\sinE{0}
+\def\directENE{22.5} \def\cosENE{9239} \def\sinENE{3827}
+\def\directNE{45} \def\cosNE{7071} \def\sinNE{7071}
+\def\directNNE{67.5} \def\cosNNE{3827} \def\sinNNE{9239}
+\def\directN{90} \def\cosN{0} \def\sinN{10000}
+\def\directNNW{112.5} \def\cosNNW{-3827} \def\sinNNW{9239}
+\def\directNW{135} \def\cosNW{-7071} \def\sinNW{7071}
+\def\directWNW{157.5} \def\cosWNW{-9239} \def\sinWNW{3827}
+\def\directW{180} \def\cosW{-10000} \def\sinW{0}
+\def\directWSW{202.5} \def\cosWSW{-9239} \def\sinWSW{-3827}
+\def\directSW{225} \def\cosSW{-7071} \def\sinSW{-7071}
+\def\directSSW{247.5} \def\cosSSW{-3827} \def\sinSSW{-9239}
+\def\directS{270} \def\cosS{0} \def\sinS{-10000}
+\def\directSSE{292.5} \def\cosSSE{3827} \def\sinSSE{-9239}
+\def\directSE{315} \def\cosSE{7071} \def\sinSE{-7071}
+\def\directESE{337.5} \def\cosESE{9239} \def\sinESE{-3827}
+
+\definecolor{GreenYellow} {cmyk}{0.15,0,0.69,0}
+\definecolor{Yellow} {cmyk}{0,0,1,0}
+\definecolor{Goldenrod} {cmyk}{0,0.10,0.84,0}
+\definecolor{Dandelion} {cmyk}{0,0.29,0.84,0}
+\definecolor{Apricot} {cmyk}{0,0.32,0.52,0}
+\definecolor{Peach} {cmyk}{0,0.50,0.70,0}
+\definecolor{Melon} {cmyk}{0,0.46,0.50,0}
+\definecolor{YellowOrange} {cmyk}{0,0.42,1,0}
+\definecolor{Orange} {cmyk}{0,0.61,0.87,0}
+\definecolor{BurntOrange} {cmyk}{0,0.51,1,0}
+\definecolor{Bittersweet} {cmyk}{0,0.75,1,0.24}
+\definecolor{RedOrange} {cmyk}{0,0.77,0.87,0}
+\definecolor{Mahagony} {cmyk}{0,0.85,0.87,0.35}
+\definecolor{Maroon} {cmyk}{0,0.87,0.68,0.32}
+\definecolor{BrickRed} {cmyk}{0,0.89,0.94,0.28}
+\definecolor{Red} {cmyk}{0,1,1,0}
+\definecolor{OrangeRed} {cmyk}{0,1,0.50,0}
+\definecolor{RubineRed} {cmyk}{0,1,0.13,0}
+\definecolor{WildStrawberry}{cmyk}{0,0.96,0.39,0}
+\definecolor{Salmon} {cmyk}{0,0.53,0.38,0}
+\definecolor{CarnationPink} {cmyk}{0,0.63,0,0}
+\definecolor{Magenta} {cmyk}{0,1,0,0}
+\definecolor{VioletRed} {cmyk}{0,0.81,0,0}
+\definecolor{Rhodamine} {cmyk}{0,0.82,0,0}
+\definecolor{Mulberry} {cmyk}{0.34,0.90,0,0.02}
+\definecolor{RedViolet} {cmyk}{0.07,0.90,0,0.34}
+\definecolor{Fuchsia} {cmyk}{0.47,0.91,0,0.08}
+\definecolor{Lavender} {cmyk}{0,0.48,0,0}
+\definecolor{Thistle} {cmyk}{0.12,0.59,0,0}
+\definecolor{Orchid} {cmyk}{0.32,0.64,0,0}
+\definecolor{DarkOrchid} {cmyk}{0.40,0.80,0.20,0}
+\definecolor{Purple} {cmyk}{0.45,0.86,0,0}
+\definecolor{Plum} {cmyk}{0.50,1,0,0}
+\definecolor{Violet} {cmyk}{0.79,0.88,0,0}
+\definecolor{RoyalPurple} {cmyk}{0.75,0.90,0,0}
+\definecolor{BlueViolet} {cmyk}{0.86,0.91,0,0.04}
+\definecolor{Periwinkle} {cmyk}{0.57,0.55,0,0}
+\definecolor{CadetBlue} {cmyk}{0.62,0.57,0.23,0}
+\definecolor{CornflowerBlue}{cmyk}{0.65,0.13,0,0}
+\definecolor{MidnightBlue} {cmyk}{0.98,0.13,0,0.43}
+\definecolor{NavyBlue} {cmyk}{0.94,0.54,0,0}
+\definecolor{RoyalBlue} {cmyk}{1,0.50,0,0}
+\definecolor{Blue} {cmyk}{1,1,0,0}
+\definecolor{Cerulean} {cmyk}{0.94,0.11,0,0}
+\definecolor{Cyan} {cmyk}{1,0,0,0}
+\definecolor{ProcessBlue} {cmyk}{0.96,0,0,0}
+\definecolor{SkyBlue} {cmyk}{0.62,0,0.12,0}
+\definecolor{Turquoise} {cmyk}{0.85,0,0.20,0}
+\definecolor{TealBlue} {cmyk}{0.86,0,0.34,0.02}
+\definecolor{Aquamarine} {cmyk}{0.82,0,0.30,0}
+\definecolor{BlueGreen} {cmyk}{0.85,0,0.33,0}
+\definecolor{Emerald} {cmyk}{1,0,0.50,0}
+\definecolor{JungleGreen} {cmyk}{0.99,0,0.52,0}
+\definecolor{SeaGreen} {cmyk}{0.69,0,0.50,0}
+\definecolor{Green} {cmyk}{1,0,1,0}
+\definecolor{ForestGreen} {cmyk}{0.91,0,0.88,0.12}
+\definecolor{PineGreen} {cmyk}{0.92,0,0.59,0.25}
+\definecolor{LimeGreen} {cmyk}{0.50,0,1,0}
+\definecolor{YellowGreen} {cmyk}{0.44,0,0.74,0}
+\definecolor{SpringGreen} {cmyk}{0.26,0,0.76,0}
+\definecolor{OliveGreen} {cmyk}{0.64,0,0.95,0.40}
+\definecolor{RawSienna} {cmyk}{0,0.72,1,0.45}
+\definecolor{Sepia} {cmyk}{0,0.83,1,0.70}
+\definecolor{Brown} {cmyk}{0,0.81,1,0.60}
+\definecolor{Tan} {cmyk}{0.14,0.42,0.56,0}
+\definecolor{White} {cmyk}{0,0,0,0}
+\definecolor{Gray0} {cmyk}{0,0,0,0}
+\definecolor{Gray5} {cmyk}{0,0,0,0.05}
+\definecolor{Gray10} {cmyk}{0,0,0,0.10}
+\definecolor{Gray15} {cmyk}{0,0,0,0.15}
+\definecolor{Gray20} {cmyk}{0,0,0,0.20}
+\definecolor{Gray25} {cmyk}{0,0,0,0.25}
+\definecolor{Gray30} {cmyk}{0,0,0,0.30}
+\definecolor{LightGray} {cmyk}{0,0,0,0.33}
+\definecolor{Gray35} {cmyk}{0,0,0,0.35}
+\definecolor{Gray40} {cmyk}{0,0,0,0.40}
+\definecolor{Gray45} {cmyk}{0,0,0,0.45}
+\definecolor{Gray50} {cmyk}{0,0,0,0.50}
+\definecolor{Gray} {cmyk}{0,0,0,0.50}
+\definecolor{Gray55} {cmyk}{0,0,0,0.55}
+\definecolor{Gray60} {cmyk}{0,0,0,0.60}
+\definecolor{Gray65} {cmyk}{0,0,0,0.65}
+\definecolor{DarkGray} {cmyk}{0,0,0,0.66}
+\definecolor{Gray70} {cmyk}{0,0,0,0.70}
+\definecolor{Gray75} {cmyk}{0,0,0,0.75}
+\definecolor{Gray80} {cmyk}{0,0,0,0.80}
+\definecolor{Gray85} {cmyk}{0,0,0,0.85}
+\definecolor{Gray90} {cmyk}{0,0,0,0.90}
+\definecolor{Gray95} {cmyk}{0,0,0,0.95}
+\definecolor{Black} {cmyk}{0,0,0,1}
+\definecolor{Gray100} {cmyk}{0,0,0,1}
+\definecolor{LightGreenYellow} {cmyk}{0.08,0,0.35,0}
+\definecolor{LightYellow} {cmyk}{0,0,0.50,0}
+\definecolor{LightGoldenrod} {cmyk}{0,0.05,0.42,0}
+\definecolor{LightDandelion} {cmyk}{0,0.15,0.42,0}
+\definecolor{LightApricot} {cmyk}{0,0.16,0.26,0}
+\definecolor{LightPeach} {cmyk}{0,0.25,0.35,0}
+\definecolor{LightMelon} {cmyk}{0,0.23,0.25,0}
+\definecolor{LightYellowOrange} {cmyk}{0,0.21,0.50,0}
+\definecolor{LightOrange} {cmyk}{0,0.31,0.44,0}
+\definecolor{LightBurntOrange} {cmyk}{0,0.26,0.50,0}
+\definecolor{LightBittersweet} {cmyk}{0,0.38,0.50,0.12}
+\definecolor{LightRedOrange} {cmyk}{0,0.39,0.44,0}
+\definecolor{LightMahagony} {cmyk}{0,0.43,0.44,0.18}
+\definecolor{LightMaroon} {cmyk}{0,0.44,0.34,0.16}
+\definecolor{LightBrickRed} {cmyk}{0,0.45,0.47,0.14}
+\definecolor{LightRed} {cmyk}{0,0.50,0.50,0}
+\definecolor{LightOrangeRed} {cmyk}{0,0.50,0.25,0}
+\definecolor{LightRubineRed} {cmyk}{0,0.50,0.07,0}
+\definecolor{LightWildStrawberry}{cmyk}{0,0.48,0.20,0}
+\definecolor{LightSalmon} {cmyk}{0,0.27,0.19,0}
+\definecolor{LightCarnationPink} {cmyk}{0,0.32,0,0}
+\definecolor{LightMagenta} {cmyk}{0,0.50,0,0}
+\definecolor{LightVioletRed} {cmyk}{0,0.40,0,0}
+\definecolor{LightRhodamine} {cmyk}{0,0.41,0,0}
+\definecolor{LightMulberry} {cmyk}{0.17,0.45,0,0.01}
+\definecolor{LightRedViolet} {cmyk}{0.04,0.45,0,0.17}
+\definecolor{LightFuchsia} {cmyk}{0.24,0.46,0,0.04}
+\definecolor{LightLavender} {cmyk}{0,0.24,0,0}
+\definecolor{LightThistle} {cmyk}{0.06,0.30,0,0}
+\definecolor{LightOrchid} {cmyk}{0.16,0.32,0,0}
+\definecolor{LightDarkOrchid} {cmyk}{0.20,0.40,0.10,0}
+\definecolor{LightPurple} {cmyk}{0.23,0.43,0,0}
+\definecolor{LightPlum} {cmyk}{0.25,0.50,0,0}
+\definecolor{LightViolet} {cmyk}{0.40,0.44,0,0}
+\definecolor{LightRoyalPurple} {cmyk}{0.38,0.45,0,0}
+\definecolor{LightBlueViolet} {cmyk}{0.43,0.46,0,0.02}
+\definecolor{LightPeriwinkle} {cmyk}{0.29,0.28,0,0}
+\definecolor{LightCadetBlue} {cmyk}{0.31,0.29,0.12,0}
+\definecolor{LightCornflowerBlue}{cmyk}{0.33,0.07,0,0}
+\definecolor{LightMidnightBlue} {cmyk}{0.49,0.07,0,0.22}
+\definecolor{LightNavyBlue} {cmyk}{0.47,0.27,0,0}
+\definecolor{LightRoyalBlue} {cmyk}{0.50,0.25,0,0}
+\definecolor{LightBlue} {cmyk}{0.50,0.50,0,0}
+\definecolor{LightCerulean} {cmyk}{0.47,0.06,0,0}
+\definecolor{LightCyan} {cmyk}{0.50,0,0,0}
+\definecolor{LightProcessBlue} {cmyk}{0.48,0,0,0}
+\definecolor{LightSkyBlue} {cmyk}{0.31,0,0.06,0}
+\definecolor{LightTurquoise} {cmyk}{0.43,0,0.10,0}
+\definecolor{LightTealBlue} {cmyk}{0.43,0,0.17,0.01}
+\definecolor{LightAquamarine} {cmyk}{0.41,0,0.15,0}
+\definecolor{LightBlueGreen} {cmyk}{0.43,0,0.17,0}
+\definecolor{LightEmerald} {cmyk}{0.50,0,0.25,0}
+\definecolor{LightJungleGreen} {cmyk}{0.50,0,0.26,0}
+\definecolor{LightSeaGreen} {cmyk}{0.35,0,0.25,0}
+\definecolor{LightGreen} {cmyk}{0.50,0,0.50,0}
+\definecolor{LightForestGreen} {cmyk}{0.46,0,0.44,0.06}
+\definecolor{LightPineGreen} {cmyk}{0.46,0,0.30,0.13}
+\definecolor{LightLimeGreen} {cmyk}{0.25,0,0.50,0}
+\definecolor{LightYellowGreen} {cmyk}{0.22,0,0.37,0}
+\definecolor{LightSpringGreen} {cmyk}{0.13,0,0.38,0}
+\definecolor{LightOliveGreen} {cmyk}{0.32,0,0.48,0.20}
+\definecolor{LightRawSienna} {cmyk}{0,0.36,0.50,0.23}
+\definecolor{LightSepia} {cmyk}{0,0.44,0.50,0.35}
+\definecolor{LightBrown} {cmyk}{0,0.41,0.50,0.30}
+\definecolor{LightTan} {cmyk}{0.07,0.21,0.28,0}
+
+\def\rotopo#1{%
+ \Grot@setangle{#1}%
+ \setbox\z@\hbox\bgroup\ignorespaces}
+\def\endrotopo{%
+ \unskip\egroup
+ \Grot@x\z@
+ \Grot@y\z@
+ \wd0\z@\dp0\z@\ht0\z@
+ \Grot@box
+}
+
+\def\load@fonts{%
+ \setlength\temp@length{\textwidth}
+ \ifnum\fix@length>10
+ \divide\temp@length by \x@max
+ \loopcount=\x@max
+ \advance\loopcount by -20
+ \multiply\temp@length by \loopcount
+ \divide\temp@length by \x@max
+ \ifdim\temp@length<0.92398pt \loopcount=0
+ \else
+ \ifdim\temp@length<1.10878pt \loopcount=1
+ \else
+ \ifdim\temp@length<1.33054pt \loopcount=2
+ \else
+ \ifdim\temp@length<1.59695pt \loopcount=3
+ \else
+ \loopcount=4
+ \fi\fi\fi\fi
+ \ifnum\change@length=0
+ \else
+ \advance\loopcount by \change@length\relax
+ \ifnum\loopcount<0 \loopcount=0 \fi
+ \ifnum\loopcount>10\loopcount=10\fi
+ \fi
+ \xdef\fix@length{\the\loopcount}
+ \fi
+ \ifcase\fix@length
+ \setlength\temp@length{0.9pt}
+ \or \setlength\temp@length{1.1pt}
+ \or \setlength\temp@length{1.3pt}
+ \or \setlength\temp@length{1.7pt}
+ \or \setlength\temp@length{1.9pt}
+ \or \setlength\temp@length{2.4pt}
+ \or \setlength\temp@length{2.9pt}
+ \or \setlength\temp@length{3.4pt}
+ \or \setlength\temp@length{3.9pt}
+ \or \setlength\temp@length{4.1pt}
+ \or \setlength\temp@length{4.8pt}
+ \else
+ \fi
+ \ifdim\temp@length<0.92398pt
+ \xdef\font@num{A}
+ \newfont{\bsymA}{cmsy10 scaled 833}
+ \newfont{\sfdcA}{cmssdc10 scaled 232}
+ \newfont{\squareA}{cmsy10 scaled 482}
+ \newfont{\lipoA}{cmtt10 scaled 482}
+ \newfont{\treeA}{cmssdc10 scaled 482}
+ \ifx\label@size\ampers@nd
+ \setsize{labels}{tiny}
+ \fi
+ \ifx\mem@label@size\ampers@nd
+ \setsize{membranelabels}{tiny}
+ \fi
+ \setsize{looplabels}{footnotesize}
+ \setsize{TMlabels}{footnotesize}
+ \else
+ \ifdim\temp@length<1.10878pt
+ \xdef\font@num{B}
+ \newfont{\bsymB}{cmsy10 scaled 1000}
+ \newfont{\sfdcB}{cmssdc10 scaled 279}
+ \newfont{\squareB}{cmsy10 scaled 578}
+ \newfont{\lipoB}{cmtt10 scaled 578}
+ \newfont{\treeB}{cmssdc10 scaled 578}
+ \ifx\label@size\ampers@nd
+ \setsize{labels}{tiny}
+ \fi
+ \ifx\mem@label@size\ampers@nd
+ \setsize{membranelabels}{tiny}
+ \fi
+ \setsize{looplabels}{footnotesize}
+ \setsize{TMlabels}{footnotesize}
+ \else
+ \ifdim\temp@length<1.33054pt
+ \xdef\font@num{C}
+ \newfont{\bsymC}{cmsy10 scaled 1200}
+ \newfont{\sfdcC}{cmssdc10 scaled 335}
+ \newfont{\squareC}{cmsy10 scaled 694}
+ \newfont{\lipoC}{cmtt10 scaled 694}
+ \newfont{\treeC}{cmssdc10 scaled 694}
+ \ifx\label@size\ampers@nd
+ \setsize{labels}{tiny}
+ \fi
+ \ifx\mem@label@size\ampers@nd
+ \setsize{membranelabels}{tiny}
+ \fi
+ \setsize{looplabels}{footnotesize}
+ \setsize{TMlabels}{footnotesize}
+ \else
+ \ifdim\temp@length<1.59695pt
+ \xdef\font@num{D}
+ \newfont{\bsymD}{cmsy10 scaled 1440}
+ \newfont{\sfdcD}{cmssdc10 scaled 402}
+ \newfont{\squareD}{cmsy10 scaled 833}
+ \newfont{\lipoD}{cmtt10 scaled 833}
+ \newfont{\treeD}{cmssdc10 scaled 833}
+ \ifx\label@size\ampers@nd
+ \setsize{labels}{tiny}
+ \fi
+ \ifx\mem@label@size\ampers@nd
+ \setsize{membranelabels}{tiny}
+ \fi
+ \setsize{looplabels}{footnotesize}
+ \setsize{TMlabels}{footnotesize}
+ \else
+ \ifdim\temp@length<1.91574pt
+ \xdef\font@num{E}
+ \newfont{\bsymE}{cmsy10 scaled 1728}
+ \newfont{\sfdcE}{cmssdc10 scaled 482}
+ \newfont{\squareE}{cmsy10 scaled 1000}
+ \newfont{\lipoE}{cmtt10 scaled 1000}
+ \newfont{\treeE}{cmssdc10 scaled 1000}
+ \ifx\label@size\ampers@nd
+ \setsize{labels}{scriptsize}
+ \fi
+ \ifx\mem@label@size\ampers@nd
+ \setsize{membranelabels}{scriptsize}
+ \fi
+ \setsize{looplabels}{smallsize}
+ \setsize{TMlabels}{smallsize}
+ \else
+ \ifdim\temp@length<2.2992pt
+ \xdef\font@num{F}
+ \newfont{\bsymF}{cmsy10 scaled 2074}
+ \newfont{\sfdcF}{cmssdc10 scaled 578}
+ \newfont{\squareF}{cmsy10 scaled 1200}
+ \newfont{\lipoF}{cmtt10 scaled 1200}
+ \newfont{\treeF}{cmssdc10 scaled 1200}
+ \ifx\label@size\ampers@nd
+ \setsize{labels}{footnotesize}
+ \fi
+ \ifx\mem@label@size\ampers@nd
+ \setsize{membranelabels}{footnotesize}
+ \fi
+ \setsize{looplabels}{normalsize}
+ \setsize{TMlabels}{normalsize}
+ \else
+ \ifdim\temp@length<2.75888pt
+ \xdef\font@num{G}
+ \newfont{\bsymG}{cmsy10 scaled 2488}
+ \newfont{\sfdcG}{cmssdc10 scaled 694}
+ \newfont{\squareG}{cmsy10 scaled 1440}
+ \newfont{\lipoG}{cmtt10 scaled 1440}
+ \newfont{\treeG}{cmssdc10 scaled 1440}
+ \ifx\label@size\ampers@nd
+ \setsize{labels}{small}
+ \fi
+ \ifx\mem@label@size\ampers@nd
+ \setsize{membranelabels}{small}
+ \fi
+ \setsize{looplabels}{large}
+ \setsize{TMlabels}{large}
+ \else
+ \ifdim\temp@length<3.31097pt
+ \xdef\font@num{H}
+ \newfont{\bsymH}{cmsy10 scaled 2986}
+ \newfont{\sfdcH}{cmssdc10 scaled 833}
+ \newfont{\squareH}{cmsy10 scaled 1728}
+ \newfont{\lipoH}{cmtt10 scaled 1728}
+ \newfont{\treeH}{cmssdc10 scaled 1728}
+ \ifx\label@size\ampers@nd
+ \setsize{labels}{normalsize}
+ \fi
+ \ifx\mem@label@size\ampers@nd
+ \setsize{membranelabels}{normalsize}
+ \fi
+ \setsize{looplabels}{Large}
+ \setsize{TMlabels}{Large}
+ \else
+ \ifdim\temp@length<3.97316pt
+ \xdef\font@num{I}
+ \newfont{\bsymI}{cmsy10 scaled 3583}
+ \newfont{\sfdcI}{cmssdc10 scaled 1000}
+ \newfont{\squareI}{cmsy10 scaled 2074}
+ \newfont{\lipoI}{cmtt10 scaled 2074}
+ \newfont{\treeI}{cmssdc10 scaled 2074}
+ \ifx\label@size\ampers@nd
+ \setsize{labels}{large}
+ \fi
+ \ifx\mem@label@size\ampers@nd
+ \setsize{membranelabels}{large}
+ \fi
+ \setsize{looplabels}{LARGE}
+ \setsize{TMlabels}{LARGE}
+ \else
+ \ifdim\temp@length<4.76779pt
+ \xdef\font@num{J}
+ \newfont{\bsymJ}{cmsy10 scaled 4300}
+ \newfont{\sfdcJ}{cmssdc10 scaled 1200}
+ \newfont{\squareJ}{cmsy10 scaled 2488}
+ \newfont{\lipoJ}{cmtt10 scaled 2488}
+ \newfont{\treeJ}{cmssdc10 scaled 2488}
+ \ifx\label@size\ampers@nd
+ \setsize{labels}{Large}
+ \fi
+ \ifx\mem@label@size\ampers@nd
+ \setsize{membranelabels}{Large}
+ \fi
+ \setsize{looplabels}{huge}
+ \setsize{TMlabels}{huge}
+ \else
+ \xdef\font@num{K}
+ \newfont{\bsymK}{cmsy10 scaled 5160}
+ \newfont{\sfdcK}{cmssdc10 scaled 1440}
+ \newfont{\squareK}{cmsy10 scaled 2986}
+ \newfont{\lipoK}{cmtt10 scaled 2986}
+ \newfont{\treeK}{cmssdc10 scaled 2986}
+ \ifx\label@size\ampers@nd
+ \setsize{labels}{LARGE}
+ \fi
+ \ifx\mem@label@size\ampers@nd
+ \setsize{membranelabels}{LARGE}
+ \fi
+ \setsize{looplabels}{Huge}
+ \setsize{TMlabels}{Huge}
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
+
+\expandafter\def\csname sin0\endcsname{0}
+\expandafter\def\csname sin1\endcsname{175}
+\expandafter\def\csname sin2\endcsname{349}
+\expandafter\def\csname sin3\endcsname{523}
+\expandafter\def\csname sin4\endcsname{698}
+\expandafter\def\csname sin5\endcsname{872}
+\expandafter\def\csname sin6\endcsname{1045}
+\expandafter\def\csname sin7\endcsname{1219}
+\expandafter\def\csname sin8\endcsname{1392}
+\expandafter\def\csname sin9\endcsname{1563}
+\expandafter\def\csname sin10\endcsname{1736}
+\expandafter\def\csname sin11\endcsname{1908}
+\expandafter\def\csname sin12\endcsname{2079}
+\expandafter\def\csname sin13\endcsname{2250}
+\expandafter\def\csname sin14\endcsname{2419}
+\expandafter\def\csname sin15\endcsname{2588}
+\expandafter\def\csname sin16\endcsname{2756}
+\expandafter\def\csname sin17\endcsname{2924}
+\expandafter\def\csname sin18\endcsname{3090}
+\expandafter\def\csname sin19\endcsname{3256}
+\expandafter\def\csname sin20\endcsname{3420}
+\expandafter\def\csname sin21\endcsname{3584}
+\expandafter\def\csname sin22\endcsname{3746}
+\expandafter\def\csname sin23\endcsname{3907}
+\expandafter\def\csname sin24\endcsname{4067}
+\expandafter\def\csname sin25\endcsname{4226}
+\expandafter\def\csname sin26\endcsname{4384}
+\expandafter\def\csname sin27\endcsname{4540}
+\expandafter\def\csname sin28\endcsname{4695}
+\expandafter\def\csname sin29\endcsname{4848}
+\expandafter\def\csname sin30\endcsname{5000}
+\expandafter\def\csname sin31\endcsname{5150}
+\expandafter\def\csname sin32\endcsname{5299}
+\expandafter\def\csname sin33\endcsname{5446}
+\expandafter\def\csname sin34\endcsname{5592}
+\expandafter\def\csname sin35\endcsname{5736}
+\expandafter\def\csname sin36\endcsname{5878}
+\expandafter\def\csname sin37\endcsname{6018}
+\expandafter\def\csname sin38\endcsname{6157}
+\expandafter\def\csname sin39\endcsname{6293}
+\expandafter\def\csname sin40\endcsname{6428}
+\expandafter\def\csname sin41\endcsname{6561}
+\expandafter\def\csname sin42\endcsname{6691}
+\expandafter\def\csname sin43\endcsname{6820}
+\expandafter\def\csname sin44\endcsname{6947}
+\expandafter\def\csname sin45\endcsname{7071}
+\expandafter\def\csname sin46\endcsname{7193}
+\expandafter\def\csname sin47\endcsname{7314}
+\expandafter\def\csname sin48\endcsname{7431}
+\expandafter\def\csname sin49\endcsname{7547}
+\expandafter\def\csname sin50\endcsname{7660}
+\expandafter\def\csname sin51\endcsname{7771}
+\expandafter\def\csname sin52\endcsname{7880}
+\expandafter\def\csname sin53\endcsname{7986}
+\expandafter\def\csname sin54\endcsname{8090}
+\expandafter\def\csname sin55\endcsname{8192}
+\expandafter\def\csname sin56\endcsname{8290}
+\expandafter\def\csname sin57\endcsname{8387}
+\expandafter\def\csname sin58\endcsname{8480}
+\expandafter\def\csname sin59\endcsname{8572}
+\expandafter\def\csname sin60\endcsname{8660}
+\expandafter\def\csname sin61\endcsname{8746}
+\expandafter\def\csname sin62\endcsname{8829}
+\expandafter\def\csname sin63\endcsname{8910}
+\expandafter\def\csname sin64\endcsname{8989}
+\expandafter\def\csname sin65\endcsname{9063}
+\expandafter\def\csname sin66\endcsname{9135}
+\expandafter\def\csname sin67\endcsname{9205}
+\expandafter\def\csname sin68\endcsname{9272}
+\expandafter\def\csname sin69\endcsname{9336}
+\expandafter\def\csname sin70\endcsname{9397}
+\expandafter\def\csname sin71\endcsname{9455}
+\expandafter\def\csname sin72\endcsname{9511}
+\expandafter\def\csname sin73\endcsname{9563}
+\expandafter\def\csname sin74\endcsname{9613}
+\expandafter\def\csname sin75\endcsname{9659}
+\expandafter\def\csname sin76\endcsname{9703}
+\expandafter\def\csname sin77\endcsname{9744}
+\expandafter\def\csname sin78\endcsname{9781}
+\expandafter\def\csname sin79\endcsname{9816}
+\expandafter\def\csname sin80\endcsname{9848}
+\expandafter\def\csname sin81\endcsname{9877}
+\expandafter\def\csname sin82\endcsname{9903}
+\expandafter\def\csname sin83\endcsname{9925}
+\expandafter\def\csname sin84\endcsname{9945}
+\expandafter\def\csname sin85\endcsname{9962}
+\expandafter\def\csname sin86\endcsname{9976}
+\expandafter\def\csname sin87\endcsname{9986}
+\expandafter\def\csname sin88\endcsname{9994}
+\expandafter\def\csname sin89\endcsname{9998}
+\expandafter\def\csname sin90\endcsname{10000}
+
+\expandafter\def\csname invtan0\endcsname{0}
+\expandafter\def\csname invtan1\endcsname{175}
+\expandafter\def\csname invtan2\endcsname{349}
+\expandafter\def\csname invtan3\endcsname{524}
+\expandafter\def\csname invtan4\endcsname{699}
+\expandafter\def\csname invtan5\endcsname{875}
+\expandafter\def\csname invtan6\endcsname{1051}
+\expandafter\def\csname invtan7\endcsname{1228}
+\expandafter\def\csname invtan8\endcsname{1405}
+\expandafter\def\csname invtan9\endcsname{1584}
+\expandafter\def\csname invtan10\endcsname{1763}
+\expandafter\def\csname invtan11\endcsname{1944}
+\expandafter\def\csname invtan12\endcsname{2126}
+\expandafter\def\csname invtan13\endcsname{2309}
+\expandafter\def\csname invtan14\endcsname{2493}
+\expandafter\def\csname invtan15\endcsname{2679}
+\expandafter\def\csname invtan16\endcsname{2867}
+\expandafter\def\csname invtan17\endcsname{3057}
+\expandafter\def\csname invtan18\endcsname{3249}
+\expandafter\def\csname invtan19\endcsname{3443}
+\expandafter\def\csname invtan20\endcsname{3640}
+\expandafter\def\csname invtan21\endcsname{3839}
+\expandafter\def\csname invtan22\endcsname{4040}
+\expandafter\def\csname invtan23\endcsname{4245}
+\expandafter\def\csname invtan24\endcsname{4452}
+\expandafter\def\csname invtan25\endcsname{4663}
+\expandafter\def\csname invtan26\endcsname{4877}
+\expandafter\def\csname invtan27\endcsname{5095}
+\expandafter\def\csname invtan28\endcsname{5317}
+\expandafter\def\csname invtan29\endcsname{5543}
+\expandafter\def\csname invtan30\endcsname{5774}
+\expandafter\def\csname invtan31\endcsname{6009}
+\expandafter\def\csname invtan32\endcsname{6247}
+\expandafter\def\csname invtan33\endcsname{6494}
+\expandafter\def\csname invtan34\endcsname{6745}
+\expandafter\def\csname invtan35\endcsname{7002}
+\expandafter\def\csname invtan36\endcsname{7265}
+\expandafter\def\csname invtan37\endcsname{7536}
+\expandafter\def\csname invtan38\endcsname{7813}
+\expandafter\def\csname invtan39\endcsname{8098}
+\expandafter\def\csname invtan40\endcsname{8391}
+\expandafter\def\csname invtan41\endcsname{8693}
+\expandafter\def\csname invtan42\endcsname{9004}
+\expandafter\def\csname invtan43\endcsname{9325}
+\expandafter\def\csname invtan44\endcsname{9657}
+\expandafter\def\csname invtan45\endcsname{10000}
+\expandafter\def\csname invtan46\endcsname{10355}
+\expandafter\def\csname invtan47\endcsname{10724}
+\expandafter\def\csname invtan48\endcsname{11106}
+\expandafter\def\csname invtan49\endcsname{11504}
+\expandafter\def\csname invtan50\endcsname{11918}
+\expandafter\def\csname invtan51\endcsname{12349}
+\expandafter\def\csname invtan52\endcsname{12799}
+\expandafter\def\csname invtan53\endcsname{13270}
+\expandafter\def\csname invtan54\endcsname{13764}
+\expandafter\def\csname invtan55\endcsname{14281}
+\expandafter\def\csname invtan56\endcsname{14826}
+\expandafter\def\csname invtan57\endcsname{15399}
+\expandafter\def\csname invtan58\endcsname{16003}
+\expandafter\def\csname invtan59\endcsname{16643}
+\expandafter\def\csname invtan60\endcsname{17321}
+\expandafter\def\csname invtan61\endcsname{18040}
+\expandafter\def\csname invtan62\endcsname{18807}
+\expandafter\def\csname invtan63\endcsname{19626}
+\expandafter\def\csname invtan64\endcsname{20503}
+\expandafter\def\csname invtan65\endcsname{21445}
+\expandafter\def\csname invtan66\endcsname{22460}
+\expandafter\def\csname invtan67\endcsname{23558}
+\expandafter\def\csname invtan68\endcsname{24751}
+\expandafter\def\csname invtan69\endcsname{26051}
+\expandafter\def\csname invtan70\endcsname{27475}
+\expandafter\def\csname invtan71\endcsname{29042}
+\expandafter\def\csname invtan72\endcsname{30777}
+\expandafter\def\csname invtan73\endcsname{32709}
+\expandafter\def\csname invtan74\endcsname{34874}
+\expandafter\def\csname invtan75\endcsname{37321}
+\expandafter\def\csname invtan76\endcsname{40108}
+\expandafter\def\csname invtan77\endcsname{43315}
+\expandafter\def\csname invtan78\endcsname{47046}
+\expandafter\def\csname invtan79\endcsname{51446}
+\expandafter\def\csname invtan80\endcsname{56713}
+\expandafter\def\csname invtan81\endcsname{63138}
+\expandafter\def\csname invtan82\endcsname{71154}
+\expandafter\def\csname invtan83\endcsname{81443}
+\expandafter\def\csname invtan84\endcsname{95144}
+\expandafter\def\csname invtan85\endcsname{114301}
+\expandafter\def\csname invtan86\endcsname{143007}
+\expandafter\def\csname invtan87\endcsname{190814}
+\expandafter\def\csname invtan88\endcsname{286363}
+\expandafter\def\csname invtan89\endcsname{572900}
+
+\def\sin@#1{%
+ \xdef\first@{#1}
+ \sincos=\first@
+ \ifnum#1<0
+ \multiply\sincos by -1 \xdef\first@{\the\sincos}
+ \fi
+ \divide\sincos by 360
+ \ifnum\sincos>0
+ \temp@count=360 \multiply\temp@count by \sincos
+ \sincos=\first@ \advance\sincos by -\temp@count
+ \else
+ \sincos=\first@\relax
+ \fi
+ \ifnum\sincos>270
+ \advance\sincos by -360
+ \multiply\sincos by -1
+ \xdef\temp@{\csname sin\the\sincos\endcsname}
+ \sincos=\temp@\relax
+ \multiply\sincos by -1
+ \else
+ \ifnum\sincos>180
+ \advance\sincos by -180
+ \xdef\temp@{\csname sin\the\sincos\endcsname}
+ \sincos=\temp@\relax
+ \multiply\sincos by -1
+ \else
+ \ifnum\sincos>90
+ \advance\sincos by -180
+ \multiply\sincos by -1
+ \xdef\temp@{\csname sin\the\sincos\endcsname}
+ \sincos=\temp@\relax
+ \else
+ \xdef\temp@{\csname sin\the\sincos\endcsname}
+ \sincos=\temp@\relax
+ \fi\fi\fi
+ \ifnum#1<0 \multiply\sincos by -1 \fi
+}
+
+\def\cos@#1{%
+ \xdef\first@{#1}
+ \sincos=\first@
+ \ifnum#1<0
+ \multiply\sincos by -1 \xdef\first@{\the\sincos}
+ \fi
+ \divide\sincos by 360
+ \ifnum\sincos>0
+ \temp@count=360 \multiply\temp@count by \sincos
+ \sincos=\first@ \advance\sincos by -\temp@count
+ \else
+ \sincos=\first@\relax
+ \fi
+ \ifnum\sincos>270
+ \advance\sincos by -270
+ \xdef\temp@{\csname sin\the\sincos\endcsname}
+ \sincos=\temp@\relax
+ \else
+ \ifnum\sincos>180
+ \advance\sincos by -270
+ \multiply\sincos by -1
+ \xdef\temp@{\csname sin\the\sincos\endcsname}
+ \sincos=\temp@\relax
+ \multiply\sincos by -1
+ \else
+ \ifnum\sincos>90
+ \advance\sincos by -90
+ \xdef\temp@{\csname sin\the\sincos\endcsname}
+ \sincos=\temp@\relax
+ \multiply\sincos by -1
+ \else
+ \advance\sincos by -90
+ \multiply\sincos by -1
+ \xdef\temp@{\csname sin\the\sincos\endcsname}
+ \sincos=\temp@\relax
+ \fi\fi\fi
+}
+
+\def\tan@#1{%
+ \cos@{#1}
+ \ifnum\sincos=0
+ \PackageError{TeXtopo}
+ {Undefined angle for tangens}
+ {The tangens is not defined for the angles\MessageBreak
+ ... -270, -90, 90, 270 ...\MessageBreak
+}
+ \else
+ \xdef\last@{\the\sincos}
+ \sin@{#1}
+ \multiply\sincos by 10000
+ \divide\sincos by \last@
+ \fi
+}
+
+\def\invtan@#1#2{%
+ \sincos=#2
+ \multiply\sincos by 10000
+ \divide\sincos by #1
+ \ifnum\sincos<0 \multiply\sincos by -1\fi
+ \xdef\temp@{\the\sincos}
+ \sincos=-1
+ \loop
+ \advance\sincos by 1
+ \ifnum\sincos=90 \sincos=89 \xdef\temp@{-1} \fi
+ \expandafter\ifnum\csname invtan\the\sincos\endcsname<\temp@ \repeat
+ \ifnum\temp@=-1 \sincos=90 \fi
+ \ifnum#1>0
+ \ifnum#2>0
+ \else
+ \multiply\sincos by -1
+ \advance\sincos by 360
+ \fi
+ \else
+ \ifnum#2>0
+ \multiply\sincos by -1
+ \advance\sincos by 180
+ \else
+ \advance\sincos by 180
+ \fi
+ \fi
+}
+
+\def\sqrt@#1{
+ \xdef\third@{10000}
+ \temp@count=#1
+ \ifnum#1>200000 \xdef\third@{1000} \divide\temp@count by 10\fi
+ \ifnum#1>2000000 \message{Root value too big! (>200)}
+ \else
+ \xdef\last@{\the\temp@count}
+ \xdef\first@{\third@}
+ \xdef\second@{\last@}
+ \temp@@count=0
+ \loop
+ \advance\temp@@count by 1
+ \temp@count = \first@
+ \advance\temp@count by \second@
+ \divide\temp@count by 2
+ \xdef\first@{\the\temp@count}
+ \temp@count = \last@
+ \multiply\temp@count by \third@
+ \divide\temp@count by \first@
+ \xdef\second@{\the\temp@count}
+ \ifnum\temp@@count=10 \else \repeat
+ \ifnum\third@=1000
+ \temp@count=\first@ \multiply\temp@count by 10
+ \xdef\first@{\the\temp@count}
+ \fi
+ \ifnum\third@=100
+ \temp@count=\first@ \multiply\temp@count by 100
+ \xdef\first@{\the\temp@count}
+ \fi
+ \ifnum\third@=10
+ \temp@count=\first@ \multiply\temp@count by 1000
+ \xdef\first@{\the\temp@count}
+ \fi
+ \fi
+ \xdef\r@@t{\first@}
+}
+
+\def\put@normal#1#2{%
+ \ifdo@it
+ \xdef\first@{circ}
+ \ifx\symb@l@style\first@
+ \put(#1,#2){\raisebox{-\res@@diam}{%
+ \textcolor{\symb@lc@l}{%
+ \hbox to \res@diam{\hss\csname bsym\font@num\endcsname\char"0F\hss}}}}
+ \put(#1,#2){\raisebox{-\res@@diam}{%
+ \textcolor{\fr@mec@l}{%
+ \hbox to \res@diam{\hss\csname bsym\font@num\endcsname\char"0E\hss}}%
+ \kern-\res@diam \raisebox{0.4\res@diam}{%
+ \raisebox{0.65\res@@diam}%
+ {\hbox to \res@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\ch@rc@l}{\ch@r}\hss}}}}}
+ \else
+ \xdef\first@{diamond}
+ \ifx\symb@l@style\first@
+ \put(#1,#2){\raisebox{-\res@@diam}{%
+ \textcolor{\symb@lc@l}{%
+ \kern0.12\res@@diam%
+ \begin{rotopo}{45}\rule[0.17\res@@diam]{1.2\res@@diam}%
+ {1.3\res@@diam}\end{rotopo}%
+ \kern3\unit@length%
+ \begin{rotopo}{45}\rule[0.085\res@diam]{0.75\res@diam}%
+ {0.85\res@diam}\end{rotopo}}}}
+ \put(#1,#2){\raisebox{-\res@@diam}{%
+ \textcolor{\fr@mec@l}{%
+ \hbox to \res@diam{\hss\csname bsym\font@num\endcsname\char"05\hss}}%
+ \kern-0.9\res@diam \raisebox{0.4\res@diam}{%
+ \raisebox{0.65\res@@diam}%
+ {\hbox to 0.9\res@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\ch@rc@l}{\ch@r}\hss}}}}}
+ \else
+ \xdef\first@{box}
+ \ifx\symb@l@style\first@
+ \ifhelix@
+ \put(#1,#2){\kern-\res@@diam\raisebox{-\res@@diam}{%
+ \textcolor{\fr@mec@l}{%
+ \rule[0.25\res@@diam]{1.5\res@@diam}{1.75\res@@diam}}}}
+ \put(#1,#2){\kern-0.85\res@@diam\raisebox{-0.8\res@@diam}{%
+ \textcolor{\symb@lc@l}{%
+ \rule[0.25\res@@diam]{1.2\res@@diam}{1.4\res@@diam}
+ \kern-1.45\res@@diam\raisebox{0.6\res@@diam}%
+ {\hbox to \res@@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\ch@rc@l}{\ch@r}\hss}}}}}
+ \else
+ \put(#1,#2){\textcolor{\symb@lc@l}{\kern0.11\res@diam%
+ \rule[0.175\res@diam]{0.73\res@diam}{0.85\res@diam}}}
+ \put(#1,#2){\textcolor{\fr@mec@l}{\kern0.02\res@diam%
+ \raisebox{0.175\res@diam}%
+ {\hbox to \res@diam{\hss\csname square\font@num\endcsname%
+ \char'164\hss}\kern-\res@diam\hbox to \res@diam{%
+ \hss\csname square\font@num\endcsname\char'165\hss}}%
+ \kern-\res@diam \raisebox{0.4\res@diam}{%
+ \raisebox{0.65\res@@diam}%
+ {\hbox to \res@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\ch@rc@l}{\ch@r}\hss}}}}}
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+}
+
+\def\opt@col#1[#2]#3&{\xdef\fourth@{#1}\xdef\l@color{#2}\xdef\fifth@{#3}}
+\def\test@box#1:#2:#3&{%
+ \xdef\last@{#1[@]&}\expandafter\opt@col\last@
+ \xdef\label@style{box}
+ \ifx\fourth@\label@style
+ \ifx\l@color\@t\xdef\back@color{White}\xdef\frame@color{Black}
+ \else
+ \xdef\l@color{\l@color,&@}
+ \expandafter\two@color\l@color
+ \fi
+ \xdef\first@{#2[@]&}
+ \expandafter\opt@col\first@
+ \ifx\l@color\@t\xdef\l@color{Black}\fi
+ \xdef\l@bel{\fourth@&}
+ \ifx\l@bel\ampers@nd \xdef\l@bel{\,\,\,} \else \xdef\l@bel{\fourth@}\fi
+ \else
+ \xdef\label@style{circ}
+ \ifx\fourth@\label@style
+ \ifx\l@color\@t\xdef\back@color{White}\xdef\frame@color{Black}
+ \else
+ \xdef\l@color{\l@color,&@}
+ \expandafter\two@color\l@color
+ \fi
+ \xdef\first@{#2[@]&}
+ \expandafter\opt@col\first@
+ \ifx\l@color\@t\xdef\l@color{Black}\fi
+ \xdef\l@bel{\fourth@&}
+ \ifx\l@bel\ampers@nd \xdef\l@bel{\,\,\,} \else \xdef\l@bel{\fourth@}\fi
+ \else
+ \xdef\label@style{diamond}
+ \ifx\fourth@\label@style
+ \ifx\l@color\@t\xdef\back@color{White}\xdef\frame@color{Black}
+ \else
+ \xdef\l@color{\l@color,&@}
+ \expandafter\two@color\l@color
+ \fi
+ \xdef\first@{#2[@]&}
+ \expandafter\opt@col\first@
+ \ifx\l@color\@t\xdef\l@color{Black}\fi
+ \xdef\l@bel{\fourth@&}
+ \ifx\l@bel\ampers@nd \xdef\l@bel{\,\,\,} \else \xdef\l@bel{\fourth@}\fi
+ \else
+ \xdef\label@style{tree}
+ \ifx\fourth@\label@style
+ \ifx\l@color\@t\xdef\frame@color{Black}
+ \else
+ \xdef\l@color{\l@color,&@}
+ \expandafter\two@color\l@color
+ \fi
+ \xdef\l@bel{}
+ \else
+ \xdef\label@style{&}
+ \xdef\l@bel{\fourth@}
+ \fi\fi\fi\fi
+ \ifx\l@color\@t\xdef\l@color{Black}\xdef\frame@color{Black}\fi
+ }
+
+\def\put@label{%
+ \ifx\l@bel\ampers@nd
+ \else
+ \xdef\first@{\l@bel::&}\expandafter\test@box\first@
+ \setlength\temp@length{\unit@length}
+ \multiply\temp@length by \length@
+ \xdef\first@{tree}
+ \ifx\label@style\first@
+ \temp@count=\x@x@ \advance\temp@count by -1 \xdef\x@x@{\the\temp@count}
+ \temp@count=\y@y@ \advance\temp@count by -1 \xdef\y@y@{\the\temp@count}
+ \put(\x@x@,\y@y@){\begin{rotopo}{\csname direct\v@rdirect\endcsname}%
+ \begin{rotopo}{270}%
+ {\textcolor{\frame@color}{%
+ \csname tree\font@num\endcsname\kern-0.18ex I%
+ \kern-1ex\raisebox{1.4ex}Y%
+ \kern-1.5ex\raisebox{2.15ex}%
+ {\begin{rotopo}{32}Y\end{rotopo}}%
+ \kern0.6ex\raisebox{2.9ex}%
+ {\begin{rotopo}{329}Y\end{rotopo}}}}%
+ \end{rotopo}\end{rotopo}}
+ \temp@count=\x@x@ \advance\temp@count by 1 \xdef\x@x@{\the\temp@count}
+ \temp@count=\y@y@ \advance\temp@count by 1 \xdef\y@y@{\the\temp@count}
+ \else
+ \xdef\first@{\v@rdirect @}
+ \expandafter\check@letter\first@
+ \ifletter
+ \temp@count=\x@x@
+ \expandafter\ifnum\csname cos\v@rdirect\endcsname<0
+ \expandafter\ifnum\csname sin\v@rdirect\endcsname>-10000
+ \advance\temp@count by -1\relax
+ \fi\fi
+ \put(\temp@count,\y@y@){\begin{rotopo}{\csname direct\v@rdirect\endcsname}%
+ \rule{\temp@length}{\rule@thickness}\end{rotopo}}
+ \else
+ \invtan@{\v@rdirect}{\length@}
+ \sin@{\the\sincos}
+ \temp@count=\length@
+ \multiply\temp@count by 10000
+ \divide\temp@count by \sincos
+ \advance\temp@count by 1
+ \ifdim\temp@length<0pt \multiply\temp@length by -1 \fi
+ \xdef\first@{\the\temp@length}
+ \temp@count=\x@x@
+ \expandafter\ifnum\v@rdirect<0
+ \advance\temp@count by -1\relax
+ \fi
+ \invtan@{\v@rdirect}{\length@}
+ \put(\temp@count,\y@y@){\begin{rotopo}{\the\sincos}%
+ \rule{\first@}{\rule@thickness}\end{rotopo}}
+ \fi
+ \fi
+ \xdef\first@{\v@rdirect @}
+ \expandafter\check@letter\first@
+ \ifletter
+ \temp@count=\length@
+ \multiply\temp@count by \csname cos\v@rdirect\endcsname
+ \divide\temp@count by 10000
+ \xdef\x@@x{\the\temp@count}
+ \temp@count=\length@
+ \multiply\temp@count by \csname sin\v@rdirect\endcsname
+ \divide\temp@count by 10000
+ \xdef\y@@y{\the\temp@count}
+ \else
+ \xdef\x@@x{\v@rdirect}
+ \xdef\y@@y{\length@}
+ \fi
+ \temp@count=\x@x@ \advance\temp@count by \x@@x \xdef\x@@@x{\the\temp@count}
+ \temp@count=\y@y@ \advance\temp@count by \y@@y \xdef\y@@@y{\the\temp@count}
+ \xdef\first@{box}
+ \setbox1=\hbox{\label@size{\,\l@bel\,}}
+ \ifnum\x@@x>0
+ \xdef\width@{0pt}
+ \else
+ \xdef\width@{\the\wd1}
+ \fi
+ \ifnum\y@@y<0
+ \setlength\temp@length{0.75\ht1} \xdef\height@{\the\temp@length}
+ \else
+ \setlength\temp@length{0.25\ht1} \xdef\height@{\the\temp@length}
+ \fi
+ \ifx\label@style\first@
+ \ifx\frame@color\back@color
+ \else
+ \put(\x@@@x,\y@@@y){\kern-\width@%
+ \kern-0.5\unit@length%
+ \textcolor{\frame@color}%
+ {\raisebox{-0.5\unit@length}{%
+ \raisebox{-0.8\temp@length}{%
+ \rule[-\r@depth]{\wd1}{\r@height}}}}}
+ \put(\x@@@x,\y@@@y){\kern-\width@%
+ \kern0.5\unit@length%
+ \textcolor{\frame@color}%
+ {\raisebox{-0.5\unit@length}{%
+ \raisebox{-0.8\temp@length}{%
+ \rule[-\r@depth]{\wd1}{\r@height}}}}}
+ \put(\x@@@x,\y@@@y){\kern-\width@%
+ \kern-0.5\unit@length%
+ \textcolor{\frame@color}%
+ {\raisebox{0.5\unit@length}{%
+ \raisebox{-0.8\temp@length}{%
+ \rule[-\r@depth]{\wd1}{\r@height}}}}}
+ \put(\x@@@x,\y@@@y){\kern-\width@%
+ \kern0.5\unit@length%
+ \textcolor{\frame@color}%
+ {\raisebox{0.5\unit@length}{%
+ \raisebox{-0.8\temp@length}{%
+ \rule[-\r@depth]{\wd1}{\r@height}}}}}
+ \fi
+ \put(\x@@@x,\y@@@y){\kern-\width@\textcolor{\back@color}%
+ {\raisebox{-0.8\temp@length}{%
+ \rule[-\r@depth]{\wd1}{\r@height}}}}
+ \put(\x@@@x,\y@@@y){\kern-\width@\textcolor{\l@color}%
+ {\raisebox{-\height@}{\hbox to \wd1{%
+ \label@size{\,\hss\l@bel\,}}}}}
+ \else
+ \xdef\first@{circ}
+ \ifx\label@style\first@
+ \put(\x@@@x,\y@@@y){\kern-\width@\textcolor{\back@color}{%
+ \raisebox{-\height@}{\raisebox{-2\unit@length}{\hbox to \res@diam{%
+ \hss\csname bsym\font@num\endcsname\char"0F\hss}}}}}
+ \put(\x@@@x,\y@@@y){\kern-\width@\textcolor{\frame@color}{%
+ \raisebox{-\height@}{\raisebox{-2\unit@length}{\hbox to \res@diam{%
+ \hss\csname bsym\font@num\endcsname\char"0E\hss}}}%
+ \kern-\res@diam \raisebox{0.4\res@diam}%
+ {\raisebox{-\height@}{\raisebox{-2\unit@length}{\hbox to \res@diam{%
+ \hss\csname sfdc\font@num\endcsname%
+ \textcolor{\l@color}{\l@bel}\hss}}}}}}
+ \else
+ \xdef\first@{diamond}
+ \ifx\label@style\first@
+ \put(\x@@@x,\y@@@y){\kern-\width@\textcolor{\back@color}{%
+ \raisebox{-\height@}{\raisebox{-2.5\unit@length}{\kern3\unit@length%
+ \begin{rotopo}{45}\rule[0.085\res@diam]{0.75\res@diam}%
+ {0.85\res@diam}\end{rotopo}}}}}
+ \put(\x@@@x,\y@@@y){\kern-\width@\textcolor{\frame@color}{%
+ \raisebox{-\height@}{\raisebox{-2.5\unit@length}{\hbox to \res@diam{%
+ \hss\csname bsym\font@num\endcsname\char"05\hss}}}%
+ \kern-0.9\res@diam \raisebox{0.4\res@diam}%
+ {\raisebox{-\height@}{\raisebox{-2.5\unit@length}{\hbox to 0.9\res@diam{%
+ \hss\csname sfdc\font@num\endcsname%
+ \textcolor{\l@color}{\l@bel}\hss}}}}}}
+ \else
+ \xdef\first@{tree}
+ \ifx\label@style\first@
+ \else
+ \put(\x@@@x,\y@@@y){\kern-\width@\textcolor{\l@color}%
+ {\raisebox{-\height@}{\hbox to \wd1{%
+ \label@size{\,\hss\l@bel\,}}}}}
+ \fi\fi\fi\fi
+ \fi
+ \ifx\num@\ampers@nd
+ \xdef\first@{&}
+ \expandafter\ifx\csname print\p@s\endcsname\ampers@nd
+ \xdef\first@{\v@rdirect @}
+ \expandafter\check@letter\first@
+ \ifletter
+ \xdef\first@{NE}
+ \expandafter\ifnum\csname cos\v@rdirect\endcsname>3800
+ \expandafter\ifnum\csname sin\v@rdirect\endcsname>-1
+ \xdef\first@{NW}
+ \fi\fi
+ \else
+ \xdef\first@{NE}
+ \ifnum\v@rdirect>0
+ \ifnum\length@>0
+ \xdef\first@{NW}
+ \fi\fi
+ \fi
+ \fi
+ \expandafter\ifx\csname print\p@s\endcsname\n@
+ \else
+ \ifx\first@\ampers@nd \xdef\first@{\csname print\p@s\endcsname} \fi
+ \get@num@direc
+ \temp@count=\x@x@ \advance\temp@count by \first@
+ \xdef\x@@@x{\the\temp@count}
+ \temp@count=\y@y@ \advance\temp@count by \second@
+ \xdef\y@@@y{\the\temp@count}
+ \temp@count=\p@s\relax
+ \advance\temp@count by \seq@start\relax
+ \advance\temp@count by -1\relax
+ \put(\x@@@x,\y@@@y){\textcolor{\c@untc@l}{\csname sfdc\font@num\endcsname%
+ \raisebox{\rule@thickness}{%
+ \hbox to 0pt{\third@}}}}
+ \fi
+ \fi
+}
+
+\def\get@num@direc{%
+ \xdef\temp@{NNE}
+ \ifx\first@\temp@
+ \xdef\first@{1}\xdef\second@{1} \def\third@{\the\temp@count\hss}
+ \else
+ \xdef\temp@{NE}
+ \ifx\first@\temp@
+ \xdef\first@{2}\xdef\second@{0} \def\third@{\the\temp@count\hss}
+ \else
+ \xdef\temp@{ENE}
+ \ifx\first@\temp@
+ \xdef\first@{2}\xdef\second@{-1} \def\third@{\the\temp@count\hss}
+ \else
+ \xdef\temp@{E}
+ \ifx\first@\temp@
+ \xdef\first@{2}\xdef\second@{-1} \def\third@{\the\temp@count\hss}
+ \else
+ \xdef\temp@{ESE}
+ \ifx\first@\temp@
+ \xdef\first@{2}\xdef\second@{-2} \def\third@{\the\temp@count\hss}
+ \else
+ \xdef\temp@{SE}
+ \ifx\first@\temp@
+ \xdef\first@{2}\xdef\second@{-3} \def\third@{\the\temp@count\hss}
+ \else
+ \xdef\temp@{SSE}
+ \ifx\first@\temp@
+ \xdef\first@{1}\xdef\second@{-4} \def\third@{\the\temp@count\hss}
+ \else
+ \xdef\temp@{S}
+ \ifx\first@\temp@
+ \xdef\first@{-1}\xdef\second@{-6} \def\third@{\hss\,\the\temp@count\hss}
+ \else
+ \xdef\temp@{SSW}
+ \ifx\first@\temp@
+ \xdef\first@{-3}\xdef\second@{-4} \def\third@{\hss\the\temp@count\,}
+ \else
+ \xdef\temp@{SW}
+ \ifx\first@\temp@
+ \xdef\first@{-3}\xdef\second@{-3} \def\third@{\hss\the\temp@count\,}
+ \else
+ \xdef\temp@{WSW}
+ \ifx\first@\temp@
+ \xdef\first@{-4}\xdef\second@{-2} \def\third@{\hss\the\temp@count}
+ \else
+ \xdef\temp@{W}
+ \ifx\first@\temp@
+ \xdef\first@{-4}\xdef\second@{-1} \def\third@{\hss\the\temp@count}
+ \else
+ \xdef\temp@{WNW}
+ \ifx\first@\temp@
+ \xdef\first@{-4}\xdef\second@{-1} \def\third@{\hss\the\temp@count}
+ \else
+ \xdef\temp@{NW}
+ \ifx\first@\temp@
+ \xdef\first@{-3}\xdef\second@{0} \def\third@{\hss\the\temp@count\,}
+ \else
+ \xdef\temp@{NNW}
+ \ifx\first@\temp@
+ \xdef\first@{-3}\xdef\second@{1} \def\third@{\hss\the\temp@count\,}
+ \else
+ \xdef\temp@{N}
+ \ifx\first@\temp@
+ \xdef\first@{-1}\xdef\second@{3} \def\third@{\hss\,\the\temp@count\hss}
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
+
+\def\put@special#1#2{%
+ \ifx#1\ampers@nd
+ \else
+ \temp@count=#1 \advance\temp@count by 3 \xdef\x@x@{\the\temp@count}
+ \temp@count=#2 \advance\temp@count by 3 \xdef\y@y@{\the\temp@count}
+ \put@label
+ \xdef\first@{circ}
+ \ifx\first@\style@c@l
+ \put(#1,#2){\textcolor{\b@ck}{%
+ \hbox to \res@diam{\hss\csname bsym\font@num\endcsname\char"0F\hss}}}
+ \put(#1,#2){\textcolor{\fr@me}{%
+ \hbox to \res@diam{\hss\csname bsym\font@num\endcsname\char"0E\hss}}%
+ \kern-\res@diam \raisebox{0.4\res@diam}%
+ {\hbox to \res@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\f@nt}{\ch@r}\hss}}}
+ \else
+ \xdef\first@{diamond}
+ \ifx\first@\style@c@l
+ \put(#1,#2){\textcolor{\b@ck}{\kern3\unit@length%
+ \begin{rotopo}{45}\rule[0.085\res@diam]{0.75\res@diam}%
+ {0.85\res@diam}\end{rotopo}}}
+ \put(#1,#2){\textcolor{\fr@me}{%
+ \hbox to \res@diam{\hss\csname bsym\font@num\endcsname\char"05\hss}}%
+ \kern-0.9\res@diam \raisebox{0.4\res@diam}%
+ {\hbox to 0.9\res@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\f@nt}{\ch@r}\hss}}}
+ \else
+ \xdef\first@{box}
+ \ifx\first@\style@c@l
+ \put(#1,#2){\textcolor{\b@ck}{\kern0.11\res@diam%
+ \rule[0.175\res@diam]{0.73\res@diam}{0.85\res@diam}}}
+ \put(#1,#2){\textcolor{\fr@me}{\kern0.02\res@diam%
+ \raisebox{0.175\res@diam}%
+ {\hbox to \res@diam{\hss\csname square\font@num\endcsname%
+ \char'164\hss}\kern-\res@diam\hbox to \res@diam{%
+ \hss\csname square\font@num\endcsname\char'165\hss}}%
+ \kern-\res@diam \raisebox{0.4\res@diam}%
+ {\hbox to \res@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\f@nt}{\ch@r}\hss}}}}
+ \fi
+ \fi
+ \fi
+ \expandafter\get@spec@pos\label@stack
+ \expandafter\get@spec@lab\label@stack
+ \put@special{\x@x}{\y@y}
+ \fi
+}
+
+\def\get@col#1#2@{\xdef\col@num{#1}\xdef\constopo@{#2@}}
+
+\def\put@res#1#2{%
+ \x@p@s=#1 \y@p@s=#2
+ \advance\pos@count by 1\relax
+ \ifnum\pos@count=0 \pos@count=1 \fi
+ \expandafter\ifx\csname res@x@off\the\pos@count\endcsname\relax
+ \else
+ \advance\x@pos by \csname res@x@off\the\pos@count\endcsname
+ \expandafter\xdef\csname res@x@off\the\pos@count\endcsname{0}
+ \fi
+ \expandafter\ifx\csname res@y@off\the\pos@count\endcsname\relax
+ \else
+ \advance\y@pos by \csname res@y@off\the\pos@count\endcsname
+ \expandafter\xdef\csname res@y@off\the\pos@count\endcsname{0}
+ \fi
+ \expandafter\get@aa\sequence@
+ \ifx\ch@r\ampers@nd \xdef\sequence@{&@}
+ \else
+ \ifshade
+ \ifnum\pos@count<\seq@start
+ \xdef\col@num{0}
+ \else
+ \expandafter\get@col\constopo@
+ \fi
+ \ifx\col@num\ampers@nd \xdef\col@num{0}\xdef\constopo@{&@}\fi
+ \ifnum\pos@count=\start@met@num\relax
+ \ifno@start@met
+ \xdef\col@num{M}
+ \ifx\ch@r\col@num
+ \xdef\col@num{0}
+ \fi
+ \fi
+ \fi
+ \xdef\s@style{\csname sstyle\col@num\endcsname}
+ \xdef\s@col{\csname scol\col@num\endcsname}
+ \xdef\f@col{\csname fcol\col@num\endcsname}
+ \xdef\c@col{\csname ccol\col@num\endcsname}
+ \xdef\symb@l@style{\s@style}
+ \xdef\symb@lc@l{\s@col}
+ \xdef\fr@mec@l{\f@col}
+ \xdef\ch@rc@l{\c@col}
+ \else
+ \iffuncmode
+ \xdef\col@num{\csname funcgrp\ch@r\endcsname}
+ \ifnum\col@num<0 \xdef\col@num{0}\fi
+ \xdef\s@style{circ}
+ \xdef\s@col{\csname fg@color\col@num\endcsname}
+ \xdef\f@col{Black}
+ \xdef\c@col{\csname fg@textcolor\col@num\endcsname}
+ \xdef\symb@l@style{\s@style}
+ \xdef\symb@lc@l{\s@col}
+ \xdef\fr@mec@l{\f@col}
+ \xdef\ch@rc@l{\c@col}
+ \fi\fi
+ \ifx\start@\ampers@nd
+ \put@normal{\x@p@s}{\y@p@s}
+ \else
+ \ifnum\start@>\pos@count
+ \put@normal{\x@p@s}{\y@p@s}
+ \else
+ \ifnum\stop@<\pos@count
+ \getregion@fromlstack
+ \ifx\start@\ampers@nd
+ \ifshade
+ \xdef\symb@l@style{\s@style}
+ \xdef\symb@lc@l{\s@col}
+ \xdef\fr@mec@l{\f@col}
+ \xdef\ch@rc@l{\c@col}
+ \else
+ \iffuncmode
+ \xdef\symb@l@style{\s@style}
+ \xdef\symb@lc@l{\s@col}
+ \xdef\fr@mec@l{\f@col}
+ \xdef\ch@rc@l{\c@col}
+ \else
+ \xdef\symb@l@style{\symb@lstyle}
+ \xdef\symb@lc@l{\symb@lcol}
+ \xdef\fr@mec@l{\fr@mecol}
+ \xdef\ch@rc@l{\ch@rcol}
+ \fi\fi
+ \put@normal{\x@p@s}{\y@p@s}
+ \else
+ \ifnum\start@=\pos@count
+ \xdef\symb@l@style{\style@c@l}
+ \xdef\symb@lc@l{\b@ck}
+ \xdef\fr@mec@l{\fr@me}
+ \xdef\ch@rc@l{\f@nt}
+ \temp@count=\stretch@
+ \advance\temp@count by -1\relax
+ \xdef\stretch@{\the\temp@count}
+ \ifhelix@ \put@normal{\x@p@s}{\y@p@s}
+ \else
+ \ifnum\temp@count=-1\relax
+ \xdef\num@{0}
+ \ifnum\start@=\pos@count \xdef\num@{&} \fi
+ \ifnum\stop@=\pos@count \xdef\num@{&} \fi
+ \ifx\directi@n\ampers@nd \else \xdef\v@rdirect{\directi@n} \fi
+ \ifx\length@\ampers@nd \else \xdef\v@rlength{\length@} \fi
+ \xdef\label@stack{\label@stack \the\x@p@s;\the\y@p@s;\style@c@l;\b@ck;%
+ \fr@me;\f@nt;\ch@r;\v@rdirect;\v@rlength;\l@bel;%
+ \num@;\label@pos;}
+ \else
+ \ifnum\start@=\pos@count
+ \xdef\label@stack{\label@stack \the\x@p@s;\the\y@p@s;\style@c@l;\b@ck;%
+ \fr@me;\f@nt;\ch@r;\v@rdirect;\v@rlength;&;%
+ &;\start@;}
+ \else
+ \ifnum\stop@=\pos@count
+ \xdef\label@stack{\label@stack \the\x@p@s;\the\y@p@s;\style@c@l;\b@ck;%
+ \fr@me;\f@nt;\ch@r;\v@rdirect;\v@rlength;&;%
+ &;\stop@;}
+ \else
+ \put@normal{\x@p@s}{\y@p@s}
+ \fi
+ \fi
+ \fi
+ \fi
+ \else
+ \ifshade
+ \xdef\symb@l@style{\s@style}
+ \xdef\symb@lc@l{\s@col}
+ \xdef\fr@mec@l{\f@col}
+ \xdef\ch@rc@l{\c@col}
+ \else
+ \iffuncmode
+ \xdef\symb@l@style{\s@style}
+ \xdef\symb@lc@l{\s@col}
+ \xdef\fr@mec@l{\f@col}
+ \xdef\ch@rc@l{\c@col}
+ \else
+ \xdef\symb@l@style{\symb@lstyle}
+ \xdef\symb@lc@l{\symb@lcol}
+ \xdef\fr@mec@l{\fr@mecol}
+ \xdef\ch@rc@l{\ch@rcol}
+ \fi\fi
+ \put@normal{\x@p@s}{\y@p@s}
+ \fi
+ \fi
+ \else
+ \xdef\symb@l@style{\style@c@l}
+ \xdef\symb@lc@l{\b@ck}
+ \xdef\fr@mec@l{\fr@me}
+ \xdef\ch@rc@l{\f@nt}
+ \temp@count=\stretch@
+ \advance\temp@count by -1\relax
+ \xdef\stretch@{\the\temp@count}
+ \ifhelix@ \put@normal{\x@p@s}{\y@p@s}
+ \else
+ \ifnum\temp@count=-1\relax
+ \xdef\num@{0}
+ \ifnum\start@=\pos@count \xdef\num@{&} \fi
+ \ifnum\stop@=\pos@count \xdef\num@{&} \fi
+ \ifx\directi@n\ampers@nd \else \xdef\v@rdirect{\directi@n} \fi
+ \ifx\length@\ampers@nd \else \xdef\v@rlength{\length@} \fi
+ \xdef\label@stack{\label@stack \the\x@p@s;\the\y@p@s;\style@c@l;\b@ck;%
+ \fr@me;\f@nt;\ch@r;\v@rdirect;\v@rlength;\l@bel;%
+ \num@;\label@pos;}
+ \else
+ \ifnum\start@=\pos@count
+ \xdef\label@stack{\label@stack \the\x@p@s;\the\y@p@s;\style@c@l;\b@ck;%
+ \fr@me;\f@nt;\ch@r;\v@rdirect;\v@rlength;&;%
+ &;\start@;}
+ \else
+ \ifnum\stop@=\pos@count
+ \xdef\label@stack{\label@stack \the\x@p@s;\the\y@p@s;\style@c@l;\b@ck;%
+ \fr@me;\f@nt;\ch@r;\v@rdirect;\v@rlength;&;%
+ &;\stop@;}
+ \else
+ \put@normal{\x@p@s}{\y@p@s}
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+}
+
+\def\get@aa#1#2@{\xdef\ch@r{#1}\xdef\sequence@{#2@}}
+
+\def\do@offset{%
+ \advance\pos@count by 1\relax
+ \ifnum\pos@count=0 \pos@count=1 \fi
+ \expandafter\ifx\csname res@x@off\the\pos@count\endcsname\relax
+ \else
+ \advance\x@pos by \csname res@x@off\the\pos@count\endcsname
+ \fi
+ \expandafter\ifx\csname res@y@off\the\pos@count\endcsname\relax
+ \else
+ \advance\y@pos by \csname res@y@off\the\pos@count\endcsname
+ \fi
+}
+
+\def\sort@m@d@stack{%
+ \expandafter\get@next@m@d\m@d@stack
+ \ifnum\temp@count=0
+ \else
+ \advance\temp@count by 1
+ \ifnum\temp@count=0 \temp@count=1 \fi
+ \fi
+ \ifnum\temp@count=0
+ \xdef\temp@stack{\temp@stack,\m@d@stack@ori @}
+ \else
+ \ifnum\loopcount<\temp@count
+ \xdef\temp@stack{\temp@stack,\m@d@stack@ori,%
+ \the\temp@count:\m@d@x@offset/\m@d@y@offset,\m@d@stack}
+ \else
+ \xdef\temp@stack{\temp@stack,\the\temp@count:\m@d@x@offset/\m@d@y@offset}
+ \sort@m@d@stack
+ \fi
+ \fi
+}
+
+\def\get@next@m@d#1:#2/#3,#4@{%
+ \temp@count=#1
+ \ifnum\temp@count=0
+ \else
+ \advance\temp@count by -1\relax
+ \ifnum\temp@count=0 \temp@count=-1 \fi
+ \fi
+ \xdef\next@m@d@pos{\the\temp@count}
+ \xdef\m@d@x@offset{#2}
+ \xdef\m@d@y@offset{#3}
+ \xdef\m@d@stack{#4@}
+}
+
+\def\get@offset@m@d{%
+ \x@offset=0\relax
+ \advance\x@pos by \m@d@x@offset\relax
+ \y@offset=0\relax
+ \advance\y@pos by \m@d@y@offset\relax
+ \ifnum\next@m@d@pos=0 \else \expandafter\get@next@m@d\m@d@stack \fi
+}
+
+\def\set@part#1{%
+ \def\which@part##1-##2@{\xdef\part@name{##1}\xdef\part@num{##2}}
+ \def\left@foot{%
+ \ifx\current@pos\intr@
+ \xdef\v@rdirect{NW}
+ \else
+ \xdef\v@rdirect{SW}
+ \fi
+ \xdef\v@rlength{6}
+ \loop
+ \ifnum\pos@count=\next@m@d@pos
+ \get@offset@m@d
+ \ifanalyze \do@offset
+ \else
+ \put@res{\x@pos}{\y@pos}
+ \fi
+ \ifnum\pos@count=\next@m@d@pos
+ \else
+ \xdef\subtract@offset{y}
+ \get@offset@m@d
+ \fi
+ \else
+ \ifanalyze \do@offset
+ \else
+ \put@res{\x@pos}{\y@pos}
+ \fi
+ \advance\x@pos by -5
+ \ifx\current@pos\intr@
+ \advance\y@pos by -1
+ \ifnum\loopcount=\part@num
+ \advance\y@pos by -1
+ \fi
+ \else
+ \advance\y@pos by 1
+ \ifnum\loopcount=\part@num
+ \advance\y@pos by 1
+ \fi
+ \fi
+ \fi
+ \advance\loopcount by 1
+ \ifnum\loopcount>\part@num \else\repeat
+ \ifnum\x@pos<\x@min \x@min=\x@pos \fi
+ \ifnum\x@pos>\x@max \x@max=\x@pos \fi
+ \ifnum\y@pos<\y@min \y@min=\y@pos \fi
+ \ifnum\y@pos>\y@max \y@max=\y@pos \fi
+ }
+ \def\right@foot{%
+ \ifx\current@pos\intr@
+ \xdef\v@rdirect{NE}
+ \else
+ \xdef\v@rdirect{SE}
+ \fi
+ \xdef\v@rlength{6}
+ \loop
+ \ifnum\pos@count=\next@m@d@pos
+ \get@offset@m@d
+ \ifanalyze \do@offset
+ \else
+ \put@res{\x@pos}{\y@pos}
+ \fi
+ \ifnum\pos@count=\next@m@d@pos
+ \else
+ \xdef\subtract@offset{y}
+ \get@offset@m@d
+ \fi
+ \else
+ \ifanalyze \do@offset
+ \else
+ \put@res{\x@pos}{\y@pos}
+ \fi
+ \advance\x@pos by -5
+ \ifx\current@pos\intr@
+ \advance\y@pos by 1
+ \ifnum\loopcount=1
+ \advance\y@pos by 1
+ \fi
+ \else
+ \advance\y@pos by -1
+ \ifnum\loopcount=1
+ \advance\y@pos by -1
+ \fi
+ \fi
+ \fi
+ \advance\loopcount by 1
+ \ifnum\loopcount>\part@num \else\repeat
+ \ifnum\x@pos<\x@min \x@min=\x@pos \fi
+ \ifnum\x@pos>\x@max \x@max=\x@pos \fi
+ \ifnum\y@pos<\y@min \y@min=\y@pos \fi
+ \ifnum\y@pos>\y@max \y@max=\y@pos \fi
+ }
+ \def\d@wn{%
+ \ifx\current@pos\intr@
+ \xdef\v@rdirect{W}
+ \else
+ \xdef\v@rdirect{E}
+ \fi
+ \xdef\v@rlength{6}
+ \loop
+ \ifnum\pos@count=\next@m@d@pos
+ \get@offset@m@d
+ \ifanalyze \do@offset
+ \else
+ \put@res{\x@pos}{\y@pos}
+ \fi
+ \ifnum\pos@count=\next@m@d@pos
+ \else
+ \xdef\subtract@offset{y}
+ \get@offset@m@d
+ \fi
+ \else
+ \ifanalyze \do@offset
+ \else
+ \put@res{\x@pos}{\y@pos}
+ \fi
+ \advance\y@pos by -5
+ \fi
+ \advance\loopcount by 1
+ \ifnum\loopcount>\part@num \else\repeat
+ \ifx\loop@inverse\y@
+ \advance\x@pos by -1
+ \else
+ \advance\x@pos by 1
+ \fi
+ \ifanalyze
+ \ifx\loop@inverse\y@
+ \ifx\C@now\y@
+ \else
+ \advance\mem@max by -6
+ \ifnum\x@pos<\x@min \x@min=\x@pos \fi
+ \fi
+ \else
+ \advance\mem@max by 1
+ \ifnum\x@pos>\x@max \x@max=\x@pos \fi
+ \fi
+ \ifnum\y@pos<\y@min \y@min=\y@pos \fi
+ \fi
+ }
+ \def\up@{%
+ \ifx\current@pos\intr@
+ \xdef\v@rdirect{E}
+ \else
+ \xdef\v@rdirect{W}
+ \fi
+ \xdef\v@rlength{6}
+ \loop
+ \ifnum\pos@count=\next@m@d@pos
+ \get@offset@m@d
+ \ifanalyze \do@offset
+ \else
+ \put@res{\x@pos}{\y@pos}
+ \fi
+ \ifnum\pos@count=\next@m@d@pos
+ \else
+ \xdef\subtract@offset{y}
+ \get@offset@m@d
+ \fi
+ \else
+ \ifanalyze \do@offset
+ \else
+ \put@res{\x@pos}{\y@pos}
+ \fi
+ \advance\y@pos by 5
+ \fi
+ \advance\loopcount by 1
+ \ifnum\loopcount>\part@num \else\repeat
+ \ifx\loop@inverse\y@
+ \advance\x@pos by -1
+ \else
+ \advance\x@pos by 1
+ \fi
+ \ifanalyze
+ \ifx\loop@inverse\y@
+ \ifx\C@now\y@
+ \else
+ \advance\mem@max by -6
+ \ifnum\x@pos<\x@min \x@min=\x@pos \fi
+ \fi
+ \else
+ \advance\mem@max by 1
+ \ifnum\x@pos>\x@max \x@max=\x@pos \fi
+ \fi
+ \ifnum\y@pos>\y@max \y@max=\y@pos \fi
+ \fi
+ }
+ \def\right@{%
+ \ifx\current@pos\intr@ \xdef\v@rdirect{S} \else \xdef\v@rdirect{N} \fi
+ \xdef\v@rlength{6}
+ \loop
+ \ifnum\pos@count=\next@m@d@pos
+ \get@offset@m@d
+ \ifanalyze \do@offset
+ \else
+ \put@res{\x@pos}{\y@pos}
+ \fi
+ \ifnum\pos@count=\next@m@d@pos
+ \else
+ \xdef\subtract@offset{y}
+ \get@offset@m@d
+ \fi
+ \else
+ \ifanalyze \do@offset
+ \else
+ \put@res{\x@pos}{\y@pos}
+ \fi
+ \advance\x@pos by 5
+ \fi
+ \advance\loopcount by 1
+ \ifnum\loopcount>\part@num \else\repeat
+ \ifanalyze
+ \ifnum\x@pos>\x@max \x@max=\x@pos \fi
+ \ifnum\y@pos>\y@max \y@max=\y@pos \fi
+ \ifnum\x@pos<\x@min \x@min=\x@pos \fi
+ \ifnum\y@pos<\y@max \y@min=\y@pos \fi
+ \mem@max=\x@max
+ \fi
+ }
+ \def\lip@down##1##2{%
+ \temp@count=\x@pos \advance\temp@count by 4
+ \xdef\first@@{\the\temp@count}
+ \temp@count=\y@pos
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'74}
+ \advance\temp@count by -2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'76}
+ \advance\temp@count by -2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'74}
+ \advance\temp@count by -2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'76}
+ \advance\temp@count by -2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'74}
+ \advance\temp@count by -2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'76}
+ \advance\temp@count by -2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'74}
+ }
+ \def\lip@up##1##2{%
+ \temp@count=\x@pos \advance\temp@count by 4
+ \xdef\first@@{\the\temp@count}
+ \temp@count=\y@pos
+ \advance\temp@count by 2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'74}
+ \advance\temp@count by 2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'76}
+ \advance\temp@count by 2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'74}
+ \advance\temp@count by 2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'76}
+ \advance\temp@count by 2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'74}
+ \advance\temp@count by 2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'76}
+ \advance\temp@count by 2
+ \put(\first@@,\temp@count){\csname lipo\font@num\endcsname\char'74}
+ }
+ \def\set@pos##1/##2[##3;##4],##5@{%
+ \xdef\v@rdirect{##3} \xdef\v@rlength{##4}
+ \xdef\first@{##1}\xdef\second@{##2}\xdef\third@{##5@}
+ \ifx\third@\@t
+ \ifnum\pos@count=\next@m@d@pos
+ \ifx\first@rem@del\y@
+ \ifx\loop@inverse\y@
+ \advance\x@pos by -\first@\relax
+ \else
+ \advance\x@pos by \first@
+ \fi
+ \advance\y@pos by \second@
+ \fi
+ \else
+ \ifx\loop@inverse\y@
+ \advance\x@pos by -\first@\relax
+ \else
+ \advance\x@pos by \first@
+ \fi
+ \advance\y@pos by \second@
+ \fi
+ \ifanalyze
+ \ifnum\y@pos<\y@min \y@min=\y@pos \fi
+ \ifnum\y@pos>\y@max \y@max=\y@pos \fi
+ \ifx\C@now\y@
+ \ifx\loop@inverse\y@
+ \else
+ \mem@max=\x@pos
+ \ifnum\x@pos<\x@min \x@min=\x@pos \fi
+ \ifnum\x@pos>\x@max \x@max=\x@pos \fi
+ \fi
+ \else
+ \mem@max=\x@pos
+ \ifnum\x@pos<\x@min \x@min=\x@pos \fi
+ \ifnum\x@pos>\x@max \x@max=\x@pos \fi
+ \fi
+ \fi
+ \else
+ \ifx\loop@inverse\y@
+ \x@offset=\first@\relax
+ \multiply\x@offset by -1
+ \else
+ \x@offset=\first@
+ \fi
+ \xdef\part@list{\third@}
+ \y@offset=\second@
+ \ifx\subtract@offset\y@
+ \xdef\subtract@offset{n}
+ \multiply\x@offset by -1
+ \advance\x@pos by \x@offset
+ \multiply\x@offset by -1
+ \multiply\y@offset by -1
+ \advance\y@pos by \y@offset
+ \multiply\y@offset by -1
+ \fi
+ \ifnum\pos@count=\next@m@d@pos
+ \ifx\first@rem@del\y@
+ \advance\x@pos by \x@offset
+ \advance\y@pos by \y@offset
+ \xdef\first@rem@del{n}
+ \fi
+ \get@offset@m@d
+ \fi
+ \advance\x@offset by \x@pos
+ \advance\y@offset by \y@pos
+ \ifanalyze
+ \do@offset
+ \ifx\first@rem@del\y@
+ \else
+ \ifnum\pos@count=\next@m@d@pos
+ \else
+ \xdef\first@rem@del{y}
+ \xdef\subtract@offset{y}
+ \get@offset@m@d
+ \fi
+ \fi
+ \ifnum\y@offset<\y@min \y@min=\y@offset \fi
+ \ifnum\y@offset>\y@max \y@max=\y@offset \fi
+ \ifx\C@now\y@
+ \ifx\loop@inverse\y@
+ \else
+ \mem@max=\x@offset
+ \ifnum\x@offset<\x@min \x@min=\x@offset \fi
+ \ifnum\x@offset>\x@max \x@max=\x@offset \fi
+ \fi
+ \else
+ \mem@max=\x@offset
+ \ifnum\x@offset<\x@min \x@min=\x@offset \fi
+ \ifnum\x@offset>\x@max \x@max=\x@offset \fi
+ \fi
+ \else
+ \ifx\lip@\ampers@nd
+ \else
+ \ifx\lip@\down@@ \lip@down{\first@}{\second@}
+ \fi
+ \ifx\lip@\up@@ \lip@up{\first@}{\second@}
+ \fi
+ \fi
+ \put@res{\x@offset}{\y@offset}
+ \ifx\first@rem@del\y@
+ \else
+ \ifnum\pos@count=\next@m@d@pos
+ \else
+ \xdef\first@rem@del{y}
+ \xdef\subtract@offset{y}
+ \get@offset@m@d
+ \fi
+ \fi
+ \fi
+ \expandafter\set@pos\part@list
+ \fi
+ }
+ \xdef\part@name{#1@}
+ \expandafter\which@part\part@name
+ \xdef\first@{down}
+ \loopcount=1
+ \ifx\part@name\first@ \d@wn
+ \else
+ \xdef\first@{up}
+ \ifx\part@name\first@ \up@
+ \else
+ \xdef\first@{right}
+ \ifx\part@name\first@ \right@
+ \else
+ \xdef\first@{leftfoot}
+ \ifx\part@name\first@ \left@foot
+ \else
+ \xdef\first@{rightfoot}
+ \ifx\part@name\first@ \right@foot
+ \else
+ \xdef\lip@{&}
+ \ifnum\part@num=1
+ \expandafter\ifx\csname lip@\the\pos@count\endcsname\y@
+ \ifx\current@pos\intr@ \xdef\lip@{up}
+ \else \xdef\lip@{down}
+ \fi
+ \fi
+ \fi
+ \xdef\part@list{\csname #1\endcsname}
+ \expandafter\set@pos\part@list
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+}
+
+\def\MR@#1{%
+ \ifx\current@pos\intr@
+ \xdef\tr@ns{io}
+ \xdef\current@pos{extra}
+ \else
+ \xdef\tr@ns{oi}
+ \xdef\current@pos{intra}
+ \fi
+ \expandafter\set@part{M\tr@ns-#1}
+ \xdef\prev@TM{y}
+ \ifnum\mem@low=-99999 \xdef\mem@low{\the\y@min} \fi
+ \ifnum\mem@high=-99999 \xdef\mem@high{\the\y@max} \fi
+ \ifanalyze\else
+ \advance\TM@@count by 1
+ \message{- TM\the\TM@@count}
+ \advance\TM@@count by -1
+ \fi
+}
+
+\def\do@firstloops{%
+ \ifnum\iloopcount=\middle@loop
+ \else
+ \advance\iloopcount by 1
+ \ifx\current@pos\intr@
+ \advance\x@pos by 1
+ \advance\y@pos by 3
+ \set@part{iNterm-2}
+ \else
+ \advance\x@pos by 1
+ \advance\y@pos by -3
+ \set@part{oNterm-2}
+ \fi
+ \advance\x@pos by 1
+ \expandafter\h@lf{\length@loops}
+ \advance\x@pos by 1
+ \ifx\current@pos\intr@
+ \set@part{iCterm-2}
+ \else
+ \set@part{oCterm-2}
+ \fi
+ \do@firstloops
+ \fi
+}
+
+\def\do@secloops{%
+ \ifnum\iloopcount>\num@loops
+ \else
+ \advance\iloopcount by 1
+ \ifx\current@pos\intr@
+ \advance\x@pos by 1
+ \advance\y@pos by 3
+ \set@part{iNterm-2}
+ \else
+ \advance\x@pos by 1
+ \advance\y@pos by -3
+ \set@part{oNterm-2}
+ \fi
+ \advance\x@pos by 1
+ \expandafter\h@lf{\length@loops}
+ \advance\x@pos by 1
+ \ifx\current@pos\intr@
+ \set@part{iCterm-2}
+ \else
+ \set@part{oCterm-2}
+ \fi
+ \do@secloops
+ \fi
+}
+
+\def\calc@mult@loop{%
+ \temp@count=\first@
+ \advance\temp@count by -\outer@loop
+ \xdef\inner@loops{\the\temp@count}
+ \loopcount=\temp@count
+ \advance\loopcount by -1
+ \divide\loopcount by \inner@loop\relax
+ \divide\temp@count by \inner@loop\relax
+ \ifnum\loopcount=\temp@count \advance\temp@count by 1 \fi
+ \ifnum\old@loops>0 \temp@count=\old@loops\relax \fi
+ \xdef\num@loops{\the\temp@count} %%% number of inner loops
+ \temp@count=\inner@loops
+ \divide\temp@count by \num@loops
+ \xdef\length@loops{\the\temp@count} %%% length of inner loops with extraloop
+ \temp@count=\num@loops
+ \loopcount=\temp@count
+ \advance\loopcount by -1\relax
+ \divide\loopcount by 2\relax
+ \divide\temp@count by 2\relax
+ \ifnum\loopcount=\temp@count \advance\temp@count by 1 \fi
+ \xdef\middle@loop{\the\temp@count} %%% middle loop number
+ \temp@count=\num@loops
+ \advance\temp@count by -1
+ \multiply\temp@count by -\length@loops\relax
+ \loopcount=\first@
+ \advance\loopcount by -\outer@loop
+ \advance\loopcount by \temp@count
+ \advance\loopcount by -4
+ \xdef\middle@length{\the\loopcount} %%% length of middle loop
+ \temp@count=\length@loops
+ \advance\temp@count by -4
+ \xdef\length@loops{\the\temp@count} %%% length of inner loops
+}
+
+\def\mult@loop#1{%
+ \xdef\first@{#1}
+ \calc@mult@loop
+ \ifx\current@pos\intr@
+ \expandafter\set@part{down-\outer@straight}
+ \set@part{iCterm-2}
+ \else
+ \expandafter\set@part{up-\outer@straight}
+ \set@part{oCterm-2}
+ \fi
+ \iloopcount=1
+ \ifnum\middle@loop>1 \do@firstloops \fi
+ \ifnum\middle@length>0
+ \ifx\current@pos\intr@
+ \advance\x@pos by 1
+ \advance\y@pos by 3
+ \set@part{iNterm-2}
+ \else
+ \advance\x@pos by 1
+ \advance\y@pos by -3
+ \set@part{oNterm-2}
+ \fi
+ \advance\x@pos by 1
+ \expandafter\h@lf{\middle@length}
+ \advance\x@pos by 1
+ \ifx\current@pos\intr@
+ \set@part{iCterm-2}
+ \else
+ \set@part{oCterm-2}
+ \fi
+ \else
+ \loopcount=\middle@length
+ \advance\loopcount by 4
+ \xdef\updown@num{\the\loopcount}
+ \expandafter\set@part{right-\updown@num}
+ \advance\x@pos by -2
+ \fi
+ \advance\iloopcount by 1
+ \do@secloops
+ \ifx\current@pos\intr@
+ \advance\x@pos by 1
+ \advance\y@pos by 3
+ \set@part{iNterm-2}
+ \expandafter\set@part{up-\outer@straight}
+ \else
+ \advance\x@pos by 1
+ \advance\y@pos by -3
+ \set@part{oNterm-2}
+ \expandafter\set@part{down-\outer@straight}
+ \fi
+}
+
+\def\do@Ntermloops{%
+ \ifx\current@pos\intr@
+ \set@part{oloop-4}
+ \expandafter\set@part{down-\inner@straight}
+ \xdef\current@pos{extra}
+ \else
+ \set@part{iloop-4}
+ \expandafter\set@part{up-\inner@straight}
+ \xdef\current@pos{intra}
+ \fi
+ \advance\iloopcount by 1
+ \ifnum\iloopcount>\num@loops\else\do@Ntermloops\fi
+}
+
+\def\mult@Nterm#1{%
+ \xdef\hold@pos{\current@pos}
+ \temp@count=#1
+ \advance\temp@count by -\outer@length
+ \advance\temp@count by -2
+ \xdef\inner@loops{\the\temp@count}
+ \loopcount=\inner@straight
+ \advance\loopcount by 4
+ \divide\temp@count by \loopcount\relax
+ \xdef\num@loops{\the\temp@count} %%% number of inner loops
+ \multiply\loopcount by -\num@loops
+ \temp@count=\inner@loops
+ \advance\temp@count by \loopcount
+ \xdef\last@loop{\the\temp@count}
+ \ifodd\num@loops
+ \else
+ \ifx\current@pos\intr@
+ \xdef\current@pos{extra}
+ \else
+ \xdef\current@pos{intra}
+ \fi
+ \fi
+ \ifnum\last@loop<4
+ \ifx\current@pos\intr@
+ \ifnum\last@loop<1
+ \else
+ \expandafter\set@part{iNterm-\last@loop}
+ \fi
+ \else
+ \ifnum\last@loop<1
+ \else
+ \expandafter\set@part{oNterm-\last@loop}
+ \fi
+ \fi
+ \else
+ \loopcount=\last@loop
+ \advance\loopcount by -3
+ \xdef\updown@num{\the\loopcount}
+ \ifx\current@pos\intr@
+ \set@part{iNterm-3}
+ \expandafter\set@part{up-\updown@num}
+ \else
+ \set@part{oNterm-3}
+ \expandafter\set@part{down-\updown@num}
+ \fi
+ \fi
+ \ifnum\num@loops>0 \iloopcount=1 \do@Ntermloops \fi
+ \ifx\current@pos\intr@
+ \ifnum\last@loop<0
+ \set@part{oloop-3}
+ \else
+ \set@part{oloop-4}
+ \fi
+ \expandafter\set@part{down-\outer@straight}
+ \xdef\current@pos{extra}
+ \else
+ \ifnum\last@loop<0
+ \set@part{iloop-3}
+ \else
+ \set@part{iloop-4}
+ \fi
+ \expandafter\set@part{up-\outer@straight}
+ \xdef\current@pos{intra}
+ \fi
+ \xdef\current@pos{\hold@pos}
+ \ifx\current@pos\intr@
+ \xdef\mem@low{\the\y@max}
+ \xdef\mem@high{-99999}
+ \else
+ \xdef\mem@high{\the\y@min}
+ \xdef\mem@low{-99999}
+ \fi
+}
+
+\def\do@Ctermloops{%
+ \ifx\current@pos\intr@
+ \expandafter\set@part{down-\inner@straight}
+ \set@part{iloop-4}
+ \xdef\current@pos{extra}
+ \else
+ \expandafter\set@part{up-\inner@straight}
+ \set@part{oloop-4}
+ \xdef\current@pos{intra}
+ \fi
+ \advance\iloopcount by 1
+ \ifnum\iloopcount>\num@loops\else\do@Ctermloops\fi
+}
+
+\def\mult@Cterm#1{%
+ \xdef\hold@pos{\current@pos}
+ \temp@count=#1
+ \advance\temp@count by -\outer@length
+ \advance\temp@count by -2
+ \xdef\inner@loops{\the\temp@count}
+ \loopcount=\inner@straight
+ \advance\loopcount by 4
+ \divide\temp@count by \loopcount\relax
+ \xdef\num@loops{\the\temp@count} %%% number of inner loops
+ \multiply\loopcount by -\num@loops
+ \temp@count=\inner@loops
+ \advance\temp@count by \loopcount
+ \xdef\last@loop{\the\temp@count}
+ \ifx\current@pos\intr@
+ \expandafter\set@part{down-\outer@straight}
+ \set@part{iloop-4}
+ \xdef\current@pos{extra}
+ \else
+ \expandafter\set@part{up-\outer@straight}
+ \set@part{oloop-4}
+ \xdef\current@pos{intra}
+ \fi
+ \ifnum\num@loops>0 \iloopcount=1 \do@Ctermloops \fi
+ \ifnum\last@loop<4
+ \ifx\current@pos\intr@
+ \ifnum\last@loop<1
+ \else
+ \expandafter\set@part{iCterm-\last@loop}
+ \fi
+ \else
+ \ifnum\last@loop<1
+ \else
+ \expandafter\set@part{oCterm-\last@loop}
+ \fi
+ \fi
+ \else
+ \loopcount=\last@loop
+ \advance\loopcount by -3
+ \xdef\updown@num{\the\loopcount}
+ \ifx\current@pos\intr@
+ \expandafter\set@part{down-\updown@num}
+ \set@part{iCterm-3}
+ \else
+ \expandafter\set@part{up-\updown@num}
+ \set@part{oCterm-3}
+ \fi
+ \fi
+ \xdef\Cterm@up{\current@pos}
+ \xdef\current@pos{\hold@pos}
+}
+
+\def\do@footed@loop#1{%
+ \xdef\first@{left}
+ \ifx\foot@direct\first@
+ \loopcount=\neck@length\relax
+ \divide\loopcount by -2\relax
+ \xdef\first@{\the\loopcount}
+ \ifx\current@pos\intr@
+ \expandafter\set@part{down-\first@}
+ \advance\y@pos by 1\relax
+ \else
+ \expandafter\set@part{up-\first@}
+ \advance\y@pos by -1\relax
+ \fi
+ \advance\x@pos by -4\relax
+ \loopcount=-3\relax
+ \innerloopcount=\num@loops\relax
+ \multiply\innerloopcount by 5\relax
+ \advance\loopcount by \innerloopcount\relax
+ \xdef\first@{\the\loopcount}
+ \expandafter\set@part{leftfoot-\first@}
+ \advance\x@pos by 2\relax
+ \ifx\current@pos\intr@
+ \advance\y@pos by -3\relax
+ \else
+ \advance\y@pos by 3\relax
+ \fi
+ \expandafter\mult@loop{\updown@num}
+ \loopcount=\neck@length\relax
+ \divide\loopcount by -2\relax
+ \advance\loopcount by \num@loops\relax
+ \xdef\first@{\the\loopcount}
+ \advance\x@pos by -1\relax
+ \ifx\current@pos\intr@
+ \expandafter\set@part{up-\first@}
+ \else
+ \expandafter\set@part{down-\first@}
+ \fi
+ \else
+ \xdef\first@{right}
+ \ifx\foot@direct\first@
+ \loopcount=\neck@length\relax
+ \divide\loopcount by -2\relax
+ \advance\loopcount by \old@loops\relax
+ \xdef\first@{\the\loopcount}
+ \ifx\current@pos\intr@
+ \expandafter\set@part{down-\first@}
+ \else
+ \expandafter\set@part{up-\first@}
+ \fi
+ \advance\x@pos by -1\relax
+ \expandafter\mult@loop{\updown@num}
+ \advance\x@pos by -3\relax
+ \ifx\current@pos\intr@
+ \advance\y@pos by -1\relax
+ \else
+ \advance\y@pos by 1\relax
+ \fi
+ \loopcount=-3\relax
+ \innerloopcount=\num@loops\relax
+ \multiply\innerloopcount by 5\relax
+ \advance\loopcount by \innerloopcount\relax
+ \xdef\first@{\the\loopcount}
+ \expandafter\set@part{rightfoot-\first@}
+ \advance\x@pos by 2\relax
+ \ifx\current@pos\intr@
+ \advance\y@pos by 3\relax
+ \else
+ \advance\y@pos by -3\relax
+ \fi
+ \loopcount=\neck@length\relax
+ \divide\loopcount by -2\relax
+ \xdef\first@{\the\loopcount}
+ \ifx\current@pos\intr@
+ \expandafter\set@part{up-\first@}
+ \else
+ \expandafter\set@part{down-\first@}
+ \fi
+ \else
+ \loopcount=\neck@length\relax
+ \divide\loopcount by -2\relax
+ \xdef\first@{\the\loopcount}
+ \ifx\current@pos\intr@
+ \expandafter\set@part{down-\first@}
+ \else
+ \expandafter\set@part{up-\first@}
+ \fi
+ \advance\x@pos by -3\relax
+ \xdef\first@{0}
+ \innerloopcount=#1\relax
+ \advance\innerloopcount by \neck@length\relax
+ \ifodd\innerloopcount \xdef\first@{1} \fi
+ \divide\innerloopcount by 2
+ \xdef\f@@ting{\the\innerloopcount}
+ \advance\innerloopcount by \first@\relax
+ \xdef\first@{\the\innerloopcount}
+ \expandafter\set@part{leftfoot-\first@}
+ \advance\x@pos by 1\relax
+ \ifodd\f@@ting
+ \ifx\current@pos\intr@
+ \advance\y@pos by -2\relax
+ \else
+ \advance\y@pos by 2\relax
+ \fi
+ \else
+ \ifx\current@pos\intr@
+ \advance\y@pos by -3\relax
+ \else
+ \advance\y@pos by 3\relax
+ \fi
+ \fi
+ \expandafter\mult@loop{\updown@num}
+ \advance\x@pos by -3\relax
+ \expandafter\set@part{rightfoot-\f@@ting}
+ \advance\x@pos by 2\relax
+ \ifx\current@pos\intr@
+ \advance\y@pos by 3\relax
+ \else
+ \advance\y@pos by -3\relax
+ \fi
+ \loopcount=\neck@length\relax
+ \divide\loopcount by -2\relax
+ \xdef\first@{\the\loopcount}
+ \ifx\current@pos\intr@
+ \expandafter\set@part{up-\first@}
+ \else
+ \expandafter\set@part{down-\first@}
+ \fi
+ \fi\fi
+}
+
+\def\l@@p#1{%
+ \xdef\old@loops{0}
+ \loopcount=#1 \xdef\res@loop{\the\loopcount}
+ \ifnum\loopcount<8
+ \ifnum\loopcount<3
+ \loopcount=\pos@count
+ \advance\loopcount by -1
+ \expandafter\ifx\csname lip@\the\loopcount\endcsname\y@
+ \advance\x@pos by -1
+ \fi
+ \fi
+ \ifx\current@pos\intr@
+ \ifx\prev@TM\n@
+ \expandafter\set@part{iloop-#1}
+\else
+ \ifnum#1>5 \advance\x@pos by 1 \fi
+ \expandafter\set@part{iTMloop-#1}
+\fi
+ \else
+ \ifx\next@TM\n@
+ \expandafter\set@part{oloop-#1}
+\else
+ \ifnum#1>5 \advance\x@pos by 1 \fi
+ \expandafter\set@part{oTMloop-#1}
+\fi
+ \fi
+ \else
+ \ifnum\loopcount>\outer@loop
+ \xdef\updown@num{\the\loopcount}
+ \ifx\foot@\y@
+ \ifanalyze
+ \else
+ \expandafter\xdef\csname foot@\the\TM@@count\endcsname{}
+ \fi
+ \ifx\foot@direct\center@
+ \advance\loopcount by -2\relax
+ \else
+ \advance\loopcount by -3\relax
+ \fi
+ \advance\loopcount by \neck@length\relax
+ \xdef\first@{\the\loopcount}
+ \ifnum\first@>\outer@loop
+ \loopcount=\outer@loop\relax
+ \advance\loopcount by -4\relax
+ \xdef\inner@loop{\the\loopcount}
+ \loopcount=\outer@length\relax
+ \advance\loopcount by -2\relax
+ \xdef\inner@length{\the\loopcount}
+ \loopcount=\outer@straight\relax
+ \advance\loopcount by -2\relax
+ \xdef\inner@straight{\the\loopcount}
+ \calc@mult@loop
+ \loopcount=\first@\relax
+ \innerloopcount=\num@loops\relax
+ \advance\innerloopcount by -1\relax
+ \ifx\foot@direct\center@
+ \multiply\innerloopcount by -5\relax
+ \else
+ \multiply\innerloopcount by -6\relax
+ \fi
+ \advance\loopcount by \innerloopcount\relax
+ \xdef\first@{\the\loopcount}
+ \calc@mult@loop
+ \xdef\old@loops{\num@loops}
+ \loopcount=\first@\relax
+ \ifx\foot@direct\center@
+ \advance\loopcount by 5\relax
+ \else
+ \advance\loopcount by 6\relax
+ \fi
+ \xdef\first@{\the\loopcount}
+ \innerloopcount=\num@loops\relax
+ \advance\innerloopcount by -1\relax
+ \ifx\foot@direct\center@
+ \multiply\innerloopcount by -5\relax
+ \else
+ \multiply\innerloopcount by -6\relax
+ \fi
+ \calc@mult@loop
+ \ifx\foot@direct\center@
+ \advance\innerloopcount by -2\relax
+ \else
+ \advance\innerloopcount by -3\relax
+ \fi
+ \advance\innerloopcount by \neck@length\relax
+ \multiply\innerloopcount by -1
+ \ifnum\old@loops<\num@loops
+ \loopcount=\inner@loop\relax
+ \advance\loopcount by 4\relax
+ \xdef\inner@loop{\the\loopcount}
+ \loopcount=\inner@length\relax
+ \advance\loopcount by 2\relax
+ \xdef\inner@length{\the\loopcount}
+ \loopcount=\inner@straight\relax
+ \advance\loopcount by 2\relax
+ \xdef\inner@straight{\the\loopcount}
+ \fi
+ \loopcount=\updown@num\relax
+ \advance\loopcount by -\innerloopcount\relax
+ \xdef\updown@num{\the\loopcount}
+ \expandafter\do@footed@loop{\the\innerloopcount}
+ \xdef\old@loops{0}
+ \else
+ \loopcount=\updown@num
+ \expandafter\mult@loop{\updown@num}
+ \fi
+ \else
+ \loopcount=\updown@num
+ \expandafter\mult@loop{\updown@num}
+ \fi
+ \else
+ \ifodd\loopcount
+ \advance\loopcount by -7\relax
+ \divide\loopcount by 2\relax
+ \xdef\updown@num{\the\loopcount}
+ \ifx\current@pos\intr@
+ \expandafter\set@part{down-\updown@num}
+ \ifx\prev@TM\n@
+ \expandafter\set@part{iloop-7}
+ \else
+ \expandafter\set@part{iTMloop-7}
+ \fi
+ \expandafter\set@part{up-\updown@num}
+ \else
+ \expandafter\set@part{up-\updown@num}
+ \ifx\next@TM\n@
+ \expandafter\set@part{oloop-7}
+ \else
+ \expandafter\set@part{oTMloop-7}
+ \fi
+ \expandafter\set@part{down-\updown@num}
+ \fi
+ \else
+ \advance\loopcount by -6\relax
+ \divide\loopcount by 2\relax
+ \xdef\updown@num{\the\loopcount}
+ \ifx\current@pos\intr@
+ \expandafter\set@part{down-\updown@num}
+ \ifx\prev@TM\n@
+ \expandafter\set@part{iloop-6}
+ \else
+ \expandafter\set@part{iTMloop-6}
+ \fi
+ \expandafter\set@part{up-\updown@num}
+ \else
+ \expandafter\set@part{up-\updown@num}
+ \ifx\next@TM\n@
+ \expandafter\set@part{oloop-6}
+ \else
+ \expandafter\set@part{oTMloop-6}
+ \fi
+ \expandafter\set@part{down-\updown@num}
+ \fi
+ \fi
+ \fi
+ \fi
+}
+
+\def\h@lf#1{%
+ \loopcount=#1
+ \ifnum\loopcount<7
+ \ifx\current@pos\intr@
+ \expandafter\set@part{ihalf-#1}
+ \else
+ \expandafter\set@part{ohalf-#1}
+ \fi
+ \else
+ \temp@count=#1 \divide\temp@count by 2
+ \advance\loopcount by 1 \divide\loopcount by 2
+ \advance\x@pos by -1
+ \ifnum\loopcount=\temp@count
+ \loopcount=#1
+ \advance\loopcount by -6
+ \divide\loopcount by 2
+ \xdef\updown@num{\the\loopcount}
+ \ifx\current@pos\intr@
+ \expandafter\set@part{up-\updown@num}
+ \set@part{ihalf-6}
+ \expandafter\set@part{down-\updown@num}
+ \else
+ \expandafter\set@part{down-\updown@num}
+ \set@part{ohalf-6}
+ \expandafter\set@part{up-\updown@num}
+ \fi
+ \else
+ \loopcount=#1
+ \advance\loopcount by -5
+ \divide\loopcount by 2\relax
+ \xdef\updown@num{\the\loopcount}
+ \ifx\current@pos\intr@
+ \expandafter\set@part{up-\updown@num}
+ \set@part{ihalf-5}
+ \expandafter\set@part{down-\updown@num}
+ \else
+ \expandafter\set@part{down-\updown@num}
+ \set@part{ohalf-5}
+ \expandafter\set@part{up-\updown@num}
+ \fi
+ \fi
+ \advance\x@pos by -1
+ \fi
+}
+
+\def\N@term#1{%
+ \loopcount=#1
+ \xdef\mem@low{0} \xdef\mem@high{0}
+ \ifnum\loopcount<4
+ \ifx\current@pos\intr@
+ \ifnum\loopcount<1
+ \xdef\mem@low{0}
+ \xdef\mem@high{-99999}
+ \else
+ \expandafter\set@part{iNterm-#1}
+ \xdef\mem@low{\the\y@max}
+ \xdef\mem@high{-99999}
+ \fi
+ \else
+ \ifnum\loopcount<1
+ \xdef\mem@high{0}
+ \xdef\mem@low{-99999}
+ \else
+ \expandafter\set@part{oNterm-#1}
+ \temp@count=\y@min \advance\temp@count by -5
+ \xdef\mem@high{\the\temp@count}
+ \xdef\mem@low{-99999}
+ \fi
+ \fi
+ \else
+ \advance\loopcount by -3
+ \xdef\updown@num{\the\loopcount}
+ \ifx\current@pos\intr@
+ \set@part{iNterm-3}
+ \expandafter\set@part{up-\updown@num}
+ \xdef\mem@low{\the\y@max}
+ \xdef\mem@high{-99999}
+ \else
+ \set@part{oNterm-3}
+ \expandafter\set@part{down-\updown@num}
+ \xdef\mem@high{\the\y@min}
+ \xdef\mem@low{-99999}
+ \fi
+ \fi
+}
+
+\def\C@term#1{%
+ \loopcount=#1
+ \ifnum\loopcount<4
+ \ifx\current@pos\intr@
+ \expandafter\set@part{iCterm-#1}
+ \xdef\Cterm@up{intra}
+ \else
+ \expandafter\set@part{oCterm-#1}
+ \xdef\Cterm@up{extra}
+ \fi
+ \else
+ \advance\loopcount by -3
+ \xdef\updown@num{\the\loopcount}
+ \ifx\current@pos\intr@
+ \expandafter\set@part{down-\updown@num}
+ \set@part{iCterm-3}
+ \xdef\Cterm@up{intra}
+ \else
+ \expandafter\set@part{up-\updown@num}
+ \set@part{oCterm-3}
+ \xdef\Cterm@up{extra}
+ \fi
+ \fi
+}
+
+\def\get@@fromstack#1;#2;#3@{%
+ \xdef\first@{#1} \xdef\second@{#2}\xdef\last@{#3@}
+}
+
+\def\sort@Mstack{%
+ \expandafter\get@@fromstack\last@
+ \ifx\first@\ampers@nd
+ \xdef\tmpstack{\tmpstack\st@rt;\st@p;&;&;@}
+ \else
+ \ifnum\st@rt<\second@
+ \xdef\tmpstack{\tmpstack\st@rt;\st@p;\first@;\second@;\last@}
+ \else
+ \xdef\tmpstack{\tmpstack\first@;\second@;}
+ \sort@Mstack
+ \fi\fi
+}
+
+\def\get@Mregions#1..#2,#3@{%
+ \xdef\st@rt{#1} \xdef\st@p{#2} \xdef\list@{#3}
+ \loopcount=\st@p\relax \advance\loopcount by -\st@rt\relax
+ \ifnum\loopcount>12 \xdef\TM{y} \fi
+ \ifnum\loopcount>35
+ \advance\loopcount by 1
+ \PackageError{TeXtopo}
+ {Transmembrane domain > 36aa (\st@rt..\st@p\space= \the\loopcount)}
+ {\MessageBreak
+ The length of the membrane regions must be in the\MessageBreak
+ range between 14-36 residues for TMs or below 14\MessageBreak
+ for half loops. \MessageBreak
+ I have set your range definition to 36 residues\MessageBreak
+ in order to be able to finish the topology plot.\MessageBreak
+ Hit <return> to proceed with the new setting or\MessageBreak
+ Type X <return> to quit. \MessageBreak
+}
+ \loopcount=\st@rt \advance\loopcount by 35\relax
+ \xdef\st@p{\the\loopcount}
+ \fi
+ \xdef\last@{\M@stack}
+ \xdef\tmpstack{}
+ \sort@Mstack
+ \xdef\M@stack{\tmpstack}
+}
+
+\def\get@Apositions#1,#2@{%
+ \xdef\list@@{#2}
+ \MRs{#1..#1}
+ \loopcount=#1
+ \advance\loopcount by -1
+ \expandafter\xdef\csname lip@\the\loopcount\endcsname{y}
+ \ifx\list@@\ampers@nd
+ \else
+ \xdef\list@@{\list@@ @}
+ \expandafter\get@Apositions\list@@
+ \fi
+}
+
+\def\second@color#1,&{\xdef\back@color{#1}}
+
+\def\two@color#1,#2@{%
+ \xdef\first@{#1}
+ \xdef\second@{#2}
+ \ifx\first@\ampers@nd
+ \else
+ \xdef\frame@color{#1}
+ \ifx\second@\ampers@nd
+ \xdef\back@color{#1}
+ \else
+ \expandafter\second@color\second@
+ \fi
+ \fi
+}
+
+\def\get@spec@pos#1;#2;#3;#4;#5;#6;#7;#8@{%
+ \xdef\x@x{#1} \xdef\y@y{#2}
+ \xdef\style@c@l{#3}
+ \xdef\b@ck{#4} \xdef\fr@me{#5} \xdef\f@nt{#6}
+ \xdef\ch@r{#7}
+ \xdef\label@stack{#8@}
+}
+
+\def\get@spec@lab#1;#2;#3;#4;#5;#6@{%
+ \global\xdef\v@rdirect{#1}
+ \global\xdef\length@{#2}
+ \xdef\l@bel{#3&}
+ \ifx\l@bel\ampers@nd\else\xdef\l@bel{#3}\fi
+ \xdef\num@{#4}
+ \xdef\p@s{#5}
+ \xdef\label@stack{#6@}
+}
+
+\def\do@topo{%
+ \xdef\prev@st@p{\st@p}
+ \expandafter\get@@fromstack\M@stack
+ \xdef\next@TM{n}
+ \xdef\st@rt{\first@} \xdef\st@p{\second@}
+ \xdef\M@stack{\last@}
+ \ifx\st@rt\ampers@nd
+ \loopcount=\seq@length
+ \advance\loopcount by -\prev@st@p\relax
+ \ifx\current@pos\intr@
+ \else
+ \advance\loopcount by 1
+ \fi
+ \xdef\updown@num{\the\loopcount}
+ \ifx\l@@pC\y@ \xdef\first@@{C} \else \xdef\first@@{0} \fi
+ \ifanalyze
+ \else
+ \xdef\x@before{\the\x@pos}
+ \xdef\l@@pC{}
+ \fi
+ \xdef\inner@loop{\csname inner@loop\first@@\endcsname}
+ \xdef\inner@length{\csname inner@length\first@@\endcsname}
+ \xdef\inner@straight{\csname inner@straight\first@@\endcsname}
+ \xdef\outer@loop{\csname outer@loop\first@@\endcsname}
+ \xdef\outer@length{\csname outer@length\first@@\endcsname}
+ \xdef\outer@straight{\csname outer@straight\first@@\endcsname}
+ \ifx\C@inverse\y@ \xdef\loop@inverse{y} \fi
+ \xdef\C@now{y}
+ \ifnum\loopcount>\outer@length
+ \expandafter\mult@Cterm{\updown@num}
+ \else
+ \ifnum\updown@num>0
+ \expandafter\C@term{\updown@num}
+ \fi
+ \fi
+ \advance\x@pos by 1
+ \ifx\Cterm@up\intr@
+ \advance\y@pos by 5
+ \else
+ \advance\y@pos by -1
+ \fi
+ \ifanalyze
+ \ifx\C@inverse\y@
+ \ifx\current@pos\intr@
+ \advance\mem@max by 17
+ \ifnum\TM@length>18 \advance\mem@max by 5 \fi
+ \ifnum\TM@length>23 \advance\mem@max by 5 \fi
+ \else
+ \advance\mem@max by 5
+ \fi
+ \else
+ \advance\mem@max by 14
+ \fi
+ \else
+ \ifx\hide@COOH\y@
+ \else
+ \ifx\C@inverse\y@
+ \loopcount=\x@pos
+ \advance\loopcount by -9
+ \put(\loopcount,\y@pos){\raisebox{0.01\unit@length}{%
+ \csname sfdc\font@num\endcsname{HOOC--\,}}}
+ \else
+ \put(\x@pos,\y@pos){\raisebox{0.1\unit@length}{%
+ \csname sfdc\font@num\endcsname{\,--COOH}}}
+ \fi
+ \fi
+ \message{- C)}
+ \fi
+ \xdef\C@now{n}
+ \xdef\loop@inverse{n}
+ \else
+ \loopcount=\st@p
+ \advance\loopcount by -\st@rt
+ \advance\loopcount by 1
+ \ifnum\loopcount>13
+\xdef\next@TM{y}
+\xdef\TM@length{\the\loopcount}
+ \fi
+ \loopcount=\st@rt
+ \advance\loopcount by -\prev@st@p
+ \advance\loopcount by -1
+ \ifnum\loopcount>0
+ \xdef\updown@num{\the\loopcount}
+ \ifanalyze\else\xdef\x@before{\the\x@pos}\fi
+ \l@@p{\updown@num}
+ \ifanalyze
+ \else
+ \ifx\half@\y@ \xdef\half@{n}
+ \else
+ \loop@calc=\x@pos
+ \advance\loop@calc by \x@before
+ \advance\loop@calc by 5
+ \divide\loop@calc by 2
+ \ifodd\res@loop \advance\loop@calc by -1\fi
+ \advance\loop@@count by 1
+ \expandafter\xdef\csname x@label\the\loop@@count\endcsname{%
+ \the\loop@calc}
+ \loop@calc=\y@offset
+ \ifx\current@pos\intr@
+ \advance\loop@calc by -13
+ \ifodd\res@loop
+ \ifnum\res@loop>\outer@loop
+ \else
+ \advance\loop@calc by -4
+ \fi
+ \fi
+ \expandafter\xdef\csname y@label\the\loop@@count\endcsname{%
+ \the\loop@calc}
+ \else
+ \advance\loop@calc by 15
+ \ifodd\res@loop
+ \ifnum\res@loop>\outer@loop
+ \else
+ \advance\loop@calc by 4
+ \fi
+ \fi
+ \expandafter\xdef\csname y@label\the\loop@@count\endcsname{%
+ \the\loop@calc}
+ \fi
+ \fi
+ \fi
+ \else
+ \advance\x@pos by -2
+ \ifx\current@pos\intr@
+ \advance\y@pos by 5
+ \else
+ \advance\y@pos by -5
+ \fi
+ \fi
+ \loopcount=\st@p
+ \advance\loopcount by -\st@rt
+ \advance\loopcount by 1
+ \xdef\updown@num{\the\loopcount}
+ \ifnum\loopcount<14
+ \ifanalyze\else\xdef\x@before{\the\x@pos}\fi
+ \expandafter\h@lf{\updown@num}
+\xdef\prev@TM{n}
+ \ifanalyze
+ \else
+ \xdef\half@{y}
+ \loop@calc=\x@pos
+ \advance\loop@calc by \x@before
+ \advance\loop@calc by 5
+ \divide\loop@calc by 2
+ \ifodd\res@loop\else \advance\loop@calc by -1\fi
+ \expandafter\xdef\csname x@label\the\loop@@count\endcsname{%
+ \the\loop@calc}
+ \ifx\current@pos\intr@
+ \loop@calc=\lab@low
+ \advance\loop@calc by -15
+ \expandafter\xdef\csname y@label\the\loop@@count\endcsname{%
+ \the\loop@calc}
+ \else
+ \loop@calc=\lab@high
+ \advance\loop@calc by 10
+ \expandafter\xdef\csname y@label\the\loop@@count\endcsname{%
+ \the\loop@calc}
+ \fi
+ \fi
+ \else
+ \ifanalyze\else\xdef\x@before{\the\x@pos}\fi
+ \expandafter\MR@{\updown@num}
+ \advance\TM@@count by 1
+ \expandafter\ifx\csname l@@p\the\TM@@count\endcsname\y@
+ \xdef\first@@{\the\TM@@count} \else \xdef\first@@{0} \fi
+ \xdef\inner@loop{\csname inner@loop\first@@\endcsname}
+ \xdef\inner@length{\csname inner@length\first@@\endcsname}
+ \xdef\inner@straight{\csname inner@straight\first@@\endcsname}
+ \xdef\outer@loop{\csname outer@loop\first@@\endcsname}
+ \xdef\outer@length{\csname outer@length\first@@\endcsname}
+ \xdef\outer@straight{\csname outer@straight\first@@\endcsname}
+\expandafter\ifx\csname foot@\the\TM@@count\endcsname\y@
+ \xdef\foot@direct{\csname foot@direct\the\TM@@count\endcsname}
+ \xdef\neck@length{\csname neck@length\the\TM@@count\endcsname}
+\fi
+\xdef\foot@{\csname foot@\the\TM@@count\endcsname}
+ \ifanalyze
+ \else
+ \expandafter\xdef\csname l@@p\first@@\endcsname{}
+ \loop@calc=\x@pos
+ \advance\loop@calc by \x@before
+ \advance\loop@calc by 5
+ \divide\loop@calc by 2
+ \advance\loop@calc by -2
+ \expandafter\xdef\csname x@TMlabel\the\TM@@count\endcsname{%
+ \the\loop@calc}
+ \loop@calc=\lab@high
+ \advance\loop@calc by 3
+ \expandafter\xdef\csname y@TMlabel\the\TM@@count\endcsname{%
+ \the\loop@calc}
+ \fi
+ \fi
+ \fi
+ \ifx\last@\@t \else \do@topo \fi
+}
+
+\def\get@direction#1,#2@{%
+ \xdef\first@{#1}
+ \ifx\first@\ampers@nd \xdef\directi@n{&} \else\xdef\directi@n{#1}\fi
+ \xdef\first@{#2}
+ \ifx\first@\ampers@nd \xdef\length@{&} \else\xdef\length@{#2}\fi
+}
+
+\def\getregion@fromlstack{%
+ \expandafter\get@fromlstack\lst@ck
+ \xdef\start@{\first@}
+ \xdef\stop@{\second@}
+ \xdef\directi@n{\third@}
+ \xdef\length@{\fourth@}
+ \ifx\first@\ampers@nd
+ \xdef\stretch@{99999}
+ \else
+ \temp@count=\stop@
+ \advance\temp@count by -\start@
+ \divide\temp@count by 2
+ \xdef\stretch@{\the\temp@count}
+ \temp@count=\start@ \advance\temp@count by \stretch@
+ \xdef\label@pos{\the\temp@count}
+ \xdef\first@{noshade}
+ \ifx\first@\fifth@
+ \def\style@c@l{\symb@l@style}
+ \def\fr@me{\fr@mec@l}
+ \def\b@ck{\symb@lc@l}
+ \def\f@nt{\ch@rc@l}
+ \else
+ \xdef\style@c@l{\csname \fifth@ style\endcsname}
+ \xdef\fr@me{\csname \fifth@ frame\endcsname}
+ \xdef\b@ck{\csname \fifth@ back\endcsname}
+ \xdef\f@nt{\csname \fifth@ font\endcsname}
+ \fi
+ \fi
+ \xdef\l@bel{\sixth@}
+ \xdef\num@{\seventh@}
+ \xdef\lst@ck{\l@st}
+}
+
+\def\reverse@lstack{%
+ \expandafter\get@fromlstack\l@st
+ \ifx\first@\ampers@nd
+ \else
+ \ifnum\first@>\st@p
+ \else
+ \iloopcount=\st@p
+ \ifnum\second@<\st@p
+ \advance\iloopcount by -\second@
+ \advance\iloopcount by \st@rt
+ \else
+ \iloopcount=\st@rt
+ \fi
+ \xdef\second@{\the\iloopcount}
+ \iloopcount=\st@p
+ \ifnum\first@>\st@rt
+ \advance\iloopcount by -\first@
+ \advance\iloopcount by \st@rt
+ \else
+ \iloopcount=\st@p
+ \fi
+ \xdef\first@{\the\iloopcount}
+ \xdef\tmpstack{\second@;\first@;\third@;\fourth@;%
+ \fifth@;\sixth@;\seventh@;\tmpstack}
+ \reverse@lstack
+ \fi\fi
+}
+
+\def\get@fromlstack#1;#2;#3;#4;#5;#6;#7;#8@{%
+ \xdef\first@{#1} \xdef\second@{#2}
+ \xdef\third@{#3} \xdef\fourth@{#4}
+ \xdef\fifth@{#5} \xdef\sixth@{#6}
+ \xdef\seventh@{#7}\xdef\l@st{#8@}
+}
+
+\def\sort@lstack{%
+ \expandafter\get@fromlstack\l@st
+ \ifx\first@\ampers@nd
+ \xdef\tmpstack{\tmpstack\start@;\stop@;\directi@n;\length@;%
+ \style@c@l;\l@text@;\num@;&;&;&;&;&;&;&;@}
+ \else
+ \ifnum\start@<\second@
+ \xdef\tmpstack{\tmpstack\start@;\stop@;\directi@n;\length@;%
+ \style@c@l;\l@text@;\num@;%
+ \first@;\second@;\third@;\fourth@;%
+ \fifth@;\sixth@;\seventh@;\l@st}
+ \else
+ \xdef\tmpstack{\tmpstack\first@;\second@;\third@;\fourth@;%
+ \fifth@;\sixth@;\seventh@;}
+ \sort@lstack
+ \fi\fi
+}
+
+\def\get@lregions#1..#2,#3@{%
+ \xdef\start@{#1[@]&}
+ \expandafter\opt@col\start@
+ \xdef\start@{\fourth@}
+ \xdef\start@num@pos{\l@color}
+ \xdef\stop@{#2[@]&}
+ \expandafter\opt@col\stop@
+ \xdef\stop@{\fourth@}
+ \xdef\stop@num@pos{\l@color}
+ \temp@count=\stop@\relax
+ \advance\temp@count by -\start@
+ \divide\temp@count by 2
+ \xdef\stretch@{\the\temp@count}
+ \temp@count=\start@\relax
+ \advance\temp@count by \stretch@\relax
+ \ifx\start@num@pos\@t
+ \expandafter\xdef\csname print\start@\endcsname{&}
+ \else
+ \ifx\start@num@pos\st@r
+ \expandafter\xdef\csname print\start@\endcsname{n}
+ \else
+ \expandafter\xdef\csname print\start@\endcsname{\start@num@pos}
+ \fi
+ \fi
+ \ifx\stop@num@pos\@t
+ \expandafter\xdef\csname print\stop@\endcsname{&}
+ \else
+ \ifx\stop@num@pos\st@r
+ \expandafter\xdef\csname print\stop@\endcsname{n}
+ \else
+ \expandafter\xdef\csname print\stop@\endcsname{\stop@num@pos}
+ \fi
+ \fi
+ \ifx\stop@num@pos\@t
+ \ifx\start@num@pos\@t
+ \expandafter\xdef\csname print\the\temp@count\endcsname{&}
+ \else
+ \ifx\start@num@pos\st@r
+ \expandafter\xdef\csname print\the\temp@count\endcsname{n}
+ \else
+ \expandafter\xdef\csname print\the\temp@count\endcsname{\start@num@pos}
+ \fi
+ \fi
+ \else
+ \ifx\stop@num@pos\st@r
+ \expandafter\xdef\csname print\the\temp@count\endcsname{n}
+ \else
+ \expandafter\xdef\csname print\the\temp@count\endcsname{\stop@num@pos}
+ \fi
+ \fi
+ \xdef\list@{#3}
+ \xdef\l@st{\lst@ck}
+ \xdef\tmpstack{}
+ \sort@lstack
+ \xdef\lst@ck{\tmpstack}
+}
+
+\def\get@TMnum#1,#2@{\xdef\TM@num{#1}\xdef\TM@stack{#2@}}
+
+\def\get@l@b#1=#2@{\xdef\l@b{#1}\xdef\seq@{#2@}}
+\def\check@direct#1#2@{\xdef\fourth@{#1}}
+\def\get@direct[#1]#2@{\xdef\direct@{#1}\xdef\l@b{#2}}
+
+\def\count@tag#1#2@{%
+ \xdef\temp@{#1@}
+ \xdef\seq@@{#2@}
+ \expandafter\check@letter\temp@
+ \xdef\temp@{#1}
+ \ifletter
+ \advance\temp@count by 1
+ \xdef\seq@tag{\seq@tag\temp@}
+ \xdef\last@{\temp@}
+ \fi
+ \ifx\temp@\ampers@nd
+ \else \expandafter\count@tag\seq@@\fi
+}
+
+\def\count@res#1#2@{%
+ \xdef\temp@{#1@}
+ \xdef\seq@{#2@}
+ \expandafter\check@letter\temp@
+ \xdef\temp@{#1}
+ \ifletter
+ \advance\pos@count by 1\relax
+ \ifnum\pos@count=0 \pos@count=1 \fi
+ \xdef\sequence@{\sequence@\temp@}
+ \xdef\last@{\temp@}
+ \else
+ \ifx\temp@\@pen
+ \advance\pos@count by 1\relax
+ \ifnum\pos@count=0 \pos@count=1 \fi
+ \xdef\start@{\the\pos@count}
+ \advance\pos@count by -1\relax
+ \ifnum\pos@count=0 \pos@count=-1 \fi
+ \else
+ \ifx\temp@\cl@se
+ \expandafter\MRs{\start@..\the\pos@count}
+ \else
+ \ifx\temp@\st@r
+ \ifx\st@r@\y@ \xdef\st@r@{n} \message{(pos `\last@': \the\pos@count)}
+ \else \xdef\st@r@{y} \fi
+ \else
+ \ifx\temp@\start@label
+ \advance\pos@count by 1\relax
+ \ifnum\pos@count=0 \pos@count=1 \fi
+ \xdef\start@@{\the\pos@count}
+ \advance\pos@count by -1\relax
+ \ifnum\pos@count=0 \pos@count=-1 \fi
+ \expandafter\get@l@b\seq@
+ \xdef\direct@{&,&}
+ \xdef\first@{\l@b @}
+ \expandafter\check@direct\first@
+ \ifx\fourth@\@pen
+ \expandafter\get@direct\first@
+ \fi
+ \xdef\l@b{\l@b[@]&}
+ \expandafter\opt@col\l@b
+ \xdef\l@b{\fourth@}
+ \xdef\l@btxt{\l@color}
+ \xdef\fifth@@{\fifth@}
+ \ifx\l@color\@t \xdef\l@btxt{}\fi
+ \xdef\fourth@{\l@btxt[@]&}
+ \expandafter\opt@col\fourth@
+ \ifx\l@color\@t
+ \else
+ \ifx\fifth@@\br@cket@t
+ \xdef\l@btxt{\l@btxt ]}
+ \else
+ \xdef\fifth@{\fifth@@&}
+ \expandafter\opt@col\fifth@
+ \ifx\l@color\@t
+ \else
+ \xdef\l@btxt{\l@btxt]\fourth@[\l@color]}
+ \fi
+ \fi
+ \fi
+ \else
+ \ifx\temp@\stop@label
+ \expandafter\labelregion[\direct@]{\start@@..\the\pos@count}%
+ {\l@b}{\l@btxt}
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifx\temp@\ampers@nd
+ \else \expandafter\count@res\seq@\fi
+}
+
+\def\analyzetopo{%
+ \message{(Calculating ...}
+ \x@pos=0 \y@pos=0
+ \x@min=0 \x@max=0 \y@min=0 \y@max=0 \mem@max=0
+ \xdef\virtual@pos{\current@pos}
+ \xdef\M@@stack{\M@stack}
+ \ifx\m@d@stack@ori\ampers@nd
+ \xdef\m@d@stack{0:0/0,0@}
+ \else
+ \xdef\m@d@stack{\m@d@stack@ori,0:0/0,0@}
+ \fi
+ \expandafter\get@next@m@d\m@d@stack
+ \xdef\first@rem@del{y}
+ \analyzetrue
+ \dotopo
+ \analyzefalse
+ \xdef\current@pos{\virtual@pos}
+ \xdef\M@stack{\M@@stack}
+ \ifx\m@d@stack@ori\ampers@nd
+ \xdef\m@d@stack{0:0/0,0@}
+ \else
+ \xdef\m@d@stack{\m@d@stack@ori,0:0/0,0@}
+ \fi
+ \expandafter\get@next@m@d\m@d@stack
+ \xdef\first@rem@del{y}
+ \advance\x@max by 20\relax
+ \advance\x@max by -\x@min\relax
+ \advance\mem@max by 20\relax
+ \advance\y@max by 26
+ \advance\y@max by -\y@min
+ \x@pos=5\relax
+ \advance\x@pos by -\x@min
+ \y@pos=-\y@min
+ \advance\y@pos by 10
+ \loopcount=\mem@high
+ \advance\loopcount by -\y@min
+ \advance\loopcount by 16
+ \advance\loopcount by \mem@t@p\relax
+ \xdef\mem@high{\the\loopcount}
+ \xdef\lab@high{\mem@high}
+ \innerloopcount=\mem@thick
+ \multiply\innerloopcount by -1
+ \advance\loopcount by \innerloopcount
+ \advance\loopcount by \mem@b@t\relax
+ \xdef\mem@low{\the\loopcount}
+ \xdef\lab@low{\mem@low}
+}
+
+\def\dotopo{%
+ \pos@count=-\N@tag@length\relax
+ \advance\pos@count by -1\relax
+ \ifall@shade
+ \else
+ \iffuncmode
+ \else
+ \expandafter\xdef\csname sstyle3\endcsname{\csname sstyle2\endcsname}
+ \expandafter\xdef\csname fcol3\endcsname{\csname fcol2\endcsname}
+ \expandafter\xdef\csname scol3\endcsname{\csname scol2\endcsname}
+ \expandafter\xdef\csname ccol3\endcsname{\csname ccol2\endcsname}
+ \xdef\first@{\shadenum@inv@pos}
+ \expandafter\xdef\csname show@shade\first@\endcsname{n}
+ \fi
+ \fi
+ \ifsimilar@shade
+ \else
+ \iffuncmode
+ \else
+ \expandafter\xdef\csname sstyle1\endcsname{\symb@lstyle}
+ \expandafter\xdef\csname fcol1\endcsname{\fr@mecol}
+ \expandafter\xdef\csname scol1\endcsname{\symb@lcol}
+ \expandafter\xdef\csname ccol1\endcsname{\ch@rcol}
+ \xdef\first@{\shadenum@sim@pos}
+ \expandafter\xdef\csname show@shade\first@\endcsname{n}
+ \fi
+ \fi
+ \expandafter\get@@fromstack\M@stack
+ \xdef\next@TM{n}
+ \ifx\TM\y@
+ \xdef\st@rt{\first@} \xdef\st@p{\second@}
+ \xdef\M@stack{\last@}
+ \ifx\st@rt\ampers@nd
+ \else
+ \loopcount=\st@p
+ \advance\loopcount by -\st@rt
+ \advance\loopcount by 1
+ \ifnum\loopcount>13 \xdef\next@TM{y} \xdef\TM@length{\the\loopcount} \fi
+ \ifanalyze\else
+ \message{plotting ...}
+ \ifx\hide@NH\y@
+ \else
+ \ifx\N@inverse\y@
+ \loopcount=\x@pos
+ \advance\loopcount by 15
+ \put(\loopcount,\y@pos){\raisebox{0.85\unit@length}{%
+ \csname sfdc\font@num\endcsname{--NH%
+ \raisebox{-1.2\unit@length}{2}}}}
+ \else
+ \put(\x@pos,\y@pos){\raisebox{0.85\unit@length}{%
+ \csname sfdc\font@num\endcsname{H%
+ \raisebox{-1.2\unit@length}{2}N--}}}
+ \fi
+ \fi
+ \fi
+ \advance\x@pos by 9
+ \advance\y@pos by -1
+ \loopcount=\st@rt\relax
+ \advance\loopcount by \N@tag@length\relax
+ \advance\loopcount by -1\relax
+ \xdef\updown@num{\the\loopcount}
+ \ifx\l@@pN\y@ \xdef\first@@{N} \else \xdef\first@@{0} \fi
+ \ifanalyze
+ \else
+ \xdef\x@before{\the\x@pos}
+ \xdef\l@@pN{}
+ \fi
+ \xdef\inner@loop{\csname inner@loop\first@@\endcsname}
+ \xdef\inner@length{\csname inner@length\first@@\endcsname}
+ \xdef\inner@straight{\csname inner@straight\first@@\endcsname}
+ \xdef\outer@loop{\csname outer@loop\first@@\endcsname}
+ \xdef\outer@length{\csname outer@length\first@@\endcsname}
+ \xdef\outer@straight{\csname outer@straight\first@@\endcsname}
+ \xdef\N@extra{n}
+ \ifx\N@inverse\y@
+ \xdef\loop@inverse{y}
+ \ifx\current@pos\intr@
+ \else
+ \xdef\N@extra{y}
+ \fi
+ \fi
+ \ifnum\loopcount>\outer@length
+ \expandafter\mult@Nterm{\updown@num}
+ \else
+ \expandafter\N@term{\updown@num}
+ \fi
+ \ifanalyze\else\message{N}\fi
+ \ifnum\mem@max<0
+ \loopcount=\x@pos
+ \multiply\loopcount by -1
+ \xdef\N@start@x{\the\loopcount}
+ \mem@max=0
+ \else
+ \xdef\N@start@x{0}
+ \fi
+ \ifx\loop@inverse\y@ \advance\x@pos by 2 \fi
+ \xdef\loop@inverse{n}
+ \loopcount=\st@p
+ \advance\loopcount by -\st@rt
+ \advance\loopcount by 1
+ \xdef\updown@num{\the\loopcount}
+ \ifnum\loopcount<14
+ \expandafter\h@lf{\updown@num}
+ \xdef\prev@TM{n}
+ \else
+\ifx\N@extra\y@
+ \innerloopcount=\N@start@x
+ \advance\innerloopcount by 15
+ \ifnum\loopcount>18 \advance\innerloopcount by 5 \fi
+ \ifnum\loopcount>23 \advance\innerloopcount by 5 \fi
+ \ifnum\loopcount>30 \advance\innerloopcount by 5 \fi
+ \xdef\N@start@x{\the\innerloopcount}
+\fi
+ \ifanalyze\else\xdef\x@before{\the\x@pos}\fi
+ \expandafter\MR@{\updown@num}
+ \advance\TM@@count by 1
+ \expandafter\ifx\csname l@@p\the\TM@@count\endcsname\y@
+ \xdef\first@@{\the\TM@@count} \else \xdef\first@@{0} \fi
+ \xdef\inner@loop{\csname inner@loop\first@@\endcsname}
+ \xdef\inner@length{\csname inner@length\first@@\endcsname}
+ \xdef\inner@straight{\csname inner@straight\first@@\endcsname}
+ \xdef\outer@loop{\csname outer@loop\first@@\endcsname}
+ \xdef\outer@length{\csname outer@length\first@@\endcsname}
+ \xdef\outer@straight{\csname outer@straight\first@@\endcsname}
+\expandafter\ifx\csname foot@\the\TM@@count\endcsname\y@
+ \xdef\foot@direct{\csname foot@direct\the\TM@@count\endcsname}
+ \xdef\neck@length{\csname neck@length\the\TM@@count\endcsname}
+\fi
+\xdef\foot@{\csname foot@\the\TM@@count\endcsname}
+ \ifanalyze
+ \else
+ \expandafter\xdef\csname l@@p\first@@\endcsname{}
+ \loop@calc=\x@pos
+ \advance\loop@calc by \x@before
+ \advance\loop@calc by 5
+ \divide\loop@calc by 2
+ \ifx\current@pos\intr@
+ \advance\loop@calc by 2
+ \else
+ \advance\loop@calc by -2
+ \fi
+ \expandafter\xdef\csname x@TMlabel\the\TM@@count\endcsname{%
+ \the\loop@calc}
+ \loop@calc=\lab@high
+ \advance\loop@calc by 3
+ \expandafter\xdef\csname y@TMlabel\the\TM@@count\endcsname{%
+ \the\loop@calc}
+ \fi
+ \fi
+ \do@topo
+ \fi
+ \ifanalyze
+ \else
+ \xdef\label@stack{\label@stack &;&;&;&;&;&;&;&;&;&;&;&;@}
+ \expandafter\get@spec@pos\label@stack
+ \expandafter\get@spec@lab\label@stack
+ \ifx\x@x\ampers@nd
+ \else
+ \fontfamily{\label@family}
+ \fontseries{\label@series}
+ \fontshape{\label@shape}
+ \selectfont
+ \put@special{\x@x}{\y@y}
+ \fi
+ \fi
+ \else
+ \PackageError{TeXtopo}
+ {No \noexpand\MRs specified}
+ {\MessageBreak
+ The membrane regions (MRs) of the protein must be \MessageBreak
+ specified in order to draw the topology. \MessageBreak
+ Type X <return> to quit. \MessageBreak
+}
+ \fi
+}
+
+\def\do@membr@ne{%
+ \loopcount=0
+ \advance\loopcount by \to@mem@min\relax
+ \xdef\mem@min{\the\loopcount}
+ \loopcount=\to@mem@min\relax
+ \multiply\loopcount by -1\relax
+ \advance\loopcount by \mem@max\relax
+ \advance\loopcount by -\x@min\relax
+ \advance\loopcount by -10\relax
+ \advance\loopcount by \to@mem@max\relax
+ \put(\mem@min,\mem@low){\textcolor{\membl@ck}{\rule[-\unit@length]{%
+ \loopcount\unit@length}{\mem@thick\unit@length}}}
+ \put(\mem@min,\mem@low){\textcolor{\memfr@me}{\rule[-\b@rder]{%
+ \loopcount\unit@length}{\b@rder}}}
+ \put(\mem@min,\mem@high){\textcolor{\memfr@me}{\rule[-\unit@length]{%
+ \loopcount\unit@length}{\b@rder}}}
+ \bgroup
+ \fontfamily{\mem@label@family}
+ \fontseries{\mem@label@series}
+ \fontshape{\mem@label@shape}
+ \selectfont
+ \advance\loopcount by \mem@min
+ \xdef\x@x@{\the\loopcount}
+ \setbox1=\hbox{\mem@label@size{(}}
+ \temp@length=\dp1
+ \divide\temp@length by \unit@length
+ \temp@count=\mem@high
+ \advance\temp@count by \temp@length
+ \xdef\y@y@{\the\temp@count}
+ \xdef\x@@x{\move@out@direc}
+ \xdef\y@@y{\move@out@length}
+ \xdef\first@{\move@out@direc @}
+ \expandafter\check@letter\first@
+ \ifletter
+ \temp@count=\move@out@length
+ \multiply\temp@count by \csname cos\move@out@direc\endcsname
+ \divide\temp@count by 10000
+ \xdef\x@@x{\the\temp@count}
+ \temp@count=\move@out@length
+ \multiply\temp@count by \csname sin\move@out@direc\endcsname
+ \divide\temp@count by 10000
+ \xdef\y@@y{\the\temp@count}
+ \fi
+ \temp@count=\y@y@ \advance\temp@count by \y@@y \xdef\y@@@y{\the\temp@count}
+ \xdef\first@{right}
+ \ifx\first@\up@left@right
+ \setbox2=\hbox{\label@size{\up@mem}}
+ \temp@length=\wd2
+ \temp@count=\x@x@ \advance\temp@count by \x@@x \xdef\x@@@x{\the\temp@count}
+ \put(\x@@@x,\y@@@y){\raisebox{\b@rder}{\kern-\temp@length%
+ \mem@label@size{\up@mem}}}
+ \else
+ \temp@count=\mem@min
+ \advance\temp@count by \x@@x \xdef\x@@@x{\the\temp@count}
+ \put(\x@@@x,\y@@@y){\raisebox{\b@rder}{\mem@label@size{\up@mem}}}
+ \fi
+ \temp@length=\ht1
+ \divide\temp@length by \unit@length
+ \temp@count=\mem@low \advance\temp@count by -\temp@length
+ \advance\temp@count by -1
+ \xdef\y@y@{\the\temp@count}
+ \xdef\x@@x{\move@in@direc}
+ \xdef\y@@y{\move@in@length}
+ \xdef\first@{\move@in@direc @}
+ \expandafter\check@letter\first@
+ \ifletter
+ \temp@count=\move@in@length
+ \multiply\temp@count by \csname cos\move@in@direc\endcsname
+ \divide\temp@count by 10000
+ \xdef\x@@x{\the\temp@count}
+ \temp@count=\move@in@length
+ \multiply\temp@count by \csname sin\move@in@direc\endcsname
+ \divide\temp@count by 10000
+ \xdef\y@@y{\the\temp@count}
+ \fi
+ \temp@count=\y@y@ \advance\temp@count by \y@@y \xdef\y@@@y{\the\temp@count}
+ \xdef\first@{right}
+ \ifx\first@\low@left@right
+ \setbox2=\hbox{\mem@label@size{\low@mem}}
+ \temp@length=\wd2
+ \temp@count=\x@x@ \advance\temp@count by \x@@x \xdef\x@@@x{\the\temp@count}
+ \put(\x@@@x,\y@@@y){\raisebox{-\b@rder}{\kern-\temp@length%
+ \mem@label@size{\low@mem}}}
+ \else
+ \temp@count=\mem@min \advance\temp@count by \x@@x \xdef\x@@@x{\the\temp@count}
+ \put(\x@@@x,\y@@@y){\raisebox{-\b@rder}{\mem@label@size{\low@mem}}}
+ \fi
+ \egroup
+}
+
+\def\do@looplabel{%
+ \fontfamily{\looplabel@family}
+ \fontseries{\looplabel@series}
+ \fontshape{\looplabel@shape}
+ \selectfont
+ \loopcount=0
+ \loop
+ \advance\loopcount by 1
+ \expandafter\ifx\csname l@true\the\loopcount\endcsname\y@ \loopgo@true\fi
+ \ifloop@series \loopgo@true \fi
+ \ifloopgo@
+ \loopgo@false
+ \x@pos=\csname x@label\the\loopcount\endcsname
+ \y@pos=\csname y@label\the\loopcount\endcsname
+ \expandafter\ifx\csname move@loop\the\loopcount\endcsname\y@
+ \expandafter\xdef\csname move@loop\the\loopcount\endcsname{n}
+ \xdef\x@@x{\csname movel@direct\the\loopcount\endcsname}
+ \xdef\y@@y{\csname movel@offset\the\loopcount\endcsname}
+ \xdef\first@{\csname movel@direct\the\loopcount\endcsname @}
+ \expandafter\check@letter\first@
+ \ifletter
+ \xdef\first@{\csname movel@direct\the\loopcount\endcsname}
+ \temp@count=\csname movel@offset\the\loopcount\endcsname
+ \multiply\temp@count by \csname cos\first@\endcsname
+ \divide\temp@count by 10000
+ \xdef\x@@x{\the\temp@count}
+ \temp@count=\csname movel@offset\the\loopcount\endcsname
+ \multiply\temp@count by \csname sin\first@\endcsname
+ \divide\temp@count by 10000
+ \xdef\y@@y{\the\temp@count}
+ \fi
+ \advance\x@pos by \x@@x
+ \advance\y@pos by \y@@y
+ \fi
+ \ifloop@series
+ \expandafter\ifx\csname l@true\the\loopcount\endcsname\y@
+ \else
+ \put(\x@pos,\y@pos){%
+ \hbox to 0pt {\looplabel@size\textcolor{\loopc@l}%
+ {\hss\loop@labeltext\hss}}}
+ \fi
+ \fi
+ \expandafter\ifx\csname l@true\the\loopcount\endcsname\y@
+ \expandafter\xdef\csname l@true\the\loopcount\endcsname{n}
+ \xdef\x@@x{\csname l@direct\the\loopcount\endcsname}
+ \xdef\y@@y{\csname l@offset\the\loopcount\endcsname}
+ \xdef\first@{\csname l@direct\the\loopcount\endcsname @}
+ \expandafter\check@letter\first@
+ \ifletter
+ \xdef\first@{\csname l@direct\the\loopcount\endcsname}
+ \temp@count=\csname l@offset\the\loopcount\endcsname
+ \multiply\temp@count by \csname cos\first@\endcsname
+ \divide\temp@count by 10000
+ \xdef\x@@x{\the\temp@count}
+ \temp@count=\csname l@offset\the\loopcount\endcsname
+ \multiply\temp@count by \csname sin\first@\endcsname
+ \divide\temp@count by 10000
+ \xdef\y@@y{\the\temp@count}
+ \fi
+ \advance\x@pos by \x@@x
+ \advance\y@pos by \y@@y
+ \put(\x@pos,\y@pos){%
+ \hbox to 0pt {\looplabel@size\textcolor{\loopc@l}%
+ {\hss\csname l@label\the\loopcount\endcsname\hss}}}
+ \fi
+ \expandafter\xdef\csname l@true\the\loopcount\endcsname{n}
+ \fi
+ \ifnum\loopcount=\loop@@count\else\repeat
+}
+
+\def\do@TMlabel{%
+ \fontfamily{\TMlabel@family}
+ \fontseries{\TMlabel@series}
+ \fontshape{\TMlabel@shape}
+ \selectfont
+ \loopcount=0
+ \loop
+ \advance\loopcount by 1
+ \expandafter\ifx\csname TM@true\the\loopcount\endcsname\y@ \TMgo@true\fi
+ \ifTM@series \TMgo@true \fi
+ \ifTMgo@
+ \TMgo@false
+ \x@pos=\csname x@TMlabel\the\loopcount\endcsname
+ \y@pos=\csname y@TMlabel\the\loopcount\endcsname
+ \expandafter\ifx\csname move@TM\the\loopcount\endcsname\y@
+ \expandafter\xdef\csname move@TM\the\loopcount\endcsname{n}
+ \xdef\x@@x{\csname moveTM@direct\the\loopcount\endcsname}
+ \xdef\y@@y{\csname moveTM@offset\the\loopcount\endcsname}
+ \xdef\first@{\csname moveTM@direct\the\loopcount\endcsname @}
+ \expandafter\check@letter\first@
+ \ifletter
+ \xdef\first@{\csname moveTM@direct\the\loopcount\endcsname}
+ \temp@count=\csname moveTM@offset\the\loopcount\endcsname
+ \multiply\temp@count by \csname cos\first@\endcsname
+ \divide\temp@count by 10000
+ \xdef\x@@x{\the\temp@count}
+ \temp@count=\csname moveTM@offset\the\loopcount\endcsname
+ \multiply\temp@count by \csname sin\first@\endcsname
+ \divide\temp@count by 10000
+ \xdef\y@@y{\the\temp@count}
+ \fi
+ \advance\x@pos by \x@@x
+ \advance\y@pos by \y@@y
+ \fi
+ \ifTM@series
+ \expandafter\ifx\csname TM@true\the\loopcount\endcsname\y@
+ \else
+ \put(\x@pos,\y@pos){%
+ \hbox to 0pt {\TMlabel@size\textcolor{\TMc@l}%
+ {\hss\TM@labeltext\hss}}}
+ \fi
+ \fi
+ \expandafter\ifx\csname TM@true\the\loopcount\endcsname\y@
+ \xdef\x@@X{\csname TM@direct\the\loopcount\endcsname}
+ \xdef\y@@y{\csname TM@offset\the\loopcount\endcsname}
+ \xdef\first@{\csname TM@direct\the\loopcount\endcsname @}
+ \expandafter\check@letter\first@
+ \ifletter
+ \xdef\first@{\csname TM@direct\the\loopcount\endcsname}
+ \temp@count=\csname TM@offset\the\loopcount\endcsname
+ \multiply\temp@count by \csname cos\first@\endcsname
+ \divide\temp@count by 10000
+ \xdef\x@@x{\the\temp@count}
+ \temp@count=\csname TM@offset\the\loopcount\endcsname
+ \multiply\temp@count by \csname sin\first@\endcsname
+ \divide\temp@count by 10000
+ \xdef\y@@y{\the\temp@count}
+ \fi
+ \advance\x@pos by \x@@x
+ \advance\y@pos by \y@@y
+ \put(\x@pos,\y@pos){%
+ \hbox to 0pt {\TMlabel@size\textcolor{\TMc@l}{%
+ \hss\csname TM@label\the\loopcount\endcsname\hss}}}
+ \fi
+ \expandafter\xdef\csname TM@true\the\loopcount\endcsname{n}
+ \fi
+ \ifnum\loopcount=\TM@@count\else\repeat
+}
+
+\def\do@@legend{%
+ \ifnum\label@num>0
+ \innerloopcount=0
+ \loopcount=0
+ \loop
+ \advance\loopcount by 1
+ \xdef\first@{\csname labelname@\the\loopcount\endcsname}%
+ \expandafter\ifx\csname show@label\first@\endcsname\y@
+ \advance\innerloopcount by 1
+ \fi
+ \ifnum\loopcount=\label@num\else\repeat
+ \fi
+ \temp@length=\hspace@@legend
+ \divide\temp@length by \unit@length\relax
+ \loopcount=\temp@length\relax
+ \advance\loopcount by 10\relax
+ \xdef\h@ten{\the\loopcount}
+ \advance\loopcount by 1\relax
+ \xdef\h@elvn{\the\loopcount}
+ \advance\loopcount by 4\relax
+ \xdef\h@fiftn{\the\loopcount}
+ \advance\loopcount by 5\relax
+ \xdef\h@twen{\the\loopcount}
+ \setbox1=\hbox{\legend@size{(}}
+ \temp@length=\ht1
+ \divide\temp@length by \unit@length\relax
+ \loopcount=\temp@length
+ \advance\loopcount by 1
+ \ifnum\loopcount>5
+ \advance\loopcount by 3\relax
+ \xdef\mult@{\the\loopcount}%
+ \else
+ \xdef\mult@{8}%
+ \fi
+ \multiply\innerloopcount by \mult@\relax
+ \advance\innerloopcount by 8
+ \begin{picture}(1,\the\innerloopcount)
+ \advance\innerloopcount by -2
+ \loopcount=0
+ \loop
+ \advance\loopcount by 1
+ \xdef\first@{\csname labelname@\the\loopcount\endcsname}%
+ \expandafter\ifx\csname show@label\first@\endcsname\y@
+ \advance\innerloopcount by -\mult@\relax
+ \xdef\first@{\csname labelname@\the\loopcount\endcsname}%
+ \xdef\style@c@l{\csname \first@ style\endcsname}%
+ \xdef\b@ck{\csname \first@ back\endcsname}%
+ \xdef\fr@me{\csname \first@ frame\endcsname}%
+ \xdef\f@nt{\csname \first@ font\endcsname}%
+ \xdef\l@text@{\csname \first@ legendtext\endcsname}%
+ \xdef\first@{circ}%
+ \ifx\first@\style@c@l
+ \put(\h@ten,\the\innerloopcount){\textcolor{\b@ck}{%
+ \hbox to \res@diam{\hss\csname bsym\font@num\endcsname\char"0F\hss}}}%
+ \put(\h@ten,\the\innerloopcount){\textcolor{\fr@me}{%
+ \hbox to \res@diam{\hss\csname bsym\font@num\endcsname\char"0E\hss}}%
+ \kern-\res@diam \raisebox{0.4\res@diam}{%
+ \raisebox{0.5\res@@diam}{%
+ \hbox to \res@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\f@nt}{X}\hss}}}}%
+ \else
+ \xdef\first@{diamond}%
+ \ifx\first@\style@c@l
+ \put(\h@ten,\the\innerloopcount){\textcolor{\b@ck}{%
+ \begin{rotopo}{45}\kern0.1\res@@diam%
+ \rule{\res@@diam}{\res@@diam}\end{rotopo}%
+ \begin{rotopo}{45}\kern3\unit@length%
+ \rule[0.085\res@diam]{0.75\res@diam}{0.85\res@diam}%
+ \end{rotopo}}}%
+ \put(\h@ten,\the\innerloopcount){\textcolor{\fr@me}{%
+ \hbox to \res@diam{\hss\csname bsym\font@num\endcsname\char"05\hss}}%
+ \kern-0.9\res@diam%
+ \raisebox{0.55\res@@diam}{%
+ \raisebox{0.4\res@diam}{%
+ \hbox to 0.9\res@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\f@nt}{X}\hss}}}}%
+ \else
+ \xdef\first@{box}%
+ \ifx\first@\style@c@l
+ \ifhelix@
+ \advance\innerloopcount by 3
+ \put(\h@elvn,\the\innerloopcount){\kern-0.9\res@@diam\raisebox{-0.9\res@@diam}{%
+ \textcolor{\fr@me}{%
+ \rule[0.05\res@@diam]{1.2\res@@diam}{1.2\res@@diam}}}}%
+ \put(\h@elvn,\the\innerloopcount){\kern-0.8\res@@diam\raisebox{-0.8\res@@diam}{%
+ \textcolor{\b@ck}{%
+ \rule[0.05\res@@diam]{\res@@diam}{\res@@diam}%
+ \kern-\res@@diam\raisebox{0.25\res@@diam}%
+ {\hbox to \res@@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\f@nt}{X}\hss}}}}}%
+ \advance\innerloopcount by -3
+ \else
+ \put(\h@ten,\the\innerloopcount){\textcolor{\b@ck}{\kern0.11\res@diam%
+ \rule[0.175\res@diam]{0.73\res@diam}{0.85\res@diam}}}%
+ \put(\h@ten,\the\innerloopcount){\textcolor{\fr@me}{\kern0.02\res@diam%
+ \raisebox{0.175\res@diam}%
+ {\hbox to \res@diam{\hss\csname square\font@num\endcsname%
+ \char'164\hss}\kern-\res@diam\hbox to \res@diam{%
+ \hss\csname square\font@num\endcsname\char'165\hss}}%
+ \kern-\res@diam%
+ \raisebox{0.6\res@@diam}{%
+ \raisebox{0.4\res@diam}{%
+ \hbox to \res@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\f@nt}{X}\hss}}}}}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fontfamily{\legend@family}%
+ \fontseries{\legend@series}%
+ \fontshape{\legend@shape}%
+ \selectfont%
+ \advance\innerloopcount by 1
+ \ifnum\wheel@count=0 \xdef\first@{\h@twen} \else \xdef\first@{\h@fiftn} \fi
+ \put(\first@,\the\innerloopcount){\legend@size{\l@text@}}%
+ \advance\innerloopcount by -1
+ \fi
+ \ifnum\loopcount=\label@num\else\repeat
+ \end{picture}
+}
+
+\def\do@@shadelegend{%
+ \ifnum\shade@num>0
+ \innerloopcount=0
+ \loopcount=0
+ \loop
+ \advance\loopcount by 1
+ \expandafter\ifx\csname show@shade\the\loopcount\endcsname\y@
+ \advance\innerloopcount by 1
+ \fi
+ \ifnum\loopcount=\shade@num\else\repeat
+ \temp@length=\hspace@@legend
+ \divide\temp@length by \unit@length\relax
+ \loopcount=\temp@length\relax
+ \advance\loopcount by 10\relax
+ \xdef\h@ten{\the\loopcount}
+ \advance\loopcount by 1\relax
+ \xdef\h@elvn{\the\loopcount}
+ \advance\loopcount by 4\relax
+ \xdef\h@fiftn{\the\loopcount}
+ \advance\loopcount by 5\relax
+ \xdef\h@twen{\the\loopcount}
+ \setbox1=\hbox{\legend@size{(}}
+ \temp@length=\ht1
+ \divide\temp@length by \unit@length
+ \loopcount=\temp@length
+ \advance\loopcount by 1
+ \ifnum\loopcount>5
+ \advance\loopcount by 3\relax
+ \xdef\mult@{\the\loopcount}%
+ \else
+ \xdef\mult@{8}%
+ \fi
+ \multiply\innerloopcount by \mult@\relax
+ \advance\innerloopcount by 1
+ \begin{picture}(1,\the\innerloopcount)
+ \loopcount=0
+ \loop
+ \advance\loopcount by 1
+ \expandafter\ifx\csname show@shade\the\loopcount\endcsname\y@
+ \advance\innerloopcount by -\mult@\relax
+ \iffuncmode
+ \xdef\style@c@l{circ}%
+ \xdef\b@ck{\csname fg@color\the\loopcount\endcsname}%
+ \xdef\fr@me{Black}%
+ \xdef\f@nt{\csname fg@textcolor\the\loopcount\endcsname}%
+ \xdef\l@text@{\csname fgroup@name\the\loopcount\endcsname}%
+ \else
+ \xdef\first@{\csname shadename@\the\loopcount\endcsname}%
+ \xdef\style@c@l{\csname \first@ style\endcsname}%
+ \xdef\b@ck{\csname \first@ back\endcsname}%
+ \xdef\fr@me{\csname \first@ frame\endcsname}%
+ \xdef\f@nt{\csname \first@ font\endcsname}%
+ \xdef\l@text@{\csname \first@ legendtext\endcsname}%
+ \fi
+ \xdef\first@{circ}%
+ \ifx\first@\style@c@l
+ \put(\h@ten,\the\innerloopcount){\textcolor{\b@ck}{%
+ \hbox to \res@diam{\hss\csname bsym\font@num\endcsname\char"0F\hss}}}%
+ \put(\h@ten,\the\innerloopcount){\textcolor{\fr@me}{%
+ \hbox to \res@diam{\hss\csname bsym\font@num\endcsname\char"0E\hss}}%
+ \kern-\res@diam%
+ \raisebox{0.5\res@@diam}{%
+ \raisebox{0.4\res@diam}%
+ {\hbox to \res@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\f@nt}{X}\hss}}}}%
+ \else
+ \xdef\first@{diamond}%
+ \ifx\first@\style@c@l
+ \put(\h@ten,\the\innerloopcount){\textcolor{\b@ck}{%
+ \begin{rotopo}{45}\kern0.1\res@@diam%
+ \rule{\res@@diam}{\res@@diam}\end{rotopo}%
+ \begin{rotopo}{45}\kern3\unit@length%
+ \rule[0.085\res@diam]{0.75\res@diam}{0.85\res@diam}%
+ \end{rotopo}}}%
+ \put(\h@ten,\the\innerloopcount){\textcolor{\fr@me}{%
+ \hbox to \res@diam{\hss\csname bsym\font@num\endcsname\char"05\hss}}%
+ \kern-0.9\res@diam%
+ \raisebox{0.55\res@@diam}{%
+ \raisebox{0.4\res@diam}%
+ {\hbox to 0.9\res@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\f@nt}{X}\hss}}}}%
+ \else
+ \xdef\first@{box}%
+ \ifx\first@\style@c@l
+ \ifhelix@
+ \advance\innerloopcount by 3
+ \put(\h@elvn,\innerloopcount){\kern-0.9\res@@diam\raisebox{-0.9\res@@diam}{%
+ \textcolor{\fr@me}{%
+ \rule[0.05\res@@diam]{1.2\res@@diam}{1.2\res@@diam}}}}%
+ \put(\h@elvn,\innerloopcount){\kern-0.8\res@@diam\raisebox{-0.8\res@@diam}{%
+ \textcolor{\b@ck}{%
+ \rule[0.05\res@@diam]{\res@@diam}{\res@@diam}%
+ \kern-\res@@diam\raisebox{0.25\res@@diam}%
+ {\hbox to \res@@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\f@nt}{X}\hss}}}}}%
+ \advance\innerloopcount by -3
+ \else
+ \put(\h@ten,\the\innerloopcount){\textcolor{\b@ck}{\kern0.11\res@diam%
+ \rule[0.175\res@diam]{0.73\res@diam}{0.85\res@diam}}}%
+ \put(\h@ten,\the\innerloopcount){\textcolor{\fr@me}{\kern0.02\res@diam%
+ \raisebox{0.175\res@diam}%
+ {\hbox to \res@diam{\hss\csname square\font@num\endcsname%
+ \char'164\hss}\kern-\res@diam\hbox to \res@diam{%
+ \hss\csname square\font@num\endcsname\char'165\hss}}%
+ \kern-\res@diam%
+ \raisebox{0.6\res@@diam}{%
+ \raisebox{0.4\res@diam}%
+ {\hbox to \res@diam{\hss\csname sfdc\font@num\endcsname%
+ \textcolor{\f@nt}{X}\hss}}}}}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fontfamily{\legend@family}%
+ \fontseries{\legend@series}%
+ \fontshape{\legend@shape}%
+ \selectfont%
+ \advance\innerloopcount by 1
+ \ifnum\wheel@count=0 \xdef\first@{\h@twen} \else \xdef\first@{\h@fiftn} \fi
+ \put(\first@,\the\innerloopcount){\legend@size{\l@text@}}%
+ \advance\innerloopcount by -1
+ \fi
+ \ifnum\loopcount=\shade@num\else\repeat
+ \end{picture}%
+ \fi
+}
+
+\def\detect@change#1#2@{%
+ \xdef\change@size{fix}
+ \xdef\first@{#1}
+ \xdef\second@{+}
+ \ifx\first@\second@
+ \xdef\change@length{#1#2}
+ \xdef\change@size{+}
+ \fi
+ \xdef\second@{-}
+ \ifx\first@\second@
+ \xdef\change@length{#1#2}
+ \xdef\change@size{-}
+ \fi
+}
+
+\def\get@sim#1#2@{\xdef\sim@char{#1} \xdef\last@{#2 &@}}
+\def\inactivate@chars{%
+ \catcode`\#=12
+ \catcode`\"=12
+ \catcode`\~=12
+ \catcode`\^=12
+ \catcode`\_=12
+ }
+\def\cut@name#1.#2@{\global\xdef\file@n@me{#1}}
+\def\struc@get#1 #2 #3 #4 #5 #6 #7 #8 #9@{%
+ \xdef\first@{#1} \xdef\second@{#2} \xdef\third@{#3} \xdef\fourth@{#4}
+ \xdef\fifth@{#5} \xdef\sixth@{#6} \xdef\seventh@{#7}\xdef\eighth@{#8}
+ \xdef\ninth@{#9}}
+\def\comment@get#1 #2 #3 #4 #5@{%
+ \xdef\first@{#1} \xdef\second@{#2} \xdef\third@{#3} \xdef\fourth@{#4}
+ \xdef\c@mment{#5@}}
+\def\trimm@fifth@#1.#2@{\xdef\fifth@{#1}}
+\def\trimm@comment#1. &#2@{\xdef\c@mment{#1}}
+\def\trimm@num#1#2@{%
+ \ifnum`#1>57 \xdef\first@@{#2} \else \xdef\first@@{#1#2} \fi
+}
+\def\elim@nonchars#1#2@{%
+ \xdef\first@@{#1}
+ \ifx\first@@\ampers@nd
+ \else
+ \ifnum\catcode`#1=11 \xdef\second@{\second@#1} \fi
+ \xdef\first@@{#2@}
+ \expandafter\elim@nonchars\first@@
+ \fi
+}
+\def\get@PHD#1|#2|#3@{\xdef\PHD@line{\PHD@line #2}}
+\def\get@seq#1|#2|#3@{\xdef\seq@line{\seq@line #2}}
+\def\get@swissseq#1@{\xdef\seq@line{\seq@line #1}}
+\def\write@@PHDtopo{%
+ \expandafter\get@sim\last@
+ \ifx\sim@char\c@mp
+ \def\end@{\the\innerloopcount}
+ \advance\innerloopcount by 1
+ \else
+ \ifnum\end@<\begin@ \xdef\end@{\begin@}\fi
+ \if\c@mp .
+ \else
+ \if\c@mp L
+ \else
+ \if\c@mp T
+ \loopcount=\first@
+ \advance\loopcount by 1
+ \xdef\first@{\the\loopcount}
+ \immediate\write\feature@file{\string\MRs{\begin@..\end@}}
+ \else
+ \if\c@mp i
+ \loopcount=\second@
+ \advance\loopcount by 1
+ \xdef\second@{\the\loopcount}
+ \ifnum\loopcount=1
+ \immediate\write\feature@file{\string\Nterm{intra}}
+ \fi
+ \else
+ \if\c@mp o
+ \loopcount=\second@
+ \advance\loopcount by 1
+ \xdef\second@{\the\loopcount}
+ \ifnum\loopcount=1
+ \immediate\write\feature@file{\string\Nterm{extra}}
+ \fi
+ \fi\fi\fi\fi\fi
+ \xdef\c@mp{\sim@char}
+ \advance\innerloopcount by 1
+ \xdef\begin@{\the\innerloopcount}
+ \fi
+ \ifx\sim@char\ampers@nd\else\write@@PHDtopo\fi
+}
+\def\include@@PHD{%
+ \xdef\first@{\optionphd}
+ \xdef\structurefilename{\filenamephd}
+ \bgroup
+ \xdef\file@n@me{\structurefilename .@}
+ \expandafter\cut@name\file@n@me
+ \xdef\temp@{\file@n@me .tpo}
+ \immediate\openin\structure@file = \temp@\relax
+ \ifeof\structure@file \xdef\first@{make new} \fi
+ \immediate\closein\structure@file
+ \xdef\temp@{make new}
+ \ifx\first@\temp@
+ \def\par{}
+ \xdef\PHD@line{}
+ \xdef\seq@line{}
+ \inactivate@chars
+ \immediate\openin\structure@file=\structurefilename\relax
+ \ifeof\structure@file
+ \PackageError{TeXtopo}%
+ {File `\structurefilename' not found}%
+ {\MessageBreak
+ The `PHD' file you specified is missing or you have \MessageBreak
+ misspelled it. \MessageBreak\MessageBreak
+ No topology will be displayed. \MessageBreak
+ Type <return> to proceed. \MessageBreak
+ Type X <return> to quit. \MessageBreak
+}
+ \immediate\closein\structure@file\egroup
+ \else
+ \message{[\structurefilename] ->}
+ \xdef\temp@{PHDhtm}
+ \loop
+ \read\structure@file to \readline
+ \xdef\structureline{\readline & & & & & & & & &@}
+ \expandafter\struc@get\structureline
+ \ifx\temp@\first@ \else\repeat
+ \loop
+ \read\structure@file to \readline
+ \xdef\structureline{\readline & & & & & & & & &@}
+ \expandafter\struc@get\structureline
+ \xdef\temp@{AA}
+ \ifx\temp@\first@
+ \xdef\second@{\second@ @}
+ \expandafter\get@seq\second@
+ \fi
+ \xdef\temp@{PHDThtm}
+ \ifx\temp@\first@
+ \xdef\second@{\second@ @}
+ \expandafter\get@PHD\second@
+ \fi
+ \ifeof\structure@file \else\repeat
+ \closein\structure@file
+ \xdef\c@mp{+}
+ \xdef\begin@{1}
+ \xdef\end@{1}
+ \innerloopcount=0
+ \xdef\first@{0} \xdef\second@{0} \xdef\third@{0}
+ \xdef\fourth@{0} \xdef\fifth@{0} \xdef\sixth@{0}
+ \xdef\last@{\PHD@line &@}
+ \xdef\file@n@me{\file@n@me .tpo}
+ \immediate\openout\feature@file = \file@n@me\relax
+ \immediate\write\feature@file{\string\sequence{\seq@line}}
+ \write@@PHDtopo
+ \immediate\closeout\feature@file
+ \egroup
+ \input{\file@n@me}
+ \fi
+ \else
+ \egroup
+ \xdef\temp@{ignore}
+ \ifx\temp@\first@
+ \else
+ \message{using existing file:}
+ \xdef\file@n@me{\file@n@me .tpo}
+ \input{\file@n@me}
+ \fi
+ \fi}
+
+\def\include@@HMMTOP{%
+ \def\get@HMMTOP@TMs##1-##2 ##3@{%
+ \immediate\write\feature@file{\string\MRs{##1..##2}}
+ \xdef\structureline{##3 @}
+ }
+ \def\get@HMMTOP{%
+ \ifnum\temp@count<\fifth@
+ \advance\temp@count by 1
+ \expandafter\get@HMMTOP@TMs\structureline
+ \get@HMMTOP
+ \fi
+ }
+ \def\rem@ve@TM@info Transmembrane helices: ##1@{%
+ \xdef\structureline{##1 @}
+ \temp@count=0
+ \get@HMMTOP
+ }
+ \xdef\first@{\optionHMMTOP}
+ \xdef\structurefilename{\filenameHMMTOP}
+ \bgroup
+ \xdef\file@n@me{\structurefilename .@}
+ \expandafter\cut@name\file@n@me
+ \xdef\temp@{\file@n@me .htp}
+ \immediate\openin\structure@file = \temp@\relax
+ \ifeof\structure@file \xdef\first@{make new} \fi
+ \immediate\closein\structure@file
+ \xdef\temp@{make new}
+ \ifx\first@\temp@
+ \def\par{}
+ \xdef\HMMTOP@line{}
+ \xdef\seq@line{}
+ \inactivate@chars
+ \immediate\openin\structure@file = \structurefilename\relax
+ \ifeof\structure@file
+ \PackageError{TeXtopo}
+ {File `\structurefilename' not found}
+ {\MessageBreak
+ The `HMMTOP' file you specified is missing or you have \MessageBreak
+ misspelled it. \MessageBreak\MessageBreak
+ No topology will be displayed. \MessageBreak
+ Type <return> to proceed. \MessageBreak
+ Type X <return> to quit. \MessageBreak
+}
+ \immediate\closein\structure@file\egroup
+ \else
+ \message{[\structurefilename] ->}
+ \xdef\temp@{\file@n@me .htp}
+ \immediate\openout\feature@file = \temp@\relax
+ \xdef\@HP{>HP:} \xdef\first@@{n} \xdef\second@@{n}
+ \loop
+ \read\structure@file to \readline
+ \xdef\temp@{\expandafter\string\readline}
+ \ifx\temp@\par@
+ \else
+ \xdef\structureline{\readline & & & & & & & & &@}
+ \expandafter\struc@get\structureline
+ \ifx\first@\@HP
+ \PackageError{TeXtopo}
+ {Wrong HMMTOP file format in `\structurefilename'}
+ {\MessageBreak
+ This `HMMTOP' file is in the single line format. \MessageBreak
+ Such files do not contain sequence data. \MessageBreak\MessageBreak
+ No topology will be displayed. \MessageBreak
+ Type <return> to proceed. \MessageBreak
+ Type X <return> to quit. \MessageBreak
+}
+ \immediate\closein\structure@file\egroup
+ \else
+ \xdef\temp@{Protein:}
+ \ifx\first@\temp@
+ \ifx\first@@\y@
+ \xdef\second@@{y}
+ \else
+ \xdef\first@@{y}
+ \read\structure@file to \readline
+ \read\structure@file to \readline
+ \xdef\structureline{\readline & & & & & & & & &@}
+ \expandafter\struc@get\structureline
+ \xdef\temp@{IN}
+ \ifx\temp@\second@
+ \immediate\write\feature@file{\string\Nterm{intra}}
+ \else
+ \immediate\write\feature@file{\string\Nterm{extra}}
+ \fi
+ \read\structure@file to \readline
+ \xdef\structureline{\readline & & & & & & & & &@}
+ \expandafter\struc@get\structureline
+ \read\structure@file to \readline
+ \xdef\structureline{\readline @}
+ \expandafter\rem@ve@TM@info\structureline
+ \fi
+ \else
+ \xdef\temp@{seq}
+ \ifx\first@\temp@
+ \ifx\second@@\y@
+ \else
+ \xdef\seq@line{\seq@line\second@\third@\fourth@\fifth@\sixth@}
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifeof\structure@file \else\repeat
+ \closein\structure@file
+ \immediate\write\feature@file{\string\sequence{\seq@line}}
+ \immediate\closeout\feature@file
+ \egroup
+ \xdef\file@n@me{\file@n@me .htp}
+ \input{\file@n@me}
+ \fi
+ \else
+ \egroup
+ \xdef\temp@{ignore}
+ \ifx\temp@\first@
+ \else
+ \message{using existing file:}
+ \xdef\file@n@me{\file@n@me .htp}
+ \input{\file@n@me}
+ \fi
+ \fi
+ }
+
+\def\include@@swiss{%
+ \xdef\first@{\optionswiss}
+ \xdef\structurefilename{\filenameswiss}
+ \bgroup
+ \xdef\file@n@me{\structurefilename .@}
+ \expandafter\cut@name\file@n@me
+ \xdef\temp@{\file@n@me .swp}
+ \immediate\openin\structure@file = \temp@\relax
+ \ifeof\structure@file \xdef\first@{make new} \fi
+ \immediate\closein\structure@file
+ \xdef\temp@{make new}
+ \ifx\first@\temp@
+ \def\par{}
+ \xdef\seq@line{}
+ \inactivate@chars
+ \immediate\openin\structure@file=\structurefilename\relax
+ \ifeof\structure@file
+ \PackageError{TeXtopo}%
+ {File `\structurefilename' not found}%
+ {\MessageBreak
+ The `SwissProt' file you specified is missing or you have \MessageBreak
+ misspelled it. \MessageBreak\MessageBreak
+ No topology will be displayed. \MessageBreak
+ Type <return> to proceed. \MessageBreak
+ Type X <return> to quit. \MessageBreak
+}
+ \immediate\closein\structure@file\egroup
+ \else
+ \xdef\file@n@me{\file@n@me .swp}
+ \immediate\openout\feature@file = \file@n@me\relax
+ \message{[\structurefilename] ->}
+ \xdef\temp@{SQ} \xdef\temp@@{FT}
+ \loop
+ \read\structure@file to \readline
+ \xdef\comment@line{\readline & & & & & & & & &@}
+ \expandafter\struc@get\comment@line
+ \xdef\comment@line{\readline & & & & &. &@}
+ \expandafter\comment@get\comment@line
+ \ifx\temp@@\first@
+ \xdef\first@@{\second@ &@} \xdef\second@{}
+ \expandafter\elim@nonchars\first@@
+ \xdef\fifth@{\fifth@.@}
+ \expandafter\trimm@fifth@\fifth@
+ \ifx\fifth@\ampers@nd
+ \xdef\c@mment{&}
+ \else
+ \expandafter\trimm@comment\c@mment
+ \fi
+ \xdef\first@@{\third@ @}
+ \expandafter\trimm@num\first@@ \xdef\third@{\first@@}
+ \xdef\first@@{\fourth@ @}
+ \expandafter\trimm@num\first@@ \xdef\fourth@{\first@@}
+ \xdef\first@@{CONFLICT}
+ \ifx\first@@\second@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{CONFLICT}{\c@mment}}
+ \else
+ \xdef\first@@{VARIANT}
+ \ifx\first@@\second@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{VARIANT}{\c@mment}}
+ \else
+ \xdef\first@@{VARSPLIC}
+ \ifx\first@@\second@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{VARSPLIC}{\c@mment}}
+ \else
+ \xdef\first@@{MUTAGEN}
+ \ifx\first@@\second@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{MUTAGEN}{\c@mment}}
+ \else
+ \xdef\first@@{MODRES}
+ \ifx\first@@\second@
+ \ifnum\third@=1
+ \immediate\write\feature@file{\string\hideNterm}
+ \fi
+ \xdef\first@@{ACETYLATION}
+ \ifx\fifth@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}%
+ {noshade}{box[Black,Orange]:CH$_3$COO}}
+ \else
+ \xdef\first@@{AMIDATION}
+ \ifx\fifth@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}%
+ {noshade}{box[Black,Green]:NH$_2$}}
+ \else
+ \xdef\first@@{BLOCKED}
+ \ifx\fifth@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}%
+ {noshade}{box[Black,Red]:Blocked}}
+ \ifnum\third@>1
+ \immediate\write\feature@file{\string\hideCterm}
+ \fi
+ \else
+ \xdef\first@@{FORMYLATION}
+ \ifx\fifth@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}%
+ {noshade}{box[Black,Brown]:H$_2$COO[White]}}
+ \else
+ \xdef\first@@{GAMMA-CARBOXYGLUTAMIC}
+ \ifx\fifth@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}%
+ {noshade}{box[Black,Salmon]:$\gamma$-Glu}}
+ \else
+ \xdef\first@@{HYDROXYLATION}
+ \ifx\fifth@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}%
+ {noshade}{box[Black,Blue]:OH[White]}}
+ \else
+ \xdef\first@@{METHYLATION}
+ \ifx\fifth@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}%
+ {noshade}{box[Black]:CH$_3$[White]}}
+ \else
+ \xdef\first@@{PHOSPHORYLATION}
+ \ifx\fifth@\first@@
+ \immediate\write\feature@file{\string\phosphorylation{\third@}}
+ \else
+ \xdef\first@@{PYRROLIDONE}
+ \ifx\fifth@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}%
+ {noshade}{box[Black,Aquamarine]:Pyrrolidone-Glu}}
+ \immediate\write\feature@file{\string\hideNterm}
+ \else
+ \xdef\first@@{SULFATATION}
+ \ifx\fifth@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}%
+ {noshade}{box[Black,Yellow]:SO$_4$\kern-2ex$^-$}}
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \else
+ \xdef\first@@{LIPID}
+ \ifx\first@@\second@
+ \immediate\write\feature@file{\string\anchor{\third@}}
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\third@}{noshade}{\c@mment}}
+ \xdef\first@@{GPI-ANCHOR}
+ \immediate\write\feature@file{\string\hideCterm}
+ \else
+ \xdef\first@@{DISULFID}
+ \ifx\second@\first@@
+ \ifnum\third@=\fourth@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\third@}%
+ {noshade}{box[Black,GreenYellow]:SS\ \c@mment}}
+ \else
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\third@}%
+ {noshade}{box[Black,GreenYellow]:SS$\rightarrow$\fourth@}}
+ \immediate\write\feature@file%
+ {\string\labelregion{\fourth@..\fourth@}%
+ {noshade}{box[Black,GreenYellow]:SS$\rightarrow$\third@}}
+ \fi
+ \else
+ \xdef\first@@{THIOLEST}
+ \ifx\second@\first@@
+ \ifnum\third@=\fourth@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\third@}%
+ {noshade}{box[Black,GreenYellow]:Thiolester\ \c@mment}}
+ \else
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\third@}%
+ {noshade}{box[Black,GreenYellow]:Thiolester$\rightarrow$\fourth@}}
+ \immediate\write\feature@file%
+ {\string\labelregion{\fourth@..\fourth@}%
+ {noshade}{box[Black,GreenYellow]:Thiolester$\rightarrow$\third@}}
+ \fi
+ \else
+ \xdef\first@@{THIOETH}
+ \ifx\second@\first@@
+ \ifnum\third@=\fourth@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\third@}%
+ {noshade}{box[Black,GreenYellow]:Thiolether\ \c@mment}}
+ \else
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\third@}%
+ {noshade}{box[Black,GreenYellow]:Thiolether$\rightarrow$\fourth@}}
+ \immediate\write\feature@file%
+ {\string\labelregion{\fourth@..\fourth@}%
+ {noshade}{box[Black,GreenYellow]:Thiolether$\rightarrow$\third@}}
+ \fi
+ \else
+ \xdef\first@@{CARBOHYD}
+ \ifx\first@@\second@
+ \immediate\write\feature@file{\string\glycosylation{\third@}}
+ \else
+ \xdef\first@@{METAL}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{noshade}{\c@mment}}
+ \else
+ \xdef\first@@{BINDING}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{noshade}{\c@mment}}
+ \else
+ \xdef\first@@{SIGNAL}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{SIGNAL}{\c@mment}}
+ \else
+ \xdef\first@@{TRANSIT}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{TRANSIT}{\c@mment}}
+ \else
+ \xdef\first@@{PROPEP}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{PROPEP}{\c@mment}}
+ \else
+ \xdef\first@@{CHAIN}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{CHAIN}{\c@mment}}
+ \else
+ \xdef\first@@{PEPTIDE}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{PEPTIDE}{\c@mment}}
+ \else
+ \xdef\first@@{DOMAIN}
+ \ifx\first@@\second@
+ \ifnum\third@=1
+ \xdef\first@@{EXTRACELLULAR}
+ \ifx\first@@\fifth@
+ \immediate\write\feature@file{\string\Nterm{extra}}
+ \else
+ \immediate\write\feature@file{\string\Nterm{intra}}
+ \fi
+ \fi
+ \xdef\first@@{EXTRACELLULAR}
+ \ifx\first@@\fifth@
+ \else
+ \xdef\first@@{CYTOPLASMIC}
+ \ifx\first@@\fifth@
+ \else
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{DOMAIN}{\c@mment}}
+ \fi\fi
+ \else
+ \xdef\first@@{CABIND}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{CABIND}{\c@mment}}
+ \else
+ \xdef\first@@{DNABIND}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{DNABIND}{\c@mment}}
+ \else
+ \xdef\first@@{NPBIND}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{NPBIND}{\c@mment}}
+ \else
+ \xdef\first@@{TRANSMEM}
+ \ifx\first@@\second@
+ \immediate\write\feature@file{\string\MRs{\third@..\fourth@}}
+ \else
+ \xdef\first@@{ZNFING}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{ZNFING}{\c@mment}}
+ \else
+ \xdef\first@@{SIMILAR}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{SIMILAR}{\c@mment}}
+ \else
+ \xdef\first@@{REPEAT}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{REPEAT}{\c@mment}}
+ \else
+ \xdef\first@@{SITE}
+ \ifx\second@\first@@
+ \immediate\write\feature@file%
+ {\string\labelregion{\third@..\fourth@}{SITE}{\c@mment}}
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi
+ \ifx\temp@\first@ \else\repeat
+ \loop
+ \read\structure@file to \readline
+ \xdef\structureline{\readline & & & & & & & & &@}
+ \expandafter\struc@get\structureline
+ \xdef\temp@{//}
+ \ifx\temp@\first@
+ \else
+ \ifx\first@\ampers@nd
+ \else
+ \xdef\seq@line{\seq@line\first@}
+ \ifx\second@\ampers@nd
+ \else
+ \xdef\seq@line{\seq@line\second@}
+ \ifx\third@\ampers@nd
+ \else
+ \xdef\seq@line{\seq@line\third@}
+ \ifx\fourth@\ampers@nd
+ \else
+ \xdef\seq@line{\seq@line\fourth@}
+ \ifx\fifth@\ampers@nd
+ \else
+ \xdef\seq@line{\seq@line\fifth@}
+ \ifx\sixth@\ampers@nd
+ \else
+ \xdef\seq@line{\seq@line\sixth@}
+ \ifx\seventh@\ampers@nd
+ \else
+ \xdef\seq@line{\seq@line\seventh@}
+ \ifx\eighth@\ampers@nd
+ \else
+ \xdef\seq@line{\seq@line\eighth@}
+ \ifx\ninth@\ampers@nd
+ \else
+ \xdef\seq@line{\seq@line\ninth@}
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi
+ \ifeof\structure@file \else\repeat
+ \closein\structure@file
+ \immediate\write\feature@file{\string\sequence{\seq@line}}
+ \immediate\closeout\feature@file
+ \egroup
+ \input{\file@n@me}
+ \fi
+ \else
+ \egroup
+ \xdef\temp@{ignore}
+ \ifx\temp@\first@
+ \else
+ \message{using existing file:}
+ \xdef\file@n@me{\file@n@me .swp}
+ \input{\file@n@me}
+ \fi
+ \fi}
+
+\def\check@letter#1#2@{\letterfalse \ifnum\catcode`#1=11 \lettertrue \fi}
+\def\seq@get#1 #2@{\def\first@{#1} \def\seq@line{#2}}
+
+\def\readseq@loop{%
+ \read\in@file to \readline
+ \xdef\last@{\expandafter\string\readline}
+ \ifx\last@\par@
+ \else
+ \xdef\readline{\readline @}
+ \expandafter\seq@get\readline
+ \ifx\sequence@name\first@ \xdef\sequence@{\sequence@\seq@line} \fi
+ \fi
+ \ifeof\in@file \else \readseq@loop \fi}
+
+\def\get@item#1,#2@{\xdef\first@{#2@}\xdef\first@@{#2}\xdef\fourth@{#1}}
+
+\def\get@@digit#1,#2@{%
+ \def\check@series##1-##2##3@{%
+ \xdef\first@@{##2}\xdef\fourth@@{##1}\xdef\fifth@@{##3}}
+ \xdef\fourth@@@{#1}
+ \xdef\first@{#2@}
+ \xdef\fourth@@{#1-*@}
+ \expandafter\check@series\fourth@@
+ \ifx\first@@\st@r
+ \else
+ \loopcount=\fourth@@
+ \ifx\first@\amp@com@t
+ \xdef\l@color{@}
+ \else
+ \xdef\last@{\first@@\fifth@@[@]&}\expandafter\opt@col\last@
+ \xdef\first@@{\fourth@}
+ \fi
+ \ifx\l@color\@t
+ \xdef\fourth@{}
+ \else
+ \xdef\fourth@{[\l@color]}
+ \fi
+ \ifnum\first@@>\fourth@@
+ \advance\loopcount by 1
+ \xdef\first@{\the\loopcount-\first@@\fourth@,#2@}
+ \else
+ \ifnum\first@@<\fourth@@
+ \advance\loopcount by -1
+ \xdef\first@{\the\loopcount-\first@@\fourth@,#2@}
+ \fi
+ \fi
+ \fi
+}
+
+\def\analyze@TM@stack{%
+ \expandafter\get@@digit\first@
+ \ifx\first@@\st@r
+ \else
+ \xdef\TM@stack{\TM@stack,\fourth@@\fourth@}
+ \analyze@TM@stack
+ \fi
+ \ifx\fourth@@@\ampers@nd
+ \else
+ \xdef\TM@stack{\TM@stack,\fourth@@@}
+ \analyze@TM@stack
+ \fi
+}
+
+\def\do@wheel{%
+ \expandafter\get@TMnum\TM@stack
+ \xdef\first@{\TM@num[@]&}%
+ \expandafter\opt@col\first@
+ \xdef\TM@num{\fourth@}%
+ \ifx\l@color\@t\xdef\angle@{0}\else\xdef\angle@{\l@color}\fi
+ \ifx\TM@num\ampers@nd
+ \message{)}%
+ \ifx\wheel@active\y@
+ \end{picture}
+ \fi
+ \newline\hbox{}\vspace{\vspace@@legend}%
+ \newline\hbox{}\vspace{-2\baselineskip}%
+ \setbox1=\hbox{\bsymD\char"0E}
+ \global\setlength\unit@length{0.154\wd1}%
+ \global\setlength\res@@diam{0.5\wd1}%
+ \unitlength\unit@length
+ \else
+ \ifnum\wheel@count=1
+ \noindent\newline\hbox{}%
+ \begin{picture}(\x@max,\y@max)
+ \xdef\wheel@active{y}%
+ \fi
+ \message{.}%
+ \helical@wheel%
+ \ifinsert@ \do@insert \fi
+ \advance\wheel@count by 1
+ \ifnum\wheel@count>\wheels@line
+ \end{picture}%
+ \wheel@count=1
+ \if@net
+ \x@offset=-35
+ \y@offset=5
+ \else
+ \x@offset=\an@kat
+ \multiply\x@offset by 2
+ \divide\x@offset by 3
+ \y@offset=\x@offset
+ \advance\x@offset by -\y@max
+ \advance\y@offset by 0
+ \fi
+ \xdef\wheel@active{n}%
+ \fi
+ \xdef\seq@length{\sl@}%
+ \xdef\sequence@{\seq@}%
+ \xdef\lst@ck{\lst@ck@}%
+ \ifshade\xdef\constopo@{\top@}\fi
+ \if@net
+ \advance\x@offset by 40
+ \else
+ \advance\x@offset by \y@max
+ \fi
+ \pos@count=0
+ \do@wheel%
+ \fi
+}
+
+\def\helical@wheel{%
+ \ifnum\angle@>360
+ \message{<Ignoring angle \angle@ in \noexpand\helicalwheel (no rotation)>}
+ \xdef\angle@{0}
+ \fi
+ \ifnum\angle@<-360
+ \message{<Ignoring angle \angle@ in \noexpand\helicalwheel (no rotation)>}
+ \xdef\angle@{0}
+ \fi
+ \xdef\M@@stack{\M@stack}
+ \loopcount=0
+ \loop
+ \advance\loopcount by 1
+ \expandafter\get@@fromstack\M@stack
+ \xdef\st@rt{\first@} \xdef\st@p{\second@}
+ \xdef\M@stack{\last@}
+ \ifnum\loopcount=\TM@num\else\repeat
+ \xdef\M@stack{\M@@stack}
+ \ifnum\st@rt=\st@p
+ \else
+ \ifnum\st@p>\seq@length \xdef\st@p{\seq@length} \fi
+ \xdef\seq@length{\st@p}
+ \loopcount=\st@p
+ \advance\loopcount by -\st@rt
+ \xdef\st@p@@{\the\loopcount}
+ \advance\loopcount by 1
+ \xdef\st@p@{\the\loopcount}
+ \ifnum\st@p@>36
+ \message{<Length of \noexpand\helicalwheel > 36 aa (no wheel)>}
+ \else
+ \global\helix@true
+ \ifx\l@@k\intr@
+ \ifx\current@pos\intr@
+ \else
+ \xdef\current@pos{intra}
+ \fi
+ \else
+ \ifx\current@pos\intr@
+ \xdef\current@pos{extra}
+ \fi
+ \fi
+ \if@net
+ \loopcount=1
+ \ifnum\st@rt>1
+ \do@itfalse
+ \loop
+ \advance\loopcount by 1
+ \put@res{1}{1}
+ \ifnum\loopcount=\st@rt\else\repeat
+ \fi
+ \loop
+ \expandafter\get@aa\sequence@
+ \xdef\TM@seq{\TM@seq\ch@r}
+ \ifshade
+ \expandafter\get@col\constopo@
+ \xdef\TM@shade{\TM@shade\col@num}
+ \fi
+ \advance\loopcount by 1
+ \ifnum\loopcount>\st@p\else\repeat
+ \xdef\sequence@{\TM@seq &@}
+ \ifshade
+ \xdef\constopo@{\TM@shade @}
+ \fi
+ \xdef\TM@seq{}
+ \xdef\TM@shade{}
+ \xdef\temp@{D}
+ \xdef\font@num{\temp@}
+ \setbox1=\hbox{\csname bsym\temp@\endcsname\char"0F}
+ \res@@diam=\wd1 \divide\res@@diam by 2
+ \loopcount=\st@rt
+ \pos@@count=\loopcount
+ \advance\loopcount by -1
+ \x@pos=\x@offset \y@pos=\y@offset
+ \ifnum\angle@=0\relax \xdef\angle@{4} \fi
+ \temp@@count=\angle@\relax
+ \ifnum\temp@@count>3
+ \advance\temp@@count by -4
+ \multiply\temp@@count by 8
+ \else
+ \advance\temp@@count by -1
+ \multiply\temp@@count by 8
+ \advance\temp@@count by 4
+ \fi
+ \xdef\off@set{\the\temp@@count}
+ \advance\x@pos by \off@set
+ \do@ittrue
+ \ifnum\angle@=3
+ \else
+ \ifnum\angle@=7
+ \else
+ \put(\x@pos,\y@pos){\textcolor{Black}{%
+ \begin{rotopo}{14}%
+ \kern1.3\res@diam%
+ \rule{2.5\res@@diam}{1.3pt}%
+ \end{rotopo}}}
+ \fi\fi
+ \put@res{\x@pos}{\y@pos}
+ \ifwheel@numbers
+ \put(\x@pos,\y@pos){\raisebox{-1.3\res@@diam}{%
+ \tiny\textsf{\textcolor{\c@untc@l}{%
+ \hbox to 0pt{\hss\the\pos@@count\hss}}}}}
+ \fi
+ \temp@@count=\angle@\relax
+ \xdef\angle@{4}
+ \ifnum\temp@@count<1 \temp@@count=1 \fi
+ \ifnum\temp@@count>7 \temp@@count=1 \fi
+ \advance\temp@@count by 1
+ \loop
+ \advance\loopcount by 1
+ \advance\pos@@count by 1
+ \ifnum\loopcount=\st@p
+ \else
+ \ifnum\temp@@count=8
+ \temp@@count=1
+ \advance\x@pos by -20
+ \advance\y@pos by 3
+ \else
+ \ifnum\temp@@count=4
+ \advance\x@pos by -20
+ \advance\y@pos by 3
+ \else
+ \advance\x@pos by 8
+ \advance\y@pos by 2
+ \fi
+ \fi
+ \advance\loopcount by 1
+ \ifnum\loopcount=\st@p
+ \else
+ \ifnum\temp@@count=3
+ \else
+ \ifnum\temp@@count=7
+ \else
+ \put(\x@pos,\y@pos){\textcolor{Black}{%
+ \begin{rotopo}{14}%
+ \kern1.3\res@diam%
+ \rule{2.5\res@@diam}{1.3pt}%
+ \end{rotopo}}}
+ \fi
+ \fi
+ \fi
+ \put@res{\x@pos}{\y@pos}
+ \ifwheel@numbers
+ \put(\x@pos,\y@pos){\raisebox{-1.3\res@@diam}{%
+ \tiny\textsf{\textcolor{\c@untc@l}{%
+ \hbox to 0pt{\hss\the\pos@@count\hss}}}}}
+ \fi
+ \advance\loopcount by -1
+ \advance\temp@@count by 1
+ \repeat
+ \ifTM@label
+ \bgroup
+ \fontfamily{\TMlabel@family}
+ \fontseries{\TMlabel@series}
+ \fontshape{\TMlabel@shape}
+ \selectfont
+ \loopcount=\TM@num
+ \x@pos=\x@offset
+ \advance\x@pos by \off@set
+ \put(\x@pos,\y@offset){\kern-3\res@@diam
+ \raisebox{-\res@@diam}{
+ \hbox to 0pt {\TMlabel@size\textcolor{\TMc@l}%
+ {\hss\TM@labeltext\hss}}}}
+ \egroup
+ \fi
+ \else
+ \ifmu@H
+ \xdef\b@ck@{n}
+ \ifodd\TM@num
+ \ifx\current@pos\intr@ \else \xdef\b@ck@{y} \fi
+ \else
+ \ifx\current@pos\intr@ \xdef\b@ck@{y} \fi
+ \fi
+ \ifx\b@ck@\y@
+ \x@pos=100
+ \multiply\x@pos by \st@p@@
+ \advance\x@pos by -\csname mudelta\TM@num\endcsname
+ \else
+ \x@pos=\csname mudelta\TM@num\endcsname
+ \fi
+ \if@helix@pers %%% How to rotate flat wheels correctly?
+ \else %%%
+ \fi %%%
+ \advance\x@pos by 130
+ \multiply\x@pos by -1
+ \advance\x@pos by \angle@
+ \y@pos=\x@pos
+ \divide\y@pos by 360 \multiply\y@pos by 360
+ \advance\x@pos by -\y@pos
+ \xdef\mu@angle{\the\x@pos}
+ \x@pos=\x@offset \y@pos=\y@offset
+ \advance\x@pos by \gegen@kat
+ \advance\y@pos by \gegen@kat
+ \advance\y@pos by 2
+ \expandafter\sqrt@\csname <muH>\TM@num\endcsname
+ \temp@@count=\r@@t
+ \multiply\temp@@count by 14
+ \ifnum\temp@@count<14000 \temp@@count=14000 \fi
+ \temp@length=1sp
+ \multiply\temp@length by \temp@@count
+ \temp@length6.5536\temp@length
+ \xdef\first@{\the\temp@length}
+ \temp@length-0.92\temp@length
+ \xdef\second@{\the\temp@length}
+ \if@helix@pers
+ \temp@length=45mm
+ \else
+ \temp@length=52mm
+ \fi
+ \setlength\temp@length{0.01\temp@length}
+ \setlength\temp@length{\scale@factor\temp@length}
+ \setlength\temp@length{0.01\temp@length}
+ \setlength\temp@length{\m@mentlength\temp@length}
+ \put(\x@pos,\y@pos){\textcolor{\moment@color}{%
+ \begin{rotopo}{\mu@angle}%
+ \rule{\temp@length}{0.5pt}%
+ \begin{rotopo}{45}%
+ \rule[\second@]{\first@}{\first@}%
+ \end{rotopo}\end{rotopo}}}
+
+ \fi
+ \temp@length=60mm
+ \temp@@count=60
+ \setlength\temp@length{0.01\temp@length}
+ \setlength\temp@length{\scale@factor\temp@length}
+ \multiply\temp@@count by \scale@factor
+ \divide\temp@@count by 100
+ \bond@thickness=1.5pt
+ \innerloopcount=90
+ \advance\innerloopcount by \angle@
+ \ifnum\innerloopcount>360\advance\innerloopcount by -360\fi
+ \ifnum\innerloopcount<0\advance\innerloopcount by 360\fi
+ \loopcount=40
+ \advance\loopcount by -\angle@
+ \ifnum\loopcount<0\advance\loopcount by 360\fi
+ \x@pos=\x@offset \y@pos=\y@offset
+ \sin@{\the\loopcount}
+ \if@helix@pers
+ \multiply\sincos by \hyp@
+ \else
+ \multiply\sincos by \hyp@flat
+ \fi
+ \divide\sincos by 10000
+ \advance\x@pos by -\sincos
+ \advance\x@pos by \gegen@kat
+ \cos@{\the\loopcount}
+ \if@helix@pers
+ \multiply\sincos by \hyp@
+ \else
+ \multiply\sincos by \hyp@flat
+ \fi
+ \divide\sincos by 10000
+ \advance\y@pos by -\sincos
+ \advance\y@pos by \an@kat
+ \if@helix@pers
+ \else
+ \advance\temp@length by -1mm
+ \advance\temp@@count by -1
+ \fi
+ \loopcount=0
+ \loop
+ \advance\loopcount by 1
+ \if@helix@pers
+ \advance\bond@thickness by -0.05pt
+ \ifdim\bond@thickness < 0.2pt
+ \bond@thickness = 0.2pt
+ \fi
+ \else
+ \bond@thickness=0.8pt
+ \fi
+ \ifx\show@bonds\y@
+ \put(\x@pos,\y@pos){%
+ \begin{rotopo}{\the\innerloopcount}%
+ \rule{\temp@length}{\bond@thickness}%
+ \end{rotopo}}
+ \fi
+ \sin@{\the\innerloopcount}
+ \multiply\sincos by \temp@@count
+ \divide\sincos by 10000
+ \advance\y@pos by \sincos
+ \cos@{\the\innerloopcount}
+ \multiply\sincos by \temp@@count
+ \divide\sincos by 10000
+ \advance\x@pos by \sincos
+ \if@helix@pers
+ \advance\temp@length by -1mm
+ \advance\temp@@count by -1
+ \fi
+ \advance\innerloopcount by -100
+ \ifnum\innerloopcount<0\advance\innerloopcount by 360\fi
+ \ifnum\loopcount=\st@p@@\else\repeat
+ \advance\temp@length by 1mm
+ \advance\temp@@count by 1
+ \advance\innerloopcount by -80
+ \loopcount=1
+ \ifnum\st@rt>1
+ \do@itfalse
+ \loop
+ \advance\loopcount by 1
+ \put@res{1}{1}
+ \ifnum\loopcount=\st@rt\else\repeat
+ \fi
+ \xdef\b@ck@{n}
+ \loop
+ \expandafter\get@aa\sequence@
+ \ifshade \expandafter\get@col\constopo@ \fi
+ \ifodd\TM@num
+ \ifx\current@pos\intr@
+ \xdef\TM@seq{\ch@r\TM@seq}
+ \ifshade \xdef\TM@shade{\col@num\TM@shade} \fi
+ \else
+ \xdef\TM@seq{\TM@seq\ch@r}
+ \ifshade \xdef\TM@shade{\TM@shade\col@num} \fi
+ \xdef\b@ck@{y}
+ \fi
+ \else
+ \ifx\current@pos\intr@
+ \xdef\TM@seq{\TM@seq\ch@r}
+ \ifshade \xdef\TM@shade{\TM@shade\col@num} \fi
+ \xdef\b@ck@{y}
+ \else
+ \xdef\TM@seq{\ch@r\TM@seq}
+ \ifshade \xdef\TM@shade{\col@num\TM@shade} \fi
+ \fi
+ \fi
+ \advance\loopcount by 1
+ \ifnum\loopcount>\st@p\else\repeat
+ \xdef\sequence@{\TM@seq &@}
+ \ifshade
+ \xdef\constopo@{\TM@shade @}
+ \fi
+ \ifx\b@ck@\y@
+ \else
+ \xdef\tmpstack{}
+ \xdef\l@st{\lst@ck@}
+ \reverse@lstack
+ \xdef\lst@ck{\tmpstack&;&;&;&;&;&;&;@}
+ \getregion@fromlstack
+ \fi
+ \xdef\TM@seq{}
+ \xdef\TM@shade{}
+ \ifx\b@ck@\y@
+ \pos@@count=\st@rt
+ \else
+ \pos@@count=\st@p
+ \fi
+ \loopcount=\st@p@
+ \do@ittrue
+ \if@helix@pers
+ \loop
+ \iloopcount=\loopcount
+ \advance\iloopcount by -1
+ \divide\iloopcount by 4
+ \advance\iloopcount by 1
+ \ifnum\iloopcount>7 \iloopcount=7 \fi
+ \xdef\temp@{\@Alph\iloopcount}
+ \xdef\font@num{\temp@}
+ \setbox1=\hbox{\csname bsym\temp@\endcsname\char"0F}
+ \res@@diam=\wd1 \divide\res@@diam by 2
+ \put@res{\x@pos}{\y@pos}
+ \ifwheel@numbers
+ \put(\x@pos,\y@pos){\kern0.9\res@@diam \raisebox{-0.2\res@@diam}%
+ {\tiny\textsf{\hss\textcolor{\c@untc@l}%
+ {\the\pos@@count}}}}
+ \fi
+ \sin@{\the\innerloopcount}
+ \multiply\sincos by \temp@@count
+ \divide\sincos by 10000
+ \advance\y@pos by \sincos
+ \cos@{\the\innerloopcount}
+ \multiply\sincos by \temp@@count
+ \divide\sincos by 10000
+ \advance\x@pos by \sincos
+ \advance\temp@length by 1mm
+ \advance\temp@@count by 1
+ \advance\innerloopcount by 100
+ \ifnum\innerloopcount>360\advance\innerloopcount by -360\fi
+ \ifx\b@ck@\y@
+ \advance\pos@@count by 1
+ \else
+ \advance\pos@@count by -1
+ \fi
+ \advance\loopcount by -1
+ \ifnum\loopcount=0\else\repeat
+ \else
+ \xdef\font@num{D}
+ \setbox1=\hbox{\csname bsymD\endcsname\char"0F}
+ \res@@diam=\wd1 \divide\res@@diam by 2
+ \x@pos = 100
+ \multiply\x@pos by \loopcount
+ \advance\x@pos by 30
+ \multiply\x@pos by -1
+ \advance\x@pos by \angle@
+ \y@pos=\x@pos
+ \divide\y@pos by 360 \multiply\y@pos by 360
+ \advance\x@pos by -\y@pos
+ \innerloopcount=\x@pos
+ \temp@length=0.35146\wd1
+ \sincos = \temp@length
+ \divide\sincos by 65536
+ \xdef\temp@@{\the\sincos}
+ \temp@@count=60
+ \multiply\temp@@count by \scale@factor
+ \divide\temp@@count by 100
+ \sin@{40}
+ \multiply\sincos by \temp@@count
+ \divide\sincos by 10000
+ \temp@@count=\sincos
+ \ifnum\loopcount>18
+ \advance\temp@@count by \temp@@
+ \advance\temp@@count by -1
+ \fi
+ \loop
+ \sin@{\the\innerloopcount}
+ \multiply\sincos by \temp@@count
+ \divide\sincos by 10000
+ \y@pos = \sincos
+ \advance\y@pos by \y@offset
+ \advance\y@pos by \an@kat
+ \cos@{\the\innerloopcount}
+ \multiply\sincos by \temp@@count
+ \divide\sincos by 10000
+ \x@pos = \sincos
+ \advance\x@pos by \x@offset
+ \advance\x@pos by \gegen@kat
+ \put@res{\x@pos}{\y@pos}
+ \ifwheel@numbers
+ \ifnum\innerloopcount<0 \advance\innerloopcount by 360 \fi
+ \ifnum\loopcount>18
+ \ifnum\innerloopcount<91
+ \put(\x@pos,\y@pos){\kern0.8\res@@diam%
+ \raisebox{-0.2\res@@diam}{%
+ \tiny\textsf{\textcolor{\c@untc@l}%
+ {\the\pos@@count\hss}}}}
+ \else
+ \ifnum\innerloopcount<271
+ \put(\x@pos,\y@pos){\kern-0.8\res@@diam%
+ \raisebox{-0.2\res@@diam}{%
+ \hbox to 0pt{%
+ \tiny\textsf{\textcolor{\c@untc@l}%
+ {\hss\the\pos@@count}}}}}
+ \else
+ \put(\x@pos,\y@pos){\kern0.8\res@@diam%
+ \raisebox{-0.2\res@@diam}{%
+ \tiny\textsf{\textcolor{\c@untc@l}%
+ {\the\pos@@count\hss}}}}
+ \fi
+ \fi
+ \else
+ \ifnum\innerloopcount<91
+ \temp@count=\innerloopcount
+ \advance\temp@count by -70
+ \divide\temp@count by 20
+ \else
+ \ifnum\innerloopcount<181
+ \temp@count=\innerloopcount
+ \advance\temp@count by -110
+ \multiply\temp@count by -1
+ \divide\temp@count by 20
+ \else
+ \ifnum\innerloopcount<271
+ \temp@count=\innerloopcount
+ \advance\temp@count by -230
+ \multiply\temp@count by -1
+ \divide\temp@count by 20
+ \else
+ \temp@count=\innerloopcount
+ \advance\temp@count by -310
+ \divide\temp@count by 20
+ \fi\fi\fi
+ \dimen@=0.25\res@@diam
+ \multiply\dimen@ by \temp@count
+ \advance\dimen@ by -0.08\res@@diam
+ \xdef\off@set{\the\dimen@}
+ \ifnum\innerloopcount<91
+ \put(\x@pos,\y@pos){\kern0.8\res@@diam%
+ \raisebox{\off@set}{%
+ \tiny\textsf{\textcolor{\c@untc@l}%
+ {\the\pos@@count\hss}}}}
+ \else
+ \ifnum\innerloopcount<270
+ \put(\x@pos,\y@pos){\kern-0.8\res@@diam%
+ \raisebox{\off@set}{%
+ \hbox to 0pt{%
+ \tiny\textsf{\textcolor{\c@untc@l}%
+ {\hss\the\pos@@count}}}}}
+ \else
+ \put(\x@pos,\y@pos){\kern0.8\res@@diam%
+ \raisebox{\off@set}{%
+ \tiny\textsf{\textcolor{\c@untc@l}%
+ {\the\pos@@count\hss}}}}
+ \fi
+ \fi
+ \fi
+ \fi
+ \advance\innerloopcount by 100
+ \ifnum\innerloopcount>360\advance\innerloopcount by -360\fi
+ \ifx\b@ck@\y@
+ \advance\pos@@count by 1
+ \else
+ \advance\pos@@count by -1
+ \fi
+ \advance\loopcount by -1
+ \ifnum\loopcount = 18
+ \temp@@count=\scale@factor
+ \multiply\temp@@count by 60
+ \divide\temp@@count by 100
+ \sin@{40}
+ \multiply\sincos by \temp@@count
+ \divide\sincos by 10000
+ \temp@@count=\sincos
+ \fi
+ \ifnum\loopcount=0\else\repeat
+ \fi
+ \ifTM@label
+ \bgroup
+ \fontfamily{\TMlabel@family}
+ \fontseries{\TMlabel@series}
+ \fontshape{\TMlabel@shape}
+ \selectfont
+ \x@pos=\x@offset \y@pos=\y@offset
+ \advance\x@pos by \gegen@kat
+ \advance\y@pos by \gegen@kat
+ \advance\y@pos by 1
+ \loopcount=\TM@num
+ \put(\x@pos,\y@pos){\hbox to 0pt {\TMlabel@size\textcolor{\TMc@l}%
+ {\hss\TM@labeltext\hss}}}
+ \egroup
+ \fi
+ \fi
+ \fi
+ \fi
+}
+
+\def\do@insert{%
+ \loopcount=0
+ \loop
+ \advance\loopcount by 1
+ \xdef\first@{\csname ins@n\the\loopcount\endcsname}
+ \ifnum\TM@num=\first@
+ \xdef\second@{\csname ins@x\the\loopcount\endcsname}
+ \xdef\third@{\csname ins@y\the\loopcount\endcsname}
+ \def\fourth@{\csname ins@z\the\loopcount\endcsname}
+ \x@pos=\y@max\relax \multiply\x@pos by \second@\relax
+ \divide\x@pos by 100\relax
+ \advance\x@pos by \x@offset
+ \advance\x@pos by -16
+ \y@pos=\y@max\relax \multiply\y@pos by \third@\relax
+ \divide\y@pos by 100\relax
+ \put(\x@pos,\y@pos){\fourth@}
+ \fi
+ \ifnum\loopcount=\insert@num\else\repeat
+}
+
+\def\do@@insert{%
+ \loopcount=0
+ \loop
+ \advance\loopcount by 1
+ \xdef\second@{\csname ins@x\the\loopcount\endcsname}
+ \xdef\third@{\csname ins@y\the\loopcount\endcsname}
+ \def\fourth@{\csname ins@z\the\loopcount\endcsname}
+ \x@pos=\x@max\relax \multiply\x@pos by \second@\relax
+ \divide\x@pos by 100\relax
+ \y@pos=\y@max\relax \multiply\y@pos by \third@\relax
+ \divide\y@pos by 100\relax
+ \put(\x@pos,\y@pos){\fourth@}
+ \ifnum\loopcount=\insert@num\else\repeat
+}
+
+\def\get@start@stop#1..#2@{\xdef\sec@start{#1}\xdef\sec@stop{#2}}
+
+\def\get@numbers#1/#2@{\x@pos=#1 \y@pos=#2}
+
+\def\exp@nd@element#1,#2@{%
+ \xdef\first@{#2}
+ \ifx\first@\ampers@nd
+ \ifx\l@st@element\y@
+ \advance\loopcount by -1
+ \ifx\l@color\@t
+ \xdef\temp@stack{\temp@stack,\the\loopcount:#1 @}
+ \else
+ \xdef\temp@stack{\temp@stack,\the\loopcount:\l@color @}
+ \fi
+ \else
+ \ifx\l@color\@t
+ \xdef\first@{#1@}
+ \else
+ \xdef\first@{\l@color @}
+ \fi
+ \expandafter\get@numbers\first@
+ \fi
+ \else
+ \ifx\first@element\y@
+ \xdef\first@element{n}
+ \xdef\first@{#1@}
+ \x@offset=\x@pos
+ \y@offset=\y@pos
+ \expandafter\get@numbers\first@
+ \advance\x@pos by \x@offset
+ \advance\y@pos by \y@offset
+ \xdef\temp@stack{\temp@stack,\the\loopcount:\the\x@pos/\the\y@pos}
+ \else
+ \xdef\temp@stack{\temp@stack,\the\loopcount:#1}
+ \fi
+ \advance\loopcount by 1
+ \xdef\first@{#2@}
+ \expandafter\exp@nd@element\first@
+ \fi
+}
+
+\def\get@three#1:#2(#3)#4@{\xdef\first@{#1} \xdef\second@{#2} \xdef\third@{#3}}
+
+\def\straight@{%
+ \ifnum\second@>0
+ \temp@count=0
+ \xdef\first@{0/0}
+ \loop
+ \advance\temp@count by 1
+ \ifnum\temp@count>\second@
+ \xdef\first@{\first@,&@}
+ \else
+ \xdef\first@{\first@,\third@} \repeat
+ \fi
+}
+
+\def\helix@{%
+ \ifnum\second@>0
+ \temp@count=0
+ \temp@@count=\third@\relax
+ \ifnum\temp@@count<1 \temp@@count=1 \fi
+ \ifnum\temp@@count>7 \temp@@count=1 \fi
+ \advance\temp@@count by 1
+ \xdef\first@{0/0}
+ \loop
+ \advance\temp@count by 1
+ \ifnum\temp@count>\second@
+ \xdef\first@{\first@,&@}
+ \else
+ \ifnum\temp@@count=8
+ \temp@@count=1
+ \xdef\third@{\first@@}
+ \else
+ \ifnum\temp@@count=4
+ \xdef\third@{\first@@}
+ \else
+ \xdef\third@{\second@@}
+ \fi
+ \fi
+ \advance\temp@@count by 1
+ \xdef\first@{\first@,\third@}
+ \repeat
+ \fi
+}
+
+\def\get@element#1,#2@{%
+ \xdef\first@{#1[@]&}
+ \expandafter\opt@col\first@
+ \xdef\first@{\fourth@:&(&)@}
+ \expandafter\get@three\first@
+ \xdef\last@{up}
+ \ifx\first@\last@
+ \xdef\first@{\second@ (&)@}
+ \expandafter\get@three\first@
+ \xdef\second@{\first@}
+ \xdef\third@{0/5}
+ \straight@
+ \else
+ \xdef\last@{down}
+ \ifx\first@\last@
+ \xdef\first@{\second@ (&)@}
+ \expandafter\get@three\first@
+ \xdef\second@{\first@}
+ \xdef\third@{0/-5}
+ \straight@
+ \else
+ \xdef\last@{left}
+ \ifx\first@\last@
+ \xdef\first@{\second@ (&)@}
+ \expandafter\get@three\first@
+ \xdef\second@{\first@}
+ \xdef\third@{-5/0}
+ \straight@
+ \else
+ \xdef\last@{right}
+ \ifx\first@\last@
+ \xdef\first@{\second@ (&)@}
+ \expandafter\get@three\first@
+ \xdef\second@{\first@}
+ \xdef\third@{5/0}
+ \straight@
+ \else
+ \xdef\last@{straight}
+ \ifx\first@\last@
+ \straight@
+ \else
+ \xdef\last@{uphelix}
+ \ifx\first@\last@
+ \xdef\first@@{-13/2}
+ \xdef\second@@{5/1}
+ \helix@
+ \else
+ \xdef\last@{downhelix}
+ \ifx\first@\last@
+ \xdef\first@@{13/-2}
+ \xdef\second@@{-5/-1}
+ \helix@
+ \else
+ \xdef\last@{lefthelix}
+ \ifx\first@\last@
+ \xdef\first@@{-2/-13}
+ \xdef\second@@{-1/5}
+ \helix@
+ \else
+ \xdef\last@{righthelix}
+ \ifx\first@\last@
+ \xdef\first@@{2/13}
+ \xdef\second@@{1/-5}
+ \helix@
+ \else
+ \expandafter\ifx\csname \first@\endcsname\relax
+ \PackageError{TeXtopo}
+ {Element `#1' not defined}
+ {\MessageBreak
+ The remodelling element you want to use is not \MessageBreak
+ defined. Check the spelling or define it using\MessageBreak
+ the \noexpand\newelement command.\MessageBreak
+ Better stop here by typing `X' Return.\MessageBreak
+}
+ \fi
+ \xdef\first@{\csname \fourth@ \endcsname}
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \xdef\last@{#2}
+ \ifx\last@\ampers@nd
+ \xdef\first@element{y}
+ \xdef\l@st@element{y}
+ \expandafter\exp@nd@element\first@
+ \else
+ \xdef\first@element{y}
+ \expandafter\exp@nd@element\first@
+ \xdef\last@{#2@} \expandafter\get@element\last@
+ \fi
+}
+
+\def\get@m@d@stack@ori#1,#2@{\xdef\m@d@stack@ori{#2}}
+
+\def\do@grid{%
+ \setlength\temp@length{\unit@length}
+ \multiply\temp@length by \y@max\relax
+ \advance\temp@length by 2\unit@length\relax
+ \loopcount=0
+ \loop
+ \put(\loopcount,0){\kern-0.05pt\rule{0.1pt}{\temp@length}}
+ \advance\loopcount by \grid@mesh
+ \ifnum\loopcount>\x@max \else \repeat
+ \setlength\temp@length{\unit@length}
+ \multiply\temp@length by \x@max\relax
+ \advance\temp@length by 5\unit@length\relax
+ \loopcount=0
+ \loop
+ \put(0,\loopcount){\rule[-0.05pt]{\temp@length}{0.1pt}}
+ \advance\loopcount by \grid@mesh
+ \ifnum\loopcount>\y@max \else \repeat
+}
+
+{\catcode`t=12\catcode`p=12\gdef\noPT#1pt{#1}}
+
+\def\get@numnum#1.#2#3#4@{\xdef\first@{#1#2#3}}
+
+\def\extract@TMs{%
+ \expandafter\get@@fromstack\M@@stack
+ \xdef\st@rt{\first@} \xdef\st@p{\second@}
+ \xdef\M@@stack{\last@}
+ \ifx\st@rt\ampers@nd
+ \else
+ \temp@count=\st@p
+ \advance\temp@count by -\st@rt\relax
+ \ifnum\temp@count<13
+ \else
+ \advance\innerloopcount by 1
+ \expandafter\xdef\csname TM\the\innerloopcount\endcsname{}
+ \iloopcount=0 \x@pos=0 \y@pos=0 \x@offset=0
+ \loop
+ \advance\loopcount by 1
+ \ifnum\loopcount=0 \loopcount=1 \fi
+ \expandafter\get@aa\sequence@
+ \ifnum\loopcount<\st@rt
+ \else
+ \expandafter\xdef\csname TM\the\innerloopcount\endcsname{%
+ \csname TM\the\innerloopcount\endcsname\ch@r}
+ \sin@{\the\iloopcount}
+ \multiply\sincos by \csname H@\ch@r\endcsname
+ \divide\sincos by 10000
+ \advance\y@pos by \sincos
+ \cos@{\iloopcount}
+ \multiply\sincos by \csname H@\ch@r\endcsname
+ \divide\sincos by 10000
+ \advance\x@pos by \sincos
+ \advance\x@offset by \csname H@\ch@r\endcsname
+ \advance\iloopcount by 100
+ \fi
+ \ifnum\loopcount=\st@p \else \repeat
+ \invtan@{\the\x@pos}{\the\y@pos}
+ \expandafter\xdef\csname mudelta\the\innerloopcount\endcsname{\the\sincos}
+ \divide\iloopcount by 100
+ \divide\x@offset by \iloopcount
+ \expandafter\xdef\csname <H>\the\innerloopcount\endcsname{\the\x@offset}
+ \invtan@{\the\x@pos}{\the\y@pos}
+ \expandafter\xdef\csname mudelta\the\innerloopcount\endcsname{\the\sincos}
+ \dimen@=\x@pos\s@
+ \@tempdima=0.1\dimen@
+ \multiply\dimen@\@tempdima
+ \dimen@0.65536\dimen@
+ \xdef\first@{\expandafter\noPT\the\dimen@ @}
+ \expandafter\get@numnum\first@
+ \x@pos=\first@
+ \dimen@=\y@pos\s@
+ \@tempdima=0.1\dimen@
+ \multiply\dimen@\@tempdima
+ \dimen@0.65536\dimen@
+ \xdef\first@{\expandafter\noPT\the\dimen@ @}
+ \expandafter\get@numnum\first@
+ \y@pos=\first@\relax
+ \advance\x@pos by \y@pos\relax
+ \sqrt@{\the\x@pos}
+ \expandafter\xdef\csname muH\the\innerloopcount\endcsname{\r@@t}
+ \x@pos=\r@@t
+ \divide\x@pos by \iloopcount
+ \expandafter\xdef\csname <muH>\the\innerloopcount\endcsname{\the\x@pos}
+ \fi
+ \extract@TMs
+ \fi
+}
+
+\def\analyze@seq{%
+ \xdef\seq@{\seq@ &@}
+ \xdef\sequence@{}
+ \xdef\st@r@{n}
+ \pos@count=-\N@tag@length\relax
+ \advance\pos@count by -1\relax
+ \expandafter\count@res\seq@
+ \xdef\sequence@{\sequence@&@}
+ \xdef\seq@length{\the\pos@count}
+ \ifx\TM\y@
+ \xdef\M@@stack{\M@stack}
+ \xdef\seq@{\sequence@}
+ \loopcount=0
+ \loopcount=-\N@tag@length\relax
+ \advance\loopcount by -1\relax
+ \innerloopcount=0
+ \extract@TMs
+ \xdef\sequence@{\seq@}
+ \fi
+}
+
+%%%%%%%%% User commands
+
+\newcommand{\getsequence}[3][existing]{%
+ \xdef\first@{#2}
+ \xdef\temp@{PHD}
+ \ifx\first@\temp@
+ \xdef\first@{#1} \xdef\temp@{existing}
+ \ifx\first@\temp@ \else\xdef\first@{make new}\fi
+ \xdef\optionphd{\first@}
+ \xdef\filenamephd{#3}
+ \include@@PHD
+ \else
+ \xdef\temp@{HMMTOP}
+ \ifx\first@\temp@
+ \xdef\first@{#1} \xdef\temp@{existing}
+ \ifx\first@\temp@ \else\xdef\first@{make new}\fi
+ \xdef\optionHMMTOP{\first@}
+ \xdef\filenameHMMTOP{#3}
+ \include@@HMMTOP
+ \else
+ \xdef\temp@{SwissProt}
+ \ifx\first@\temp@
+ \xdef\first@{#1} \xdef\temp@{existing}
+ \ifx\first@\temp@ \else\xdef\first@{make new}\fi
+ \xdef\optionswiss{\first@}
+ \xdef\filenameswiss{#3}
+ \include@@swiss
+ \else
+ \xdef\temp@{alignment}
+ \ifx\first@\temp@
+ \xdef\alignname{#3}
+ \openin\in@file = #3
+ \ifeof\in@file
+ \PackageError{TeXtopo}
+ {File `\alignname' not found}
+ {\MessageBreak
+ The alignment file you specified is missing or you have \MessageBreak
+ misspelled it. \MessageBreak\MessageBreak
+ Stop here, otherwise you're likely getting in trouble. \MessageBreak
+ Type X <return> to quit. \MessageBreak
+}
+ \else
+ \message{(\alignname)}
+ \xdef\he@der{no}
+ \xdef\temp@@@{#1} \xdef\temp@{existing}
+ \ifx\temp@@@\temp@
+ \xdef\temp@@@{1}
+ \message{<No number specified. Using first seq of alignment>}
+ \fi
+ \loopcount=0 \innerloopcount=0
+ \loop
+ \read\in@file to \readline
+ \xdef\test@{\expandafter\string\readline}
+ \ifx\test@\par@ \innerloopcount=0
+ \else
+ \xdef\msfline{\readline & & & & & & & & &@}
+ \expandafter\struc@get\msfline
+ \ifx\first@\n@me \advance\loopcount by 1\relax
+ \ifnum\loopcount=\temp@@@\relax \xdef\msf@name{\second@} \fi
+ \fi
+ \ifx\first@\he@derend
+ \ifnum\loopcount>0 \xdef\he@der{yes} \fi
+ \fi
+ \xdef\temp@{\first@}
+ \xdef\first@{\first@ @}
+ \expandafter\check@letter\first@
+ \ifletter
+ \advance\innerloopcount by 1\relax
+ \ifnum\innerloopcount=\temp@@@\relax \xdef\aln@name{\temp@} \fi
+ \fi
+ \fi
+ \ifeof\in@file \else\repeat
+ \closein\in@file
+ \xdef\first@{no}
+ \ifx\he@der\first@
+ \xdef\sequence@name{\aln@name}
+ \else
+ \xdef\sequence@name{\msf@name}
+ \fi
+ \xdef\sequence@{}
+ \openin\in@file = #3 \readseq@loop \closein\in@file
+ \expandafter\sequence{\sequence@}
+ \fi
+ \else
+ \PackageError{TeXtopo}
+ {Undefined file type demanded}
+ {\MessageBreak
+ The type of file you demanded is undefined or you have \MessageBreak
+ misspelled it. Currently `PHD', `SwissProt' and `alignment'\MessageBreak
+ are known to TeXtopo.\MessageBreak\MessageBreak
+ Stop here, otherwise you're likely getting in trouble. \MessageBreak
+ Type X <return> to quit. \MessageBreak
+}
+ \fi\fi\fi\fi
+}
+
+\def\seqstart#1{%
+ \loopcount=#1
+ \ifnum\loopcount=0 \advance\loopcount by 1 \fi
+ \xdef\seq@start{\the\loopcount}
+}
+
+\def\displaysection#1{%
+ \xdef\first@{#1@} \expandafter\get@start@stop\first@
+}
+
+\def\shadestartMet{\no@start@metfalse}
+\newcommand{\donotshadestartMet}[1][1]{\xdef\start@met@num{#1}\no@start@mettrue}
+
+\newcommand{\applyshading}[3][1]{%
+ \expandafter\ifx\csname TeXshade\endcsname\relax
+ \PackageError{TeXtopo}
+ {`texshade.sty' not loaded}
+ {\MessageBreak
+ In order to apply shading on your topology plot you need\MessageBreak
+ to load the TeXshade package (v1.3 or a more recent version)\MessageBreak
+ using the command\noexpand\usepackage{texshade} before loading\MessageBreak
+ TeXtopo or by using the BioTeX Bundle.\MessageBreak
+ TeXshade and BioTeX are available from any CTAN site or from\MessageBreak
+ the BioTeX/TeXshade homepage: \MessageBreak
+ http://homepages.uni-tuebingen.de/beitz/tse.html
+ \MessageBreak\MessageBreak
+ No shading will be applied.\MessageBreak
+}
+ \else
+ \expandafter\ifx\csname geneticcode\endcsname\relax
+ \PackageError{TeXtopo}
+ {Version of `texshade.sty' too old}
+ {\MessageBreak
+ In order to apply shading on your topology plot you need\MessageBreak
+ to load a more recent TeXshade package (v1.3 or newer). \MessageBreak
+ TeXshade is available from any CTAN site or from the \MessageBreak
+ TeXshade/BioTeX homepage: \MessageBreak
+ http://homepages.uni-tuebingen.de/beitz/tse.html
+ \MessageBreak\MessageBreak
+ No shading will be applied.\MessageBreak
+}
+ \else
+ \xdef\c@l@rscheme@{\c@l@rscheme}
+ \xdef\l@fam@{\l@fam}
+ \xdef\l@shap@{\l@shap}
+ \xdef\l@ser@{\l@ser}
+ \xdef\l@size@{\l@size}
+ \xdef\first@{similar}
+ \xdef\second@{#2}
+ \ifx\first@\second@
+ \xdef\lo@d{existing}
+ \xdef\file@n@me{#3 .@}
+ \expandafter\cut@name\file@n@me
+ \xdef\file@n@me@{\file@n@me#1.shd}
+ \immediate\openin\structure@file = \file@n@me@\relax
+ \ifeof\structure@file \xdef\lo@d{make new} \fi
+ \immediate\closein\structure@file
+ \xdef\first@{make new}
+ \ifx\first@\lo@d
+ \begin{texshade}{#3}
+ \shadingmode{similar}
+ \constosingleseq{#1}
+ \xdef\out@put{no}
+ \end{texshade}
+ \immediate\openout\feature@file = \file@n@me@\relax
+ \immediate\write\feature@file{\string\xdef\string\constopo{\constopo}}
+ \immediate\closeout\feature@file
+ \else
+ \message{using existing file:}
+ \input{\file@n@me@}
+ \fi
+ \xdef\constopo@{\constopo &@}
+ \shadetrue \similar@shadetrue
+ \shadelegend@@true
+ \xdef\c@l@rscheme{\c@l@rscheme@}
+ \shadingcolors{\c@l@rscheme}
+ \else
+ \xdef\first@{identical}
+ \ifx\first@\second@
+ \xdef\lo@d{existing}
+ \xdef\file@n@me{#3 .@}
+ \expandafter\cut@name\file@n@me
+ \xdef\file@n@me@{\file@n@me#1.shd}
+ \immediate\openin\structure@file = \file@n@me@\relax
+ \ifeof\structure@file \xdef\lo@d{make new} \fi
+ \immediate\closein\structure@file
+ \xdef\first@{make new}
+ \ifx\first@\lo@d
+ \begin{texshade}{#3}
+ \shadingmode{similar}
+ \constosingleseq{#1}
+ \xdef\out@put{no}
+ \end{texshade}
+ \immediate\openout\feature@file = \file@n@me@\relax
+ \immediate\write\feature@file{\string\xdef\string\constopo{\constopo}}
+ \immediate\closeout\feature@file
+ \else
+ \message{using existing file:}
+ \input{\file@n@me@}
+ \fi
+ \xdef\constopo@{\constopo &@}
+ \shadetrue \similar@shadefalse
+ \shadelegend@@true
+ \xdef\c@l@rscheme{\c@l@rscheme@}
+ \shadingcolors{\c@l@rscheme}
+ \else
+ \xdef\first@{functional}
+ \ifx\first@\second@
+ \shadefalse \similar@shadefalse
+ \funcmodetrue
+ \shadelegend@@true
+ \xdef\first@{#3@}
+ \ifx\first@\ampers@nd \clearfuncgroups \else \func@shading{#3} \fi
+ \xdef\first@{1}\xdef\second@{#1}
+ \ifx\first@\second@\else\input{#1}\fi
+ \xdef\shade@num{\fgroup@num}
+ \ifnum\fgroup@num>0
+ \loopcount=0
+ \loop
+ \advance\loopcount by 1
+ \expandafter\xdef\csname show@shade\the\loopcount\endcsname{y}
+ \ifnum\loopcount=\fgroup@num\else\repeat
+ \fi
+ \else
+ \PackageError{TeXtopo}
+ {Unknown shading mode}
+ {\MessageBreak
+ The shading mode you demanded is undefined or you have \MessageBreak
+ misspelled it. At the moment `identical', `similar' and \MessageBreak
+ `functional' are known to TeXtopo.\MessageBreak\MessageBreak
+ No shading will be applied.\MessageBreak
+}
+ \fi\fi\fi
+ \xdef\l@fam{\l@fam@}
+ \xdef\l@shap{\l@shap@}
+ \xdef\l@ser{\l@ser@}
+ \xdef\l@size{\l@size@}
+ \setfont{legend}{\l@fam}{\l@ser}{\l@shap}{\l@size}
+ \fi\fi
+}
+
+\def\sequence#1{\xdef\seq@{#1}}
+
+\def\loopfoot#1#2{%
+ \xdef\first@{#2[5]&}\expandafter\opt@col\first@
+ \loopcount=\l@color\relax
+ \ifnum\loopcount<1 \loopcount=1 \fi
+ \multiply\loopcount by -2\relax
+ \expandafter\xdef\csname foot@direct#1\endcsname{\fourth@}
+ \expandafter\xdef\csname neck@length#1\endcsname{\the\loopcount}
+ \expandafter\xdef\csname foot@#1\endcsname{y}
+}
+
+\newcommand{\loopextent}[2][0]{%
+ \xdef\first@{#2[5]&}\expandafter\opt@col\first@
+ \temp@count=\fourth@
+ \loopcount=\l@color
+ \advance\temp@count by -5
+ \ifnum\temp@count<5 \temp@count=5 \fi
+ \ifnum\loopcount>\temp@count
+ \else
+ \multiply\loopcount by -1
+ \advance\temp@count by \loopcount
+ \fi
+ \ifnum\temp@count<5 \temp@count=5 \fi
+ \expandafter\xdef\csname inner@length#1\endcsname{\the\temp@count}
+ \advance\temp@count by -2
+ \expandafter\xdef\csname inner@straight#1\endcsname{\the\temp@count}
+ \temp@count=\csname inner@length#1\endcsname
+ \multiply\temp@count by 2
+ \advance\temp@count by 4
+ \expandafter\xdef\csname inner@loop#1\endcsname{\the\temp@count}
+ \temp@count=\fourth@ \xdef\fourth@{\the\temp@count}
+ \ifnum\temp@count<5 \temp@count=5 \fi
+ \expandafter\xdef\csname outer@length#1\endcsname{\the\temp@count}
+ \advance\temp@count by -2
+ \expandafter\xdef\csname outer@straight#1\endcsname{\the\temp@count}
+ \temp@count=\csname outer@length#1\endcsname
+ \multiply\temp@count by 2
+ \expandafter\xdef\csname outer@loop#1\endcsname{\the\temp@count}
+ \expandafter\xdef\csname l@@p#1\endcsname{y}
+}
+
+\def\MRs#1{%
+ \xdef\list@{#1,&}
+ \loop
+ \xdef\list@{\list@ @}
+ \expandafter\get@Mregions\list@
+ \ifx\list@\ampers@nd\else\repeat
+}
+
+\def\clearMRs{\xdef\M@stack{&;&;@}\xdef\TM{n}}
+
+\def\anchor#1{%
+ \xdef\list@@{#1,&@}
+ \expandafter\get@Apositions\list@@
+}
+
+\def\moveres#1#2#3{%
+ \ifx\wheel@@@\n@
+ \loopcount=#1 \advance\loopcount by -1
+ \expandafter\xdef\csname res@x@off\the\loopcount\endcsname{#2}
+ \expandafter\xdef\csname res@y@off\the\loopcount\endcsname{#3}
+ \fi
+}
+
+\def\Nterm#1{%
+ \xdef\first@{#1}
+ \ifx\first@\intr@
+ \xdef\current@pos{intra}
+ \else
+ \xdef\current@pos{extra}
+ \fi}
+
+\def\flipNterm{\xdef\N@inverse{y}}
+
+\def\flipCterm{\xdef\C@inverse{y}}
+
+\def\labelstyle#1#2#3#4#5#6{%
+ \loopcount=\label@num
+ \advance\loopcount by 1
+ \xdef\label@num{\the\loopcount}
+ \expandafter\xdef\csname labelname@\label@num\endcsname{#1}
+ \expandafter\xdef\csname labelnum@#1\endcsname{\label@num}
+ \expandafter\xdef\csname show@label#1\endcsname{no}
+ \expandafter\xdef\csname #1style\endcsname{#2}
+ \expandafter\xdef\csname #1frame\endcsname{#3}
+ \expandafter\xdef\csname #1back\endcsname{#4}
+ \expandafter\xdef\csname #1font\endcsname{#5}
+ \expandafter\xdef\csname #1legendtext\endcsname{#6}
+}
+
+\newcommand{\labelregion}[4][&,&]{%
+ \xdef\first@{#1@} \expandafter\get@direction\first@
+ \xdef\first@{#3[@]&}\expandafter\opt@col\first@
+ \xdef\style@c@l{\fourth@}
+ \ifx\l@color\@t \xdef\num@{&} \else \xdef\num@{\l@color} \fi
+ \def\l@text@{#4}
+ \xdef\list@{#2,&}
+ \loop
+ \xdef\list@{\list@ @}
+ \expandafter\get@lregions\list@
+ \ifx\list@\ampers@nd\else\repeat
+ \xdef\second@{standard}
+ \xdef\third@{#3}
+ \ifx\second@\third@
+ \else
+ \expandafter\xdef\csname show@label#3\endcsname{y}
+ \legend@@true
+ \fi
+}
+
+\newcommand{\addtagtoNterm}[4][&,&]{%
+ \xdef\first@{#2&@}
+ \temp@count=\N@tag@length\relax
+ \xdef\seq@tag{}
+ \expandafter\count@tag\first@
+ \xdef\N@tag@length{\the\temp@count}
+ \xdef\N@tag{([#1]#3[#4]=\seq@tag)\N@tag}
+ \xdef\second@{standard}
+ \xdef\third@{#3}
+ \ifx\second@\third@
+ \else
+ \expandafter\xdef\csname show@label#3\endcsname{y}
+ \legend@@true
+ \fi
+}
+
+\newcommand{\addtagtoCterm}[4][&,&]{%
+ \xdef\first@{#2&@}
+ \temp@count=0
+ \xdef\seq@tag{}
+ \expandafter\count@tag\first@
+ \xdef\C@tag{\C@tag([#1]#3[#4]=\seq@tag)}
+ \xdef\second@{standard}
+ \xdef\third@{#3}
+ \ifx\second@\third@
+ \else
+ \expandafter\xdef\csname show@label#3\endcsname{y}
+ \legend@@true
+ \fi
+}
+
+\newcommand{\labelloop}[3][N,0]{%
+ \loop@labeltrue
+ \xdef\first@{#1@}
+ \expandafter\get@direction\first@
+ \expandafter\xdef\csname l@direct#2\endcsname{\directi@n}
+ \expandafter\xdef\csname l@offset#2\endcsname{\length@}
+ \expandafter\xdef\csname l@label#2\endcsname{#3}
+ \expandafter\xdef\csname l@true#2\endcsname{y}
+}
+
+\def\labelloops#1{%
+ \loop@seriestrue
+ \loop@labeltrue
+ \def\loop@labeltext{#1}}
+
+\def\movelooplabel#1#2{%
+ \expandafter\xdef\csname move@loop#1\endcsname{y}
+ \xdef\first@{#2@}
+ \expandafter\get@direction\first@
+ \expandafter\xdef\csname movel@direct#1\endcsname{\directi@n}
+ \expandafter\xdef\csname movel@offset#1\endcsname{\length@}
+}
+
+\def\hidelooplabels{\loop@seriesfalse\loop@labelfalse\loopgo@false}
+
+\newcommand{\labelTM}[3][N,0]{%
+ \TM@labeltrue
+ \xdef\first@{#1@}
+ \expandafter\get@direction\first@
+ \expandafter\xdef\csname TM@direct#2\endcsname{\directi@n}
+ \expandafter\xdef\csname TM@offset#2\endcsname{\length@}
+ \expandafter\xdef\csname TM@label#2\endcsname{#3}
+ \expandafter\xdef\csname TM@true#2\endcsname{y}
+}
+
+\def\labelTMs#1{%
+ \TM@seriestrue
+ \TM@labeltrue
+ \def\TM@labeltext{#1}}
+
+\def\moveTMlabel#1#2{%
+ \expandafter\xdef\csname move@TM#1\endcsname{y}
+ \xdef\first@{#2@}
+ \expandafter\get@direction\first@
+ \expandafter\xdef\csname moveTM@direct#1\endcsname{\directi@n}
+ \expandafter\xdef\csname moveTM@offset#1\endcsname{\length@}
+}
+
+\def\hideTMlabels{\TM@seriesfalse\TM@labelfalse\TMgo@false}
+
+\newcommand{\phosphorylation}[2][&,&]{%
+ \labelregion[#1]{#2..#2}{noshade}{circ[Black,YellowGreen]:P}}
+
+\newcommand{\glycosylation}[2][&,&]{%
+ \labelregion[#1]{#2..#2}{noshade}{tree[Black]}}
+
+\def\countercolor#1{\xdef\c@untc@l{#1}}
+
+\def\looplabelcolor#1{\xdef\loopc@l{#1}}
+
+\def\TMlabelcolor#1{\xdef\TMc@l{#1}}
+
+\def\hideNterm{\xdef\hide@NH{y}}
+\def\showNterm{\xdef\hide@NH{no}}
+\def\hideCterm{\xdef\hide@COOH{y}}
+\def\showCterm{\xdef\hide@COOH{no}}
+
+\def\showmembrane{\membr@netrue}
+\def\hidemembrane{\membr@nefalse}
+\def\membranecolors#1#2{%
+ \xdef\memfr@me{#1}
+ \xdef\membl@ck{#2}
+}
+\def\broadenmembrane#1#2{%
+ \xdef\first@{#1}
+ \xdef\second@{left}
+ \ifx\first@\second@
+ \loopcount=#2\relax
+ \multiply\loopcount by -1\relax
+ \xdef\to@mem@min{\the\loopcount}
+ \else
+ \xdef\to@mem@max{#2}
+ \fi
+}
+\def\thickenmembrane#1#2{%
+ \xdef\first@{#1}
+ \xdef\second@{top}
+ \ifx\first@\second@
+ \xdef\mem@t@p{#2}
+ \fi
+ \loopcount=\mem@thick
+ \advance\loopcount by #2
+ \xdef\mem@thick{\the\loopcount}
+}
+\def\borderthickness#1{\xdef\b@rder@set{y} \setlength\b@rder{#1}}
+\newcommand{\labeloutside}[2][left]{%
+ \xdef\up@mem{#2}
+ \xdef\up@left@right{#1}
+}
+\newcommand{\labelinside}[2][right]{%
+ \xdef\low@mem{#2}
+ \xdef\low@left@right{#1}
+}
+
+\def\moveinsidelabel#1{%
+ \xdef\first@{#1@}
+ \expandafter\get@direction\first@
+ \xdef\move@in@direc{\directi@n}
+ \xdef\move@in@length{\length@}
+}
+
+\def\moveoutsidelabel#1{%
+ \xdef\first@{#1@}
+ \expandafter\get@direction\first@
+ \xdef\move@out@direc{\directi@n}
+ \xdef\move@out@length{\length@}
+}
+
+\def\rulethickness#1{\def\rule@thickness{#1}}
+
+\def\scaletopo#1{%
+ \xdef\first@{#1@}
+ \expandafter\detect@change\first@
+ \xdef\first@{fix}
+ \ifx\change@size\first@
+ \xdef\fix@length{#1}
+ \ifnum\fix@length<0 \xdef\fix@length{0} \fi
+ \ifnum\fix@length>10 \xdef\fix@length{10} \fi
+ \fi
+}
+
+\def\TeXtopo{\mbox{\TeX\textsf{topo}}}
+
+\def\showmoment{\mu@Htrue}
+\def\hidemoment{\mu@Hfalse}
+
+\def\Hmean#1{\csname <H>#1\endcsname}
+\def\muH#1{\csname muH#1\endcsname}
+\def\muHmean#1{\csname <muH>#1\endcsname}
+\def\mudelta#1{\csname mudelta#1\endcsname}
+
+\def\momentcolor#1{\xdef\moment@color{#1}}
+\def\scalemoment#1{\xdef\m@mentlength{#1}}
+
+\def\showbonds{\xdef\show@bonds{y}}
+\def\hidebonds{\xdef\show@bonds{n}}
+
+\def\viewfromintra{\xdef\l@@k{intra}}
+\def\viewfromextra{\xdef\l@@k{extra}}
+
+\def\showwheelnumbering{\wheel@numberstrue}
+\def\hidewheelnumbering{\wheel@numbersfalse}
+
+\def\scalewheel#1{%
+ \xdef\first@{#1}
+ \loopcount=\scale@factor
+ \multiply\loopcount by \first@\relax
+ \divide\loopcount by 100
+ \ifnum\loopcount<10
+ \xdef\scale@factor{10}
+ \else
+ \xdef\scale@factor{\the\loopcount}
+ \fi
+}
+
+\def\wheelsperline#1{\xdef\wheels@line{#1}}
+
+\def\symbolsize#1{%
+ \xdef\sym@size{#1}
+ \xdef\first@{small}
+ \ifx\sym@size\first@
+ \else
+ \xdef\first@{medium}
+ \ifx\sym@size\first@
+ \else
+ \xdef\first@{large}
+ \ifx\sym@size\first@
+ \else
+ \message{<Ignoring `#1' in \noexpand\symbolsize. Using `medium'>}
+ \xdef\sym@size{medium}
+ \fi\fi\fi
+}
+
+\def\helixstyle#1{%
+ \xdef\first@{#1}
+ \xdef\second@{perspective}
+ \ifx\first@\second@
+ \@helix@perstrue
+ \@netfalse
+ \else
+ \xdef\second@{net}
+ \ifx\first@\second@
+ \@nettrue
+ \@helix@persfalse
+ \else
+ \xdef\second@{wheel}
+ \ifx\first@\second@
+ \@helix@persfalse
+ \@netfalse
+ \else
+ \message{Undefined \noexpand\helixstyle. Using `perspective'.}
+ \@helix@perstrue
+ \@netfalse
+ \fi
+ \fi
+ \fi
+}
+
+\newcommand{\place}[3][1]{%
+ \insert@true
+ \loopcount=\insert@num
+ \advance\loopcount by 1
+ \xdef\insert@num{\the\loopcount}
+ \xdef\first@{#2@}
+ \expandafter\get@direction\first@
+ \expandafter\xdef\csname ins@n\insert@num\endcsname{#1}
+ \expandafter\xdef\csname ins@x\insert@num\endcsname{\directi@n}
+ \expandafter\xdef\csname ins@y\insert@num\endcsname{\length@}
+ \expandafter\xdef\csname ins@z\insert@num\endcsname{#3}
+}
+
+\def\remodel#1#2{%
+ \loopcount=#1
+ \xdef\last@{#2,&@}
+ \xdef\temp@stack{}
+ \x@pos=0 \y@pos=0
+ \xdef\l@st@element{n}
+ \expandafter\get@element\last@
+ \ifx\m@d@stack@ori\ampers@nd
+ \else
+
+ \message{temp:\temp@stack||ori:\m@d@stack@ori}
+
+ \xdef\m@d@stack{\m@d@stack@ori,0:0/0,0@}
+ \expandafter\get@m@d@stack@ori\temp@stack
+ \xdef\temp@stack{}
+ \sort@m@d@stack
+ \fi
+ \expandafter\get@m@d@stack@ori\temp@stack
+
+ \message{newori:\m@d@stack@ori}
+
+}
+
+\def\newelement#1#2{%
+ \expandafter\ifx\csname #1\endcsname\relax
+ \else
+ \PackageError{TeXtopo}
+ {Element `#1' already defined}
+ {\MessageBreak
+ An element with the same name is already defined. \MessageBreak
+ If you want to overwrite the definitions proceed \MessageBreak
+ by hitting `Enter', if not quit now by typing `X'.\MessageBreak
+}
+ \fi
+ \expandafter\xdef\csname #1\endcsname{#2,&@}
+}
+
+\newcommand{\showgrid}[1][5]{\xdef\grid@mesh{#1}}
+
+\def\hidegrid{\xdef\grid@mesh{0}}
+
+%%%%% Redef'ed and extended TeXshade definitions
+
+\def\allmatchspecial{\all@shadetrue}
+\def\allmatchspecialoff{\all@shadefalse}
+
+\def\showlegend{\legend@true}
+\def\hidelegend{\legend@false}
+\def\movelegend#1#2{%
+ \expandafter\ifx\csname TeXshade\endcsname\relax
+ \else
+ \setlength\hspace@legend{#1}
+ \setlength\vspace@legend{#2}
+ \fi
+ \setlength\hspace@@legend{#1}
+ \setlength\vspace@@legend{#2}
+}
+
+\def\numcount{\the\loopcount}
+\def\Alphacount{\@Alph\loopcount}
+\def\alphacount{\@alph\loopcount}
+\def\romancount{\@roman\loopcount}
+\def\Romancount{\@Roman\loopcount}
+
+\def\setfamily#1#2{%
+ \xdef\second@{#2&}
+ \ifx\second@\ampers@nd
+ \else
+ \xdef\first@{#1}
+ \xdef\second@{#2}
+ \xdef\temp@{rm}
+ \ifx\second@\temp@
+ \xdef\third@{\rmdefault}
+ \else
+ \xdef\temp@{sf}
+ \ifx\second@\temp@
+ \xdef\third@{\sfdefault}
+ \else
+ \xdef\temp@{tt}
+ \ifx\second@\temp@
+ \xdef\third@{\ttdefault}
+ \else
+ \xdef\third@{\second@}
+ \fi\fi\fi
+ \xdef\temp@{features}
+ \ifx\first@\temp@ \xdef\featuretext@family{\third@}
+ \else
+ \xdef\temp@{featurestyles}
+ \ifx\first@\temp@ \xdef\featurestyles@family{\third@}
+ \else
+ \xdef\temp@{numbering}
+ \ifx\first@\temp@ \xdef\numbertext@family{\third@}
+ \else
+ \xdef\temp@{names}
+ \ifx\first@\temp@ \xdef\namestext@family{\third@}
+ \else
+ \xdef\temp@{residues}
+ \ifx\first@\temp@ \xdef\residues@family{\third@}
+ \else
+ \xdef\temp@{legend}
+ \ifx\first@\temp@ \xdef\legend@family{\third@} \xdef\l@fam{\third@}
+ \else
+ \xdef\temp@{labels}
+ \ifx\first@\temp@ \xdef\label@family{\third@}
+ \else
+ \xdef\temp@{membranelabels}
+ \ifx\first@\temp@ \xdef\mem@label@family{\third@}
+ \else
+ \xdef\temp@{looplabels}
+ \ifx\first@\temp@ \xdef\looplabel@family{\third@}
+ \else
+ \xdef\temp@{TMlabels}
+ \ifx\first@\temp@ \xdef\TMlabel@family{\third@}
+ \else
+ \xdef\temp@{all}
+ \ifx\first@\temp@
+ \xdef\featuretext@family{\third@}
+ \xdef\featurestyles@family{\third@}
+ \xdef\numbertext@family{\third@}
+ \xdef\namestext@family{\third@}
+ \xdef\residues@family{\third@}
+ \xdef\legend@family{\third@} \xdef\l@fam{\third@}
+ \xdef\label@family{\third@}
+ \xdef\looplabel@family{\third@}
+ \xdef\TMlabel@family{\third@}
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi
+}
+\def\setseries#1#2{%
+ \xdef\second@{#2&}
+ \ifx\second@\ampers@nd
+ \else
+ \xdef\first@{#1}
+ \xdef\second@{#2}
+ \xdef\temp@{bf}
+ \ifx\second@\temp@
+ \xdef\third@{\bfdefault}
+ \else
+ \xdef\temp@{md}
+ \ifx\second@\temp@
+ \xdef\third@{\mddefault}
+ \else
+ \xdef\third@{\second@}
+ \fi\fi
+ \xdef\temp@{features}
+ \ifx\first@\temp@ \xdef\featuretext@series{\third@}
+ \else
+ \xdef\temp@{featurestyles}
+ \ifx\first@\temp@ \xdef\featurestyles@series{\third@}
+ \else
+ \xdef\temp@{numbering}
+ \ifx\first@\temp@ \xdef\numbertext@series{\third@}
+ \else
+ \xdef\temp@{names}
+ \ifx\first@\temp@ \xdef\namestext@series{\third@}
+ \else
+ \xdef\temp@{residues}
+ \ifx\first@\temp@ \xdef\residues@series{\third@}
+ \else
+ \xdef\temp@{legend}
+ \ifx\first@\temp@ \xdef\legend@series{\third@} \xdef\l@ser{\third@}
+ \else
+ \xdef\temp@{labels}
+ \ifx\first@\temp@ \xdef\label@series{\third@}
+ \else
+ \xdef\temp@{membranelabels}
+ \ifx\first@\temp@ \xdef\mem@label@series{\third@}
+ \else
+ \xdef\temp@{looplabels}
+ \ifx\first@\temp@ \xdef\looplabel@series{\third@}
+ \else
+ \xdef\temp@{TMlabels}
+ \ifx\first@\temp@ \xdef\TMlabel@series{\third@}
+ \else
+ \xdef\temp@{all}
+ \ifx\first@\temp@
+ \xdef\featuretext@series{\third@}
+ \xdef\featurestyles@series{\third@}
+ \xdef\numbertext@series{\third@}
+ \xdef\namestext@series{\third@}
+ \xdef\residues@series{\third@}
+ \xdef\legend@series{\third@} \xdef\l@ser{\third@}
+ \xdef\label@series{\third@}
+ \xdef\looplabel@series{\third@}
+ \xdef\TMlabel@series{\third@}
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi
+}
+\def\setshape#1#2{%
+ \xdef\second@{#2&}
+ \ifx\second@\ampers@nd
+ \else
+ \xdef\first@{#1}
+ \xdef\second@{#2}
+ \xdef\temp@{it}
+ \ifx\second@\temp@
+ \xdef\third@{\itdefault}
+ \else
+ \xdef\temp@{sl}
+ \ifx\second@\temp@
+ \xdef\third@{\sldefault}
+ \else
+ \xdef\temp@{sc}
+ \ifx\second@\temp@
+ \xdef\third@{\scdefault}
+ \else
+ \xdef\temp@{up}
+ \ifx\second@\temp@
+ \xdef\third@{\updefault}
+ \else
+ \xdef\third@{\second@}
+ \fi\fi\fi\fi
+ \xdef\temp@{features}
+ \ifx\first@\temp@ \xdef\featuretext@shape{\third@}
+ \else
+ \xdef\temp@{featurestyles}
+ \ifx\first@\temp@ \xdef\featurestyles@shape{\third@}
+ \else
+ \xdef\temp@{numbering}
+ \ifx\first@\temp@ \xdef\numbertext@shape{\third@}
+ \else
+ \xdef\temp@{names}
+ \ifx\first@\temp@ \xdef\namestext@shape{\third@}
+ \else
+ \xdef\temp@{residues}
+ \ifx\first@\temp@ \xdef\residues@shape{\third@}
+ \else
+ \xdef\temp@{legend}
+ \ifx\first@\temp@ \xdef\legend@shape{\third@} \xdef\l@shap{\third@}
+ \else
+ \xdef\temp@{labels}
+ \ifx\first@\temp@ \xdef\label@shape{\third@}
+ \else
+ \xdef\temp@{membranelabels}
+ \ifx\first@\temp@ \xdef\mem@label@shape{\third@}
+ \else
+ \xdef\temp@{looplabels}
+ \ifx\first@\temp@ \xdef\looplabel@shape{\third@}
+ \else
+ \xdef\temp@{TMlabels}
+ \ifx\first@\temp@ \xdef\TMlabel@shape{\third@}
+ \else
+ \xdef\temp@{all}
+ \ifx\first@\temp@
+ \xdef\featuretext@shape{\third@}
+ \xdef\featurestyles@shape{\third@}
+ \xdef\numbertext@shape{\third@}
+ \xdef\namestext@shape{\third@}
+ \xdef\residues@shape{\third@}
+ \xdef\legend@shape{\third@} \xdef\l@shap{\third@}
+ \xdef\label@shape{\third@}
+ \xdef\looplabel@shape{\third@}
+ \xdef\TMlabel@shape{\third@}
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi
+}
+\def\setsize#1#2{%
+ \xdef\second@{#2&}
+ \ifx\second@\ampers@nd
+ \else
+ \xdef\first@{#1}
+ \xdef\temp@{features}
+ \ifx\first@\temp@
+ \def\featuretext@size{\csname #2\endcsname}
+ \else
+ \xdef\temp@{featurestyles}
+ \ifx\first@\temp@
+ \def\featurestyles@size{\csname #2\endcsname}
+ \else
+ \xdef\temp@{numbering}
+ \ifx\first@\temp@
+ \def\numbertext@size{\csname #2\endcsname}
+ \else
+ \xdef\temp@{names}
+ \ifx\first@\temp@
+ \def\namestext@size{\csname #2\endcsname}
+ \else
+ \xdef\temp@{legend}
+ \ifx\first@\temp@
+ \def\legend@size{\csname #2\endcsname} \xdef\l@size{#2}
+ \else
+ \xdef\temp@{labels}
+ \ifx\first@\temp@
+ \def\label@size{\csname #2\endcsname}
+ \else
+ \xdef\temp@{membranelabels}
+ \ifx\first@\temp@
+ \def\mem@label@size{\csname #2\endcsname}
+ \else
+ \xdef\temp@{looplabels}
+ \ifx\first@\temp@
+ \def\looplabel@size{\csname #2\endcsname}
+ \else
+ \xdef\temp@{TMlabels}
+ \ifx\first@\temp@
+ \def\TMlabel@size{\csname #2\endcsname}
+ \else
+ \xdef\temp@{residues}
+ \ifx\first@\temp@
+ \def\residues@size{\csname #2\endcsname}
+ \xdef\res@size{#2}
+ \else
+ \xdef\temp@{all}
+ \ifx\first@\temp@
+ \def\featuretext@size{\csname #2\endcsname}
+ \def\featurestyles@size{\csname #2\endcsname}
+ \def\numbertext@size{\csname #2\endcsname}
+ \def\namestext@size{\csname #2\endcsname}
+ \def\legend@size{\csname #2\endcsname} \def\l@size{#2}
+ \def\label@size{\csname #2\endcsname}
+ \def\looplabel@size{\csname #2\endcsname}
+ \def\TMlabel@size{\csname #2\endcsname}
+ \def\residues@size{\csname #2\endcsname}
+ \xdef\res@size{#2}
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \xdef\temp@{Huge}
+ \ifx\temp@\res@size
+ \def\bottomruler@size{\csname Large\endcsname}
+ \else
+ \xdef\temp@{huge}
+ \ifx\temp@\res@size
+ \def\bottomruler@size{\csname large\endcsname}
+ \else
+ \xdef\temp@{LARGE}
+ \ifx\temp@\res@size
+ \def\bottomruler@size{\csname normalsize\endcsname}
+ \else
+ \xdef\temp@{Large}
+ \ifx\temp@\res@size
+ \def\bottomruler@size{\csname small\endcsname}
+ \else
+ \xdef\temp@{large}
+ \ifx\temp@\res@size
+ \def\bottomruler@size{\csname footnotesize\endcsname}
+ \else
+ \xdef\temp@{normalsize}
+ \ifx\temp@\res@size
+ \def\bottomruler@size{\csname scriptsize\endcsname}
+ \else
+ \def\bottomruler@size{\csname tiny\endcsname}
+ \fi\fi\fi\fi\fi\fi
+ \fi
+}
+\def\setfont#1#2#3#4#5{%
+ \setfamily{#1}{#2}\setseries{#1}{#3}
+ \setshape{#1}{#4}\setsize{#1}{#5}}
+
+\def\labelsrm{\setfamily{labels}{rm}}
+\def\labelssf{\setfamily{labels}{sf}}
+\def\labelstt{\setfamily{labels}{tt}}
+\def\labelsmd{\setseries{labels}{md}}
+\def\labelsbf{\setseries{labels}{bf}}
+\def\labelsup{\setshape {labels}{up}}
+\def\labelsit{\setshape {labels}{it}}
+\def\labelssl{\setshape {labels}{sl}}
+\def\labelssc{\setshape {labels}{sc}}
+\def\labelstiny {\setsize{labels}{tiny}}
+\def\labelsscriptsize {\setsize{labels}{scriptsize}}
+\def\labelsfootnotesize{\setsize{labels}{footnotesize}}
+\def\labelssmall {\setsize{labels}{small}}
+\def\labelsnormalsize {\setsize{labels}{normalsize}}
+\def\labelslarge {\setsize{labels}{large}}
+\def\labelsLarge {\setsize{labels}{Large}}
+\def\labelsLARGE {\setsize{labels}{LARGE}}
+\def\labelshuge {\setsize{labels}{huge}}
+\def\labelsHuge {\setsize{labels}{Huge}}
+
+\def\membranelabelsrm{\setfamily{membranelabels}{rm}}
+\def\membranelabelssf{\setfamily{membranelabels}{sf}}
+\def\membranelabelstt{\setfamily{membranelabels}{tt}}
+\def\membranelabelsmd{\setseries{membranelabels}{md}}
+\def\membranelabelsbf{\setseries{membranelabels}{bf}}
+\def\membranelabelsup{\setshape {membranelabels}{up}}
+\def\membranelabelsit{\setshape {membranelabels}{it}}
+\def\membranelabelssl{\setshape {membranelabels}{sl}}
+\def\membranelabelssc{\setshape {membranelabels}{sc}}
+\def\membranelabelstiny {\setsize{membranelabels}{tiny}}
+\def\membranelabelsscriptsize {\setsize{membranelabels}{scriptsize}}
+\def\membranelabelsfootnotesize{\setsize{membranelabels}{footnotesize}}
+\def\membranelabelssmall {\setsize{membranelabels}{small}}
+\def\membranelabelsnormalsize {\setsize{membranelabels}{normalsize}}
+\def\membranelabelslarge {\setsize{membranelabels}{large}}
+\def\membranelabelsLarge {\setsize{membranelabels}{Large}}
+\def\membranelabelsLARGE {\setsize{membranelabels}{LARGE}}
+\def\membranelabelshuge {\setsize{membranelabels}{huge}}
+\def\membranelabelsHuge {\setsize{membranelabels}{Huge}}
+
+\def\looplabelsrm{\setfamily{looplabels}{rm}}
+\def\looplabelssf{\setfamily{looplabels}{sf}}
+\def\looplabelstt{\setfamily{looplabels}{tt}}
+\def\looplabelsmd{\setseries{looplabels}{md}}
+\def\looplabelsbf{\setseries{looplabels}{bf}}
+\def\looplabelsup{\setshape {looplabels}{up}}
+\def\looplabelsit{\setshape {looplabels}{it}}
+\def\looplabelssl{\setshape {looplabels}{sl}}
+\def\looplabelssc{\setshape {looplabels}{sc}}
+\def\looplabelstiny {\setsize{looplabels}{tiny}}
+\def\looplabelsscriptsize {\setsize{looplabels}{scriptsize}}
+\def\looplabelsfootnotesize{\setsize{looplabels}{footnotesize}}
+\def\looplabelssmall {\setsize{looplabels}{small}}
+\def\looplabelsnormalsize {\setsize{looplabels}{normalsize}}
+\def\looplabelslarge {\setsize{looplabels}{large}}
+\def\looplabelsLarge {\setsize{looplabels}{Large}}
+\def\looplabelsLARGE {\setsize{looplabels}{LARGE}}
+\def\looplabelshuge {\setsize{looplabels}{huge}}
+\def\looplabelsHuge {\setsize{looplabels}{Huge}}
+
+\def\TMlabelsrm{\setfamily{TMlabels}{rm}}
+\def\TMlabelssf{\setfamily{TMlabels}{sf}}
+\def\TMlabelstt{\setfamily{TMlabels}{tt}}
+\def\TMlabelsmd{\setseries{TMlabels}{md}}
+\def\TMlabelsbf{\setseries{TMlabels}{bf}}
+\def\TMlabelsup{\setshape {TMlabels}{up}}
+\def\TMlabelsit{\setshape {TMlabels}{it}}
+\def\TMlabelssl{\setshape {TMlabels}{sl}}
+\def\TMlabelssc{\setshape {TMlabels}{sc}}
+\def\TMlabelstiny {\setsize{TMlabels}{tiny}}
+\def\TMlabelsscriptsize {\setsize{TMlabels}{scriptsize}}
+\def\TMlabelsfootnotesize{\setsize{TMlabels}{footnotesize}}
+\def\TMlabelssmall {\setsize{TMlabels}{small}}
+\def\TMlabelsnormalsize {\setsize{TMlabels}{normalsize}}
+\def\TMlabelslarge {\setsize{TMlabels}{large}}
+\def\TMlabelsLarge {\setsize{TMlabels}{Large}}
+\def\TMlabelsLARGE {\setsize{TMlabels}{LARGE}}
+\def\TMlabelshuge {\setsize{TMlabels}{huge}}
+\def\TMlabelsHuge {\setsize{TMlabels}{Huge}}
+
+\def\standardresidues#1#2#3#4{%
+ \xdef\symb@lstyle{#1}
+ \xdef\fr@mecol{#2}
+ \xdef\symb@lcol{#3}
+ \xdef\ch@rcol{#4}
+ \labelstyle{standard}{#1}{#2}{#3}{#4}{standard residues}
+ \expandafter\xdef\csname sstyle0\endcsname{#1}
+ \expandafter\xdef\csname fcol0\endcsname{#2}
+ \expandafter\xdef\csname scol0\endcsname{#3}
+ \expandafter\xdef\csname ccol0\endcsname{#4}
+}
+
+\def\similarpositions#1#2#3#4{%
+ \expandafter\xdef\csname sstyle1\endcsname{#1}
+ \expandafter\xdef\csname fcol1\endcsname{#2}
+ \expandafter\xdef\csname scol1\endcsname{#3}
+ \expandafter\xdef\csname ccol1\endcsname{#4}
+ \loopcount=\shade@num
+ \advance\loopcount by 1
+ \xdef\shade@num{\the\loopcount}
+ \expandafter\xdef\csname shadename@\shade@num\endcsname{sim@pos}
+ \expandafter\xdef\csname shadenum@sim@pos\endcsname{\shade@num}
+ \expandafter\xdef\csname show@shade\shade@num\endcsname{y}
+ \expandafter\xdef\csname sim@posstyle\endcsname{#1}
+ \expandafter\xdef\csname sim@posframe\endcsname{#2}
+ \expandafter\xdef\csname sim@posback\endcsname{#3}
+ \expandafter\xdef\csname sim@posfont\endcsname{#4}
+ \expandafter\xdef\csname sim@poslegendtext\endcsname{similar positions}
+}
+\def\conservedpositions#1#2#3#4{%
+ \expandafter\xdef\csname sstyle2\endcsname{#1}
+ \expandafter\xdef\csname fcol2\endcsname{#2}
+ \expandafter\xdef\csname scol2\endcsname{#3}
+ \expandafter\xdef\csname ccol2\endcsname{#4}
+ \loopcount=\shade@num
+ \advance\loopcount by 1
+ \xdef\shade@num{\the\loopcount}
+ \expandafter\xdef\csname shadename@\shade@num\endcsname{cons@pos}
+ \expandafter\xdef\csname shadenum@cons@pos\endcsname{\shade@num}
+ \expandafter\xdef\csname show@shade\shade@num\endcsname{y}
+ \expandafter\xdef\csname cons@posstyle\endcsname{#1}
+ \expandafter\xdef\csname cons@posframe\endcsname{#2}
+ \expandafter\xdef\csname cons@posback\endcsname{#3}
+ \expandafter\xdef\csname cons@posfont\endcsname{#4}
+ \expandafter\xdef\csname cons@poslegendtext\endcsname{conserved positions}
+}
+\def\invariablepositions#1#2#3#4{%
+ \expandafter\xdef\csname sstyle3\endcsname{#1}
+ \expandafter\xdef\csname fcol3\endcsname{#2}
+ \expandafter\xdef\csname scol3\endcsname{#3}
+ \expandafter\xdef\csname ccol3\endcsname{#4}
+ \loopcount=\shade@num
+ \advance\loopcount by 1
+ \xdef\shade@num{\the\loopcount}
+ \expandafter\xdef\csname shadename@\shade@num\endcsname{inv@pos}
+ \expandafter\xdef\csname shadenum@inv@pos\endcsname{\shade@num}
+ \expandafter\xdef\csname show@shade\shade@num\endcsname{y}
+ \expandafter\xdef\csname inv@posstyle\endcsname{#1}
+ \expandafter\xdef\csname inv@posframe\endcsname{#2}
+ \expandafter\xdef\csname inv@posback\endcsname{#3}
+ \expandafter\xdef\csname inv@posfont\endcsname{#4}
+ \expandafter\xdef\csname inv@poslegendtext\endcsname{invariable positions}
+}
+
+\def\shadingcolors#1{%
+ \xdef\shade@num{0}
+ \gapcolors{Black}{White}
+ \nomatchresidues{Black}{White}{upper}{up}
+ \standardresidues{circ}{Black}{White}{Black}
+ \xdef\first@{#1} \xdef\second@{blues}
+ \ifx\first@\second@
+ \xdef\c@l@rscheme{\first@}
+ \similarresidues{Black}{Magenta}{upper}{up}
+ \conservedresidues{White}{RoyalBlue}{upper}{up}
+ \allmatchresidues{Goldenrod}{RoyalPurple}{upper}{up}
+ \similarpositions{circ}{Black}{Magenta}{Black}
+ \conservedpositions{circ}{Black}{RoyalBlue}{White}
+ \invariablepositions{circ}{Black}{RoyalPurple}{Goldenrod}
+ \else \xdef\second@{greens}
+ \ifx\first@\second@
+ \xdef\c@l@rscheme{\first@}
+ \similarresidues{Black}{GreenYellow}{upper}{up}
+ \conservedresidues{White}{PineGreen}{upper}{up}
+ \allmatchresidues{YellowOrange}{OliveGreen}{upper}{up}
+ \similarpositions{circ}{Black}{GreenYellow}{Black}
+ \conservedpositions{circ}{Black}{PineGreen}{White}
+ \invariablepositions{circ}{Black}{OliveGreen}{YellowOrange}
+ \else \xdef\second@{reds}
+ \ifx\first@\second@
+ \xdef\c@l@rscheme{\first@}
+ \similarresidues{Black}{YellowOrange}{upper}{up}
+ \conservedresidues{White}{BrickRed}{upper}{up}
+ \allmatchresidues{YellowGreen}{Mahagony}{upper}{up}
+ \similarpositions{circ}{Black}{YellowOrange}{Black}
+ \conservedpositions{circ}{Black}{BrickRed}{White}
+ \invariablepositions{circ}{Black}{Mahagony}{YellowGreen}
+ \else \xdef\second@{black}
+ \ifx\first@\second@
+ \xdef\c@l@rscheme{\first@}
+ \similarresidues{Black}{White}{upper}{sl}
+ \conservedresidues{White}{Black}{upper}{up}
+ \allmatchresidues{White}{Black}{upper}{sl}
+ \similarpositions{box}{Black}{White}{Black}
+ \conservedpositions{diamond}{Black}{White}{Black}
+ \invariablepositions{circ}{Black}{Black}{White}
+ \else \xdef\second@{grays}
+ \ifx\first@\second@
+ \else \message{<Undefined color set. Using `grays'>} \xdef\first@{grays}\fi
+ \ifx\first@\second@
+ \xdef\c@l@rscheme{\first@}
+ \similarresidues{Black}{LightGray}{upper}{up}
+ \conservedresidues{White}{DarkGray}{upper}{up}
+ \allmatchresidues{White}{Black}{upper}{up}
+ \similarpositions{circ}{Black}{LightGray}{Black}
+ \conservedpositions{circ}{Black}{DarkGray}{White}
+ \invariablepositions{circ}{Black}{Black}{White}
+ \fi\fi\fi\fi\fi}
+\def\nomatchresidues#1#2#3#4 {\xdef\first@{#1&}\xdef\second@{#2&}\xdef\third@{#3&}
+ \xdef\last@{\ampers@nd}
+ \ifx\first@\last@\else\def\TextNomatch{#1}
+ \expandafter\def\csname fg@textcolor0\endcsname{#1}
+ \fi
+ \ifx\second@\last@\else\gdef\Nomatch{#2}
+ \expandafter\def\csname fg@color0\endcsname{#2}
+ \fi
+ \ifx\third@\last@\else\def\resn@m@tch{#3}
+ \fi
+ \xdef\first@{#4&}
+ \ifx\first@\last@\else
+ \def\no@style{\csname text#4\endcsname}
+ \expandafter\def\csname func@style0\endcsname%
+ {\csname text#4\endcsname}\fi}
+\def\similarresidues#1#2#3#4 {\xdef\first@{#1&}\xdef\second@{#2&}\xdef\third@{#3&}
+ \xdef\last@{\ampers@nd}
+ \ifx\first@\last@\else\def\TextSimilar{#1}\fi
+ \ifx\second@\last@\else\gdef\Similar{#2}\fi
+ \ifx\third@\last@\else\def\ressimm@tch{#3}\fi
+ \xdef\first@{#4&}
+ \ifx\first@\last@\else
+ \def\sim@style{\csname text#4\endcsname}\fi}
+\def\conservedresidues#1#2#3#4{\xdef\first@{#1&}\xdef\second@{#2&}\xdef\third@{#3&}
+ \xdef\last@{\ampers@nd}
+ \ifx\first@\last@\else\def\TextIdentical{#1}\fi
+ \ifx\second@\last@\else\gdef\Identical{#2}\fi
+ \ifx\third@\last@\else\def\resm@tch{#3}\fi
+ \xdef\first@{#4&}
+ \ifx\first@\last@\else
+ \def\id@style{\csname text#4\endcsname}\fi}
+\def\allmatchresidues#1#2#3#4 {\xdef\first@{#1&}\xdef\second@{#2&}\xdef\third@{#3&}
+ \xdef\last@{\ampers@nd}
+ \ifx\first@\last@\else\def\TextAllmatch{#1}\fi
+ \ifx\second@\last@\else\gdef\Allmatch{#2}\fi
+ \ifx\third@\last@\else\def\res@llm@tch{#3}\fi
+ \xdef\first@{#4&}
+ \ifx\first@\last@\else
+ \def\all@style{\csname text#4\endcsname}\fi}
+\def\gapcolors#1#2 {\xdef\first@{#1&}\xdef\second@{#2&}
+ \xdef\last@{\ampers@nd}
+ \ifx\first@\last@\else\def\gap@fg{#1}
+ \expandafter\def\csname fg@textcolor*\endcsname{#1}\fi
+ \ifx\second@\last@\else\def\gap@bg{#2}
+ \expandafter\def\csname fg@color*\endcsname{#2}\fi}
+\def\legendcolor#1{\xdef\legend@fg{#1}}
+
+%%%%%%%%%%% TeXtopo
+\def\clearvariables{%
+ \xdef\lst@ck{&;&;&;&;&;&;&;@}
+ \xdef\TM@stack{&,@}
+ \xdef\label@stack{}
+ \xdef\tmpstack{}
+ \xdef\fr@me{Black}
+ \xdef\b@ck{White}
+ \xdef\f@nt{Black}
+ \xdef\sequence@{&}
+ \pos@count=0
+ \xdef\seq@start{1}
+ \xdef\fix@length{11}
+ \xdef\change@length{0}
+ \xdef\label@size{&}
+ \xdef\mem@label@size{&}
+ \xdef\b@rder@set{n}
+ \xdef\start@{1}
+ \xdef\c@unter{0}
+ \xdef\label@num{0}
+ \xdef\shade@num{0}
+ \xdef\N@tag{}
+ \xdef\C@tag{}
+ \xdef\seq@{}
+ \xdef\N@tag@length{0}
+ \xdef\C@tag@length{0}
+ \xdef\N@inverse{n}
+ \xdef\C@inverse{n}
+ \xdef\to@mem@min{0}
+ \xdef\to@mem@max{0}
+ \xdef\move@in@length{0}
+ \xdef\move@in@direc{N}
+ \xdef\move@out@length{0}
+ \xdef\move@out@direc{N}
+ \xdef\start@met@num{1}
+ \shadefalse
+ \all@shadefalse
+ \funcmodefalse
+ \TM@labelfalse
+ \TM@seriesfalse
+ \TM@@count=0
+ \TMgo@false
+ \loop@labelfalse
+ \loop@seriesfalse
+ \loop@@count=0
+ \loopgo@false
+ \xdef\half@{n}
+ \clearMRs
+ \xdef\TM@seq{}
+ \xdef\TM@shade{}
+ \xdef\TM@num{0}
+ \helix@false
+ \do@ittrue
+ \res@@diam=0pt
+ \xdef\wheels@line{0}
+ \xdef\wheel@@@{n}
+ \xdef\scale@factor{60}
+ \xdef\insert@num{0}
+ \insert@false
+ \setlength\hspace@@legend{0pt}
+ \setlength\vspace@@legend{0pt}
+ \xdef\mem@b@t{0}
+ \xdef\mem@t@p{0}
+ \xdef\mem@thick{30}
+ \xdef\m@d@stack@ori{&}
+ \xdef\subtract@offset{n}
+}
+
+\def\do@wheelcalc{%
+ \message{(Plotting wheels}
+ \xdef\first@{small}
+ \ifx\sym@size\first@
+ \newfont{\bsymG}{cmsy10 scaled 1720}
+ \newfont{\bsymF}{cmsy10 scaled 2048}
+ \newfont{\bsymE}{cmsy10 scaled 2488}
+ \newfont{\bsymD}{cmsy10 scaled 2986}
+ \newfont{\bsymC}{cmsy10 scaled 3583}
+ \newfont{\bsymB}{cmsy10 scaled 4300}
+ \newfont{\bsymA}{cmsy10 scaled 5160}
+ \newfont{\sfdcG}{cmssdc10 scaled 482}
+ \newfont{\sfdcF}{cmssdc10 scaled 578}
+ \newfont{\sfdcE}{cmssdc10 scaled 694}
+ \newfont{\sfdcD}{cmssdc10 scaled 833}
+ \newfont{\sfdcC}{cmssdc10 scaled 1000}
+ \newfont{\sfdcB}{cmssdc10 scaled 1200}
+ \newfont{\sfdcA}{cmssdc10 scaled 1440}
+ \else
+ \xdef\first@{medium}
+ \ifx\sym@size\first@
+ \newfont{\bsymG}{cmsy10 scaled 2048}
+ \newfont{\bsymF}{cmsy10 scaled 2488}
+ \newfont{\bsymE}{cmsy10 scaled 2986}
+ \newfont{\bsymD}{cmsy10 scaled 3583}
+ \newfont{\bsymC}{cmsy10 scaled 4300}
+ \newfont{\bsymB}{cmsy10 scaled 5160}
+ \newfont{\bsymA}{cmsy10 scaled 6192}
+ \newfont{\sfdcG}{cmssdc10 scaled 578}
+ \newfont{\sfdcF}{cmssdc10 scaled 694}
+ \newfont{\sfdcE}{cmssdc10 scaled 833}
+ \newfont{\sfdcD}{cmssdc10 scaled 1000}
+ \newfont{\sfdcC}{cmssdc10 scaled 1200}
+ \newfont{\sfdcB}{cmssdc10 scaled 1440}
+ \newfont{\sfdcA}{cmssdc10 scaled 1720}
+ \else
+ \xdef\first@{large}
+ \ifx\sym@size\first@
+ \newfont{\bsymG}{cmsy10 scaled 2488}
+ \newfont{\bsymF}{cmsy10 scaled 2986}
+ \newfont{\bsymE}{cmsy10 scaled 3583}
+ \newfont{\bsymD}{cmsy10 scaled 4300}
+ \newfont{\bsymC}{cmsy10 scaled 5160}
+ \newfont{\bsymB}{cmsy10 scaled 6192}
+ \newfont{\bsymA}{cmsy10 scaled 7430}
+ \newfont{\sfdcG}{cmssdc10 scaled 694}
+ \newfont{\sfdcF}{cmssdc10 scaled 833}
+ \newfont{\sfdcE}{cmssdc10 scaled 1000}
+ \newfont{\sfdcD}{cmssdc10 scaled 1200}
+ \newfont{\sfdcC}{cmssdc10 scaled 1440}
+ \newfont{\sfdcB}{cmssdc10 scaled 1720}
+ \newfont{\sfdcA}{cmssdc10 scaled 2048}
+ \fi\fi\fi
+ \xdef\lst@ck@{\lst@ck}
+ \xdef\sl@{\seq@length}
+ \xdef\seq@{\sequence@}
+ \ifshade
+ \xdef\top@{\constopo@}
+ \fi
+ \pos@count=0
+ \getregion@fromlstack
+ \xdef\symb@l@style{\symb@lstyle}
+ \xdef\symb@lc@l{\symb@lcol}
+ \xdef\fr@mec@l{\fr@mecol}
+ \xdef\ch@rc@l{\ch@rcol}
+ \ifx\start@\ampers@nd
+ \else
+ \ifnum\start@=1
+ \xdef\symb@l@style{\style@c@l}
+ \xdef\symb@lc@l{\b@ck}
+ \xdef\fr@mec@l{\fr@me}
+ \xdef\ch@rc@l{\f@nt}
+ \fi
+ \fi
+ \setlength\unit@length{1mm}
+ \unitlength \unit@length
+ \temp@@count=\scale@factor
+ \multiply\temp@@count by 30
+ \divide\temp@@count by 100
+ \xdef\an@kat{\the\temp@@count}
+ \x@max=\temp@@count
+ \multiply\x@max by 2
+ \x@offset=\an@kat
+ \multiply\x@offset by 2
+ \divide\x@offset by 3
+ \y@offset=\x@offset
+ \advance\x@max by \x@offset
+ \advance\x@max by \x@offset
+ \y@max=\x@max
+ \if@net
+ \x@max=40 \x@offset=5
+ \y@max=90 \y@offset=5
+ \fi
+ \ifnum\wheels@line=0
+ \loopcount=\x@max
+ \multiply\loopcount by \unit@length
+ \temp@@count=\textwidth
+ \divide\temp@@count by \loopcount
+ \ifnum\temp@@count<1 \temp@@count=1\fi
+ \xdef\wheels@line{\the\temp@@count}
+ \fi
+ \multiply\x@max by \temp@@count
+ \temp@@count=\scale@factor
+ \multiply\temp@@count by 25
+ \divide\temp@@count by 100
+ \xdef\gegen@kat{\the\temp@@count}
+ \temp@@count=\scale@factor
+ \multiply\temp@@count by 39
+ \divide\temp@@count by 100
+ \xdef\hyp@{\the\temp@@count}
+ \temp@@count=\scale@factor
+ \multiply\temp@@count by 34
+ \divide\temp@@count by 100
+ \xdef\hyp@flat{\the\temp@@count}
+ \wheel@count=1
+ \xdef\wheel@active{n}
+ \helix@false
+ \setbox1=\hbox{\bsymD\char"0E}
+ \setlength\unit@length{0.154\wd1}
+ \if@helix@pers
+ \else
+ \temp@@count=\scale@factor
+ \multiply\temp@@count by 84
+ \divide\temp@@count by 100
+ \xdef\scale@factor{\the\temp@@count}
+ \fi
+}
+
+\def\do@calculations{%
+ \pos@count=0
+ \getregion@fromlstack
+ \xdef\symb@l@style{\symb@lstyle}
+ \xdef\symb@lc@l{\symb@lcol}
+ \xdef\fr@mec@l{\fr@mecol}
+ \xdef\ch@rc@l{\ch@rcol}
+ \ifx\start@\ampers@nd
+ \else
+ \ifnum\start@=1
+ \xdef\symb@l@style{\style@c@l}
+ \xdef\symb@lc@l{\b@ck}
+ \xdef\fr@mec@l{\fr@me}
+ \xdef\ch@rc@l{\f@nt}
+ \fi
+ \fi
+ \analyzetopo
+ \pos@count=-\N@tag@length\relax
+ \advance\pos@count by -1\relax
+ \TM@@count=0
+ \load@fonts
+ \setbox1=\hbox{\label@size{(}}
+ \xdef\r@depth{\the\dp1}
+ \temp@length=\dp1 \advance\temp@length by \ht1
+ \xdef\r@height{\the\temp@length}
+ \setbox1=\hbox{\csname bsym\font@num\endcsname\char"0E}\res@diam=0.77\wd1
+ \setlength\unit@length{0.2\res@diam}
+ \unitlength\unit@length
+ \ifx\b@rder@set\n@ \setlength\b@rder{\unit@length} \fi
+ \setlength\hor@offset{-\textwidth}
+ \advance\hor@offset by \x@max\unit@length
+ \divide\hor@offset by -2
+ \leftskip\hor@offset
+ \wheel@count=0
+}
+
+\newenvironment{textopo}[1][&]%
+ {\clearvariables\standardparameters
+ \xdef\first@{#1}
+ \ifx\first@\ampers@nd\else\input{#1}\fi}
+ {\xdef\seq@{\N@tag\seq@\C@tag}
+ \analyze@seq
+ \ifx\sequence@\ampers@nd
+ \PackageError{TeXtopo}
+ {No \noexpand\sequence specified}
+ {\MessageBreak
+ TeXtopo needs an amino acid sequence to be set. \MessageBreak
+ Use the command \noexpand\sequence or load a sequence \MessageBreak
+ from a PHD, a SwissProt or an alignment file. \MessageBreak
+ Type X <return> to quit. \MessageBreak
+}
+ \else
+ \bgroup
+ \parindent 0pt
+ \do@calculations
+ \bigskip
+ \vbox{%
+ \begin{picture}(\x@max,\y@max)
+ \ifmembr@ne \do@membr@ne \fi
+\ifnum\grid@mesh>0 \do@grid \fi
+ \dotopo
+ \ifTM@label \do@TMlabel \fi
+ \ifloop@label \do@looplabel \fi
+ \ifinsert@ \do@@insert \fi
+ \end{picture}}
+ \iflegend@
+ \vspace{\vspace@@legend}
+ \setbox1=\vbox{\ifshadelegend@@\hbox{\do@@shadelegend}\fi%
+ \iflegend@@\hbox{\do@@legend}\fi}
+ \vbox{\ifshadelegend@@\hbox{\do@@shadelegend}\fi%
+ \iflegend@@\hbox{\do@@legend}\fi}
+ \bigskip
+ \ifnum\ht1<-\vspace@@legend
+ \vspace{-\ht1}\vspace{-\vspace@@legend}
+ \fi
+ \bigskip
+ \fi
+ \egroup
+ \fi
+ }
+
+\newenvironment{helicalwheel}[2][&]%
+ {\clearvariables\standardparameters
+ \xdef\wheel@@@{y}
+ \xdef\first@{#1}
+ \ifx\first@\ampers@nd\else\input{#1}\fi
+ \setsize{TMlabels}{large}
+ \xdef\TM@stack{}
+ \xdef\first@{#2,&,@}
+ \analyze@TM@stack
+ \xdef\TM@stack{\TM@stack @}
+ \expandafter\get@item\TM@stack
+ \xdef\TM@stack{\first@@,&,@}}
+ {\analyze@seq
+ \ifx\sequence@\ampers@nd
+ \PackageError{TeXtopo}
+ {No \noexpand\sequence specified}
+ {\MessageBreak
+ TeXtopo needs an amino acid sequence to be set. \MessageBreak
+ Use the command \noexpand\sequence or load a sequence \MessageBreak
+ from a PHD, a SwissProt or an alignment file. \MessageBreak
+ Type X <return> to quit. \MessageBreak
+}
+ \else
+ \bgroup
+ \do@wheelcalc
+ \do@wheel
+ \hbox{}
+ \iflegend@
+ \xdef\font@num{E}
+ \setbox1=\vbox{\ifshadelegend@@\hbox{\do@@shadelegend}\fi%
+ \iflegend@@\hbox{\do@@legend}\fi}
+ \vbox{\ifshadelegend@@\hbox{\do@@shadelegend}\fi%
+ \iflegend@@\hbox{\do@@legend}\fi}
+ \bigskip
+ \ifnum\ht1<-\vspace@@legend
+ \vspace{-\ht1}\vspace{-\vspace@@legend}
+ \fi
+ \bigskip
+ \fi
+ \egroup
+ \fi
+}
+
+\catcode`\@=12
+
+\def\standardparameters{%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%% %%%%%
+%%%%% Default parameter settings for the LaTeX ``TeXtopo'' package %%%%%
+%%%%% %%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%% %%%%%
+%%%%% Under any circumstances: %%%%%
+%%%%% %%%%%
+%%%%% DO NOT CHANGE ANY SETTINGS !!! %%%%%
+%%%%% %%%%%
+%%%%% Please define your personal parameter file! Store your new file %%%%%
+%%%%% together with this style-file in the same directory and load the %%%%%
+%%%%% file by naming it as an optional parameter in the `textopo' en- %%%%%
+%%%%% vironment. The file `textopo.def' can be used as a template for %%%%%
+%%%%% the new creation. See the manual for further help. %%%%%
+%%%%% %%%%%
+%%%%% THANK YOU !!! %%%%%
+%%%%% %%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\Nterm{intra} % Assume N-terminus intracellular
+\loopextent{30} % Set loop extent to 30 residues
+\shadingcolors{blues} % Use color scheme `blues' for shading
+\showmembrane % Show the membrane
+\membranecolors{Black}{White} % as black lines w/o filling
+\labeloutside{extra} % Label extracellular side with `extra'
+\labelinside{intra} % Label intracellular side with `intra'
+\rulethickness{0.5pt} % Set thickness of label rules to 0.5pt
+\countercolor{Red} % Use red color for position counter
+\helixstyle{perspective} % Draw helical wheels in perspective
+\showbonds % Show bonds on helical wheels
+\hidemoment % Do not show hydrophobic moment
+\momentcolor{Lavender} % Lavender color for hydrophobic moment
+\scalemoment{100} % Moment rule length is 100%
+\showwheelnumbering % Show residue numbers on helical wheels
+\scalewheel{100} % Show full size helical wheel
+\symbolsize{medium} % Use medium sized symbols in wheels
+\donotshadestartMet % Do not shade the start methionine
+\showNterm % Show amino terminus as NH2
+\showCterm % Show carboxy terminus as COOH
+
+\setfamily{labels}{sf} % Use sans serif family for labels
+\setseries{labels}{md} % Use normal series for labels
+\setshape {labels}{up} % Use upright shape for labels
+\setfamily{membranelabels}{sf} % Use sans serif for membrane labels
+\setseries{membranelabels}{md} % Use normal series for membrane labels
+\setshape {membranelabels}{up} % Use upright shape for membrane labels
+\setfamily{looplabels}{sf} % Use sans serif for loop labels
+\setseries{looplabels}{bf} % Use bold face for loop labels
+\setshape {looplabels}{up} % Use upright shape for loop labels
+\looplabelcolor{Red} % Set loop label color to `Red'
+\setfamily{TMlabels}{sf} % Use sans serif for TM labels
+\setseries{TMlabels}{bf} % Use bold face for TM labels
+\setshape {TMlabels}{up} % Use upright shape for TM labels
+\TMlabelcolor{Blue} % Set TM label color to `Blue'
+\labelTMs{\Romancount} % Label the TMs with roman numbers
+\setfamily{legend}{sf} % Use sans serif font for legend texts
+\setseries{legend}{md} % Use normal series for legend texts
+\setshape {legend}{up} % Use upright shape for legend texts
+\setsize {legend}{normalsize} % Use normal font size for legends
+\legendcolor{Black} % Set legend text color to `Black'
+\showlegend % Show the legend
+\hidegrid % Do not show the grid
+
+\labelstyle{CONFLICT} % Label style definitions for
+ {diamond}{Black}{Blue}{White} %
+ {Conflicting reports in literatur} % SwissProt data files
+
+\labelstyle{VARIANT} % |
+ {diamond}{Black}{Orange}{Black} % |
+ {Sequence variants} % V
+
+\labelstyle{VARSPLIC} %
+ {diamond}{Black}{Apricot}{Black} %
+ {Splice variants} %
+
+\labelstyle{MUTAGEN} %
+ {diamond}{Black}{Red}{White} %
+ {Mutation sites} %
+
+\labelstyle{SIGNAL} %
+ {square}{Black}{Yellow}{Black} %
+ {Signal peptide} %
+
+\labelstyle{TRANSIT} %
+ {square}{Black}{Green}{Black} %
+ {Transit peptide} %
+
+\labelstyle{PROPEP} %
+ {square}{Black}{Red}{White} %
+ {Propeptide} %
+
+\labelstyle{CHAIN} %
+ {circ}{Black}{Aquamarine}{Blue} %
+ {Polypeptide chain} %
+
+\labelstyle{PEPTIDE} %
+ {circ}{Black}{Peach}{Black} %
+ {Released peptide} %
+
+\labelstyle{DOMAIN} %
+ {circ}{Black}{Turquoise}{Black} %
+ {Domain} %
+
+\labelstyle{CABIND} %
+ {circ}{Black}{Gray50}{White} %
+ {Calcium binding domain} %
+
+\labelstyle{DNABIND} %
+ {circ}{Black}{YellowGreen}{Black} %
+ {DNA binding domain} %
+
+\labelstyle{NPBIND} %
+ {circ}{Black}{Melon}{Black} %
+ {Nucleotide phosphate binding} %
+
+\labelstyle{ZNFING} %
+ {circ}{Black}{Lavender}{Black} %
+ {Zinc finger} %
+
+\labelstyle{SIMILAR} %
+ {circ}{Black}{SpringGreen}{Black} %
+ {Similar region} %
+
+\labelstyle{REPEAT} %
+ {circ}{Black}{Plum}{White} %
+ {Sequence repeat} %
+
+\labelstyle{SITE} %
+ {circ}{Black}{ForestGreen}{White} %
+ {Special site} %
+}
+\endinput
+%%
+%% End of file `textopo.sty'.