| 1 |
% \iffalse meta-comment |
| 2 |
%% File: xymtx-ps.dtx |
| 3 |
% |
| 4 |
% Copyright 2002,2004,2005,2009,2013 by Shinsaku Fujita |
| 5 |
% |
| 6 |
% This file is part of XyMTeX system. |
| 7 |
% ------------------------------------- |
| 8 |
% |
| 9 |
% This file is a successor to: |
| 10 |
% |
| 11 |
% xymtx-ps.sty |
| 12 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 13 |
% \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 4.00} |
| 14 |
% \typeout{ -- Released May 30, 2002 by Shinsaku Fujita} |
| 15 |
% Copyright (C) 2002 by Shinsaku Fujita, all rights reserved. |
| 16 |
% |
| 17 |
% This file is a part of the macro package ``XyMTeX'' which has been |
| 18 |
% designed for typesetting chemical structural formulas. |
| 19 |
% |
| 20 |
% This file is to be contained in the ``xymtex'' directory which is |
| 21 |
% an input directory for TeX. It is a LaTeX optional style file and |
| 22 |
% should be used only within LaTeX, because several macros of the file |
| 23 |
% are based on LaTeX commands. |
| 24 |
% |
| 25 |
% The following book deals with an application of TeX/LaTeX to |
| 26 |
% preparation of manuscripts of chemical fields: |
| 27 |
% (1) Shinsaku Fujita, ``LaTeX for Chemists and Biochemists'' |
| 28 |
% Tokyo Kagaku Dozin, Tokyo (1993) [in Japanese]. |
| 29 |
% (2) Shinsaku Fujita, ``XyMTeX. Typesetting Chemical Structural |
| 30 |
% Formulas'' Addison-Wesley, New York (1997). |
| 31 |
% |
| 32 |
% Copying of this file is authorized only if either |
| 33 |
% (1) you make absolutely no changes to your copy, including name and |
| 34 |
% directory name; or |
| 35 |
% (2) if you do make changes, |
| 36 |
% (a) you name it something other than the names included in the |
| 37 |
% ``xymtex'' directory and |
| 38 |
% (b) you are requested to leave this notice intact. |
| 39 |
% This restriction ensures that all standard styles are identical. |
| 40 |
% |
| 41 |
% Please report any bugs, comments, suggestions, etc. to: |
| 42 |
% Shinsaku Fujita, |
| 43 |
% Department of Chemistry and Materials Technology, |
| 44 |
% Kyoto Institute of Technology, |
| 45 |
% Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan |
| 46 |
% |
| 47 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 48 |
% \def\j@urnalname{xymtx-ps} |
| 49 |
% \def\versi@ndate{May 30, 2002} |
| 50 |
% \def\versi@nno{ver1.00} |
| 51 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 52 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 53 |
% \def\j@urnalname{xymtx-ps} |
| 54 |
% \def\versi@ndate{May 30, 2002} |
| 55 |
% \def\versi@nno{ver1.00} |
| 56 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 57 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 58 |
% \def\j@urnalname{xymtx-ps} |
| 59 |
% \def\versi@ndate{August 30, 2004} |
| 60 |
% \def\versi@nno{ver4.01} |
| 61 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 62 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 63 |
% \def\j@urnalname{xymtx-ps} |
| 64 |
% \def\versi@ndate{December 20, 2004} |
| 65 |
% \def\versi@nno{ver4.02} |
| 66 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 67 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 68 |
% \def\j@urnalname{xymtx-ps} |
| 69 |
% \def\versi@ndate{June 20, 2005} |
| 70 |
% \def\versi@nno{ver4.03} |
| 71 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 72 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 73 |
% \def\j@urnalname{xymtx-ps} |
| 74 |
% \def\versi@ndate{August 02, 2005} |
| 75 |
% \def\versi@nno{ver4.03a} |
| 76 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 77 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 78 |
% \def\j@urnalname{xymtx-ps} |
| 79 |
% \def\versi@ndate{June 15, 2009} |
| 80 |
% \def\versi@nno{ver4.04a} |
| 81 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 82 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 83 |
% \def\j@urnalname{xymtx-ps} |
| 84 |
% \def\versi@ndate{November 05, 2009} |
| 85 |
% \def\versi@nno{ver4.05} |
| 86 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 87 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 88 |
% \def\j@urnalname{xymtx-ps} |
| 89 |
% \def\versi@ndate{February 24, 2011} |
| 90 |
% \def\versi@nno{ver5.01b} |
| 91 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 92 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 93 |
% \def\j@urnalname{xymtx-ps} |
| 94 |
% \def\versi@ndate{May 27, 2013} |
| 95 |
% \def\versi@nno{ver5.01bb} |
| 96 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 97 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 98 |
% \def\j@urnalname{xymtx-ps} |
| 99 |
% \def\versi@ndate{June 21, 2013} |
| 100 |
% \def\versi@nno{ver5.01bbb} |
| 101 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 102 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 103 |
% |
| 104 |
% \fi |
| 105 |
% |
| 106 |
% \CheckSum{1000} |
| 107 |
%% \CharacterTable |
| 108 |
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 109 |
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 110 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 111 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 112 |
%% Dollar \$ Percent \% Ampersand \& |
| 113 |
%% Acute accent \' Left paren \( Right paren \) |
| 114 |
%% Asterisk \* Plus \+ Comma \, |
| 115 |
%% Minus \- Point \. Solidus \/ |
| 116 |
%% Colon \: Semicolon \; Less than \< |
| 117 |
%% Equals \= Greater than \> Question mark \? |
| 118 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 119 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 120 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 121 |
%% Right brace \} Tilde \~} |
| 122 |
% |
| 123 |
% \setcounter{StandardModuleDepth}{1} |
| 124 |
% |
| 125 |
% \StopEventually{} |
| 126 |
% \MakeShortVerb{\|} |
| 127 |
% |
| 128 |
% \iffalse |
| 129 |
% \changes{v1.00}{2002/05/30}{first edition for LaTeX2e} |
| 130 |
% \changes{v4.01}{2004/08/30}{Adjust for XyMTeX version 4.01} |
| 131 |
% \changes{v4.02}{2004/12/20}{Wedged bonds for stereochemistry} |
| 132 |
% \changes{v4.03}{2005/06/20}{Wave bonds for stereochemistry} |
| 133 |
% \changes{v4.03a}{2005/08/02}{Bug fix for the compatibility with |
| 134 |
% \changes{v4.04a}{2009/06/15}{Bug fix for \cs{\Put@@@Direct}} |
| 135 |
% \changes{v4.05}{2009/11/05}{Bug fix for \cs{\Put@@@Direct}; pLaTeXe vs. LaTeXe} |
| 136 |
% \changes{v5.01b}{2011/02/24}{Coloring bonds and atoms} |
| 137 |
% \changes{v5.01bb}{2013/05/27}{\cs{WedgeAsSubstX} etc.} |
| 138 |
% \changes{v5.01bbb}{2013/06/21}{\cs{WavyAsSubst} etc.} |
| 139 |
% \changes{v5.01}{2013/08/16}{\cs{BackGroundBond} etc.} |
| 140 |
% \fi |
| 141 |
% |
| 142 |
% \iffalse |
| 143 |
%<*driver> |
| 144 |
\NeedsTeXFormat{pLaTeX2e} |
| 145 |
% \fi |
| 146 |
\ProvidesFile{xymtx-ps.dtx}[2013/08/16 v5.01 xymtx-ps package file] |
| 147 |
% \iffalse |
| 148 |
\documentclass{ltxdoc} |
| 149 |
\GetFileInfo{xymtx-ps.dtx} |
| 150 |
% |
| 151 |
% %%XyMTeX Logo: Definition 2%%% |
| 152 |
\def\UPSILON{\char'7} |
| 153 |
\def\XyM{X\kern-.30em\smash{% |
| 154 |
\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}} |
| 155 |
\def\XyMTeX{\XyM\kern-.1em\TeX} |
| 156 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 157 |
\title{Chemistry Conventions by {\sffamily xymtx-ps.sty} |
| 158 |
(\fileversion) of \XyMTeX{}} |
| 159 |
\author{Shinsaku Fujita \\ |
| 160 |
Shonan Institute of Chemoinformatics Mathematical Chemistry, \\ |
| 161 |
Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, |
| 162 |
Kanagawa-Ken, 258-0019 Japan |
| 163 |
% Department of Chemistry and Materials Technology, \\ |
| 164 |
% Kyoto Institute of Technology, \\ |
| 165 |
% Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan |
| 166 |
} |
| 167 |
\date{\filedate} |
| 168 |
% |
| 169 |
\begin{document} |
| 170 |
\maketitle |
| 171 |
\DocInput{xymtx-ps.dtx} |
| 172 |
\end{document} |
| 173 |
%</driver> |
| 174 |
% \fi |
| 175 |
% |
| 176 |
% \section{Introduction}\label{xymtx-ps:intro} |
| 177 |
% |
| 178 |
% \subsection{Options for {\sffamily docstrip}} |
| 179 |
% |
| 180 |
% \DeleteShortVerb{\|} |
| 181 |
% \begin{center} |
| 182 |
% \begin{tabular}{|l|l|} |
| 183 |
% \hline |
| 184 |
% \emph{option} & \emph{function}\\ \hline |
| 185 |
% xymtxps & xymtx-ps.sty \\ |
| 186 |
% driver & driver for this dtx file \\ |
| 187 |
% \hline |
| 188 |
% \end{tabular} |
| 189 |
% \end{center} |
| 190 |
% \MakeShortVerb{\|} |
| 191 |
% |
| 192 |
% \subsection{Version Information} |
| 193 |
% |
| 194 |
% \begin{macrocode} |
| 195 |
%<*xymtxps> |
| 196 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 197 |
\def\j@urnalname{xymtx-ps} |
| 198 |
\def\versi@ndate{August 16, 2013} |
| 199 |
\def\versi@nno{ver5.01} |
| 200 |
\def\copyrighth@lder{SF} % Shinsaku Fujita |
| 201 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 202 |
\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>% |
| 203 |
\space[\copyrighth@lder]} |
| 204 |
% \end{macrocode} |
| 205 |
% |
| 206 |
% \section{Input of basic macros} |
| 207 |
% |
| 208 |
% To assure the compatibility to \LaTeX{}2.09 (the native mode), |
| 209 |
% the commands added by \LaTeXe{} have not been used in the resulting sty |
| 210 |
% files ({\sf ccycle.sty} for the present case). Hence, the combination |
| 211 |
% of |\input| and |\@ifundefined| is used to crossload sty |
| 212 |
% files ({\sf chemstr.sty} for the present case) in place of the |
| 213 |
% |\RequirePackage| command of \LaTeXe{}. |
| 214 |
% The global setting of unit by |\psset| has caused imcompatibility |
| 215 |
% with the prosper package and so has been changed into a local setting. |
| 216 |
% \changes{v4.03a}{2005/08/02}{Bug fix for the compatibility with |
| 217 |
% the prosper package} |
| 218 |
% |
| 219 |
% \begin{macrocode} |
| 220 |
% ************************* |
| 221 |
% * input of basic macros * |
| 222 |
% ************************* |
| 223 |
\@ifundefined{setsixringv}{\input chemstr.sty\relax}{} |
| 224 |
\RequirePackage{chemstr}%added 2010/10/01 |
| 225 |
\RequirePackage{pstricks} |
| 226 |
\RequirePackage{pst-coil} |
| 227 |
\unitlength=0.1pt |
| 228 |
%%\psset{xunit=\the\unitlength,yunit=\the\unitlength}%delete August 2, 2005 |
| 229 |
% \end{macrocode} |
| 230 |
% |
| 231 |
% \begin{macrocode} |
| 232 |
\newif\if@thicklinesw \@thicklineswfalse |
| 233 |
\def\Thick@Lines{\@thicklineswtrue}%redefinition |
| 234 |
\def\Thin@Lines{\@thicklineswfalse}%redefinition |
| 235 |
\def\thickLineWidth{1.6pt} |
| 236 |
\def\thinLineWidth{0.4pt} |
| 237 |
% \end{macrocode} |
| 238 |
% |
| 239 |
% The macro |\Put@@@Line| can draw dashed bonds or wedged bonds for supporting |
| 240 |
% stereochemistry. Two switches are available as follows: |
| 241 |
% |
| 242 |
% \begin{macro}{changedashtowedge} |
| 243 |
% \begin{macro}{changewedgetodash} |
| 244 |
% \changes{v4.02}{2004/12/20}{Switch for wedged bonds} |
| 245 |
% \begin{macrocode} |
| 246 |
\newif\if@wedgesw \@wedgeswtrue |
| 247 |
\newif\if@hasheddashsw \@hasheddashswtrue |
| 248 |
\def\wedgehasheddash{\@wedgeswtrue\@hasheddashswtrue} |
| 249 |
\def\wedgehashedwedge{\@wedgeswtrue\@hasheddashswfalse} |
| 250 |
\def\dashhasheddash{\@wedgeswfalse\@hasheddashswtrue} |
| 251 |
\@ifundefined{ifmolfront}{\newif\ifmolfront \molfrontfalse}{} |
| 252 |
\@ifundefined{if@skbondlist}{\newif\if@skbondlist \@skbondlistfalse}{} |
| 253 |
% \end{macrocode} |
| 254 |
% \end{macro} |
| 255 |
% \end{macro} |
| 256 |
% |
| 257 |
% \begin{macro}{Put@@@Line} |
| 258 |
% \changes{v4.02}{2004/12/20}{Wedged bonds for stereochemistry} |
| 259 |
% \changes{v4.03}{2005/07/20}{Switch for wave bonds} |
| 260 |
% \changes{v5.01}{2011/02/24}{Coloring atoms and bonds} |
| 261 |
% \begin{macrocode} |
| 262 |
%\newcount\@tempcntXa \newcount\@tempcntYa \newcount\@tempcntz%deleted 2010/10/01 |
| 263 |
%\newcount\@tempcntXb \newcount\@tempcntYb \newcount\@tempcntzz%deleted 2010/10/01 |
| 264 |
%\newcount\@tempcntXc \newcount\@tempcntYc \newcount\@tempcntzzz%deleted 2010/10/01 |
| 265 |
\long\gdef\Put@@@Line(#1,#2)(#3,#4)#5{% |
| 266 |
\begingroup |
| 267 |
\SlopetoXY(#1,#2)(#3,#4){#5}%%replaced (code from chemstr.sty) |
| 268 |
\if@thicklinesw |
| 269 |
\if@wedgesw |
| 270 |
\ifmolfront%bold dash bond for skeletal bond for pyranose etc. |
| 271 |
\psline[unit=\unitlength,% |
| 272 |
%linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 273 |
linewidth=\thickLineWidth](#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% |
| 274 |
\else |
| 275 |
\if@skbondlist%bold dash bond skeletal bond for general cases |
| 276 |
\psline[unit=\unitlength,% |
| 277 |
%linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 278 |
linewidth=\thickLineWidth](#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% |
| 279 |
\else%wedged bond |
| 280 |
\stereo@wedgedimension(#3,#4){10}% |
| 281 |
\pspolygon*[unit=\unitlength% |
| 282 |
%,linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 283 |
](#1,#2)% |
| 284 |
(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc) |
| 285 |
\fi\fi |
| 286 |
\else |
| 287 |
\psline[unit=\unitlength,% |
| 288 |
%linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 289 |
linewidth=\thickLineWidth](#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% |
| 290 |
\fi |
| 291 |
\else |
| 292 |
\ifwavebond |
| 293 |
\pszigzag[unit=\unitlength,% |
| 294 |
%linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 295 |
coilheight=1,coilwidth=.13cm,linewidth=\thinLineWidth,linearc=5,% |
| 296 |
coilarm=0]{-}(\the\@tempcntXa,\the\@tempcntYa)(#1,#2)% |
| 297 |
\else |
| 298 |
\psline[unit=\unitlength,% |
| 299 |
%linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 300 |
linewidth=\thinLineWidth](#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% |
| 301 |
\fi |
| 302 |
\fi |
| 303 |
\@tempcntXa=0\relax \@tempcntYa=0\relax |
| 304 |
\endgroup}%end of Put@@@Line |
| 305 |
% \end{macrocode} |
| 306 |
% \end{macro} |
| 307 |
% |
| 308 |
% The macro |\stereo@wedgedimension| calculates the coordinates of three positions |
| 309 |
% for drawing a wedged bond, which is drawn by the |\pspolygon| command of the PSTricks package. |
| 310 |
% |
| 311 |
% \begin{macro}{stereo@wedgedimension} |
| 312 |
% \changes{v4.02}{2004/12/20}{Wedged bonds for stereochemistry} |
| 313 |
% \begin{macrocode} |
| 314 |
\newif\if@wedgeadjust |
| 315 |
\def\stereo@wedgedimension(#1,#2)#3{% |
| 316 |
\@tempcntXb=0\relax |
| 317 |
\@tempcntYb=0\relax |
| 318 |
\@tempcntXc=0\relax |
| 319 |
\@tempcntYc=0\relax |
| 320 |
%% |
| 321 |
\@wedgeadjustfalse |
| 322 |
\ifnum#1<0 \@tempcntzz=-#1\else\@tempcntzz=#1\fi |
| 323 |
\ifnum#2<0 \@tempcntzzz=-#2\else\@tempcntzzz=#2\fi |
| 324 |
\ifnum#1=0\else |
| 325 |
\multiply\@tempcntzzz by10\relax \divide\@tempcntzzz by\@tempcntzz\fi%% (3/5)x10=6 |
| 326 |
\ifnum\@tempcntzzz>7\relax\else\@wedgeadjusttrue\fi |
| 327 |
%%one point of wedge |
| 328 |
\ifnum#1=0\relax |
| 329 |
\@tempcntXb=#3 \advance\@tempcntXb by8\relax |
| 330 |
\@tempcntYb=0\relax |
| 331 |
\else |
| 332 |
\ifnum#2=0\relax |
| 333 |
\@tempcntXb=0\relax |
| 334 |
\@tempcntYb=#3 \advance\@tempcntYb by8\relax |
| 335 |
\else |
| 336 |
\@tempcntXb=#3\relax |
| 337 |
\@tempcntYb=-#3\relax |
| 338 |
\if@wedgeadjust |
| 339 |
\advance\@tempcntXb by8\relax |
| 340 |
\advance\@tempcntYb by-8\relax |
| 341 |
\fi |
| 342 |
\multiply\@tempcntXb by#2\relax\multiply\@tempcntXb by10\relax |
| 343 |
\divide\@tempcntXb by#1\relax\divide\@tempcntXb by10\relax\fi\fi |
| 344 |
\advance\@tempcntXb by\@tempcntXa\relax |
| 345 |
\advance\@tempcntYb by\@tempcntYa\relax |
| 346 |
%%other point of wedge |
| 347 |
\ifnum#1=0\relax |
| 348 |
\@tempcntXc=-#3 \advance\@tempcntXc by-8\relax |
| 349 |
\@tempcntYc=0\relax |
| 350 |
\else |
| 351 |
\ifnum#2=0\relax |
| 352 |
\@tempcntXc=0\relax |
| 353 |
\@tempcntYc=-#3 \advance\@tempcntYc by-8\relax |
| 354 |
\else |
| 355 |
\@tempcntXc=-#3\relax |
| 356 |
\@tempcntYc=#3\relax |
| 357 |
\if@wedgeadjust |
| 358 |
\advance\@tempcntXc by-6\relax |
| 359 |
\advance\@tempcntYc by6\relax |
| 360 |
\fi |
| 361 |
\multiply\@tempcntXc by#2\relax\multiply\@tempcntXc by10\relax |
| 362 |
\divide\@tempcntXc by#1\relax\divide\@tempcntXc by10\relax\fi\fi |
| 363 |
\advance\@tempcntXc by\@tempcntXa\relax |
| 364 |
\advance\@tempcntYc by\@tempcntYa\relax |
| 365 |
}%%end of \stereo@wedgedimension |
| 366 |
% \end{macrocode} |
| 367 |
% \end{macro} |
| 368 |
% |
| 369 |
% The optional argument [Bl] of |\Put@@@Direct| is corrected |
| 370 |
% to be [bl]. This effect appears in the use of tbook.cls etc. |
| 371 |
% \changes{v4.04a}{2009/06/15}{Bug fix for tategumi} |
| 372 |
% \changes{v4.05}{2009/11/05}{Bug fix for tategumi and yokogumi; |
| 373 |
% pLaTeXe vs. LaTeXe} |
| 374 |
% \changes{v5.01}{2011/02/24}{Coloring atoms and bonds} |
| 375 |
% |
| 376 |
% \begin{macro}{Put@@@Direct} |
| 377 |
% \begin{macrocode} |
| 378 |
% \def\Put@@@Direct(#1,#2)#3{\begingroup\psset{unit=\unitlength}% |
| 379 |
% \rput[Bl]{0}(#1,#2){#3}\endgroup}%2009/06/15 2009/11/05bugfix as follows |
| 380 |
\@ifundefined{iftdir}{\newif\iftdir \tdirfalse}{}%pLaTeXe vs. LaTeXe |
| 381 |
\def\Put@@@Direct(#1,#2)#3{\begingroup\psset{unit=\unitlength}% |
| 382 |
\iftdir |
| 383 |
\rput[bl]{0}(#1,#2){#3}\else\rput[Bl]{0}(#1,#2){#3}\fi |
| 384 |
\endgroup} |
| 385 |
\def\Put@@@oCircle(#1,#2)#3{% |
| 386 |
\begingroup \@tempcntz=#3 \divide\@tempcntz by2\relax |
| 387 |
\pscircle[linewidth=.4pt,unit=\unitlength](#1,#2){\@tempcntz}\endgroup} |
| 388 |
\def\Put@@@sCircle(#1,#2)#3{% |
| 389 |
\begingroup \@tempcntz=#3 \divide\@tempcntz by2\relax |
| 390 |
\pscircle[linewidth=2pt,unit=\unitlength](#1,#2){\@tempcntz}\endgroup} |
| 391 |
% \end{macrocode} |
| 392 |
% \end{macro} |
| 393 |
% |
| 394 |
% Dotted lines by the old macro |\d@@t@rline| are changed into hashed dash bonds |
| 395 |
% in the new macro |\d@@t@rline| (|\@wedgeswfalse|). If |\@wedgeswtrue| is |
| 396 |
% declared (default), the new macro draws a hashed wedged bonds. |
| 397 |
% |
| 398 |
% \begin{macro}{d@@t@rline} |
| 399 |
% \changes{v4.02}{2004/12/20}{Hashed wedged bonds for stereochemistry} |
| 400 |
% \begin{macrocode} |
| 401 |
\def\d@@t@rline(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% |
| 402 |
\if@hasheddashsw |
| 403 |
\@ifundefined{psline}{% |
| 404 |
\XyMTeXWarning{A dottedline is replaced by a solid line.}% |
| 405 |
\Put@Line(#1,#2)(#3,#4){#5}% |
| 406 |
}{{\thicklines% |
| 407 |
\hasheddashbond(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)}}% |
| 408 |
\else |
| 409 |
\if@skbondlist%hashed dash bond skeletal bond for general cases |
| 410 |
\@ifundefined{psline}{% |
| 411 |
\XyMTeXWarning{A dottedline is replaced by a solid line.}% |
| 412 |
\Put@Line(#1,#2)(#3,#4){#5}% |
| 413 |
}{{\thicklines% |
| 414 |
\hasheddashbond(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)}}% |
| 415 |
\else |
| 416 |
\hashedwedgebond(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)% |
| 417 |
\fi\fi |
| 418 |
}%end of \d@@t@rline |
| 419 |
% \end{macrocode} |
| 420 |
% \end{macro} |
| 421 |
% |
| 422 |
% The inner macro |\hasheddashbond| works in the macro |\d@@t@rline| for |
| 423 |
% drawing a hased dash bond. |
| 424 |
% |
| 425 |
% \begin{macro}{hasheddashbond} |
| 426 |
% \changes{v4.02}{2004/12/20}{Hashed dash bonds for stereochemistry} |
| 427 |
% \changes{v5.01}{2011/02/24}{Coloring atoms and bonds} |
| 428 |
% \begin{macrocode} |
| 429 |
\def\hasheddashbond(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% |
| 430 |
\begingroup |
| 431 |
\@tempcntzz=12\relax |
| 432 |
\@tempcntzzz=-30\relax%almost no shortening |
| 433 |
\bond@shorten(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)% |
| 434 |
\ifdim\unitlength>0.08pt |
| 435 |
\psline[unit=\unitlength,% |
| 436 |
%linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 437 |
linewidth=\thickLineWidth,linestyle=dashed,dash=1pt 1.2pt]% |
| 438 |
(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% |
| 439 |
\else |
| 440 |
\psline[unit=\unitlength,% |
| 441 |
%linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 442 |
linewidth=\thickLineWidth,linestyle=dashed,dash=1pt 1.2pt]% |
| 443 |
(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% |
| 444 |
\fi |
| 445 |
\endgroup} |
| 446 |
% \end{macrocode} |
| 447 |
% \end{macro} |
| 448 |
% |
| 449 |
% The inner macro |\hashedwedgebond| works in the macro |\d@@t@rline| for |
| 450 |
% drawing a hashed wedged bond. |
| 451 |
% |
| 452 |
% \begin{macro}{hashedwedgebond} |
| 453 |
% \changes{v4.02}{2004/12/20}{Hashed wedged bonds for stereochemistry} |
| 454 |
% \changes{v5.01}{2011/02/24}{Coloring atoms and bonds} |
| 455 |
% \begin{macrocode} |
| 456 |
\def\hashedwedgebond(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% |
| 457 |
\begingroup |
| 458 |
\@tempcntXa=#8\relax |
| 459 |
\@tempcntYa=#9\relax |
| 460 |
\stereo@wedgedimension(#3,#4){10}% |
| 461 |
\pspolygon*[unit=\unitlength% |
| 462 |
%,linecolor=\psbondsubstcolor%added 2011/02/24 |
| 463 |
](#1,#2)(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% |
| 464 |
\@tempcntzz=5\relax |
| 465 |
\@tempcntzzz=-12\relax |
| 466 |
\bond@shorten(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)% |
| 467 |
\ifdim\unitlength>0.08pt |
| 468 |
\psline[unit=\unitlength,% |
| 469 |
linewidth=3.8pt,linestyle=dashed,dash=0.8pt 1pt,linecolor=white]% |
| 470 |
(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% |
| 471 |
\else |
| 472 |
\psline[unit=\unitlength,% |
| 473 |
linewidth=3pt,linestyle=dashed,dash=0.6pt 0.8pt,linecolor=white]% |
| 474 |
(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% |
| 475 |
\fi |
| 476 |
\endgroup |
| 477 |
}%%end of \hashedwedgebond |
| 478 |
% \end{macrocode} |
| 479 |
% \end{macro} |
| 480 |
% |
| 481 |
% The inner macro |\bond@shorten| works in the macros |\hasheddashbond| and |\hashedwedgebond| for |
| 482 |
% shortening the resulting hashed bonds. This macro calculates the coordinates of the staring |
| 483 |
% point and the end point. |
| 484 |
% |
| 485 |
% \begin{macro}{bond@shorten} |
| 486 |
% \changes{v4.02}{2004/12/20}{Hashed forms for dash and wedged bonds} |
| 487 |
% \begin{macrocode} |
| 488 |
\def\bond@shorten(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% |
| 489 |
\@tempcntXb=#8\relax |
| 490 |
\@tempcntYb=#9\relax |
| 491 |
\advance\@tempcntXb by-#6\relax \divide\@tempcntXb by\@tempcntzz\relax |
| 492 |
\advance\@tempcntYb by-#7\relax \divide\@tempcntYb by\@tempcntzz\relax |
| 493 |
\advance\@tempcntXb by#6\relax |
| 494 |
\advance\@tempcntYb by#7\relax |
| 495 |
\@tempcntXc=#8\relax |
| 496 |
\@tempcntYc=#9\relax |
| 497 |
\advance\@tempcntXc by-#6\relax \divide\@tempcntXc by\@tempcntzzz\relax |
| 498 |
\advance\@tempcntYc by-#7\relax \divide\@tempcntYc by\@tempcntzzz\relax |
| 499 |
\advance\@tempcntXc by#8\relax |
| 500 |
\advance\@tempcntYc by#9\relax |
| 501 |
}%%end of \bondshorten |
| 502 |
% \end{macrocode} |
| 503 |
% \end{macro} |
| 504 |
% |
| 505 |
% Skeletal bold bonds can be changed into wedges, where |
| 506 |
% |\WedgeAsSubst| is described in an ATOMLIST as a kind of |
| 507 |
% spiro substituent. |
| 508 |
% |
| 509 |
% \begin{macro}{WedgeAsSubst} |
| 510 |
% \changes{v4.02}{2004/12/20}{Wedged skeletal bonds} |
| 511 |
% \begin{macrocode} |
| 512 |
\def\WedgeAsSubstPS(#1,#2)(#3,#4)#5{% |
| 513 |
\begingroup |
| 514 |
\@thicklineswtrue \@wedgeswtrue |
| 515 |
\molfrontfalse \@skbondlistfalse |
| 516 |
\Put@@@Line(#1,#2)(#3,#4){#5}% |
| 517 |
\endgroup} |
| 518 |
\let\WedgeAsSubst=\WedgeAsSubstPS%for compatibility to PDF mode |
| 519 |
% \end{macrocode} |
| 520 |
% \end{macro} |
| 521 |
% |
| 522 |
% The macro |\stereo@wedgedimensionX| has a starting point, |
| 523 |
% an endpoint, and the width of a wedge as its arguments. |
| 524 |
% Compare this command with |\stereo@wedgedimension|, which has |
| 525 |
% a starting point, a slope, and the width of a wedge |
| 526 |
% as its arguments. |
| 527 |
% |
| 528 |
% \begin{macro}{stereo@wedgedimensionX} |
| 529 |
% \changes{v5.01}{2013/05/27}{dimension of wedge} |
| 530 |
% \begin{macrocode} |
| 531 |
\def\stereo@wedgedimensionX(#1,#2)(#3,#4){% |
| 532 |
\@ifnextchar[{\stereo@@wedgedimensionX(#1,#2)(#3,#4)}% |
| 533 |
{\stereo@@wedgedimensionX(#1,#2)(#3,#4)[10]}} |
| 534 |
\def\stereo@@wedgedimensionX(#1,#2)(#3,#4)[#5]{% |
| 535 |
\@tempcnta=-#1\relax |
| 536 |
\advance\@tempcnta by#3\relax |
| 537 |
%%\typeout{KKK:\the\@tempcnta}% |
| 538 |
\@tempcntb=-#2\relax |
| 539 |
\advance\@tempcntb by#4\relax |
| 540 |
%%%\typeout{LLL:\the\@tempcntb}% |
| 541 |
\stereo@wedgedimension(\the\@tempcnta,\the\@tempcntb){#5}% |
| 542 |
%%%\typeout{MMM; (\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)} |
| 543 |
\advance\@tempcntXb by#3\relax |
| 544 |
\advance\@tempcntYb by#4\relax |
| 545 |
\advance\@tempcntXc by#3\relax |
| 546 |
\advance\@tempcntYc by#4\relax} |
| 547 |
% \end{macrocode} |
| 548 |
% \end{macro} |
| 549 |
% |
| 550 |
% The macro |\WedgeAsSubstX| has a starting point, |
| 551 |
% an endpoint, and the width of a wedge as its arguments. |
| 552 |
% Compare this command with |\WedgeAsSubst|, which has |
| 553 |
% a starting point, a slope, and the width of a wedge |
| 554 |
% as its arguments. |
| 555 |
% |
| 556 |
% \begin{macro}{WedgeAsSubstX} |
| 557 |
% \changes{v5.01}{2013/05/27}{Wedged skeletal bonds} |
| 558 |
% \begin{macrocode} |
| 559 |
\def\WedgeAsSubstXPS(#1,#2)(#3,#4){% |
| 560 |
\@ifnextchar[{\Wedge@AsSubstXPS(#1,#2)(#3,#4)}% |
| 561 |
{\Wedge@AsSubstXPS(#1,#2)(#3,#4)[10]}}% |
| 562 |
\def\Wedge@AsSubstXPS(#1,#2)(#3,#4)[#5]{% |
| 563 |
\begingroup |
| 564 |
\stereo@wedgedimensionX(#1,#2)(#3,#4)[#5]% |
| 565 |
\pspolygon*[unit=\unitlength](#1,#2)% |
| 566 |
(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% |
| 567 |
\endgroup} |
| 568 |
\let\WedgeAsSubstX=\WedgeAsSubstXPS%for compatibility to PDF mode |
| 569 |
% \end{macrocode} |
| 570 |
% \end{macro} |
| 571 |
% |
| 572 |
% Skeletal hashed dash bonds can be changed into hashed wedges, where |
| 573 |
% |\HashWedgeAsSubst| is described in an ATOMLIST as a kind of |
| 574 |
% spiro substituent. |
| 575 |
% |
| 576 |
% \begin{macro}{HashWedgeAsSubst} |
| 577 |
% \changes{v4.02}{2004/12/20}{Hashed Wedged skeletal bonds} |
| 578 |
% \changes{v5.01}{2011/02/24}{Coloring atoms and bonds} |
| 579 |
% \begin{macrocode} |
| 580 |
\def\HashWedgeAsSubstPS(#1,#2)(#3,#4)#5{% |
| 581 |
\begingroup |
| 582 |
\@thicklineswtrue \@wedgeswtrue |
| 583 |
\molfrontfalse \@skbondlistfalse |
| 584 |
\Put@@@Line(#1,#2)(#3,#4){#5}% |
| 585 |
%%x-coordinate |
| 586 |
\@tempcntXa=0\relax |
| 587 |
\ifnum#3>0\relax \@tempcntXa=#5\relax |
| 588 |
\advance\@tempcntXa by-10\relax |
| 589 |
\else\ifnum#3<0\relax\@tempcntXa=-#5\relax\fi\fi |
| 590 |
\advance\@tempcntXa by#1\relax |
| 591 |
%%y-coordinate |
| 592 |
\@tempcntYa=#5\relax |
| 593 |
\advance\@tempcntYa by-10\relax |
| 594 |
\ifnum#3=0\relax\else |
| 595 |
\multiply\@tempcntYa by#4\relax\multiply\@tempcntYa by10\relax |
| 596 |
\divide\@tempcntYa by#3\relax\divide\@tempcntYa by10\relax\fi |
| 597 |
\ifnum\@tempcntYa<0\relax |
| 598 |
\ifnum#4>0\relax\@tempcntYa=-\@tempcntYa\fi |
| 599 |
\else |
| 600 |
\ifnum\@tempcntYa>0\relax |
| 601 |
\ifnum#4<0\relax\@tempcntYa=-\@tempcntYa\fi\fi |
| 602 |
\fi |
| 603 |
\advance\@tempcntYa by#2\relax |
| 604 |
\ifdim\unitlength>0.08pt |
| 605 |
\psline[unit=\unitlength,% |
| 606 |
linewidth=5pt,linestyle=dashed,dash=0.8pt 1pt,linecolor=white]% |
| 607 |
%%(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% |
| 608 |
(#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% |
| 609 |
\else |
| 610 |
\psline[unit=\unitlength,% |
| 611 |
linewidth=3pt,linestyle=dashed,dash=0.6pt 0.8pt,linecolor=white]% |
| 612 |
%%(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% |
| 613 |
(#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% |
| 614 |
\fi |
| 615 |
\endgroup |
| 616 |
}%%end of \HashWedgeAsSubstPS |
| 617 |
\let\HashWedgeAsSubst=\HashWedgeAsSubstPS%for compatibility to PDF mode |
| 618 |
% \end{macrocode} |
| 619 |
% \end{macro} |
| 620 |
% |
| 621 |
% The macro |\HashWedgeAsSubstX| has a starting point, |
| 622 |
% an endpoint, and the width of a wedge as its arguments. |
| 623 |
% Compare this command with |\HashWedgeAsSubst|, which has |
| 624 |
% a starting point, a slope, and the width of a wedge |
| 625 |
% as its arguments. |
| 626 |
% |
| 627 |
% \begin{macro}{HashWedgeAsSubstX} |
| 628 |
% \changes{v5.01}{2013/05/27}{Hashed Wedged skeletal bonds} |
| 629 |
% \begin{macrocode} |
| 630 |
\def\HashWedgeAsSubstXPS(#1,#2)(#3,#4){% |
| 631 |
\@ifnextchar[{ |
| 632 |
\HashWedge@sSubstXPS(#1,#2)(#3,#4)}% |
| 633 |
{\HashWedge@sSubstXPS(#1,#2)(#3,#4)[10]}} |
| 634 |
\def\HashWedge@sSubstXPS(#1,#2)(#3,#4)[#5]{% |
| 635 |
\begingroup |
| 636 |
\Wedge@AsSubstXPS(#1,#2)(#3,#4)[#5]% |
| 637 |
\ifdim\unitlength>0.08pt |
| 638 |
\@tempdima=#5\unitlength \multiply\@tempdima by3\relax |
| 639 |
\advance\@tempdima by1pt%adjustment |
| 640 |
\psline[unit=\unitlength,% |
| 641 |
linewidth=\@tempdima,% |
| 642 |
linestyle=dashed,dash=0.8pt 1pt,linecolor=white]% |
| 643 |
(#1,#2)(#3,#4)% |
| 644 |
\else |
| 645 |
\@tempdima=#5\unitlength \multiply\@tempdima by3 |
| 646 |
\psline[unit=\unitlength,% |
| 647 |
linewidth=\@tempdima,% |
| 648 |
linestyle=dashed,dash=0.6pt 0.8pt,linecolor=white]% |
| 649 |
(#1,#2)(#3,#4)% |
| 650 |
\fi |
| 651 |
\endgroup |
| 652 |
}%%end of \HashWedgeAsSubstXPS |
| 653 |
\let\HashWedgeAsSubstX=\HashWedgeAsSubstXPS%for compatibility to PDF mode |
| 654 |
% \end{macrocode} |
| 655 |
% \end{macro} |
| 656 |
% |
| 657 |
% Skeletal bold bonds can be changed into wavy bonds, where |
| 658 |
% |\WavyAsSubst| is described in an ATOMLIST as a kind of |
| 659 |
% spiro substituent. |
| 660 |
% |
| 661 |
% \begin{macro}{\WavyAsSubst} |
| 662 |
% \changes{v5.01}{2004/06/21}{For PDF mode: Wavy skeletal bonds} |
| 663 |
% \begin{macrocode} |
| 664 |
\def\WavyAsSubstPS(#1,#2)(#3,#4)#5{% |
| 665 |
\begingroup |
| 666 |
\wavebondtrue |
| 667 |
\Put@@@Line(#1,#2)(#3,#4){#5}% |
| 668 |
\endgroup} |
| 669 |
\let\WavyAsSubst=\WavyAsSubstPS%for compatibility to PDF mode |
| 670 |
% \end{macrocode} |
| 671 |
% \end{macro} |
| 672 |
% |
| 673 |
% The macro |\WavyAsSubstX| has a starting point, |
| 674 |
% an endpoint, and the width of a wedge as its arguments. |
| 675 |
% Compare this command with |\WavyAsSubst|, which has |
| 676 |
% a starting point, a slope, and the width of a wedge |
| 677 |
% as its arguments. |
| 678 |
% |
| 679 |
% \begin{macro}{WedgeAsSubstX} |
| 680 |
% \changes{v5.01}{2013/06/21}{For PDF mode: Checked OK} |
| 681 |
% \begin{macrocode} |
| 682 |
\def\WavyAsSubstXPS(#1,#2)(#3,#4){% |
| 683 |
\pszigzag[unit=\unitlength,% |
| 684 |
%linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 685 |
coilheight=1,coilwidth=.13cm,linewidth=\thinLineWidth,linearc=5,% |
| 686 |
coilarm=0]{-}(#3,#4)(#1,#2)% |
| 687 |
} |
| 688 |
\let\WavyAsSubstX=\WavyAsSubstXPS%for compatibility to PDF mode |
| 689 |
% \end{macrocode} |
| 690 |
% \end{macro} |
| 691 |
% |
| 692 |
% The macro |\PUT@@@bondLINE| is used to draw a bond line. |
| 693 |
% This macro relies on the pstricks package. |
| 694 |
% |
| 695 |
% \begin{macro}{\PUT@@@bondLINE} |
| 696 |
% \begin{macro}{\PutPSLine} |
| 697 |
% \changes{v5.00}{2010/10/01}{For compatibility to PDF mode: macro for |
| 698 |
% drawing a straight-line bond after adjusting its joint position} |
| 699 |
% \changes{v5.01}{2011/02/24}{Coloring atoms and bonds} |
| 700 |
% \begin{macrocode} |
| 701 |
\def\PUT@@@bondLINE(#1,#2)(#3,#4)#5{% |
| 702 |
\begingroup |
| 703 |
\psline[unit=\unitlength,% |
| 704 |
%linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 705 |
linewidth=#5](#1,#2)(#3,#4)% |
| 706 |
\endgroup |
| 707 |
} |
| 708 |
\let\PutPSLine=\PUT@@@bondLINE%for user's use |
| 709 |
\let\PutBondLine=\PUT@@@bondLINE%for compatibility to PDF |
| 710 |
% \end{macrocode} |
| 711 |
% \end{macro} |
| 712 |
% \end{macro} |
| 713 |
% |
| 714 |
% The macro |\PUT@@@dashedLINE| is used to draw a dashed bond line, |
| 715 |
% which usually links two non-adjacent atoms of a cyclic compound. |
| 716 |
% This macro relies on the pstrick package. |
| 717 |
% |
| 718 |
% \begin{macro}{\PUT@@@dashedLINE} |
| 719 |
% \begin{macro}{\PutPSdashed} |
| 720 |
% \begin{macro}{\PutDashedBond} |
| 721 |
% \changes{v5.00}{2010/10/01}{For PS mode} |
| 722 |
% \changes{v5.01}{2011/02/24}{Coloring atoms and bonds} |
| 723 |
% \begin{macrocode} |
| 724 |
\def\PUT@@@dashedLINE(#1,#2)(#3,#4)#5{% |
| 725 |
\begingroup |
| 726 |
\ifdim\unitlength>0.08pt |
| 727 |
\psline[unit=\unitlength,% |
| 728 |
%linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 729 |
linewidth=#5,linestyle=dashed,dash=1pt 1.2pt]% |
| 730 |
(#1,#2)(#3,#4)% |
| 731 |
\else |
| 732 |
\psline[unit=\unitlength,% |
| 733 |
%linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 734 |
linewidth=#5,linestyle=dashed,dash=0.8pt 1pt]% |
| 735 |
(#1,#2)(#3,#4)% |
| 736 |
\fi |
| 737 |
\endgroup |
| 738 |
} |
| 739 |
\let\PutPSdashed=\PUT@@@dashedLINE%for user's use |
| 740 |
\let\PutDashedBond=\PUT@@@dashedLINE%for compatibility to PDF mode |
| 741 |
% \end{macrocode} |
| 742 |
% \end{macro} |
| 743 |
% \end{macro} |
| 744 |
% \end{macro} |
| 745 |
% |
| 746 |
% The command \cs{downnobond} is redefined for pstricks. |
| 747 |
% \begin{macro}{\upnobond} |
| 748 |
% \begin{macro}{\downnobond} |
| 749 |
% \begin{macrocode} |
| 750 |
%\def\upnobond#1#2{%nochange |
| 751 |
%\hbox{\hbox to0.72em{\hss#1\hss}\kern-0.72em\raise2.2ex\hbox{#2}}} |
| 752 |
\def\downnobond#1#2{% |
| 753 |
\hbox{\smash{\hbox to0.72em{\hss#1\hss}\kern-0.72em\lower2.2ex\hbox{#2}}}} |
| 754 |
% \end{macrocode} |
| 755 |
% \end{macro} |
| 756 |
% \end{macro} |
| 757 |
% |
| 758 |
% |
| 759 |
% The macro |\putRoundArrowPS| throws its main task to its inner |
| 760 |
% macro |\putRound@rrowPS|, which treats an optional argument |
| 761 |
% for specifying the direction of an arrow head. |
| 762 |
% The macro |\putRoundArrow| is defined as a user command to |
| 763 |
% assure the compatibility to the PostScript mode. |
| 764 |
% |
| 765 |
% \begin{macro}{\putRoundArrowPS} |
| 766 |
% \begin{macro}{\putRound@rrowPS} |
| 767 |
% \begin{macro}{\putRoundArrow} |
| 768 |
% \changes{v5.00}{2010/10/01}{For PS mode} |
| 769 |
% \changes{v5.01}{2011/02/24}{Coloring atoms and bonds} |
| 770 |
% \begin{macrocode} |
| 771 |
\def\putRoundArrowPS{% |
| 772 |
\@ifnextchar[{\putRound@rrowPS}{\putRound@rrowPS[->]}} |
| 773 |
\def\putRound@rrowPS[#1]#2{% |
| 774 |
\pscurve[unit=\unitlength,% |
| 775 |
%linecolor=\psbondsubstcolor,%added 2011/02/24 |
| 776 |
linewidth=0.4pt]{#1}#2} |
| 777 |
\let\putRoundArrow=\putRoundArrowPS%for the compatibility to PDF mode |
| 778 |
% \end{macrocode} |
| 779 |
% \end{macro} |
| 780 |
% \end{macro} |
| 781 |
% \end{macro} |
| 782 |
% |
| 783 |
% \begin{macro}{\red etc.} |
| 784 |
% \changes{v5.00}{2010/10/01}{Colors for PS mode} |
| 785 |
% \begin{macrocode} |
| 786 |
\def\red{\color{red}\psset{linecolor=red}} |
| 787 |
\def\blue{\color{blue}\psset{linecolor=blue}} |
| 788 |
\def\green{\color{green}\psset{linecolor=green}} |
| 789 |
\def\black{\color{black}\psset{linecolor=black}} |
| 790 |
\def\cyan{\color{cyan}\psset{linecolor=cyan}} |
| 791 |
\def\yellow{\color{yellow}\psset{linecolor=yellow}} |
| 792 |
\def\magenta{\color{magenta}\psset{linecolor=magenta}} |
| 793 |
\def\white{\color{white}\psset{linecolor=white}} |
| 794 |
% \end{macrocode} |
| 795 |
% \end{macro} |
| 796 |
% |
| 797 |
% \begin{macro}{\xymcolor} |
| 798 |
% \begin{macro}{\redx etc.} |
| 799 |
% These macros are defined to avoid \texttt{**Warning** color stack underflow} |
| 800 |
% during processing by the dvipdfmx converter. |
| 801 |
% \changes{v5.00}{2010/10/01}{Added: Colors for TeX/LaTeX mode} |
| 802 |
% \changes{v5.01}{2011/02/24}{Coloring atoms and bonds} |
| 803 |
% \begin{macrocode} |
| 804 |
\def\xymcolor#1#2{\mbox{\color{#1}\psset{linecolor=#1}#2}} |
| 805 |
%defined in the bondcolor packag |
| 806 |
%\def\redx#1{\xymcolor{red}{#1}} |
| 807 |
%\def\bluex#1{\xymcolor{blue}{#1}} |
| 808 |
%\def\greenx#1{\xymcolor{green}{#1}} |
| 809 |
%\def\blackx#1{\xymcolor{black}{#1}} |
| 810 |
%\def\cyanx#1{\xymcolor{cyan}{#1}} |
| 811 |
%\def\yellowx#1{\xymcolor{yellow}{#1}} |
| 812 |
%\def\magentax#1{\xymcolor{magenta}{#1}} |
| 813 |
%\def\whitex#1{\xymcolor{white}{#1}} |
| 814 |
% \end{macrocode} |
| 815 |
% \end{macro} |
| 816 |
% \end{macro} |
| 817 |
% |
| 818 |
% \begin{macro}{\Color@@@Line} |
| 819 |
% \changes{v5.00}{2010/10/01}{For coloring skeletal bond in PS mode} |
| 820 |
% \changes{v5.01}{2011/02/24}{Coloring atoms and bonds} |
| 821 |
% The last argument (\#7) specifies a line color. |
| 822 |
% This command is used in the definition of |\replaceSKbond| |
| 823 |
% of the \textsf{bondcolor} package by putting \verb/#7=white/. |
| 824 |
% \begin{macro}{\Color@Line} |
| 825 |
% \begin{macrocode} |
| 826 |
\def\Color@@@Line{% |
| 827 |
\@ifnextchar[{\C@lor@@@Line}{\C@lor@@@Line[0.4pt]}} |
| 828 |
\def\C@lor@@@Line[#1](#2,#3)(#4,#5)#6#7{% |
| 829 |
\begingroup |
| 830 |
\SlopetoXY(#2,#3)(#4,#5){#6}%common to \Put@@@Line command |
| 831 |
\psline[unit=\unitlength,% |
| 832 |
linewidth=#1,linecolor=#7] |
| 833 |
(#2,#3)(\the\@tempcntXa,\the\@tempcntYa)% |
| 834 |
\@tempcntXa=0\relax \@tempcntYa=0\relax |
| 835 |
\endgroup}%end of \Color@@@Line |
| 836 |
\let\Color@Line=\Color@@@Line%for compatibility to PDF mode |
| 837 |
% \end{macrocode} |
| 838 |
% \end{macro} |
| 839 |
% \end{macro} |
| 840 |
% |
| 841 |
% \begin{macro}{\BackGroundColor} |
| 842 |
% \changes{v5.01}{2013/08/16}{For coloring skeletal bond in PS mode} |
| 843 |
% This macro is redefined for the PostSript mode. |
| 844 |
% \begin{macrocode} |
| 845 |
\def\BackGroundColor{% |
| 846 |
\definecolor{TempColor}{cmyk}{0,0,0,0}% |
| 847 |
\psset{linecolor=TempColor}} |
| 848 |
% \end{macrocode} |
| 849 |
% \end{macro} |
| 850 |
% |
| 851 |
% The command |\changeunitlength| is redefined for using pstricks. |
| 852 |
% \begin{macro}{\changeunitlength} |
| 853 |
% \begin{macrocode} |
| 854 |
\newif\ifsizereduction\sizereductionfalse |
| 855 |
\def\@@changeunitlength#1{\unitlength=#1\relax |
| 856 |
%%\psset{unit=\unitlength}%delete August 02, 2005 |
| 857 |
\ifdim\unitlength<0.1pt \sizereductiontrue |
| 858 |
\ifdim\unitlength<0.062pt \let\substfontsize=\tiny \else |
| 859 |
\ifdim\unitlength<0.072pt \let\substfontsize=\scriptsize \else |
| 860 |
\ifdim\unitlength<0.082pt \let\substfontsize=\footnotesize |
| 861 |
\fi\fi\fi |
| 862 |
\else \let\substfontsize=\normalsize\fi} |
| 863 |
% \end{macrocode} |
| 864 |
% \end{macro} |
| 865 |
% |
| 866 |
% \begin{macro}{setxymtxps} |
| 867 |
% \changes{v4.02}{2004/12/20}{Added: a switch for wedged bonds} |
| 868 |
% \begin{macrocode} |
| 869 |
\def\setxymtxps{% |
| 870 |
\@ifnextchar[{\@setxymtxps}{\@setxymtxps[0.1pt]}} |
| 871 |
\def\@setxymtxps[#1]{% |
| 872 |
\PSmodetrue |
| 873 |
\let\sfpicture=\picture |
| 874 |
\let\endsfpicture=\endpicture |
| 875 |
\let\thicklines=\Thick@Lines |
| 876 |
\let\thinlines=\Thin@Lines |
| 877 |
\let\Put@Line=\Put@@@Line |
| 878 |
\let\Color@Line=\Color@@@Line%for compatibility to PDF mode |
| 879 |
\let\Put@Direct=\Put@@@Direct |
| 880 |
\let\Put@oCircle=\Put@@@oCircle |
| 881 |
\let\Put@sCircle=\Put@@@sCircle |
| 882 |
\let\dotorline=\d@@t@rline |
| 883 |
\let\WedgeAsSubst=\WedgeAsSubstPS%for compatibility to PDF mode |
| 884 |
\let\HashWedgeAsSubst=\HashWedgeAsSubstPS%for compatibility to PDF mode |
| 885 |
\let\PutBondLine=\PUT@@@bondLINE%for compatibility to PDF |
| 886 |
\let\PutDashedBond=\PUT@@@dashedLINE%for compatibility to PDF mode |
| 887 |
\let\putRoundArrow=\putRoundArrowPS%for the compatibility to PDF mode |
| 888 |
\let\changeunitlength=\@@changeunitlength |
| 889 |
\changeunitlength{#1}% |
| 890 |
\wedgehasheddash% |
| 891 |
} |
| 892 |
\setxymtxps |
| 893 |
%</xymtxps> |
| 894 |
% \end{macrocode} |
| 895 |
% \end{macro} |
| 896 |
% |
| 897 |
% \Finale |
| 898 |
% |
| 899 |
\endinput |