[pstricks] hook and arrowinset
Bernd Sellentin
b.sellentin at t-online.de
Mon Dec 10 12:30:13 CET 2007
Hello,
I am using in my chemistry papers the pstricks- and the mhchem-package. The
latter offers the nice looking option arrows=pgf, but I dont want to load two
graphic packages. So I modified the mhchem-package with a new option
arrows=pstricks, which is a translation of the pgf-code:
%%% for pstricks arrows
\newcommand*\mhchem at rightarrow@pstricks[1]{%
\begin{pspicture}(0,0)(#1,0.85ex)
\psline[linewidth=\mhchem at linewidth,arrowsize=\mhchem at arrowsize,arrowinset=\mhchem at arrowinset,arrowlength=\mhchem at arrowlength]%
{->}(0cm,0.575ex)(#1,0.575ex)
\end{pspicture}%
}%
%%% for pgf arrows
\newcommand*\mhchem at rightarrow@pgf[1]{%
\begin{tikzpicture}[baseline]%
\draw[use as bounding box] (0,0) (#1,0.85ex);
\draw[cap=round, join=round, line width=0.09ex]
(0cm,0.575ex) -- ++(#1,0cm)
arc (250:198:0.6ex) arc (198:250:0.6ex)
arc (110:162:0.6ex);
\end{tikzpicture}%
}%
This works and looks fine. But for the equilibrium-arrows the hook does not
know the option arrowinset and so looks different.
\newcommand*\mhchem at leftrightharpoon@pstricks[1]{%
\begin{pspicture}(0,0)(#1,1ex)
\psline[linewidth=\mhchem at linewidth,arrowsize=-\mhchem at arrowsize,arrowlength=\mhchem at arrowlength]
{-h}(0,0.795ex)(#1,0.795ex)
\psline[linewidth=\mhchem at linewidth,arrowsize=-\mhchem at arrowsize,arrowlength=\mhchem at arrowlength]
{h-}(0,0.355ex)(#1,0.355ex)
% arrowinset not implemented in pstricks-add for hook
\end{pspicture}%
}%
How to modify or define a new hook, which behaves and looks like a half - to
say the tip only on one side of the line - arrow?
Thank you,
Bernd
More information about the PSTricks
mailing list