Compatibilty problems with the XyMTeX package

Denis Girou Denis.Girou at idris.fr
Mon Jan 31 23:22:05 CET 2000


-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

  Eddie Saudrais <eddie.saudrais at wanadoo.fr> recently try to use PSTricks
to annotate some chemical pictures drawn with XyMTeX
(CTAN/macros/latex/contrib/other/xymtex), and he found an incompatibility
between the two packages.

  In fact, there are (at least) two distinct problems. The first one, as
mentioned by Eddie Saudrais, arrive when we use an XyMTeX object inside
a "pspicture" environment, where we got a "Dimension too large" error message.
This come from the fact that PSTricks, used inside LaTeX -of course this
doesn't concern "plain" usage-, try to ensure a compatibility with the
LaTeX "picture" environment (see documentation page 42). The interest of it
is rather thin, as "pspicture" include the functionalities of "picture",
and because it is rather confuse to mix commands of the two modes, but
the real question is not here. In this case, it is necessary to locally
redefine the "unit" parameter to the value given by XyMTeX to \unitlength
(0.1pt).

  Nevertheless, we can see further another problem about the definition
of the origin of the coordinates. This come from the fact that XyMTeX put each 
of it objects inside a "picture" environment, and give it a dimension.
So, we must position explicitely the XyMTeX objects inside the "pspicture"
environment, using the \rput macro.

\documentclass[a4paper]{article}

\usepackage{aliphat}
\usepackage{pstricks}

\psset{subgriddiv=0}

\pagestyle{empty}

\begin{document}

\square{0==O;1==H;2==H}

% As the XyMTeX package set \unitlength to 0.1pt, this require to locally
% redefine the "unit" parameter to this value to avoid a
% "Dimension too large" error message

\begin{pspicture}(2,2)\psgrid
  {\psset{unit=0.1pt}\square{0==O;1==H;2==H}}
  \psline{->}(0,0.4)(1,0.4)
\end{pspicture}

\vspace{1cm}

% The XyMTeX package put it objects inside a LaTeX "picture" environment,
% so we must position them explicitely if we want to put them inside
% a personal "pspicture" environment

\begin{pspicture}(2,2)\psgrid
  \rput(1,1){\psset{unit=0.1pt}\square{0==O;1==H;2==H}}
  \psline{->}(0,0.4)(1,0.4)
\end{pspicture}

\end{document}

D.G.

-----------------------------------------------------------------------------
The list interface (subscription, information, access to the archives) is on:
http://www.tug.org/cgi-bin/lwgate/pstricks
Otherway to unsubscribe, send mail to pstricks-request at mail.tug.org
with a blank subject and in body the line unsubscribe <email-address>
-----------------------------------------------------------------------------



More information about the PSTricks mailing list