summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/achemso/natmove.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/achemso/natmove.sty')
-rw-r--r--Master/texmf-dist/tex/latex/achemso/natmove.sty160
1 files changed, 105 insertions, 55 deletions
diff --git a/Master/texmf-dist/tex/latex/achemso/natmove.sty b/Master/texmf-dist/tex/latex/achemso/natmove.sty
index 30c9e98995c..0cd7858bf18 100644
--- a/Master/texmf-dist/tex/latex/achemso/natmove.sty
+++ b/Master/texmf-dist/tex/latex/achemso/natmove.sty
@@ -4,97 +4,147 @@
%%
%% The original source files were:
%%
-%% natmove.dtx (with options: `package')
-%% ----------------------------------------------------------------
-%% natmove --- Automatic citation moving with natbib
-%% Maintained by Joseph Wright
-%% E-mail: joseph.wright@morningstar2.co.uk
-%% Released under the LaTeX Project Public License v1.3c or later
-%% See http://www.latex-project.org/lppl.txt
-%% ----------------------------------------------------------------
+%% achemso.dtx (with options: `natmove')
+%% ----------------------------------------------------------------
+%% achemso --- Support for submissions to American Chemical Society
+%% journals
+%% E-mail: joseph.wright@morningstar2.co.uk
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%% ----------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}
-\def\nmv@id$#1: #2.#3 #4 #5-#6-#7 #8 #9${%
- #5/#6/#7\space v1.0\space}
+
\ProvidesPackage{natmove}
- [\nmv@id$Id: natmove.dtx 29 2008-08-22 07:47:26Z joseph $
- Automatic citation moving with natbib]
+ [2009/04/20 v1.1 Automatic citation moving with natbib]
+\RequirePackage{natbib}
+\newcommand*{\nmv@ifmtarg}{}
+\newcommand*{\nmv@xifmtarg}{}
\begingroup
- \catcode`\Q=3
+ \catcode`\Q 3\relax
\long\gdef\nmv@ifmtarg#1{%
- \nmv@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil}
+ \nmv@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil
+ }
\long\gdef\nmv@xifmtarg#1#2Q#3#4#5\@nil{#4}
\endgroup
\newif\ifnmv@cite
\newcommand*{\nmv@citex}{%
\ifnmv@cite
- \expandafter\nmv@citex@
+ \expandafter\nmv@citex@moving
\else
- \expandafter\nmv@natcitex
- \fi}
-\def\nmv@citex@[#1][#2]#3{%
+ \expandafter\nmv@citex@nat
+ \fi
+}
+\newcommand*{\nmv@after}{}
+\newcommand*{\nmv@citex@moving}{}
+\def\nmv@citex@moving[#1][#2]#3{%
\leavevmode
\skip@\lastskip
\unskip
\begingroup
- \def\nmv@arg{[#1][#2]{#3}}%
- \newcommand*{\nmv@citex@end}{%
- \expandafter\nmv@natcitex\nmv@arg
- \endgroup}%
+ \def\nmv@after{\nmv@citex@nat[#1][#2]{#3}}%
\global\nmv@citefalse
- \nmv@citex@getnext\relax}
-\newcommand*{\nmv@citex@getnext}[1]{%
- \futurelet\nmv@citex@next\nmv@citex@punct}
+ \nmv@citex@get@next\relax
+}
+\newcommand*{\nmv@citex@end}{%
+ \nmv@after
+ \endgroup
+}
+\newcommand*{\nmv@citex@get@next}[1]{%
+ \futurelet\nmv@citex@next\nmv@citex@punct
+}
\newcommand*{\nmv@citex@punct}{%
\let\nmv@citex@loop\nmv@citex@end
- \ifx.\nmv@citex@next\@empty
+ \ifx\nmv@citex@next.\relax
\ifnum\spacefactor<\nmv@citex@sfac\else
\let\nmv@citex@next\relax
- \let\nmv@citex@loop\nmv@citex@getnext
+ \let\nmv@citex@loop\nmv@citex@get@next
\fi
\fi
- \expandafter\nmv@citex@pnct\natmovechars\@empty
- \nmv@citex@loop}
-\def\nmv@citex@pnct#1#2\@empty{%
+ \expandafter\nmv@citex@punct@aux\natmovechars\@empty
+ \nmv@citex@loop
+}
+\newcommand*{\nmv@citex@loop}{}
+\newcommand*{\nmv@citex@punct@aux}{}
+\def\nmv@citex@punct@aux#1#2\@empty{%
\ifx\nmv@citex@next#1\@empty
#1%
- \let\nmv@citex@loop\nmv@citex@getnext
+ \let\nmv@citex@loop\nmv@citex@get@next
\fi
\ifx\@empty#2\@empty\else
- \expandafter\nmv@citex@pnct#2\@empty
- \fi}
-\mathchardef\nmv@citex@sfac3000
-\expandafter\renewcommand\expandafter*\expandafter{\expandafter%
- \frenchspacing\expandafter}\expandafter{%
+ \expandafter\nmv@citex@punct@aux#2\@empty
+ \fi
+}
+\mathchardef\nmv@citex@sfac3000\relax
+\expandafter\def\expandafter\frenchspacing\expandafter{%
\frenchspacing
- \mathchardef\nmv@citex@sfac1001
+ \mathchardef\nmv@citex@sfac1001\relax
\sfcode`\.\nmv@citex@sfac
\sfcode`\?\nmv@citex@sfac
- \sfcode`\!\nmv@citex@sfac}
+ \sfcode`\!\nmv@citex@sfac
+}
\ifnum\sfcode`\.=\@m
\frenchspacing
\fi
+\newcommand*{\nmv@citex@nat}{}
\newcommand*{\nmv@activate}{%
- \let\nmv@natcitex\@citex
+ \let\nmv@citex@nat\@citex
\let\@citex\nmv@citex
\let\nmv@cite\cite
\renewcommand*{\cite}[2][]{%
- \nmv@ifmtarg{##1}
- {\nmv@citetrue
- \nmv@cite{##2}}
- {\nmv@citefalse
- \nmv@cite[##1]{##2}}}}
-\AtBeginDocument{
- \@ifpackageloaded{natbib}
- {\ifNAT@super
- \nmv@activate
- \else
- \nmv@notactivate
- \fi}
- {\PackageWarning{natmove}
- {The natbib package has not been loaded}}}
-\newcommand*{\nmv@notactivate}{}
+ \nmv@ifmtarg{##1}{%
+ \nmv@citetrue
+ \nmv@cite{##2}%
+ }{%
+ \nmv@citefalse
+ \nmv@cite[##1]{##2}}%
+ }%
+}
+\newcommand*{\nmv@natbib@detect}{%
+ \@ifpackageloaded{natbib}{%
+ \ifNAT@super
+ \expandafter\nmv@activate
+ \fi
+ }{%
+ \PackageInfo{natmove}{%
+ The natbib package is not loaded.\MessageBreak
+ Loading natmove will do nothing
+ }%
+ }%
+}
+\AtBeginDocument{\nmv@natbib@detect}
\newcommand*{\natmovechars}{.,;:}
-\endinput
+%%
+%% Originally developed by Mats Dahlgren
+%% Copyright (C) 1996-1998 by Mats Dahlgren
+%% Copyright (C) 2008-2009 by
+%% Joseph Wright <joseph.wright@morningstar2.co.uk>
+%%
+%% Part of this bundle is derived from cite.sty, to which the
+%% following license applies:
+%% Copyright (C) 1989-2003 by Donald Arseneau
+%% These macros may be freely transmitted, reproduced, or
+%% modified provided that this notice is left intact.
+%%
+%% It may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License (LPPL), either version 1.3c of
+%% this license or (at your option) any later version. The latest
+%% version of this license is in the file:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status) by
+%% Joseph Wright.
+%%
+%% This work consists of the file achemso.dtx
+%% and the derived files achemso.pdf,
+%% achemso.bib,
+%% achemso.cls,
+%% achemso.ins,
+%% achemso.sty,
+%% achemso-demo.tex,
+%% natmove.sty and
+%% a number of configuration files.
+%%
%%
%% End of file `natmove.sty'.