summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty37
1 files changed, 23 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
index e05e1c64217..8266fe1df15 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xy.sty
@@ -20,30 +20,39 @@
\AtBeginDocument{
-\preto{\xy}{\begin{lateximage}[(-xy-~\packagediagramname)]}
-\appto{\endxy}{\end{lateximage}}
-
-\@ifundefined{xymatrix}{}{
-\LetLtxMacro\LWR@origxymatrix\xymatrix
+\LetLtxMacro\LWR@orig@xy\xy
+\LetLtxMacro\LWR@orig@endxy\endxy
+\renewcommand*{\xy}{%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {\addtocounter{LWR@lateximagedepth}{1}}%
+ {\begin{lateximage}[(-xy-~\packagediagramname)]}%
+ \LWR@orig@xy%
+}
-\renewcommand{\xymatrix}[1]{%
-\begin{lateximage}[(-xy- xymatrix \packagediagramname)]
-\LWR@origxymatrix{#1}
-\end{lateximage}
+\renewcommand*{\endxy}{%
+ \LWR@orig@endxy%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{1}%
+ {\addtocounter{LWR@lateximagedepth}{-1}}%
+ {\end{lateximage}}%
}
+\def\xybox#1{%
+ \LWR@orig@xy#1\LWR@orig@endxy%
+ \Edge@c={\rectangleEdge}\computeLeftUpness@%
}
\@ifundefined{xygraph}{}{
+
\LetLtxMacro\LWR@origxygraph\xygraph
\renewcommand{\xygraph}[1]{%
-\begin{lateximage}[(-xy- xygraph \packagediagramname)]
-\LWR@origxygraph{#1}
-\end{lateximage}
-}
+ \begin{lateximage}[(-xy- xygraph \packagediagramname)]
+ \LWR@origxygraph{#1}
+ \end{lateximage}
}
-}
+}% xygraph defined
+
+}% AtBeginDocument
\endinput
%%