% \iffalse meta-comment
%% File: locant.dtx
%
%  Copyright 1993,1996,2001,2002, 2004, 2010 by Shinsaku Fujita
%
%  This file is part of XyMTeX system.
%  -------------------------------------
%
% This file is a successor to:
%
% locant.sty
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 1.00}
% \typeout{       -- Released December 1, 1993 by Shinsaku Fujita}
% Copyright (C) 1993 by Shinsaku Fujita, all rights reserved.
%
% 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. 
%
% For the review of XyMTeX, see
%  (1)  Shinsaku Fujita, ``Typesetting structural formulas with the text
%    formatter TeX/LaTeX'', Computers and Chemistry, in press.    
% The following book deals with an application of TeX/LaTeX to 
% preparation of manuscripts of chemical fields:
%  (2)  Shinsaku Fujita, ``LaTeX for Chemists and Biochemists'' 
%    Tokyo Kagaku Dozin, Tokyo (1993) [in Japanese].  
%
% 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 locant.dtx and locant.ins
% and the derived file locant.sty.
%
% Please report any bugs, comments, suggestions, etc. to:
%   Shinsaku Fujita, 
%   Shonan Institute of Chemoinformatics and Mathematical Chemistry
%   Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, Kanagawa 250-0019 Japan
%  (old address)
%   Ashigara Research Laboratories, Fuji Photo Film Co., Ltd., 
%   Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
%  (old address)
%   Department of Chemistry and Materials Technology, 
%   Kyoto Institute of Technology, \\
%   Matsugasaki, Sakyoku, Kyoto, 606 Japan
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{locant}
% \def\versi@ndate{December 01, 1993}
% \def\versi@nno{ver1.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{locant}
% \def\versi@ndate{August 16, 1996}
% \def\versi@nno{ver1.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{locant}
% \def\versi@ndate{June 20, 2001}
% \def\versi@nno{ver2.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{locant}
% \def\versi@ndate{April 30, 2002}
% \def\versi@nno{ver3.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{locant}
% \def\versi@ndate{May 30, 2002}
% \def\versi@nno{ver4.00}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \def\j@urnalname{locant}
% \def\versi@ndate{August 30, 2004}
% \def\versi@nno{ver4.01}
% \def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \fi
%
% \CheckSum{136}
%% \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.01}{1996/06/26}{first edition for LaTeX2e}
% \changes{v2.01}{2001/06/20}{Size reduction and Clip information}
% \changes{v3.00}{2002/04/30}{sfpicture environment etc.}
% \changes{v4.00}{2002/05/30}{PostScript output and ShiftPicEnv}
% \changes{v4.01}{2004/08/30}{Minor additions}
% \changes{v5.00}{2010/10/01}{the LaTeX Project Public License}
% \fi
%
% \iffalse
%<*driver>
\NeedsTeXFormat{pLaTeX2e}
% \fi
\ProvidesFile{locant.dtx}[2010/10/01 v5.00 XyMTeX{} package file]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{locant.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{Setting locant numbers by {\sffamily locant.sty} 
(\fileversion) of \XyMTeX{}}
\author{Shinsaku Fujita \\ 
Shonan Institute of Chemoinformatics and Mathematical Chemistry, \\
Kaneko 479-7 Ooimachi, Ashigara-Kami-Gun, Kanagawa 250-0019 Japan
% % (old address)
% %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., \\ 
% %% Minami-Ashigara, Kanagawa, 250-01 Japan
}
\date{\filedate}
%
\begin{document}
   \maketitle
   \DocInput{locant.dtx}
\end{document}
%</driver>
% \fi
%
% \section{Introduction}\label{locant:intro}
%
% \subsection{Options for {\sffamily docstrip}}
%
% \DeleteShortVerb{\|}
% \begin{center}
% \begin{tabular}{|l|l|}
% \hline
% \emph{option} & \emph{function}\\ \hline
% locant & locant.sty \\
% driver & driver for this dtx file \\
% \hline
% \end{tabular}
% \end{center}
% \MakeShortVerb{\|}
%
% \subsection{Version Information}
%
%    \begin{macrocode}
%<*locant>
\typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 5.00}
\typeout{       -- Released October 01, 2010 by Shinsaku Fujita}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\j@urnalname{locant}
\def\versi@ndate{October 01, 2010}
\def\versi@nno{ver4.00}
\def\copyrighth@lder{SF} % Shinsaku Fujita
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>%
\space[\copyrighth@lder]}
%    \end{macrocode}
%
% \section{Macros for designating locant numbers}
%
% \subsection{Font Size of Locant Numbers}
% \changes{v2.01}{2001/06/20}{New command: \cs{locantnumsize}}
%
% To change the font size of locant numbers, we can use 
% |\locantnumsize|, into which a size command (|\scriptsize| etc.)
% is introduced by using the |\let| command. 
% The default setting is |\scriptsize| as follows: 
%
% \begin{macro}{\locantnumsize}
%    \begin{macrocode}
\let\locantnumsize=\scriptsize
%    \end{macrocode}
% \end{macro}
%
% \subsection{Bond indicators for vertical formulas}
%
% \begin{macro}{\dbloocant}
% \begin{macro}{\dblocant}
% The macro |\dbloocant| is used to designate six edges (inner double bonds) 
% of a six-membered ring.  Any character can be asigned to the respective 
% bond.  
% The macro |\dblocant| provides a fixed set of aliphabetical charactors 
% on the six edges. 
% \changes{v2.01}{2001/06/20}{The domain of a picture environment 
% has been changed from (800,880) to (0,0).}
%    \begin{macrocode}
\def\bdloocant#1#2#3#4#5#6{%
%\begin{sfpicture}(800,880)(-\shiftii,-\shifti)
\begin{sfpicture}(0,0)(-\shiftii,-\shifti)
\putratom{90}{380}{\locantnumsize #1}%
\putratom{200}{180}{\locantnumsize #2}%
\putratom{90}{-20}{\locantnumsize #3}%
\putlatom{-90}{380}{\locantnumsize #6}%
\putlatom{-200}{180}{\locantnumsize #5}%
\putlatom{-90}{-20}{\locantnumsize #4}%
\end{sfpicture}}%
\def\bdlocant{\bdloocant{a}{b}{c}{d}{e}{f}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Atom indicators for vertical formulas}
% \begin{macro}{\sxloocant}
% \begin{macro}{\sxlocant}
% The macro |\sxloocant| is used to designate six vertices  
% of a six-membered ring.  Any character can be asigned to the respective 
% bond.  
% The macro |\sxlocant| provides a fixed set of arabic numerals 
% on the six edges. 
% \changes{v2.01}{2001/06/20}{The domain of a picture environment 
% has been changed from (800,880) to (0,0).}
%    \begin{macrocode}
\def\sxloocant#1#2#3#4#5#6{%
%\begin{sfpicture}(800,880)(-\shiftii,-\shifti)%
\begin{sfpicture}(0,0)(-\shiftii,-\shifti)%
\putratom{-10}{340}{\locantnumsize #1}%
\putlatom{150}{260}{\locantnumsize #2}%
\putlatom{150}{110}{\locantnumsize #3}%
\putratom{-10}{40}{\locantnumsize #4}%
\putratom{-150}{110}{\locantnumsize #5}%
\putratom{-150}{260}{\locantnumsize #6}%
\end{sfpicture}}%
\def\sxlocant{\sxloocant{1}{2}{3}{4}{5}{6}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Bond indicators for horizontal formulas}
%
% \begin{macro}{\dbloocanth}
% \begin{macro}{\dblocanth}
% The macro |\dbloocanth| is used to designate six edges (inner double bonds) 
% of a horizontal six-membered ring.  
% Any character can be asigned to the respective bond.  
% The macro |\dblocanth| provides a fixed set of aliphabetical charactors 
% on the six edges. 
% \changes{v2.01}{2001/06/20}{The domain of a picture environment 
% has been changed from (800,880) to (0,0).}
%    \begin{macrocode}
\def\bdloocnth#1#2#3#4#5#6{%
%\begin{sfpicture}(880,800)(-\shifti,-\shiftii)%
\begin{sfpicture}(0,0)(-\shifti,-\shiftii)%
\putlatom{10}{80}{\locantnumsize #1}%
\putratom{180}{210}{\locantnumsize #2}%
\putratom{380}{80}{\locantnumsize #3}%
\putratom{380}{-120}{\locantnumsize #4}%
\putratom{180}{-260}{\locantnumsize #5}%
\putlatom{10}{-120}{\locantnumsize #6}%
\end{sfpicture}}%
\def\bdlocnth{\bdloocnth{a}{b}{c}{d}{e}{f}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Atom indicators for horizontal formulas}
% \begin{macro}{\sxloocanth}
% \begin{macro}{\sixsghlocant}
% The macro |\sxloocanth| is used to designate six vertices  
% of a horizontal six-membered ring.  
% Any character can be asigned to the respective bond.  
% The macro |\sixsghlocant| provides a fixed set of arabic numerals 
% on the six edges. 
% \changes{v2.01}{2001/06/20}{The domain of a picture environment 
% has been changed from (800,880) to (0,0).}
%    \begin{macrocode}
\def\sxloocnth#1#2#3#4#5#6{%
%\begin{sfpicture}(880,800)(-\shifti,-\shiftii)%
\begin{sfpicture}(0,0)(-\shifti,-\shiftii)%
\putratom{40}{-20}{\locantnumsize #1}%
\putratom{110}{100}{\locantnumsize #2}%
\putlatom{290}{100}{\locantnumsize #3}%
\putlatom{380}{-20}{\locantnumsize #4}%
\putratom{110}{-140}{\locantnumsize #6}%
\putlatom{290}{-140}{\locantnumsize #5}%
\end{sfpicture}}%
\def\sxlocnth{\sxloocnth{1}{2}{3}{4}{5}{6}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Locant Numbers for Cyclic Sugars}
%
% \changes{v2.01}{2001/06/20}{New command: \cs{sixsugarhlocant}}
% \begin{macro}{\sixsugarhloocnt}
% \begin{macro}{\sixsugarhlocant}
% The macro |\sixsugarhloocnt| is used to designate six vertices  
% of a horizontal six-membered sugar ring.  
% Any character can be asigned to the respective bond.  
% The macro |\sixsugarhlocant| provides a fixed set of arabic numerals 
% on the six edges. 
%    \begin{macrocode}
\def\sixsugarhloocnt#1#2#3#4#5#6{%
\begin{sfpicture}(0,0)(-\shifti,-\shiftii)%
\putratom{40}{-20}{\locantnumsize #1}%
\putratom{120}{125}{\locantnumsize #2}%
\putlatom{400}{125}{\locantnumsize #3}%
\putlatom{492}{-20}{\locantnumsize #4}%
\putratom{120}{-160}{\locantnumsize #6}%
\putlatom{400}{-160}{\locantnumsize #5}%
\end{sfpicture}}%
\def\sixsugarhlocant{\sixsugarhloocnt{4}{5}{6}{1}{2}{3}}
%</locant>
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \Finale
%
\endinput
