├── example ├── notes.md ├── extra.txt ├── mynode.tikz ├── figs1 │ └── fig1.pdf ├── figs2 │ └── fig2.pdf ├── figs3 │ └── fig3.pdf ├── other │ └── fig1.pdf ├── subsubsection.tex ├── section.tex ├── subsection.tex ├── myfigure.tikz ├── refs.bib ├── paper.tex └── amsart.cls ├── .gitignore ├── extra.txt ├── tests ├── test_align.tex └── test_comments.py ├── setup.py ├── LICENSE ├── README.md └── parxiv.py /example/notes.md: -------------------------------------------------------------------------------- 1 | Some notes 2 | -------------------------------------------------------------------------------- /example/extra.txt: -------------------------------------------------------------------------------- 1 | # list some files 2 | notes.md 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | *.py[cod] 3 | .DS_Store 4 | .*.swp 5 | -------------------------------------------------------------------------------- /example/mynode.tikz: -------------------------------------------------------------------------------- 1 | \draw[draw=red, fill=green] (1.5, 1.5) circle (0.35 and .45); 2 | -------------------------------------------------------------------------------- /example/figs1/fig1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeolson/parxiv/HEAD/example/figs1/fig1.pdf -------------------------------------------------------------------------------- /example/figs2/fig2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeolson/parxiv/HEAD/example/figs2/fig2.pdf -------------------------------------------------------------------------------- /example/figs3/fig3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeolson/parxiv/HEAD/example/figs3/fig3.pdf -------------------------------------------------------------------------------- /example/other/fig1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeolson/parxiv/HEAD/example/other/fig1.pdf -------------------------------------------------------------------------------- /example/subsubsection.tex: -------------------------------------------------------------------------------- 1 | \subsubsection{test subsubsection} 2 | 3 | % some comments 4 | 5 | This is testing a subsubsection. 6 | -------------------------------------------------------------------------------- /example/section.tex: -------------------------------------------------------------------------------- 1 | \section{test section} 2 | 3 | % some comments 4 | 5 | This is testing a section. 6 | 7 | \input{subsection} 8 | -------------------------------------------------------------------------------- /example/subsection.tex: -------------------------------------------------------------------------------- 1 | \subsection{test subsection} 2 | 3 | % some comments 4 | 5 | This is testing a subsection. 6 | 7 | \input{subsubsection} 8 | -------------------------------------------------------------------------------- /example/myfigure.tikz: -------------------------------------------------------------------------------- 1 | %extra: mynode.tikz 2 | \begin{tikzpicture} 3 | \input{mynode.tikz} 4 | 5 | \draw[fill=gray] (0, 0) circle (0.2); 6 | \end{tikzpicture} 7 | -------------------------------------------------------------------------------- /extra.txt: -------------------------------------------------------------------------------- 1 | # list of external packages to send to the arxiv folder 2 | /usr/local/texlive/2016/texmf-dist/tex/latex/ntheorem/ntheorem.sty 3 | /usr/local/texlive/2016/texmf-dist/tex/latex/cleveref/cleveref.sty 4 | -------------------------------------------------------------------------------- /example/refs.bib: -------------------------------------------------------------------------------- 1 | @misc{entry1, 2 | author={Some Author}, 3 | title={Bibliograhpy Example 1}, 4 | } 5 | 6 | @misc{entry2, 7 | author={Some Author}, 8 | title={Bibliograhpy Example 2}, 9 | } 10 | 11 | @misc{entry3, 12 | author={Some Author}, 13 | title={Bibliograhpy Example 3}, 14 | } 15 | -------------------------------------------------------------------------------- /tests/test_align.tex: -------------------------------------------------------------------------------- 1 | \begin{align}\label{eq:P_gamma} 2 | \mathcal{P}_\gamma &\coloneqq 3 | \left[\eta I - \widehat{\mathcal{L}}_2 + \beta^2 (\eta I - \widehat{\mathcal{L}}_1)^{-1}\right] 4 | (\gamma I- \widehat{\mathcal{L}}_2)^{-1} \\ 5 | % & = \left[(\eta I - \widehat{\mathcal{L}}_2)(\eta I - \widehat{\mathcal{L}}_1) + \beta^2 I\right] 6 | % (\eta I- \widehat{\mathcal{L}}_1)^{-1}(\gamma I- \widehat{\mathcal{L}}_2)^{-1} \nonumber\\ 7 | & = \left[ (\eta^2+\beta^2) I - \eta (\widehat{\mathcal{L}}_1 + \widehat{\mathcal{L}}_2) + 8 | \widehat{\mathcal{L}}_2\widehat{\mathcal{L}}_1 \right] 9 | (\eta I- \widehat{\mathcal{L}}_1)^{-1}(\gamma I- \widehat{\mathcal{L}}_2)^{-1}. 10 | \nonumber 11 | \end{align} 12 | -------------------------------------------------------------------------------- /example/paper.tex: -------------------------------------------------------------------------------- 1 | \pdfsuppresswarningpagegroup=1 2 | % This is an example document 3 | \documentclass[leqno]{amsart} 4 | \usepackage{tikz} 5 | \usepackage{import} 6 | 7 | % Load some packages 8 | \usepackage[margin=1in]{geometry} 9 | 10 | \usepackage{graphicx} 11 | \graphicspath{{figs1/}{figs2/}} 12 | 13 | % start of the document 14 | \begin{document} 15 | 16 | Testing three images: 17 | 18 | % one in directory ./figs1 19 | \begin{center} 20 | \includegraphics[width=1in]{fig1.pdf} 21 | \end{center} 22 | 23 | % one in directory ./figs2 24 | \begin{center} 25 | \includegraphics[width=1in]{fig2} 26 | \end{center} 27 | 28 | % one in directory ./figs3 29 | \begin{center} 30 | \includegraphics[width=1in]{./figs3/fig3} 31 | \end{center} 32 | 33 | \begin{center} 34 | \includegraphics[width=1in]{./other/fig1.pdf} 35 | \end{center} 36 | 37 | \subimport{./}{myfigure.tikz} 38 | 39 | \include{section} 40 | 41 | Citing~\cite{entry1} and~\cite{entry2}. 42 | 43 | \bibliographystyle{siam} 44 | \bibliography{refs} 45 | 46 | \end{document} 47 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup 4 | 5 | with open('parxiv.py') as f: 6 | for line in f: 7 | if line.startswith('__version__'): 8 | version = eval(line.split('=')[-1]) 9 | 10 | long_description = open('README.md').read() 11 | 12 | setup(name='parxiv', 13 | license='MIT', 14 | version=version, 15 | description='Generate a clean directory for uploading to Arxiv (formerly clean-latex-to-arxiv).', 16 | long_description=long_description, 17 | author='Luke Olson', 18 | author_email='luke.olson@gmail.com', 19 | url='https://github.com/lukeolson/parxiv', 20 | py_modules=['parxiv'], 21 | install_requires=['ply'], 22 | entry_points={'console_scripts': ['parxiv = parxiv:main']}, 23 | classifiers=['Environment :: Console', 24 | 'License :: OSI Approved :: MIT License', 25 | 'Programming Language :: Python', 26 | 'Programming Language :: Python :: 2', 27 | 'Programming Language :: Python :: 3', 28 | 'Topic :: Utilities']) 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Luke Olson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /tests/test_comments.py: -------------------------------------------------------------------------------- 1 | """Tests tex snippets in this directory.""" 2 | 3 | import os 4 | import glob 5 | import tempfile 6 | import subprocess 7 | from parxiv import strip_comments 8 | 9 | templatestart = \ 10 | r""" 11 | \documentclass{article} 12 | \usepackage{amsmath} 13 | \usepackage{mathtools} 14 | \begin{document} 15 | """ 16 | 17 | templateend = \ 18 | r""" 19 | \end{document} 20 | """ 21 | 22 | def run_latex(tex): 23 | try: 24 | with tempfile.TemporaryDirectory() as d: 25 | temptexfile = os.path.join(d, 'test.tex') 26 | with open(temptexfile, 'w') as f: 27 | f.write(tex) 28 | args = ['pdflatex', 29 | '-interaction', 'nonstopmode', 30 | '-output-directory', d, 31 | '-recorder', 32 | temptexfile] 33 | p = subprocess.Popen(args, 34 | stdin=subprocess.DEVNULL, 35 | stdout=subprocess.PIPE, 36 | stderr=subprocess.STDOUT) 37 | stdout, stderr = p.communicate() 38 | assert p.returncode==0 39 | except OSError as e: 40 | raise RuntimeError(e) 41 | 42 | def test_texsnippets(): 43 | texsnippets = glob.glob('tests/test_*.tex') 44 | print(texsnippets) 45 | 46 | for snippet in texsnippets: 47 | with open(snippet, 'r') as f: 48 | textest = f.read() 49 | tex = templatestart + textest + templateend 50 | texparsed = strip_comments(tex) 51 | run_latex(tex) 52 | run_latex(texparsed) 53 | print(texparsed) 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # parxiv 2 | 3 | a simple script to assist in making a clean directory to upload to arxiv 4 | 5 | *formerly* `clean-latex-to-arxiv` 6 | 7 | ### Installation 8 | 9 | ``` 10 | pip install -U git+https://github.com/lukeolson/parxiv 11 | ``` 12 | 13 | ### Usage 14 | 15 | parxiv file.tex 16 | 17 | this will make `arxiv-somelongdatestring` with 18 | 19 | - file_strip.tex (where includegraphics paths and comments are stripped) 20 | - file_strip.bbl (you should have the .bbl file already -- if not, it will attempt to generate) 21 | - all figures 22 | - local `.bst`, `.cls`, and `.sty` files 23 | - extra files listed in extra.txt 24 | 25 | For example, this will take 26 | 27 | ``` 28 | -rw-r--r-- 1 501 20 60K Jun 3 08:01:49 2021 amsart.cls 29 | -rw-r--r-- 1 501 20 9B Jun 3 08:51:21 2021 extra.txt 30 | drwxr-xr-x 3 501 20 96B Jun 3 08:21:08 2021 figs1/ 31 | drwxr-xr-x 3 501 20 96B Jun 3 08:22:07 2021 figs2/ 32 | drwxr-xr-x 3 501 20 96B Jun 3 08:37:08 2021 figs3/ 33 | -rw-r--r-- 1 501 20 11B Jun 3 08:50:40 2021 notes.md 34 | -rw-r--r-- 1 501 20 677B Jun 3 09:53:40 2021 paper.tex 35 | -rw-r--r-- 1 501 20 236B Jun 3 09:54:25 2021 refs.bib 36 | -rw-r--r-- 1 501 20 88B Jun 3 09:08:16 2021 section.tex 37 | -rw-r--r-- 1 501 20 100B Jun 3 09:05:50 2021 subsection.tex 38 | -rw-r--r-- 1 501 20 86B Jun 3 09:01:32 2021 subsubsection.tex 39 | ``` 40 | and make a new directory `arxiv-Sun-Jun--3-15-38-51-2021` with: 41 | 42 | ``` 43 | -rw-r--r-- 1 501 20 60K Jun 3 08:01:49 2021 amsart.cls 44 | -rw-r--r-- 1 501 20 4.1K Jun 3 08:21:08 2021 fig1.pdf 45 | -rw-r--r-- 1 501 20 4.3K Jun 3 08:22:07 2021 fig2.pdf 46 | -rw-r--r-- 1 501 20 4.4K Jun 3 08:37:08 2021 fig3.pdf 47 | -rw-r--r-- 1 501 20 11B Jun 3 08:50:40 2021 notes.md 48 | -rw-r--r-- 1 501 20 49B Jun 3 15:38:52 2021 paper_strip.bbl 49 | -rw-r--r-- 1 501 20 705B Jun 3 15:38:51 2021 paper_strip.tex 50 | ``` 51 | 52 | The structure is flat. Then 53 | 54 | ``` 55 | tar cvfz arxiv-Sun-Jun--3-15-38-51-2021.tgz arxiv-Sun-Jun--3-15-38-51-2021` 56 | ``` 57 | 58 | and you're ready to upload the `.tgz` file. 59 | 60 | ### what may go wrong 61 | 62 | - The `.bbl` file may not be generated. Pre-generate this. 63 | - Arxiv may need an extra file; put this (local) file into extra.txt 64 | -------------------------------------------------------------------------------- /parxiv.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | """ 3 | The purpose of this script is to generate a clean directory 4 | for upload to Arxiv. The script has several steps: 5 | 1. read the tex file 6 | 2. strip the comments (leaving a %) 7 | 3. flatten the file for input 8 | 4. re-strip the comments 9 | 5. find figures 10 | 6. make an arxiv directory with a timestamp 11 | 7. copy relevant class/style files 12 | 8. copy figures 13 | 9. copy the bbl file (or generating the bbl file) 14 | 10. copy extra files 15 | 16 | usage: 17 | python parxiv.py file.tex 18 | """ 19 | from __future__ import print_function 20 | import glob 21 | import re 22 | import os 23 | import io 24 | import sys 25 | import time 26 | import shutil 27 | import tempfile 28 | import subprocess 29 | import errno 30 | from collections import defaultdict 31 | 32 | import ply.lex 33 | 34 | __version__ = '0.2.0' 35 | 36 | # Python2 FileNotFoundError support 37 | try: 38 | FileNotFoundError 39 | except NameError: 40 | FileNotFoundError = IOError 41 | 42 | def strip_comments(source): 43 | """ 44 | from https://gist.github.com/dzhuang/dc34cdd7efa43e5ecc1dc981cc906c85 45 | """ 46 | tokens = ( 47 | 'PERCENT', 'BEGINCOMMENT', 'ENDCOMMENT', 48 | 'BACKSLASH', 'CHAR', 'BEGINVERBATIM', 49 | 'ENDVERBATIM', 'NEWLINE', 'ESCPCT', 50 | 'MAKEATLETTER', 'MAKEATOTHER', 51 | ) 52 | states = ( 53 | ('makeatblock', 'exclusive'), 54 | ('makeatlinecomment', 'exclusive'), 55 | ('linecomment', 'exclusive'), 56 | ('commentenv', 'exclusive'), 57 | ('verbatim', 'exclusive') 58 | ) 59 | 60 | # Deal with escaped backslashes, so we don't 61 | # think they're escaping % 62 | def t_BACKSLASH(t): 63 | r"\\\\" 64 | return t 65 | 66 | # Leaving all % in makeatblock 67 | def t_MAKEATLETTER(t): 68 | r"\\makeatletter" 69 | t.lexer.begin("makeatblock") 70 | return t 71 | 72 | # One-line comments 73 | def t_PERCENT(t): 74 | r"\%" 75 | t.lexer.begin("linecomment") 76 | return t # keep the % as a blank comment 77 | 78 | # Escaped percent signs 79 | def t_ESCPCT(t): 80 | r"\\\%" 81 | return t 82 | 83 | # Comment environment, as defined by verbatim package 84 | def t_BEGINCOMMENT(t): 85 | r"\\begin\s*{\s*comment\s*}" 86 | t.lexer.begin("commentenv") 87 | 88 | #Verbatim environment (different treatment of comments within) 89 | def t_BEGINVERBATIM(t): 90 | r"\\begin\s*{\s*verbatim\s*}" 91 | t.lexer.begin("verbatim") 92 | return t 93 | 94 | #Any other character in initial state we leave alone 95 | def t_CHAR(t): 96 | r"." 97 | return t 98 | 99 | def t_NEWLINE(t): 100 | r"\n" 101 | return t 102 | 103 | # End comment environment 104 | def t_commentenv_ENDCOMMENT(t): 105 | r"\\end\s*{\s*comment\s*}" 106 | #Anything after \end{comment} on a line is ignored! 107 | t.lexer.begin('linecomment') 108 | 109 | # Ignore comments of comment environment 110 | def t_commentenv_CHAR(t): 111 | r"." 112 | pass 113 | 114 | def t_commentenv_NEWLINE(t): 115 | r"\n" 116 | pass 117 | 118 | #End of verbatim environment 119 | def t_verbatim_ENDVERBATIM(t): 120 | r"\\end\s*{\s*verbatim\s*}" 121 | t.lexer.begin('INITIAL') 122 | return t 123 | 124 | #Leave contents of verbatim environment alone 125 | def t_verbatim_CHAR(t): 126 | r"." 127 | return t 128 | 129 | def t_verbatim_NEWLINE(t): 130 | r"\n" 131 | return t 132 | 133 | #End a % comment when we get to a new line 134 | def t_linecomment_ENDCOMMENT(t): 135 | r"\n" 136 | t.lexer.begin("INITIAL") 137 | 138 | # Newline at the end of a line comment is presevered. 139 | return t 140 | 141 | #Ignore anything after a % on a line 142 | def t_linecomment_CHAR(t): 143 | r"." 144 | pass 145 | 146 | def t_makeatblock_MAKEATOTHER(t): 147 | r"\\makeatother" 148 | t.lexer.begin('INITIAL') 149 | return t 150 | 151 | def t_makeatblock_BACKSLASH(t): 152 | r"\\\\" 153 | return t 154 | 155 | # Escaped percent signs in makeatblock 156 | def t_makeatblock_ESCPCT(t): 157 | r"\\\%" 158 | return t 159 | 160 | # presever % in makeatblock 161 | def t_makeatblock_PERCENT(t): 162 | r"\%" 163 | t.lexer.begin("makeatlinecomment") 164 | return t 165 | 166 | def t_makeatlinecomment_NEWLINE(t): 167 | r"\n" 168 | t.lexer.begin('makeatblock') 169 | return t 170 | 171 | # Leave contents of makeatblock alone 172 | def t_makeatblock_CHAR(t): 173 | r"." 174 | return t 175 | 176 | def t_makeatblock_NEWLINE(t): 177 | r"\n" 178 | return t 179 | 180 | # For bad characters, we just skip over it 181 | def t_ANY_error(t): 182 | t.lexer.skip(1) 183 | 184 | lexer = ply.lex.lex() 185 | lexer.input(source) 186 | return u"".join([tok.value for tok in lexer]) 187 | 188 | 189 | def find_class(source): 190 | r""" 191 | (unused) 192 | 193 | look for \documentclass[review]{siamart} 194 | then return 'siamart.cls' 195 | """ 196 | 197 | classname = re.search(r'\\documentclass.*{(.*)}', source) 198 | if classname: 199 | classname = classname.group(1) + '.cls' 200 | 201 | return classname 202 | 203 | 204 | def find_bibstyle(source): 205 | r""" 206 | look for \bibliographystyle{siamplain} 207 | then return 'siamplain.bst' 208 | """ 209 | 210 | bibstylename = re.search(r'\\bibliographystyle{(.*)}', source) 211 | if bibstylename: 212 | bibstylename = bibstylename.group(1) + '.bst' 213 | 214 | return bibstylename 215 | 216 | 217 | from collections import defaultdict 218 | 219 | def find_figs(source): 220 | r""" 221 | Parse \includegraphics and rename files with duplicate names using their relative path. 222 | """ 223 | 224 | findgraphicspath = re.search(r'\\graphicspath{(.*)}', source) 225 | if findgraphicspath: 226 | graphicspaths = re.findall(r'{(.*?)}', findgraphicspath.group(1)) 227 | else: 228 | graphicspaths = [] 229 | 230 | # First pass to count basename occurrences 231 | matches = re.findall(r'\\includegraphics(?:\[[^\]]*\])?{(.*?)}', source) 232 | name_counts = defaultdict(int) 233 | for path in matches: 234 | name = os.path.basename(path) 235 | name_counts[name] += 1 236 | 237 | figlist = [] 238 | seen = {} 239 | 240 | def path_to_safe_suffix(path): 241 | """Convert ./foo/bar/baz.pdf -> baz_foo_bar.pdf""" 242 | parts = os.path.normpath(path).split(os.sep) 243 | return "_".join(reversed(parts)).replace('.', '_', parts[-1].count('.')) 244 | 245 | def repl(m): 246 | prefix, path, suffix = m.group(1), m.group(2), m.group(3) 247 | base = os.path.basename(path) 248 | dirpath = os.path.dirname(path).lstrip('./') 249 | 250 | if name_counts[base] > 1: 251 | key = os.path.normpath(path) 252 | if key not in seen: 253 | stem, ext = os.path.splitext(base) 254 | rel_path = os.path.normpath(path).lstrip('./') 255 | path_suffix = rel_path.replace('/', '_').replace('\\', '_') 256 | newname = f"{path_suffix}" 257 | seen[key] = newname 258 | else: 259 | newname = seen[key] 260 | else: 261 | newname = base 262 | 263 | figlist.append((base, dirpath, newname)) 264 | return f"{prefix}{newname}{suffix}" 265 | 266 | source = re.sub(r'(\\includegraphics(?:\[[^\]]*\])?{)(.*?)(})', repl, source, flags=re.DOTALL) 267 | return figlist, source, graphicspaths 268 | 269 | 270 | 271 | def flatten(source): 272 | """ 273 | replace arguments of include{} and intput{} 274 | 275 | only input can be nested 276 | 277 | include adds a clearpage 278 | 279 | includeonly not supported 280 | """ 281 | 282 | def repl(m): 283 | inputname = m.group(2) 284 | if not os.path.isfile(inputname): 285 | if os.path.isfile(inputname + '.tex'): 286 | inputname = inputname + '.tex' 287 | elif os.path.isfile(inputname + '.tikz'): 288 | inputname = inputname + '.tikz' 289 | else: 290 | raise NameError(f'File {inputname}.tex or .tikz not found.') 291 | with io.open(inputname, encoding='utf-8') as f: 292 | newtext = f.read() 293 | newtext = re.sub(r'(\\input{)(.*?)(})', repl, newtext) 294 | return newtext 295 | 296 | def repl_include(m): 297 | inputname = m.group(2) 298 | if not os.path.isfile(inputname): 299 | inputname = inputname + '.tex' 300 | with io.open(inputname, encoding='utf-8') as f: 301 | newtext = f.read() 302 | newtext = '\\clearpage\n' + newtext 303 | newtext = re.sub(r'(\\input{)(.*?)(})', repl, newtext) 304 | newtext += '\\clearpage\n' 305 | return newtext 306 | 307 | dest = re.sub(r'(\\include{)(.*?)(})', repl_include, source) 308 | dest = re.sub(r'(\\input{)(.*?)(})', repl, dest) 309 | return dest 310 | 311 | 312 | def main(): 313 | import argparse 314 | parser = argparse.ArgumentParser() 315 | parser.add_argument("fname", metavar="filename.tex", help="name of texfile to arxiv") 316 | args = parser.parse_args() 317 | fname = args.fname 318 | 319 | print('[parxiv] reading %s' % fname) 320 | with io.open(fname, encoding='utf-8') as f: 321 | source = f.read() 322 | 323 | print('[parxiv] stripping comments') 324 | source = strip_comments(source) 325 | print('[parxiv] flattening source') 326 | source = flatten(source) 327 | print('[parxiv] stripping comments again') 328 | source = strip_comments(source) 329 | print('[parxiv] finding figures...') 330 | figlist, source, graphicspaths = find_figs(source) 331 | # print('[parxiv] finding article class and bib style') 332 | # localbibstyle = find_bibstyle(source) 333 | 334 | print('[parxiv] making directory', end='') 335 | dirname = 'arxiv-' + time.strftime('%c').replace(' ', '-') 336 | dirname = dirname.replace(':', '-') 337 | print(' %s' % dirname) 338 | os.makedirs(dirname) 339 | 340 | print('[parxiv] copying class/style files') 341 | # shutil.copy2(localclass, os.path.join(dirname, localclass)) 342 | # if localbibstyle is not None: 343 | # shutil.copy2(localbibstyle, os.path.join(dirname, localbibstyle)) 344 | for bst in glob.glob('*.bst'): 345 | shutil.copy2(bst, os.path.join(dirname, bst)) 346 | for sty in glob.glob('*.sty'): 347 | shutil.copy2(sty, os.path.join(dirname, sty)) 348 | for cls in glob.glob('*.cls'): 349 | shutil.copy2(cls, os.path.join(dirname, cls)) 350 | 351 | print('[parxiv] copying figures') 352 | for figname, figpath, newfigname in figlist: 353 | allpaths = graphicspaths 354 | allpaths += ['./'] 355 | 356 | _, ext = os.path.splitext(figname) 357 | if ext == '': 358 | figname += '.pdf' 359 | newfigname += '.pdf' 360 | 361 | if figpath: 362 | allpaths = [os.path.join(p, figpath) for p in allpaths] 363 | 364 | for p in allpaths: 365 | 366 | #if 'quartz' in newfigname: 367 | # print(p) 368 | 369 | src = os.path.join(p, figname) 370 | dest = os.path.join(dirname, os.path.basename(newfigname)) 371 | try: 372 | shutil.copy2(src, dest) 373 | except IOError: 374 | # attempts multiple graphics paths 375 | pass 376 | 377 | # copy bbl file 378 | print('[parxiv] copying bbl file') 379 | bblfile = fname.replace('.tex', '.bbl') 380 | newbblfile = fname.replace('.tex', '_strip.bbl') 381 | bblflag = False 382 | try: 383 | shutil.copy2(bblfile, os.path.join(dirname, newbblfile)) 384 | bblflag = True 385 | except FileNotFoundError: 386 | print(' ...skipping, not found') 387 | 388 | # copy extra files 389 | try: 390 | with io.open('extra.txt', encoding='utf-8') as f: 391 | inputsource = f.read() 392 | except IOError: 393 | print('[parxiv] copying no extra files') 394 | else: 395 | print('[parxiv] copying extra file(s): ', end='') 396 | for f in inputsource.split('\n'): 397 | if os.path.isfile(f): 398 | localname = os.path.basename(f) 399 | print(' %s' % localname, end='') 400 | shutil.copy2(f, os.path.join(dirname, localname)) 401 | print('\n') 402 | 403 | newtexfile = fname.replace('.tex', '_strip.tex') 404 | print('[parxiv] writing %s' % newtexfile) 405 | with io.open( 406 | os.path.join(dirname, newtexfile), 'w') as fout: 407 | fout.write(source) 408 | 409 | print('[parxiv] attempting to generate bbl file') 410 | if not bblflag: 411 | # attempt to generate 412 | # with tempfile.TemporaryDirectory() as d: 413 | # python2 support 414 | try: 415 | d = tempfile.mkdtemp() 416 | try: 417 | args = ['pdflatex', 418 | '-interaction', 'nonstopmode', 419 | '-recorder', 420 | '-output-directory', d, 421 | newtexfile] 422 | # python2 support 423 | try: 424 | from subprocess import DEVNULL 425 | except ImportError: 426 | DEVNULL = open(os.devnull, 'wb') 427 | p = subprocess.Popen(args, 428 | cwd=dirname, 429 | stdin=DEVNULL, 430 | stdout=subprocess.PIPE, 431 | stderr=subprocess.STDOUT) 432 | p.communicate() 433 | 434 | # copy .bib files 435 | for bib in glob.glob('*.bib'): 436 | shutil.copy2(bib, os.path.join(d, bib)) 437 | for bib in glob.glob('*.bst'): 438 | shutil.copy2(bib, os.path.join(d, bib)) 439 | 440 | args = ['bibtex', newtexfile.replace('.tex', '.aux')] 441 | p = subprocess.Popen(args, 442 | cwd=d, 443 | stdin=DEVNULL, 444 | stdout=subprocess.PIPE, 445 | stderr=subprocess.STDOUT) 446 | p.communicate() 447 | except OSError as e: 448 | raise RuntimeError(e) 449 | 450 | bblfile = newtexfile.replace('.tex', '.bbl') 451 | if os.path.isfile(os.path.join(d, bblfile)): 452 | print(' ... generated') 453 | shutil.copy2(os.path.join(d, bblfile), 454 | os.path.join(dirname, bblfile)) 455 | else: 456 | print(' ... could not generate') 457 | finally: 458 | try: 459 | shutil.rmtree(d) 460 | except OSError as e: 461 | if e.errno != errno.ENOENT: 462 | raise 463 | 464 | if __name__ == '__main__': 465 | main() 466 | -------------------------------------------------------------------------------- /example/amsart.cls: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `amsart.cls', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% amsclass.dtx (with options: `amsart,classes') 8 | %% 9 | %% This is a generated file. 10 | %% 11 | %% Copyright 1995, 199, 2004, 2009, 2015 American Mathematical Society. 12 | %% 13 | %% American Mathematical Society 14 | %% Technical Support 15 | %% Publications Technical Group 16 | %% 201 Charles Street 17 | %% Providence, RI 02904 18 | %% USA 19 | %% tel: (401) 455-4080 20 | %% (800) 321-4267 (USA and Canada only) 21 | %% fax: (401) 331-3842 22 | %% email: tech-support@ams.org 23 | %% 24 | %% Unlimited copying and redistribution of this file are permitted as 25 | %% long as this file is not modified. Modifications, and distribution 26 | %% of modified versions, are permitted, but only if the resulting file 27 | %% is renamed. 28 | %% 29 | \NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX) 30 | [1995/06/01]% LaTeX date must be June 1995 or later 31 | \ProvidesClass{amsart}[2015/03/04 v2.20.2] 32 | \global\expandafter\let\csname ver@amsthm.sty\expandafter\endcsname 33 | \csname ver@\@currname.\@currext\endcsname 34 | \let\@xp=\expandafter 35 | \let\@nx=\noexpand 36 | \def\@oparg#1[#2]{\@ifnextchar[{#1}{#1[#2]}} 37 | \long\def\@ifempty#1{\@xifempty#1@@..\@nil} 38 | \long\def\@xifempty#1#2@#3#4#5\@nil{% 39 | \ifx#3#4\@xp\@firstoftwo\else\@xp\@secondoftwo\fi} 40 | \long\def\@ifnotempty#1{\@ifempty{#1}{}} 41 | \def\setboxz@h{\setbox\z@\hbox} 42 | \def\@addpunct#1{% 43 | \relax\ifhmode 44 | \ifnum\spacefactor>\@m \else#1\fi 45 | \fi} 46 | \def\nopunct{\spacefactor 1007 } 47 | \def\frenchspacing{\sfcode`\.1006\sfcode`\?1005\sfcode`\!1004% 48 | \sfcode`\:1003\sfcode`\;1002\sfcode`\,1001 } 49 | \def\@tempa#1#2\@nil{\edef\@classname{#1}} 50 | \expandafter\@tempa\@currnamestack{}{}{}\@nil 51 | \ifx\@classname\@empty \edef\@classname{\@currname}\fi 52 | \def\@True{00} 53 | \def\@False{01} 54 | \newcommand\newswitch[2][False]{% 55 | \expandafter\@ifdefinable\csname ?@#2\endcsname{% 56 | \global\expandafter\let\csname ?@#2\expandafter\endcsname 57 | \csname @#1\endcsname 58 | }% 59 | } 60 | \newcommand{\setFalse}[1]{% 61 | \expandafter\let\csname ?@#1\endcsname\@False 62 | } 63 | \newcommand{\setTrue}[1]{% 64 | \expandafter\let\csname ?@#1\endcsname\@True 65 | } 66 | \newswitch{} 67 | \DeclareRobustCommand{\except}[1]{% 68 | \if\csname ?@#1\endcsname \expandafter\@gobble 69 | \else \expandafter\@firstofone 70 | \fi 71 | } 72 | \DeclareRobustCommand{\for}[1]{% 73 | \if\csname ?@#1\endcsname \expandafter\@firstofone 74 | \else \expandafter\@gobble 75 | \fi 76 | } 77 | \DeclareRobustCommand{\forany}[1]{% 78 | \csname for@any@01\endcsname#1,?,\@nil 79 | } 80 | \@namedef{for@any@\@False}#1,{% 81 | \csname for@any@% 82 | \csname ?@\zap@space#1 \@empty\endcsname 83 | \endcsname 84 | } 85 | \@namedef{?@?}{x} 86 | \@namedef{for@any@\@True}#1\@nil#2{#2} 87 | \def\for@any@x{\@car\@gobble} 88 | \DeclareOption{a4paper}{\paperheight 297mm\paperwidth 210mm 89 | \textheight 54.5pc } 90 | \DeclareOption{letterpaper}{\paperheight 11in\paperwidth 8.5in } 91 | \DeclareOption{landscape}{\@tempdima\paperheight 92 | \paperheight\paperwidth \paperwidth\@tempdima} 93 | \DeclareOption{portrait}{} 94 | \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} 95 | \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} 96 | \DeclareOption{draft}{\overfullrule5\p@ 97 | \ClassWarningNoLine{\@classname}{% 98 | When the draft option is used, the 99 | \protect\includegraphics\MessageBreak 100 | command will print blank placeholder boxes\MessageBreak 101 | for the graphics}% 102 | } 103 | \DeclareOption{final}{\overfullrule\z@ } 104 | \def\dateposted#1{\def\@dateposted{#1}}% 105 | \let\@dateposted\@empty 106 | \def\@setdateposted{% 107 | \newline Article electronically published on \@dateposted} 108 | \def\article@logo{% 109 | \set@logo{% 110 | \publname 111 | \ifx\@empty\currentvolume 112 | \else \newline\volinfo, \pageinfo 113 | \fi 114 | \newline \@PII 115 | \ifx\@empty\@dateposted \else \@setdateposted\fi 116 | }% 117 | } 118 | \def\eonly@logo{% 119 | \set@logo{% 120 | \publname 121 | \newline\volinfo, \pageinfo 122 | \ifx\@empty\@dateposted \else \@setdateposted\fi 123 | \newline \@PII 124 | }% 125 | } 126 | \def\@logofont{\fontsize{6}{7\p@}\selectfont} 127 | \long\def\set@logo#1{% 128 | \vbox to\headheight{% 129 | \@parboxrestore \@logofont 130 | \noindent#1\par\vss 131 | }% 132 | } 133 | \DeclareOption{e-only}{% 134 | \def\volinfo{Volume \currentvolume}% 135 | \dateposted{Xxxx XX, XXXX}% 136 | \def\@setdateposted{\ (\@dateposted)}% 137 | \let\article@logo\eonly@logo 138 | } 139 | \newif\if@titlepage 140 | \DeclareOption{titlepage}{\@titlepagetrue} 141 | \DeclareOption{notitlepage}{\@titlepagefalse} 142 | \DeclareOption{onecolumn}{\@twocolumnfalse} 143 | \DeclareOption{twocolumn}{\@twocolumntrue} 144 | \DeclareOption{nomath}{} 145 | \DeclareOption{noamsfonts}{} 146 | \DeclareOption{psamsfonts}{% 147 | \PassOptionsToPackage{psamsfonts}{amsfonts}% 148 | \PassOptionsToPackage{cmex10}{amsmath}} 149 | \newif\iftagsleft@ 150 | \DeclareOption{leqno}{% 151 | \tagsleft@true \PassOptionsToPackage{leqno}{amsmath}} 152 | \DeclareOption{reqno}{% 153 | \tagsleft@false \PassOptionsToPackage{reqno}{amsmath}} 154 | \newif\ifctagsplit@ 155 | \DeclareOption{centertags}{% 156 | \ctagsplit@true \PassOptionsToPackage{centertags}{amsmath}} 157 | \DeclareOption{tbtags}{% 158 | \ctagsplit@false \PassOptionsToPackage{tbtags}{amsmath}} 159 | \DeclareOption{fleqn}{}% 160 | \newcommand{\@mainsize}{10} 161 | \newcommand{\@ptsize}{0} 162 | \newcommand{\larger}[1][1]{% 163 | \count@\@currsizeindex \advance\count@#1\relax 164 | \ifnum\count@<\z@ \count@\z@ \else\ifnum\count@>12 \count@12 \fi\fi 165 | \ifcase\count@ 166 | \Tiny\or\Tiny\or\tiny\or\SMALL\or\Small\or\small 167 | \or\normalsize 168 | \or\large\or\Large\or\LARGE\or\huge\or\Huge\else\Huge 169 | \fi 170 | } 171 | \newcommand{\smaller}[1][1]{\larger[-#1]} 172 | \def\@adjustvertspacing{% 173 | \bigskipamount.7\baselineskip plus.7\baselineskip 174 | \medskipamount\bigskipamount \divide\medskipamount\tw@ 175 | \smallskipamount\medskipamount \divide\smallskipamount\tw@ 176 | \abovedisplayskip\medskipamount 177 | \belowdisplayskip \abovedisplayskip 178 | \abovedisplayshortskip\abovedisplayskip 179 | \advance\abovedisplayshortskip-1\abovedisplayskip 180 | \belowdisplayshortskip\abovedisplayshortskip 181 | \advance\belowdisplayshortskip 1\smallskipamount 182 | \jot\baselineskip \divide\jot 4 \relax 183 | } 184 | \renewcommand\normalsize{\@xsetfontsize\normalsize 6% 185 | \@adjustvertspacing \let\@listi\@listI} 186 | \DeclareRobustCommand{\Tiny}{\@xsetfontsize\Tiny 1} 187 | \DeclareRobustCommand{\tiny}{\@xsetfontsize\tiny 2} 188 | \DeclareRobustCommand{\SMALL}{\@xsetfontsize\SMALL 3} 189 | \DeclareRobustCommand{\Small}{\@xsetfontsize\Small 4% 190 | \@adjustvertspacing 191 | \def\@listi{\topsep\smallskipamount \parsep\z@skip \itemsep\z@skip 192 | \leftmargin=\leftmargini 193 | \labelwidth=\leftmargini \advance\labelwidth-\labelsep 194 | }% 195 | } 196 | \DeclareRobustCommand{\small}{\@xsetfontsize\small 5\@adjustvertspacing} 197 | \def\footnotesize{\Small} 198 | \def\scriptsize{\SMALL} 199 | \DeclareRobustCommand{\large}{\@xsetfontsize\large 7\@adjustvertspacing} 200 | \DeclareRobustCommand{\Large}{\@xsetfontsize\Large 8\@adjustvertspacing} 201 | \DeclareRobustCommand{\LARGE}{\@xsetfontsize\LARGE 9} 202 | \DeclareRobustCommand{\huge}{\@xsetfontsize\huge{10}} 203 | \DeclareRobustCommand{\Huge}{\@xsetfontsize\Huge{11}} 204 | \def\@xsetfontsize#1#2{% 205 | \chardef\@currsizeindex#2\relax 206 | \edef\@tempa{\@nx\@setfontsize\@nx#1% 207 | \@xp\ifcase\@xp\@currsizeindex\@typesizes 208 | \else{99}{99}\fi}% 209 | \@tempa 210 | } 211 | \chardef\@currsizeindex=6 212 | \widowpenalty=10000 213 | \clubpenalty=10000 214 | \brokenpenalty=10000 215 | \newdimen\linespacing 216 | \lineskip=1pt \lineskiplimit=1pt 217 | \normallineskip=1pt \normallineskiplimit=1pt 218 | \let\baselinestretch=\@empty 219 | \headheight=8pt \headsep=14pt 220 | \footskip=12pt 221 | \textheight=50.5pc \topskip=10pt 222 | \textwidth=30pc 223 | \columnsep=10pt \columnseprule=0pt 224 | \marginparwidth=90pt 225 | \marginparsep=11pt 226 | \marginparpush=5pt 227 | \AtBeginDocument{\settoheight{\footnotesep}{\footnotesize M$^1$}} 228 | \skip\footins=7pt plus11pt 229 | \skip\@mpfootins=\skip\footins 230 | \fboxsep=3pt \fboxrule=.4pt 231 | \arrayrulewidth=.4pt \doublerulesep=2pt 232 | \labelsep=5pt \arraycolsep=\labelsep 233 | \tabcolsep=\labelsep \tabbingsep=\labelsep 234 | \floatsep=15pt plus 12pt \dblfloatsep=15pt plus 12pt 235 | \textfloatsep=\floatsep \dbltextfloatsep=15pt plus 12pt 236 | \intextsep=\floatsep 237 | \@fptop=0pt plus1fil \@dblfptop=0pt plus1fil 238 | \@fpbot=0pt plus1fil \@dblfpbot=0pt plus1fil 239 | \@fpsep=8pt plus2fil \@dblfpsep=8pt plus2fil\relax 240 | \parskip=0pt \relax 241 | \newdimen\normalparindent 242 | \normalparindent=12pt 243 | \parindent=\normalparindent 244 | \partopsep=0pt \relax \parsep=0pt \relax \itemsep=0pt \relax 245 | \@lowpenalty=51 \@medpenalty=151 \@highpenalty=301 246 | \@beginparpenalty=-\@lowpenalty 247 | \@endparpenalty=-\@lowpenalty 248 | \@itempenalty=-\@lowpenalty 249 | \DeclareOption{10pt}{\def\@mainsize{10}\def\@ptsize{0}% 250 | \def\@typesizes{% 251 | \or{5}{6}\or{6}{7}\or{7}{8}\or{8}{10}\or{9}{11}% 252 | \or{10}{12}% normalsize 253 | \or{\@xipt}{13}\or{\@xiipt}{14}\or{\@xivpt}{17}% 254 | \or{\@xviipt}{20}\or{\@xxpt}{24}}% 255 | \normalsize \linespacing=\baselineskip 256 | } 257 | \DeclareOption{11pt}{\def\@mainsize{11}\def\@ptsize{1}% 258 | \def\@typesizes{% 259 | \or{6}{7}\or{7}{8}\or{8}{10}\or{9}{11}\or{10}{12}% 260 | \or{\@xipt}{13}% normalsize 261 | \or{\@xiipt}{14}\or{\@xivpt}{17}\or{\@xviipt}{20}% 262 | \or{\@xxpt}{24}\or{\@xxvpt}{30}}% 263 | \normalsize \linespacing=\baselineskip 264 | } 265 | \DeclareOption{12pt}{\def\@mainsize{12}\def\@ptsize{2}% 266 | \def\@typesizes{% 267 | \or{7}{8}\or{8}{10}\or{9}{11}\or{10}{12}\or{\@xipt}{13}% 268 | \or{\@xiipt}{14}% normalsize 269 | \or{\@xivpt}{17}\or{\@xviipt}{20}\or{\@xxpt}{24}% 270 | \or{\@xxvpt}{30}\or{\@xxvpt}{30}}% 271 | \normalsize \linespacing=\baselineskip 272 | } 273 | \DeclareOption{8pt}{\def\@mainsize{8}\def\@ptsize{8}% 274 | \def\@typesizes{% 275 | \or{5}{6}\or{5}{6}\or{5}{6}\or{6}{7}\or{7}{8}% 276 | \or{8}{10}% normalsize 277 | \or{9}{11}\or{10}{12}\or{\@xipt}{13}% 278 | \or{\@xiipt}{14}\or{\@xivpt}{17}}% 279 | \normalsize \linespacing=\baselineskip 280 | } 281 | \DeclareOption{9pt}{\def\@mainsize{9}\def\@ptsize{9}% 282 | \def\@typesizes{% 283 | \or{5}{6}\or{5}{6}\or{6}{7}\or{7}{8}\or{8}{10}% 284 | \or{9}{11}% normalsize 285 | \or{10}{12}\or{\@xipt}{13}\or{\@xiipt}{14}% 286 | \or{\@xivpt}{17}\or{\@xviipt}{20}}% 287 | \normalsize \linespacing=\baselineskip 288 | } 289 | \def\ps@empty{\let\@mkboth\@gobbletwo 290 | \let\@oddhead\@empty \let\@evenhead\@empty 291 | \let\@oddfoot\@empty \let\@evenfoot\@empty 292 | \global\topskip\normaltopskip} 293 | \def\ps@plain{\ps@empty 294 | \def\@oddfoot{\normalfont\scriptsize \hfil\thepage\hfil}% 295 | \let\@evenfoot\@oddfoot} 296 | \newswitch{runhead} 297 | \def\ps@headings{\ps@empty 298 | \def\@evenhead{% 299 | \setTrue{runhead}% 300 | \normalfont\scriptsize 301 | \rlap{\thepage}\hfil 302 | \def\thanks{\protect\thanks@warning}% 303 | \leftmark{}{}\hfil}% 304 | \def\@oddhead{% 305 | \setTrue{runhead}% 306 | \normalfont\scriptsize \hfil 307 | \def\thanks{\protect\thanks@warning}% 308 | \rightmark{}{}\hfil \llap{\thepage}}% 309 | \let\@mkboth\markboth 310 | } 311 | \let\sectionname\@empty 312 | \let\subsectionname\@empty 313 | \let\subsubsectionname\@empty 314 | \let\paragraphname\@empty 315 | \let\subparagraphname\@empty 316 | \def\leftmark{\expandafter\@firstoftwo\topmark{}{}} 317 | \def\rightmark{\expandafter\@secondoftwo\botmark{}{}} 318 | \def\ps@firstpage{\ps@plain 319 | \def\@oddfoot{\normalfont\scriptsize \hfil\thepage\hfil 320 | \global\topskip\normaltopskip}% 321 | \let\@evenfoot\@oddfoot 322 | \def\@oddhead{\@serieslogo\hss}% 323 | \let\@evenhead\@oddhead % in case an article starts on a left-hand page 324 | } 325 | \long\def\@nilgobble#1\@nil{} 326 | \def\markboth#1#2{% 327 | \begingroup 328 | \@temptokena{{#1}{#2}}\xdef\@themark{\the\@temptokena}% 329 | \mark{\the\@temptokena}% 330 | \endgroup 331 | \if@nobreak\ifvmode\nobreak\fi\fi} 332 | \def\ps@myheadings{\ps@headings \let\@mkboth\@gobbletwo} 333 | \newskip\normaltopskip 334 | \normaltopskip=10pt \relax 335 | \let\sectionmark\@gobble 336 | \let\subsectionmark\@gobble 337 | \let\subsubsectionmark\@gobble 338 | \let\paragraphmark\@gobble 339 | 340 | \DeclareOption{makeidx}{} 341 | \ExecuteOptions{leqno,centertags,letterpaper,portrait,% 342 | 10pt,twoside,onecolumn,final} 343 | \ProcessOptions\relax 344 | \if@compatibility 345 | \def\@tempa{\RequirePackage{amstex}\relax}% 346 | \else 347 | \@ifclasswith{\@classname}{nomath}{% 348 | \let\@tempa\relax 349 | }{% 350 | \def\@tempa{\RequirePackage{amsmath}\relax}% 351 | }% 352 | \fi 353 | \@tempa % load amstex.sty or amsmath.sty 354 | \@ifundefined{numberwithin}{% 355 | \newcommand{\numberwithin}[3][\arabic]{% 356 | \@ifundefined{c@#2}{\@nocounterr{#2}}{% 357 | \@ifundefined{c@#3}{\@nocnterr{#3}}{% 358 | \@addtoreset{#2}{#3}% 359 | \@xp\xdef\csname the#2\endcsname{% 360 | \@xp\@nx\csname the#3\endcsname .\@nx#1{#2}}}}% 361 | } 362 | \csname newtoks\endcsname\@emptytoks 363 | }{} 364 | \if@compatibility 365 | \else 366 | \@ifclasswith{\@classname}{noamsfonts}{% 367 | % amsfonts package is not wanted 368 | }{% 369 | % amsfonts package IS wanted; test whether a recent enough version 370 | % seems to be installed 371 | \begingroup \fontencoding{U}\fontfamily{msa}\try@load@fontshape\endgroup 372 | \global\@xp\let\csname U+msa\endcsname\relax % reset 373 | \@ifundefined{U/msa/m/n}{% 374 | \ClassError{\@classname}{% 375 | Package `amsfonts' not installed, or version too old?\MessageBreak 376 | Unable to get font info for the `msam' fonts in the expected form% 377 | }{% 378 | The amsfonts package will not be loaded, to avoid probable\MessageBreak 379 | incompatibility problems. You can (a) use the `noamsfonts' 380 | documentclass\MessageBreak 381 | option next time, or (b) check that the amsfonts package is 382 | installed\MessageBreak 383 | correctly, and is not too old to be compatible.% 384 | }% 385 | }{% 386 | \RequirePackage{amsfonts}[1995/01/01]\relax 387 | }% 388 | } 389 | \fi % end yesamsfonts branch 390 | \let\cleardouble@page\cleardoublepage 391 | \AtBeginDocument{% 392 | \ifx\cleardouble@page\cleardoublepage 393 | \def\cleardoublepage{\clearpage{\pagestyle{empty}\cleardouble@page}} 394 | \fi 395 | } 396 | \newcommand{\uppercasenonmath}[1]{\toks@\@emptytoks 397 | \@xp\@skipmath\@xp\@empty#1$$% 398 | \edef#1{{\@nx\protect\@nx\@upprep\the\toks@}}% 399 | } 400 | \newcommand{\@upprep}{% 401 | \spaceskip1.3\fontdimen2\font plus1.3\fontdimen3\font 402 | \upchars@} 403 | \newcommand{\upchars@}{% 404 | \def\ss{SS}\def\i{I}\def\j{J}\def\ae{\AE}\def\oe{\OE}% 405 | \def\o{\O}\def\aa{\AA}\def\l{\L}\def\Mc{M{\scshape c}}} 406 | \providecommand{\Mc}{Mc} 407 | \newcommand{\@skipmath}{} 408 | \long\def\@skipmath#1$#2${% 409 | \@xskipmath#1\(\)% 410 | \@ifnotempty{#2}{\toks@\@xp{\the\toks@$#2$}\@skipmath\@empty}}% 411 | \newcommand{\@xskipmath}{} 412 | \long\def\@xskipmath#1\(#2\){% 413 | \uppercase{\toks@\@xp\@xp\@xp{\@xp\the\@xp\toks@#1}}% 414 | \@ifnotempty{#2}{\toks@\@xp{\the\toks@\(#2\)}\@xskipmath\@empty}}% 415 | \def\altucnm#1{% 416 | \MakeTextUppercase{\toks@{#1}}% 417 | \edef#1{\the\toks@}% 418 | } 419 | \AtBeginDocument{% 420 | \@ifundefined{MakeTextUppercase}{}{\let\uppercasenonmath\altucnm}% 421 | } 422 | \@ifundefined{MakeUppercase}{\let\MakeUppercase\uppercase}{}% 423 | \newcommand{\today}{% 424 | \relax\ifcase\month\or 425 | January\or February\or March\or April\or May\or June\or 426 | July\or August\or September\or October\or November\or December\fi 427 | \space\number\day, \number\year} 428 | \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} 429 | \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} 430 | \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} 431 | \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} 432 | \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} 433 | \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} 434 | \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} 435 | %%\if@compatibility 436 | %%\else 437 | %% \def\@obsolete@fontswitch#1#2#3{% 438 | %% \@latex@warning@no@line{% 439 | %% Command {\string#1...}\on@line\space is obsolete;\MessageBreak 440 | %% the LaTeX2e equivalent is \string#3{...}}% 441 | %% \gdef#1{\@fontswitch\relax#3}% 442 | %% } 443 | %% \DeclareRobustCommand*\cal{% 444 | %% \@xp\@obsolete@fontswitch\csname cal \endcsname\relax\mathcal} 445 | %% \DeclareRobustCommand*\mit{% 446 | %% \@xp\@obsolete@fontswitch\csname mit \endcsname\relax\mathnormal} 447 | %%\fi 448 | \renewcommand*{\title}[2][]{\gdef\shorttitle{#1}\gdef\@title{#2}} 449 | \edef\title{\@nx\@dblarg 450 | \@xp\@nx\csname\string\title\endcsname} 451 | \renewcommand{\author}[2][]{% 452 | \ifx\@empty\authors 453 | \gdef\authors{#2}% 454 | \else 455 | \g@addto@macro\authors{\and#2}% 456 | \g@addto@macro\addresses{\author{}}% 457 | \fi 458 | \@ifnotempty{#1}{% 459 | \ifx\@empty\shortauthors 460 | \gdef\shortauthors{#1}% 461 | \else 462 | \g@addto@macro\shortauthors{\and#1}% 463 | \fi 464 | }% 465 | } 466 | \edef\author{\@nx\@dblarg 467 | \@xp\@nx\csname\string\author\endcsname} 468 | \let\shortauthors\@empty \let\authors\@empty 469 | \newif\ifresetcontrib \resetcontribfalse 470 | \newcommand\contrib[2][]{% 471 | \def\@tempa{#1}% 472 | \ifx\@empty\@tempa 473 | \else 474 | \ifresetcontrib \@xcontribs 475 | \else \global\resetcontribtrue 476 | \fi 477 | \fi 478 | \ifx\@empty\contribs 479 | \gdef\contribs{#1 #2}% 480 | \else 481 | \g@addto@macro\contribs{\and#1 #2}% 482 | \fi 483 | \@wraptoccontribs{#1}{#2}% 484 | } 485 | \def\wraptoccontribs#1#2{} 486 | \def\@xcontribs{% 487 | \author@andify\contribs 488 | \ifx\@empty\xcontribs 489 | \xdef\xcontribs{\contribs}% 490 | \else 491 | \xdef\xcontribs{\xcontribs, \contribs}% 492 | \fi 493 | \let\contribs\@empty 494 | } 495 | \let\contribs\@empty \let\xcontribs\@empty \let\toccontribs\@empty 496 | \let\addresses\@empty \let\thankses\@empty 497 | \newcommand{\address}[2][]{\g@addto@macro\addresses{\address{#1}{#2}}} 498 | \newcommand{\curraddr}[2][]{\g@addto@macro\addresses{\curraddr{#1}{#2}}} 499 | \newcommand{\email}[2][]{\g@addto@macro\addresses{\email{#1}{#2}}} 500 | \newcommand{\urladdr}[2][]{\g@addto@macro\addresses{\urladdr{#1}{#2}}} 501 | \long\def\thanks@warning#1{% 502 | \ClassError{\@classname}{% 503 | \protect\thanks\space should be given separately, not inside author name.% 504 | }\@ehb 505 | } 506 | \renewcommand{\thanks}[1]{% 507 | \@ifnotempty{#1}{\g@addto@macro\thankses{\thanks{#1}}}% 508 | } 509 | \def\enddoc@text{\ifx\@empty\@translators \else\@settranslators\fi 510 | \ifx\@empty\addresses \else\@setaddresses\fi} 511 | \AtEndDocument{\enddoc@text} 512 | \def\curraddrname{{\itshape Current address}} 513 | \def\emailaddrname{{\itshape E-mail address}} 514 | \def\urladdrname{{\itshape URL}} 515 | \def\@setaddresses{\par 516 | \nobreak \begingroup 517 | \footnotesize 518 | \def\author##1{\nobreak\addvspace\bigskipamount}% 519 | \def\\{\unskip, \ignorespaces}% 520 | \interlinepenalty\@M 521 | \def\address##1##2{\begingroup 522 | \par\addvspace\bigskipamount\indent 523 | \@ifnotempty{##1}{(\ignorespaces##1\unskip) }% 524 | {\scshape\ignorespaces##2}\par\endgroup}% 525 | \def\curraddr##1##2{\begingroup 526 | \@ifnotempty{##2}{\nobreak\indent\curraddrname 527 | \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space 528 | ##2\par}\endgroup}% 529 | \def\email##1##2{\begingroup 530 | \@ifnotempty{##2}{\nobreak\indent\emailaddrname 531 | \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space 532 | \ttfamily##2\par}\endgroup}% 533 | \def\urladdr##1##2{\begingroup 534 | \def~{\char`\~}% 535 | \@ifnotempty{##2}{\nobreak\indent\urladdrname 536 | \@ifnotempty{##1}{, \ignorespaces##1\unskip}\/:\space 537 | \ttfamily##2\par}\endgroup}% 538 | \addresses 539 | \endgroup 540 | } 541 | \let\@date\@empty 542 | \def\dedicatory#1{\def\@dedicatory{#1}} 543 | \let\@dedicatory=\@empty 544 | \def\keywords#1{\def\@keywords{#1}} 545 | \let\@keywords=\@empty 546 | \newcommand*\subjclass[2][1991]{% 547 | \def\@subjclass{#2}% 548 | \@ifundefined{subjclassname@#1}{% 549 | \ClassWarning{\@classname}{Unknown edition (#1) of Mathematics 550 | Subject Classification; using '1991'.}% 551 | }{% 552 | \@xp\let\@xp\subjclassname\csname subjclassname@#1\endcsname 553 | }% 554 | } 555 | \let\@subjclass=\@empty 556 | \def\commby#1{\def\@commby{(Communicated by #1)}} 557 | \let\@commby=\@empty 558 | \def\translname{Translated by} 559 | \def\translator#1{% 560 | \ifx\@empty\@translators \def\@translators{#1}% 561 | \else\g@addto@macro\@translators{\and#1}\fi} 562 | \let\@translators=\@empty 563 | \def\@settranslators{\par\begingroup 564 | \addvspace{6\p@\@plus9\p@}% 565 | \hbox to\columnwidth{\hss\normalfont\normalsize 566 | \translname{ }% 567 | \andify\@translators \uppercasenonmath\@translators 568 | \@translators} 569 | \endgroup 570 | } 571 | \newcommand{\xandlist}[4]{\@andlista{{#1}{#2}{#3}}#4\and\and} 572 | \def\@andlista#1#2\and#3\and{\@andlistc{#2}\@ifnotempty{#3}{% 573 | \@andlistb#1{#3}}} 574 | \def\@andlistb#1#2#3#4#5\and{% 575 | \@ifempty{#5}{% 576 | \@andlistc{#2#4}% 577 | }{% 578 | \@andlistc{#1#4}\@andlistb{#1}{#3}{#3}{#5}% 579 | }} 580 | \let\@andlistc\@iden 581 | \newcommand{\nxandlist}[4]{% 582 | \def\@andlistc##1{\toks@\@xp{\the\toks@##1}}% 583 | \toks@{\toks@\@emptytoks \@andlista{{#1}{#2}{#3}}}% 584 | \the\@xp\toks@#4\and\and 585 | \edef#4{\the\toks@}% 586 | \let\@andlistc\@iden} 587 | \def\@@and{and} 588 | \newcommand{\andify}{% 589 | \nxandlist{\unskip, }{\unskip{} \@@and~}{\unskip, \@@and~}} 590 | \def\and{\unskip{ }\@@and{ }\ignorespaces} 591 | \def\maketitle{\par 592 | \@topnum\z@ % this prevents figures from falling at the top of page 1 593 | \@setcopyright 594 | \thispagestyle{firstpage}% this sets first page specifications 595 | \uppercasenonmath\shorttitle 596 | \ifx\@empty\shortauthors \let\shortauthors\shorttitle 597 | \else \andify\shortauthors 598 | \fi 599 | \@maketitle@hook 600 | \begingroup 601 | \@maketitle 602 | \toks@\@xp{\shortauthors}\@temptokena\@xp{\shorttitle}% 603 | \toks4{\def\\{ \ignorespaces}}% defend against questionable usage 604 | \edef\@tempa{% 605 | \@nx\markboth{\the\toks4 606 | \@nx\MakeUppercase{\the\toks@}}{\the\@temptokena}}% 607 | \@tempa 608 | \endgroup 609 | \c@footnote\z@ 610 | \@cleartopmattertags 611 | } 612 | \def\@cleartopmattertags{% 613 | \def\do##1{\let##1\relax}% 614 | \do\maketitle \do\@maketitle \do\title \do\@xtitle \do\@title 615 | \do\author \do\@xauthor \do\address \do\@xaddress 616 | \do\contrib \do\contribs \do\xcontribs \do\toccontribs 617 | \do\email \do\@xemail \do\curraddr \do\@xcurraddr 618 | \do\commby \do\@commby 619 | \do\dedicatory \do\@dedicatory \do\thanks \do\thankses 620 | \do\keywords \do\@keywords \do\subjclass \do\@subjclass 621 | } 622 | \def\@maketitle@hook{\global\let\@maketitle@hook\@empty} 623 | \def\@maketitle{% 624 | \normalfont\normalsize 625 | \@adminfootnotes 626 | \@mkboth{\@nx\shortauthors}{\@nx\shorttitle}% 627 | \global\topskip42\p@\relax % 5.5pc " " " " " 628 | \@settitle 629 | \ifx\@empty\authors \else \@setauthors \fi 630 | \ifx\@empty\@dedicatory 631 | \else 632 | \baselineskip18\p@ 633 | \vtop{\centering{\footnotesize\itshape\@dedicatory\@@par}% 634 | \global\dimen@i\prevdepth}\prevdepth\dimen@i 635 | \fi 636 | \@setabstract 637 | \normalsize 638 | \if@titlepage 639 | \newpage 640 | \else 641 | \dimen@34\p@ \advance\dimen@-\baselineskip 642 | \vskip\dimen@\relax 643 | \fi 644 | } % end \@maketitle 645 | \def\@adminfootnotes{% 646 | \let\@makefnmark\relax \let\@thefnmark\relax 647 | \ifx\@empty\@date\else \@footnotetext{\@setdate}\fi 648 | \ifx\@empty\@subjclass\else \@footnotetext{\@setsubjclass}\fi 649 | \ifx\@empty\@keywords\else \@footnotetext{\@setkeywords}\fi 650 | \ifx\@empty\thankses\else \@footnotetext{% 651 | \def\par{\let\par\@par}\@setthanks}% 652 | \fi 653 | } 654 | \AtBeginDocument{% 655 | \@ifundefined{publname}{% 656 | \let\publname\@empty 657 | \let\@serieslogo\@empty 658 | }{% 659 | \def\@serieslogo{\article@logo}% 660 | }% 661 | } 662 | \AtBeginDocument{% 663 | \@ifundefined{volinfo}{% 664 | \def\volinfo{% 665 | Volume \currentvolume, Number \number0\currentissue 666 | \if\@printyear , \currentmonth\ \currentyear\fi 667 | }% 668 | }{}% 669 | } 670 | \def\@printyear{TF}% boolean false 671 | \def\issueinfo#1#2#3#4{\def\currentvolume{#1}\def\currentissue{#2}% 672 | \def\currentmonth{#3}\def\currentyear{#4}} 673 | \issueinfo{00}% volume number 674 | {0}% % issue number 675 | {Xxxx}% % month 676 | {XXXX}% % year 677 | \newcommand{\copyrightinfo}[2]{% 678 | \def\copyrightyear{#1}% 679 | \@ifnotempty{#2}{\def\copyrightholder{#2}}% 680 | } 681 | \copyrightinfo{0000}{(copyright holder)} 682 | \def\pagespan#1#2{\setcounter{page}{#1}% 683 | \ifnum\c@page<\z@ \pagenumbering{roman}\setcounter{page}{-#1}\fi 684 | \def\start@page{#1}\def\end@page{#2}} 685 | \pagespan{000}{000} 686 | \AtBeginDocument{% 687 | \@ifundefined{pageinfo}{% 688 | \def\pageinfo{% 689 | \ifnum\start@page=\z@ 690 | Pages 000--000 691 | \else 692 | \ifx\start@page\end@page 693 | Page \start@page 694 | \else 695 | Pages \start@page--\end@page 696 | \fi 697 | \fi}% 698 | }{}% 699 | } 700 | \@ifundefined{ISSN}{\def\ISSN{0000-0000}}{} 701 | \newcommand\PII[1]{\def\@PII{#1}} 702 | \PII{S \ISSN(XX)0000-0} 703 | \newinsert\copyins 704 | \skip\copyins=1.5pc 705 | \count\copyins=1000 % magnification factor, 1000 = 100% 706 | \dimen\copyins=.5\textheight % maximum allowed per page 707 | \g@addto@macro\@reinserts{% 708 | \ifvoid\copyins\else\insert\copyins{\unvbox\copyins}\fi 709 | } 710 | \def\@copyinsfontsize{\fontsize{6}{7\p@}\normalfont\upshape} 711 | \newif\if@extracrline \@extracrlinefalse 712 | \let\@extracrline\@empty 713 | \relax 714 | \def\@setcopyright{% 715 | \ifx\@empty\@serieslogo 716 | \else\ifx\@empty\copyrightyear 717 | \else 718 | \insert\copyins{\hsize\textwidth 719 | \parfillskip\z@\relax 720 | \leftskip\z@\@plus.9\textwidth\relax \rightskip\z@\relax 721 | \@copyinsfontsize 722 | \everypar{}% 723 | \vskip-\skip\copyins 724 | \if@extracrline 725 | \vskip-6pt 726 | \fi 727 | \nointerlineskip 728 | \leavevmode\hfill\vrule\@width\z@\@height\skip\copyins 729 | \copyright\copyrightyear\ \copyrightholder\ignorespaces 730 | \if@extracrline \@extracrline \fi 731 | \par 732 | \kern\z@}% 733 | \fi\fi 734 | } 735 | \def\@combinefloats{% 736 | \ifx \@toplist\@empty \else \@cflt \fi 737 | \ifx \@botlist\@empty \else \@cflb \fi 738 | \ifvoid\copyins \else \@cflci \fi 739 | } 740 | \def\@cflci{% 741 | \setbox\@outputbox\vbox{% 742 | \unvbox\@outputbox 743 | \vskip\skip\copyins 744 | \if@twocolumn \else \vskip\z@ plus\p@ \fi 745 | \hbox to\columnwidth{% 746 | \hss\vbox to\z@{\vss 747 | \if@twocolumn 748 | \if@firstcolumn \else \unvbox\copyins \fi 749 | \else 750 | \unvbox\copyins 751 | \fi 752 | }}}% 753 | \if@twocolumn \if@firstcolumn 754 | \insert\copyins{\unvbox\copyins}% 755 | \fi\fi 756 | \global\count\copyins=999 \relax 757 | } 758 | \newif\if@revertcopyright \@revertcopyrightfalse 759 | \newcommand{\revertcopyright}{% 760 | \global\@revertcopyrighttrue 761 | \global\@extracrlinetrue} 762 | \def\@revertcrfontsize{\fontsize{6}{7\p@}\normalfont\upshape} 763 | \def\@extracrline{% 764 | \if@revertcopyright 765 | \unskip\\ 766 | \@revertcrfontsize 767 | Reverts to public domain 28 years from publication 768 | \fi 769 | } 770 | \newcommand{\abstractname}{Abstract} 771 | \newcommand{\keywordsname}{Key words and phrases} 772 | \newcommand{\subjclassname}{% 773 | \textup{1991} Mathematics Subject Classification} 774 | \@xp\let\csname subjclassname@1991\endcsname \subjclassname 775 | \@namedef{subjclassname@2000}{% 776 | \textup{2000} Mathematics Subject Classification} 777 | \@namedef{subjclassname@2010}{% 778 | \textup{2010} Mathematics Subject Classification} 779 | \def\@tempb{amsart} 780 | \ifx\@classname\@tempb 781 | \newcommand{\datename}{\textit{Date}:} 782 | \else 783 | \newcommand{\datename}{Received by the editors} 784 | \fi 785 | \def\@settitle{\begin{center}% 786 | \baselineskip14\p@\relax 787 | \bfseries 788 | \uppercasenonmath\@title 789 | \@title 790 | \end{center}% 791 | } 792 | \def\author@andify{% 793 | \nxandlist {\unskip ,\penalty-1 \space\ignorespaces}% 794 | {\unskip {} \@@and~}% 795 | {\unskip ,\penalty-2 \space \@@and~}% 796 | } 797 | \def\@setauthors{% 798 | \begingroup 799 | \def\thanks{\protect\thanks@warning}% 800 | \trivlist 801 | \centering\footnotesize \@topsep30\p@\relax 802 | \advance\@topsep by -\baselineskip 803 | \item\relax 804 | \author@andify\authors 805 | \def\\{\protect\linebreak}% 806 | \MakeUppercase{\authors}% 807 | \ifx\@empty\contribs 808 | \else 809 | ,\penalty-3 \space \@setcontribs 810 | \@closetoccontribs 811 | \fi 812 | \endtrivlist 813 | \endgroup 814 | } 815 | \def\@closetoccontribs{} 816 | \def\@setcontribs{% 817 | \@xcontribs 818 | \MakeUppercase{\xcontribs}% 819 | } 820 | \def\@setdate{\datename\ \@date\@addpunct.} 821 | \def\@setsubjclass{% 822 | {\itshape\subjclassname.}\enspace\@subjclass\@addpunct.} 823 | \def\@setkeywords{% 824 | {\itshape \keywordsname.}\enspace \@keywords\@addpunct.} 825 | \def\@setthanks{\def\thanks##1{\par##1\@addpunct.}\thankses} 826 | \newbox\abstractbox 827 | \newenvironment{abstract}{% 828 | \ifx\maketitle\relax 829 | \ClassWarning{\@classname}{Abstract should precede 830 | \protect\maketitle\space in AMS document classes; reported}% 831 | \fi 832 | \global\setbox\abstractbox=\vtop \bgroup 833 | \normalfont\Small 834 | \list{}{\labelwidth\z@ 835 | \leftmargin3pc \rightmargin\leftmargin 836 | \listparindent\normalparindent \itemindent\z@ 837 | \parsep\z@ \@plus\p@ 838 | \let\fullwidthdisplay\relax 839 | }% 840 | \item[\hskip\labelsep\scshape\abstractname.]% 841 | }{% 842 | \endlist\egroup 843 | \ifx\@setabstract\relax \@setabstracta \fi 844 | } 845 | \def\@setabstract{\@setabstracta \global\let\@setabstract\relax} 846 | \def\@setabstracta{% 847 | \ifvoid\abstractbox 848 | \else 849 | \skip@20\p@ \advance\skip@-\lastskip 850 | \advance\skip@-\baselineskip \vskip\skip@ 851 | \box\abstractbox 852 | \prevdepth\z@ % because \abstractbox is a vtop 853 | \fi 854 | } 855 | \def\titlepage{% 856 | \clearpage 857 | \thispagestyle{empty}\setcounter{page}{0}} 858 | \def\endtitlepage{\newpage} 859 | \def\labelenumi{(\theenumi)} 860 | \def\theenumi{\@arabic\c@enumi} 861 | \def\labelenumii{(\theenumii)} 862 | \def\theenumii{\@alph\c@enumii} 863 | \def\p@enumii{\theenumi} 864 | \def\labelenumiii{(\theenumiii)} 865 | \def\theenumiii{\@roman\c@enumiii} 866 | \def\p@enumiii{\theenumi(\theenumii)} 867 | \def\labelenumiv{(\theenumiv)} 868 | \def\theenumiv{\@Alph\c@enumiv} 869 | \def\p@enumiv{\p@enumiii\theenumiii} 870 | \def\labelitemi{$\m@th\bullet$} 871 | \def\labelitemii{\bfseries --}% \upshape already done by \itemize 872 | \def\labelitemiii{$\m@th\ast$} 873 | \def\labelitemiv{$\m@th\cdot$} 874 | \newenvironment{verse}{\let\\\@centercr 875 | \list{}{\itemsep\z@ \itemindent -1.5em\listparindent\itemindent 876 | \rightmargin\leftmargin \advance\leftmargin 1.5em}\item[]% 877 | }{% 878 | \endlist 879 | } 880 | \let\endverse=\endlist % for efficiency 881 | \newenvironment{quotation}{\list{}{% 882 | \leftmargin3pc \listparindent\normalparindent 883 | \itemindent\z@ 884 | \rightmargin\leftmargin \parsep\z@ \@plus\p@}% 885 | \item[]% 886 | }{% 887 | \endlist 888 | } 889 | \let\endquotation=\endlist % for efficiency 890 | \newenvironment{quote}{% 891 | \list{}{\rightmargin\leftmargin}\item[]% 892 | }{% 893 | \endlist 894 | } 895 | \let\endquote=\endlist % for efficiency 896 | \def\trivlist{\parsep\parskip\@nmbrlistfalse 897 | \@trivlist \labelwidth\z@ \leftmargin\z@ 898 | \itemindent\z@ 899 | \let\@itemlabel\@empty 900 | \def\makelabel##1{\upshape##1}} 901 | \renewenvironment{enumerate}{% 902 | \ifnum \@enumdepth >3 \@toodeep\else 903 | \advance\@enumdepth \@ne 904 | \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list 905 | {\csname label\@enumctr\endcsname}{\usecounter 906 | {\@enumctr}\def\makelabel##1{\hss\llap{\upshape##1}}}\fi 907 | }{% 908 | \endlist 909 | } 910 | \let\endenumerate=\endlist % for efficiency 911 | \renewenvironment{itemize}{% 912 | \ifnum\@itemdepth>3 \@toodeep 913 | \else \advance\@itemdepth\@ne 914 | \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% 915 | \list{\csname\@itemitem\endcsname}% 916 | {\def\makelabel##1{\hss\llap{\upshape##1}}}% 917 | \fi 918 | }{% 919 | \endlist 920 | } 921 | \let\enditemize=\endlist % for efficiency 922 | \newcommand{\descriptionlabel}[1]{\hspace\labelsep \upshape\bfseries #1:} 923 | \newenvironment{description}{\list{}{% 924 | \advance\leftmargini6\p@ \itemindent-12\p@ 925 | \labelwidth\z@ \let\makelabel\descriptionlabel}% 926 | }{ 927 | \endlist 928 | } 929 | \let\enddescription=\endlist % for efficiency 930 | \let\upn=\textup 931 | \AtBeginDocument{% 932 | \labelsep=5pt\relax 933 | \setcounter{enumi}{13}\setcounter{enumii}{13}% 934 | \setcounter{enumiii}{13}\setcounter{enumiv}{13}% 935 | \settowidth\leftmargini{\labelenumi\hskip\labelsep}% 936 | \advance\leftmargini by \normalparindent 937 | \settowidth\leftmarginii{\labelenumii\hskip\labelsep}% 938 | \settowidth\leftmarginiii{\labelenumiii\hskip\labelsep}% 939 | \settowidth\leftmarginiv{\labelenumiv\hskip\labelsep}% 940 | \setcounter{enumi}{0}\setcounter{enumii}{0}% 941 | \setcounter{enumiii}{0}\setcounter{enumiv}{0}% 942 | \leftmarginv=10pt \leftmarginvi=\leftmarginv 943 | \leftmargin=\leftmargini 944 | \labelwidth=\leftmargini \advance\labelwidth-\labelsep 945 | \@listi} 946 | \newskip\listisep 947 | \listisep\smallskipamount 948 | \def\@listI{\leftmargin\leftmargini \parsep\z@skip 949 | \topsep\listisep \itemsep\z@skip 950 | \listparindent\normalparindent} 951 | \let\@listi\@listI 952 | \def\@listii{\leftmargin\leftmarginii 953 | \labelwidth\leftmarginii \advance\labelwidth-\labelsep 954 | \topsep\z@skip \parsep\z@skip \partopsep\z@skip \itemsep\z@skip} 955 | \def\@listiii{\leftmargin\leftmarginiii 956 | \labelwidth\leftmarginiii \advance\labelwidth-\labelsep} 957 | \def\@listiv{\leftmargin\leftmarginiv 958 | \labelwidth\leftmarginiv \advance\labelwidth-\labelsep} 959 | \def\@listv{\leftmargin\leftmarginv 960 | \labelwidth\leftmarginv \advance\labelwidth-\labelsep} 961 | \def\@listvi{\leftmargin\leftmarginvi 962 | \labelwidth\leftmarginvi \advance\labelwidth-\labelsep} 963 | \@ifclasswith{\@classname}{fleqn}{% 964 | \let\@tempa\@iden 965 | \AtBeginDocument{\mathindent\leftmargini}% 966 | }{\let\@tempa\@gobble}% 967 | \@ifpackageloaded{amsmath}{\let\@tempa\@gobble}{% 968 | \@ifpackageloaded{amstex}{\let\@tempa\@gobble}{}% 969 | } 970 | \@tempa{% 971 | \def\[{\relax 972 | \ifmmode\@badmath 973 | \else 974 | \begin{trivlist}% 975 | \@beginparpenalty\predisplaypenalty 976 | \@endparpenalty\postdisplaypenalty 977 | \item[]\leavevmode 978 | \hbox to\linewidth\bgroup$\displaystyle 979 | \hskip\mathindent\bgroup 980 | \fi}% 981 | \def\]{\relax 982 | \ifmmode 983 | \egroup \m@th$\hfil \egroup 984 | \end{trivlist}% 985 | \else \@badmath 986 | \fi}% 987 | \renewenvironment{equation}{% 988 | \@beginparpenalty\predisplaypenalty 989 | \@endparpenalty\postdisplaypenalty 990 | \refstepcounter{equation}% 991 | \@topsep\abovedisplayskip \trivlist 992 | \item[]\leavevmode 993 | \hbox to\linewidth\bgroup\hskip\mathindent$\displaystyle 994 | }{% 995 | \m@th$\hfil \displaywidth\linewidth \hbox{\@eqnnum}\egroup 996 | \endtrivlist 997 | }% 998 | \renewenvironment{eqnarray}{% 999 | \stepcounter{equation}\let\@currentlabel\theequation 1000 | \global\@eqnswtrue \global\@eqcnt\z@ \tabskip\mathindent 1001 | \let\\=\@eqncr \abovedisplayskip\topsep 1002 | \ifvmode \advance\abovedisplayskip\partopsep \fi 1003 | \belowdisplayskip\abovedisplayskip 1004 | \belowdisplayshortskip\abovedisplayskip 1005 | \abovedisplayshortskip\abovedisplayskip 1006 | $$\everycr{}\halign to\linewidth\bgroup 1007 | \hskip\@centering 1008 | $\displaystyle\tabskip\z@skip####\m@th$&% 1009 | \@eqnsel \global\@eqcnt\@ne 1010 | \hfil${}####{}\m@th$\hfil&% 1011 | \global\@eqcnt\tw@ 1012 | $\displaystyle ####\m@th$\hfil\tabskip\@centering&% 1013 | \global\@eqcnt\thr@@ 1014 | \hbox to \z@\bgroup\hss####\egroup\tabskip\z@skip\cr 1015 | }{% 1016 | \@@eqncr \egroup \global\advance\c@equation\m@ne$$% 1017 | \global\@ignoretrue 1018 | }% 1019 | \newdimen\mathindent 1020 | \mathindent\leftmargini 1021 | } 1022 | \def\@startsection#1#2#3#4#5#6{% 1023 | \if@noskipsec \leavevmode \fi 1024 | \par \@tempskipa #4\relax 1025 | \@afterindenttrue 1026 | \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse\fi 1027 | \if@nobreak \everypar{}\else 1028 | \addpenalty\@secpenalty\addvspace\@tempskipa\fi 1029 | \@ifstar{\@dblarg{\@sect{#1}{\@m}{#3}{#4}{#5}{#6}}}% 1030 | {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}% 1031 | } 1032 | \def\@seccntformat#1{% 1033 | \protect\textup{\protect\@secnumfont 1034 | \csname the#1\endcsname 1035 | \protect\@secnumpunct 1036 | }% 1037 | } 1038 | \def\@secnumfont{\mdseries} 1039 | \def\@sect#1#2#3#4#5#6[#7]#8{% 1040 | \edef\@toclevel{\ifnum#2=\@m 0\else\number#2\fi}% 1041 | \ifnum #2>\c@secnumdepth \let\@secnumber\@empty 1042 | \else \@xp\let\@xp\@secnumber\csname the#1\endcsname\fi 1043 | \@tempskipa #5\relax 1044 | \ifnum #2>\c@secnumdepth 1045 | \let\@svsec\@empty 1046 | \else 1047 | \refstepcounter{#1}% 1048 | \edef\@secnumpunct{% 1049 | \ifdim\@tempskipa>\z@ % not a run-in section heading 1050 | \@ifnotempty{#8}{.\@nx\enspace}% 1051 | \else 1052 | \@ifempty{#8}{.}{.\@nx\enspace}% 1053 | \fi 1054 | }% 1055 | \@ifempty{#8}{% 1056 | \ifnum #2=\tw@ \def\@secnumfont{\bfseries}\fi}{}% 1057 | \protected@edef\@svsec{% 1058 | \ifnum#2<\@m 1059 | \@ifundefined{#1name}{}{% 1060 | \ignorespaces\csname #1name\endcsname\space 1061 | }% 1062 | \fi 1063 | \@seccntformat{#1}% 1064 | }% 1065 | \fi 1066 | \ifdim \@tempskipa>\z@ % then this is not a run-in section heading 1067 | \begingroup #6\relax 1068 | \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty\@M #8\par}% 1069 | \endgroup 1070 | \ifnum#2>\@m \else \@tocwrite{#1}{#8}\fi 1071 | \else 1072 | \def\@svsechd{#6\hskip #3\@svsec 1073 | \@ifnotempty{#8}{\ignorespaces#8\unskip 1074 | \@addpunct.}% 1075 | \ifnum#2>\@m \else \@tocwrite{#1}{#8}\fi 1076 | }% 1077 | \fi 1078 | \global\@nobreaktrue 1079 | \@xsect{#5}} 1080 | \let\@ssect\relax 1081 | \newcounter{part} 1082 | \newcounter{section} 1083 | \newcounter{subsection}[section] 1084 | \newcounter{subsubsection}[subsection] 1085 | \newcounter{paragraph}[subsubsection] 1086 | \newcounter{subparagraph}[paragraph] 1087 | \renewcommand\thepart {\arabic{part}} 1088 | \renewcommand\thesection {\arabic{section}} 1089 | \renewcommand\thesubsection {\thesection.\arabic{subsection}} 1090 | \renewcommand\thesubsubsection {\thesubsection .\arabic{subsubsection}} 1091 | \renewcommand\theparagraph {\thesubsubsection.\arabic{paragraph}} 1092 | \renewcommand\thesubparagraph {\theparagraph.\arabic{subparagraph}} 1093 | \setcounter{secnumdepth}{3} 1094 | \def\partname{Part} 1095 | \def\part{\@startsection{part}{0}% 1096 | \z@{\linespacing\@plus\linespacing}{.5\linespacing}% 1097 | {\normalfont\bfseries\raggedright}} 1098 | \def\specialsection{\@startsection{section}{1}% 1099 | \z@{\linespacing\@plus\linespacing}{.5\linespacing}% 1100 | {\normalfont\centering}} 1101 | \def\section{\@startsection{section}{1}% 1102 | \z@{.7\linespacing\@plus\linespacing}{.5\linespacing}% 1103 | {\normalfont\scshape\centering}} 1104 | \def\subsection{\@startsection{subsection}{2}% 1105 | \z@{.5\linespacing\@plus.7\linespacing}{-.5em}% 1106 | {\normalfont\bfseries}} 1107 | \def\subsubsection{\@startsection{subsubsection}{3}% 1108 | \z@{.5\linespacing\@plus.7\linespacing}{-.5em}% 1109 | {\normalfont\itshape}} 1110 | \def\paragraph{\@startsection{paragraph}{4}% 1111 | \z@\z@{-\fontdimen2\font}% 1112 | \normalfont} 1113 | \def\subparagraph{\@startsection{subparagraph}{5}% 1114 | \z@\z@{-\fontdimen2\font}% 1115 | \normalfont} 1116 | \def\appendix{\par\c@section\z@ \c@subsection\z@ 1117 | \let\sectionname\appendixname 1118 | \def\thesection{\@Alph\c@section}} 1119 | \def\appendixname{Appendix} 1120 | \def\@Roman#1{\@xp\@slowromancap 1121 | \romannumeral#1@}% 1122 | \def\@slowromancap#1{\ifx @#1% then terminate 1123 | \else 1124 | \if i#1I\else\if v#1V\else\if x#1X\else\if l#1L\else\if 1125 | c#1C\else\if m#1M\else#1\fi\fi\fi\fi\fi\fi 1126 | \@xp\@slowromancap 1127 | \fi 1128 | } 1129 | \newcommand{\@pnumwidth}{1.6em} 1130 | \newcommand{\@tocrmarg}{2.6em} 1131 | \setcounter{tocdepth}{2} 1132 | \newswitch{toc} 1133 | \newswitch{lof} 1134 | \newswitch{lot} 1135 | \newcommand\contentsnamefont{\scshape} 1136 | \def\@starttoc#1#2{\begingroup 1137 | \setTrue{#1}% 1138 | \par\removelastskip\vskip\z@skip 1139 | \@startsection{}\@M\z@{\linespacing\@plus\linespacing}% 1140 | {.5\linespacing}{\centering\contentsnamefont}{#2}% 1141 | \ifx\contentsname#2% 1142 | \else \addcontentsline{toc}{section}{#2}\fi 1143 | \makeatletter 1144 | \@input{\jobname.#1}% 1145 | \if@filesw 1146 | \@xp\newwrite\csname tf@#1\endcsname 1147 | \immediate\@xp\openout\csname tf@#1\endcsname \jobname.#1\relax 1148 | \fi 1149 | \global\@nobreakfalse \endgroup 1150 | \addvspace{32\p@\@plus14\p@}% 1151 | \let\tableofcontents\relax 1152 | } 1153 | \def\contentsname{Contents} 1154 | \def\listfigurename{List of Figures} 1155 | \def\listtablename{List of Tables} 1156 | \def\tableofcontents{% 1157 | \@starttoc{toc}\contentsname 1158 | } 1159 | \def\listoffigures{\@starttoc{lof}\listfigurename} 1160 | \def\listoftables{\@starttoc{lot}\listtablename} 1161 | \AtBeginDocument{% 1162 | \@for\@tempa:=-1,0,1,2,3\do{% 1163 | \@ifundefined{r@tocindent\@tempa}{% 1164 | \@xp\gdef\csname r@tocindent\@tempa\endcsname{0pt}}{}% 1165 | }% 1166 | } 1167 | \def\@writetocindents{% 1168 | \begingroup 1169 | \@for\@tempa:=-1,0,1,2,3\do{% 1170 | \immediate\write\@auxout{% 1171 | \string\newlabel{tocindent\@tempa}{% 1172 | \csname r@tocindent\@tempa\endcsname}}% 1173 | }% 1174 | \endgroup} 1175 | \AtEndDocument{\@writetocindents} 1176 | 1177 | \let\indentlabel\@empty 1178 | \def\@tochangmeasure#1{\sbox\z@{#1}% 1179 | \ifdim\wd\z@>\csname r@tocindent\@toclevel\endcsname\relax 1180 | \@xp\xdef\csname r@tocindent\@toclevel\endcsname{\the\wd\z@}% 1181 | \fi 1182 | } 1183 | \def\@toclevel{0} 1184 | \def\@tocline#1#2#3#4#5#6#7{\relax 1185 | \ifnum #1>\c@tocdepth % then omit 1186 | \else 1187 | \par \addpenalty\@secpenalty\addvspace{#2}% 1188 | \begingroup \hyphenpenalty\@M 1189 | \@ifempty{#4}{% 1190 | \@tempdima\csname r@tocindent\number#1\endcsname\relax 1191 | }{% 1192 | \@tempdima#4\relax 1193 | }% 1194 | \parindent\z@ \leftskip#3\relax \advance\leftskip\@tempdima\relax 1195 | \rightskip\@pnumwidth plus4em \parfillskip-\@pnumwidth 1196 | #5\leavevmode\hskip-\@tempdima #6\nobreak\relax 1197 | \hfil\hbox to\@pnumwidth{\@tocpagenum{#7}}\par 1198 | \nobreak 1199 | \endgroup 1200 | \fi} 1201 | \def\@tocpagenum#1{\hss{\mdseries #1}} 1202 | \def\@tocwrite#1{\@xp\@tocwriteb\csname toc#1\endcsname{#1}} 1203 | \def\@tocwriteb#1#2#3{% 1204 | \begingroup 1205 | \def\@tocline##1##2##3##4##5##6{% 1206 | \ifnum##1>\c@tocdepth 1207 | \else \sbox\z@{##5\let\indentlabel\@tochangmeasure##6}\fi}% 1208 | \csname l@#2\endcsname{#1{\csname#2name\endcsname}{\@secnumber}{}}% 1209 | \endgroup 1210 | \addcontentsline{toc}{#2}% 1211 | {\protect#1{\csname#2name\endcsname}{\@secnumber}{#3}}} 1212 | \def\l@section{\@tocline{1}{0pt}{1pc}{}{}} 1213 | \newcommand{\tocsection}[3]{% 1214 | \indentlabel{\@ifnotempty{#2}{\ignorespaces#1 #2.\quad}}#3} 1215 | \def\l@subsection{\@tocline{2}{0pt}{1pc}{5pc}{}} 1216 | \let\tocsubsection\tocsection 1217 | \def\l@subsubsection{\@tocline{3}{0pt}{1pc}{7pc}{}} 1218 | \let\tocsubsubsection\tocsection 1219 | \let\l@paragraph\l@subsubsection 1220 | \let\tocparagraph\tocsection 1221 | \let\l@subparagraph\l@subsubsection 1222 | \let\tocsubparagraph\tocsection 1223 | \def\l@part{\@tocline{-1}{12pt plus2pt}{0pt}{}{\bfseries}} 1224 | \let\tocpart\tocsection 1225 | \def\l@chapter{\@tocline{0}{8pt plus1pt}{0pt}{}{}} 1226 | \let\tocchapter\tocsection 1227 | \newcommand{\tocappendix}[3]{% 1228 | \indentlabel{#1\@ifnotempty{#2}{ #2}.\quad}#3} 1229 | \def\l@figure{\@tocline{0}{3pt plus2pt}{0pt}{1.5pc}{}} 1230 | \let\l@table=\l@figure 1231 | \def\refname{References} 1232 | \def\bibname{Bibliography} 1233 | \def\@defaultbiblabelstyle#1{#1.} 1234 | \def\bibliographystyle#1{% 1235 | \if@filesw\immediate\write\@auxout{\string\bibstyle{#1}}\fi 1236 | \def\@tempa{#1}% 1237 | \def\@tempb{amsplain}% 1238 | \def\@tempc{}% 1239 | \ifx\@tempa\@tempb 1240 | \def\@biblabel##1{\@defaultbiblabelstyle{##1}}% 1241 | \def\bibsetup{}% 1242 | \else 1243 | \def\bibsetup{\labelsep6\p@}% 1244 | \ifx\@tempa\@tempc 1245 | \def\@biblabel##1{}% 1246 | \def\bibsetup{\labelwidth\z@ \leftmargin24\p@ 1247 | \itemindent-\leftmargin 1248 | \labelsep\z@ }% 1249 | \fi 1250 | \fi} 1251 | \newcommand{\bibliofont}{\footnotesize} 1252 | \newcommand{\@bibtitlestyle}{% 1253 | \@xp\section\@xp*\@xp{\refname}% 1254 | } 1255 | \newenvironment{thebibliography}[1]{% 1256 | \@bibtitlestyle 1257 | \normalfont\bibliofont\labelsep .5em\relax 1258 | \renewcommand\theenumiv{\arabic{enumiv}}\let\p@enumiv\@empty 1259 | \list{\@biblabel{\theenumiv}}{\settowidth\labelwidth{\@biblabel{#1}}% 1260 | \leftmargin\labelwidth \advance\leftmargin\labelsep 1261 | \usecounter{enumiv}}% 1262 | \sloppy \clubpenalty\@M \widowpenalty\clubpenalty 1263 | \sfcode`\.=\@m 1264 | }{% 1265 | \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}% 1266 | \endlist 1267 | } 1268 | \def\bysame{\leavevmode\hbox to3em{\hrulefill}\thinspace} 1269 | \def\newblock{} 1270 | \newcommand\MR[1]{\relax\ifhmode\unskip\spacefactor3000 \space\fi 1271 | MR~\MRhref{#1}{#1}} 1272 | \let\MRhref\@gobble 1273 | \newcommand\URL{\begingroup 1274 | \def\@sverb##1{% 1275 | \def\@tempa####1##1{\@URL{####1}\egroup\endgroup}% 1276 | \@tempa}% 1277 | \verb} 1278 | \let\URLhref\@gobble 1279 | \def\@URL#1{\URLhref{#1}#1} 1280 | \newif\if@restonecol 1281 | \newcommand{\@indextitlestyle}{% 1282 | \twocolumn[\@xp\section\@xp*\@xp{\indexname}]% 1283 | } 1284 | \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi 1285 | \columnseprule\z@ \columnsep 35\p@ 1286 | \@indextitlestyle 1287 | \thispagestyle{plain}% 1288 | \let\item\@idxitem 1289 | \parindent\z@ \parskip\z@\@plus.3\p@\relax 1290 | \raggedright 1291 | \hyphenpenalty\@M 1292 | \footnotesize} 1293 | \def\indexname{Index} 1294 | \def\@idxitem{\par\hangindent 2em} 1295 | \def\subitem{\par\hangindent 2em\hspace*{1em}} 1296 | \def\subsubitem{\par\hangindent 3em\hspace*{2em}} 1297 | \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi} 1298 | \def\indexspace{\par\bigskip} 1299 | \def\footnoterule{\kern-.4\p@ 1300 | \hrule\@width 5pc\kern11\p@\kern-\footnotesep} 1301 | \def\@makefnmark{% 1302 | \leavevmode 1303 | \raise.9ex\hbox{\fontsize\sf@size\z@\normalfont\@thefnmark}% 1304 | } 1305 | \def\@makefntext{\indent\@makefnmark} 1306 | \long\def\@footnotetext#1{% 1307 | \insert\footins{% 1308 | \normalfont\footnotesize 1309 | \interlinepenalty\interfootnotelinepenalty 1310 | \splittopskip\footnotesep \splitmaxdepth \dp\strutbox 1311 | \floatingpenalty\@MM \hsize\columnwidth 1312 | \@parboxrestore \parindent\normalparindent \sloppy 1313 | \protected@edef\@currentlabel{% 1314 | \csname p@footnote\endcsname\@thefnmark}% 1315 | \@makefntext{% 1316 | \rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}} 1317 | \hfuzz=1pt \vfuzz=\hfuzz 1318 | \def\sloppy{\tolerance9999 \emergencystretch 3em\relax} 1319 | \setcounter{topnumber}{4} 1320 | \setcounter{bottomnumber}{4} 1321 | \setcounter{totalnumber}{4} 1322 | \setcounter{dbltopnumber}{4} 1323 | \renewcommand{\topfraction}{.97} 1324 | \renewcommand{\bottomfraction}{.97} 1325 | \renewcommand{\textfraction}{.03} 1326 | \renewcommand{\floatpagefraction}{.9} 1327 | \renewcommand{\dbltopfraction}{.97} 1328 | \renewcommand{\dblfloatpagefraction}{.9} 1329 | \setlength{\floatsep}{12pt plus 6pt minus 4pt} 1330 | \setlength{\textfloatsep}{15pt plus 8pt minus 5pt} 1331 | \setlength{\intextsep}{12pt plus 6pt minus 4pt} 1332 | \setlength{\dblfloatsep}{12pt plus 6pt minus 4pt} 1333 | \setlength{\dbltextfloatsep}{15pt plus 8pt minus 5pt} 1334 | \setlength{\@fptop}{0pt}% removed "plus 1fil" 1335 | \setlength{\@fpsep}{8pt}% removed "plus 2fil" 1336 | \setlength{\@fpbot}{0pt plus 1fil} 1337 | \setlength{\@dblfptop}{0pt}% removed "plus 1fil" 1338 | \setlength{\@dblfpsep}{8pt}% removed "plus 2fil" 1339 | \setlength{\@dblfpbot}{0pt plus 1fil} 1340 | \newcommand{\fps@figure}{tbp} 1341 | \newcommand{\fps@table}{tbp} 1342 | \newcounter{figure} 1343 | \def\@captionheadfont{\scshape} 1344 | \def\@captionfont{\normalfont} 1345 | \def\ftype@figure{1} 1346 | \def\ext@figure{lof} 1347 | \def\fnum@figure{\figurename\ \thefigure} 1348 | \def\figurename{Figure} 1349 | \newenvironment{figure}{% 1350 | \@float{figure}% 1351 | }{% 1352 | \end@float 1353 | } 1354 | \newenvironment{figure*}{% 1355 | \@dblfloat{figure}% 1356 | }{% 1357 | \end@dblfloat 1358 | } 1359 | \newcounter{table} 1360 | \def\ftype@table{2} 1361 | \def\ext@table{lot} 1362 | \def\fnum@table{\tablename\ \thetable} 1363 | \def\tablename{Table} 1364 | \newenvironment{table}{% 1365 | \@float{table}% 1366 | }{% 1367 | \end@float 1368 | } 1369 | \newenvironment{table*}{% 1370 | \@dblfloat{table}% 1371 | }{% 1372 | \end@dblfloat 1373 | } 1374 | \def\@floatboxreset{\global\@minipagefalse \centering} 1375 | \long\def\@makecaption#1#2{% 1376 | \setbox\@tempboxa\vbox{\color@setgroup 1377 | \advance\hsize-2\captionindent\noindent 1378 | \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp 1379 | {\@cdr#2\@nil}{.\@captionfont\upshape\enspace#2}% 1380 | \unskip\kern-2\captionindent\par 1381 | \global\setbox\@ne\lastbox\color@endgroup}% 1382 | \ifhbox\@ne % the normal case 1383 | \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}% 1384 | \fi 1385 | \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line 1386 | \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}% 1387 | \else % tempboxa contained more than one line 1388 | \setbox\@ne\vbox{\unvbox\@tempboxa\parskip\z@skip 1389 | \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}% 1390 | \fi 1391 | \ifnum\@tempcnta<64 % if the float IS a figure... 1392 | \addvspace\abovecaptionskip 1393 | \hbox to\hsize{\kern\captionindent\box\@ne\hss}% 1394 | \else % if the float IS NOT a figure... 1395 | \hbox to\hsize{\kern\captionindent\box\@ne\hss}% 1396 | \nobreak 1397 | \vskip\belowcaptionskip 1398 | \fi 1399 | \relax 1400 | } 1401 | \newskip\abovecaptionskip \abovecaptionskip=12pt \relax 1402 | \newskip\belowcaptionskip \belowcaptionskip=12pt \relax 1403 | \newdimen\captionindent \captionindent=3pc 1404 | \def\nonbreakingspace{\unskip\nobreak\ \ignorespaces} 1405 | \def~{\protect\nonbreakingspace} 1406 | \def\@biblabel#1{\@ifnotempty{#1}{[#1]}} 1407 | \def\@citestyle{\m@th\upshape\mdseries} 1408 | \let\citeform\@firstofone 1409 | \def\@cite#1#2{{% 1410 | \@citestyle[\citeform{#1}\if@tempswa, #2\fi]}} 1411 | \@ifundefined{cite }{% 1412 | \expandafter\let\csname cite \endcsname\cite 1413 | \edef\cite{\@nx\protect\@xp\@nx\csname cite \endcsname}% 1414 | }{} 1415 | \def\fullwidthdisplay{\displayindent\z@ \displaywidth\columnwidth} 1416 | \edef\@tempa{\noexpand\fullwidthdisplay\the\everydisplay} 1417 | \everydisplay\expandafter{\@tempa} 1418 | \newcommand*\seeonlyname{see} 1419 | \newcommand*\seename{see also} 1420 | \newcommand*\alsoname{see also} 1421 | \newcommand*\seeonly[2]{\emph{\seeonlyname} #1} 1422 | \newcommand*\see[2]{\emph{\seename} #1} 1423 | \newcommand*\seealso[2]{\emph{\alsoname} #1} 1424 | \newcommand\printindex{\@input{\jobname.ind}} 1425 | \DeclareRobustCommand\textprime{\leavevmode 1426 | \raise.8ex\hbox{\check@mathfonts\the\scriptfont2 \char48 }} 1427 | 1428 | \newcommand{\theoremstyle}[1]{% 1429 | \@ifundefined{th@#1}{% 1430 | \PackageWarning{amsthm}{Unknown theoremstyle `#1'}% 1431 | \thm@style{plain}% 1432 | }{% 1433 | \thm@style{#1}% 1434 | }% 1435 | } 1436 | \newtoks\thm@style 1437 | \thm@style{plain} 1438 | \newtoks\thm@bodyfont \thm@bodyfont{\itshape} 1439 | \newtoks\thm@headfont \thm@headfont{\bfseries} 1440 | \newtoks\thm@notefont \thm@notefont{} 1441 | \newtoks\thm@headpunct \thm@headpunct{.} 1442 | \newskip\thm@preskip \newskip\thm@postskip 1443 | \def\thm@space@setup{% 1444 | \thm@preskip=.5\baselineskip\@plus.2\baselineskip 1445 | \@minus.2\baselineskip 1446 | \thm@postskip=\thm@preskip 1447 | } 1448 | \renewcommand{\newtheorem}{\@ifstar{\@xnthm *}{\@xnthm \relax}} 1449 | \def\@xnthm#1#2{% 1450 | \let\@tempa\relax 1451 | \@xp\@ifdefinable\csname #2\endcsname{% 1452 | \global\@xp\let\csname end#2\endcsname\@endtheorem 1453 | \ifx *#1% unnumbered, need to get one more mandatory arg 1454 | \edef\@tempa##1{% 1455 | \gdef\@xp\@nx\csname#2\endcsname{% 1456 | \@nx\@thm{\@xp\@nx\csname th@\the\thm@style\endcsname}% 1457 | {}{##1}}}% 1458 | \else % numbered theorem, need to check for optional arg 1459 | \def\@tempa{\@oparg{\@ynthm{#2}}[]}% 1460 | \fi 1461 | }% 1462 | \@tempa 1463 | } 1464 | \def\@ynthm#1[#2]#3{% 1465 | \ifx\relax#2\relax 1466 | \def\@tempa{\@oparg{\@xthm{#1}{#3}}[]}% 1467 | \else 1468 | \@ifundefined{c@#2}{% 1469 | \def\@tempa{\@nocounterr{#2}}% 1470 | }{% 1471 | \@xp\xdef\csname the#1\endcsname{\@xp\@nx\csname the#2\endcsname}% 1472 | \toks@{#3}% 1473 | \@xp\xdef\csname#1\endcsname{% 1474 | \@nx\@thm{% 1475 | \let\@nx\thm@swap 1476 | \if S\thm@swap\@nx\@firstoftwo\else\@nx\@gobble\fi 1477 | \@xp\@nx\csname th@\the\thm@style\endcsname}% 1478 | {#2}{\the\toks@}}% 1479 | \let\@tempa\relax 1480 | }% 1481 | \fi 1482 | \@tempa 1483 | } 1484 | \def\@xthm#1#2[#3]{% 1485 | \ifx\relax#3\relax 1486 | \newcounter{#1}% 1487 | \else 1488 | \newcounter{#1}[#3]% 1489 | \@xp\xdef\csname the#1\endcsname{\@xp\@nx\csname the#3\endcsname 1490 | \@thmcountersep\@thmcounter{#1}}% 1491 | \fi 1492 | \toks@{#2}% 1493 | \@xp\xdef\csname#1\endcsname{% 1494 | \@nx\@thm{% 1495 | \let\@nx\thm@swap 1496 | \if S\thm@swap\@nx\@firstoftwo\else\@nx\@gobble\fi 1497 | \@xp\@nx\csname th@\the\thm@style\endcsname}% 1498 | {#1}{\the\toks@}}% 1499 | } 1500 | \def\@thm#1#2#3{% 1501 | \ifhmode\unskip\unskip\par\fi 1502 | \normalfont 1503 | \trivlist 1504 | \let\thmheadnl\relax 1505 | \let\thm@swap\@gobble 1506 | \let\thm@indent\noindent % no indent 1507 | \thm@headfont{\bfseries}% heading font bold 1508 | \thm@notefont{\fontseries\mddefault\upshape}% 1509 | \thm@headpunct{.}% add period after heading 1510 | \thm@headsep 5\p@ plus\p@ minus\p@\relax 1511 | \thm@space@setup 1512 | #1% style overrides 1513 | \@topsep \thm@preskip % used by thm head 1514 | \@topsepadd \thm@postskip % used by \@endparenv 1515 | \def\@tempa{#2}\ifx\@empty\@tempa 1516 | \def\@tempa{\@oparg{\@begintheorem{#3}{}}[]}% 1517 | \else 1518 | \refstepcounter{#2}% 1519 | \def\@tempa{\@oparg{\@begintheorem{#3}{\csname the#2\endcsname}}[]}% 1520 | \fi 1521 | \@tempa 1522 | } 1523 | \def\@restorelabelsep{\relax} 1524 | \let\@ythm\relax 1525 | \let\thmname\@iden \let\thmnote\@iden \let\thmnumber\@iden 1526 | \providecommand\@upn{\textup} 1527 | \def\thmhead@plain#1#2#3{% 1528 | \thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}% 1529 | \thmnote{ {\the\thm@notefont(#3)}}} 1530 | \let\thmhead\thmhead@plain 1531 | \def\swappedhead#1#2#3{% 1532 | \thmnumber{\@upn{\@secnumfont#2\@ifnotempty{#1}{.~}}}% 1533 | \thmname{#1}% 1534 | \thmnote{ {\the\thm@notefont(#3)}}} 1535 | \let\swappedhead@plain=\swappedhead 1536 | \let\thmheadnl\relax 1537 | \let\thm@indent\noindent 1538 | \let\thm@swap\@gobble 1539 | \def\@begintheorem#1#2[#3]{% 1540 | \deferred@thm@head{\the\thm@headfont \thm@indent 1541 | \@ifempty{#1}{\let\thmname\@gobble}{\let\thmname\@iden}% 1542 | \@ifempty{#2}{\let\thmnumber\@gobble}{\let\thmnumber\@iden}% 1543 | \@ifempty{#3}{\let\thmnote\@gobble}{\let\thmnote\@iden}% 1544 | \thm@swap\swappedhead\thmhead{#1}{#2}{#3}% 1545 | \the\thm@headpunct 1546 | \thmheadnl % possibly a newline. 1547 | \hskip\thm@headsep 1548 | }% 1549 | \ignorespaces} 1550 | \newskip\thm@headsep 1551 | \thm@headsep=5pt plus1pt minus1pt\relax 1552 | \let\adjust@parskip@nobreak=\@nbitem 1553 | \newtoks\dth@everypar 1554 | \dth@everypar={% 1555 | \@minipagefalse \global\@newlistfalse 1556 | \@noparitemfalse 1557 | \if@inlabel 1558 | \global\@inlabelfalse 1559 | \begingroup \setbox\z@\lastbox 1560 | \ifvoid\z@ \kern-\itemindent \fi 1561 | \endgroup 1562 | \unhbox\@labels 1563 | \fi 1564 | \if@nobreak \@nobreakfalse \clubpenalty\@M 1565 | \else \clubpenalty\@clubpenalty \everypar{}% 1566 | \fi 1567 | }% 1568 | \def\deferred@thm@head#1{% 1569 | \if@inlabel \indent \par \fi % eject a section head if one is pending 1570 | \if@nobreak 1571 | \adjust@parskip@nobreak 1572 | \else 1573 | \addpenalty\@beginparpenalty 1574 | \addvspace\@topsep 1575 | \addvspace{-\parskip}% 1576 | \fi 1577 | \global\@inlabeltrue 1578 | \everypar\dth@everypar 1579 | \sbox\@labels{\normalfont#1}% 1580 | \ignorespaces 1581 | } 1582 | \def\nonslanted{\relax 1583 | \@xp\let\@xp\@tempa\csname\f@shape shape\endcsname 1584 | \ifx\@tempa\itshape\upshape 1585 | \else\ifx\@tempa\slshape\upshape\fi\fi} 1586 | \def\swapnumbers{\edef\thm@swap{\if S\thm@swap N\else S\fi}} 1587 | \def\thm@swap{N}% 1588 | \let\@opargbegintheorem\relax 1589 | \def\th@plain{% 1590 | %% \let\thm@indent\noindent % no indent 1591 | %% \thm@headfont{\bfseries}% heading font is bold 1592 | %% \thm@notefont{}% same as heading font 1593 | %% \thm@headpunct{.}% add period after heading 1594 | %% \let\thm@swap\@gobble 1595 | %% \thm@preskip\topsep 1596 | %% \thm@postskip\theorempreskipamount 1597 | \itshape % body font 1598 | } 1599 | \def\th@definition{% 1600 | \normalfont % body font 1601 | } 1602 | \def\th@remark{% 1603 | \thm@headfont{\itshape}% 1604 | \normalfont % body font 1605 | } 1606 | \def\@endtheorem{\endtrivlist\@endpefalse } 1607 | \newcommand{\newtheoremstyle}[9]{% 1608 | \@ifempty{#5}{\dimen@\z@skip}{\dimen@#5\relax}% 1609 | \ifdim\dimen@=\z@ 1610 | \toks@{#4\let\thm@indent\noindent}% 1611 | \else 1612 | \toks@{#4\def\thm@indent{\noindent\hbox to#5{}}}% 1613 | \fi 1614 | \def\@tempa{#8}\ifx\space\@tempa 1615 | \toks@\@xp{\the\toks@ \thm@headsep\fontdimen\tw@\font\relax}% 1616 | \else 1617 | \def\@tempb{\newline}% 1618 | \ifx\@tempb\@tempa 1619 | \toks@\@xp{\the\toks@ \thm@headsep\z@skip 1620 | \def\thmheadnl{\newline}}% 1621 | \else 1622 | \toks@\@xp{\the\toks@ \thm@headsep#8\relax}% 1623 | \fi 1624 | \fi 1625 | \begingroup 1626 | \thm@space@setup 1627 | \@defaultunits\@tempskipa#2\thm@preskip\relax\@nnil 1628 | \@defaultunits\@tempskipb#3\thm@postskip\relax\@nnil 1629 | \xdef\@gtempa{\thm@preskip\the\@tempskipa 1630 | \thm@postskip\the\@tempskipb\relax}% 1631 | \endgroup 1632 | \@temptokena\@xp{\@gtempa 1633 | \thm@headfont{#6}\thm@headpunct{#7}% 1634 | }% 1635 | \@ifempty{#9}{% 1636 | \let\thmhead\thmhead@plain 1637 | }{% 1638 | \@namedef{thmhead@#1}##1##2##3{#9}% 1639 | \@temptokena\@xp{\the\@temptokena 1640 | \@xp\let\@xp\thmhead\csname thmhead@#1\endcsname}% 1641 | }% 1642 | \@xp\xdef\csname th@#1\endcsname{\the\toks@ \the\@temptokena}% 1643 | } 1644 | \DeclareRobustCommand{\qed}{% 1645 | \ifmmode \mathqed 1646 | \else 1647 | \leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill 1648 | \quad\hbox{\qedsymbol}% 1649 | \fi 1650 | } 1651 | \let\QED@stack\@empty 1652 | \let\qed@elt\relax 1653 | \newcommand{\pushQED}[1]{% 1654 | \toks@{\qed@elt{#1}}\@temptokena\expandafter{\QED@stack}% 1655 | \xdef\QED@stack{\the\toks@\the\@temptokena}% 1656 | } 1657 | \newcommand{\popQED}{% 1658 | \begingroup\let\qed@elt\popQED@elt \QED@stack\relax\relax\endgroup 1659 | } 1660 | \def\popQED@elt#1#2\relax{#1\gdef\QED@stack{#2}} 1661 | \newcommand{\qedhere}{% 1662 | \begingroup \let\mathqed\math@qedhere 1663 | \let\qed@elt\setQED@elt \QED@stack\relax\relax \endgroup 1664 | } 1665 | \newif\ifmeasuring@ 1666 | \newif\iffirstchoice@ \firstchoice@true 1667 | \def\setQED@elt#1#2\relax{% 1668 | \ifmeasuring@ 1669 | \else \iffirstchoice@ \gdef\QED@stack{\qed@elt{}#2}\fi 1670 | \fi 1671 | #1% 1672 | } 1673 | \def\qed@warning{% 1674 | \PackageWarning{amsthm}{The \@nx\qedhere command may not work 1675 | correctly here}% 1676 | } 1677 | \newcommand{\mathqed}{\quad\hbox{\qedsymbol}} 1678 | \def\linebox@qed{\hfil\hbox{\qedsymbol}\hfilneg} 1679 | \@ifpackageloaded{amsmath}{% 1680 | \def\math@qedhere{% 1681 | \@ifundefined{\@currenvir @qed}{% 1682 | \qed@warning\quad\hbox{\qedsymbol}% 1683 | }{% 1684 | \@xp\aftergroup\csname\@currenvir @qed\endcsname 1685 | }% 1686 | } 1687 | \def\displaymath@qed{% 1688 | \relax 1689 | \ifmmode 1690 | \ifinner \aftergroup\linebox@qed 1691 | \else 1692 | \eqno 1693 | \let\eqno\relax \let\leqno\relax \let\veqno\relax 1694 | \hbox{\qedsymbol}% 1695 | \fi 1696 | \else 1697 | \aftergroup\linebox@qed 1698 | \fi 1699 | } 1700 | \@xp\let\csname equation*@qed\endcsname\displaymath@qed 1701 | \def\equation@qed{% 1702 | \iftagsleft@ 1703 | \hbox{\phantom{\quad\qedsymbol}}% 1704 | \gdef\alt@tag{% 1705 | \rlap{\hbox to\displaywidth{\hfil\qedsymbol}}% 1706 | \global\let\alt@tag\@empty 1707 | }% 1708 | \else 1709 | \gdef\alt@tag{% 1710 | \global\let\alt@tag\@empty 1711 | \vtop{\ialign{\hfil####\cr 1712 | \tagform@\theequation\cr 1713 | \qedsymbol\cr}}% 1714 | \setbox\z@ 1715 | }% 1716 | \fi 1717 | } 1718 | \def\qed@tag{% 1719 | \global\tag@true \nonumber 1720 | &\omit\setboxz@h {\strut@ \qedsymbol}\tagsleft@false 1721 | \place@tag@gather 1722 | \kern-\tabskip 1723 | \ifst@rred \else \global\@eqnswtrue \fi \global\advance\row@\@ne \cr 1724 | } 1725 | \def\split@qed{% 1726 | \def\endsplit{\crcr\egroup \egroup \ctagsplit@false \rendsplit@ 1727 | \aftergroup\align@qed 1728 | }% 1729 | } 1730 | \def\align@qed{% 1731 | \ifmeasuring@ \tag*{\qedsymbol}% 1732 | \else \let\math@cr@@@\qed@tag 1733 | \fi 1734 | } 1735 | \@xp\let\csname align*@qed\endcsname\align@qed 1736 | \@xp\let\csname gather*@qed\endcsname\align@qed 1737 | %% Needs some patching up for amsmath 1.2 1738 | }{% end of amsmath branch, start plain LaTeX branch 1739 | \def\math@qedhere{% 1740 | \@ifundefined{\@currenvir @qed}{% 1741 | \qed@warning \aftergroup\displaymath@qed 1742 | }{% 1743 | \@xp\aftergroup\csname\@currenvir @qed\endcsname 1744 | }% 1745 | } 1746 | \def\displaymath@qed{% 1747 | \relax 1748 | \ifmmode 1749 | \ifinner \aftergroup\aftergroup\aftergroup\linebox@qed 1750 | \else 1751 | \eqno \def\@badmath{$$}% 1752 | \let\eqno\relax \let\leqno\relax \let\veqno\relax 1753 | \hbox{\qedsymbol}% 1754 | \fi 1755 | \else 1756 | \aftergroup\linebox@qed 1757 | \fi 1758 | } 1759 | \@ifundefined{ver@leqno.clo}{% 1760 | \def\equation@qed{\displaymath@qed \quad}% 1761 | }{% 1762 | \def\equation@qed{\displaymath@qed}% 1763 | } 1764 | \def\@tempa#1$#2#3\@nil#4{% 1765 | \def#4{#1$#2\def\@currenvir{displaymath}#3}% 1766 | }% 1767 | \expandafter\ifx\csname[ \endcsname\relax 1768 | \expandafter\@tempa\[\@nil\[% 1769 | \else 1770 | \expandafter\expandafter\expandafter\@tempa\csname[ 1771 | \expandafter\endcsname\expandafter\@nil 1772 | \csname[ \endcsname 1773 | \fi 1774 | } 1775 | \@ifpackageloaded{amstex}{% 1776 | \def\@tempa{TT}% 1777 | }{% 1778 | \@ifpackageloaded{amsmath}{% 1779 | \def\@tempb#1 v#2.#3\@nil{#2}% 1780 | \ifnum\@xp\@xp\@xp\@tempb\csname ver@amsmath.sty\endcsname v0.0\@nil 1781 | <\tw@ 1782 | \def\@tempa{TT}% 1783 | \else 1784 | \def\@tempa{TF}% 1785 | \fi 1786 | }{% 1787 | \def\@tempa{TF} 1788 | }% 1789 | } 1790 | \if\@tempa 1791 | \renewcommand{\math@qedhere}{\quad\hbox{\qedsymbol}}% 1792 | \fi 1793 | \newcommand{\openbox}{\leavevmode 1794 | \hbox to.77778em{% 1795 | \hfil\vrule 1796 | \vbox to.675em{\hrule width.6em\vfil\hrule}% 1797 | \vrule\hfil}} 1798 | \DeclareRobustCommand{\textsquare}{% 1799 | \begingroup \usefont{U}{msa}{m}{n}\thr@@\endgroup 1800 | } 1801 | \@ifclasswith{\@classname}{noamsfonts}{% 1802 | \providecommand{\qedsymbol}{\openbox}% 1803 | }{} 1804 | \providecommand{\qedsymbol}{\textsquare} 1805 | \newenvironment{proof}[1][\proofname]{\par 1806 | \pushQED{\qed}% 1807 | \normalfont \topsep6\p@\@plus6\p@\relax 1808 | \trivlist 1809 | \item[\hskip\labelsep 1810 | \itshape 1811 | #1\@addpunct{.}]\ignorespaces 1812 | }{% 1813 | \popQED\endtrivlist\@endpefalse 1814 | } 1815 | \providecommand{\proofname}{Proof} 1816 | \def\bb@skip#1{% 1817 | \skip@#1\relax \advance\skip@-\prevdepth \advance\skip@-\baselineskip 1818 | \vskip\skip@} 1819 | \def\markleft#1{{\let\protect\noexpand 1820 | \let\label\relax \let\index\relax \let\glossary\relax 1821 | \expandafter\@markleft\@themark{#1}% 1822 | \mark{\@themark}}% 1823 | \if@nobreak\ifvmode\nobreak\fi\fi} 1824 | \def\@markleft#1#2#3{\gdef\@themark{{#3}{#2}}} 1825 | \def\@tempa{} 1826 | \edef\@dh{% 1827 | \noexpand\mathhexbox{\hexnumber@\symAMSb}67} 1828 | \DeclareTextCommand{\dh}{OT1}{% 1829 | \edef\@tempb{\scdefault}% 1830 | \ifx\f@shape\@tempb 1831 | \leavevmode 1832 | \raisebox{-.8ex}{\makebox[\z@][l]{\hskip-.08em\accent"16\hss}}d% 1833 | \else 1834 | \@dh 1835 | \fi 1836 | } 1837 | \DeclareTextCommand{\DH}{OT1}{% 1838 | \leavevmode\raisebox{-.5ex}{\makebox[\z@][l]{\hskip-.07em\accent"16\hss}}D} 1839 | \DeclareTextCommand{\DJ}{OT1}{% 1840 | \leavevmode\raisebox{-.5ex}{\makebox[\z@][l]{\hskip-.07em\accent"16\hss}}D} 1841 | \DeclareTextCommand{\dj}{OT1}{% 1842 | \edef\@tempa{\f@shape}\edef\@tempb{\scdefault}% 1843 | \ifx\@tempa\@tempb 1844 | \leavevmode 1845 | \raisebox{-.75ex}{\makebox[\z@][l]{\hskip-.08em\accent"16\hss}}d% 1846 | \else 1847 | \leavevmode\raisebox{.02ex}{\makebox[\z@][l]{\hskip.1em\accent"16\hss}}d% 1848 | \fi} 1849 | \hyphenation{acad-e-my acad-e-mies af-ter-thought anom-aly anom-alies 1850 | an-ti-deriv-a-tive an-tin-o-my an-tin-o-mies apoth-e-o-ses 1851 | apoth-e-o-sis ap-pen-dix ar-che-typ-al as-sign-a-ble as-sist-ant-ship 1852 | as-ymp-tot-ic asyn-chro-nous at-trib-uted at-trib-ut-able bank-rupt 1853 | bank-rupt-cy bi-dif-fer-en-tial blue-print busier busiest 1854 | cat-a-stroph-ic cat-a-stroph-i-cally con-gress cross-hatched data-base 1855 | de-fin-i-tive de-riv-a-tive dis-trib-ute dri-ver dri-vers eco-nom-ics 1856 | econ-o-mist elit-ist equi-vari-ant ex-quis-ite ex-tra-or-di-nary 1857 | flow-chart for-mi-da-ble forth-right friv-o-lous ge-o-des-ic 1858 | ge-o-det-ic geo-met-ric griev-ance griev-ous griev-ous-ly 1859 | hexa-dec-i-mal ho-lo-no-my ho-mo-thetic ideals idio-syn-crasy 1860 | in-fin-ite-ly in-fin-i-tes-i-mal ir-rev-o-ca-ble key-stroke 1861 | lam-en-ta-ble light-weight mal-a-prop-ism man-u-script mar-gin-al 1862 | meta-bol-ic me-tab-o-lism meta-lan-guage me-trop-o-lis 1863 | met-ro-pol-i-tan mi-nut-est mol-e-cule mono-chrome mono-pole 1864 | mo-nop-oly mono-spline mo-not-o-nous mul-ti-fac-eted mul-ti-plic-able 1865 | non-euclid-ean non-iso-mor-phic non-smooth par-a-digm par-a-bol-ic 1866 | pa-rab-o-loid pa-ram-e-trize para-mount pen-ta-gon phe-nom-e-non 1867 | post-script pre-am-ble pro-ce-dur-al pro-hib-i-tive pro-hib-i-tive-ly 1868 | pseu-do-dif-fer-en-tial pseu-do-fi-nite pseu-do-nym qua-drat-ic 1869 | quad-ra-ture qua-si-smooth qua-si-sta-tion-ary qua-si-tri-an-gu-lar 1870 | quin-tes-sence quin-tes-sen-tial re-arrange-ment rec-tan-gle 1871 | ret-ri-bu-tion retro-fit retro-fit-ted right-eous right-eous-ness 1872 | ro-bot ro-bot-ics sched-ul-ing se-mes-ter semi-def-i-nite 1873 | semi-ho-mo-thet-ic set-up se-vere-ly side-step sov-er-eign spe-cious 1874 | spher-oid spher-oid-al star-tling star-tling-ly sta-tis-tics 1875 | sto-chas-tic straight-est strange-ness strat-a-gem strong-hold 1876 | sum-ma-ble symp-to-matic syn-chro-nous topo-graph-i-cal tra-vers-a-ble 1877 | tra-ver-sal tra-ver-sals treach-ery turn-around un-at-tached 1878 | un-err-ing-ly white-space wide-spread wing-spread wretch-ed 1879 | wretch-ed-ly Eng-lish Euler-ian Feb-ru-ary Gauss-ian 1880 | Hamil-ton-ian Her-mit-ian Jan-u-ary Japan-ese Kor-te-weg 1881 | Le-gendre Mar-kov-ian Noe-ther-ian No-vem-ber Rie-mann-ian Sep-tem-ber} 1882 | \def\calclayout{\advance\textheight -\headheight 1883 | \advance\textheight -\headsep 1884 | \oddsidemargin\paperwidth 1885 | \advance\oddsidemargin -\textwidth 1886 | \divide\oddsidemargin\tw@ 1887 | \ifdim\oddsidemargin<.5truein \oddsidemargin.5truein \fi 1888 | \advance\oddsidemargin -1truein 1889 | \evensidemargin\oddsidemargin 1890 | \topmargin\paperheight \advance\topmargin -\textheight 1891 | \advance\topmargin -\headheight \advance\topmargin -\headsep 1892 | \divide\topmargin\tw@ 1893 | \ifdim\topmargin<.5truein \topmargin.5truein \fi 1894 | \advance\topmargin -1truein\relax 1895 | } 1896 | \InputIfFileExists{amsart.cfg}{}{% 1897 | \calclayout % initialize 1898 | \pagenumbering{arabic}% 1899 | \pagestyle{headings}% 1900 | \thispagestyle{plain}% 1901 | } 1902 | \if@compatibility \else\endinput\fi 1903 | \def\tiny{\Tiny} 1904 | \def\defaultfont{\normalfont} 1905 | \def\rom{\textup} 1906 | \let\@newpf\proof \let\proof\relax \let\endproof\relax 1907 | \newenvironment{pf}{\@newpf[\proofname]}{\popQED\endtrivlist} 1908 | \newenvironment{pf*}[1]{\@newpf[#1]}{\popQED\endtrivlist} 1909 | \endinput 1910 | %% 1911 | %% End of file `amsart.cls'. 1912 | --------------------------------------------------------------------------------