diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/xymtex/xymtxpdf |
Initial commit
Diffstat (limited to 'macros/latex/contrib/xymtex/xymtxpdf')
-rw-r--r-- | macros/latex/contrib/xymtex/xymtxpdf/chmst-pdf.dtx | 1493 | ||||
-rw-r--r-- | macros/latex/contrib/xymtex/xymtxpdf/chmst-pdf.ins | 44 | ||||
-rw-r--r-- | macros/latex/contrib/xymtex/xymtxpdf/chmst-pdf.sty | 691 | ||||
-rw-r--r-- | macros/latex/contrib/xymtex/xymtxpdf/xymtx-pdf.dtx | 1362 | ||||
-rw-r--r-- | macros/latex/contrib/xymtex/xymtxpdf/xymtx-pdf.ins | 58 | ||||
-rw-r--r-- | macros/latex/contrib/xymtex/xymtxpdf/xymtx-pdf.sty | 687 |
6 files changed, 4335 insertions, 0 deletions
diff --git a/macros/latex/contrib/xymtex/xymtxpdf/chmst-pdf.dtx b/macros/latex/contrib/xymtex/xymtxpdf/chmst-pdf.dtx new file mode 100644 index 0000000000..967e3b73c1 --- /dev/null +++ b/macros/latex/contrib/xymtex/xymtxpdf/chmst-pdf.dtx @@ -0,0 +1,1493 @@ +% \iffalse +% +% chmst-pdf.dtx +% +% Copyright (C) 2010 by Shinsaku Fujita All rights reserved. +% +% ======================================== +% +% Modified from the following previous packages: +% +% chemist.dtx +% Copyright (C) 1996, 1999, 2000 by Shinsaku Fujita All rights reserved +% and +% chmst-ps.dtx +% Copyright (C) 2002, 2004, 2009, 2010 by Shinsaku Fujita All rights reserved +% +% in order to utilize pgf. +% +% This file is part of the ChemSci system +% ======================================== +% +% This style file is created for submitting a manuscript to +% scientific journals. This style file is to be contained in the +% ``chemist'' directory which is an input directory for TeX. +% +% For using this file, see +% Shinsaku Fujita, ``LaTeX for Chemists and Biochemists'' +% Tokyo Kagaku Dojin, Tokyo (1993), Chapter 16. +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% The Current Maintainer of this work is Shinsaku Fujita. +% +% This work consists of the files chmst-ps.dtx and chmst-ps.ins +% and the derived file chmst-ps.sty. +% +% Please report any bugs, comments, suggestions, etc. to: +% Shinsaku Fujita, +% Shonan Institute of Chemoinformatics and +% Mathematical Chemistry +% fujita-sicimc@nifmail.jp +% +%======================================= +% +% This file is a successor to: +% +% ********************************************************************* +% * chemist.sty <Sept 29 1991> by Shinsaku Fujita * +% * counters and related matters for compounds. * +% * ffboxit: November 2 1991 by S. Fujita * +% * bslskipchange: November 6 1991 by S. Fujita (deleted) * +% * chapinitial: 1991 November 7 by S. Fujita * +% * variable arrows: 1992 May 24 by S. Fujita * +% * reaction and scheme arrows (revised): 1992 May 24 by S. Fujita * +% * changespace <=== bslskipchange: Dec 31 1992 by S. Fujita * +% * (g)rshfboxit and (g)lshfboxit: January 3, 1993 by S. Fujita * +% ********************************************************************* +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Released on January 3, 1993 +% Copyright (C) 1993 by Shinsaku Fujita, all rights reserved. +% This style file is created for making manuscripts of chemical fields. +% This option style file is to be contained in the ``chemist'' directory +% which is an input directory for TeX. +% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{chemist} +% \def\versi@ndate{January 03, 1993} +% \def\versi@nno{ver1.00} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Version 1.01 +% --- added the end commands of the \verbatim environment and the +% \verb command contained in LaTeX 2.09 +% --- \LaTeX, \BibTeX logos etc improved +% \typeout{verbatim for LaTeX2.09 (and LaTeX2e) in chemist.sty} +% \typeout{logos for LaTeX2.09 (and LaTeX2e) in chemist.sty} +% \def\versi@ndate{April 20, 1996} +% \def\j@urnalname{chemist} +% \def\versi@ndate{April 20, 1996} +% \def\versi@nno{ver1.01} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{chemist} \def\journalID{chemist} +% \def\versi@ndate{June 15, 1996} +% \def\versi@nno{ver1.01a} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% \typeout{Package `\j@urnalname' (\versi@nno) <\versi@ndate>\space +% [\copyrighth@lder]} +% \typeout{chemist.sty ver1.01a (for LaTeX2e) 1996/06/15[SF]} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{chemist} \def\journalID{chemist} +% \def\versi@ndate{March 16, 1999} +% \def\versi@nno{ver2.00} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{chemist} \def\journalID{chemist} +% \def\versi@ndate{November 3, 2000} +% \def\versi@nno{ver2.00a} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{chmst-ps} \def\journalID{chmst-ps} +% \def\versi@ndate{May 30, 2002} +% \def\versi@nno{ver1.00} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{chmst-ps} \def\journalID{chmst-ps} +% \def\versi@ndate{August 30, 2004} +% \def\versi@nno{ver1.01} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{chmst-ps} \def\journalID{chmst-ps} +% \def\versi@ndate{November 08, 2009} +% \def\versi@nno{ver1.02} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{chmst-ps} \def\journalID{chmst-ps} +% \def\versi@ndate{November 26, 2009} +% \def\versi@nno{ver1.03} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% +% \fi +% \CheckSum{1429} +%% \CharacterTable +%% {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 +%% 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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +% \iffalse +%% +%% `chmst-ps.dtx' ver1.00 (for LaTeX2e) 2002/05/30 +%% `chmst-ps.dtx' ver1.01 (for LaTeX2e) 2004/08/30 +%% `chmst-ps.dtx' ver1.02 (for LaTeX2e) 2009/11/08 +%% `chmst-ps.dtx' ver1.03 (for LaTeX2e) 2009/11/26 +%% `chmst-ps.dtx' ver5.00 (for LaTeX2e) 2010/10/01 +%% by Shinsaku Fujita +%% +% +% \section{Initial declaration} +% +% \changes{v1.00}{2002/05/30}{First Version} +% \changes{v1.01}{2004/08/30}{2nd Version} +% \changes{v1.02}{2009/11/08}{3rd Version} +% \changes{v1.03}{2009/11/26}{4th Version, harpoons} +% \changes{v5.00}{2010/10/01}{For LaTeX Project Public License} +% +% \begin{macrocode} +% \NeedsTeXFormat{LaTeX2e} +% \end{macrocode} +% +% \begin{macrocode} +% <chmstpdf>\ProvidesFile{chmst-ps.sty} +%<driver>\ProvidesFile{chmst-ps.drv} +%<driver> [2010/10/01 v5.00 +% <chmstpdf> ChemSci package ] +%<driver> ChemSci package driver (English) +% \end{macrocode} +% +%\setcounter{StandardModuleDepth}{1} +% +% \section{Driver file for this dtx file} +% +% \begin{macrocode} +%<*driver> + ] +\documentclass{ltxdoc} +\GetFileInfo{chmst-pdf.drv} +\title{The chmst-pdf Package \space\fileversion \\ +(Part of the XyMTeX/ChemSci package v5.00)} +\author{Shinsaku Fujita \\ +Shonan Institute of Chemoinformatics and +Mathematical Chemistry \\ +Ashigara-Kami-Gun, Kanagawa, 258-0019 Japan +%% Department of Chemistry and Materials Technology \\ +%% Kyoto Institute of Technology \\ +%% Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan +%% (old address) +%% Ashigara Research Laboratories \\ +%% Fuji Photo Film Co. Ltd. +} +\date{\filedate} +\begin{document} +\maketitle +\tableofcontents +\DocInput{chmst-pdf.dtx} +\end{document} +%</driver> +% \end{macrocode} +% +% \fi +% +% \StopEventually{} +% +% \section{{\sc docstrip} options} +% +% This dtx file provides the {\sffamily chmst-pdf} package +% by docstrip processing. +% +% \DeleteShortVerb{\|} +% \begin{center} +% \begin{tabular}{|l|l|} +% \hline +% argument & package name \\ +% \hline +% chmstpdf & chmst-pdf.sty \\ +% driver & a documentation driver file \\ +% \hline +% \end{tabular} +% \end{center} +% \MakeShortVerb{\|} +% +% \section{Version information} +% +% The old process for typing out version information remains active. +% \begin{macrocode} +%<chmstpdf>\def\j@urnalname{chmst-pdf} \def\journalID{chmst-pdf} +\def\versi@ndate{October 01, 2010} +\def\versi@nno{ver5.00} +\def\copyrighth@lder{SF} % Shinsaku Fujita +%<*chmstpdf> +\typeout{Package `\j@urnalname' (\versi@nno) <\versi@ndate>\space +[\copyrighth@lder]} +\typeout{chmst-pdf.sty ver5.00 (for LaTeX2e) 2010/10/01[SF]} +%</chmstpdf> +% \end{macrocode} +% +% \begin{macrocode} +%<*chmstpdf> +\@ifundefined{if@@@chemtimes}{\newif\if@@@chemtimes}{} +\@ifundefined{if@@chemtimes}{\newif\if@@chemtimes}{}%from chemtimes +\DeclareOption{chemtimes}{\@@@chemtimestrue} +\@@@chemtimesfalse +\ProcessOptions +\if@@@chemtimes\if@@chemtimes\else + \PackageError{chmst-pdf} + {The option ``chemtimes'' is not permitted} + {You should use this option after the chemtimes package is loaded.} +\fi\fi +\if@@@chemtimes +\RequirePackage[chemtimes]{chemist}% +\else +\RequirePackage{chemist}% +\fi +\RequirePackage{xymtx-pdf}% +% \end{macrocode} +% +% \section{Cross-references of compounds} +% (Deleted) +% \section{Boxes for placing compounds} +% (Deleted) +% \section{Arrows} +% \subsection{Arrows with variable length} +% (Deleted) +% \subsection{Reaction arrows with variable length} +% +% The {\sffamily chmst-pdf} package defines arrows with variable length +% for drawing chemical equations, where additional information +% can be written on the upper and/or downward sides of each arrow. +% \changes{v1.00}{2002/05/30}{First Version for PostScript mode} +% \changes{v5.00}{2010/10/01}{For PDF mode} +% +% Several elements for drawing horizontal reaction arrows within the scope of +% pstricks package are defined first. +% +% \begin{macro}{\rArrow@Element} +% \begin{macro}{\lArrow@Element} +% \begin{macro}{\lrArrow@Element} +% \begin{macro}{\eqArrow@Element} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\newdimen\@tempdimX +\newdimen\@tempdimY +\def\rArrow@Element#1{\begingroup\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[>=stealth,->,line width=0.4pt]% +(0pt,0pt) coordinate (X) (0pt,0.28em) -- (#1,0.28em);}% +\hss}\endgroup} +\let\Arrow@Element=\rArrow@Element +\def\lArrow@Element#1{\begingroup\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[stealth-,line width=0.4pt]% +(0pt,0pt) coordinate (X) (0pt,0.28em) -- (#1,0.28em);}% +\hss}\endgroup} +\def\lrArrow@Element#1{\begingroup\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[stealth-stealth,line width=0.4pt]% +(0pt,0pt) coordinate (X) (0pt,0.28em) -- (#1,0.28em);}% +\hss}\endgroup} +\def\eqArrow@Element#1{\begingroup\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(0pt,0.43em) -- (#1,0.43em); +\draw[stealth-,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(0pt,0.13em) -- (#1,0.13em);}% +\hss}\endgroup} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\eqHarpoon@Element} +% \changes{v1.03}{2009/11/26}{Harpoons added as PostScript procedures} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\eqHarpoon@Element#1{\begingroup\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(0pt,0.43em) -- (#1,0.43em); +\draw[left to-,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(0pt,0.13em) -- (#1,0.13em);}% +\hss}\endgroup} +% \end{macrocode} +% \end{macro} +% +% Equilibirum arrows with uneven lengths are defined by using the \verb/\draw/ command +% of the pgf package. +% \changes{v1.02}{2009/11/08}{2nd Version fro PostScript mode (due to PSTricks)} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode (due to pgf)} +% +% \begin{macro}{\reqArrow@Element} +% \begin{macro}{\leqArrow@Element} +% \begin{macrocode} +\def\reqArrow@Element#1{\begingroup% +\dimen1=#1% +\dimen0=\eqlbarrowstretch\dimen1% +\dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax +\dimen2=\dimen1 \advance\dimen2 by\dimen0 +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(0pt,0.43em) -- (#1,0.43em); +\draw[stealth-,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(\the\dimen1,0.13em) -- (\the\dimen2,0.13em);}% +\endgroup} +\def\leqArrow@Element#1{\begingroup% +\dimen1=#1% +\dimen0=\eqlbarrowstretch\dimen1% +\dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax +\dimen2=\dimen1 \advance\dimen2 by\dimen0 +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(\the\dimen1,0.43em) -- (\the\dimen2,0.43em); +\draw[stealth-,line width=0.4pt]% +(0pt,0pt) coordinate (X) (0pt,0.13em) -- (#1,0.13em);}% +\endgroup} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\reqHarpoon@Element} +% \begin{macro}{\leqHarpoon@Element} +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v1.03}{2009/11/26}{Harpoons added as PostScript procedures} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\reqHarpoon@Element#1{\begingroup% +\dimen1=#1% +\dimen0=\eqlbarrowstretch\dimen1% +\dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax +\dimen2=\dimen1 \advance\dimen2 by\dimen0 +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(0pt,0.43em) -- (#1,0.43em); +\draw[left to-,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(\the\dimen1,0.13em) -- (\the\dimen2,0.13em);}% +\endgroup} +\def\leqHarpoon@Element#1{\begingroup% +\dimen1=#1% +\dimen0=\eqlbarrowstretch\dimen1% +\dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax +\dimen2=\dimen1 \advance\dimen2 by\dimen0 +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(\the\dimen1,0.43em) -- (\the\dimen2,0.43em); +\draw[left to-,line width=0.4pt]% +(0pt,0pt) coordinate (X) (0pt,0.13em) -- (#1,0.13em); +}% +\endgroup} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% Each arrow element is used in the following common command for drawing +% horizontal reaction arrows. +% \changes{v1.02}{2009/11/08}{changed definition; +% added \cs{reactarrowsep} and \cs{reactarrowseprate}} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% +% \begin{verbatim} +% \reactarrowsep (dimension) for adjusting the two vertical spaces (default value 0pt) +% \reactarrowseprate (string) for adjusting the lower vertical space (default 1.0) +% \end{verbatim} +% +% \begin{macro}{\react@@rlarrow} +% \begin{macrocode} +\newdimen\@tempdimX +\def\react@@rlarrow[#1]#2#3#4#5{\ensuremath{\mathrel{% +\hskip#1\raisebox{#2}{\begingroup\@tempdimX=#3\relax% + \parbox{#3}{\centering + \baselineskip=.8\normalbaselineskip \ChemStrut{#4}\par% + \vskip-0.2\normalbaselineskip\vskip\reactarrowsep% + \noindent + \Arrow@Element{\the\@tempdimX} + \par% + \vskip\reactarrowseprate\reactarrowsep% + \vskip-0.1\normalbaselineskip\ChemStrut{#5}}\endgroup}}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\reactrarrow} +% \begin{macro}{\reactlarrow} +% \begin{macro}{\reactlrarrow} +% \begin{macro}{\reactEqarrow}%2009/11/19 renamed from \verb/\reacteqarrow/ +% \begin{macro}{\reacteqarrow}%2009/11/19 +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% \begin{macrocode} +% ******************* 1991 Oct 4 S. Fujita +% * reaction arrows * Revised 1992 May 24 S.Fujita%1999/02/02 SF +% ******************* Redifined 2002 May 30 S. Fujita for pstricks +% After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita +% +% #1 yoko #2 ue, #3 haba, #4 ya no ue, #5 ya no shita +% +\def\newreactrarrow{% +\@ifnextchar[{\newreact@rarrow}{\newreact@rarrow[0pt]}} +\def\newreact@rarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\rArrow@Element% +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactlarrow{% +\@ifnextchar[{\newreact@larrow}{\newreact@larrow[0pt]}} +\def\newreact@larrow[#1]#2#3#4#5{% +\let\Arrow@Element=\lArrow@Element% +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactlrarrow{% +\@ifnextchar[{\newreact@lrarrow}{\newreact@lrarrow[0pt]}} +\def\newreact@lrarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\lrArrow@Element% +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +%%%%2009/11/19 +\def\newreactEqarrow{% +\@ifnextchar[{\newreact@Eqarrow}{\newreact@Eqarrow[0pt]}} +\def\newreact@Eqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\eqArrow@Element% +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreacteqarrow{% +\@ifnextchar[{\newreact@eqarrow}{\newreact@eqarrow[0pt]}} +\def\newreact@eqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\eqHarpoon@Element% +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +%\let\reactrarrow=\newreactrarrow +%\let\reactlarrow=\newreactlarrow +%\let\reactlrarrow=\newreactlrarrow +%\let\reactEqarrow=\newreactEqarrow +%\let\reacteqarrow=\newreacteqarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\reactREqarrow}%%renamed 2009/11/19 +% \begin{macro}{\reactLEqarrow}%%renamed 2009/11/19 +% \begin{macro}{\reactreqarrow} +% \begin{macro}{\reactleqarrow} +% +% These commands have been added for the XyMTeX version 4.05. +% The {\sffamily chemist} package additionally defines arrows with variable length +% for drawing chemical equilibrium, where additional information +% can be written on the upper and/or downward sides of each arrow. +% The length of either one of arrows can be reduced by \verb/\eqlbarrowstretch/. +% +% \changes{v4.05}{2009/11/08}{added \cs{reactreqarrow} and \cs{reactleqarrow}} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% +% \begin{macrocode} +\def\newreactREqarrow{% +\@ifnextchar[{\newreact@REqarrow}{\newreact@REqarrow[0pt]}} +\def\newreact@REqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\reqArrow@Element +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactLEqarrow{% +\@ifnextchar[{\newreact@LEqarrow}{\newreact@LEqarrow[0pt]}} +\def\newreact@LEqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\leqArrow@Element +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +\def\newreactreqarrow{% +\@ifnextchar[{\newreact@reqarrow}{\newreact@reqarrow[0pt]}} +\def\newreact@reqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\reqHarpoon@Element +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactleqarrow{% +\@ifnextchar[{\newreact@leqarrow}{\newreact@leqarrow[0pt]}} +\def\newreact@leqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\leqHarpoon@Element +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +%\let\reactREqarrow=\newreactREqarrow +%\let\reactLEqarrow=\newreactLEqarrow +%\let\reactreqarrow=\newreactreqarrow +%\let\reactleqarrow=\newreactleqarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% Several elements for drawing vertical reaction arrows within the scope of +% pstricks package are defined first. +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% +% \begin{macro}{\dArrow@Element} +% \begin{macro}{\uArrow@Element} +% \begin{macro}{\veqArrow@Element} +% \begin{macro}{\duArrow@Element} +% \begin{macrocode} +\def\dArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(0pt,#1) coordinate (X) -- (0pt,0pt);}} +\def\uArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[stealth-,line width=0.4pt]% +(0pt,#1) coordinate (X) -- (0pt,0pt);}} +\def\veqArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(-0.15em,#1) -- (-0.15em,0pt); +\draw[stealth-,line width=0.4pt]% +(0.15em,#1) -- (0.15em,0pt);}} +\def\duArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[stealth-stealth,line width=0.4pt]% +(0pt,#1) coordinate (X) -- (0pt,0pt);}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\veqHarpoon@Element} +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v1.03}{2009/11/26}{Harpoons added as PostScript procedures} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\veqHarpoon@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(-0.15em,#1) -- (-0.15em,0pt); +\draw[left to-,line width=0.4pt]% +(0.15em,#1) -- (0.15em,0pt);}} +% \end{macrocode} +% \end{macro} +% +% Each arrow element is used in the following common command for drawing +% vertical reaction arrows. +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% +% \begin{macro}{\react@@duarrow} +% \begin{macrocode} +\def\react@@duarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{% +\@tempdimY=#3\def\arraystretch{0.8}% +\begin{tabular}{l}#4\end{tabular}% +{\tabcolsep=0pt\begin{tabular}{c}% +\Arrow@Element{\the\@tempdimY}% +\end{tabular}}% +\begin{tabular}{l}#5\end{tabular}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\reactdarrow} +% \begin{macro}{\reactuarrow} +% \begin{macro}{\reactduarrow} +% \begin{macro}{\reactVEqarrow}%%renamed 2009/11/19 +% \begin{macro}{\reactveqarrow}%%renamed 2009/11/19 +% Vertical reaction arrows has been added. +% \changes{v1.00}{2002/05/30}{First Version} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% \begin{macrocode} +\def\newreactdarrow{% +\@ifnextchar[{\newreact@darrow}{\newreact@darrow[0pt]}} +\def\newreact@darrow[#1]#2#3#4#5{% +\let\Arrow@Element=\dArrow@Element +\react@@duarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactuarrow{% +\@ifnextchar[{\newreact@uarrow}{\newreact@uarrow[0pt]}} +\def\newreact@uarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\uArrow@Element +\react@@duarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactduarrow{% +\@ifnextchar[{\newreact@duarrow}{\newreact@duarrow[0pt]}} +\def\newreact@duarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\duArrow@Element +\react@@duarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +\def\newreactVEqarrow{% +\@ifnextchar[{\newreact@VEqarrow}{\newreact@VEqarrow[0pt]}} +\def\newreact@VEqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\veqArrow@Element +\react@@duarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactveqarrow{% +\@ifnextchar[{\newreact@veqarrow}{\newreact@veqarrow[0pt]}} +\def\newreact@veqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\veqHarpoon@Element +\react@@duarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +%\let\reactdarrow=\newreactdarrow +%\let\reactuarrow=\newreactuarrow +%\let\reactduarrow=\newreactduarrow +%\let\reactVEqarrow=\newreactVEqarrow +%\let\reactveqarrow=\newreactveqarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% Several elements for drawing down-sloped reaction arrows within the scope of +% pgf package are defined first. +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% +% \begin{macro}{\seArrow@Element} +% \begin{macrocode} +\def\seArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(0pt,#1) coordinate (X) -- (#1,0pt);}} +\def\nwArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[stealth-,line width=0.4pt]% +(0pt,#1) coordinate (X) -- (#1,0pt);}} +% \end{macrocode} +% \end{macro} +% +% Each arrow element is used in the following common command for drawing +% down-sloped reaction arrows. +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% +% \begin{macro}{\react@@decrarrow} +% \begin{macrocode} +\def\react@@decrarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{% +\@tempdimX=#3\divide\@tempdimX by2\relax +\@tempdimY=#3\relax\def\arraystretch{0.8}% +\begin{tabular}{l}#4\end{tabular}\kern1em% +{\tabcolsep=0pt\begin{tabular}{c} +\Arrow@Element{\the\@tempdimY}% +\end{tabular}}\kern1em% +\begin{tabular}{l}#5\end{tabular}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\reactsearrow} +% \begin{macro}{\reactnwrarrow} +% Further reaction arrows have been added. +% \changes{v1.00}{2002/05/30}{First Version for PostScript} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% \begin{macrocode} +\def\newreactsearrow{% +\@ifnextchar[{\newreact@searrow}{\newreact@searrow[0pt]}} +\def\newreact@searrow[#1]#2#3#4#5{% +\let\Arrow@Element=\seArrow@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactnwarrow{% +\@ifnextchar[{\newreact@nwarrow}{\newreact@nwarrow[0pt]}} +\def\newreact@nwarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\nwArrow@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +%\let\reactsearrow=\newreactsearrow +%\let\reactnwarrow=\newreactnwarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% Several elements for drawing up-sloped reaction arrows within the scope of +% pgf package are defined first. +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% +% \begin{macro}{\neArrow@Element} +% \begin{macrocode} +\def\neArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(0pt,0pt) coordinate (X) -- (#1,#1);}} +\def\swArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[stealth-,line width=0.4pt]% +(0pt,0pt) coordinate (X) -- (#1,#1);}} +% \end{macrocode} +% \end{macro} +% +% Each arrow element is used in the following common command for drawing +% up-sloped reaction arrows. +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% +% \begin{macro}{\react@@incrarrow} +% \begin{macrocode} +\def\react@@incrarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{% +\@tempdimX=#3 \divide\@tempdimX by2 +\@tempdimY=#3% +\def\arraystretch{0.8}% +\begin{tabular}{l}#4\end{tabular}\kern1em% +{\tabcolsep=0pt +\begin{tabular}{c} +\Arrow@Element{\the\@tempdimY}% +\end{tabular}}\kern1em% +\begin{tabular}{l}#5\end{tabular}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\reactnearrow} +% \begin{macro}{\reactswarrow} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% \begin{macrocode} +\def\newreactnearrow{% +\@ifnextchar[{\newreact@nearrow}{\newreact@nearrow[0pt]}} +\def\newreact@nearrow[#1]#2#3#4#5{% +\let\Arrow@Element=\neArrow@Element +\react@@incrarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactswarrow{% +\@ifnextchar[{\newreact@swarrow}{\newreact@swarrow[0pt]}} +\def\newreact@swarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\swArrow@Element +\react@@incrarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +%\let\reactnearrow=\newreactnearrow +%\let\reactswarrow=\newreactswarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% Additional elements for drawing down- and up-sloped equilibrium arrows within the scope of +% pgf package are defined first. +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% +% \begin{macro}{\deqArrow@Element} +% \begin{macro}{\ueqArrow@Element} +% \begin{macrocode} +\def\deqArrow@Element#1{% +\begingroup +\@tempdima=#1 \advance\@tempdima by1.2pt +\@tempdimb=#1 \advance\@tempdimb by-1.2pt +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(1.2pt,\the\@tempdima) coordinate (X) -- (\the\@tempdima,1.2pt);% +\draw[stealth-,line width=0.4pt]% +(-1.2pt,\the\@tempdimb) -- (\the\@tempdimb,-1.2pt);} +\endgroup} +\def\ueqArrow@Element#1{% +\begingroup +\@tempdima=#1 \advance\@tempdima by-1.2pt +\@tempdimb=#1 \advance\@tempdimb by1.2pt +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(-1.2pt,1.2pt) coordinate (X) -- (\the\@tempdima,\the\@tempdimb);% +\draw[stealth-,line width=0.4pt]% +(1.2pt,-1.2pt) -- (\the\@tempdimb,\the\@tempdima);} +\endgroup} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% Additional elements for drawing down- and up-sloped equilibrium harpoons within the scope of +% pgf package are defined. +% \changes{v1.02}{2009/11/19}{Added} +% +% \begin{macro}{\deqHarpoon@Element} +% \begin{macro}{\ueqHarpoon@Element} +% \changes{v1.03}{2009/11/26}{Harpoons added as PostScript procedures} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\deqHarpoon@Element#1{% +\begingroup +\@tempdima=#1 \advance\@tempdima by1.2pt +\@tempdimb=#1 \advance\@tempdimb by-1.2pt +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(1.2pt,\the\@tempdima) coordinate (X) -- (\the\@tempdima,1.2pt);% +\draw[left to-,line width=0.4pt]% +(-1.2pt,\the\@tempdimb) -- (\the\@tempdimb,-1.2pt);} +\endgroup} +\def\ueqHarpoon@Element#1{% +\begingroup +\@tempdima=#1 \advance\@tempdima by-1.2pt +\@tempdimb=#1 \advance\@tempdimb by1.2pt +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(-1.2pt,1.2pt) coordinate (X) -- (\the\@tempdima,\the\@tempdimb);% +\draw[left to-,line width=0.4pt]% +(1.2pt,-1.2pt) -- (\the\@tempdimb,\the\@tempdima);} +\endgroup} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\reactDEqarrow} +% \begin{macro}{\reactUEqarrow} +% \begin{macro}{\reactdeqarrow} +% \begin{macro}{\reactueqarrow} +% Further reaction arrows have been added. +% \changes{v1.00}{2002/05/30}{First Version} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% \begin{macrocode} +\def\newreactDEqarrow{\@ifnextchar[%] +{\newreact@DEqarrow}{\newreact@DEqarrow[0pt]}} +\def\newreact@DEqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\deqArrow@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactUEqarrow{\@ifnextchar[%] +{\newreact@UEqarrow}{\newreact@UEqarrow[0pt]}} +\def\newreact@UEqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\ueqArrow@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +%%%%2009/11/19 +\def\newreactdeqarrow{\@ifnextchar[%] +{\newreact@deqarrow}{\newreact@deqarrow[0pt]}} +\def\newreact@deqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\deqHarpoon@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactueqarrow{\@ifnextchar[%] +{\newreact@ueqarrow}{\newreact@ueqarrow[0pt]}} +\def\newreact@ueqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\ueqHarpoon@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +%%%%2009/11/19 +%\let\reactDEqarrow=\newreactDEqarrow +%\let\reactUEqarrow=\newreactUEqarrow +%\let\reactdeqarrow=\newreactdeqarrow +%\let\reactueqarrow=\newreactueqarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% Additional elements for drawing down- and up-sloped double-headed arrows +% within the scope of pgf package are defined first. +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% +% \begin{macro}{\ulrArrow@Element} +% \begin{macro}{\dlrArrow@Element} +% \begin{macrocode} +\def\ulrArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[stealth-stealth,line width=0.4pt]% +(0pt,0pt) coordinate (X) -- (#1,#1);}} +\def\dlrArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[stealth-stealth,line width=0.4pt]% +(0pt,#1) coordinate (X) -- (#1,0pt);}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\reactulrarrow} +% \begin{macro}{\reactdlrarrow} +% \changes{v5.00}{2010/10/01}{Maitained for PDF mode} +% \begin{macrocode} +\def\newreactulrarrow{\@ifnextchar[%] +{\newreact@ulrarrow}{\newreact@ulrarrow[0pt]}} +\def\newreact@ulrarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\ulrArrow@Element +\react@@incrarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactdlrarrow{\@ifnextchar[%] +{\newreact@dlrarrow}{\newreact@dlrarrow[0pt]}} +\def\newreact@dlrarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\dlrArrow@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +%%%%2009/11/19 +%\let\reactulrarrow=\newreactulrarrow +%\let\reactdlrarrow=\newreactdlrarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% A new command \verb/\electronshiftAH/ is added to defining bent (curved) arrows +% and harpoons. +% \changes{v1.03}{2009/12/01}{Added} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% +% \begin{macro}{\electronshiftAH} +% \begin{macrocode} +\def\electronshiftAH#1(#2,#3)(#4,#5)(#6,#7){% +\@ifnextchar(% +{\electr@nshiftAH{#1}(#2,#3)(#4,#5)(#6,#7)}% +{\electr@nshiftAH{#1}(#2,#3)(#4,#5)(#4,#5)(#6,#7)}} +\def\electr@nshiftAH#1(#2,#3)(#4,#5)(#6,#7)(#8,#9){% +%\tikz[baseline=(X.base)]{% +%\draw [#1,line width=0.4pt] (0pt,0pt) coordinate (X) +%(#2\unitlength,#3\unitlength) .. +%controls (#4\unitlength,#5\unitlength) +%and (#6\unitlength,#7\unitlength) .. +%(#8\unitlength,#9\unitlength);} +\tikznodimension{% +\draw [#1,line width=0.4pt]%%(0pt,0pt) coordinate (X) +(#2\unitlength,#3\unitlength) .. +controls (#4\unitlength,#5\unitlength) +and (#6\unitlength,#7\unitlength) .. +(#8\unitlength,#9\unitlength);}% +}% +% \end{macrocode} +% \end{macro} +% +% Several commmands for drawing curved harpoons are defined as follows: +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macro}{\electronshiftHru} +% \begin{macro}{\electronshiftHrd} +% \begin{macro}{\electronshiftHlu} +% \begin{macro}{\electronshiftHld} +% \begin{macrocode} +\def\electronshiftHru{\electronshiftAH{-left to}} +\def\electronshiftHrd{\electronshiftAH{-right to}} +\def\electronshiftHlu{\electronshiftAH{right to-}} +\def\electronshiftHld{\electronshiftAH{left to-}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% Several commmands for drawing curved arrows are defined as follows: +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macro}{\electronshiftArrowr} +% \begin{macro}{\electronshiftArrowl} +% \begin{macrocode} +\def\electronshiftArrowr{\electronshiftAH{-stealth}} +\def\electronshiftArrowl{\electronshiftAH{stealth-}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The {\sffamily chmst-pdf} package defines double-line arrows with variable +% length for drawing reaction schemes, where additional information +% can be written on the upper and/or downward sides of each arrow. +% \changes{v1.00}{2002/05/30}{First Version} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% +% Several elements for drawing horizontal scheme arrows within the scope of +% pgf package are defined first. +% +% \begin{macro}{\lSchemeArrow@Element} +% \begin{macrocode} +\def\lSchemeArrow@Element#1{\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[stealth-,double distance=0.16em,line width=0.4pt]% +(0pt,0.28em) coordinate (X) -- (#1,0.28em);}% +\hss}} +\def\rSchemeArrow@Element#1{\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[-stealth,double distance=0.16em,line width=0.4pt]% +(0pt,0.28em) coordinate (X) -- (#1,0.28em);}% +\hss}} +\def\lrSchemeArrow@Element#1{\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[stealth-stealth,double distance=0.16em,line width=0.4pt]% +(0pt,0.28em) coordinate (X) -- (#1,0.28em);}% +\hss}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\schemelarrow} +% \begin{macro}{\schemerarrow} +% \begin{macro}{\schemelrarrow} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% +% \begin{macrocode} +% ******************************** +% * scheme arrows * +% * 1991 OCT 4 S. Fujita * +% * Revised 1992 May 24 S.Fujita * 1999/02/02 by S. Fujita +% ******************************** Redefined 2002/05/30 by SF +% After Chapter 9 of ``LaTeX for (Bio)Chemists'' by Shinsaku Fujita +\def\newschemelarrow#1#2#3#4{% +\let\Arrow@Element=\lSchemeArrow@Element +\react@@rlarrow[0pt]{#1}{#2}{#3}{#4}} +\def\newschemerarrow#1#2#3#4{% +\let\Arrow@Element=\rSchemeArrow@Element +\react@@rlarrow[0pt]{#1}{#2}{#3}{#4}} +\def\newschemelrarrow#1#2#3#4{% +\let\Arrow@Element=\lrSchemeArrow@Element +\react@@rlarrow[0pt]{#1}{#2}{#3}{#4}} +%%%%2009/11/19 +%\let\schemelarrow=\newschemelarrow +%\let\schemerarrow=\newschemerarrow +%\let\schemelrarrow=\newschemelrarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \section{Redefinition of verbatim} +% (Deleted) +% +% \section{Shadowed Boxes} +% (Deleted) +% +% \section{Further boxes} +% (Deleted) +% +% \section{Symbols for instant photography} +% (Deleted) +% +% \section{Various arrows with fixed length} +% +% Because various arrows with a fixed length have been defined in the \textsf{chemist} package, +% the corresponding codes for the \textsf{chmst-pdf} package are described here. +% +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% +% \begin{macro}{\llongrightarrow} +% \begin{macro}{\llongleftarrow} +% \begin{macro}{\Equilibarrow} +% +% \begin{macrocode} +\def\newllongrightarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\rArrow@Element{28pt}\hss}}}} +\def\newllongleftarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\lArrow@Element{28pt}\hss}}}} +\def\newllongleftrightarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\lrArrow@Element{28pt}\hss}}}} +\def\newEquilibarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\eqArrow@Element{28pt}\hss}}}} +%\let\llongrightarrow=\newllongrightarrow +%\let\llongleftarrow=\newllongleftarrow +%\let\llongleftrightarrow=\newllongleftrightarrow +%\let\Equilibarrow=\newEquilibarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% \begin{macro}{\Llongrightarrow} +% \begin{macro}{\Llongleftarrow} +% \begin{macro}{\Llongleftrightarrow} +% +% \begin{macrocode} +\def\newLlongrightarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\rSchemeArrow@Element{28pt}\hss}}}} +\def\newLlongleftarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\lSchemeArrow@Element{28pt}\hss}}}} +\def\newLlongleftrightarrow{\ensuremath{% +\mathrel{\hbox to28pt{\hss\lrSchemeArrow@Element{28pt}\hss}}}} +%\let\Llongrightarrow=\newLlongrightarrow +%\let\Llongleftarrow=\newLlongleftarrow +%\let\Llongleftrightarrow\newLlongleftrightarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% \begin{macro}{\lllongrightarrow} +% \begin{macro}{\lllongleftarrow} +% \begin{macro}{\lllongleftrightarrow} +% \begin{macro}{\Equiliblongarrow} +% +% \begin{macrocode} +\def\newlllongrightarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\rArrow@Element{35pt}\hss}}}} +\def\newlllongleftarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\lArrow@Element{35pt}\hss}}}} +\def\newlllongleftrightarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\lrArrow@Element{35pt}\hss}}}} +\def\newEquiliblongarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\eqArrow@Element{35pt}\hss}}}} +%\let\lllongrightarrow=\newlllongrightarrow +%\let\lllongleftarrow=\newlllongleftarrow +%\let\lllongleftrightarrow=\newlllongleftrightarrow +%\let\Equiliblongarrow=\newEquiliblongarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% \begin{macro}{\Lllongrightarrow} +% \begin{macro}{\Lllongleftarrow} +% \begin{macro}{\Lllongleftrightarrow} +% +% \begin{macrocode} +\def\newLllongrightarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\rSchemeArrow@Element{35pt}\hss}}}} +\def\newLllongleftarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\lSchemeArrow@Element{35pt}\hss}}}} +\def\newLllongleftrightarrow{\ensuremath{% +\mathrel{\hbox to35pt{\hss\lrSchemeArrow@Element{35pt}\hss}}}} +%\let\Lllongrightarrow=\newLllongrightarrow +%\let\Lllongleftarrow=\newLllongleftarrow +%\let\Lllongleftrightarrow\newLllongleftrightarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% Several elements for drawing horizontal harpoons within the scope of +% pgf package are defined first. +% \changes{v1.02}{2009/11/19}{Added} +% +% \begin{macro}{\rightharpoonupElement} +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v1.03}{2009/11/26}{Harpoons added as PostScript procedures} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\rightharpoonupElement#1{% +\leavevmode +\lower0.2pt\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(0pt,0.28em) -- (#1,0.28em);}% +\hss}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\rightharpoondownElement} +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v1.03}{2009/11/26}{Harpoons added as PostScript procedures} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\rightharpoondownElement#1{% +\leavevmode +\raise0.2pt\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[-right to,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(0pt,0.28em) -- (#1,0.28em);}% +\hss}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\leftharpoonupElement} +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v1.03}{2009/11/26}{Harpoons added as PostScript procedures} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\leftharpoonupElement#1{% +\leavevmode +\lower0.2pt\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[right to-,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(0pt,0.28em) -- (#1,0.28em);}% +\hss}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\leftharpoondownElement} +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v1.03}{2009/11/26}{Harpoons added as PostScript procedures} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\leftharpoondownElement#1{% +\leavevmode +\lower0.2pt\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[left to-,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(0pt,0.28em) -- (#1,0.28em);}% +\hss}} +% \end{macrocode} +% \end{macro} +% +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% \begin{macro}{\llongrightharpoonup} +% \begin{macro}{\llongrightharpoondown} +% \begin{macro}{\llongleftharpoonup} +% \begin{macro}{\llongleftharpoondown} +% \begin{macrocode} +\def\newllongrightharpoonup{\ensuremath{\mathrel{\rightharpoonupElement{28pt}}}} +\def\newllongrightharpoondown{\ensuremath{\mathrel{\rightharpoondownElement{28pt}}}} +\def\newllongleftharpoonup{\ensuremath{\mathrel{\leftharpoonupElement{28pt}}}} +\def\newllongleftharpoondown{\ensuremath{\mathrel{\leftharpoondownElement{28pt}}}} +%\let\llongrightharpoonup=\newllongrightharpoonup +%\let\llongrightharpoondown=\newllongrightharpoondown +%\let\llongleftharpoonup=\newllongleftharpoonup +%\let\llongleftharpoondown=\newllongleftharpoondown +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% \begin{macro}{\lllongrightharpoonup} +% \begin{macro}{\lllongrightharpoondown} +% \begin{macro}{\lllongleftharpoonup} +% \begin{macro}{\lllongleftharpoondown} +% \begin{macrocode} +\def\newlllongrightharpoonup{\ensuremath{\mathrel{\rightharpoonupElement{35pt}}}} +\def\newlllongrightharpoondown{\ensuremath{\mathrel{\rightharpoondownElement{35pt}}}} +\def\newlllongleftharpoonup{\ensuremath{\mathrel{\leftharpoonupElement{35pt}}}} +\def\newlllongleftharpoondown{\ensuremath{\mathrel{\leftharpoondownElement{35pt}}}} +%\let\lllongrightharpoonup=\newlllongrightharpoonup +%\let\lllongrightharpoondown=\newlllongrightharpoondown +%\let\lllongleftharpoonup=\newlllongleftharpoonup +%\let\lllongleftharpoondown\newlllongleftharpoondown +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% +% \changes{v1.02}{2009/11/19}{Added} +% \changes{v5.00}{2010/10/01}{Maintained for PDF mode} +% \begin{macro}{\equilibarrow} +% \begin{macro}{\equiliblongarrow} +% \begin{macrocode} +\def\newequilibarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\eqHarpoon@Element{28pt}\hss}}}} +\def\newequiliblongarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\eqHarpoon@Element{35pt}\hss}}}} +%\let\equilibarrow=\newequilibarrow +%\let\equiliblongarrow=\newequiliblongarrow +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \section{Chemical Corrections} +% (Deleted) +% +% +% \section{XyMcompd and XyMtab Environments} +% (Deleted) +% +% \section{Useful commands} +% (Deleted) +% +% \section{Double and triple bonds} +% (Deleted) +% +% \section{Curved Arrows and Harpoons} +% +% To illustrate the mechanisms of organic reactions, +% curved arrows are used to show an electron shift. +% First, the macros for drawing them are +% defined as follows. +% \changes{v1.01}{2004/08/30}{Added at XyMTeX V4.01} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% +% \begin{macro}{\electronAHshift} +% +% \begin{macrocode} +\def\electronAHshift{% +\@ifnextchar[{\@electronAHshift}{\@electronAHshift[0]}} +\def\@electronAHshift[#1](#2,#3)(#4,#5)#6{% +\@tempcntXa=#2 \@tempcntYa=#3 +\@tempcntXb=#4 \@tempcntYb=#5 +\calcontrolpoints{#1}%defined in chemist package +\tikznodimension{% +\draw [#6,line width=0.4pt]%%%% (0pt,0pt) coordinate (X) +(#2\unitlength,#3\unitlength) .. +controls (\@cnttempa\unitlength,\@cnttempb\unitlength) and +(\@tempcntXc\unitlength,\@tempcntYc\unitlength) .. +(#4\unitlength,#5\unitlength);}% +} +% \end{macrocode} +% \end{macro} +% +% Arrows having a usual arrow head are defined as follows. +% Keywords for differentiation are: r (right) and l (left), +% which are contained in the middle of each command name. +% +% \begin{macro}{\electronrshiftarrow} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\electronrshiftarrow{% +\@ifnextchar[{\@electronrshiftarrow}{\@electronrshiftarrow[0]}} +\def\@electronrshiftarrow[#1](#2,#3)(#4,#5){% +\ifnum#2<#4\relax +\electronAHshift[#1](#2,#3)(#4,#5){-stealth}% +\else +\ifcase#1\relax +\electronAHshift[1](#2,#3)(#4,#5){-stealth}% +\or +\electronAHshift[0](#2,#3)(#4,#5){-stealth}% +\fi\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\electronlshiftarrow} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\electronlshiftarrow{% +\@ifnextchar[{\@electronlshiftarrow}{\@electronlshiftarrow[0]}} +\def\@electronlshiftarrow[#1](#2,#3)(#4,#5){% +\ifnum#2<#4\relax +\electronAHshift[#1](#2,#3)(#4,#5){stealth-}% +\else +\ifcase#1\relax +\electronAHshift[1](#2,#3)(#4,#5){stealth-}% +\or +\electronAHshift[0](#2,#3)(#4,#5){stealth-}% +\fi\fi} +\def\futuresubst#1{\kern140\unitlength #1} +% \end{macrocode} +% \end{macro} +% +% Arrows having a harpoon-type head are defined as follows. +% Keywords for differentiation are: +% Hru (harpoon right upward), Hrd (harpoon right downward), +% Hlu (harpoon left upward), and Hld (harpoon left downward). +% +% \begin{macro}{\electronHrushiftarrow} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\electronHrushiftarrow{% +\@ifnextchar[{\@electronHrushiftarrow}{\@electronHrushiftarrow[0]}} +\def\@electronHrushiftarrow[#1](#2,#3)(#4,#5){% +\ifnum#2<#4\relax +\electronAHshift[#1](#2,#3)(#4,#5){-left to}% +\else +\ifcase#1\relax +\electronAHshift[1](#2,#3)(#4,#5){-left to}% +\or +\electronAHshift[0](#2,#3)(#4,#5){-left to}% +\fi\fi} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\electronHrdshiftarrow} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\electronHrdshiftarrow{% +\@ifnextchar[{\@electronHrdshiftarrow}{\@electronHrdshiftarrow[0]}} +\def\@electronHrdshiftarrow[#1](#2,#3)(#4,#5){% +\ifnum#2<#4\relax +\electronAHshift[#1](#2,#3)(#4,#5){-right to}% +\else +\ifcase#1\relax +\electronAHshift[1](#2,#3)(#4,#5){-right to}% +\or +\electronAHshift[0](#2,#3)(#4,#5){-right to}% +\fi\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\electronHlushiftarrow} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\electronHlushiftarrow{% +\@ifnextchar[{\@electronHlushiftarrow}{\@electronHlushiftarrow[0]}} +\def\@electronHlushiftarrow[#1](#2,#3)(#4,#5){% +\ifnum#2<#4\relax +\electronAHshift[#1](#2,#3)(#4,#5){right to-}% +\else +\ifcase#1\relax +\electronAHshift[1](#2,#3)(#4,#5){right to-}% +\or +\electronAHshift[0](#2,#3)(#4,#5){right to-}% +\fi\fi} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\electronHrdshiftarrow} +% \changes{v5.00}{2010/10/01}{Redefined for PDF mode} +% \begin{macrocode} +\def\electronHldshiftarrow{% +\@ifnextchar[{\@electronHldshiftarrow}{\@electronHldshiftarrow[0]}} +\def\@electronHldshiftarrow[#1](#2,#3)(#4,#5){% +\ifnum#2<#4\relax +\electronAHshift[#1](#2,#3)(#4,#5){left to-}% +\else +\ifcase#1\relax +\electronAHshift[1](#2,#3)(#4,#5){left to-}% +\or +\electronAHshift[0](#2,#3)(#4,#5){left to-}% +\fi\fi} +% \end{macrocode} +% \end{macro} +% +% \section{Initial Setting and Switch to PDF (pgf package) Arrows} +% +% \begin{macro}{\chmstpdfsw} +% \begin{macrocode} +\def\chmstpdfsw{%setting of the chmst-pdf package +\let\reactrarrow=\newreactrarrow% +\let\reactlarrow=\newreactlarrow +\let\reactlrarrow=\newreactlrarrow +\let\reactEqarrow=\newreactEqarrow +\let\reacteqarrow=\newreacteqarrow +%%%% +\let\reactREqarrow=\newreactREqarrow% +\let\reactLEqarrow=\newreactLEqarrow +\let\reactreqarrow=\newreactreqarrow +\let\reactleqarrow=\newreactleqarrow +%%%% +\let\reactdarrow=\newreactdarrow% +\let\reactuarrow=\newreactuarrow +\let\reactduarrow=\newreactduarrow +\let\reactVEqarrow=\newreactVEqarrow +\let\reactveqarrow=\newreactveqarrow +%%%% +\let\reactnearrow=\newreactnearrow% +\let\reactswarrow=\newreactswarrow +%%%% +\let\reactsearrow=\newreactsearrow% +\let\reactnwarrow=\newreactnwarrow +%%%% +\let\reactDEqarrow=\newreactDEqarrow% +\let\reactUEqarrow=\newreactUEqarrow +\let\reactdeqarrow=\newreactdeqarrow +\let\reactueqarrow=\newreactueqarrow +%%%% +\let\reactulrarrow=\newreactulrarrow% +\let\reactdlrarrow=\newreactdlrarrow +%%%% +\let\schemelarrow=\newschemelarrow% +\let\schemerarrow=\newschemerarrow +\let\schemelrarrow=\newschemelrarrow +%%%% +\let\llongrightarrow=\newllongrightarrow% +\let\llongleftarrow=\newllongleftarrow +\let\llongleftrightarrow=\newllongleftrightarrow +\let\Equilibarrow=\newEquilibarrow +%%% +\let\Llongrightarrow=\newLlongrightarrow% +\let\Llongleftarrow=\newLlongleftarrow +\let\Llongleftrightarrow\newLlongleftrightarrow +%%% +\let\lllongrightarrow=\newlllongrightarrow% +\let\lllongleftarrow=\newlllongleftarrow +\let\lllongleftrightarrow=\newlllongleftrightarrow +\let\Equiliblongarrow=\newEquiliblongarrow +%%% +\let\Lllongrightarrow=\newLllongrightarrow% +\let\Lllongleftarrow=\newLllongleftarrow +\let\Lllongleftrightarrow\newLllongleftrightarrow +%%% +\let\llongrightharpoonup=\newllongrightharpoonup% +\let\llongrightharpoondown=\newllongrightharpoondown +\let\llongleftharpoonup=\newllongleftharpoonup +\let\llongleftharpoondown=\newllongleftharpoondown +%%% +\let\lllongrightharpoonup=\newlllongrightharpoonup% +\let\lllongrightharpoondown=\newlllongrightharpoondown +\let\lllongleftharpoonup=\newlllongleftharpoonup +\let\lllongleftharpoondown\newlllongleftharpoondown +%%% +\let\equilibarrow=\newequilibarrow% +\let\equiliblongarrow=\newequiliblongarrow +%%% +} +\let\chmstpspdfsw=\chmstpdfsw%compatibility to postscript mode +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\chmstpdfsw%initial setting +%</chmstpdf> +% \end{macrocode} +% +% \Finale +\endinput diff --git a/macros/latex/contrib/xymtex/xymtxpdf/chmst-pdf.ins b/macros/latex/contrib/xymtex/xymtxpdf/chmst-pdf.ins new file mode 100644 index 0000000000..b6bd7dee76 --- /dev/null +++ b/macros/latex/contrib/xymtex/xymtxpdf/chmst-pdf.ins @@ -0,0 +1,44 @@ +\def\batchfile{chmst-pdf.ins} +\input docstrip.tex +\preamble + +This is a generated file. + +Copyright 2010 by Shinsaku Fujita +all rights reserved. +This style file is created for drawing chemical structural formulas +This style file is to be contained in the ``xymtex'' directory which +is an input directory for TeX. + +This file is part of the XyMTeX system. +======================================= +Present version (as chmst-pdf.dtx etc.): +Version 5.00 Released on October 01, 2010 + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either version 1.3 +of this license or (at your option) any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2005/12/01 or later. + +This work has the LPPL maintenance status `maintained'. +The Current Maintainer of this work is Shinsaku Fujita. + +This work consists of the files xymtx-ps.dtx and xymtx-ps.ins +and the derived file xymtx-ps.sty. + +======================================= + +\endpreamble + +\keepsilent + +\generateFile{chmst-pdf.drv}{t}{% + \from{chmst-pdf.dtx}{driver}} + +\generateFile{chmst-pdf.sty}{t}{% + \from{chmst-pdf.dtx}{chmstpdf}} + +\endinput diff --git a/macros/latex/contrib/xymtex/xymtxpdf/chmst-pdf.sty b/macros/latex/contrib/xymtex/xymtxpdf/chmst-pdf.sty new file mode 100644 index 0000000000..09ba298642 --- /dev/null +++ b/macros/latex/contrib/xymtex/xymtxpdf/chmst-pdf.sty @@ -0,0 +1,691 @@ +%% +%% This is file `chmst-pdf.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% chmst-pdf.dtx (with options: `chmstpdf') +%% +%% This is a generated file. +%% +%% Copyright 2010 by Shinsaku Fujita +%% all rights reserved. +%% This style file is created for drawing chemical structural formulas +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% Present version (as chmst-pdf.dtx etc.): +%% Version 5.00 Released on October 01, 2010 +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% The Current Maintainer of this work is Shinsaku Fujita. +%% +%% This work consists of the files xymtx-ps.dtx and xymtx-ps.ins +%% and the derived file xymtx-ps.sty. +%% +%% ======================================= +%% +%% \CharacterTable +%% {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 +%% 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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +%% `chmst-ps.dtx' ver1.00 (for LaTeX2e) 2002/05/30 +%% `chmst-ps.dtx' ver1.01 (for LaTeX2e) 2004/08/30 +%% `chmst-ps.dtx' ver1.02 (for LaTeX2e) 2009/11/08 +%% `chmst-ps.dtx' ver1.03 (for LaTeX2e) 2009/11/26 +%% `chmst-ps.dtx' ver5.00 (for LaTeX2e) 2010/10/01 +%% by Shinsaku Fujita +%% +\def\j@urnalname{chmst-pdf} \def\journalID{chmst-pdf} +\def\versi@ndate{October 01, 2010} +\def\versi@nno{ver5.00} +\def\copyrighth@lder{SF} % Shinsaku Fujita +\typeout{Package `\j@urnalname' (\versi@nno) <\versi@ndate>\space +[\copyrighth@lder]} +\typeout{chmst-pdf.sty ver5.00 (for LaTeX2e) 2010/10/01[SF]} +\@ifundefined{if@@@chemtimes}{\newif\if@@@chemtimes}{} +\@ifundefined{if@@chemtimes}{\newif\if@@chemtimes}{}%from chemtimes +\DeclareOption{chemtimes}{\@@@chemtimestrue} +\@@@chemtimesfalse +\ProcessOptions +\if@@@chemtimes\if@@chemtimes\else + \PackageError{chmst-pdf} + {The option ``chemtimes'' is not permitted} + {You should use this option after the chemtimes package is loaded.} +\fi\fi +\if@@@chemtimes +\RequirePackage[chemtimes]{chemist}% +\else +\RequirePackage{chemist}% +\fi +\RequirePackage{xymtx-pdf}% +\newdimen\@tempdimX +\newdimen\@tempdimY +\def\rArrow@Element#1{\begingroup\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[>=stealth,->,line width=0.4pt]% +(0pt,0pt) coordinate (X) (0pt,0.28em) -- (#1,0.28em);}% +\hss}\endgroup} +\let\Arrow@Element=\rArrow@Element +\def\lArrow@Element#1{\begingroup\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[stealth-,line width=0.4pt]% +(0pt,0pt) coordinate (X) (0pt,0.28em) -- (#1,0.28em);}% +\hss}\endgroup} +\def\lrArrow@Element#1{\begingroup\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[stealth-stealth,line width=0.4pt]% +(0pt,0pt) coordinate (X) (0pt,0.28em) -- (#1,0.28em);}% +\hss}\endgroup} +\def\eqArrow@Element#1{\begingroup\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(0pt,0.43em) -- (#1,0.43em); +\draw[stealth-,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(0pt,0.13em) -- (#1,0.13em);}% +\hss}\endgroup} +\def\eqHarpoon@Element#1{\begingroup\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(0pt,0.43em) -- (#1,0.43em); +\draw[left to-,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(0pt,0.13em) -- (#1,0.13em);}% +\hss}\endgroup} +\def\reqArrow@Element#1{\begingroup% +\dimen1=#1% +\dimen0=\eqlbarrowstretch\dimen1% +\dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax +\dimen2=\dimen1 \advance\dimen2 by\dimen0 +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(0pt,0.43em) -- (#1,0.43em); +\draw[stealth-,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(\the\dimen1,0.13em) -- (\the\dimen2,0.13em);}% +\endgroup} +\def\leqArrow@Element#1{\begingroup% +\dimen1=#1% +\dimen0=\eqlbarrowstretch\dimen1% +\dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax +\dimen2=\dimen1 \advance\dimen2 by\dimen0 +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(\the\dimen1,0.43em) -- (\the\dimen2,0.43em); +\draw[stealth-,line width=0.4pt]% +(0pt,0pt) coordinate (X) (0pt,0.13em) -- (#1,0.13em);}% +\endgroup} +\def\reqHarpoon@Element#1{\begingroup% +\dimen1=#1% +\dimen0=\eqlbarrowstretch\dimen1% +\dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax +\dimen2=\dimen1 \advance\dimen2 by\dimen0 +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(0pt,0.43em) -- (#1,0.43em); +\draw[left to-,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(\the\dimen1,0.13em) -- (\the\dimen2,0.13em);}% +\endgroup} +\def\leqHarpoon@Element#1{\begingroup% +\dimen1=#1% +\dimen0=\eqlbarrowstretch\dimen1% +\dimen1=#1 \advance\dimen1 by-\dimen0 \divide\dimen1 by2\relax +\dimen2=\dimen1 \advance\dimen2 by\dimen0 +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(\the\dimen1,0.43em) -- (\the\dimen2,0.43em); +\draw[left to-,line width=0.4pt]% +(0pt,0pt) coordinate (X) (0pt,0.13em) -- (#1,0.13em); +}% +\endgroup} +\newdimen\@tempdimX +\def\react@@rlarrow[#1]#2#3#4#5{\ensuremath{\mathrel{% +\hskip#1\raisebox{#2}{\begingroup\@tempdimX=#3\relax% + \parbox{#3}{\centering + \baselineskip=.8\normalbaselineskip \ChemStrut{#4}\par% + \vskip-0.2\normalbaselineskip\vskip\reactarrowsep% + \noindent + \Arrow@Element{\the\@tempdimX} + \par% + \vskip\reactarrowseprate\reactarrowsep% + \vskip-0.1\normalbaselineskip\ChemStrut{#5}}\endgroup}}}} +\def\newreactrarrow{% +\@ifnextchar[{\newreact@rarrow}{\newreact@rarrow[0pt]}} +\def\newreact@rarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\rArrow@Element% +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactlarrow{% +\@ifnextchar[{\newreact@larrow}{\newreact@larrow[0pt]}} +\def\newreact@larrow[#1]#2#3#4#5{% +\let\Arrow@Element=\lArrow@Element% +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactlrarrow{% +\@ifnextchar[{\newreact@lrarrow}{\newreact@lrarrow[0pt]}} +\def\newreact@lrarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\lrArrow@Element% +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +%%%%2009/11/19 +\def\newreactEqarrow{% +\@ifnextchar[{\newreact@Eqarrow}{\newreact@Eqarrow[0pt]}} +\def\newreact@Eqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\eqArrow@Element% +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreacteqarrow{% +\@ifnextchar[{\newreact@eqarrow}{\newreact@eqarrow[0pt]}} +\def\newreact@eqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\eqHarpoon@Element% +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +\def\newreactREqarrow{% +\@ifnextchar[{\newreact@REqarrow}{\newreact@REqarrow[0pt]}} +\def\newreact@REqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\reqArrow@Element +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactLEqarrow{% +\@ifnextchar[{\newreact@LEqarrow}{\newreact@LEqarrow[0pt]}} +\def\newreact@LEqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\leqArrow@Element +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +\def\newreactreqarrow{% +\@ifnextchar[{\newreact@reqarrow}{\newreact@reqarrow[0pt]}} +\def\newreact@reqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\reqHarpoon@Element +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactleqarrow{% +\@ifnextchar[{\newreact@leqarrow}{\newreact@leqarrow[0pt]}} +\def\newreact@leqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\leqHarpoon@Element +\react@@rlarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +\def\dArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(0pt,#1) coordinate (X) -- (0pt,0pt);}} +\def\uArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[stealth-,line width=0.4pt]% +(0pt,#1) coordinate (X) -- (0pt,0pt);}} +\def\veqArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(-0.15em,#1) -- (-0.15em,0pt); +\draw[stealth-,line width=0.4pt]% +(0.15em,#1) -- (0.15em,0pt);}} +\def\duArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[stealth-stealth,line width=0.4pt]% +(0pt,#1) coordinate (X) -- (0pt,0pt);}} +\def\veqHarpoon@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(-0.15em,#1) -- (-0.15em,0pt); +\draw[left to-,line width=0.4pt]% +(0.15em,#1) -- (0.15em,0pt);}} +\def\react@@duarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{% +\@tempdimY=#3\def\arraystretch{0.8}% +\begin{tabular}{l}#4\end{tabular}% +{\tabcolsep=0pt\begin{tabular}{c}% +\Arrow@Element{\the\@tempdimY}% +\end{tabular}}% +\begin{tabular}{l}#5\end{tabular}}} +\def\newreactdarrow{% +\@ifnextchar[{\newreact@darrow}{\newreact@darrow[0pt]}} +\def\newreact@darrow[#1]#2#3#4#5{% +\let\Arrow@Element=\dArrow@Element +\react@@duarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactuarrow{% +\@ifnextchar[{\newreact@uarrow}{\newreact@uarrow[0pt]}} +\def\newreact@uarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\uArrow@Element +\react@@duarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactduarrow{% +\@ifnextchar[{\newreact@duarrow}{\newreact@duarrow[0pt]}} +\def\newreact@duarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\duArrow@Element +\react@@duarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +\def\newreactVEqarrow{% +\@ifnextchar[{\newreact@VEqarrow}{\newreact@VEqarrow[0pt]}} +\def\newreact@VEqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\veqArrow@Element +\react@@duarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactveqarrow{% +\@ifnextchar[{\newreact@veqarrow}{\newreact@veqarrow[0pt]}} +\def\newreact@veqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\veqHarpoon@Element +\react@@duarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +\def\seArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(0pt,#1) coordinate (X) -- (#1,0pt);}} +\def\nwArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[stealth-,line width=0.4pt]% +(0pt,#1) coordinate (X) -- (#1,0pt);}} +\def\react@@decrarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{% +\@tempdimX=#3\divide\@tempdimX by2\relax +\@tempdimY=#3\relax\def\arraystretch{0.8}% +\begin{tabular}{l}#4\end{tabular}\kern1em% +{\tabcolsep=0pt\begin{tabular}{c} +\Arrow@Element{\the\@tempdimY}% +\end{tabular}}\kern1em% +\begin{tabular}{l}#5\end{tabular}}} +\def\newreactsearrow{% +\@ifnextchar[{\newreact@searrow}{\newreact@searrow[0pt]}} +\def\newreact@searrow[#1]#2#3#4#5{% +\let\Arrow@Element=\seArrow@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactnwarrow{% +\@ifnextchar[{\newreact@nwarrow}{\newreact@nwarrow[0pt]}} +\def\newreact@nwarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\nwArrow@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +\def\neArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(0pt,0pt) coordinate (X) -- (#1,#1);}} +\def\swArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[stealth-,line width=0.4pt]% +(0pt,0pt) coordinate (X) -- (#1,#1);}} +\def\react@@incrarrow[#1]#2#3#4#5{\hskip#1\raisebox{#2}{% +\@tempdimX=#3 \divide\@tempdimX by2 +\@tempdimY=#3% +\def\arraystretch{0.8}% +\begin{tabular}{l}#4\end{tabular}\kern1em% +{\tabcolsep=0pt +\begin{tabular}{c} +\Arrow@Element{\the\@tempdimY}% +\end{tabular}}\kern1em% +\begin{tabular}{l}#5\end{tabular}}} +\def\newreactnearrow{% +\@ifnextchar[{\newreact@nearrow}{\newreact@nearrow[0pt]}} +\def\newreact@nearrow[#1]#2#3#4#5{% +\let\Arrow@Element=\neArrow@Element +\react@@incrarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactswarrow{% +\@ifnextchar[{\newreact@swarrow}{\newreact@swarrow[0pt]}} +\def\newreact@swarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\swArrow@Element +\react@@incrarrow[#1]{#2}{#3}{#4}{#5}} +%%%%%2009/11/19 +\def\deqArrow@Element#1{% +\begingroup +\@tempdima=#1 \advance\@tempdima by1.2pt +\@tempdimb=#1 \advance\@tempdimb by-1.2pt +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(1.2pt,\the\@tempdima) coordinate (X) -- (\the\@tempdima,1.2pt);% +\draw[stealth-,line width=0.4pt]% +(-1.2pt,\the\@tempdimb) -- (\the\@tempdimb,-1.2pt);} +\endgroup} +\def\ueqArrow@Element#1{% +\begingroup +\@tempdima=#1 \advance\@tempdima by-1.2pt +\@tempdimb=#1 \advance\@tempdimb by1.2pt +\tikz[baseline=(X.base)]{% +\draw[-stealth,line width=0.4pt]% +(-1.2pt,1.2pt) coordinate (X) -- (\the\@tempdima,\the\@tempdimb);% +\draw[stealth-,line width=0.4pt]% +(1.2pt,-1.2pt) -- (\the\@tempdimb,\the\@tempdima);} +\endgroup} +\def\deqHarpoon@Element#1{% +\begingroup +\@tempdima=#1 \advance\@tempdima by1.2pt +\@tempdimb=#1 \advance\@tempdimb by-1.2pt +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(1.2pt,\the\@tempdima) coordinate (X) -- (\the\@tempdima,1.2pt);% +\draw[left to-,line width=0.4pt]% +(-1.2pt,\the\@tempdimb) -- (\the\@tempdimb,-1.2pt);} +\endgroup} +\def\ueqHarpoon@Element#1{% +\begingroup +\@tempdima=#1 \advance\@tempdima by-1.2pt +\@tempdimb=#1 \advance\@tempdimb by1.2pt +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(-1.2pt,1.2pt) coordinate (X) -- (\the\@tempdima,\the\@tempdimb);% +\draw[left to-,line width=0.4pt]% +(1.2pt,-1.2pt) -- (\the\@tempdimb,\the\@tempdima);} +\endgroup} +\def\newreactDEqarrow{\@ifnextchar[%] +{\newreact@DEqarrow}{\newreact@DEqarrow[0pt]}} +\def\newreact@DEqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\deqArrow@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactUEqarrow{\@ifnextchar[%] +{\newreact@UEqarrow}{\newreact@UEqarrow[0pt]}} +\def\newreact@UEqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\ueqArrow@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +%%%%2009/11/19 +\def\newreactdeqarrow{\@ifnextchar[%] +{\newreact@deqarrow}{\newreact@deqarrow[0pt]}} +\def\newreact@deqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\deqHarpoon@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactueqarrow{\@ifnextchar[%] +{\newreact@ueqarrow}{\newreact@ueqarrow[0pt]}} +\def\newreact@ueqarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\ueqHarpoon@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +%%%%2009/11/19 +\def\ulrArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[stealth-stealth,line width=0.4pt]% +(0pt,0pt) coordinate (X) -- (#1,#1);}} +\def\dlrArrow@Element#1{% +\tikz[baseline=(X.base)]{% +\draw[stealth-stealth,line width=0.4pt]% +(0pt,#1) coordinate (X) -- (#1,0pt);}} +\def\newreactulrarrow{\@ifnextchar[%] +{\newreact@ulrarrow}{\newreact@ulrarrow[0pt]}} +\def\newreact@ulrarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\ulrArrow@Element +\react@@incrarrow[#1]{#2}{#3}{#4}{#5}} +\def\newreactdlrarrow{\@ifnextchar[%] +{\newreact@dlrarrow}{\newreact@dlrarrow[0pt]}} +\def\newreact@dlrarrow[#1]#2#3#4#5{% +\let\Arrow@Element=\dlrArrow@Element +\react@@decrarrow[#1]{#2}{#3}{#4}{#5}} +%%%%2009/11/19 +\def\electronshiftAH#1(#2,#3)(#4,#5)(#6,#7){% +\@ifnextchar(% +{\electr@nshiftAH{#1}(#2,#3)(#4,#5)(#6,#7)}% +{\electr@nshiftAH{#1}(#2,#3)(#4,#5)(#4,#5)(#6,#7)}} +\def\electr@nshiftAH#1(#2,#3)(#4,#5)(#6,#7)(#8,#9){% +\tikznodimension{% +\draw [#1,line width=0.4pt]%%(0pt,0pt) coordinate (X) +(#2\unitlength,#3\unitlength) .. +controls (#4\unitlength,#5\unitlength) +and (#6\unitlength,#7\unitlength) .. +(#8\unitlength,#9\unitlength);}% +}% +\def\electronshiftHru{\electronshiftAH{-left to}} +\def\electronshiftHrd{\electronshiftAH{-right to}} +\def\electronshiftHlu{\electronshiftAH{right to-}} +\def\electronshiftHld{\electronshiftAH{left to-}} +\def\electronshiftArrowr{\electronshiftAH{-stealth}} +\def\electronshiftArrowl{\electronshiftAH{stealth-}} +\def\lSchemeArrow@Element#1{\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[stealth-,double distance=0.16em,line width=0.4pt]% +(0pt,0.28em) coordinate (X) -- (#1,0.28em);}% +\hss}} +\def\rSchemeArrow@Element#1{\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[-stealth,double distance=0.16em,line width=0.4pt]% +(0pt,0.28em) coordinate (X) -- (#1,0.28em);}% +\hss}} +\def\lrSchemeArrow@Element#1{\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[stealth-stealth,double distance=0.16em,line width=0.4pt]% +(0pt,0.28em) coordinate (X) -- (#1,0.28em);}% +\hss}} +\def\newschemelarrow#1#2#3#4{% +\let\Arrow@Element=\lSchemeArrow@Element +\react@@rlarrow[0pt]{#1}{#2}{#3}{#4}} +\def\newschemerarrow#1#2#3#4{% +\let\Arrow@Element=\rSchemeArrow@Element +\react@@rlarrow[0pt]{#1}{#2}{#3}{#4}} +\def\newschemelrarrow#1#2#3#4{% +\let\Arrow@Element=\lrSchemeArrow@Element +\react@@rlarrow[0pt]{#1}{#2}{#3}{#4}} +%%%%2009/11/19 +\def\newllongrightarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\rArrow@Element{28pt}\hss}}}} +\def\newllongleftarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\lArrow@Element{28pt}\hss}}}} +\def\newllongleftrightarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\lrArrow@Element{28pt}\hss}}}} +\def\newEquilibarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\eqArrow@Element{28pt}\hss}}}} +\def\newLlongrightarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\rSchemeArrow@Element{28pt}\hss}}}} +\def\newLlongleftarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\lSchemeArrow@Element{28pt}\hss}}}} +\def\newLlongleftrightarrow{\ensuremath{% +\mathrel{\hbox to28pt{\hss\lrSchemeArrow@Element{28pt}\hss}}}} +\def\newlllongrightarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\rArrow@Element{35pt}\hss}}}} +\def\newlllongleftarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\lArrow@Element{35pt}\hss}}}} +\def\newlllongleftrightarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\lrArrow@Element{35pt}\hss}}}} +\def\newEquiliblongarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\eqArrow@Element{35pt}\hss}}}} +\def\newLllongrightarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\rSchemeArrow@Element{35pt}\hss}}}} +\def\newLllongleftarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\lSchemeArrow@Element{35pt}\hss}}}} +\def\newLllongleftrightarrow{\ensuremath{% +\mathrel{\hbox to35pt{\hss\lrSchemeArrow@Element{35pt}\hss}}}} +\def\rightharpoonupElement#1{% +\leavevmode +\lower0.2pt\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[-left to,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(0pt,0.28em) -- (#1,0.28em);}% +\hss}} +\def\rightharpoondownElement#1{% +\leavevmode +\raise0.2pt\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[-right to,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(0pt,0.28em) -- (#1,0.28em);}% +\hss}} +\def\leftharpoonupElement#1{% +\leavevmode +\lower0.2pt\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[right to-,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(0pt,0.28em) -- (#1,0.28em);}% +\hss}} +\def\leftharpoondownElement#1{% +\leavevmode +\lower0.2pt\hbox to#1{\hss% +\tikz[baseline=(X.base)]{% +\draw[left to-,line width=0.4pt]% +(0pt,0pt) coordinate (X) +(0pt,0.28em) -- (#1,0.28em);}% +\hss}} +\def\newllongrightharpoonup{\ensuremath{\mathrel{\rightharpoonupElement{28pt}}}} +\def\newllongrightharpoondown{\ensuremath{\mathrel{\rightharpoondownElement{28pt}}}} +\def\newllongleftharpoonup{\ensuremath{\mathrel{\leftharpoonupElement{28pt}}}} +\def\newllongleftharpoondown{\ensuremath{\mathrel{\leftharpoondownElement{28pt}}}} +\def\newlllongrightharpoonup{\ensuremath{\mathrel{\rightharpoonupElement{35pt}}}} +\def\newlllongrightharpoondown{\ensuremath{\mathrel{\rightharpoondownElement{35pt}}}} +\def\newlllongleftharpoonup{\ensuremath{\mathrel{\leftharpoonupElement{35pt}}}} +\def\newlllongleftharpoondown{\ensuremath{\mathrel{\leftharpoondownElement{35pt}}}} +\def\newequilibarrow{\ensuremath{\mathrel{% +\hbox to28pt{\hss\eqHarpoon@Element{28pt}\hss}}}} +\def\newequiliblongarrow{\ensuremath{\mathrel{% +\hbox to35pt{\hss\eqHarpoon@Element{35pt}\hss}}}} +\def\electronAHshift{% +\@ifnextchar[{\@electronAHshift}{\@electronAHshift[0]}} +\def\@electronAHshift[#1](#2,#3)(#4,#5)#6{% +\@tempcntXa=#2 \@tempcntYa=#3 +\@tempcntXb=#4 \@tempcntYb=#5 +\calcontrolpoints{#1}%defined in chemist package +\tikznodimension{% +\draw [#6,line width=0.4pt]%%%% (0pt,0pt) coordinate (X) +(#2\unitlength,#3\unitlength) .. +controls (\@cnttempa\unitlength,\@cnttempb\unitlength) and +(\@tempcntXc\unitlength,\@tempcntYc\unitlength) .. +(#4\unitlength,#5\unitlength);}% +} +\def\electronrshiftarrow{% +\@ifnextchar[{\@electronrshiftarrow}{\@electronrshiftarrow[0]}} +\def\@electronrshiftarrow[#1](#2,#3)(#4,#5){% +\ifnum#2<#4\relax +\electronAHshift[#1](#2,#3)(#4,#5){-stealth}% +\else +\ifcase#1\relax +\electronAHshift[1](#2,#3)(#4,#5){-stealth}% +\or +\electronAHshift[0](#2,#3)(#4,#5){-stealth}% +\fi\fi} +\def\electronlshiftarrow{% +\@ifnextchar[{\@electronlshiftarrow}{\@electronlshiftarrow[0]}} +\def\@electronlshiftarrow[#1](#2,#3)(#4,#5){% +\ifnum#2<#4\relax +\electronAHshift[#1](#2,#3)(#4,#5){stealth-}% +\else +\ifcase#1\relax +\electronAHshift[1](#2,#3)(#4,#5){stealth-}% +\or +\electronAHshift[0](#2,#3)(#4,#5){stealth-}% +\fi\fi} +\def\futuresubst#1{\kern140\unitlength #1} +\def\electronHrushiftarrow{% +\@ifnextchar[{\@electronHrushiftarrow}{\@electronHrushiftarrow[0]}} +\def\@electronHrushiftarrow[#1](#2,#3)(#4,#5){% +\ifnum#2<#4\relax +\electronAHshift[#1](#2,#3)(#4,#5){-left to}% +\else +\ifcase#1\relax +\electronAHshift[1](#2,#3)(#4,#5){-left to}% +\or +\electronAHshift[0](#2,#3)(#4,#5){-left to}% +\fi\fi} + +\def\electronHrdshiftarrow{% +\@ifnextchar[{\@electronHrdshiftarrow}{\@electronHrdshiftarrow[0]}} +\def\@electronHrdshiftarrow[#1](#2,#3)(#4,#5){% +\ifnum#2<#4\relax +\electronAHshift[#1](#2,#3)(#4,#5){-right to}% +\else +\ifcase#1\relax +\electronAHshift[1](#2,#3)(#4,#5){-right to}% +\or +\electronAHshift[0](#2,#3)(#4,#5){-right to}% +\fi\fi} +\def\electronHlushiftarrow{% +\@ifnextchar[{\@electronHlushiftarrow}{\@electronHlushiftarrow[0]}} +\def\@electronHlushiftarrow[#1](#2,#3)(#4,#5){% +\ifnum#2<#4\relax +\electronAHshift[#1](#2,#3)(#4,#5){right to-}% +\else +\ifcase#1\relax +\electronAHshift[1](#2,#3)(#4,#5){right to-}% +\or +\electronAHshift[0](#2,#3)(#4,#5){right to-}% +\fi\fi} + +\def\electronHldshiftarrow{% +\@ifnextchar[{\@electronHldshiftarrow}{\@electronHldshiftarrow[0]}} +\def\@electronHldshiftarrow[#1](#2,#3)(#4,#5){% +\ifnum#2<#4\relax +\electronAHshift[#1](#2,#3)(#4,#5){left to-}% +\else +\ifcase#1\relax +\electronAHshift[1](#2,#3)(#4,#5){left to-}% +\or +\electronAHshift[0](#2,#3)(#4,#5){left to-}% +\fi\fi} +\def\chmstpdfsw{%setting of the chmst-pdf package +\let\reactrarrow=\newreactrarrow% +\let\reactlarrow=\newreactlarrow +\let\reactlrarrow=\newreactlrarrow +\let\reactEqarrow=\newreactEqarrow +\let\reacteqarrow=\newreacteqarrow +%%%% +\let\reactREqarrow=\newreactREqarrow% +\let\reactLEqarrow=\newreactLEqarrow +\let\reactreqarrow=\newreactreqarrow +\let\reactleqarrow=\newreactleqarrow +%%%% +\let\reactdarrow=\newreactdarrow% +\let\reactuarrow=\newreactuarrow +\let\reactduarrow=\newreactduarrow +\let\reactVEqarrow=\newreactVEqarrow +\let\reactveqarrow=\newreactveqarrow +%%%% +\let\reactnearrow=\newreactnearrow% +\let\reactswarrow=\newreactswarrow +%%%% +\let\reactsearrow=\newreactsearrow% +\let\reactnwarrow=\newreactnwarrow +%%%% +\let\reactDEqarrow=\newreactDEqarrow% +\let\reactUEqarrow=\newreactUEqarrow +\let\reactdeqarrow=\newreactdeqarrow +\let\reactueqarrow=\newreactueqarrow +%%%% +\let\reactulrarrow=\newreactulrarrow% +\let\reactdlrarrow=\newreactdlrarrow +%%%% +\let\schemelarrow=\newschemelarrow% +\let\schemerarrow=\newschemerarrow +\let\schemelrarrow=\newschemelrarrow +%%%% +\let\llongrightarrow=\newllongrightarrow% +\let\llongleftarrow=\newllongleftarrow +\let\llongleftrightarrow=\newllongleftrightarrow +\let\Equilibarrow=\newEquilibarrow +%%% +\let\Llongrightarrow=\newLlongrightarrow% +\let\Llongleftarrow=\newLlongleftarrow +\let\Llongleftrightarrow\newLlongleftrightarrow +%%% +\let\lllongrightarrow=\newlllongrightarrow% +\let\lllongleftarrow=\newlllongleftarrow +\let\lllongleftrightarrow=\newlllongleftrightarrow +\let\Equiliblongarrow=\newEquiliblongarrow +%%% +\let\Lllongrightarrow=\newLllongrightarrow% +\let\Lllongleftarrow=\newLllongleftarrow +\let\Lllongleftrightarrow\newLllongleftrightarrow +%%% +\let\llongrightharpoonup=\newllongrightharpoonup% +\let\llongrightharpoondown=\newllongrightharpoondown +\let\llongleftharpoonup=\newllongleftharpoonup +\let\llongleftharpoondown=\newllongleftharpoondown +%%% +\let\lllongrightharpoonup=\newlllongrightharpoonup% +\let\lllongrightharpoondown=\newlllongrightharpoondown +\let\lllongleftharpoonup=\newlllongleftharpoonup +\let\lllongleftharpoondown\newlllongleftharpoondown +%%% +\let\equilibarrow=\newequilibarrow% +\let\equiliblongarrow=\newequiliblongarrow +%%% +} +\let\chmstpspdfsw=\chmstpdfsw%compatibility to postscript mode +\chmstpdfsw%initial setting +\endinput +%% +%% End of file `chmst-pdf.sty'. diff --git a/macros/latex/contrib/xymtex/xymtxpdf/xymtx-pdf.dtx b/macros/latex/contrib/xymtex/xymtxpdf/xymtx-pdf.dtx new file mode 100644 index 0000000000..5b715819b1 --- /dev/null +++ b/macros/latex/contrib/xymtex/xymtxpdf/xymtx-pdf.dtx @@ -0,0 +1,1362 @@ +% \iffalse meta-comment +%% File: xymtx-pdf.dtx +% +% Copyright 2002,2004,2005,2009,2010,2013 by Shinsaku Fujita +% +% This file is part of XyMTeX system. +% ------------------------------------- +% +% This file is a part of the macro package ``XyMTeX'' which has been +% designed for typesetting chemical structural formulas. +% +% This file is to be contained in the ``xymtex'' directory which is +% an input directory for TeX. It is a LaTeX optional style file and +% should be used only within LaTeX, because several macros of the file +% are based on LaTeX commands. +% +% The following book deals with an application of TeX/LaTeX to +% preparation of manuscripts of chemical fields: +% (1) Shinsaku Fujita, ``LaTeX for Chemists and Biochemists'' +% Tokyo Kagaku Dozin, Tokyo (1993) [in Japanese]. +% (2) Shinsaku Fujita, ``XyMTeX. Typesetting Chemical Structural +% Formulas'' Addison-Wesley, New York (1997). +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% The Current Maintainer of this work is Shinsaku Fujita. +% +% This work consists of the files xymtx-pdf.dtx and xymtx-pdf.ins +% and the derived file xymtx-pdf.sty. +% +% Please report any bugs, comments, suggestions, etc. to: +% Shinsaku Fujita, +% Shonan Institute of Chemoinformatics and +% Mathematical Chemistry +% shinsaku_fujita@nifty.com +% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{xymtx-ps} +% \def\versi@ndate{May 30, 2002} +% \def\versi@nno{ver1.00} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{xymtx-ps} +% \def\versi@ndate{May 30, 2002} +% \def\versi@nno{ver1.00} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{xymtx-ps} +% \def\versi@ndate{August 30, 2004} +% \def\versi@nno{ver4.01} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{xymtx-ps} +% \def\versi@ndate{December 20, 2004} +% \def\versi@nno{ver4.02} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{xymtx-ps} +% \def\versi@ndate{June 20, 2005} +% \def\versi@nno{ver4.03} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{xymtx-ps} +% \def\versi@ndate{August 02, 2005} +% \def\versi@nno{ver4.03a} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{xymtx-ps} +% \def\versi@ndate{June 15, 2009} +% \def\versi@nno{ver4.04a} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{xymtx-ps} +% \def\versi@ndate{November 05, 2009} +% \def\versi@nno{ver4.05} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{xymtx-pdf} +% \def\versi@ndate{October 01, 2010} +% \def\versi@nno{ver5.00} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{xymtx-pdf} +% \def\versi@ndate{November 23, 2010} +% \def\versi@nno{ver5.00b} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{xymtx-pdf} +% \def\versi@ndate{March 10, 2013} +% \def\versi@nno{ver5.01b} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \def\j@urnalname{xymtx-pdf} +% \def\versi@ndate{May 27, 2013} +% \def\versi@nno{ver5.01bb} +% \def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% \fi +% +% \CheckSum{1761} +%% \CharacterTable +%% {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 +%% 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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +% \setcounter{StandardModuleDepth}{1} +% +% \StopEventually{} +% \MakeShortVerb{\|} +% +% \iffalse +% \changes{v1.00}{2002/05/30}{first edition for LaTeX2e} +% \changes{v4.01}{2004/08/30}{Adjust for XyMTeX version 4.01} +% \changes{v4.02}{2004/12/20}{Wedged bonds for stereochemistry} +% \changes{v4.03}{2005/06/20}{Wave bonds for stereochemistry} +% \changes{v4.03a}{2005/08/02}{Bug fix for the compatibility with +% \changes{v4.04a}{2009/06/15}{Bug fix for \cs{\Put@@@@Direct}} +% \changes{v4.05}{2009/11/05}{Bug fix for \cs{\Put@@@@Direct}; pLaTeXe vs. LaTeXe} +% \changes{v5.00}{2010/10/01}{Change the PostScript mode into the PDF mode} +% \changes{v5.00b}{2010/11/23}{added the pgfcore package for pdflatex} +% \changes{v5.01b}{2013/03/10}{Bug fix for \cs{zahyozobun}} +% \changes{v5.01bb}{2013/05/27}{\cs{WedgeAsSubstX} etc.} +% \changes{v5.01}{2013/06/21}{\cs{WavyAsSubst} etc.} +% \fi +% +% \iffalse +%<*driver> +\NeedsTeXFormat{pLaTeX2e} +% \fi +\ProvidesFile{xymtx-pdf.dtx}[2013/06/21 v5.01 xymtx-pdf package file] +% \iffalse +\documentclass{ltxdoc} +\GetFileInfo{xymtx-pdf.dtx} +% +% %%XyMTeX Logo: Definition 2%%% +\def\UPSILON{\char'7} +\def\XyM{X\kern-.30em\smash{% +\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}} +\def\XyMTeX{\XyM\kern-.1em\TeX} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\title{Chemistry Conventions by {\sffamily xymtx-pdf.sty} +(\fileversion) of \XyMTeX{}} +\author{Shinsaku Fujita \\ +Shonan Institute of Chemoinformatics Mathematical Chemistry, \\ +Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, +Kanagawa-Ken, 258-0019 Japan +} +\date{\filedate} +% +\begin{document} + \maketitle + \DocInput{xymtx-pdf.dtx} +\end{document} +%</driver> +% \fi +% +% \section{Introduction}\label{xymtx-pdf:intro} +% +% This package aims at converting XyMTeX documents into PDF by +% using the dvipdfm(x) converter or its equivalent. The codes +% contained in xymtx-ps.dtx for the PostScript mode of XyMTeX +% have been changed and extended to match direct conversion +% into PDF files. +% +% \subsection{Options for {\sffamily docstrip}} +% +% \DeleteShortVerb{\|} +% \begin{center} +% \begin{tabular}{|l|l|} +% \hline +% \emph{option} & \emph{function}\\ \hline +% xymtxpdf & xymtx-pdf.sty \\ +% driver & driver for this dtx file \\ +% \hline +% \end{tabular} +% \end{center} +% \MakeShortVerb{\|} +% +% \subsection{Version Information} +% +% \begin{macrocode} +%<*xymtxpdf> +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\j@urnalname{xymtx-pdf} +\def\versi@ndate{June 21, 2013} +\def\versi@nno{ver5.01} +\def\copyrighth@lder{SF} % Shinsaku Fujita +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>% +\space[\copyrighth@lder]} +% \end{macrocode} +% +% \section{Input of basic macros} +% +% To assure the compatibility to \LaTeX{}2.09 (the native mode), +% the commands added by \LaTeXe{} have not been used in the resulting sty +% files ({\sf ccycle.sty} for the present case). Hence, the combination +% of |\input| and |\@ifundefined| is used to crossload sty +% files ({\sf chemstr.sty} for the present case) in place of the +% |\RequirePackage| command of \LaTeXe{}. +% The global setting of unit by |\psset| has caused imcompatibility +% with the prosper package and so has been changed into a local setting. +% \changes{v4.03a}{2005/08/02}{Bug fix for the compatibility with +% the prosper package} +% \changes{v5.00b}{2010/11/23}{added the pgfcore package for pdflatex} +% +% \begin{macrocode} +% ************************* +% * input of basic macros * +% ************************* +\@ifundefined{setsixringv}{\input chemstr.sty\relax}{} +\RequirePackage{tikz} +\RequirePackage{pgfcore}%%%added 2010/11/23 by S. Fujita +\RequirePackage{xcolor} +\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,fit,calc} +\unitlength=0.1pt +\def\white{\color{white}} +% \end{macrocode} +% +% \begin{macrocode} +\newif\if@thicklinesw \@thicklineswfalse +\def\Thick@Lines{\@thicklineswtrue}%redefinition +\def\Thin@Lines{\@thicklineswfalse}%redefinition +\def\thickLineWidth{1.6pt} +\def\thinLineWidth{0.4pt} +% \end{macrocode} +% +% Temporary count registers: +% \begin{macrocode} +\newcount\XyMTeXnuma +\newcount\XyMTeXnumb +\newcount\XyMTeXnumc +\newcount\XyMTeXnumd +\newcount\XyMTeXnume +\newcount\XyMTeXnumf +\newcount\XyMTeXnumg +\newcount\XyMTeXnumh +\newcount\XyMTeXnumi +\newcount\XyMTeXcnta +\newcount\XyMTeXcntb +% \end{macrocode} +% +% Temporary dimension registers: +% \begin{macrocode} +\newdimen\XyMTeXdima +\newdimen\XyMTeXdimb +\newdimen\XyMTeXdimc +\newdimen\XyMTeXdimd +\newdimen\XyMTeXdime +% \end{macrocode} +% +% Temporary box registers: +% \begin{macrocode} +\newbox\BondBox +% \end{macrocode} +% +% +% The macro |\Put@@@@Line| can draw dashed bonds or wedged bonds for supporting +% stereochemistry. Two switches are available as follows: +% +% \begin{macro}{changedashtowedge} +% \begin{macro}{changewedgetodash} +% \changes{v4.02}{2004/12/20}{For PS mode: Switch for wedged bonds} +% \begin{macrocode} +\newif\if@wedgesw \@wedgeswtrue +\newif\if@hasheddashsw \@hasheddashswtrue +\def\wedgehasheddash{\@wedgeswtrue\@hasheddashswtrue} +\def\wedgehashedwedge{\@wedgeswtrue\@hasheddashswfalse} +\def\dashhasheddash{\@wedgeswfalse\@hasheddashswtrue} +\@ifundefined{ifmolfront}{\newif\ifmolfront \molfrontfalse}{} +\@ifundefined{if@skbondlist}{\newif\if@skbondlist \@skbondlistfalse}{} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\setUnitHalfScale} +% +% The macro |\setUnitHalfScale| calculates the half of a line width +% (such as |\thinLineWidth| and |\thickLineWidth|), which is used +% to adjust the staring point of a bond line. This macro is used +% in |\PUT@@@@bondLINE|. +% +% \begin{macro}{\NumRound} +% \begin{macro}{\UHalfScaleGain} +% These macros result in, e.g., +% 0.4pt $\rightarrow$ 0.4/0.1 (/2) $\rightarrow$ 1.999 $\rightarrow$ 2. +% (Not used) +% +% \begin{macrocode} +\def\NumRound#1.#2#3\@nil{%shishagonyu +\begingroup +\XyMTeXcnta=0 \XyMTeXcntb=0 +\XyMTeXcnta=#1 %%\typeout{A:\the\XyMTeXcnta;} +\XyMTeXcntb=#2 %%\typeout{B:\the\XyMTeXcntb;} +\ifnum\XyMTeXcntb<5 \else +\advance\XyMTeXcnta by1 %%\typeout{C:\the\XyMTeXcnta;} +\fi\xdef\@UHalfScale{\the\XyMTeXcnta}\endgroup} +{\catcode`\p=12 \catcode`\t=12 +\gdef\UHalfScaleGain#1pt{\gdef\@@UHalfScale{#1}}} +\def\setUnitHalfScale#1{% +\@tempdima=#1 \dimen0=0.1pt +\@tempcnta=\@tempdima +\@tempcntb=\dimen0 +\multiply\@tempcntb by10 +\divide\@tempcntb by65536% +\divide\@tempdima by \@tempcntb +\multiply\@tempdima by5 %%\typeout{D:\the\@tempdima} +\expandafter\UHalfScaleGain\the\@tempdima% +\expandafter\NumRound\@@UHalfScale\@nil +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\PutSimpleBondBox} +% \changes{v5.00}{2010/10/01}{For PDF mode: macro for adjusting the position of +% a simple bond (straight line, dashed line, etc.)} +% The macro |\PutSimpleBondBox| is used to adjust the coordinates of joint positions +% by using the macros |\PUT@@@@bondLINE| and |h@shedd@shbond|, which draw simple bonds +% such as straight lines and dashed lines. +% +% \begin{macrocode} +%\newbox\BondBox +\def\PutSimpleBondBox(#1,#2)(#3,#4)#5{%for simple bonds +\setbox\BondBox=\hbox{#5}% +\XyMTeXdima=#1\unitlength +\XyMTeXdimb=#3\unitlength +\XyMTeXdimc=\thickLineWidth +\divide\XyMTeXdimc by2%adjustment by the half of a line width +\ifdim \XyMTeXdima>\XyMTeXdimb\relax +\XyMTeXdimd=\XyMTeXdima +\XyMTeXdime=\XyMTeXdimb +\advance\XyMTeXdime by -\XyMTeXdimd +\advance\XyMTeXdime by -\XyMTeXdimc +\put(#1,#2){\kern\XyMTeXdime\box\BondBox}% +\else +\ifdim \XyMTeXdima=\XyMTeXdimb\relax +\XyMTeXdimd=-\XyMTeXdimc +%%%\put(#1,#2){\kern\XyMTeXdimd\raise\XyMTeXdimd\hbox{\box\BondBox}}% +\put(#1,#2){\kern\XyMTeXdimd\box\BondBox}% +\else +\XyMTeXdimd=-\XyMTeXdimc +\put(#1,#2){\kern\XyMTeXdimd\box\BondBox}% +\fi\fi% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tikznodimension} +% \changes{v5.00}{2010/10/01}{For PDF mode: macro for typesetting an object +% as having no dimensions. } +% The macro |\tikznodimension| is used in place of the macro |\PutSimpleBondBox|, which +% is originally used to adjust the coordinates of joint positions. +% Thereby, the macros |\PUT@@@@bondLINE| and |h@shedd@shbond| have a more rigorous basis +% in putting such simple bonds as straight lines and dashed lines. +% +% \begin{macrocode} +\def\tikznodimension#1{\tikz{% +\pgfpathrectangle{\pgfpointorigin}{\pgfpointorigin} +\pgfusepath{use as bounding box} % draws nothing +#1}} +% \end{macrocode} +% \end{macro} +% +% The macro |\PUT@@@@bondLINE| is used in the macro |\Put@@@@Line|, +% which draws a bond line. This macro relies on the |\tikz| graphic +% enviroment. +% +% \begin{macro}{\PUT@@@@bondLINE} +% \begin{macro}{\PutPDFLine} +% \changes{v5.00}{2010/10/01}{For PDF mode: macro for +% drawing a straight-line bond after adjusting its joint position} +% \begin{macrocode} +\def\PUT@@@@bondLINE(#1,#2)(#3,#4)#5{% +\begingroup +%\setbox0=\hbox{% +%\tikz[baseline=(X.base)]{% +%\draw[line width=#5,line cap=round]% +%(#1\unitlength,#2\unitlength) coordinate (X) -- (#3\unitlength,#4\unitlength);}}% +%\PutSimpleBondBox(#1,#2)(#3,#4){\box0}% +\tikznodimension{% +\draw[line width=#5]% +(#1\unitlength,#2\unitlength) -- (#3\unitlength,#4\unitlength);}% +\endgroup +} +\let\PutPDFLine=\PUT@@@@bondLINE%for user's use +\let\PutBondLine=\PUT@@@@bondLINE%for user's use +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\PutBondBox} +% \changes{v5.00}{2010/10/01}{For PDF mode: a macro for putting a bond box +% after adjusting coordinates. } +% The macro |\PutBondBox| put a bond box at an adjusted point, +% where the bond box contain a wadge or wavy bond drawn by using +% the pgf package (\verb/\tikz/). The macro is used in the +% macros |\PUT@@@@wedgeLINE| and |\PUT@@@@wavyLINE|. +% \begin{macrocode} +%\newbox\BondBox +\def\PutBondBox(#1,#2)(#3,#4)#5{%for wedge and wavy bonds +\setbox\BondBox=\hbox{#5}% +\XyMTeXdima=#1\unitlength +\XyMTeXdimb=#3\unitlength +\XyMTeXdimc=4pt% +\divide\XyMTeXdimc by2%adjustment by the half of a line width +\if@vertbond +\XyMTeXdimd=\wd\BondBox +\divide\XyMTeXdimd by2\relax +\put(#1,#2){\kern-1.2\XyMTeXdimd\box\BondBox}%%tentative factor 1.2 +\else +\if@horizbond +\ifdim \XyMTeXdima>\XyMTeXdimb\relax +\XyMTeXdimd=\XyMTeXdima +\XyMTeXdime=\XyMTeXdimb +\advance\XyMTeXdime by -\XyMTeXdimd +\put(#1,#2){\kern-5\unitlength\kern\XyMTeXdime\box\BondBox}%tentative factor 5 %%% +\else +\put(#1,#2){\kern-1.2\unitlength\box\BondBox}%tentative factor 1.2 +\fi +\else +%% +\ifdim \XyMTeXdima>\XyMTeXdimb\relax +\XyMTeXdime=-\wd\BondBox +\put(#1,#2){\kern0.2\unitlength\kern\XyMTeXdime\box\BondBox}%tentative shift factor +\else +\ifdim \wd\BondBox<4.3pt\relax +\XyMTeXdimd=\wd\BondBox +\divide\XyMTeXdimd by2\relax +\put(#1,#2){\kern-1.3\XyMTeXdimd\box\BondBox}%tentative shift factor 1.3 +% +\else +\put(#1,#2){\kern-3\unitlength\box\BondBox}%tentative shift factor 3 +\fi\fi +\fi\fi} +% \end{macrocode} +% \end{macro} +% +% The macro |\PUT@@@@wedgeLINE| is used in the macro |\Put@@@@Line|, +% which draws a bond wedge. This macro relies on the |\tikz| graphic +% enviroment. +% +% \begin{macro}{\PUT@@@@wedgeLINE} +% \changes{v5.00}{2010/10/01}{For PDF mode: a macro for putting a wedge bond. } +% \begin{macrocode} +\newif\if@vertbond \@vertbondfalse +\newif\if@horizbond \@horizbondfalse +\def\PUT@@@@wedgeLINE(#1,#2)(#3,#4)(#5,#6){% +\begingroup +%\setbox0=\hbox{% +%\tikz[baseline=(X.base)]{% +%\filldraw[black,line cap=round]% +%(#1\unitlength,#2\unitlength) coordinate (X) -- (#3\unitlength,#4\unitlength)% +%-- (#5\unitlength,#6\unitlength) -- (#1\unitlength,#2\unitlength);}}% +%\PutBondBox(#1,#2)(#3,#4){\box0}%adjustment +\tikznodimension{% +\filldraw% +(#1\unitlength,#2\unitlength) -- (#3\unitlength,#4\unitlength)% +-- (#5\unitlength,#6\unitlength) -- (#1\unitlength,#2\unitlength);}% +\endgroup +} +% \end{macrocode} +% \end{macro} +% +% The macro |\PUT@@@@wavyLINE| is used in the macro |\Put@@@@Line|, +% which draws a wavy bond. This macro relies on the |\tikz| graphic +% enviroment. +% +% \begin{macro}{\PUT@@@@wavyLINE} +% \changes{v5.00}{2010/10/01}{For PDF mode: a macro for putting a wavy bond. } +% \begin{macrocode} +\def\PUT@@@@wavyLINE(#1,#2)(#3,#4){% +\begingroup +%\setbox0=\hbox{% +%\tikz[baseline=(X.base)]{% +%\draw[line cap=round,decorate, +%decoration={coil,aspect=0,segment length=2pt,amplitude=1pt}]% +%(#1\unitlength,#2\unitlength) coordinate (X) -- (#3\unitlength,#4\unitlength);}}% +%\PutBondBox(#1,#2)(#3,#4){\box0}%adjustment +\tikznodimension{% +\draw[decorate, +decoration={coil,aspect=0,segment length=2pt,amplitude=1pt}]% +(#1\unitlength,#2\unitlength) coordinate (X) -- (#3\unitlength,#4\unitlength);}% +\endgroup +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Put@@@@Line} +% \changes{v4.02}{2004/12/20}{For PS modes: Wedged bonds for stereochemistry} +% \changes{v4.03}{2005/07/20}{For PS modes: Switch for wave bonds} +% \changes{v5.00}{2010/10/01}{For PDF mode: a macro for putting a bond line. } +% +% Temporary count registers: +% \begin{macrocode} +\newcount\@tempcntXa \newcount\@tempcntYa \newcount\@tempcntz +\newcount\@tempcntXb \newcount\@tempcntYb \newcount\@tempcntzz +\newcount\@tempcntXc \newcount\@tempcntYc \newcount\@tempcntzzz +% \end{macrocode} +% +% \begin{macrocode} +\long\gdef\Put@@@@Line(#1,#2)(#3,#4)#5{% +\begingroup +%%x-coordinate +\@tempcntXa=0\relax +\ifnum#3>0\relax \@tempcntXa=#5\relax +\else\ifnum#3<0\relax\@tempcntXa=-#5\relax\fi\fi +\advance\@tempcntXa by#1\relax +%%y-coordinate +\@tempcntYa=#5\relax +\ifnum#3=0\relax\else +\multiply\@tempcntYa by#4\relax\multiply\@tempcntYa by10\relax +\divide\@tempcntYa by#3\relax\divide\@tempcntYa by10\relax\fi +\ifnum\@tempcntYa<0\relax +\ifnum#4>0\relax\@tempcntYa=-\@tempcntYa\fi +\else +\ifnum\@tempcntYa>0\relax +\ifnum#4<0\relax\@tempcntYa=-\@tempcntYa\fi\fi +\fi +\advance\@tempcntYa by#2\relax +% +\if@thicklinesw +\if@wedgesw +\ifmolfront%bold dash bond for skeletal bond for pyranose etc. +\PUT@@@@bondLINE(#1,#2)(\the\@tempcntXa,\the\@tempcntYa){\thickLineWidth}% +\else +\if@skbondlist%bold dash bond skeletal bond for general cases +\PUT@@@@bondLINE(#1,#2)(\the\@tempcntXa,\the\@tempcntYa){\thickLineWidth}% +\else%wedged bond +\ifnum#1=#3 +\@vertbondtrue\@horizbondfalse +\else +\ifnum#2=#4 +\@vertbondfalse\@horizbondtrue +\else +\@vertbondfalse\@horizbondfalse +\fi\fi +\stereo@wedgedimension(#3,#4){10}% +\PUT@@@@wedgeLINE(#1,#2)(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% +\fi\fi +\else +\PUT@@@@bondLINE(#1,#2)(\the\@tempcntXa,\the\@tempcntYa){\thickLineWidth}% +\fi +\else +\ifwavebond +\ifnum#1=#3 +\@vertbondtrue\@horizbondfalse +\else +\ifnum#2=#4 +\@vertbondfalse\@horizbondtrue +\else +\@vertbondfalse\@horizbondfalse +\fi\fi +\PUT@@@@wavyLINE(#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% +\else +\PUT@@@@bondLINE(#1,#2)(\the\@tempcntXa,\the\@tempcntYa){\thinLineWidth}% +\fi +\fi +\@tempcntXa=0\relax \@tempcntYa=0\relax +\endgroup}%end of Put@@@@Line +% \end{macrocode} +% \end{macro} +% +% The macro |\stereo@wedgedimension| calculates the coordinates of three positions +% for drawing a wedged bond, which is drawn by the |\pspolygon| command of the PSTricks package. +% +% \begin{macro}{stereo@wedgedimension} +% \changes{v4.02}{2004/12/20}{For PS mode: Wedged bonds for stereochemistry} +% \begin{macrocode} +\newif\if@wedgeadjust +\def\stereo@wedgedimension(#1,#2)#3{% +\@tempcntXb=0\relax +\@tempcntYb=0\relax +\@tempcntXc=0\relax +\@tempcntYc=0\relax +%% +\@wedgeadjustfalse +\ifnum#1<0 \@tempcntzz=-#1\else\@tempcntzz=#1\fi +\ifnum#2<0 \@tempcntzzz=-#2\else\@tempcntzzz=#2\fi +\ifnum#1=0\else +\multiply\@tempcntzzz by10\relax \divide\@tempcntzzz by\@tempcntzz\fi%% (3/5)x10=6 +\ifnum\@tempcntzzz>7\relax\else\@wedgeadjusttrue\fi +%%one point of wedge +\ifnum#1=0\relax +\@tempcntXb=#3 \advance\@tempcntXb by8\relax +\@tempcntYb=0\relax +\else +\ifnum#2=0\relax +\@tempcntXb=0\relax +\@tempcntYb=#3 \advance\@tempcntYb by8\relax +\else +\@tempcntXb=#3\relax +\@tempcntYb=-#3\relax +\if@wedgeadjust +\advance\@tempcntXb by8\relax +\advance\@tempcntYb by-8\relax +\fi +\multiply\@tempcntXb by#2\relax\multiply\@tempcntXb by10\relax +\divide\@tempcntXb by#1\relax\divide\@tempcntXb by10\relax\fi\fi +\advance\@tempcntXb by\@tempcntXa\relax +\advance\@tempcntYb by\@tempcntYa\relax +%%other point of wedge +\ifnum#1=0\relax +\@tempcntXc=-#3 \advance\@tempcntXc by-8\relax +\@tempcntYc=0\relax +\else +\ifnum#2=0\relax +\@tempcntXc=0\relax +\@tempcntYc=-#3 \advance\@tempcntYc by-8\relax +\else +\@tempcntXc=-#3\relax +\@tempcntYc=#3\relax +\if@wedgeadjust +\advance\@tempcntXc by-6\relax +\advance\@tempcntYc by6\relax +\fi +\multiply\@tempcntXc by#2\relax\multiply\@tempcntXc by10\relax +\divide\@tempcntXc by#1\relax\divide\@tempcntXc by10\relax\fi\fi +\advance\@tempcntXc by\@tempcntXa\relax +\advance\@tempcntYc by\@tempcntYa\relax +}%%end of \stereo@wedgedimension +% \end{macrocode} +% \end{macro} +% +% The |Put@@@@Direct| macro is the same as the original command +% |\put| for the LaTeX picture environment. +% +% \begin{macro}{Put@@@@Direct} +% \changes{v5.00}{2010/10/01}{For PDF mode: a macro for putting an object. } +% \begin{macrocode} +\let\Put@@@@Direct=\put +% \end{macrocode} +% \end{macro} +% +% The macros |\Put@@@@oCircle| and |\Put@@@@sCircle| draw +% small circles for designating original points. +% +% \begin{macro}{\Put@@@@oCircle} +% \begin{macrocode} +\def\Put@@@@oCircle(#1,#2)#3{\begingroup% + \@tempcntz=#3 \divide\@tempcntz by2\relax +%dimension \pgf@xx or \pgf@yy overflow +%\setbox0=\hbox{% +%{\tikz[baseline=(X.base)]{% +%\draw[scale=\@UScale,line width=0.4pt]% +%(#1,#2) coordinate (X) circle (\@tempcntz);}}}% +\setbox0=\hbox{% +{\tikz[baseline=(X.base)]{% +\draw[line width=0.4pt]% +(#1\unitlength,#2\unitlength) coordinate (X) circle (\@tempcntz\unitlength);}}}% +\put(#1,#2){\kern-0.5\wd0\hbox{\box0}}% +\endgroup} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Put@@@@sCircle} +% \begin{macrocode} +\def\Put@@@@sCircle(#1,#2)#3{\begingroup% + \@tempcntz=#3 \divide\@tempcntz by2\relax +%dimension pgf@xx or pgf@yy overflow +%\setbox0=\hbox{% +%{\tikz[baseline=(X.base)]{% +%\draw[scale=\@UScale,line width=2pt]% +%(#1,#2) coordinate (X) circle (\@tempcntz);}}}% +\setbox0=\hbox{% +{\tikz[baseline=(X.base)]{% +\draw[line width=2pt]% +(#1\unitlength,#2\unitlength) coordinate (X) circle (\@tempcntz\unitlength);}}}% +\put(#1,#2){\kern-0.5\wd0\hbox{\box0}}% +\endgroup} +% \end{macrocode} +% \end{macro} +% +% Dotted lines by the old macro |\d@@t@rline| are changed into hashed dash bonds +% in the new macro |\d@@t@@rline| (|\@wedgeswfalse|). If |\@wedgeswtrue| is +% declared (default), the new macro draws a hashed wedged bonds. +% +% \begin{macro}{d@@t@@rline} +% \changes{v4.02}{2004/12/20}{Hashed wedged bonds for stereochemistry} +% \changes{v5.00}{2010/10/01}{Renamed for PDF mode} +% \begin{macrocode} +\def\d@@t@@rline(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% +\if@hasheddashsw + \@ifundefined{tikz}{% + \XyMTeXWarning{A dottedline is replaced by a solid line.}% + \Put@Line(#1,#2)(#3,#4){#5}% + }{{\thicklines% + \h@shedd@shbond(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)}}% +\else +\if@skbondlist%hashed dash bond skeletal bond for general cases + \@ifundefined{tikz}{% + \XyMTeXWarning{A dottedline is replaced by a solid line.}% + \Put@Line(#1,#2)(#3,#4){#5}% + }{{\thicklines% + \h@shedd@shbond(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)}}% +\else + \h@shedw@dgebond(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)% +\fi\fi +}%end of \d@@t@@rline +% \end{macrocode} +% \end{macro} +% +% The inner macro |\h@shedd@shbond| works in the macro |\d@@t@@rline| for +% drawing a hased dash bond. +% +% \begin{macro}{h@shedd@shbond} +% \changes{v4.02}{2004/12/20}{For PS mode: Hashed dash bonds for stereochemistry} +% \changes{v5.00}{2010/10/01}{Renamed for PDF mode: macro for +% drawing a hashed dash bond after adjusting its joint position} +% \begin{macrocode} +\def\h@shedd@shbond(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% +\begingroup +\@tempcntzz=12\relax +\@tempcntzzz=-30\relax%almost no shortening +\bond@shorten(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)% +%\ifdim\unitlength>0.08pt +%\setbox0=\hbox{% +%\tikz[baseline=(X.base)]{% +%\draw[dashed,line width=\thickLineWidth,dash pattern=on 1pt off 1.2pt]% +%(\@tempcntXb\unitlength,\@tempcntYb\unitlength) coordinate (X) --% +%(\@tempcntXc\unitlength,\@tempcntYc\unitlength);}}% +%\else +%\setbox0=\hbox{% +%\tikz[baseline=(X.base)]{% +%\draw[dashed,line width=\thickLineWidth,dash pattern=on 0.8pt off 1pt]% +%(\@tempcntXb\unitlength,\@tempcntYb\unitlength) coordinate (X) --% +%(\@tempcntXc\unitlength,\@tempcntYc\unitlength);}}% +%\fi +%\PutSimpleBondBox(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc){\box0}% +\ifdim\unitlength>0.08pt +\tikznodimension{% +\draw[dashed,line width=\thickLineWidth,dash pattern=on 1pt off 1.2pt]% +(\@tempcntXb\unitlength,\@tempcntYb\unitlength) coordinate (X) --% +(\@tempcntXc\unitlength,\@tempcntYc\unitlength);}% +\else +\tikznodimension{% +\draw[dashed,line width=\thickLineWidth,dash pattern=on 0.8pt off 1pt]% +(\@tempcntXb\unitlength,\@tempcntYb\unitlength) coordinate (X) --% +(\@tempcntXc\unitlength,\@tempcntYc\unitlength);}% +\fi +\endgroup} +% \end{macrocode} +% \end{macro} +% +% The inner macro |\h@shedw@dgebond| works in the macro |\d@@t@@rline| for +% drawing a hashed wedged bond. +% +% +% \begin{macro}{h@shedw@dgebond} +% \changes{v4.02}{2004/12/20}{For PS mode: Hashed wedged bonds for stereochemistry} +% \changes{v5.00}{2010/10/01}{For PDF mode: Hashed wedged bonds for stereochemistry} +% \begin{macrocode} +\def\h@shedw@dgebond(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% +\begingroup +\@tempcntXa=#8\relax +\@tempcntYa=#9\relax +\stereo@wedgedimension(#3,#4){10}% +\XyMTeXnumf=\@tempcntXb +\XyMTeXnumg=\@tempcntYb +\XyMTeXnumh=\@tempcntXc +\XyMTeXnumi=\@tempcntYc +\@tempcntzz=5\relax +\@tempcntzzz=-12\relax +\bond@shorten(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)% +%\setbox0=\hbox{% +%\tikz[baseline=(X.base)]{% +%\filldraw[black,line cap=round]% +%(#1\unitlength,#2\unitlength) coordinate (X) --% +%(\XyMTeXnumf\unitlength,\XyMTeXnumg\unitlength) --% +%(\XyMTeXnumh\unitlength,\XyMTeXnumi\unitlength) -- (#1\unitlength,#2\unitlength);% +%\draw[dashed,line width=4pt,dash pattern=on 1pt off 1.2pt,color=white]% +%(\@tempcntXb\unitlength,\@tempcntYb\unitlength) --% +%(\@tempcntXc\unitlength,\@tempcntYc\unitlength);% +%}}% +%\PutBondBox(#1,#2)(\the\@tempcntXc,\the\@tempcntYc){\box0}% +\tikznodimension{% +\filldraw% +(#1\unitlength,#2\unitlength) --% +(\XyMTeXnumf\unitlength,\XyMTeXnumg\unitlength) --% +(\XyMTeXnumh\unitlength,\XyMTeXnumi\unitlength) -- (#1\unitlength,#2\unitlength);% +\draw[dashed,line width=4pt,dash pattern=on 1pt off 1.2pt,color=white]% +(\@tempcntXb\unitlength,\@tempcntYb\unitlength) --% +(\@tempcntXc\unitlength,\@tempcntYc\unitlength);}% +\endgroup +}%%end of \h@shedw@dgebond +% \end{macrocode} +% \end{macro} +% +% The inner macro |\bond@shorten| works in the macros |\h@shedd@shbond| and |\h@shedw@dgebond| for +% shortening the resulting hashed bonds. This macro calculates the coordinates of the staring +% point and the end point. +% +% \begin{macro}{bond@shorten} +% \changes{v4.02}{2004/12/20}{Hashed forms for dash and wedged bonds} +% \begin{macrocode} +\def\bond@shorten(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% +\@tempcntXb=#8\relax +\@tempcntYb=#9\relax +\advance\@tempcntXb by-#6\relax \divide\@tempcntXb by\@tempcntzz\relax +\advance\@tempcntYb by-#7\relax \divide\@tempcntYb by\@tempcntzz\relax +\advance\@tempcntXb by#6\relax +\advance\@tempcntYb by#7\relax +\@tempcntXc=#8\relax +\@tempcntYc=#9\relax +\advance\@tempcntXc by-#6\relax \divide\@tempcntXc by\@tempcntzzz\relax +\advance\@tempcntYc by-#7\relax \divide\@tempcntYc by\@tempcntzzz\relax +\advance\@tempcntXc by#8\relax +\advance\@tempcntYc by#9\relax +}%%end of \bondshorten +% \end{macrocode} +% \end{macro} +% +% Skeletal bold bonds can be changed into wedges, where +% |\WedgeAsSubst| is described in an ATOMLIST as a kind of +% spiro substituent. +% +% \begin{macro}{WedgeAsSubst} +% \changes{v4.02}{2004/12/20}{For PS mode: Wedged skeletal bonds} +% \changes{v5.00}{2010/10/01}{For PDF mode: Checked OK} +% \begin{macrocode} +\def\WedgeAsSubstPDF(#1,#2)(#3,#4)#5{% +\begingroup +\@thicklineswtrue \@wedgeswtrue +\molfrontfalse \@skbondlistfalse +\Put@@@@Line(#1,#2)(#3,#4){#5}% +\endgroup} +\let\WedgeAsSubst=\WedgeAsSubstPDF%for compatibility to PS mode +% \end{macrocode} +% \end{macro} +% +% The macro |\stereo@wedgedimensionX| has a starting point, +% an endpoint, and the width of a wedge as its arguments. +% Compare this command with |\stereo@wedgedimension|, which has +% a starting point, a slope, and the width of a wedge +% as its arguments. +% +% \begin{macro}{stereo@wedgedimensionX} +% \changes{v5.01}{2013/05/27}{dimension of wedge} +% \begin{macrocode} +\def\stereo@wedgedimensionX(#1,#2)(#3,#4){% +\@ifnextchar[{\stereo@@wedgedimensionX(#1,#2)(#3,#4)}% +{\stereo@@wedgedimensionX(#1,#2)(#3,#4)[10]}} +\def\stereo@@wedgedimensionX(#1,#2)(#3,#4)[#5]{% +\@tempcnta=-#1\relax +\advance\@tempcnta by#3\relax +%%\typeout{KKK:\the\@tempcnta}% +\@tempcntb=-#2\relax +\advance\@tempcntb by#4\relax +%%%\typeout{LLL:\the\@tempcntb}% +\stereo@wedgedimension(\the\@tempcnta,\the\@tempcntb){#5}% +%%%\typeout{MMM; (\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)} +\advance\@tempcntXb by#3\relax +\advance\@tempcntYb by#4\relax +\advance\@tempcntXc by#3\relax +\advance\@tempcntYc by#4\relax} +% \end{macrocode} +% \end{macro} +% +% The macro |\WedgeAsSubstX| has a starting point, +% an endpoint, and the width of a wedge as its arguments. +% Compare this command with |\WedgeAsSubst|, which has +% a starting point, a slope, and the width of a wedge +% as its arguments. +% +% \begin{macro}{WedgeAsSubstX} +% \changes{v5.01}{2013/05/27}{For PDF mode: Checked OK} +% \begin{macrocode} +\def\WedgeAsSubstXPDF(#1,#2)(#3,#4){% +\@ifnextchar[{\Wedge@AsSubstXPDF(#1,#2)(#3,#4)}% +{\Wedge@AsSubstXPDF(#1,#2)(#3,#4)[10]}} +\def\Wedge@AsSubstXPDF(#1,#2)(#3,#4)[#5]{% +\begingroup +\stereo@wedgedimensionX(#1,#2)(#3,#4)[#5]% +\PUT@@@@wedgeLINE(#1,#2)(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% +\endgroup} +\let\WedgeAsSubstX=\WedgeAsSubstXPDF%for compatibility to PDF mode +% \end{macrocode} +% \end{macro} +% +% The macro |\NumR@und| gives a round integer. +% For example 1.99996 is transformed into 2. A negative +% value is permitted. +% +% \begin{macro}{\NumR@und} +% \changes{v5.00}{2010/10/01}{For PDF mode} +% \begin{macrocode} +\def\NumR@und#1.#2#3\@nil{%shishagonyu +\begingroup +\XyMTeXcnta=0 \XyMTeXcntb=0\relax +\XyMTeXcnta=#1 %%\typeout{A:\the\XyMTeXcnta;} +\XyMTeXcntb=#2 %%\typeout{B:\the\XyMTeXcntb;} +\ifnum\XyMTeXcnta>0\relax +\ifnum\XyMTeXcntb<5 \else +\advance\XyMTeXcnta by1 %%\typeout{C:\the\XyMTeXcnta;} +\fi +\else +\ifnum\XyMTeXcntb<5 \else +\advance\XyMTeXcnta by-1 %%\typeout{C:\the\XyMTeXcnta;} +\fi\fi\xdef\@yzobun{\the\XyMTeXcnta}\endgroup} +% \end{macrocode} +% \end{macro} +% +% The macro |\zahyozobun| calculates the increments of x- and y-coordinates +% by starting from a slope of the LaTeX picture environment. +% For example, the slope (5,3) (for the argument \verb/(#3,#4)/ and the x-increment \verb/#5/=171) +% is transformed to give an x-increment (\verb/\@xzobun/ = 171) and +% an y-increment (\verb/\@yzobun/ = 103). When the slope is (0,1) etc., we put the +% x-increment (\verb/\@xzobun/ = 0) and y-increment (\verb/\@yzobun/ = \verb/#5/). +% +% \begin{macro}{\zahyozobun} +% \changes{v5.00}{2010/10/01}{For PDF mode} +% \changes{v5.01}{2013/03/10}{Bug fix for the slope (0,1) etc.} +% \begin{macrocode} +{\catcode`\p=12 \catcode`\t=12 +\gdef\zobunGain#1pt{\gdef\@zobun{#1}}} + +\def\zahyozobun(#1,#2)(#3,#4)#5{% +\@tempdima=#5\unitlength +\@tempdimb=#3\unitlength +\@tempcnta=\@tempdima +\ifdim\@tempdimb<0pt +\@tempcntb=-\@tempdimb +\else +\@tempcntb=\@tempdimb +\fi +%% +\ifdim\@tempdimb=0pt%bugfix 2013/02/06 +\else +%% +\multiply\@tempcntb by10\relax +\divide\@tempcntb by65536% +\divide\@tempdima by \@tempcntb +\multiply\@tempdima by#4\relax +\multiply\@tempdima by10 %%\typeout{D:\the\@tempdima} +\expandafter\zobunGain\the\@tempdima% +\expandafter\NumR@und\@zobun\@nil +\fi%%% +\ifnum#3<0 +\xdef\@xzobun{-#5}% +\else +\ifnum#3=0%bugfix 2013/02/06 +\xdef\@xzobun{#3}% +\ifnum#4<0 +\xdef\@yzobun{-#5}% +\else +\xdef\@yzobun{#5}% +\fi%bugfix 2013/02/06 +\else +\xdef\@xzobun{#5}% +\fi +\fi +} +% \end{macrocode} +% \end{macro} +% +% The inner macro |\bond@sh@rten| works in a similar way to |\bond@shorten| for +% shortening the resulting hashed bonds. This macro calculates the coordinates of the starting +% point and the end point. +% +% \begin{macro}{\bond@sh@rten} +% \changes{v5.00}{2010/10/01}{For PDF mode: Hashed forms for dash and wedged bonds} +% \begin{macrocode} +\def\bond@sh@rten(#1,#2)(#3,#4)#5{%%%%%%%/(#6,#7)(#8,#9){% +\zahyozobun(#1,#2)(#3,#4){#5}% +\@tempcntXb=\@xzobun\relax%%\typeout{SSS:\@xzobun} +\@tempcntYb=\@yzobun\relax%%\typeout{TTT:\@yzobun} +\divide\@tempcntXb by\@tempcntzz\relax +\divide\@tempcntYb by\@tempcntzz\relax +\advance\@tempcntXb by#1\relax +\advance\@tempcntYb by#2\relax +\@tempcntXc=\@xzobun\relax%%\typeout{KKKK:\@xzobun} +\@tempcntYc=\@yzobun\relax%%\typeout{LLLL:\@yzobun} +\divide\@tempcntXc by\@tempcntzzz\relax +\divide\@tempcntYc by\@tempcntzzz\relax +\advance\@tempcntXc by#1\relax +\advance\@tempcntXc by\@xzobun\relax%%\typeout{AAAA:\the\@tempcntXc} +\advance\@tempcntYc by#2\relax +\advance\@tempcntYc by\@yzobun\relax%%\typeout{BBBB:\the\@tempcntYc} +}%%end of \bondshorten +% \end{macrocode} +% \end{macro} + +% Skeletal hashed dash bonds can be changed into hashed wedges, where +% |\HashWedgeAsSubst| is described in an ATOMLIST as a kind of +% spiro substituent. This macro is essentially equivalent to +% the macro |h@shedw@dgebond|, whose last four arguments are omitted. +% +% \begin{macro}{HashWedgeAsSubst} +% \changes{v4.02}{2004/12/20}{For PS mode: Hashed wedged bonds for stereochemistry} +% \changes{v5.00}{2010/10/01}{For PDF mode: Hashed wedged bonds for stereochemistry} +% \begin{macrocode} +\def\HashWedgeAsSubstPDF(#1,#2)(#3,#4)#5{% +\begingroup +\zahyozobun(#1,#2)(#3,#4){#5}% +\@tempcntXa=\@xzobun\relax +\advance\@tempcntXa by#1\relax +\@tempcntYa=\@yzobun\relax +\advance\@tempcntYa by#2\relax +\stereo@wedgedimension(#3,#4){10}% +\XyMTeXnumf=\@tempcntXb%%\typeout{CCCCF:\the\XyMTeXnumf} +\XyMTeXnumg=\@tempcntYb%%\typeout{CCCCG:\the\XyMTeXnumg} +\XyMTeXnumh=\@tempcntXc%%\typeout{CCCCH:\the\XyMTeXnumh} +\XyMTeXnumi=\@tempcntYc%%\typeout{CCCCI:\the\XyMTeXnumi} +\@tempcntzz=5\relax +\@tempcntzzz=-12\relax +\bond@sh@rten(#1,#2)(#3,#4){#5}% +%\setbox0=\hbox{% +%\tikz[baseline=(X.base)]{% +%\filldraw[black,line cap=round]% +%(#1\unitlength,#2\unitlength) coordinate (X) --% +%(\XyMTeXnumf\unitlength,\XyMTeXnumg\unitlength) --% +%(\XyMTeXnumh\unitlength,\XyMTeXnumi\unitlength) -- (#1\unitlength,#2\unitlength);% +%\draw[dashed,line width=4pt,dash pattern=on 1pt off 1.2pt,color=white]% +%(\@tempcntXb\unitlength,\@tempcntYb\unitlength) --% +%(\@tempcntXc\unitlength,\@tempcntYc\unitlength);% +%}}% +%\PutBondBox(#1,#2)(\the\@tempcntXc,\the\@tempcntYc){\box0}% +\tikznodimension{% +\filldraw% +(#1\unitlength,#2\unitlength) coordinate (X) --% +(\XyMTeXnumf\unitlength,\XyMTeXnumg\unitlength) --% +(\XyMTeXnumh\unitlength,\XyMTeXnumi\unitlength) -- (#1\unitlength,#2\unitlength);% +\draw[dashed,line width=4pt,dash pattern=on 1pt off 1.2pt,color=white]% +(\@tempcntXb\unitlength,\@tempcntYb\unitlength) --% +(\@tempcntXc\unitlength,\@tempcntYc\unitlength);}% +\endgroup +}%%end of \HashWedgeAsSubstPDF +\let\HashWedgeAsSubst=\HashWedgeAsSubstPDF%For compatibility to PS mode +% \end{macrocode} +% \end{macro} +% +% The macro |\HashWedgeAsSubstX| has a starting point, +% an endpoint, and the width of a wedge as its arguments. +% Compare this command with |\HashWedgeAsSubst|, which has +% a starting point, a slope, and the width of a wedge +% as its arguments. +% +% \begin{macro}{HashWedgeAsSubstX} +% \changes{v5.01}{2013/05/27}{For PDF mode: Hashed wedged bonds for stereochemistry} +% \begin{macrocode} +\def\HashWedgeAsSubstXPDF(#1,#2)(#3,#4){% +\@ifnextchar[{\HashWedge@AsSubstXPDF(#1,#2)(#3,#4)}% +{\HashWedge@AsSubstXPDF(#1,#2)(#3,#4)[10]}} +\def\HashWedge@AsSubstXPDF(#1,#2)(#3,#4)[#5]{% +\begingroup +\WedgeAsSubstXPDF(#1,#2)(#3,#4)[#5]% +\@tempdima=#5\unitlength \multiply\@tempdima by3\relax +\advance\@tempdima by1pt%adjustment +\tikznodimension{% +\draw[dashed,line width=\@tempdima, +dash pattern=on 1pt off 1.2pt,color=white]% +(#1\unitlength,#2\unitlength) --% +(#3\unitlength,#4\unitlength);}% +\endgroup +}%%end of \HashWedgeAsSubstXPDF +\let\HashWedgeAsSubstX=\HashWedgeAsSubstXPDF%For compatibility to PDF mode +% \end{macrocode} +% \end{macro} +% +% Skeletal bold bonds can be changed into wavy bonds, where +% |\WavyAsSubst| is described in an ATOMLIST as a kind of +% spiro substituent. +% +% \begin{macro}{\WavyAsSubst} +% \changes{v5.01}{2004/06/21}{For PDF mode: Wavy skeletal bonds} +% \begin{macrocode} +\def\WavyAsSubstPDF(#1,#2)(#3,#4)#5{% +\begingroup +\wavebondtrue +\Put@@@@Line(#1,#2)(#3,#4){#5}% +\endgroup} +\let\WavyAsSubst=\WavyAsSubstPDF%for compatibility to PS mode +% \end{macrocode} +% \end{macro} +% +% The macro |\WavyAsSubstX| has a starting point, +% an endpoint, and the width of a wedge as its arguments. +% Compare this command with |\WavyAsSubst|, which has +% a starting point, a slope, and the width of a wedge +% as its arguments. +% +% \begin{macro}{WedgeAsSubstX} +% \changes{v5.01}{2013/06/21}{For PDF mode: Checked OK} +% \begin{macrocode} +\let\WavyAsSubstXPDF=\PUT@@@@wavyLINE +\let\WavyAsSubstX=\WavyAsSubstXPDF%for compatibility to PS mode +% \end{macrocode} +% \end{macro} +% +% The command \cs{downnobond} is redefined for pstricks. +% \begin{macro}{\upnobond} +% \begin{macro}{\downnobond} +% \begin{macrocode} +%\def\upnobond#1#2{%nochange +%\hbox{\hbox to0.72em{\hss#1\hss}\kern-0.72em\raise2.2ex\hbox{#2}}} +\def\downnobond#1#2{% +\hbox{\smash{\hbox to0.72em{\hss#1\hss}\kern-0.72em\lower2.2ex\hbox{#2}}}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\PUT@@@@dashedLINE| is used to draw a dashed bond line, +% which usually links two non-adjacent atoms of a cyclic compound. +% This macro relies on the |\tikz| graphic enviroment. +% +% \begin{macro}{\PUT@@@@dashedLINE} +% \begin{macro}{\PutPDFdashed} +% \begin{macro}{\PutDashedBond} +% \changes{v5.00}{2010/10/01}{For PDF mode} +% \begin{macrocode} +\def\PUT@@@@dashedLINE(#1,#2)(#3,#4)#5{% +\begingroup +%\ifdim\unitlength>0.08pt +%\setbox0=\hbox{% +%\tikz[baseline=(X.base)]{% +%\draw[dashed,line width=#5,dash pattern=on 1pt off 1.2pt]% +%(#1\unitlength,#2\unitlength) -- (#3\unitlength,#4\unitlength);}}% +%\else +%\setbox0=\hbox{% +%\tikz[baseline=(X.base)]{% +%\draw[dashed,line width=#5,dash pattern=on 0.8pt off 1pt]% +%(#1\unitlength,#2\unitlength) -- (#3\unitlength,#4\unitlength);}}% +%\fi +%\PutSimpleBondBox(#1,#2)(#3,#4){\box0}% +\ifdim\unitlength>0.08pt +\tikznodimension{% +\draw[dashed,line width=#5,dash pattern=on 1pt off 1.2pt]% +(#1\unitlength,#2\unitlength) -- (#3\unitlength,#4\unitlength);}% +\else +\tikznodimension{% +\draw[dashed,line width=#5,dash pattern=on 0.8pt off 1pt]% +(#1\unitlength,#2\unitlength) -- (#3\unitlength,#4\unitlength);}% +\fi +\endgroup +} +\let\PutPDFdashed=\PUT@@@@dashedLINE%for user's use +\let\PutDashedBond=\PUT@@@@dashedLINE%for compatibility to PS mode +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The macro |\set@xy@PDFcoords| is used in the macro |\putRoundArrowPDF| +% for drawing round arrows. This command supports a format-changing +% mechanism to assure the compatibility to the PostScript mode. +% +% \begin{macro}{\Temp@ArCords} +% \begin{macro}{\set@xy@PDFcoords} +% \changes{v5.00}{2010/10/01}{For PDF mode} +% \begin{macrocode} +\newtoks\Temp@ArCords \Temp@ArCords={} +\def\set@xy@PDFcoords(#1,#2){% +\ifnum\@tempcnta=1\relax +\Temp@ArCords={(#1\unitlength,#2\unitlength) }\else +\expandafter\Temp@ArCords\expandafter{\the\Temp@ArCords -- % +(#1\unitlength,#2\unitlength)}\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\setRoundArrPDF| is used in the macro |\putRoundArrowPDF| +% for drawing round arrows. This command is based on |\tikznodimension| +% to draw round arrows. The letter string |\RoundedCornersWidth| stores +% the standard roundness st a corner point. +% +% \begin{macro}{\RoundedCornersWidth} +% \begin{macro}{\setRoundArrPDF} +% \changes{v5.00}{2010/10/01}{For PDF mode} +% \begin{macrocode} +\def\RoundedCornersWidth{4pt} +\def\setRoundArrPDF#1{% +\ifnum\@tempcnta>5\relax +\def\RoundedCornersWidth{4pt}% +\else +\def\RoundedCornersWidth{8pt}\fi +\tikznodimension{% +\draw[\RoundArrowHead,line width=0.4pt,% +rounded corners=\RoundedCornersWidth]#1;}}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% The macro |\putRoundArrowPDF| throws its main task to its inner +% macro |\putRound@rrowPDF|, which treats an optional argument +% for specifying the direction of an arrow head and reads coordinates +% repeatedly by using |\@forendparenthesis|. The |\@forendparenthesis| +% command is defined in the \textsf{chemstr} package. +% The macro |\putRoundArrow| is defined as a user command to +% assure the compatibility to the PostScriot mode. +% +% \begin{macro}{\putRoundArrowPDF} +% \begin{macro}{\putRound@rrowPDF} +% \begin{macro}{\putRoundArrow} +% \changes{v5.00}{2010/10/01}{For PDF mode} +% \begin{macrocode} +\def\putRoundArrowPDF{% +\@ifnextchar[{\putRound@rrowPDF}{\putRound@rrowPDF[->]}} +\def\putRound@rrowPDF[#1]#2{% +\edef\RoundArrowHead{#1}% +\Temp@ArCords={}\@tempcnta=\@ne\relax +\@forendparenthesis\member:=#2\do{% +\ifx\member\empty\else +\expandafter\set@xy@PDFcoords\member)\fi +\advance\@tempcnta\@ne}% +\expandafter\setRoundArrPDF\expandafter{\the\Temp@ArCords}% +} +\let\putRoundArrow=\putRoundArrowPDF +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% The command |\changeunitlength| is redefined for using the pgf (tikz) package. +% The pgf package uses ``scale'' in optional designations in place of +% the setting by \verb/\unitlength/. The setting of \verb/\unitlength=0.1pt/ is +% regarded as corresponding to \verb/scale=0.00357/, which is stored in +% \verb/\@UScale/ after it is obtained by the \verb/\setUnitScale/ command. +% \begin{macro}{\changeunitlength} +% \begin{macro}{\UScaleGain} +% \begin{macro}{\setUnitScale} +% \begin{macrocode} +%%added 2010/08/17 +{\catcode`\p=12 \catcode`\t=12 +\gdef\UScaleGain#1pt{\gdef\@UScale{#1}}} +\def\setUnitScale#1{% +\@tempdima=#1 \dimen0=1cm +\@tempcnta=\@tempdima +\@tempcntb=\dimen0 +\divide\@tempcntb by65536% +\divide\@tempdima by \@tempcntb +\expandafter\UScaleGain\the\@tempdima} +\setUnitScale{0.1pt}%standard setting +%%% +\newif\ifsizereduction\sizereductionfalse +\def\@@@changeunitlength#1{\unitlength=#1\relax +\setUnitScale{#1}%%% scale=\@UScale +\ifdim\unitlength<0.1pt \sizereductiontrue +\ifdim\unitlength<0.062pt \let\substfontsize=\tiny \else +\ifdim\unitlength<0.072pt \let\substfontsize=\scriptsize \else +\ifdim\unitlength<0.082pt \let\substfontsize=\footnotesize +\fi\fi\fi +\else \let\substfontsize=\normalsize\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\red etc.} +% \changes{v5.00}{2010/10/01}{bond coloring for PDF mode} +% \begin{macrocode} +\def\red{\color{red}} +\def\green{\color{green}} +\def\blue{\color{blue}} +\def\cyan{\color{cyan}} +\def\magenta{\color{magenta}} +\def\yellow{\color{yellow}} +\def\black{\color{black}} +\def\white{\color{white}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\xymcolor} +% \begin{macro}{\redx etc.} +% These macros are defined to avoid \texttt{**Warning** color stack underflow} +% during processing by the dvipdfmx converter. +% \changes{v5.00}{2010/10/01}{Added: Colors for TeX/LaTeX mode} +% \begin{macrocode} +\def\xymcolor#1#2{\mbox{\color{#1}#2}} +%defined in the bondcolor packag +%\def\redx#1{\xymcolor{red}{#1}} +%\def\bluex#1{\xymcolor{blue}{#1}} +%\def\greenx#1{\xymcolor{green}{#1}} +%\def\blackx#1{\xymcolor{black}{#1}} +%\def\cyanx#1{\xymcolor{cyan}{#1}} +%\def\yellowx#1{\xymcolor{yellow}{#1}} +%\def\magentax#1{\xymcolor{magenta}{#1}} +%\def\whitex#1{\xymcolor{white}{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\Color@@@@Line} +% \changes{v5.00}{2010/10/01}{For coloring skeletal bond in PDF mode} +% The last argument (\#7) specifies a line color. +% This command is used in the definition of |\replaceSKbond| +% of the \textsf{bondcolor} package by putting \verb/#7=white/. +% \begin{macro}{\Color@Line} +% \begin{macrocode} +\def\Color@@@@Line{% +\@ifnextchar[{\C@lor@@@@Line}{\C@lor@@@@Line[0.4pt]}} +\def\C@lor@@@@Line[#1](#2,#3)(#4,#5)#6#7{% +\begingroup +\SlopetoXY(#2,#3)(#4,#5){#6}%% +\@tempdime=\unitlength \multiply\@tempdime by#2\relax +\@tempdimb=\unitlength \multiply\@tempdimb by#3\relax +\@tempdimc=\unitlength \multiply\@tempdimc by\@tempcntXa\relax +\@tempdimd=\unitlength \multiply\@tempdimd by\@tempcntYa\relax +\tikznodimension{% +\draw[line width=#1,color=#7]% +(\@tempdime,\@tempdimb) --(\@tempdimc,\@tempdimd);}% +\endgroup}%end of \Color@@@@Line +\let\Color@Line=\Color@@@@Line%for PDF mode +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{setxymtxpdf} +% \changes{v5.00}{2010/10/01}{For PDF mode} +% \begin{macrocode} +\def\setxymtxpdf{% +\@ifnextchar[{\@setxymtxpdf}{\@setxymtxpdf[0.1pt]}} +\def\@setxymtxpdf[#1]{% +\PDFmodetrue +\let\sfpicture=\picture +\let\endsfpicture=\endpicture +\let\thicklines=\Thick@Lines +\let\thinlines=\Thin@Lines +\let\Put@Line=\Put@@@@Line +\let\Color@Line=\Color@@@@Line%for PDF mode +\let\Put@Direct=\Put@@@@Direct +\let\Put@oCircle=\Put@@@@oCircle +\let\Put@sCircle=\Put@@@@sCircle +\let\dotorline=\d@@t@@rline +\let\WedgeAsSubst=\WedgeAsSubstPDF%for compatibility to PS mode +\let\HashWedgeAsSubst=\HashWedgeAsSubstPDF%For compatibility to PS mode +\let\WedgeAsSubstX=\WedgeAsSubstXPDF%for compatibility to PDF mode +\let\HashWedgeAsSubstX=\HashWedgeAsSubstXPDF%For compatibility to PDF mode +\let\PutBondLine=\PUT@@@@bondLINE%for user's use +\let\PutDashedBond=\PUT@@@@dashedLINE%for compatibility to PS mode +\let\putRoundArrow=\putRoundArrowPDF%for compatibility to PS mode +\let\changeunitlength=\@@@changeunitlength +\changeunitlength{#1}% +\wedgehasheddash% +} +\setxymtxpdf +%</xymtxpdf> +% \end{macrocode} +% \end{macro} +% +% \Finale +% +\endinput diff --git a/macros/latex/contrib/xymtex/xymtxpdf/xymtx-pdf.ins b/macros/latex/contrib/xymtex/xymtxpdf/xymtx-pdf.ins new file mode 100644 index 0000000000..26381a7beb --- /dev/null +++ b/macros/latex/contrib/xymtex/xymtxpdf/xymtx-pdf.ins @@ -0,0 +1,58 @@ +\def\batchfile{xymtx-pdf.ins} +\input docstrip.tex +\preamble + +This is a generated file. + +Copyright (C) 2002,2004,2005,2009,2010,2013 by Shinsaku Fujita +all rights reserved. + +This file is part of the XyMTeX system. +======================================= +This style file is created for drawing chemical structural formulas. +This style file is to be contained in the ``xymtex'' directory which +is an input directory for TeX. + +Old versions (as xymtx-ps.dtx etc.): +Version 1.00 Released on April 30, 2002 +Version 4.01 Released on August 30, 2004 (adjust for XyMTeX version 4.01) +Version 4.02 Released on December 20, 2004 (wedged bonds for stereochemistry) +Version 4.03 Released on July 20, 2005 (wave line for stereochemistry) +Version 4.03a Released on August 02, 2005 (Bug fix) +Version 4.04a Released on June 15, 2009 (Bug fix) +Version 4.05 Released on November 05, 2009 (Bug fix) +Version 5.00 Released on October 01, 2010 +Version 5.00b Released on November 23, 2010 +Version 5.01b Released on March 10, 2013 +Version 5.01bb Released on May 27, 2013 + +Present version (as xymtx-pdf.dtx etc.): +Version 5.01 Released on June 21, 2013 + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either version 1.3 +of this license or (at your option) any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2005/12/01 or later. + +This work has the LPPL maintenance status `maintained'. +The Current Maintainer of this work is Shinsaku Fujita. + +This work consists of the files xymtx-pdf.dtx and xymtx-pdf.ins +and the derived file xymtx-pdf.sty. + +======================================= + +\endpreamble + +\keepsilent + +\generateFile{xymtx-pdf.drv}{t}{% + \from{xymtx-pdf.dtx}{driver}} + +\generateFile{xymtx-pdf.sty}{t}{% + \from{xymtx-pdf.dtx}{xymtxpdf}} + +\endinput diff --git a/macros/latex/contrib/xymtex/xymtxpdf/xymtx-pdf.sty b/macros/latex/contrib/xymtex/xymtxpdf/xymtx-pdf.sty new file mode 100644 index 0000000000..1a69a7b538 --- /dev/null +++ b/macros/latex/contrib/xymtex/xymtxpdf/xymtx-pdf.sty @@ -0,0 +1,687 @@ +%% +%% This is file `xymtx-pdf.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% xymtx-pdf.dtx (with options: `xymtxpdf') +%% +%% This is a generated file. +%% +%% Copyright (C) 2002,2004,2005,2009,2010,2013 by Shinsaku Fujita +%% all rights reserved. +%% +%% This file is part of the XyMTeX system. +%% ======================================= +%% This style file is created for drawing chemical structural formulas. +%% This style file is to be contained in the ``xymtex'' directory which +%% is an input directory for TeX. +%% +%% Old versions (as xymtx-ps.dtx etc.): +%% Version 1.00 Released on April 30, 2002 +%% Version 4.01 Released on August 30, 2004 (adjust for XyMTeX version 4.01) +%% Version 4.02 Released on December 20, 2004 (wedged bonds for stereochemistry) +%% Version 4.03 Released on July 20, 2005 (wave line for stereochemistry) +%% Version 4.03a Released on August 02, 2005 (Bug fix) +%% Version 4.04a Released on June 15, 2009 (Bug fix) +%% Version 4.05 Released on November 05, 2009 (Bug fix) +%% Version 5.00 Released on October 01, 2010 +%% Version 5.00b Released on November 23, 2010 +%% Version 5.01b Released on March 10, 2013 +%% Version 5.01bb Released on May 27, 2013 +%% +%% Present version (as xymtx-pdf.dtx etc.): +%% Version 5.01 Released on June 21, 2013 +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% The Current Maintainer of this work is Shinsaku Fujita. +%% +%% This work consists of the files xymtx-pdf.dtx and xymtx-pdf.ins +%% and the derived file xymtx-pdf.sty. +%% +%% ======================================= +%% +%% File: xymtx-pdf.dtx +%% \CharacterTable +%% {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 +%% 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 +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\def\j@urnalname{xymtx-pdf} +\def\versi@ndate{June 21, 2013} +\def\versi@nno{ver5.01} +\def\copyrighth@lder{SF} % Shinsaku Fujita +\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>% +\space[\copyrighth@lder]} +\@ifundefined{setsixringv}{\input chemstr.sty\relax}{} +\RequirePackage{tikz} +\RequirePackage{pgfcore}%%%added 2010/11/23 by S. Fujita +\RequirePackage{xcolor} +\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,fit,calc} +\unitlength=0.1pt +\def\white{\color{white}} +\newif\if@thicklinesw \@thicklineswfalse +\def\Thick@Lines{\@thicklineswtrue}%redefinition +\def\Thin@Lines{\@thicklineswfalse}%redefinition +\def\thickLineWidth{1.6pt} +\def\thinLineWidth{0.4pt} +\newcount\XyMTeXnuma +\newcount\XyMTeXnumb +\newcount\XyMTeXnumc +\newcount\XyMTeXnumd +\newcount\XyMTeXnume +\newcount\XyMTeXnumf +\newcount\XyMTeXnumg +\newcount\XyMTeXnumh +\newcount\XyMTeXnumi +\newcount\XyMTeXcnta +\newcount\XyMTeXcntb +\newdimen\XyMTeXdima +\newdimen\XyMTeXdimb +\newdimen\XyMTeXdimc +\newdimen\XyMTeXdimd +\newdimen\XyMTeXdime +\newbox\BondBox +\newif\if@wedgesw \@wedgeswtrue +\newif\if@hasheddashsw \@hasheddashswtrue +\def\wedgehasheddash{\@wedgeswtrue\@hasheddashswtrue} +\def\wedgehashedwedge{\@wedgeswtrue\@hasheddashswfalse} +\def\dashhasheddash{\@wedgeswfalse\@hasheddashswtrue} +\@ifundefined{ifmolfront}{\newif\ifmolfront \molfrontfalse}{} +\@ifundefined{if@skbondlist}{\newif\if@skbondlist \@skbondlistfalse}{} +\def\NumRound#1.#2#3\@nil{%shishagonyu +\begingroup +\XyMTeXcnta=0 \XyMTeXcntb=0 +\XyMTeXcnta=#1 %%\typeout{A:\the\XyMTeXcnta;} +\XyMTeXcntb=#2 %%\typeout{B:\the\XyMTeXcntb;} +\ifnum\XyMTeXcntb<5 \else +\advance\XyMTeXcnta by1 %%\typeout{C:\the\XyMTeXcnta;} +\fi\xdef\@UHalfScale{\the\XyMTeXcnta}\endgroup} +{\catcode`\p=12 \catcode`\t=12 +\gdef\UHalfScaleGain#1pt{\gdef\@@UHalfScale{#1}}} +\def\setUnitHalfScale#1{% +\@tempdima=#1 \dimen0=0.1pt +\@tempcnta=\@tempdima +\@tempcntb=\dimen0 +\multiply\@tempcntb by10 +\divide\@tempcntb by65536% +\divide\@tempdima by \@tempcntb +\multiply\@tempdima by5 %%\typeout{D:\the\@tempdima} +\expandafter\UHalfScaleGain\the\@tempdima% +\expandafter\NumRound\@@UHalfScale\@nil +} +\def\PutSimpleBondBox(#1,#2)(#3,#4)#5{%for simple bonds +\setbox\BondBox=\hbox{#5}% +\XyMTeXdima=#1\unitlength +\XyMTeXdimb=#3\unitlength +\XyMTeXdimc=\thickLineWidth +\divide\XyMTeXdimc by2%adjustment by the half of a line width +\ifdim \XyMTeXdima>\XyMTeXdimb\relax +\XyMTeXdimd=\XyMTeXdima +\XyMTeXdime=\XyMTeXdimb +\advance\XyMTeXdime by -\XyMTeXdimd +\advance\XyMTeXdime by -\XyMTeXdimc +\put(#1,#2){\kern\XyMTeXdime\box\BondBox}% +\else +\ifdim \XyMTeXdima=\XyMTeXdimb\relax +\XyMTeXdimd=-\XyMTeXdimc +%%%\put(#1,#2){\kern\XyMTeXdimd\raise\XyMTeXdimd\hbox{\box\BondBox}}% +\put(#1,#2){\kern\XyMTeXdimd\box\BondBox}% +\else +\XyMTeXdimd=-\XyMTeXdimc +\put(#1,#2){\kern\XyMTeXdimd\box\BondBox}% +\fi\fi% +} +\def\tikznodimension#1{\tikz{% +\pgfpathrectangle{\pgfpointorigin}{\pgfpointorigin} +\pgfusepath{use as bounding box} % draws nothing +#1}} +\def\PUT@@@@bondLINE(#1,#2)(#3,#4)#5{% +\begingroup +\tikznodimension{% +\draw[line width=#5]% +(#1\unitlength,#2\unitlength) -- (#3\unitlength,#4\unitlength);}% +\endgroup +} +\let\PutPDFLine=\PUT@@@@bondLINE%for user's use +\let\PutBondLine=\PUT@@@@bondLINE%for user's use +\def\PutBondBox(#1,#2)(#3,#4)#5{%for wedge and wavy bonds +\setbox\BondBox=\hbox{#5}% +\XyMTeXdima=#1\unitlength +\XyMTeXdimb=#3\unitlength +\XyMTeXdimc=4pt% +\divide\XyMTeXdimc by2%adjustment by the half of a line width +\if@vertbond +\XyMTeXdimd=\wd\BondBox +\divide\XyMTeXdimd by2\relax +\put(#1,#2){\kern-1.2\XyMTeXdimd\box\BondBox}%%tentative factor 1.2 +\else +\if@horizbond +\ifdim \XyMTeXdima>\XyMTeXdimb\relax +\XyMTeXdimd=\XyMTeXdima +\XyMTeXdime=\XyMTeXdimb +\advance\XyMTeXdime by -\XyMTeXdimd +\put(#1,#2){\kern-5\unitlength\kern\XyMTeXdime\box\BondBox}%tentative factor 5 %%% +\else +\put(#1,#2){\kern-1.2\unitlength\box\BondBox}%tentative factor 1.2 +\fi +\else +%% +\ifdim \XyMTeXdima>\XyMTeXdimb\relax +\XyMTeXdime=-\wd\BondBox +\put(#1,#2){\kern0.2\unitlength\kern\XyMTeXdime\box\BondBox}%tentative shift factor +\else +\ifdim \wd\BondBox<4.3pt\relax +\XyMTeXdimd=\wd\BondBox +\divide\XyMTeXdimd by2\relax +\put(#1,#2){\kern-1.3\XyMTeXdimd\box\BondBox}%tentative shift factor 1.3 +\else +\put(#1,#2){\kern-3\unitlength\box\BondBox}%tentative shift factor 3 +\fi\fi +\fi\fi} +\newif\if@vertbond \@vertbondfalse +\newif\if@horizbond \@horizbondfalse +\def\PUT@@@@wedgeLINE(#1,#2)(#3,#4)(#5,#6){% +\begingroup +\tikznodimension{% +\filldraw% +(#1\unitlength,#2\unitlength) -- (#3\unitlength,#4\unitlength)% +-- (#5\unitlength,#6\unitlength) -- (#1\unitlength,#2\unitlength);}% +\endgroup +} +\def\PUT@@@@wavyLINE(#1,#2)(#3,#4){% +\begingroup +\tikznodimension{% +\draw[decorate, +decoration={coil,aspect=0,segment length=2pt,amplitude=1pt}]% +(#1\unitlength,#2\unitlength) coordinate (X) -- (#3\unitlength,#4\unitlength);}% +\endgroup +} +\newcount\@tempcntXa \newcount\@tempcntYa \newcount\@tempcntz +\newcount\@tempcntXb \newcount\@tempcntYb \newcount\@tempcntzz +\newcount\@tempcntXc \newcount\@tempcntYc \newcount\@tempcntzzz +\long\gdef\Put@@@@Line(#1,#2)(#3,#4)#5{% +\begingroup +%%x-coordinate +\@tempcntXa=0\relax +\ifnum#3>0\relax \@tempcntXa=#5\relax +\else\ifnum#3<0\relax\@tempcntXa=-#5\relax\fi\fi +\advance\@tempcntXa by#1\relax +%%y-coordinate +\@tempcntYa=#5\relax +\ifnum#3=0\relax\else +\multiply\@tempcntYa by#4\relax\multiply\@tempcntYa by10\relax +\divide\@tempcntYa by#3\relax\divide\@tempcntYa by10\relax\fi +\ifnum\@tempcntYa<0\relax +\ifnum#4>0\relax\@tempcntYa=-\@tempcntYa\fi +\else +\ifnum\@tempcntYa>0\relax +\ifnum#4<0\relax\@tempcntYa=-\@tempcntYa\fi\fi +\fi +\advance\@tempcntYa by#2\relax +\if@thicklinesw +\if@wedgesw +\ifmolfront%bold dash bond for skeletal bond for pyranose etc. +\PUT@@@@bondLINE(#1,#2)(\the\@tempcntXa,\the\@tempcntYa){\thickLineWidth}% +\else +\if@skbondlist%bold dash bond skeletal bond for general cases +\PUT@@@@bondLINE(#1,#2)(\the\@tempcntXa,\the\@tempcntYa){\thickLineWidth}% +\else%wedged bond +\ifnum#1=#3 +\@vertbondtrue\@horizbondfalse +\else +\ifnum#2=#4 +\@vertbondfalse\@horizbondtrue +\else +\@vertbondfalse\@horizbondfalse +\fi\fi +\stereo@wedgedimension(#3,#4){10}% +\PUT@@@@wedgeLINE(#1,#2)(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% +\fi\fi +\else +\PUT@@@@bondLINE(#1,#2)(\the\@tempcntXa,\the\@tempcntYa){\thickLineWidth}% +\fi +\else +\ifwavebond +\ifnum#1=#3 +\@vertbondtrue\@horizbondfalse +\else +\ifnum#2=#4 +\@vertbondfalse\@horizbondtrue +\else +\@vertbondfalse\@horizbondfalse +\fi\fi +\PUT@@@@wavyLINE(#1,#2)(\the\@tempcntXa,\the\@tempcntYa)% +\else +\PUT@@@@bondLINE(#1,#2)(\the\@tempcntXa,\the\@tempcntYa){\thinLineWidth}% +\fi +\fi +\@tempcntXa=0\relax \@tempcntYa=0\relax +\endgroup}%end of Put@@@@Line +\newif\if@wedgeadjust +\def\stereo@wedgedimension(#1,#2)#3{% +\@tempcntXb=0\relax +\@tempcntYb=0\relax +\@tempcntXc=0\relax +\@tempcntYc=0\relax +%% +\@wedgeadjustfalse +\ifnum#1<0 \@tempcntzz=-#1\else\@tempcntzz=#1\fi +\ifnum#2<0 \@tempcntzzz=-#2\else\@tempcntzzz=#2\fi +\ifnum#1=0\else +\multiply\@tempcntzzz by10\relax \divide\@tempcntzzz by\@tempcntzz\fi%% (3/5)x10=6 +\ifnum\@tempcntzzz>7\relax\else\@wedgeadjusttrue\fi +%%one point of wedge +\ifnum#1=0\relax +\@tempcntXb=#3 \advance\@tempcntXb by8\relax +\@tempcntYb=0\relax +\else +\ifnum#2=0\relax +\@tempcntXb=0\relax +\@tempcntYb=#3 \advance\@tempcntYb by8\relax +\else +\@tempcntXb=#3\relax +\@tempcntYb=-#3\relax +\if@wedgeadjust +\advance\@tempcntXb by8\relax +\advance\@tempcntYb by-8\relax +\fi +\multiply\@tempcntXb by#2\relax\multiply\@tempcntXb by10\relax +\divide\@tempcntXb by#1\relax\divide\@tempcntXb by10\relax\fi\fi +\advance\@tempcntXb by\@tempcntXa\relax +\advance\@tempcntYb by\@tempcntYa\relax +%%other point of wedge +\ifnum#1=0\relax +\@tempcntXc=-#3 \advance\@tempcntXc by-8\relax +\@tempcntYc=0\relax +\else +\ifnum#2=0\relax +\@tempcntXc=0\relax +\@tempcntYc=-#3 \advance\@tempcntYc by-8\relax +\else +\@tempcntXc=-#3\relax +\@tempcntYc=#3\relax +\if@wedgeadjust +\advance\@tempcntXc by-6\relax +\advance\@tempcntYc by6\relax +\fi +\multiply\@tempcntXc by#2\relax\multiply\@tempcntXc by10\relax +\divide\@tempcntXc by#1\relax\divide\@tempcntXc by10\relax\fi\fi +\advance\@tempcntXc by\@tempcntXa\relax +\advance\@tempcntYc by\@tempcntYa\relax +}%%end of \stereo@wedgedimension +\let\Put@@@@Direct=\put +\def\Put@@@@oCircle(#1,#2)#3{\begingroup% + \@tempcntz=#3 \divide\@tempcntz by2\relax +\setbox0=\hbox{% +{\tikz[baseline=(X.base)]{% +\draw[line width=0.4pt]% +(#1\unitlength,#2\unitlength) coordinate (X) circle (\@tempcntz\unitlength);}}}% +\put(#1,#2){\kern-0.5\wd0\hbox{\box0}}% +\endgroup} +\def\Put@@@@sCircle(#1,#2)#3{\begingroup% + \@tempcntz=#3 \divide\@tempcntz by2\relax +\setbox0=\hbox{% +{\tikz[baseline=(X.base)]{% +\draw[line width=2pt]% +(#1\unitlength,#2\unitlength) coordinate (X) circle (\@tempcntz\unitlength);}}}% +\put(#1,#2){\kern-0.5\wd0\hbox{\box0}}% +\endgroup} +\def\d@@t@@rline(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% +\if@hasheddashsw + \@ifundefined{tikz}{% + \XyMTeXWarning{A dottedline is replaced by a solid line.}% + \Put@Line(#1,#2)(#3,#4){#5}% + }{{\thicklines% + \h@shedd@shbond(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)}}% +\else +\if@skbondlist%hashed dash bond skeletal bond for general cases + \@ifundefined{tikz}{% + \XyMTeXWarning{A dottedline is replaced by a solid line.}% + \Put@Line(#1,#2)(#3,#4){#5}% + }{{\thicklines% + \h@shedd@shbond(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)}}% +\else + \h@shedw@dgebond(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)% +\fi\fi +}%end of \d@@t@@rline +\def\h@shedd@shbond(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% +\begingroup +\@tempcntzz=12\relax +\@tempcntzzz=-30\relax%almost no shortening +\bond@shorten(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)% +\ifdim\unitlength>0.08pt +\tikznodimension{% +\draw[dashed,line width=\thickLineWidth,dash pattern=on 1pt off 1.2pt]% +(\@tempcntXb\unitlength,\@tempcntYb\unitlength) coordinate (X) --% +(\@tempcntXc\unitlength,\@tempcntYc\unitlength);}% +\else +\tikznodimension{% +\draw[dashed,line width=\thickLineWidth,dash pattern=on 0.8pt off 1pt]% +(\@tempcntXb\unitlength,\@tempcntYb\unitlength) coordinate (X) --% +(\@tempcntXc\unitlength,\@tempcntYc\unitlength);}% +\fi +\endgroup} +\def\h@shedw@dgebond(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% +\begingroup +\@tempcntXa=#8\relax +\@tempcntYa=#9\relax +\stereo@wedgedimension(#3,#4){10}% +\XyMTeXnumf=\@tempcntXb +\XyMTeXnumg=\@tempcntYb +\XyMTeXnumh=\@tempcntXc +\XyMTeXnumi=\@tempcntYc +\@tempcntzz=5\relax +\@tempcntzzz=-12\relax +\bond@shorten(#1,#2)(#3,#4){#5}/(#6,#7)(#8,#9)% +\tikznodimension{% +\filldraw% +(#1\unitlength,#2\unitlength) --% +(\XyMTeXnumf\unitlength,\XyMTeXnumg\unitlength) --% +(\XyMTeXnumh\unitlength,\XyMTeXnumi\unitlength) -- (#1\unitlength,#2\unitlength);% +\draw[dashed,line width=4pt,dash pattern=on 1pt off 1.2pt,color=white]% +(\@tempcntXb\unitlength,\@tempcntYb\unitlength) --% +(\@tempcntXc\unitlength,\@tempcntYc\unitlength);}% +\endgroup +}%%end of \h@shedw@dgebond +\def\bond@shorten(#1,#2)(#3,#4)#5/(#6,#7)(#8,#9){% +\@tempcntXb=#8\relax +\@tempcntYb=#9\relax +\advance\@tempcntXb by-#6\relax \divide\@tempcntXb by\@tempcntzz\relax +\advance\@tempcntYb by-#7\relax \divide\@tempcntYb by\@tempcntzz\relax +\advance\@tempcntXb by#6\relax +\advance\@tempcntYb by#7\relax +\@tempcntXc=#8\relax +\@tempcntYc=#9\relax +\advance\@tempcntXc by-#6\relax \divide\@tempcntXc by\@tempcntzzz\relax +\advance\@tempcntYc by-#7\relax \divide\@tempcntYc by\@tempcntzzz\relax +\advance\@tempcntXc by#8\relax +\advance\@tempcntYc by#9\relax +}%%end of \bondshorten +\def\WedgeAsSubstPDF(#1,#2)(#3,#4)#5{% +\begingroup +\@thicklineswtrue \@wedgeswtrue +\molfrontfalse \@skbondlistfalse +\Put@@@@Line(#1,#2)(#3,#4){#5}% +\endgroup} +\let\WedgeAsSubst=\WedgeAsSubstPDF%for compatibility to PS mode +\def\stereo@wedgedimensionX(#1,#2)(#3,#4){% +\@ifnextchar[{\stereo@@wedgedimensionX(#1,#2)(#3,#4)}% +{\stereo@@wedgedimensionX(#1,#2)(#3,#4)[10]}} +\def\stereo@@wedgedimensionX(#1,#2)(#3,#4)[#5]{% +\@tempcnta=-#1\relax +\advance\@tempcnta by#3\relax +%%\typeout{KKK:\the\@tempcnta}% +\@tempcntb=-#2\relax +\advance\@tempcntb by#4\relax +%%%\typeout{LLL:\the\@tempcntb}% +\stereo@wedgedimension(\the\@tempcnta,\the\@tempcntb){#5}% +%%%\typeout{MMM; (\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)} +\advance\@tempcntXb by#3\relax +\advance\@tempcntYb by#4\relax +\advance\@tempcntXc by#3\relax +\advance\@tempcntYc by#4\relax} +\def\WedgeAsSubstXPDF(#1,#2)(#3,#4){% +\@ifnextchar[{\Wedge@AsSubstXPDF(#1,#2)(#3,#4)}% +{\Wedge@AsSubstXPDF(#1,#2)(#3,#4)[10]}} +\def\Wedge@AsSubstXPDF(#1,#2)(#3,#4)[#5]{% +\begingroup +\stereo@wedgedimensionX(#1,#2)(#3,#4)[#5]% +\PUT@@@@wedgeLINE(#1,#2)(\the\@tempcntXb,\the\@tempcntYb)(\the\@tempcntXc,\the\@tempcntYc)% +\endgroup} +\let\WedgeAsSubstX=\WedgeAsSubstXPDF%for compatibility to PDF mode +\def\NumR@und#1.#2#3\@nil{%shishagonyu +\begingroup +\XyMTeXcnta=0 \XyMTeXcntb=0\relax +\XyMTeXcnta=#1 %%\typeout{A:\the\XyMTeXcnta;} +\XyMTeXcntb=#2 %%\typeout{B:\the\XyMTeXcntb;} +\ifnum\XyMTeXcnta>0\relax +\ifnum\XyMTeXcntb<5 \else +\advance\XyMTeXcnta by1 %%\typeout{C:\the\XyMTeXcnta;} +\fi +\else +\ifnum\XyMTeXcntb<5 \else +\advance\XyMTeXcnta by-1 %%\typeout{C:\the\XyMTeXcnta;} +\fi\fi\xdef\@yzobun{\the\XyMTeXcnta}\endgroup} +{\catcode`\p=12 \catcode`\t=12 +\gdef\zobunGain#1pt{\gdef\@zobun{#1}}} + +\def\zahyozobun(#1,#2)(#3,#4)#5{% +\@tempdima=#5\unitlength +\@tempdimb=#3\unitlength +\@tempcnta=\@tempdima +\ifdim\@tempdimb<0pt +\@tempcntb=-\@tempdimb +\else +\@tempcntb=\@tempdimb +\fi +%% +\ifdim\@tempdimb=0pt%bugfix 2013/02/06 +\else +%% +\multiply\@tempcntb by10\relax +\divide\@tempcntb by65536% +\divide\@tempdima by \@tempcntb +\multiply\@tempdima by#4\relax +\multiply\@tempdima by10 %%\typeout{D:\the\@tempdima} +\expandafter\zobunGain\the\@tempdima% +\expandafter\NumR@und\@zobun\@nil +\fi%%% +\ifnum#3<0 +\xdef\@xzobun{-#5}% +\else +\ifnum#3=0%bugfix 2013/02/06 +\xdef\@xzobun{#3}% +\ifnum#4<0 +\xdef\@yzobun{-#5}% +\else +\xdef\@yzobun{#5}% +\fi%bugfix 2013/02/06 +\else +\xdef\@xzobun{#5}% +\fi +\fi +} +\def\bond@sh@rten(#1,#2)(#3,#4)#5{%%%%%%%/(#6,#7)(#8,#9){% +\zahyozobun(#1,#2)(#3,#4){#5}% +\@tempcntXb=\@xzobun\relax%%\typeout{SSS:\@xzobun} +\@tempcntYb=\@yzobun\relax%%\typeout{TTT:\@yzobun} +\divide\@tempcntXb by\@tempcntzz\relax +\divide\@tempcntYb by\@tempcntzz\relax +\advance\@tempcntXb by#1\relax +\advance\@tempcntYb by#2\relax +\@tempcntXc=\@xzobun\relax%%\typeout{KKKK:\@xzobun} +\@tempcntYc=\@yzobun\relax%%\typeout{LLLL:\@yzobun} +\divide\@tempcntXc by\@tempcntzzz\relax +\divide\@tempcntYc by\@tempcntzzz\relax +\advance\@tempcntXc by#1\relax +\advance\@tempcntXc by\@xzobun\relax%%\typeout{AAAA:\the\@tempcntXc} +\advance\@tempcntYc by#2\relax +\advance\@tempcntYc by\@yzobun\relax%%\typeout{BBBB:\the\@tempcntYc} +}%%end of \bondshorten + +\def\HashWedgeAsSubstPDF(#1,#2)(#3,#4)#5{% +\begingroup +\zahyozobun(#1,#2)(#3,#4){#5}% +\@tempcntXa=\@xzobun\relax +\advance\@tempcntXa by#1\relax +\@tempcntYa=\@yzobun\relax +\advance\@tempcntYa by#2\relax +\stereo@wedgedimension(#3,#4){10}% +\XyMTeXnumf=\@tempcntXb%%\typeout{CCCCF:\the\XyMTeXnumf} +\XyMTeXnumg=\@tempcntYb%%\typeout{CCCCG:\the\XyMTeXnumg} +\XyMTeXnumh=\@tempcntXc%%\typeout{CCCCH:\the\XyMTeXnumh} +\XyMTeXnumi=\@tempcntYc%%\typeout{CCCCI:\the\XyMTeXnumi} +\@tempcntzz=5\relax +\@tempcntzzz=-12\relax +\bond@sh@rten(#1,#2)(#3,#4){#5}% +\tikznodimension{% +\filldraw% +(#1\unitlength,#2\unitlength) coordinate (X) --% +(\XyMTeXnumf\unitlength,\XyMTeXnumg\unitlength) --% +(\XyMTeXnumh\unitlength,\XyMTeXnumi\unitlength) -- (#1\unitlength,#2\unitlength);% +\draw[dashed,line width=4pt,dash pattern=on 1pt off 1.2pt,color=white]% +(\@tempcntXb\unitlength,\@tempcntYb\unitlength) --% +(\@tempcntXc\unitlength,\@tempcntYc\unitlength);}% +\endgroup +}%%end of \HashWedgeAsSubstPDF +\let\HashWedgeAsSubst=\HashWedgeAsSubstPDF%For compatibility to PS mode +\def\HashWedgeAsSubstXPDF(#1,#2)(#3,#4){% +\@ifnextchar[{\HashWedge@AsSubstXPDF(#1,#2)(#3,#4)}% +{\HashWedge@AsSubstXPDF(#1,#2)(#3,#4)[10]}} +\def\HashWedge@AsSubstXPDF(#1,#2)(#3,#4)[#5]{% +\begingroup +\WedgeAsSubstXPDF(#1,#2)(#3,#4)[#5]% +\@tempdima=#5\unitlength \multiply\@tempdima by3\relax +\advance\@tempdima by1pt%adjustment +\tikznodimension{% +\draw[dashed,line width=\@tempdima, +dash pattern=on 1pt off 1.2pt,color=white]% +(#1\unitlength,#2\unitlength) --% +(#3\unitlength,#4\unitlength);}% +\endgroup +}%%end of \HashWedgeAsSubstXPDF +\let\HashWedgeAsSubstX=\HashWedgeAsSubstXPDF%For compatibility to PDF mode +\def\WavyAsSubstPDF(#1,#2)(#3,#4)#5{% +\begingroup +\wavebondtrue +\Put@@@@Line(#1,#2)(#3,#4){#5}% +\endgroup} +\let\WavyAsSubst=\WavyAsSubstPDF%for compatibility to PS mode +\let\WavyAsSubstXPDF=\PUT@@@@wavyLINE +\let\WavyAsSubstX=\WavyAsSubstXPDF%for compatibility to PS mode +\def\downnobond#1#2{% +\hbox{\smash{\hbox to0.72em{\hss#1\hss}\kern-0.72em\lower2.2ex\hbox{#2}}}} +\def\PUT@@@@dashedLINE(#1,#2)(#3,#4)#5{% +\begingroup +\ifdim\unitlength>0.08pt +\tikznodimension{% +\draw[dashed,line width=#5,dash pattern=on 1pt off 1.2pt]% +(#1\unitlength,#2\unitlength) -- (#3\unitlength,#4\unitlength);}% +\else +\tikznodimension{% +\draw[dashed,line width=#5,dash pattern=on 0.8pt off 1pt]% +(#1\unitlength,#2\unitlength) -- (#3\unitlength,#4\unitlength);}% +\fi +\endgroup +} +\let\PutPDFdashed=\PUT@@@@dashedLINE%for user's use +\let\PutDashedBond=\PUT@@@@dashedLINE%for compatibility to PS mode +\newtoks\Temp@ArCords \Temp@ArCords={} +\def\set@xy@PDFcoords(#1,#2){% +\ifnum\@tempcnta=1\relax +\Temp@ArCords={(#1\unitlength,#2\unitlength) }\else +\expandafter\Temp@ArCords\expandafter{\the\Temp@ArCords -- % +(#1\unitlength,#2\unitlength)}\fi} +\def\RoundedCornersWidth{4pt} +\def\setRoundArrPDF#1{% +\ifnum\@tempcnta>5\relax +\def\RoundedCornersWidth{4pt}% +\else +\def\RoundedCornersWidth{8pt}\fi +\tikznodimension{% +\draw[\RoundArrowHead,line width=0.4pt,% +rounded corners=\RoundedCornersWidth]#1;}}% +\def\putRoundArrowPDF{% +\@ifnextchar[{\putRound@rrowPDF}{\putRound@rrowPDF[->]}} +\def\putRound@rrowPDF[#1]#2{% +\edef\RoundArrowHead{#1}% +\Temp@ArCords={}\@tempcnta=\@ne\relax +\@forendparenthesis\member:=#2\do{% +\ifx\member\empty\else +\expandafter\set@xy@PDFcoords\member)\fi +\advance\@tempcnta\@ne}% +\expandafter\setRoundArrPDF\expandafter{\the\Temp@ArCords}% +} +\let\putRoundArrow=\putRoundArrowPDF +%%added 2010/08/17 +{\catcode`\p=12 \catcode`\t=12 +\gdef\UScaleGain#1pt{\gdef\@UScale{#1}}} +\def\setUnitScale#1{% +\@tempdima=#1 \dimen0=1cm +\@tempcnta=\@tempdima +\@tempcntb=\dimen0 +\divide\@tempcntb by65536% +\divide\@tempdima by \@tempcntb +\expandafter\UScaleGain\the\@tempdima} +\setUnitScale{0.1pt}%standard setting +%%% +\newif\ifsizereduction\sizereductionfalse +\def\@@@changeunitlength#1{\unitlength=#1\relax +\setUnitScale{#1}%%% scale=\@UScale +\ifdim\unitlength<0.1pt \sizereductiontrue +\ifdim\unitlength<0.062pt \let\substfontsize=\tiny \else +\ifdim\unitlength<0.072pt \let\substfontsize=\scriptsize \else +\ifdim\unitlength<0.082pt \let\substfontsize=\footnotesize +\fi\fi\fi +\else \let\substfontsize=\normalsize\fi} +\def\red{\color{red}} +\def\green{\color{green}} +\def\blue{\color{blue}} +\def\cyan{\color{cyan}} +\def\magenta{\color{magenta}} +\def\yellow{\color{yellow}} +\def\black{\color{black}} +\def\white{\color{white}} +\def\xymcolor#1#2{\mbox{\color{#1}#2}} +\def\Color@@@@Line{% +\@ifnextchar[{\C@lor@@@@Line}{\C@lor@@@@Line[0.4pt]}} +\def\C@lor@@@@Line[#1](#2,#3)(#4,#5)#6#7{% +\begingroup +\SlopetoXY(#2,#3)(#4,#5){#6}%% +\@tempdime=\unitlength \multiply\@tempdime by#2\relax +\@tempdimb=\unitlength \multiply\@tempdimb by#3\relax +\@tempdimc=\unitlength \multiply\@tempdimc by\@tempcntXa\relax +\@tempdimd=\unitlength \multiply\@tempdimd by\@tempcntYa\relax +\tikznodimension{% +\draw[line width=#1,color=#7]% +(\@tempdime,\@tempdimb) --(\@tempdimc,\@tempdimd);}% +\endgroup}%end of \Color@@@@Line +\let\Color@Line=\Color@@@@Line%for PDF mode +\def\setxymtxpdf{% +\@ifnextchar[{\@setxymtxpdf}{\@setxymtxpdf[0.1pt]}} +\def\@setxymtxpdf[#1]{% +\PDFmodetrue +\let\sfpicture=\picture +\let\endsfpicture=\endpicture +\let\thicklines=\Thick@Lines +\let\thinlines=\Thin@Lines +\let\Put@Line=\Put@@@@Line +\let\Color@Line=\Color@@@@Line%for PDF mode +\let\Put@Direct=\Put@@@@Direct +\let\Put@oCircle=\Put@@@@oCircle +\let\Put@sCircle=\Put@@@@sCircle +\let\dotorline=\d@@t@@rline +\let\WedgeAsSubst=\WedgeAsSubstPDF%for compatibility to PS mode +\let\HashWedgeAsSubst=\HashWedgeAsSubstPDF%For compatibility to PS mode +\let\WedgeAsSubstX=\WedgeAsSubstXPDF%for compatibility to PDF mode +\let\HashWedgeAsSubstX=\HashWedgeAsSubstXPDF%For compatibility to PDF mode +\let\PutBondLine=\PUT@@@@bondLINE%for user's use +\let\PutDashedBond=\PUT@@@@dashedLINE%for compatibility to PS mode +\let\putRoundArrow=\putRoundArrowPDF%for compatibility to PS mode +\let\changeunitlength=\@@@changeunitlength +\changeunitlength{#1}% +\wedgehasheddash% +} +\setxymtxpdf +\endinput +%% +%% End of file `xymtx-pdf.sty'. |