%%%%%%%%%%%%%%%%%%%%%%%%%%% bhslabel.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % bhslabel.sty % called by bhs.sty % generate markup from BHS label notation % 09.03.95 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (c) Klaus Lagally % Institut fuer Informatik % Universitaet Stuttgart %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \a@ident {bhslabel.sty} {1.00} {09.03.95} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newtoks \bhslabel \newcount \a@ylevel \newcount \a@xlevel \xpa \gdef \csname a@c@\string ~\endcsname #1 {% get BHS label \bhs@label #1>\test@token } \def \bhs@label #1#2>{% process BHS label; hacked ! \global\bhslabel {#1#2} \ifx #1y\global\advance \a@ylevel 1 \else \ifx #1x\global\advance \a@xlevel 1 \global\a@ylevel 1 \else \global\a@xlevel 1 \global\a@ylevel 1 \putwordb@x {\rm $^{\the\bhslabel }$}\a@short@line \fi \putwordb@x {\bf \the\a@xlevel \space }% \fi \putwordb@x {\rm $^{\the\a@ylevel }$\space }\a@spacetrue } \endinput %%%%%%%%%%%%%%%%%%%%%%%% EOF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % this is garbage but interesting \def \rev #1#2\endrev {% reverse list \relax \relax \ifx #1\relax \else \ReturnFi {\rev #2\endrev #1}% \fi } \def \ReturnFi #1\fi {\fi #1} \def \bhs@tilde #1#2>{% header: hacked \ifx #1y\global \advance \a@level 1 \fi \edef \sc@char {\xpa \rev \the\a@level \relax \relax \endrev }\sc@put \ifx #2>\let \next \bhs@word \else \def \next {\bhs@word >}% \fi \next } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%