| 1 |
% \iffalse meta-comment |
| 2 |
%% File: locant.dtx |
| 3 |
% |
| 4 |
% Copyright 1993,1996,2001,2002, 2004, 2010 by Shinsaku Fujita |
| 5 |
% |
| 6 |
% This file is part of XyMTeX system. |
| 7 |
% ------------------------------------- |
| 8 |
% |
| 9 |
% This file is a successor to: |
| 10 |
% |
| 11 |
% locant.sty |
| 12 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 13 |
% \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 1.00} |
| 14 |
% \typeout{ -- Released December 1, 1993 by Shinsaku Fujita} |
| 15 |
% Copyright (C) 1993 by Shinsaku Fujita, all rights reserved. |
| 16 |
% |
| 17 |
% This file is a part of the macro package ``XyMTeX'' which has been |
| 18 |
% designed for typesetting chemical structural formulas. |
| 19 |
% |
| 20 |
% This file is to be contained in the ``xymtex'' directory which is |
| 21 |
% an input directory for TeX. It is a LaTeX optional style file and |
| 22 |
% should be used only within LaTeX, because several macros of the file |
| 23 |
% are based on LaTeX commands. |
| 24 |
% |
| 25 |
% For the review of XyMTeX, see |
| 26 |
% (1) Shinsaku Fujita, ``Typesetting structural formulas with the text |
| 27 |
% formatter TeX/LaTeX'', Computers and Chemistry, in press. |
| 28 |
% The following book deals with an application of TeX/LaTeX to |
| 29 |
% preparation of manuscripts of chemical fields: |
| 30 |
% (2) Shinsaku Fujita, ``LaTeX for Chemists and Biochemists'' |
| 31 |
% Tokyo Kagaku Dozin, Tokyo (1993) [in Japanese]. |
| 32 |
% |
| 33 |
% This work may be distributed and/or modified under the |
| 34 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 35 |
% of this license or (at your option) any later version. |
| 36 |
% The latest version of this license is in |
| 37 |
% http://www.latex-project.org/lppl.txt |
| 38 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 39 |
% version 2005/12/01 or later. |
| 40 |
% |
| 41 |
% This work has the LPPL maintenance status `maintained'. |
| 42 |
% The Current Maintainer of this work is Shinsaku Fujita. |
| 43 |
% |
| 44 |
% This work consists of the files locant.dtx and locant.ins |
| 45 |
% and the derived file locant.sty. |
| 46 |
% |
| 47 |
% Please report any bugs, comments, suggestions, etc. to: |
| 48 |
% Shinsaku Fujita, |
| 49 |
% Shonan Institute of Chemoinformatics and Mathematical Chemistry |
| 50 |
% Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, Kanagawa 250-0019 Japan |
| 51 |
% (old address) |
| 52 |
% Ashigara Research Laboratories, Fuji Photo Film Co., Ltd., |
| 53 |
% Minami-Ashigara, Kanagawa-ken, 250-01, Japan. |
| 54 |
% (old address) |
| 55 |
% Department of Chemistry and Materials Technology, |
| 56 |
% Kyoto Institute of Technology, \\ |
| 57 |
% Matsugasaki, Sakyoku, Kyoto, 606 Japan |
| 58 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 59 |
% \def\j@urnalname{locant} |
| 60 |
% \def\versi@ndate{December 01, 1993} |
| 61 |
% \def\versi@nno{ver1.00} |
| 62 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 63 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 64 |
% \def\j@urnalname{locant} |
| 65 |
% \def\versi@ndate{August 16, 1996} |
| 66 |
% \def\versi@nno{ver1.01} |
| 67 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 68 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 69 |
% \def\j@urnalname{locant} |
| 70 |
% \def\versi@ndate{June 20, 2001} |
| 71 |
% \def\versi@nno{ver2.01} |
| 72 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 73 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 74 |
% \def\j@urnalname{locant} |
| 75 |
% \def\versi@ndate{April 30, 2002} |
| 76 |
% \def\versi@nno{ver3.00} |
| 77 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 78 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 79 |
% \def\j@urnalname{locant} |
| 80 |
% \def\versi@ndate{May 30, 2002} |
| 81 |
% \def\versi@nno{ver4.00} |
| 82 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 83 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 84 |
% \def\j@urnalname{locant} |
| 85 |
% \def\versi@ndate{August 30, 2004} |
| 86 |
% \def\versi@nno{ver4.01} |
| 87 |
% \def\copyrighth@lder{SF} % Shinsaku Fujita |
| 88 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 89 |
% |
| 90 |
% \fi |
| 91 |
% |
| 92 |
% \CheckSum{136} |
| 93 |
%% \CharacterTable |
| 94 |
%% {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 |
| 95 |
%% 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 |
| 96 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 97 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 98 |
%% Dollar \$ Percent \% Ampersand \& |
| 99 |
%% Acute accent \' Left paren \( Right paren \) |
| 100 |
%% Asterisk \* Plus \+ Comma \, |
| 101 |
%% Minus \- Point \. Solidus \/ |
| 102 |
%% Colon \: Semicolon \; Less than \< |
| 103 |
%% Equals \= Greater than \> Question mark \? |
| 104 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 105 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 106 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 107 |
%% Right brace \} Tilde \~} |
| 108 |
% |
| 109 |
% \setcounter{StandardModuleDepth}{1} |
| 110 |
% |
| 111 |
% \StopEventually{} |
| 112 |
% \MakeShortVerb{\|} |
| 113 |
% |
| 114 |
% \iffalse |
| 115 |
% \changes{v1.01}{1996/06/26}{first edition for LaTeX2e} |
| 116 |
% \changes{v2.01}{2001/06/20}{Size reduction and Clip information} |
| 117 |
% \changes{v3.00}{2002/04/30}{sfpicture environment etc.} |
| 118 |
% \changes{v4.00}{2002/05/30}{PostScript output and ShiftPicEnv} |
| 119 |
% \changes{v4.01}{2004/08/30}{Minor additions} |
| 120 |
% \changes{v5.00}{2010/10/01}{the LaTeX Project Public License} |
| 121 |
% \fi |
| 122 |
% |
| 123 |
% \iffalse |
| 124 |
%<*driver> |
| 125 |
\NeedsTeXFormat{pLaTeX2e} |
| 126 |
% \fi |
| 127 |
\ProvidesFile{locant.dtx}[2010/10/01 v5.00 XyMTeX{} package file] |
| 128 |
% \iffalse |
| 129 |
\documentclass{ltxdoc} |
| 130 |
\GetFileInfo{locant.dtx} |
| 131 |
% |
| 132 |
% %%XyMTeX Logo: Definition 2%%% |
| 133 |
\def\UPSILON{\char'7} |
| 134 |
\def\XyM{X\kern-.30em\smash{% |
| 135 |
\raise.50ex\hbox{\UPSILON}}\kern-.30em{M}} |
| 136 |
\def\XyMTeX{\XyM\kern-.1em\TeX} |
| 137 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 138 |
\title{Setting locant numbers by {\sffamily locant.sty} |
| 139 |
(\fileversion) of \XyMTeX{}} |
| 140 |
\author{Shinsaku Fujita \\ |
| 141 |
Shonan Institute of Chemoinformatics and Mathematical Chemistry, \\ |
| 142 |
Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, Kanagawa 250-0019 Japan |
| 143 |
% % (old address) |
| 144 |
% %Department of Chemistry and Materials Technology, \\ |
| 145 |
% %Kyoto Institute of Technology, \\ |
| 146 |
% %Matsugasaki, Sakyoku, Kyoto, 606-8585 Japan |
| 147 |
% %% (old address) |
| 148 |
% %% Ashigara Research Laboratories, |
| 149 |
% %% Fuji Photo Film Co., Ltd., \\ |
| 150 |
% %% Minami-Ashigara, Kanagawa, 250-01 Japan |
| 151 |
} |
| 152 |
\date{\filedate} |
| 153 |
% |
| 154 |
\begin{document} |
| 155 |
\maketitle |
| 156 |
\DocInput{locant.dtx} |
| 157 |
\end{document} |
| 158 |
%</driver> |
| 159 |
% \fi |
| 160 |
% |
| 161 |
% \section{Introduction}\label{locant:intro} |
| 162 |
% |
| 163 |
% \subsection{Options for {\sffamily docstrip}} |
| 164 |
% |
| 165 |
% \DeleteShortVerb{\|} |
| 166 |
% \begin{center} |
| 167 |
% \begin{tabular}{|l|l|} |
| 168 |
% \hline |
| 169 |
% \emph{option} & \emph{function}\\ \hline |
| 170 |
% locant & locant.sty \\ |
| 171 |
% driver & driver for this dtx file \\ |
| 172 |
% \hline |
| 173 |
% \end{tabular} |
| 174 |
% \end{center} |
| 175 |
% \MakeShortVerb{\|} |
| 176 |
% |
| 177 |
% \subsection{Version Information} |
| 178 |
% |
| 179 |
% \begin{macrocode} |
| 180 |
%<*locant> |
| 181 |
\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 5.00} |
| 182 |
\typeout{ -- Released October 01, 2010 by Shinsaku Fujita} |
| 183 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 184 |
\def\j@urnalname{locant} |
| 185 |
\def\versi@ndate{October 01, 2010} |
| 186 |
\def\versi@nno{ver4.00} |
| 187 |
\def\copyrighth@lder{SF} % Shinsaku Fujita |
| 188 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 189 |
\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>% |
| 190 |
\space[\copyrighth@lder]} |
| 191 |
% \end{macrocode} |
| 192 |
% |
| 193 |
% \section{Macros for designating locant numbers} |
| 194 |
% |
| 195 |
% \subsection{Font Size of Locant Numbers} |
| 196 |
% \changes{v2.01}{2001/06/20}{New command: \cs{locantnumsize}} |
| 197 |
% |
| 198 |
% To change the font size of locant numbers, we can use |
| 199 |
% |\locantnumsize|, into which a size command (|\scriptsize| etc.) |
| 200 |
% is introduced by using the |\let| command. |
| 201 |
% The default setting is |\scriptsize| as follows: |
| 202 |
% |
| 203 |
% \begin{macro}{\locantnumsize} |
| 204 |
% \begin{macrocode} |
| 205 |
\let\locantnumsize=\scriptsize |
| 206 |
% \end{macrocode} |
| 207 |
% \end{macro} |
| 208 |
% |
| 209 |
% \subsection{Bond indicators for vertical formulas} |
| 210 |
% |
| 211 |
% \begin{macro}{\dbloocant} |
| 212 |
% \begin{macro}{\dblocant} |
| 213 |
% The macro |\dbloocant| is used to designate six edges (inner double bonds) |
| 214 |
% of a six-membered ring. Any character can be asigned to the respective |
| 215 |
% bond. |
| 216 |
% The macro |\dblocant| provides a fixed set of aliphabetical charactors |
| 217 |
% on the six edges. |
| 218 |
% \changes{v2.01}{2001/06/20}{The domain of a picture environment |
| 219 |
% has been changed from (800,880) to (0,0).} |
| 220 |
% \begin{macrocode} |
| 221 |
\def\bdloocant#1#2#3#4#5#6{% |
| 222 |
%\begin{sfpicture}(800,880)(-\shiftii,-\shifti) |
| 223 |
\begin{sfpicture}(0,0)(-\shiftii,-\shifti) |
| 224 |
\putratom{90}{380}{\locantnumsize #1}% |
| 225 |
\putratom{200}{180}{\locantnumsize #2}% |
| 226 |
\putratom{90}{-20}{\locantnumsize #3}% |
| 227 |
\putlatom{-90}{380}{\locantnumsize #6}% |
| 228 |
\putlatom{-200}{180}{\locantnumsize #5}% |
| 229 |
\putlatom{-90}{-20}{\locantnumsize #4}% |
| 230 |
\end{sfpicture}}% |
| 231 |
\def\bdlocant{\bdloocant{a}{b}{c}{d}{e}{f}} |
| 232 |
% \end{macrocode} |
| 233 |
% \end{macro} |
| 234 |
% \end{macro} |
| 235 |
% |
| 236 |
% \subsection{Atom indicators for vertical formulas} |
| 237 |
% \begin{macro}{\sxloocant} |
| 238 |
% \begin{macro}{\sxlocant} |
| 239 |
% The macro |\sxloocant| is used to designate six vertices |
| 240 |
% of a six-membered ring. Any character can be asigned to the respective |
| 241 |
% bond. |
| 242 |
% The macro |\sxlocant| provides a fixed set of arabic numerals |
| 243 |
% on the six edges. |
| 244 |
% \changes{v2.01}{2001/06/20}{The domain of a picture environment |
| 245 |
% has been changed from (800,880) to (0,0).} |
| 246 |
% \begin{macrocode} |
| 247 |
\def\sxloocant#1#2#3#4#5#6{% |
| 248 |
%\begin{sfpicture}(800,880)(-\shiftii,-\shifti)% |
| 249 |
\begin{sfpicture}(0,0)(-\shiftii,-\shifti)% |
| 250 |
\putratom{-10}{340}{\locantnumsize #1}% |
| 251 |
\putlatom{150}{260}{\locantnumsize #2}% |
| 252 |
\putlatom{150}{110}{\locantnumsize #3}% |
| 253 |
\putratom{-10}{40}{\locantnumsize #4}% |
| 254 |
\putratom{-150}{110}{\locantnumsize #5}% |
| 255 |
\putratom{-150}{260}{\locantnumsize #6}% |
| 256 |
\end{sfpicture}}% |
| 257 |
\def\sxlocant{\sxloocant{1}{2}{3}{4}{5}{6}} |
| 258 |
% \end{macrocode} |
| 259 |
% \end{macro} |
| 260 |
% \end{macro} |
| 261 |
% |
| 262 |
% \subsection{Bond indicators for horizontal formulas} |
| 263 |
% |
| 264 |
% \begin{macro}{\dbloocanth} |
| 265 |
% \begin{macro}{\dblocanth} |
| 266 |
% The macro |\dbloocanth| is used to designate six edges (inner double bonds) |
| 267 |
% of a horizontal six-membered ring. |
| 268 |
% Any character can be asigned to the respective bond. |
| 269 |
% The macro |\dblocanth| provides a fixed set of aliphabetical charactors |
| 270 |
% on the six edges. |
| 271 |
% \changes{v2.01}{2001/06/20}{The domain of a picture environment |
| 272 |
% has been changed from (800,880) to (0,0).} |
| 273 |
% \begin{macrocode} |
| 274 |
\def\bdloocnth#1#2#3#4#5#6{% |
| 275 |
%\begin{sfpicture}(880,800)(-\shifti,-\shiftii)% |
| 276 |
\begin{sfpicture}(0,0)(-\shifti,-\shiftii)% |
| 277 |
\putlatom{10}{80}{\locantnumsize #1}% |
| 278 |
\putratom{180}{210}{\locantnumsize #2}% |
| 279 |
\putratom{380}{80}{\locantnumsize #3}% |
| 280 |
\putratom{380}{-120}{\locantnumsize #4}% |
| 281 |
\putratom{180}{-260}{\locantnumsize #5}% |
| 282 |
\putlatom{10}{-120}{\locantnumsize #6}% |
| 283 |
\end{sfpicture}}% |
| 284 |
\def\bdlocnth{\bdloocnth{a}{b}{c}{d}{e}{f}} |
| 285 |
% \end{macrocode} |
| 286 |
% \end{macro} |
| 287 |
% \end{macro} |
| 288 |
% |
| 289 |
% \subsection{Atom indicators for horizontal formulas} |
| 290 |
% \begin{macro}{\sxloocanth} |
| 291 |
% \begin{macro}{\sixsghlocant} |
| 292 |
% The macro |\sxloocanth| is used to designate six vertices |
| 293 |
% of a horizontal six-membered ring. |
| 294 |
% Any character can be asigned to the respective bond. |
| 295 |
% The macro |\sixsghlocant| provides a fixed set of arabic numerals |
| 296 |
% on the six edges. |
| 297 |
% \changes{v2.01}{2001/06/20}{The domain of a picture environment |
| 298 |
% has been changed from (800,880) to (0,0).} |
| 299 |
% \begin{macrocode} |
| 300 |
\def\sxloocnth#1#2#3#4#5#6{% |
| 301 |
%\begin{sfpicture}(880,800)(-\shifti,-\shiftii)% |
| 302 |
\begin{sfpicture}(0,0)(-\shifti,-\shiftii)% |
| 303 |
\putratom{40}{-20}{\locantnumsize #1}% |
| 304 |
\putratom{110}{100}{\locantnumsize #2}% |
| 305 |
\putlatom{290}{100}{\locantnumsize #3}% |
| 306 |
\putlatom{380}{-20}{\locantnumsize #4}% |
| 307 |
\putratom{110}{-140}{\locantnumsize #6}% |
| 308 |
\putlatom{290}{-140}{\locantnumsize #5}% |
| 309 |
\end{sfpicture}}% |
| 310 |
\def\sxlocnth{\sxloocnth{1}{2}{3}{4}{5}{6}} |
| 311 |
% \end{macrocode} |
| 312 |
% \end{macro} |
| 313 |
% \end{macro} |
| 314 |
% |
| 315 |
% \subsection{Locant Numbers for Cyclic Sugars} |
| 316 |
% |
| 317 |
% \changes{v2.01}{2001/06/20}{New command: \cs{sixsugarhlocant}} |
| 318 |
% \begin{macro}{\sixsugarhloocnt} |
| 319 |
% \begin{macro}{\sixsugarhlocant} |
| 320 |
% The macro |\sixsugarhloocnt| is used to designate six vertices |
| 321 |
% of a horizontal six-membered sugar ring. |
| 322 |
% Any character can be asigned to the respective bond. |
| 323 |
% The macro |\sixsugarhlocant| provides a fixed set of arabic numerals |
| 324 |
% on the six edges. |
| 325 |
% \begin{macrocode} |
| 326 |
\def\sixsugarhloocnt#1#2#3#4#5#6{% |
| 327 |
\begin{sfpicture}(0,0)(-\shifti,-\shiftii)% |
| 328 |
\putratom{40}{-20}{\locantnumsize #1}% |
| 329 |
\putratom{120}{125}{\locantnumsize #2}% |
| 330 |
\putlatom{400}{125}{\locantnumsize #3}% |
| 331 |
\putlatom{492}{-20}{\locantnumsize #4}% |
| 332 |
\putratom{120}{-160}{\locantnumsize #6}% |
| 333 |
\putlatom{400}{-160}{\locantnumsize #5}% |
| 334 |
\end{sfpicture}}% |
| 335 |
\def\sixsugarhlocant{\sixsugarhloocnt{4}{5}{6}{1}{2}{3}} |
| 336 |
%</locant> |
| 337 |
% \end{macrocode} |
| 338 |
% \end{macro} |
| 339 |
% \end{macro} |
| 340 |
% |
| 341 |
% \Finale |
| 342 |
% |
| 343 |
\endinput |