summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/t-angles
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-07-05 21:25:10 +0000
committerKarl Berry <karl@freefriends.org>2006-07-05 21:25:10 +0000
commit45a44ceea935e148d12f3c3044f559d962f721c2 (patch)
tree99d8e5f9cbfd6dde8075ff80c5409bdfa8b05785 /Master/texmf-dist/tex/latex/t-angles
parent1804bb9b7f24aecbc002d1ff3facbb800efad406 (diff)
t-angles update (author says GPL)
git-svn-id: svn://tug.org/texlive/trunk@1772 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/t-angles')
-rw-r--r--Master/texmf-dist/tex/latex/t-angles/t-angles.sty114
1 files changed, 99 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/t-angles/t-angles.sty b/Master/texmf-dist/tex/latex/t-angles/t-angles.sty
index 4962ecbd63e..241ed198066 100644
--- a/Master/texmf-dist/tex/latex/t-angles/t-angles.sty
+++ b/Master/texmf-dist/tex/latex/t-angles/t-angles.sty
@@ -1,26 +1,96 @@
-% a manual is available from http://www.math.ksu.edu/~lub/
-% \usepackage[emtex]{t-angles} % for emtex drivers, dviwin and dvips or
+% a manual is available from CTAN and http://www.math.ksu.edu/~lub/
+% \usepackage[emtex]{t-angles} % for emtex drivers, dviwin, dvips, yap or
% \usepackage{t-angles} = \usepackage[TPIC]{t-angles}
-% % for TPIC drivers such as dviwin, xdvi, dvips
+% % for TPIC drivers such as dviwin, xdvi, dvips, yap, dvipdfm
% \usepackage[kluwer]{t-angles} or \usepackage[emtex,kluwer]{t-angles}
-% % to use with kluwer.cls
+% % to use with kluwer.cls
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % %
- % This is file t-angles.sty ( version 10.09.00 ) %
- % %
- % Diagrammatic macros for tangles and braided Hopf algebras %
- % %
- % (Yu. Bespalov, V. Lyubashenko) %
- % %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % %
+ % This is file t-angles.sty ( version 22.04.2006 ) %
+ % %
+ % Diagram macros for tangles and braided Hopf algebras %
+ % %
+ % (Yu. Bespalov, V. Lyubashenko) %
+ % %
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcount{\hstretch} \hstretch 100
\newcount{\vstretch} \vstretch 100
\newlength{\unitlens} \unitlens 10pt
\def\FillCircDiam{3}
+\DeclareOption{pdflatex}{%
+%% Hans Hagen's CONTEXT Support Macros from supp-emp.tex
+\def\EMmoveto%
+ {\EMgetposition\EMlastmovex\EMlastmovey}
+\def\EMlinewd{.4}
+\def\EMlineto%
+ {\bgroup
+ \EMgetposition\EMlastlinex\EMlastliney
+ \count0=\EMlastmovex \advance\count0 by -\EMlastlinex
+ \count2=\EMlastmovey \advance\count2 by -\EMlastliney
+ \ifnum\count0>0 %this \ifnum is added by VL
+ \advance\count0 32768
+ \else
+ \advance\count0 -32768
+ \fi
+ \ifnum\count2>0 %this \ifnum is added by VL
+ \advance\count2 32768
+ \else
+ \advance\count2 -32768
+ \fi
+ \divide\count0 by 65536
+ \divide\count2 by 65536
+ \pdfliteral{\EMlinewd\space w 0 0 m \the\count0 \space\the\count2 \space l S}%
+ \global\let\EMlastmovex\EMlastlinex
+ \global\let\EMlastmovey\EMlastliney
+ \egroup}
+\def\resetEMspecials%
+ {\gdef\EMlastmovex{0}\gdef\EMlastmovey{0}}
+\def\EMgetposition#1#2%
+ {\bgroup
+ \pdfsavepos
+ \global\advance\EMcounter by 1
+ \expandafter\write\expandafter\EMfile\expandafter
+ {\expandafter\noexpand\expandafter\EMsetpos\number\EMcounter
+ \space\number\pdflastxpos\space\number\pdflastypos}%
+ \EMsetcounters
+ \xdef#1{\the\count0}%
+ \xdef#2{\the\count2}%
+ \egroup}
+\newcount\EMcounter
+\newwrite\EMfile
+\def\EMfilename{\jobname.emp}
+\def\startEMspecials%
+ {\resetEMspecials
+ \openin\scratchread=\EMfilename \relax
+ \ifeof\scratchread\else \input \EMfilename \relax \fi
+ \closein\scratchread
+ \immediate\openout\EMfile=\EMfilename\relax}
+\def\stopEMspecials%
+ {\closeout\EMfile}
+\ifx\undefined\scratchread \newread\scratchread \fi
+\def\EMsetpos#1 #2 #3 % number x y
+ {\expandafter\xdef\csname EM:#1\endcsname{\count0=#2 \count2=#3}}
+\def\EMsetcounters%
+ {\count0=0 \count2=0
+ \csname EM:\the\EMcounter\endcsname}
+%% end of macros "EMTEX specials to PDF conversion"
+\gdef\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc
+ \@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth
+ \def\EMlinewd{0.4}} %\@wholewidth=0.4pt
+\gdef\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw
+ \@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth
+ \def\EMlinewd{0.8}} %\@wholewidth=0.8pt
+\def\emline#1#2#3#4#5#6{%
+ \put(#1,#2){\EMmoveto}%
+ \put(#4,#5){\EMlineto}}%
+\def\drawpath#1#2#3#4{\emline{#1}{#2}1{#3}{#4}2} % graphics for *.lp
+}
+%
\DeclareOption{emtex}{%
+\ifx\pdfoutput\undefined
\gdef\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc
\@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth
\special{em:linewidth \the\@wholewidth}} %\@wholewidth=0.4pt
@@ -31,11 +101,14 @@
\put(#1,#2){\special{em:moveto}}%
\put(#4,#5){\special{em:lineto}}}%
\def\drawpath#1#2#3#4{\emline{#1}{#2}1{#3}{#4}2} % graphics for *.lp
-}
+ \else
+\ExecuteOptions{pdflatex}
+\fi}
%
\newcount\@gphlinewidth
%
\DeclareOption{TPIC}{%
+\ifx\pdfoutput\undefined
\@gphlinewidth\@wholewidth \divide\@gphlinewidth 4736
\advance\@gphlinewidth\@ne %\@gphlinewidth=6
\gdef\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc
@@ -60,13 +133,18 @@
\@ifnextchar ({\@path}{\special{fp}}}
\providecommand{\drawpath}[4]{\path(#1,#2)(#3,#4)} % TPIC graphics for *.lp
\providecommand{\emline}[6]{\path(#1,#2)(#4,#5)} % TPIC graphics for *.pic
-}
+ \else
+\ExecuteOptions{pdflatex}
+\fi}
+%
\DeclareOption{kluwer}{%
\def\tangle{\begingroup\let\hline\savehline\t@ngle\array{l}}
\def\tanglec{\begingroup\let\hline\savehline\t@ngle\array{c}}
\def\tangler{\begingroup\let\hline\savehline\t@ngle\array{r}}
\def\tangles{\begingroup\let\hline\savehline\t@ngle\array}
}
+%
+\ifx\pdfoutput\relax\let\pdfoutput\undefined\fi
\ExecuteOptions{TPIC}
\newcount{\h@r}
@@ -417,4 +495,10 @@
\def\tangles{\t@ngle\array} \let\endtangles\endtangle
%
\ProcessOptions
+\ifx\pdfoutput\undefined
+ \else
+\startEMspecials
+\let\EMenddocument\enddocument
+\def\enddocument{\stopEMspecials\EMenddocument}
+\fi
\endinput