diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..4597d00 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,14 @@ +version: 2.1 +orbs: + python: circleci/python@2.1.1 +jobs: + build_and_test: + executor: python/default + steps: + - checkout + - make image + - make test +workflows: + build_test_deploy: + jobs: + - build diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index 1b423e4..0000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,13 +0,0 @@ -engines: - radon: - enabled: true - config: - threshold: 'B' - pep8: - enabled: true -ratings: - paths: - - "**.py" -exclude_paths: -- "docs/*" -- "radon/tests/*" diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 6aa9507..0000000 --- a/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -.cache -.venv -*.pyc -*~ -*.sw[op] -*.egg-info -meta.yaml -__pycache__ -.coverage -htmlcov -build -dist -.tox -docs/_build -.coveralls.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1aa7d43..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: python -sudo: false -python: - - "2.7" - - "3.3" - - "3.4" - - "3.5" - - "3.6" - - "pypy-5.3.1" -install: - - pip install . - - pip install -r test_requirements.txt - - ls -script: - - make tests - - make cov -after_success: - - coveralls diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index cb8d1e9..0000000 --- a/CHANGELOG +++ /dev/null @@ -1,177 +0,0 @@ -2.1.1 (Sep 07, 2017) --------------------- - -- Fix critical bug in Python 2 that prevented analysis of files with no - comments at the start of the module: #133 - -2.0.3 (Aug 30, 2017) --------------------- - -- Fix encoding issues for all commands: #115 and #127 - -2.0.2 (Jun 04, 2017) --------------------- - -- Update mando dependency: #120 - -2.0.1 (Jun 02, 2017) --------------------- - -- Fix bug in the error message of Flake8's plugin: #121 - -2.0.0 (May 30, 2017) --------------------- - -- Add ``--sort`` option to ``mi`` command: #100 -- Add comment stats summary when using the ``-s, --summary`` option of the - ``raw`` command: #110 -- Fix encoding bug: #114 -- Fix raw metrics (ensure that LOC = SLOC + Multi + Single Comments + Blank): - #118 -- Python 2.6 is not supported anymore - - -1.5.0 (Mar 14, 2017) --------------------- - -- Use UTF-8 or RADONFILESENCODING to open files: #86 -- Fix raw analysis bug on docstrings: #106 - -1.4.2 (Jul 26, 2016) --------------------- - -- Use flake8-polyfill in order to keep compatibility with Flake8 2.x and 3.x: - #92 - -1.4.0 (Jun 03, 2016) --------------------- - -- Add fingerprint to Code Climate issues: #88. -- Ensure the Code Climate issues have integer location values: #89. -- Count ``async def``, ``async for`` and ``async with`` towards CC: #90. - -1.3.0 (Mar 02, 2016) --------------------- - -- Modify behaviour of ``--show-closures``. Now inner classes are added to the - output as well: #79. -- Fix bug in ``is_multiline_string``: #81. - -1.2.2 (Jul 09, 2015) --------------------- - -- Add plugin for flake8 tool: #76. - -1.2.1 (May 07, 2015) --------------------- - -- The XML output now contains the line numbers: #75. - -1.2 (Jan 16, 2015) ------------------- - -- **Backwards incompatible** change regarding to CC of lambda functions and - nested functions: #68. -- Fix the bug that caused classes with only one method have a CC of 2: #70. - -1.1 (Sep 6, 2014) ------------------ - -- Make `-n, --min` and `-x, --max` effective everywhere (in JSON and XML - exporting too): #62. -- Fix the bug that prevented JSON/XML export when one file had errors during - the analysis: #63. -- Add an explanations and various examples to the docs so that programmatical - use of Radon is easier: #64. - -1.0 (Aug 15, 2014) ------------------- - -- Add ``--xml`` option to `cc` command: #49. -- Officialy support Python 3.4. -- Remove pathfinder: #59. -- Reduce drastically unit-testing time: #56. -- Update documentation (http://radon.readthedocs.org/en/latest/): #60. - -0.5.3 (Aug 1, 2014) -------------------- - -- Encode the source code to bytes if that's possible (Python 3). -- Show help if no command is given. -- Add support to read code from stdin (thanks @io41): #55. -- Move the tests inside the radon directory: #58. - -0.5.2 (Jul 24, 2014) --------------------- - -- Fix `while ... else` bug: #53. - -0.5.1 (Mar 4, 2014) -------------------- - -- Fix `--total-average` behavior. - -0.5 (Feb 17, 2014) ------------------- - -- Add `-i, --ignore` option to ignore directories: #39. -- Add `--no-assert` option to `cc` command to avoid `assert` statements: #42. -- Add `-j, --json` option to `raw` command (thanks @cjav): #45. -- Add `--total-average` option to `cc` command: #44. -- Add `--version` global option: #47. - -0.4.5 (Dec 16, 2013) --------------------- - -- Baker is replaced with mando: https://github.com/rubik/mando. - -0.4.4 (Nov 20, 2013) --------------------- - -- Add `-j` option to `cc` command: #33. -- Use pathfinder and improve `iter_filenames`: #31. -- Complete the documentation: #18. -- Add `-s, --summarize` option to `raw` command (thanks @jsargiot): #36. - -0.4.2 (Jun 25, 2013) --------------------- - -- `raw` command failed on almost-empty files: #29. - -0.4.1 (Jun 16, 2013) --------------------- - -- Turn off colors when not printing to a tty (thanks @kennknowles): #26. -- Fixed #27 (`endline` could be `float('-inf')` sometimes). - - -0.4 (Apr 26, 2013) ------------------- - -- Added `-s` option to `mi` command: #19. -- Added `-o` option to `cc` command to sort output: #20. -- Added `endline` attribute to `Function` and `Class` objects: #25. - - - -0.3 (Nov 2, 2012) ------------------ - -- Code coverage to 100%, runs from Python 2.6 up to 3.3 and on PyPy as well. -- Created a documentation at https://radon.readthedocs.org\: #5. -- Made the codebase compatible with PyPy: #9. -- Ported cli.py to Python 3: #14. -- More tests: #15. -- Minor fixes: #11, #12, #13, #17. - - -0.2 (Oct 11, 2012) ------------------- - -Initial version. - - -0.1 (Never) ------------ - -There was no 0.1. diff --git a/Dockerfile b/Dockerfile index f42a133..d5871be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,17 @@ -FROM alpine:edge +FROM alpine:3.18.0 MAINTAINER rubik WORKDIR /usr/src/app -COPY . /usr/src/app + +COPY requirements.txt /usr/src/app RUN apk --update add \ - python2 python3 py2-pip && \ - pip2 install --upgrade pip && \ - pip2 install --requirement requirements.txt && \ - pip2 install . && \ - mv /usr/bin/radon /usr/bin/radon2 && \ + python3 py3-pip && \ pip3 install --requirement requirements.txt && \ - pip3 install . && \ - mv /usr/bin/radon /usr/bin/radon3 && \ rm /var/cache/apk/* +COPY . /usr/src/app + RUN adduser -u 9000 app -D USER app @@ -22,4 +19,4 @@ WORKDIR /code VOLUME /code -CMD ["/usr/src/app/codeclimate-radon"] +CMD ["/usr/src/app/bin/codeclimate-radon"] diff --git a/LICENSE b/LICENSE deleted file mode 100644 index e821b86..0000000 --- a/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012-2017 Michele Lacchia - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index b093079..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,9 +0,0 @@ -include README.rst -include LICENSE -include CHANGELOG -include requirements.txt -include tox_requirements.txt -include tox.ini -recursive-include docs * -recursive-include radon/tests * -global-exclude *.pyc __pycache__ diff --git a/Makefile b/Makefile index 7a2cd3b..c2f3d10 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,9 @@ -.PHONY: tests cov htmlcov pep8 pylint docs dev-deps test-deps publish coveralls +.PHONY: image -tests: - python radon/tests/run.py +IMAGE_NAME ?= codeclimate/codeclimate-radon -cov: - coverage erase && coverage run --include "radon/*" --omit "radon/__init__.py,radon/cli.py,radon/tests/*" radon/tests/run.py - coverage report -m +image: + docker build -t $(IMAGE_NAME) . -htmlcov: cov - coverage html - -pep8: - pep8 radon --exclude "radon/tests" --ignore "E731" - -pylint: - pylint --rcfile pylintrc radon - -docs: - cd docs && make html - -test-deps: - pip install -r test_requirements.pip - -publish: - python setup.py sdist bdist_wheel upload - python setup.py develop - -coveralls: test-deps cov - coveralls +test: image + docker run -it $(IMAGE_NAME) sh -c "cd /usr/src/app && pytest -p no:cacheprovider" diff --git a/Pipfile b/Pipfile deleted file mode 100644 index 373ffea..0000000 --- a/Pipfile +++ /dev/null @@ -1,15 +0,0 @@ -[[source]] -url = "https://pypi.python.org/simple" -verify_ssl = true - -[dev-packages] -tox = "*" -pytest = "*" -coverage = "*" -mock = "*" -pytest-mock = "*" - -[packages] -mando = ">=0.3,<0.4" -colorama = ">=0.3,<0.4" -flake8-polyfill = "*" diff --git a/Pipfile.lock b/Pipfile.lock deleted file mode 100644 index 535ee56..0000000 --- a/Pipfile.lock +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "d1770e050ee8f186459b846d478570545743da69832155b1ac48b9fcedf00f1e" - }, - "requires": {}, - "sources": [ - { - "url": "https://pypi.python.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "colorama": { - "hash": "sha256:463f8483208e921368c9f306094eb6f725c6ca42b0f97e313cb5d5512459feda", - "version": "==0.3.9" - }, - "flake8": { - "hash": "sha256:83905eadba99f73fbfe966598aaf1682b3eb6755d2263c5b33a4e8367d60b0d1", - "version": "==3.3.0" - }, - "flake8-polyfill": { - "hash": "sha256:da3d14a829cb1ec6377b2065e3f3892cf64b81a24ad15bbdf003c7bfee01723f", - "version": "==1.0.1" - }, - "mando": { - "hash": "sha256:ef1e10b7004b84c41cb272516640f1d387fcd1e16ba48fb96d6a6eba131faef3", - "version": "==0.3.3" - }, - "mccabe": { - "hash": "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", - "version": "==0.6.1" - }, - "pycodestyle": { - "hash": "sha256:6c4245ade1edfad79c3446fadfc96b0de2759662dc29d07d80a6f27ad1ca6ba9", - "version": "==2.3.1" - }, - "pyflakes": { - "hash": "sha256:cc5eadfb38041f8366128786b4ca12700ed05bbf1403d808e89d57d67a3875a7", - "version": "==1.5.0" - } - }, - "develop": { - "appdirs": { - "hash": "sha256:d8b24664561d0d34ddfaec54636d502d7cea6e29c3eaf68f3df6180863e2166e", - "version": "==1.4.3" - }, - "coverage": { - "hash": "sha256:248783c221af8961278ea706b585586f92c61a024109acde675487632b775971", - "version": "==4.4" - }, - "mock": { - "hash": "sha256:5ce3c71c5545b472da17b72268978914d0252980348636840bd34a00b5cc96c1", - "version": "==2.0.0" - }, - "packaging": { - "hash": "sha256:99276dc6e3a7851f32027a68f1095cd3f77c148091b092ea867a351811cfe388", - "version": "==16.8" - }, - "pbr": { - "hash": "sha256:86f0e548dfbdc1ad12559725a66b5e1ca0b2e0744940da1ec89991fd11a2b32b", - "version": "==3.0.0" - }, - "pluggy": { - "hash": "sha256:d2766caddfbbc8ef641d47da556d2ae3056860ce4d553aa04009e42b76a09951", - "version": "==0.4.0" - }, - "py": { - "hash": "sha256:81b5e37db3cc1052de438375605fb5d3b3e97f950f415f9143f04697c684d7eb", - "version": "==1.4.33" - }, - "pyparsing": { - "hash": "sha256:fee43f17a9c4087e7ed1605bd6df994c6173c1e977d7ade7b651292fab2bd010", - "version": "==2.2.0" - }, - "pytest": { - "hash": "sha256:66f332ae62593b874a648b10a8cb106bfdacd2c6288ed7dec3713c3a808a6017", - "version": "==3.0.7" - }, - "pytest-mock": { - "hash": "sha256:29bf62c12a67dc0e7f6d02efa2404f0b4d068b38cd64f22a06c8a16cb545a03e", - "version": "==1.6.0" - }, - "setuptools": { - "hash": "sha256:19d753940f8cdbee7548da318f8b56159aead279ef811a6efc8b8a33d89c86a4", - "version": "==35.0.2" - }, - "six": { - "hash": "sha256:0ff78c403d9bccf5a425a6d31a12aa6b47f1c21ca4dc2573a7e2f32a97335eb1", - "version": "==1.10.0" - }, - "tox": { - "hash": "sha256:0f37ea637ead4a5bbae91531b0bf8fd327c7152e20255e5960ee180598228d21", - "version": "==2.7.0" - }, - "virtualenv": { - "hash": "sha256:39d88b533b422825d644087a21e78c45cf5af0ef7a99a1fc9fbb7b481e5c85b0", - "version": "==15.1.0" - } - } -} \ No newline at end of file diff --git a/README.rst b/README.rst deleted file mode 100644 index ff1af02..0000000 --- a/README.rst +++ /dev/null @@ -1,157 +0,0 @@ -Radon -===== - -.. image:: https://img.shields.io/codacy/623b84f5f6e6708c486f371e10da3610.svg - :alt: Codacy badge - :target: https://www.codacy.com/app/rubik/radon/dashboard - -.. image:: https://img.shields.io/travis/rubik/radon/master.svg - :alt: Travis-CI badge - :target: https://travis-ci.org/rubik/radon - -.. image:: https://img.shields.io/coveralls/rubik/radon/master.svg - :alt: Coveralls badge - :target: https://coveralls.io/r/rubik/radon?branch=master - -.. image:: https://img.shields.io/pypi/v/radon.svg - :alt: PyPI latest version badge - :target: https://pypi.python.org/pypi/radon - -.. image:: https://img.shields.io/pypi/format/radon.svg - :alt: Download format - :target: http://pythonwheels.com/ - -.. image:: https://img.shields.io/pypi/l/radon.svg - :alt: Radon license - :target: https://pypi.python.org/pypi/radon - - ----- - -Radon is a Python tool that computes various metrics from the source code. -Radon can compute: - -* **McCabe's complexity**, i.e. cyclomatic complexity -* **raw** metrics (these include SLOC, comment lines, blank lines, &c.) -* **Halstead** metrics (all of them) -* **Maintainability Index** (the one used in Visual Studio) - -Requirements ------------- - -Radon will run from **Python 2.7** to **Python 3.6** with a single code base -and without the need of tools like 2to3 or six. It can also run on **PyPy** -without any problems (currently PyPy 5.8.0 is used in tests). - -Radon depends on as few packages as possible. Currently only `mando` is -strictly required (for the CLI interface). `colorama` is also listed as a -dependency but if Radon cannot import it, the output simply will not be -colored. - -**Note**: -**Python 2.6** was supported until version 1.5.0. Starting from version 2.0, it -is not supported anymore. - -Installation ------------- - -With Pip: - -.. code-block:: sh - - $ pip install radon - -Or download the source and run the setup file: - -.. code-block:: sh - - $ python setup.py install - -Usage ------ - -Radon can be used either from the command line or programmatically. -Documentation is at https://radon.readthedocs.org/. - -Cyclomatic Complexity Example ------------------------------ - -Quick example: - -.. code-block:: sh - - $ radon cc sympy/solvers/solvers.py -a -nc - sympy/solvers/solvers.py - F 346:0 solve - F - F 1093:0 _solve - F - F 1434:0 _solve_system - F - F 2647:0 unrad - F - F 110:0 checksol - F - F 2238:0 _tsolve - F - F 2482:0 _invert - F - F 1862:0 solve_linear_system - E - F 1781:0 minsolve_linear_system - D - F 1636:0 solve_linear - D - F 2382:0 nsolve - C - - 11 blocks (classes, functions, methods) analyzed. - Average complexity: F (61.0) - -Explanation: - -* ``cc`` is the radon command to compute Cyclomatic Complexity -* ``-a`` tells radon to calculate the average complexity at the end. Note that - the average is computed among the *shown* blocks. If you want the total - average, among all the blocks, regardless of what is being shown, you should - use ``--total-average``. -* ``-nc`` tells radon to print only results with a complexity rank of C or - worse. Other examples: ``-na`` (from A to F), or ``-nd`` (from D to F). -* The letter *in front of* the line numbers represents the type of the block - (**F** means function, **M** method and **C** class). - -Actually it's even better: it's got colors! - -.. image:: https://cloud.githubusercontent.com/assets/238549/3707477/5793aeaa-1435-11e4-98fb-00e0bd8137f5.png - :alt: A screen of Radon's cc command - - -**Note about file encoding** - -On some systems, such as Windows, the default encoding is not UTF-8. If you are -using Unicode characters in your Python file and want to analyze it with Radon, -you'll have to set the `RADONFILESENCODING` environment variable to `UTF-8`. - - -On a Continuous Integration server ----------------------------------- - -If you are looking to use `radon` on a CI server you may be better off with -`xenon `_. Although still experimental, it will -fail (that means exiting with a non-zero exit code) when various thresholds are -surpassed. `radon` is more of a reporting tool, while `xenon` is a monitoring -one. - -If you are looking for more complete solutions, read the following sections. - -Code Climate -++++++++++++ - -Radon is available as a `Code Climate Engine `_. -To understand how to add Radon's checks to your Code Climate Platform, head -over to their documentation: -https://docs.codeclimate.com/v1.0/docs/radon - -Coala Analyzer -++++++++++++++ - -Radon is also supported in `coala `_. To add Radon's -checks to coala, simply add the ``RadonBear`` to one of the sections in -your ``.coafile``. - - -Links ------ - -* Documentation: https://radon.readthedocs.org -* PyPI: http://pypi.python.org/pypi/radon -* Issue Tracker: https://github.com/rubik/radon/issues diff --git a/bin/codeclimate-radon b/bin/codeclimate-radon new file mode 100755 index 0000000..f5493e7 --- /dev/null +++ b/bin/codeclimate-radon @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 +import sys +sys.path.append('/usr/src/app') +from engine import Engine + +Engine().run() diff --git a/codeclimate-radon b/codeclimate-radon deleted file mode 100755 index 656070e..0000000 --- a/codeclimate-radon +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python3 - -import json -import os.path -import shlex -import sys - -threshold = "b" -binstub = "radon3" -include_paths = ["."] - -if os.path.exists("/config.json"): - contents = open("/config.json").read() - config = json.loads(contents) - - if config.get("config"): - if config["config"].get("threshold"): - threshold = config["config"]["threshold"].lower() - - if config["config"].get("python_version"): - version = config["config"].get("python_version") - if version == "2" or version == 2: - binstub = "radon2" - elif version != "3" and version != 3: - sys.exit("Invalid python_version; must be either 2 or 3") - if config["config"].get("encoding"): - encoding = config["config"].get("encoding") - os.environ["RADONFILESENCODING"] = encoding - - if config.get("include_paths"): - config_paths = config.get("include_paths") - python_paths = [] - for i in config_paths: - ext = os.path.splitext(i)[1] - if os.path.isdir(i) or "py" in ext: - python_paths.append(i) - include_paths = python_paths - - include_paths = config.get("include_paths", ["."]) - include_paths = [shlex.quote(path) for path in include_paths - if os.path.isdir(path) or path.endswith(".py")] - -if len(include_paths) > 0: - paths = " ".join(include_paths) - - print("Running {0}...".format(binstub), file = sys.stderr) - os.system("{0} cc {1} -n{2} --codeclimate".format(binstub, paths, threshold)) -else: - print("Empty workspace; skipping...", file = sys.stderr) diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 0bfa81c..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,153 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Radon.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Radon.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/Radon" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Radon" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/_static/MathJax.js b/docs/_static/MathJax.js deleted file mode 100644 index f363132..0000000 --- a/docs/_static/MathJax.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -if(document.getElementById&&document.childNodes&&document.createElement){if(!(window.MathJax&&MathJax.Hub)){if(window.MathJax){window.MathJax={AuthorConfig:window.MathJax}}else{window.MathJax={}}MathJax.isPacked=true;MathJax.version="2.4.0";MathJax.fileversion="2.4.0";MathJax.cdnVersion="2.4-beta-2";MathJax.cdnFileVersions={};(function(d){var b=window[d];if(!b){b=window[d]={}}var e=[];var c=function(f){var g=f.constructor;if(!g){g=function(){}}for(var h in f){if(h!=="constructor"&&f.hasOwnProperty(h)){g[h]=f[h]}}return g};var a=function(){return function(){return arguments.callee.Init.call(this,arguments)}};b.Object=c({constructor:a(),Subclass:function(f,h){var g=a();g.SUPER=this;g.Init=this.Init;g.Subclass=this.Subclass;g.Augment=this.Augment;g.protoFunction=this.protoFunction;g.can=this.can;g.has=this.has;g.isa=this.isa;g.prototype=new this(e);g.prototype.constructor=g;g.Augment(f,h);return g},Init:function(f){var g=this;if(f.length===1&&f[0]===e){return g}if(!(g instanceof f.callee)){g=new f.callee(e)}return g.Init.apply(g,f)||g},Augment:function(f,g){var h;if(f!=null){for(h in f){if(f.hasOwnProperty(h)){this.protoFunction(h,f[h])}}if(f.toString!==this.prototype.toString&&f.toString!=={}.toString){this.protoFunction("toString",f.toString)}}if(g!=null){for(h in g){if(g.hasOwnProperty(h)){this[h]=g[h]}}}return this},protoFunction:function(g,f){this.prototype[g]=f;if(typeof f==="function"){f.SUPER=this.SUPER.prototype}},prototype:{Init:function(){},SUPER:function(f){return f.callee.SUPER},can:function(f){return typeof(this[f])==="function"},has:function(f){return typeof(this[f])!=="undefined"},isa:function(f){return(f instanceof Object)&&(this instanceof f)}},can:function(f){return this.prototype.can.call(this,f)},has:function(f){return this.prototype.has.call(this,f)},isa:function(g){var f=this;while(f){if(f===g){return true}else{f=f.SUPER}}return false},SimpleSUPER:c({constructor:function(f){return this.SimpleSUPER.define(f)},define:function(f){var h={};if(f!=null){for(var g in f){if(f.hasOwnProperty(g)){h[g]=this.wrap(g,f[g])}}if(f.toString!==this.prototype.toString&&f.toString!=={}.toString){h.toString=this.wrap("toString",f.toString)}}return h},wrap:function(i,h){if(typeof(h)!=="function"||!h.toString().match(/\.\s*SUPER\s*\(/)){return h}var g=function(){this.SUPER=g.SUPER[i];try{var f=h.apply(this,arguments)}catch(j){delete this.SUPER;throw j}delete this.SUPER;return f};g.toString=function(){return h.toString.apply(h,arguments)};return g}})})})("MathJax");(function(BASENAME){var BASE=window[BASENAME];if(!BASE){BASE=window[BASENAME]={}}var CALLBACK=function(data){var cb=function(){return arguments.callee.execute.apply(arguments.callee,arguments)};for(var id in CALLBACK.prototype){if(CALLBACK.prototype.hasOwnProperty(id)){if(typeof(data[id])!=="undefined"){cb[id]=data[id]}else{cb[id]=CALLBACK.prototype[id]}}}cb.toString=CALLBACK.prototype.toString;return cb};CALLBACK.prototype={isCallback:true,hook:function(){},data:[],object:window,execute:function(){if(!this.called||this.autoReset){this.called=!this.autoReset;return this.hook.apply(this.object,this.data.concat([].slice.call(arguments,0)))}},reset:function(){delete this.called},toString:function(){return this.hook.toString.apply(this.hook,arguments)}};var ISCALLBACK=function(f){return(typeof(f)==="function"&&f.isCallback)};var EVAL=function(code){return eval.call(window,code)};var TESTEVAL=function(){EVAL("var __TeSt_VaR__ = 1");if(window.__TeSt_VaR__){try{delete window.__TeSt_VaR__}catch(error){window.__TeSt_VaR__=null}}else{if(window.execScript){EVAL=function(code){BASE.__code=code;code="try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";window.execScript(code);var result=BASE.__result;delete BASE.__result;delete BASE.__code;if(result instanceof Error){throw result}return result}}else{EVAL=function(code){BASE.__code=code;code="try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";var head=(document.getElementsByTagName("head"))[0];if(!head){head=document.body}var script=document.createElement("script");script.appendChild(document.createTextNode(code));head.appendChild(script);head.removeChild(script);var result=BASE.__result;delete BASE.__result;delete BASE.__code;if(result instanceof Error){throw result}return result}}}TESTEVAL=null};var USING=function(args,i){if(arguments.length>1){if(arguments.length===2&&!(typeof arguments[0]==="function")&&arguments[0] instanceof Object&&typeof arguments[1]==="number"){args=[].slice.call(args,i)}else{args=[].slice.call(arguments,0)}}if(args instanceof Array&&args.length===1){args=args[0]}if(typeof args==="function"){if(args.execute===CALLBACK.prototype.execute){return args}return CALLBACK({hook:args})}else{if(args instanceof Array){if(typeof(args[0])==="string"&&args[1] instanceof Object&&typeof args[1][args[0]]==="function"){return CALLBACK({hook:args[1][args[0]],object:args[1],data:args.slice(2)})}else{if(typeof args[0]==="function"){return CALLBACK({hook:args[0],data:args.slice(1)})}else{if(typeof args[1]==="function"){return CALLBACK({hook:args[1],object:args[0],data:args.slice(2)})}}}}else{if(typeof(args)==="string"){if(TESTEVAL){TESTEVAL()}return CALLBACK({hook:EVAL,data:[args]})}else{if(args instanceof Object){return CALLBACK(args)}else{if(typeof(args)==="undefined"){return CALLBACK({})}}}}}throw Error("Can't make callback from given data")};var DELAY=function(time,callback){callback=USING(callback);callback.timeout=setTimeout(callback,time);return callback};var WAITFOR=function(callback,signal){callback=USING(callback);if(!callback.called){WAITSIGNAL(callback,signal);signal.pending++}};var WAITEXECUTE=function(){var signals=this.signal;delete this.signal;this.execute=this.oldExecute;delete this.oldExecute;var result=this.execute.apply(this,arguments);if(ISCALLBACK(result)&&!result.called){WAITSIGNAL(result,signals)}else{for(var i=0,m=signals.length;i0&&priorityg){g=document.styleSheets.length}if(!i){i=(document.getElementsByTagName("head"))[0];if(!i){i=document.body}}return i};var f=[];var c=function(){for(var k=0,j=f.length;k=this.timeout){i(this.STATUS.ERROR);return 1}return 0},file:function(j,i){if(i<0){a.Ajax.loadTimeout(j)}else{a.Ajax.loadComplete(j)}},execute:function(){this.hook.call(this.object,this,this.data[0],this.data[1])},checkSafari2:function(i,j,k){if(i.time(k)){return}if(document.styleSheets.length>j&&document.styleSheets[j].cssRules&&document.styleSheets[j].cssRules.length){k(i.STATUS.OK)}else{setTimeout(i,i.delay)}},checkLength:function(i,l,n){if(i.time(n)){return}var m=0;var j=(l.sheet||l.styleSheet);try{if((j.cssRules||j.rules||[]).length>0){m=1}}catch(k){if(k.message.match(/protected variable|restricted URI/)){m=1}else{if(k.message.match(/Security error/)){m=1}}}if(m){setTimeout(a.Callback([n,i.STATUS.OK]),0)}else{setTimeout(i,i.delay)}}},loadComplete:function(i){i=this.fileURL(i);var j=this.loading[i];if(j&&!j.preloaded){a.Message.Clear(j.message);clearTimeout(j.timeout);if(j.script){if(f.length===0){setTimeout(c,0)}f.push(j.script)}this.loaded[i]=j.status;delete this.loading[i];this.addHook(i,j.callback)}else{if(j){delete this.loading[i]}this.loaded[i]=this.STATUS.OK;j={status:this.STATUS.OK}}if(!this.loadHooks[i]){return null}return this.loadHooks[i].Execute(j.status)},loadTimeout:function(i){if(this.loading[i].timeout){clearTimeout(this.loading[i].timeout)}this.loading[i].status=this.STATUS.ERROR;this.loadError(i);this.loadComplete(i)},loadError:function(i){a.Message.Set(["LoadFailed","File failed to load: %1",i],null,2000);a.Hub.signal.Post(["file load error",i])},Styles:function(k,l){var i=this.StyleString(k);if(i===""){l=a.Callback(l);l()}else{var j=document.createElement("style");j.type="text/css";this.head=h(this.head);this.head.appendChild(j);if(j.styleSheet&&typeof(j.styleSheet.cssText)!=="undefined"){j.styleSheet.cssText=i}else{j.appendChild(document.createTextNode(i))}l=this.timer.create.call(this,l,j)}return l},StyleString:function(n){if(typeof(n)==="string"){return n}var k="",o,m;for(o in n){if(n.hasOwnProperty(o)){if(typeof n[o]==="string"){k+=o+" {"+n[o]+"}\n"}else{if(n[o] instanceof Array){for(var l=0;l="0"&&p<="9"){f[j]=o[f[j]-1];if(typeof f[j]==="number"){f[j]=this.number(f[j])}}else{if(p==="{"){p=f[j].substr(1);if(p>="0"&&p<="9"){f[j]=o[f[j].substr(1,f[j].length-2)-1];if(typeof f[j]==="number"){f[j]=this.number(f[j])}}else{var k=f[j].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);if(k){if(k[1]==="plural"){var d=o[k[2]-1];if(typeof d==="undefined"){f[j]="???"}else{d=this.plural(d)-1;var h=k[3].replace(/(^|[^%])(%%)*%\|/g,"$1$2%\uEFEF").split(/\|/);if(d>=0&&d=3){c.push([f[0],f[1],this.processSnippet(g,f[2])])}else{c.push(e[d])}}}}else{c.push(e[d])}}return c},markdownPattern:/(%.)|(\*{1,3})((?:%.|.)+?)\2|(`+)((?:%.|.)+?)\4|\[((?:%.|.)+?)\]\(([^\s\)]+)\)/,processMarkdown:function(b,h,d){var j=[],e;var c=b.split(this.markdownPattern);var g=c[0];for(var f=1,a=c.length;f1?d[1]:""));f=null}if(e&&(!b.preJax||d)){c.nodeValue=c.nodeValue.replace(b.postJax,(e.length>1?e[1]:""))}if(f&&!f.nodeValue.match(/\S/)){f=f.previousSibling}}if(b.preRemoveClass&&f&&f.className===b.preRemoveClass){a.MathJax.preview=f}a.MathJax.checked=1},processInput:function(a){var b,i=MathJax.ElementJax.STATE;var h,e,d=a.scripts.length;try{while(a.ithis.processUpdateTime&&a.i1){d.jax[a.outputJax].push(b)}b.MathJax.state=c.OUTPUT},prepareOutput:function(c,f){while(c.jthis.processUpdateTime&&h.i=0;p--){if((b[p].src||"").match(e)){r.script=b[p].innerHTML;if(RegExp.$2){var s=RegExp.$2.substr(1).split(/\&/);for(var o=0,k=s.length;o=parseInt(x[y])}}return true},Select:function(j){var i=j[c.Browser];if(i){return i(c.Browser)}return null}};var d=h.replace(/^Mozilla\/(\d+\.)+\d+ /,"").replace(/[a-z][-a-z0-9._: ]+\/\d+[^ ]*-[^ ]*\.([a-z][a-z])?\d+ /i,"").replace(/Gentoo |Ubuntu\/(\d+\.)*\d+ (\([^)]*\) )?/,"");c.Browser=c.Insert(c.Insert(new String("Unknown"),{version:"0.0"}),a);for(var u in a){if(a.hasOwnProperty(u)){if(a[u]&&u.substr(0,2)==="is"){u=u.slice(2);if(u==="Mac"||u==="PC"){continue}c.Browser=c.Insert(new String(u),a);var q=new RegExp(".*(Version/| Trident/.*; rv:)((?:\\d+\\.)+\\d+)|.*("+u+")"+(u=="MSIE"?" ":"/")+"((?:\\d+\\.)*\\d+)|(?:^|\\(| )([a-z][-a-z0-9._: ]+|(?:Apple)?WebKit)/((?:\\d+\\.)+\\d+)");var t=q.exec(d)||["","","","unknown","0.0"];c.Browser.name=(t[1]!=""?u:(t[3]||t[5]));c.Browser.version=t[2]||t[4]||t[6];break}}}c.Browser.Select({Safari:function(j){var i=parseInt((String(j.version).split("."))[0]);if(i>85){j.webkit=j.version}if(i>=534){j.version="5.1"}else{if(i>=533){j.version="5.0"}else{if(i>=526){j.version="4.0"}else{if(i>=525){j.version="3.1"}else{if(i>500){j.version="3.0"}else{if(i>400){j.version="2.0"}else{if(i>85){j.version="1.0"}}}}}}}j.isMobile=(navigator.appVersion.match(/Mobile/i)!=null);j.noContextMenu=j.isMobile},Firefox:function(j){if((j.version==="0.0"||h.match(/Firefox/)==null)&&navigator.product==="Gecko"){var m=h.match(/[\/ ]rv:(\d+\.\d.*?)[\) ]/);if(m){j.version=m[1]}else{var i=(navigator.buildID||navigator.productSub||"0").substr(0,8);if(i>="20111220"){j.version="9.0"}else{if(i>="20111120"){j.version="8.0"}else{if(i>="20110927"){j.version="7.0"}else{if(i>="20110816"){j.version="6.0"}else{if(i>="20110621"){j.version="5.0"}else{if(i>="20110320"){j.version="4.0"}else{if(i>="20100121"){j.version="3.6"}else{if(i>="20090630"){j.version="3.5"}else{if(i>="20080617"){j.version="3.0"}else{if(i>="20061024"){j.version="2.0"}}}}}}}}}}}}j.isMobile=(navigator.appVersion.match(/Android/i)!=null||h.match(/ Fennec\//)!=null||h.match(/Mobile/)!=null)},Opera:function(i){i.version=opera.version()},MSIE:function(j){j.isIE9=!!(document.documentMode&&(window.performance||window.msPerformance));MathJax.HTML.setScriptBug=!j.isIE9||document.documentMode<9;var w=false;try{new ActiveXObject("MathPlayer.Factory.1");j.hasMathPlayer=w=true}catch(m){}try{if(w&&!r.params.NoMathPlayer){var i=document.createElement("object");i.id="mathplayer";i.classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987";document.getElementsByTagName("head")[0].appendChild(i);document.namespaces.add("m","http://www.w3.org/1998/Math/MathML");j.mpNamespace=true;if(document.readyState&&(document.readyState==="loading"||document.readyState==="interactive")){document.write('');j.mpImported=true}}else{document.namespaces.add("mjx_IE_fix","http://www.w3.org/1999/xlink")}}catch(m){}}});c.Browser.Select(MathJax.Message.browsers);if(g.AuthorConfig&&typeof g.AuthorConfig.AuthorInit==="function"){g.AuthorConfig.AuthorInit()}c.queue=g.Callback.Queue();c.queue.Push(["Post",r.signal,"Begin"],["Config",r],["Cookie",r],["Styles",r],["Message",r],function(){var i=g.Callback.Queue(r.Jax(),r.Extensions());return i.Push({})},["Menu",r],r.onLoad(),function(){MathJax.isReady=true},["Typeset",r],["Hash",r],["MenuZoom",r],["Post",r.signal,"End"])})("MathJax")}}; diff --git a/docs/_static/config/TeX-AMS_HTML.js b/docs/_static/config/TeX-AMS_HTML.js deleted file mode 100644 index 6ac3ea2..0000000 --- a/docs/_static/config/TeX-AMS_HTML.js +++ /dev/null @@ -1,25 +0,0 @@ -/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ -/* vim: set ts=2 et sw=2 tw=80: */ - -/************************************************************* - * - * /MathJax/unpacked/config/TeX-AMS_HTML.js - * - * Copyright (c) 2010-2014 The MathJax Consortium - * - * Part of the MathJax library. - * See http://www.mathjax.org for details. - * - * Licensed under the Apache License, Version 2.0; - * you may not use this file except in compliance with the License. - * - * http://www.apache.org/licenses/LICENSE-2.0 - */ - -MathJax.Hub.Config({ - extensions: ["tex2jax.js","TeX/noErrors.js","TeX/noUndefined.js","TeX/AMSmath.js","TeX/AMSsymbols.js", "HTML-CSS/handle-floats.js"], - jax: ["input/TeX","output/HTML-CSS"], - showMathMenu: false -}); - -MathJax.Ajax.loadComplete("[MathJax]/config/TeX-AMS_HTML.js"); diff --git a/docs/_static/extensions/HTML-CSS/handle-floats.js b/docs/_static/extensions/HTML-CSS/handle-floats.js deleted file mode 100644 index eecb3f7..0000000 --- a/docs/_static/extensions/HTML-CSS/handle-floats.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/extensions/HTML-CSS/handle-floats.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Extension["HTML-CSS/handle-floats"]={version:"2.4.0"};MathJax.Hub.Config({"HTML-CSS":{styles:{".MathJax_Display":{display:"table-cell",padding:"1em 0 ! important",width:(MathJax.Hub.Browser.isMSIE&&(document.documentMode||0)<8?"100%":"1000em")}}}});MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var a=MathJax.OutputJax["HTML-CSS"],b=a.Translate;a.Augment({Translate:function(c,f){b.call(this,c,f);if(c.MathJax.elementJax.HTMLCSS.display){var e=c.nextSibling;if(!e||e.className!=="MathJax_MSIE_Separator"){var d=a.Element("span",{className:"MathJax_MSIE_Separator"});c.parentNode.insertBefore(d,e)}}}});MathJax.Hub.Startup.signal.Post("HTML-CSS handle-floats Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/HTML-CSS/handle-floats.js"); diff --git a/docs/_static/extensions/MathEvents.js b/docs/_static/extensions/MathEvents.js deleted file mode 100644 index 0f4aa2a..0000000 --- a/docs/_static/extensions/MathEvents.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/extensions/MathEvents.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(d,h,l,g,m,b,j){var q="2.4.0";var i=MathJax.Extension;var c=i.MathEvents={version:q};var k=d.config.menuSettings;var p={hover:500,frame:{x:3.5,y:5,bwidth:1,bcolor:"#A6D",hwidth:"15px",hcolor:"#83A"},button:{x:-4,y:-3,wx:-2,src:l.urlRev(b.imageDir+"/MenuArrow-15.png")},fadeinInc:0.2,fadeoutInc:0.05,fadeDelay:50,fadeoutStart:400,fadeoutDelay:15*1000,styles:{".MathJax_Hover_Frame":{"border-radius":".25em","-webkit-border-radius":".25em","-moz-border-radius":".25em","-khtml-border-radius":".25em","box-shadow":"0px 0px 15px #83A","-webkit-box-shadow":"0px 0px 15px #83A","-moz-box-shadow":"0px 0px 15px #83A","-khtml-box-shadow":"0px 0px 15px #83A",border:"1px solid #A6D ! important",display:"inline-block",position:"absolute"},".MathJax_Hover_Arrow":{position:"absolute",width:"15px",height:"11px",cursor:"pointer"}}};var n=c.Event={LEFTBUTTON:0,RIGHTBUTTON:2,MENUKEY:"altKey",Mousedown:function(r){return n.Handler(r,"Mousedown",this)},Mouseup:function(r){return n.Handler(r,"Mouseup",this)},Mousemove:function(r){return n.Handler(r,"Mousemove",this)},Mouseover:function(r){return n.Handler(r,"Mouseover",this)},Mouseout:function(r){return n.Handler(r,"Mouseout",this)},Click:function(r){return n.Handler(r,"Click",this)},DblClick:function(r){return n.Handler(r,"DblClick",this)},Menu:function(r){return n.Handler(r,"ContextMenu",this)},Handler:function(u,s,t){if(l.loadingMathMenu){return n.False(u)}var r=b[t.jaxID];if(!u){u=window.event}u.isContextMenu=(s==="ContextMenu");if(r[s]){return r[s](u,t)}if(i.MathZoom){return i.MathZoom.HandleEvent(u,s,t)}},False:function(r){if(!r){r=window.event}if(r){if(r.preventDefault){r.preventDefault()}else{r.returnValue=false}if(r.stopPropagation){r.stopPropagation()}r.cancelBubble=true}return false},ContextMenu:function(u,F,x){var C=b[F.jaxID],w=C.getJaxFromMath(F);var G=(C.config.showMathMenu!=null?C:d).config.showMathMenu;if(!G||(k.context!=="MathJax"&&!x)){return}if(c.msieEventBug){u=window.event||u}n.ClearSelection();f.ClearHoverTimer();if(w.hover){if(w.hover.remove){clearTimeout(w.hover.remove);delete w.hover.remove}w.hover.nofade=true}var v=MathJax.Menu;var H,E;if(v){if(v.loadingDomain){return n.False(u)}H=m.loadDomain("MathMenu");if(!H){v.jax=w;var s=v.menu.Find("Show Math As").menu;s.items[0].name=w.sourceMenuTitle;s.items[0].format=(w.sourceMenuFormat||"MathML");s.items[1].name=j[w.inputJax].sourceMenuTitle;s.items[5].disabled=!j[w.inputJax].annotationEncoding;var B=s.items[2];B.disabled=true;var r=B.menu.items;annotationList=MathJax.Hub.Config.semanticsAnnotations;for(var A=0,z=r.length;A0){this.HoverFadeTimer(r,r.hover.inc);return}t.parentNode.removeChild(t);if(s){s.parentNode.removeChild(s)}if(r.hover.remove){clearTimeout(r.hover.remove)}delete r.hover},HoverFadeTimer:function(r,t,s){r.hover.inc=t;if(!r.hover.timer){r.hover.timer=setTimeout(g(["HoverFade",this,r]),(s||p.fadeDelay))}},HoverMenu:function(r){if(!r){r=window.event}return b[this.jax].ContextMenu(r,this.math,true)},ClearHover:function(r){if(r.hover.remove){clearTimeout(r.hover.remove)}if(r.hover.timer){clearTimeout(r.hover.timer)}f.ClearHoverTimer();delete r.hover},Px:function(r){if(Math.abs(r)<0.006){return"0px"}return r.toFixed(2).replace(/\.?0+$/,"")+"px"},getImages:function(){if(k.discoverable){var r=new Image();r.src=p.button.src}}};var a=c.Touch={last:0,delay:500,start:function(s){var r=new Date().getTime();var t=(r-a.last8);var i=(n?null:"5px");var p=c.CombineConfig("MathMenu",{delay:150,closeImg:k.urlRev(b.imageDir+"/CloseX-31.png"),showRenderer:true,showMathPlayer:true,showFontMenu:false,showContext:false,showDiscoverable:false,showLocale:true,showLocaleURL:false,semanticsAnnotations:{TeX:["TeX","LaTeX","application/x-tex"],StarMath:["StarMath 5.0"],Maple:["Maple"],ContentMathML:["MathML-Content","application/mathml-content+xml"],OpenMath:["OpenMath"]},windowSettings:{status:"no",toolbar:"no",locationbar:"no",menubar:"no",directories:"no",personalbar:"no",resizable:"yes",scrollbars:"yes",width:400,height:300,left:Math.round((screen.width-400)/2),top:Math.round((screen.height-300)/3)},styles:{"#MathJax_About":{position:"fixed",left:"50%",width:"auto","text-align":"center",border:"3px outset",padding:"1em 2em","background-color":"#DDDDDD",color:"black",cursor:"default","font-family":"message-box","font-size":"120%","font-style":"normal","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","z-index":201,"border-radius":"15px","-webkit-border-radius":"15px","-moz-border-radius":"15px","-khtml-border-radius":"15px","box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"},".MathJax_Menu":{position:"absolute","background-color":"white",color:"black",width:"auto",padding:(n?"2px":"5px 0px"),border:"1px solid #CCCCCC",margin:0,cursor:"default",font:"menu","text-align":"left","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","z-index":201,"border-radius":i,"-webkit-border-radius":i,"-moz-border-radius":i,"-khtml-border-radius":i,"box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"},".MathJax_MenuItem":{padding:(n?"2px 2em":"1px 2em"),background:"transparent"},".MathJax_MenuArrow":{position:"absolute",right:".5em",color:"#666666","font-family":(l?"'Arial unicode MS'":null)},".MathJax_MenuActive .MathJax_MenuArrow":{color:"white"},".MathJax_MenuArrow.RTL":{left:".5em",right:"auto"},".MathJax_MenuCheck":{position:"absolute",left:".7em","font-family":(l?"'Arial unicode MS'":null)},".MathJax_MenuCheck.RTL":{right:".7em",left:"auto"},".MathJax_MenuRadioCheck":{position:"absolute",left:(n?"1em":".7em")},".MathJax_MenuRadioCheck.RTL":{right:(n?"1em":".7em"),left:"auto"},".MathJax_MenuLabel":{padding:(n?"2px 2em 4px 1.33em":"1px 2em 3px 1.33em"),"font-style":"italic"},".MathJax_MenuRule":{"border-top":(n?"1px solid #CCCCCC":"1px solid #DDDDDD"),margin:(n?"4px 1px 0px":"4px 3px")},".MathJax_MenuDisabled":{color:"GrayText"},".MathJax_MenuActive":{"background-color":(n?"Highlight":"#606872"),color:(n?"HighlightText":"white")},".MathJax_Menu_Close":{position:"absolute",width:"31px",height:"31px",top:"-15px",left:"-15px"}}});var h,d;c.Register.StartupHook("MathEvents Ready",function(){h=MathJax.Extension.MathEvents.Event.False;d=MathJax.Extension.MathEvents.Hover});var a=MathJax.Menu=MathJax.Object.Subclass({version:q,items:[],posted:false,title:null,margin:5,Init:function(r){this.items=[].slice.call(arguments,0)},With:function(r){if(r){c.Insert(this,r)}return this},Post:function(s,C,A){if(!s){s=window.event}var r=document.getElementById("MathJax_MenuFrame");if(!r){r=a.Background(this);delete m.lastItem;delete m.lastMenu;delete a.skipUp;j.Post(["post",a.jax]);a.isRTL=(MathJax.Localization.fontDirection()==="rtl")}var t=g.Element("div",{onmouseup:a.Mouseup,ondblclick:h,ondragstart:h,onselectstart:h,oncontextmenu:h,menuItem:this,className:"MathJax_Menu"});if(!A){MathJax.Localization.setCSS(t)}for(var v=0,u=this.items.length;vdocument.body.offsetWidth-this.margin){B=document.body.offsetWidth-t.offsetWidth-this.margin}if(a.isMobile){B=Math.max(5,B-Math.floor(t.offsetWidth/2));z-=20}a.skipUp=s.isContextMenu}else{var w="left",D=C.offsetWidth;B=(a.isMobile?30:D-2);z=0;while(C&&C!==r){B+=C.offsetLeft;z+=C.offsetTop;C=C.parentNode}if(!a.isMobile){if((a.isRTL&&B-D-t.offsetWidth>this.margin)||(!a.isRTL&&B+t.offsetWidth>document.body.offsetWidth-this.margin)){w="right";B=Math.max(this.margin,B-D-t.offsetWidth+6)}}if(!n){t.style["borderRadiusTop"+w]=0;t.style["WebkitBorderRadiusTop"+w]=0;t.style["MozBorderRadiusTop"+w]=0;t.style["KhtmlBorderRadiusTop"+w]=0}}t.style.left=B+"px";t.style.top=z+"px";if(document.selection&&document.selection.empty){document.selection.empty()}return h(s)},Remove:function(r,s){j.Post(["unpost",a.jax]);var t=document.getElementById("MathJax_MenuFrame");if(t){t.parentNode.removeChild(t);if(this.msieFixedPositionBug){detachEvent("onresize",a.Resize)}}if(a.jax.hover){delete a.jax.hover.nofade;d.UnHover(a.jax)}return h(r)},Find:function(r){return this.FindN(1,r,[].slice.call(arguments,1))},FindId:function(r){return this.FindN(0,r,[].slice.call(arguments,1))},FindN:function(v,s,u){for(var t=0,r=this.items.length;t=0&&x.parentNode.menuItem!==w[r].menuItem){w[r].menuItem.posted=false;w[r].parentNode.removeChild(w[r]);r--}if(this.Timer&&!a.isMobile){this.Timer(v,x)}}},Mouseout:function(r,s){if(!this.menu||!this.menu.posted){this.Deactivate(s)}if(this.timer){clearTimeout(this.timer);delete this.timer}},Mouseup:function(r,s){return this.Remove(r,s)},Touchstart:function(r,s){return this.TouchEvent(r,s,"Mousedown")},Touchend:function(r,s){return this.TouchEvent(r,s,"Mouseup")},TouchEvent:function(s,t,r){if(this!==m.lastItem){if(m.lastMenu){a.Event(s,m.lastMenu,"Mouseout")}a.Event(s,t,"Mouseover",true);m.lastItem=this;m.lastMenu=t}if(this.nativeTouch){return null}a.Event(s,t,r);return false},Remove:function(r,s){s=s.parentNode.menuItem;return s.Remove(r,s)},Activate:function(r){this.Deactivate(r);r.className+=" MathJax_MenuActive"},Deactivate:function(r){r.className=r.className.replace(/ MathJax_MenuActive/,"")},With:function(r){if(r){c.Insert(this,r)}return this},isRTL:function(){return a.isRTL},rtlClass:function(){return(this.isRTL()?" RTL":"")}});a.ITEM.COMMAND=a.ITEM.Subclass({action:function(){},Init:function(r,t,s){if(!(r instanceof Array)){r=[r,r]}this.name=r;this.action=t;this.With(s)},Label:function(r,s){return[this.Name()]},Mouseup:function(r,s){if(!this.disabled){this.Remove(r,s);j.Post(["command",this]);this.action.call(this,r)}return h(r)}});a.ITEM.SUBMENU=a.ITEM.Subclass({menu:null,marker:(n&&!c.Browser.isSafari?"\u25B6":"\u25B8"),markerRTL:(n&&!c.Browser.isSafari?"\u25B0":"\u25C2"),Init:function(r,t){if(!(r instanceof Array)){r=[r,r]}this.name=r;var s=1;if(!(t instanceof a.ITEM)){this.With(t),s++}this.menu=a.apply(a,[].slice.call(arguments,s))},Label:function(r,s){this.menu.posted=false;return[this.Name()+" ",["span",{className:"MathJax_MenuArrow"+this.rtlClass()},[this.isRTL()?this.markerRTL:this.marker]]]},Timer:function(r,s){if(this.timer){clearTimeout(this.timer)}r={clientX:r.clientX,clientY:r.clientY};this.timer=setTimeout(f(["Mouseup",this,r,s]),p.delay)},Touchend:function(s,u){var t=this.menu.posted;var r=this.SUPER(arguments).Touchend.apply(this,arguments);if(t){this.Deactivate(u);delete m.lastItem;delete m.lastMenu}return r},Mouseup:function(s,u){if(!this.disabled){if(!this.menu.posted){if(this.timer){clearTimeout(this.timer);delete this.timer}this.menu.Post(s,u,this.ltr)}else{var t=document.getElementById("MathJax_MenuFrame").childNodes,r=t.length-1;while(r>=0){var v=t[r];v.menuItem.posted=false;v.parentNode.removeChild(v);if(v.menuItem===this.menu){break}r--}}}return h(s)}});a.ITEM.RADIO=a.ITEM.Subclass({variable:null,marker:(n?"\u25CF":"\u2713"),Init:function(s,r,t){if(!(s instanceof Array)){s=[s,s]}this.name=s;this.variable=r;this.With(t);if(this.value==null){this.value=this.name[0]}},Label:function(s,t){var r={className:"MathJax_MenuRadioCheck"+this.rtlClass()};if(p.settings[this.variable]!==this.value){r={style:{display:"none"}}}return[["span",r,[this.marker]]," "+this.Name()]},Mouseup:function(u,v){if(!this.disabled){var w=v.parentNode.childNodes;for(var s=0,r=w.length;s/g,">");var u=o("EqSource","MathJax Equation Source");if(a.isMobile){r.document.open();r.document.write(""+u+"");r.document.write("
"+v+"
");r.document.write("
");r.document.write("");r.document.close()}else{r.document.open();r.document.write(""+u+"");r.document.write("
"+v+"
");r.document.write("");r.document.close();var s=r.document.body.firstChild;setTimeout(function(){var A=(r.outerHeight-r.innerHeight)||30,z=(r.outerWidth-r.innerWidth)||30,w,D;z=Math.max(100,Math.min(Math.floor(0.5*screen.width),s.offsetWidth+z+25));A=Math.max(40,Math.min(Math.floor(0.5*screen.height),s.offsetHeight+A+25));if(a.prototype.msieHeightBug){A+=35}r.resizeTo(z,A);var C;try{C=t.screenX}catch(B){}if(t&&C!=null){w=Math.max(0,Math.min(t.screenX-Math.floor(z/2),screen.width-z-20));D=Math.max(0,Math.min(t.screenY-Math.floor(A/2),screen.height-A-20));r.moveTo(w,D)}},50)}};a.Scale=function(){var s=b["HTML-CSS"],r=b.NativeMML,v=b.SVG;var u=(s||r||v||{config:{scale:100}}).config.scale;var t=prompt(o("ScaleMath","Scale all mathematics (compared to surrounding text) by"),u+"%");if(t){if(t.match(/^\s*\d+(\.\d*)?\s*%?\s*$/)){t=parseFloat(t);if(t){if(t!==u){if(s){s.config.scale=t}if(r){r.config.scale=t}if(v){v.config.scale=t}a.cookie.scale=t;a.saveCookie();c.Reprocess()}}else{alert(o("NonZeroScale","The scale should not be zero"))}}else{alert(o("PercentScale","The scale should be a percentage (e.g., 120%%)"))}}};a.Zoom=function(){if(!MathJax.Extension.MathZoom){k.Require("[MathJax]/extensions/MathZoom.js")}};a.Renderer=function(){var s=c.outputJax["jax/mml"];if(s[0]!==p.settings.renderer){var v=c.Browser,u,r=a.Renderer.Messages,t;switch(p.settings.renderer){case"NativeMML":if(!p.settings.warnedMML){if(v.isChrome&&v.version.substr(0,3)!=="24."){u=r.MML.WebKit}else{if(v.isSafari&&!v.versionAtLeast("5.0")){u=r.MML.WebKit}else{if(v.isMSIE){if(!v.hasMathPlayer){u=r.MML.MSIE}}else{u=r.MML[v]}}}t="warnedMML"}break;case"SVG":if(!p.settings.warnedSVG){if(v.isMSIE&&!e){u=r.SVG.MSIE}}break}if(u){u=o(u[0],u[1]);u+="\n\n";u+=o("SwitchAnyway","Switch the renderer anyway?\n\n(Press OK to switch, CANCEL to continue with the current renderer)");a.cookie.renderer=s[0].id;a.saveCookie();if(!confirm(u)){a.cookie.renderer=p.settings.renderer=g.Cookie.Get("menu").renderer;a.saveCookie();return}if(t){a.cookie.warned=p.settings.warned=true}a.cookie.renderer=p.settings.renderer;a.saveCookie()}c.Queue(["setRenderer",c,p.settings.renderer,"jax/mml"],["Rerender",c])}};a.Renderer.Messages={MML:{WebKit:["WebkitNativeMMLWarning","Your browser doesn't seem to support MathML natively, so switching to MathML output may cause the mathematics on the page to become unreadable."],MSIE:["MSIENativeMMLWarning","Internet Explorer requires the MathPlayer plugin in order to process MathML output."],Opera:["OperaNativeMMLWarning","Opera's support for MathML is limited, so switching to MathML output may cause some expressions to render poorly."],Safari:["SafariNativeMMLWarning","Your browser's native MathML does not implement all the features used by MathJax, so some expressions may not render properly."],Firefox:["FirefoxNativeMMLWarning","Your browser's native MathML does not implement all the features used by MathJax, so some expressions may not render properly."]},SVG:{MSIE:["MSIESVGWarning","SVG is not implemented in Internet Explorer prior to IE9 or when it is emulating IE8 or below. Switching to SVG output will cause the mathematics to not display properly."]}};a.Font=function(){var r=b["HTML-CSS"];if(!r){return}document.location.reload()};a.Locale=function(){MathJax.Localization.setLocale(p.settings.locale);MathJax.Hub.Queue(["Reprocess",MathJax.Hub])};a.LoadLocale=function(){var r=prompt(o("LoadURL","Load translation data from this URL:"));if(r){if(!r.match(/\.js$/)){alert(o("BadURL","The URL should be for a javascript file that defines MathJax translation data. Javascript file names should end with '.js'"))}k.Require(r,function(s){if(s!=k.STATUS.OK){alert(o("BadData","Failed to load translation data from %1",r))}})}};a.MPEvents=function(t){var s=p.settings.discoverable,r=a.MPEvents.Messages;if(!e){if(p.settings.mpMouse&&!confirm(o.apply(o,r.IE8warning))){delete a.cookie.mpContext;delete p.settings.mpContext;delete a.cookie.mpMouse;delete p.settings.mpMouse;a.saveCookie();return}p.settings.mpContext=p.settings.mpMouse;a.cookie.mpContext=a.cookie.mpMouse=p.settings.mpMouse;a.saveCookie();MathJax.Hub.Queue(["Rerender",MathJax.Hub])}else{if(!s&&t.name[1]==="Menu Events"&&p.settings.mpContext){alert(o.apply(o,r.IE9warning))}}};a.MPEvents.Messages={IE8warning:["IE8warning","This will disable the MathJax menu and zoom features, but you can Alt-Click on an expression to obtain the MathJax menu instead.\n\nReally change the MathPlayer settings?"],IE9warning:["IE9warning","The MathJax contextual menu will be disabled, but you can Alt-Click on an expression to obtain the MathJax menu instead."]};c.Browser.Select({MSIE:function(r){var s=(document.compatMode==="BackCompat");var t=r.versionAtLeast("8.0")&&document.documentMode>7;a.Augment({margin:20,msieBackgroundBug:((document.documentMode||0)<9),msieFixedPositionBug:(s||!t),msieAboutBug:s,msieHeightBug:((document.documentMode||0)<9)});if(e){delete p.styles["#MathJax_About"].filter;delete p.styles[".MathJax_Menu"].filter}},Firefox:function(r){a.skipMouseover=r.isMobile&&r.versionAtLeast("6.0");a.skipMousedown=r.isMobile}});a.isMobile=c.Browser.isMobile;a.noContextMenu=c.Browser.noContextMenu;a.CreateLocaleMenu=function(){if(!a.menu){return}var w=a.menu.Find("Language").menu,t=w.items;var s=[],y=MathJax.Localization.strings;for(var x in y){if(y.hasOwnProperty(x)){s.push(x)}}s=s.sort();w.items=[];for(var u=0,r=s.length;ut){z.style.height=t+"px";z.style.width=(x.zW+this.scrollSize)+"px"}if(z.offsetWidth>l){z.style.width=l+"px";z.style.height=(x.zH+this.scrollSize)+"px"}}if(this.operaPositionBug){z.style.width=Math.min(l,x.zW)+"px"}if(z.offsetWidth>m&&z.offsetWidth-m=9);h.msiePositionBug=!m;h.msieSizeBug=l.versionAtLeast("7.0")&&(!document.documentMode||n===7||n===8);h.msieZIndexBug=(n<=7);h.msieInlineBlockAlignBug=(n<=7);h.msieTrapEventBug=!window.addEventListener;if(document.compatMode==="BackCompat"){h.scrollSize=52}if(m){delete i.styles["#MathJax_Zoom"].filter}},Opera:function(l){h.operaPositionBug=true;h.operaRefreshBug=true}});h.topImg=(h.msieInlineBlockAlignBug?d.Element("img",{style:{width:0,height:0,position:"relative"},src:"about:blank"}):d.Element("span",{style:{width:0,height:0,display:"inline-block"}}));if(h.operaPositionBug||h.msieTopBug){h.topImg.style.border="1px solid"}MathJax.Callback.Queue(["StartupHook",MathJax.Hub.Register,"Begin Styles",{}],["Styles",f,i.styles],["Post",a.Startup.signal,"MathZoom Ready"],["loadComplete",f,"[MathJax]/extensions/MathZoom.js"])})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.OutputJax["HTML-CSS"],MathJax.OutputJax.NativeMML); diff --git a/docs/_static/extensions/TeX/AMScd.js b/docs/_static/extensions/TeX/AMScd.js deleted file mode 100644 index 45d9ccd..0000000 --- a/docs/_static/extensions/TeX/AMScd.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/extensions/TeX/AMScd.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Extension["TeX/AMScd"]={version:"2.4.0",config:MathJax.Hub.CombineConfig("TeX.CD",{colspace:"5pt",rowspace:"5pt",harrowsize:"2.75em",varrowsize:"1.75em",hideHorizontalLabels:false})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.ElementJax.mml,e=MathJax.InputJax.TeX,d=e.Stack.Item,c=e.Definitions,a=MathJax.Extension["TeX/AMScd"].config;c.environment.CD="CD_env";c.special["@"]="CD_arrow";c.macros.minCDarrowwidth="CD_minwidth";c.macros.minCDarrowheight="CD_minheight";e.Parse.Augment({CD_env:function(f){this.Push(f);return d.array().With({arraydef:{columnalign:"center",columnspacing:a.colspace,rowspacing:a.rowspace,displaystyle:true},minw:this.stack.env.CD_minw||a.harrowsize,minh:this.stack.env.CD_minh||a.varrowsize})},CD_arrow:function(g){var l=this.string.charAt(this.i);if(!l.match(/[>":"\u2192","<":"\u2190",V:"\u2193",A:"\u2191"}[l];var p=this.GetUpTo(g+l,l),m=this.GetUpTo(g+l,l);if(l===">"||l==="<"){h=b.mo(r).With(f);if(!p){p="\\kern "+o.minw}if(p||m){var j={width:"+11mu",lspace:"6mu"};h=b.munderover(this.mmlToken(h));if(p){p=e.Parse(p,this.stack.env).mml();h.SetData(h.over,b.mpadded(p).With(j).With({voffset:".1em"}))}if(m){m=e.Parse(m,this.stack.env).mml();h.SetData(h.under,b.mpadded(m).With(j))}if(a.hideHorizontalLabels){h=b.mpadded(h).With({depth:0,height:".67em"})}}}else{h=r=this.mmlToken(b.mo(r).With(k));if(p||m){h=b.mrow();if(p){h.Append(e.Parse("\\scriptstyle\\llap{"+p+"}",this.stack.env).mml())}h.Append(r.With({texClass:b.TEXCLASS.ORD}));if(m){h.Append(e.Parse("\\scriptstyle\\rlap{"+m+"}",this.stack.env).mml())}}}}}}if(h){this.Push(h)}this.CD_cell(g)},CD_cell:function(f){var g=this.stack.Top();if((g.table||[]).length%2===0&&(g.row||[]).length===0){this.Push(b.mpadded().With({height:"8.5pt",depth:"2pt"}))}this.Push(d.cell().With({isEntry:true,name:f}))},CD_minwidth:function(f){this.stack.env.CD_minw=this.GetDimen(f)},CD_minheight:function(f){this.stack.env.CD_minh=this.GetDimen(f)}})});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/AMScd.js"); diff --git a/docs/_static/extensions/TeX/AMSmath.js b/docs/_static/extensions/TeX/AMSmath.js deleted file mode 100644 index f059362..0000000 --- a/docs/_static/extensions/TeX/AMSmath.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/extensions/TeX/AMSmath.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Extension["TeX/AMSmath"]={version:"2.4.0",number:0,startNumber:0,IDs:{},eqIDs:{},labels:{},eqlabels:{},refs:[]};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.ElementJax.mml,g=MathJax.InputJax.TeX,f=MathJax.Extension["TeX/AMSmath"];var d=g.Definitions,e=g.Stack.Item,a=g.config.equationNumbers;var c=function(j){var l=[];for(var k=0,h=j.length;k0){o+="rl";m.push("0em 0em");p--}m=m.join(" ");if(h){return this.AMSarray(k,i,h,o,m)}var l=this.Array.call(this,k,null,null,o,m,".5em","D");return this.setArrayAlign(l,j)},EquationBegin:function(h,i){this.checkEqnEnv();this.stack.global.forcetag=(i&&a.autoNumber!=="none");return h},EquationStar:function(h,i){this.stack.global.tagged=true;return i},checkEqnEnv:function(){if(this.stack.global.eqnenv){g.Error(["ErroneousNestingEq","Erroneous nesting of equation structures"])}this.stack.global.eqnenv=true},MultiIntegral:function(h,l){var k=this.GetNext();if(k==="\\"){var j=this.i;k=this.GetArgument(h);this.i=j;if(k==="\\limits"){if(h==="\\idotsint"){l="\\!\\!\\mathop{\\,\\,"+l+"}"}else{l="\\!\\!\\!\\mathop{\\,\\,\\,"+l+"}"}}}this.string=l+" "+this.string.slice(this.i);this.i=0},xArrow:function(j,n,m,h){var k={width:"+"+(m+h)+"mu",lspace:m+"mu"};var o=this.GetBrackets(j),p=this.ParseArg(j);var q=b.mo(b.chars(String.fromCharCode(n))).With({stretchy:true,texClass:b.TEXCLASS.REL});var i=b.munderover(q);i.SetData(i.over,b.mpadded(p).With(k).With({voffset:".15em"}));if(o){o=g.Parse(o,this.stack.env).mml();i.SetData(i.under,b.mpadded(o).With(k).With({voffset:"-.24em"}))}this.Push(i)},GetDelimiterArg:function(h){var i=this.trimSpaces(this.GetArgument(h));if(i==""){return null}if(d.delimiter[i]==null){g.Error(["MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",h])}return this.convertDelimiter(i)},GetStar:function(){var h=(this.GetNext()==="*");if(h){this.i++}return h}});e.Augment({autoTag:function(){var i=this.global;if(!i.notag){f.number++;i.tagID=a.formatNumber(f.number.toString());var h=g.Parse("\\text{"+a.formatTag(i.tagID)+"}",{}).mml();i.tag=b.mtd(h).With({id:a.formatID(i.tagID)})}},getTag:function(){var l=this.global,j=l.tag;l.tagged=true;if(l.label){if(a.useLabelIds){j.id=a.formatID(l.label)}f.eqlabels[l.label]={tag:l.tagID,id:j.id}}if(document.getElementById(j.id)||f.IDs[j.id]||f.eqIDs[j.id]){var k=0,h;do{k++;h=j.id+"_"+k}while(document.getElementById(h)||f.IDs[h]||f.eqIDs[h]);j.id=h;if(l.label){f.eqlabels[l.label].id=h}}f.eqIDs[j.id]=1;this.clearTag();return j},clearTag:function(){var h=this.global;delete h.tag;delete h.tagID;delete h.label},fixInitialMO:function(l){for(var k=0,h=l.length;k0){this.stack[i].Undef(e,f);i--}if(!(h instanceof Array)){h=[h]}if(this.isEqn){h.global=true}}this.stack[i].Def(e,h,f)},Push:function(e){this.stack.push(e);this.top=this.stack.length},Pop:function(){var e;if(this.top>1){e=this.stack[--this.top];if(this.isEqn){this.stack.pop()}}else{if(this.isEqn){this.Clear()}}return e},Find:function(e,g){for(var f=this.top-1;f>=0;f--){var h=this.stack[f].Find(e,g);if(h){return h}}return null},Merge:function(e){e.stack[0].MergeGlobals(this);this.stack[this.top-1].Merge(e.stack[0]);var f=[this.top,this.stack.length-this.top].concat(e.stack.slice(1));this.stack.splice.apply(this.stack,f);this.top=this.stack.length},Reset:function(){this.top=this.stack.length},Clear:function(e){this.stack=[this.stack[0].Clear()];this.top=this.stack.length}},{nsFrame:a});b.Add({macros:{begingroup:"BeginGroup",endgroup:"EndGroup",global:["Extension","newcommand"],gdef:["Extension","newcommand"]}},null,true);d.Parse.Augment({BeginGroup:function(e){d.eqnStack.Push(a())},EndGroup:function(e){if(d.eqnStack.top>1){d.eqnStack.Pop()}else{if(d.rootStack.top===1){d.Error(["ExtraEndMissingBegin","Extra %1 or missing \\begingroup",e])}else{d.eqnStack.Clear();d.rootStack.Pop()}}},csFindMacro:function(e){return(d.eqnStack.Find(e,"macros")||d.rootStack.Find(e,"macros"))},envFindName:function(e){return(d.eqnStack.Find(e,"environments")||d.rootStack.Find(e,"environments"))}});d.rootStack=c();d.eqnStack=c(true);d.prefilterHooks.Add(function(){d.rootStack.Reset();d.eqnStack.Clear(true)});d.postfilterHooks.Add(function(){d.rootStack.Merge(d.eqnStack)});MathJax.Hub.Register.StartupHook("TeX newcommand Ready",function(){b.Add({macros:{global:"Global",gdef:["Macro","\\global\\def"]}},null,true);d.Parse.Augment({setDef:function(e,f){f.isUser=true;d.eqnStack.Def(e,f,"macros",this.stack.env.isGlobal);delete this.stack.env.isGlobal},setEnv:function(e,f){f.isUser=true;d.eqnStack.Def(e,f,"environments")},Global:function(e){var f=this.i;var g=this.GetCSname(e);this.i=f;if(g!=="let"&&g!=="def"&&g!=="newcommand"){d.Error(["GlobalNotFollowedBy","%1 not followed by \\let, \\def, or \\newcommand",e])}this.stack.env.isGlobal=true}})});MathJax.Hub.Startup.signal.Post("TeX begingroup Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/begingroup.js"); diff --git a/docs/_static/extensions/TeX/boldsymbol.js b/docs/_static/extensions/TeX/boldsymbol.js deleted file mode 100644 index 6fcb55f..0000000 --- a/docs/_static/extensions/TeX/boldsymbol.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/extensions/TeX/boldsymbol.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Extension["TeX/boldsymbol"]={version:"2.4.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.ElementJax.mml;var d=MathJax.InputJax.TeX;var b=d.Definitions;var c={};c[a.VARIANT.NORMAL]=a.VARIANT.BOLD;c[a.VARIANT.ITALIC]=a.VARIANT.BOLDITALIC;c[a.VARIANT.FRAKTUR]=a.VARIANT.BOLDFRAKTUR;c[a.VARIANT.SCRIPT]=a.VARIANT.BOLDSCRIPT;c[a.VARIANT.SANSSERIF]=a.VARIANT.BOLDSANSSERIF;c["-tex-caligraphic"]="-tex-caligraphic-bold";c["-tex-oldstyle"]="-tex-oldstyle-bold";b.Add({macros:{boldsymbol:"Boldsymbol"}},null,true);d.Parse.Augment({mmlToken:function(f){if(this.stack.env.boldsymbol){var e=f.Get("mathvariant");if(e==null){f.mathvariant=a.VARIANT.BOLD}else{f.mathvariant=(c[e]||e)}}return f},Boldsymbol:function(h){var e=this.stack.env.boldsymbol,f=this.stack.env.font;this.stack.env.boldsymbol=true;this.stack.env.font=null;var g=this.ParseArg(h);this.stack.env.font=f;this.stack.env.boldsymbol=e;this.Push(g)}});MathJax.Hub.Startup.signal.Post("TeX boldsymbol Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/boldsymbol.js"); diff --git a/docs/_static/extensions/TeX/cancel.js b/docs/_static/extensions/TeX/cancel.js deleted file mode 100644 index 9dc87a7..0000000 --- a/docs/_static/extensions/TeX/cancel.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/extensions/TeX/cancel.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Extension["TeX/cancel"]={version:"2.4.0",ALLOWED:{color:1,mathcolor:1,background:1,mathbackground:1,padding:1,thickness:1}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml,b=MathJax.Extension["TeX/cancel"];b.setAttributes=function(h,e){if(e!==""){e=e.replace(/ /g,"").split(/,/);for(var g=0,d=e.length;g1){this.TEX.Error(["ModelArg2","Color values for the %1 model must be between %2 and %3","rgb",0,1])}d=Math.floor(d*255).toString(16);if(d.length<2){d="0"+d}a+=d}return a},get_RGB:function(b){b=b.replace(/^\s+/,"").replace(/\s+$/,"").split(/\s*,\s*/);var a="#";if(b.length!==3){this.TEX.Error(["ModelArg1","Color values for the %1 model require 3 numbers","RGB"])}for(var c=0;c<3;c++){if(!b[c].match(/^\d+$/)){this.TEX.Error(["InvalidNumber","Invalid number"])}var d=parseInt(b[c]);if(d>255){this.TEX.Error(["ModelArg2","Color values for the %1 model must be between %2 and %3","RGB",0,255])}d=d.toString(16);if(d.length<2){d="0"+d}a+=d}return a},get_gray:function(a){if(!a.match(/^\s*(\d+(\.\d*)?|\.\d+)\s*$/)){this.TEX.Error(["InvalidDecimalNumber","Invalid decimal number"])}var b=parseFloat(a);if(b<0||b>1){this.TEX.Error(["ModelArg2","Color values for the %1 model must be between %2 and %3","gray",0,1])}b=Math.floor(b*255).toString(16);if(b.length<2){b="0"+b}return"#"+b+b+b},get_named:function(a){if(this.colors[a]){return this.colors[a]}return a},padding:function(){var c="+"+this.config.padding;var a=this.config.padding.replace(/^.*?([a-z]*)$/,"$1");var b="+"+(2*parseFloat(c))+a;return{width:b,height:c,depth:c,lspace:this.config.padding}}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var d=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml;var c=d.Stack.Item;var b=MathJax.Extension["TeX/color"];b.TEX=d;d.Definitions.Add({macros:{color:"Color",textcolor:"TextColor",definecolor:"DefineColor",colorbox:"ColorBox",fcolorbox:"fColorBox"}},null,true);d.Parse.Augment({Color:function(h){var g=this.GetBrackets(h),e=this.GetArgument(h);e=b.getColor(g,e);var f=c.style().With({styles:{mathcolor:e}});this.stack.env.color=e;this.Push(f)},TextColor:function(h){var g=this.GetBrackets(h),f=this.GetArgument(h);f=b.getColor(g,f);var e=this.stack.env.color;this.stack.env.color=f;var i=this.ParseArg(h);if(e){this.stack.env.color}else{delete this.stack.env.color}this.Push(a.mstyle(i).With({mathcolor:f}))},DefineColor:function(g){var f=this.GetArgument(g),e=this.GetArgument(g),h=this.GetArgument(g);b.colors[f]=b.getColor(e,h)},ColorBox:function(g){var f=this.GetArgument(g),e=this.InternalMath(this.GetArgument(g));this.Push(a.mpadded.apply(a,e).With({mathbackground:b.getColor("named",f)}).With(b.padding()))},fColorBox:function(g){var h=this.GetArgument(g),f=this.GetArgument(g),e=this.InternalMath(this.GetArgument(g));this.Push(a.mpadded.apply(a,e).With({mathbackground:b.getColor("named",f),style:"border: "+b.config.border+" solid "+b.getColor("named",h)}).With(b.padding()))}});MathJax.Hub.Startup.signal.Post("TeX color Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/color.js"); diff --git a/docs/_static/extensions/TeX/enclose.js b/docs/_static/extensions/TeX/enclose.js deleted file mode 100644 index 43fcf65..0000000 --- a/docs/_static/extensions/TeX/enclose.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/extensions/TeX/enclose.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Extension["TeX/enclose"]={version:"2.4.0",ALLOWED:{arrow:1,color:1,mathcolor:1,background:1,mathbackground:1,padding:1,thickness:1}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml,b=MathJax.Extension["TeX/enclose"].ALLOWED;c.Definitions.Add({macros:{enclose:"Enclose"}},null,true);c.Parse.Augment({Enclose:function(g){var k=this.GetArgument(g),e=this.GetBrackets(g),j=this.ParseArg(g);var l={notation:k.replace(/,/g," ")};if(e){e=e.replace(/ /g,"").split(/,/);for(var h=0,d=e.length;h0){this.selection=Math.min(3,e.scriptlevel+1)}else{this.selection=(e.displaystyle?0:1)}}return this.selection},selected:function(){return this.data[this.choice()]},setTeXclass:function(e){return this.selected().setTeXclass(e)},isSpacelike:function(){return this.selected().isSpacelike()},isEmbellished:function(){return this.selected().isEmbellished()},Core:function(){return this.selected()},CoreMO:function(){return this.selected().CoreMO()},toHTML:function(e){e=this.HTMLcreateSpan(e);e.bbox=this.Core().toHTML(e).bbox;if(e.firstChild&&e.firstChild.style.marginLeft){e.style.marginLeft=e.firstChild.style.marginLeft;e.firstChild.style.marginLeft=""}return e},toSVG:function(){var e=this.Core().toSVG();this.SVGsaveData(e);return e}});MathJax.Hub.Startup.signal.Post("TeX mathchoice Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mathchoice.js"); diff --git a/docs/_static/extensions/TeX/mhchem.js b/docs/_static/extensions/TeX/mhchem.js deleted file mode 100644 index b9f7b72..0000000 --- a/docs/_static/extensions/TeX/mhchem.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/extensions/TeX/mhchem.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Extension["TeX/mhchem"]={version:"2.4.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX;var a=MathJax.Object.Subclass({string:"",i:0,tex:"",atom:false,sup:"",sub:"",Init:function(c){this.string=c},ParseTable:{"-":"Minus","+":"Plus","(":"Open",")":"Close","[":"Open","]":"Close","<":"Less","^":"Superscript",_:"Subscript","*":"Dot",".":"Dot","=":"Equal","#":"Pound","$":"Math","\\":"Macro"," ":"Space"},Arrows:{"->":"rightarrow","<-":"leftarrow","<->":"leftrightarrow","<=>":"rightleftharpoons","<=>>":"Rightleftharpoons","<<=>":"Leftrightharpoons","^":"uparrow",v:"downarrow"},Bonds:{"-":"-","=":"=","#":"\\equiv","~":"\\tripledash","~-":"\\begin{CEstack}{}\\tripledash\\\\-\\end{CEstack}","~=":"\\raise2mu{\\begin{CEstack}{}\\tripledash\\\\-\\\\-\\end{CEstack}}","~--":"\\raise2mu{\\begin{CEstack}{}\\tripledash\\\\-\\\\-\\end{CEstack}}","-~-":"\\raise2mu{\\begin{CEstack}{}-\\\\\\tripledash\\\\-\\end{CEstack}}","...":"{\\cdot}{\\cdot}{\\cdot}","....":"{\\cdot}{\\cdot}{\\cdot}{\\cdot}","->":"\\rightarrow","<-":"\\leftarrow","??":"\\text{??}"},Parse:function(){this.tex="";this.atom=false;while(this.i"){this.i+=2;this.AddArrow("->");return}else{this.tex+="{-}"}}this.i++},ParsePlus:function(d){if(this.atom){this.sup+=d}else{this.FinishAtom();this.tex+=d}this.i++},ParseDot:function(d){this.FinishAtom();this.tex+="\\cdot ";this.i++},ParseEqual:function(d){this.FinishAtom();this.tex+="{=}";this.i++},ParsePound:function(d){this.FinishAtom();this.tex+="{\\equiv}";this.i++},ParseOpen:function(e){this.FinishAtom();var d=this.Match(/^\([v^]\)/);if(d){this.tex+="{\\"+this.Arrows[d.charAt(1)]+"}"}else{this.tex+="{"+e;this.i++}},ParseClose:function(d){this.FinishAtom();this.atom=true;this.tex+=d+"}";this.i++},ParseLess:function(e){this.FinishAtom();var d=this.Match(/^(<->?|<=>>?|<<=>)/);if(!d){this.tex+=e;this.i++}else{this.AddArrow(d)}},ParseSuperscript:function(f){f=this.string.charAt(++this.i);if(f==="{"){this.i++;var d=this.Find("}");if(d==="-."){this.sup+="{-}{\\cdot}"}else{if(d){this.sup+=a(d).Parse().replace(/^\{-\}/,"-")}}}else{if(f===" "||f===""){this.tex+="{\\"+this.Arrows["^"]+"}";this.i++}else{var e=this.Match(/^(\d+|-\.)/);if(e){this.sup+=e}}}},ParseSubscript:function(e){if(this.string.charAt(++this.i)=="{"){this.i++;this.sub+=a(this.Find("}")).Parse().replace(/^\{-\}/,"-")}else{var d=this.Match(/^\d+/);if(d){this.sub+=d}}},ParseMath:function(d){this.FinishAtom();this.i++;this.tex+=this.Find(d)},ParseMacro:function(f){this.FinishAtom();this.i++;var d=this.Match(/^([a-z]+|.)/i)||" ";if(d==="sbond"){this.tex+="{-}"}else{if(d==="dbond"){this.tex+="{=}"}else{if(d==="tbond"){this.tex+="{\\equiv}"}else{if(d==="bond"){var e=(this.Match(/^\{.*?\}/)||"");e=e.substr(1,e.length-2);this.tex+="{"+(this.Bonds[e]||"\\text{??}")+"}"}else{if(d==="{"){this.tex+="{\\{"}else{if(d==="}"){this.tex+="\\}}";this.atom=true}else{this.tex+=f+d}}}}}}},ParseSpace:function(d){this.FinishAtom();this.i++},ParseOther:function(d){this.FinishAtom();this.tex+=d;this.i++},AddArrow:function(e){var g=this.Match(/^[CT]\[/);if(g){this.i--;g=g.charAt(0)}var d=this.GetBracket(g),f=this.GetBracket(g);e=this.Arrows[e];if(d||f){if(f){e+="["+f+"]"}e+="{"+d+"}";e="\\mathrel{\\x"+e+"}"}else{e="\\long"+e+" "}this.tex+=e},FinishAtom:function(){if(this.sup||this.sub){if(this.sup&&this.sub&&!this.atom){var c=this.sup,d=this.sub;if(!c.match(/\d/)){c+="\\vphantom{0}"}if(!d.match(/\d/)){d+="\\vphantom{0}"}this.tex+="\\raise 1pt{\\scriptstyle\\begin{CEscriptstack}"+c+"\\\\"+d+"\\end{CEscriptstack}}\\kern-.125em "}else{if(!this.sup){this.sup="\\Space{0pt}{0pt}{.2em}"}this.tex+="^{"+this.sup+"}_{"+this.sub+"}"}this.sup=this.sub=""}this.atom=false},GetBracket:function(e){if(this.string.charAt(this.i)!=="["){return""}this.i++;var d=this.Find("]");if(e==="C"){d="\\ce{"+d+"}"}else{if(e==="T"){if(!d.match(/^\{.*\}$/)){d="{"+d+"}"}d="\\text"+d}}return d},Match:function(d){var c=d.exec(this.string.substr(this.i));if(c){c=c[0];this.i+=c.length}return c},Find:function(h){var d=this.string.length,e=this.i,g=0;while(this.i0){return[h,g]}else{return h}}}this.i++}b.Error(["MissingReplacementString","Missing replacement string for definition of %1",f])},MacroWithTemplate:function(d,g,h,f){if(h){var c=[];this.GetNext();if(f[0]&&!this.MatchParam(f[0])){b.Error(["MismatchUseDef","Use of %1 doesn't match its definition",d])}for(var e=0;eb.config.MAXMACROS){b.Error(["MaxMacroSub1","MathJax maximum macro substitution count exceeded; is there a recursive macro call?"])}},BeginEnv:function(f,h,c,g){if(g){var d=[];for(var e=0;e1){var n=(q.h+q.d)/2,j=h.TeX.x_height/2;p.parentNode.style.verticalAlign=h.Em(q.d+(j-n));q.h=j+n;q.d=n-j}p.bbox={h:q.h,d:q.d,w:k,lw:0,rw:k};return p}})});b.Register.StartupHook("SVG Jax Config",function(){b.Config({SVG:{styles:{".MathJax_SVG .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("SVG Jax Ready",function(){var g=MathJax.ElementJax.mml;var f=g.math.prototype.toSVG,h=g.merror.prototype.toSVG;g.math.Augment({toSVG:function(i,j){var k=this.data[0];if(k&&k.data[0]&&k.data[0].isError){i=k.data[0].toSVG(i)}else{i=f.call(this,i,j)}return i}});g.merror.Augment({toSVG:function(n){if(!this.isError||this.Parent().type!=="math"){return h.call(this,n)}n=e.addElement(n,"span",{className:"noError",isMathJax:true});if(this.multiLine){n.style.display="inline-block"}var o=this.data[0].data[0].data.join("").split(/\n/);for(var l=0,j=o.length;l1){var k=n.offsetHeight/2;n.style.verticalAlign=(-k+(k/j))+"px"}return n}})});b.Register.StartupHook("NativeMML Jax Ready",function(){var h=MathJax.ElementJax.mml;var g=MathJax.Extension["TeX/noErrors"].config;var f=h.math.prototype.toNativeMML,i=h.merror.prototype.toNativeMML;h.math.Augment({toNativeMML:function(j){var k=this.data[0];if(k&&k.data[0]&&k.data[0].isError){j=k.data[0].toNativeMML(j)}else{j=f.call(this,j)}return j}});h.merror.Augment({toNativeMML:function(n){if(!this.isError){return i.call(this,n)}n=n.appendChild(document.createElement("span"));var o=this.data[0].data[0].data.join("").split(/\n/);for(var l=0,k=o.length;l1){n.style.verticalAlign="middle"}}for(var p in g.style){if(g.style.hasOwnProperty(p)){var j=p.replace(/-./g,function(m){return m.charAt(1).toUpperCase()});n.style[j]=g.style[p]}}return n}})});b.Startup.signal.Post("TeX noErrors Ready")})(MathJax.Hub,MathJax.HTML);MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/noErrors.js"); diff --git a/docs/_static/extensions/TeX/noUndefined.js b/docs/_static/extensions/TeX/noUndefined.js deleted file mode 100644 index 93f32b8..0000000 --- a/docs/_static/extensions/TeX/noUndefined.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/extensions/TeX/noUndefined.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Extension["TeX/noUndefined"]={version:"2.4.0",config:MathJax.Hub.CombineConfig("TeX.noUndefined",{disabled:false,attributes:{mathcolor:"red"}})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.Extension["TeX/noUndefined"].config;var a=MathJax.ElementJax.mml;var c=MathJax.InputJax.TeX.Parse.prototype.csUndefined;MathJax.InputJax.TeX.Parse.Augment({csUndefined:function(d){if(b.disabled){return c.apply(this,arguments)}MathJax.Hub.signal.Post(["TeX Jax - undefined control sequence",d]);this.Push(a.mtext(d).With(b.attributes))}});MathJax.Hub.Startup.signal.Post("TeX noUndefined Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/noUndefined.js"); diff --git a/docs/_static/extensions/TeX/unicode.js b/docs/_static/extensions/TeX/unicode.js deleted file mode 100644 index ed0be87..0000000 --- a/docs/_static/extensions/TeX/unicode.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/extensions/TeX/unicode.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Extension["TeX/unicode"]={version:"2.4.0",unicode:{},config:MathJax.Hub.CombineConfig("TeX.unicode",{fonts:"STIXGeneral,'Arial Unicode MS'"})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX;var a=MathJax.ElementJax.mml;var b=MathJax.Extension["TeX/unicode"].unicode;c.Definitions.Add({macros:{unicode:"Unicode"}},null,true);c.Parse.Augment({Unicode:function(e){var i=this.GetBrackets(e),d;if(i){if(i.replace(/ /g,"").match(/^(\d+(\.\d*)?|\.\d+),(\d+(\.\d*)?|\.\d+)$/)){i=i.replace(/ /g,"").split(/,/);d=this.GetBrackets(e)}else{d=i;i=null}}var j=this.trimSpaces(this.GetArgument(e)),h=parseInt(j.match(/^x/)?"0"+j:j);if(!b[h]){b[h]=[800,200,d,h]}else{if(!d){d=b[h][2]}}if(i){b[h][0]=Math.floor(i[0]*1000);b[h][1]=Math.floor(i[1]*1000)}var f=this.stack.env.font,g={};if(d){b[h][2]=g.fontfamily=d.replace(/"/g,"'");if(f){if(f.match(/bold/)){g.fontweight="bold"}if(f.match(/italic|-mathit/)){g.fontstyle="italic"}}}else{if(f){g.mathvariant=f}}g.unicode=[].concat(b[h]);this.Push(a.mtext(a.entity("#"+j)).With(g))}});MathJax.Hub.Startup.signal.Post("TeX unicode Ready")});MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.Extension["TeX/unicode"].config.fonts;var b=a.mbase.prototype.HTMLgetVariant;a.mbase.Augment({HTMLgetVariant:function(){var d=b.call(this);if(d.unicode){delete d.unicode;delete d.FONTS}if(!this.unicode){return d}d.unicode=true;if(!d.defaultFont){d=MathJax.Hub.Insert({},d);d.defaultFont={family:c}}var e=this.unicode[2];if(e){e+=","+c}else{e=c}d.defaultFont[this.unicode[3]]=[this.unicode[0],this.unicode[1],500,0,500,{isUnknown:true,isUnicode:true,font:e}];return d}})});MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.Extension["TeX/unicode"].config.fonts;var b=a.mbase.prototype.SVGgetVariant;a.mbase.Augment({SVGgetVariant:function(){var d=b.call(this);if(d.unicode){delete d.unicode;delete d.FONTS}if(!this.unicode){return d}d.unicode=true;if(!d.forceFamily){d=MathJax.Hub.Insert({},d)}d.defaultFamily=c;d.noRemap=true;d.h=this.unicode[0];d.d=this.unicode[1];return d}})});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/unicode.js"); diff --git a/docs/_static/extensions/TeX/verb.js b/docs/_static/extensions/TeX/verb.js deleted file mode 100644 index 4fd4c02..0000000 --- a/docs/_static/extensions/TeX/verb.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/extensions/TeX/verb.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Extension["TeX/verb"]={version:"2.4.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.InputJax.TeX;var b=c.Definitions;b.Add({macros:{verb:"Verb"}},null,true);c.Parse.Augment({Verb:function(d){var g=this.GetNext();var f=++this.i;if(g==""){c.Error(["MissingArgFor","Missing argument for %1",d])}while(this.i0)},patternQuote:function(a){return a.replace(/([\^$(){}+*?\-|\[\]\:\\])/g,"\\$1")},endPattern:function(a){return new RegExp(this.patternQuote(a)+"|\\\\.|[{}]","g")},sortLength:function(d,c){if(d.length!==c.length){return c.length-d.length}return(d==c?0:(d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Bold.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Bold.svg deleted file mode 100644 index edd4a15..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Bold.svg +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Regular.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Regular.svg deleted file mode 100644 index e54a72c..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Regular.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Bold.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Bold.svg deleted file mode 100644 index d1c469b..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Bold.svg +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Regular.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Regular.svg deleted file mode 100644 index 1cbd94f..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Regular.svg +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Main-Bold.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Main-Bold.svg deleted file mode 100644 index 7579531..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Main-Bold.svg +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Main-Italic.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Main-Italic.svg deleted file mode 100644 index 93849a8..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Main-Italic.svg +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Main-Regular.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Main-Regular.svg deleted file mode 100644 index 9c257bb..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Main-Regular.svg +++ /dev/null @@ -1,659 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Math-BoldItalic.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Math-BoldItalic.svg deleted file mode 100644 index 6a10532..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Math-BoldItalic.svg +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Math-Italic.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Math-Italic.svg deleted file mode 100644 index 4741efd..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Math-Italic.svg +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Math-Regular.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Math-Regular.svg deleted file mode 100644 index e05eeed..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Math-Regular.svg +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Bold.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Bold.svg deleted file mode 100644 index fc549da..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Bold.svg +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Italic.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Italic.svg deleted file mode 100644 index 782aa1b..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Italic.svg +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Regular.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Regular.svg deleted file mode 100644 index 17cf6f1..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Regular.svg +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Script-Regular.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Script-Regular.svg deleted file mode 100644 index d83a7bc..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Script-Regular.svg +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Size1-Regular.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Size1-Regular.svg deleted file mode 100644 index 6634725..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Size1-Regular.svg +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Size2-Regular.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Size2-Regular.svg deleted file mode 100644 index d3148ab..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Size2-Regular.svg +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Size3-Regular.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Size3-Regular.svg deleted file mode 100644 index a33e4ce..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Size3-Regular.svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Size4-Regular.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Size4-Regular.svg deleted file mode 100644 index 081f4a2..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Size4-Regular.svg +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Typewriter-Regular.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Typewriter-Regular.svg deleted file mode 100644 index deb15f0..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_Typewriter-Regular.svg +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_WinChrome-Regular.svg b/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_WinChrome-Regular.svg deleted file mode 100644 index 1669056..0000000 --- a/docs/_static/fonts/HTML-CSS/TeX/svg/MathJax_WinChrome-Regular.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff deleted file mode 100644 index 7aff423..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff deleted file mode 100644 index 8f7552f..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff deleted file mode 100644 index dcb26bb..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff deleted file mode 100644 index 5c3c076..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff deleted file mode 100644 index 4f8ea15..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff deleted file mode 100644 index f6e65a5..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff deleted file mode 100644 index f143cbb..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff deleted file mode 100644 index 863f97d..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff deleted file mode 100644 index 665421e..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff deleted file mode 100644 index a1c3ce3..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff deleted file mode 100644 index b7d94b0..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff deleted file mode 100644 index 3276cda..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff deleted file mode 100644 index 262b5dd..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff deleted file mode 100644 index bd8891a..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff deleted file mode 100644 index e26e10b..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff deleted file mode 100644 index 91132d2..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff deleted file mode 100644 index dabf024..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff deleted file mode 100644 index b96e627..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff deleted file mode 100644 index ddb3f5d..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff and /dev/null differ diff --git a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff b/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff deleted file mode 100644 index b060489..0000000 Binary files a/docs/_static/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff and /dev/null differ diff --git a/docs/_static/jax/element/mml/jax.js b/docs/_static/jax/element/mml/jax.js deleted file mode 100644 index 351f85f..0000000 --- a/docs/_static/jax/element/mml/jax.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/jax.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.ElementJax.mml=MathJax.ElementJax({mimeType:"jax/mml"},{id:"mml",version:"2.4.0",directory:MathJax.ElementJax.directory+"/mml",extensionDir:MathJax.ElementJax.extensionDir+"/mml",optableDir:MathJax.ElementJax.directory+"/mml/optable"});MathJax.ElementJax.mml.Augment({Init:function(){if(arguments.length===1&&arguments[0].type==="math"){this.root=arguments[0]}else{this.root=MathJax.ElementJax.mml.math.apply(this,arguments)}if(this.root.attr&&this.root.attr.mode){if(!this.root.display&&this.root.attr.mode==="display"){this.root.display="block";this.root.attrNames.push("display")}delete this.root.attr.mode;for(var b=0,a=this.root.attrNames.length;b0&&this.Get("scriptlevel")>0&&g>=0){return""}return this.TEXSPACELENGTH[Math.abs(g)]},TEXSPACELENGTH:["",a.LENGTH.THINMATHSPACE,a.LENGTH.MEDIUMMATHSPACE,a.LENGTH.THICKMATHSPACE],TEXSPACE:[[0,-1,2,3,0,0,0,1],[-1,-1,0,3,0,0,0,1],[2,2,0,0,2,0,0,2],[3,3,0,0,3,0,0,3],[0,0,0,0,0,0,0,0],[0,-1,2,3,0,0,0,1],[1,1,0,1,1,1,1,1],[1,-1,2,3,1,0,1,1]],autoDefault:function(e){return""},isSpacelike:function(){return false},isEmbellished:function(){return false},Core:function(){return this},CoreMO:function(){return this},hasNewline:function(){if(this.isEmbellished()){return this.CoreMO().hasNewline()}if(this.isToken||this.linebreakContainer){return false}for(var f=0,e=this.data.length;f=55296&&e.charCodeAt(0)<56320)?a.VARIANT.ITALIC:a.VARIANT.NORMAL)}return""},setTeXclass:function(f){this.getPrevClass(f);var e=this.data.join("");if(e.length>1&&e.match(/^[a-z][a-z0-9]*$/i)&&this.texClass===a.TEXCLASS.ORD){this.texClass=a.TEXCLASS.OP;this.autoOP=true}return this}});a.mn=a.mbase.Subclass({type:"mn",isToken:true,texClass:a.TEXCLASS.ORD,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT}});a.mo=a.mbase.Subclass({type:"mo",isToken:true,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT,form:a.AUTO,fence:a.AUTO,separator:a.AUTO,lspace:a.AUTO,rspace:a.AUTO,stretchy:a.AUTO,symmetric:a.AUTO,maxsize:a.AUTO,minsize:a.AUTO,largeop:a.AUTO,movablelimits:a.AUTO,accent:a.AUTO,linebreak:a.LINEBREAK.AUTO,lineleading:a.INHERIT,linebreakstyle:a.AUTO,linebreakmultchar:a.INHERIT,indentalign:a.INHERIT,indentshift:a.INHERIT,indenttarget:a.INHERIT,indentalignfirst:a.INHERIT,indentshiftfirst:a.INHERIT,indentalignlast:a.INHERIT,indentshiftlast:a.INHERIT,texClass:a.AUTO},defaultDef:{form:a.FORM.INFIX,fence:false,separator:false,lspace:a.LENGTH.THICKMATHSPACE,rspace:a.LENGTH.THICKMATHSPACE,stretchy:false,symmetric:false,maxsize:a.SIZE.INFINITY,minsize:"0em",largeop:false,movablelimits:false,accent:false,linebreak:a.LINEBREAK.AUTO,lineleading:"1ex",linebreakstyle:"before",indentalign:a.INDENTALIGN.AUTO,indentshift:"0",indenttarget:"",indentalignfirst:a.INDENTALIGN.INDENTALIGN,indentshiftfirst:a.INDENTSHIFT.INDENTSHIFT,indentalignlast:a.INDENTALIGN.INDENTALIGN,indentshiftlast:a.INDENTSHIFT.INDENTSHIFT,texClass:a.TEXCLASS.REL},SPACE_ATTR:{lspace:1,rspace:2,form:4},useMMLspacing:7,autoDefault:function(g,n){var l=this.def;if(!l){if(g==="form"){this.useMMLspacing&=~this.SPACE_ATTR.form;return this.getForm()}var k=this.data.join("");var f=[this.Get("form"),a.FORM.INFIX,a.FORM.POSTFIX,a.FORM.PREFIX];for(var h=0,e=f.length;h=55296&&k<56320){k=(((k-55296)<<10)+(j.charCodeAt(1)-56320))+65536}for(var g=0,e=this.RANGES.length;g=0;e--){if(this.data[0]&&!this.data[e].isSpacelike()){return this.data[e]}}return null},Core:function(){if(!(this.isEmbellished())||typeof(this.core)==="undefined"){return this}return this.data[this.core]},CoreMO:function(){if(!(this.isEmbellished())||typeof(this.core)==="undefined"){return this}return this.data[this.core].CoreMO()},toString:function(){if(this.inferred){return"["+this.data.join(",")+"]"}return this.SUPER(arguments).toString.call(this)},setTeXclass:function(g){var f,e=this.data.length;if((this.open||this.close)&&(!g||!g.fnOP)){this.getPrevClass(g);for(f=0;f0){e++}return e},adjustChild_texprimestyle:function(e){if(e==this.den){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setSeparateTeXclasses});a.msqrt=a.mbase.Subclass({type:"msqrt",inferRow:true,linebreakContainer:true,texClass:a.TEXCLASS.ORD,setTeXclass:a.mbase.setSeparateTeXclasses,adjustChild_texprimestyle:function(e){return true}});a.mroot=a.mbase.Subclass({type:"mroot",linebreakContainer:true,texClass:a.TEXCLASS.ORD,adjustChild_displaystyle:function(e){if(e===1){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(f){var e=this.Get("scriptlevel");if(f===1){e+=2}return e},adjustChild_texprimestyle:function(e){if(e===0){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setSeparateTeXclasses});a.mstyle=a.mbase.Subclass({type:"mstyle",isSpacelike:a.mbase.childrenSpacelike,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,inferRow:true,defaults:{scriptlevel:a.INHERIT,displaystyle:a.INHERIT,scriptsizemultiplier:Math.sqrt(1/2),scriptminsize:"8pt",mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT,infixlinebreakstyle:a.LINEBREAKSTYLE.BEFORE,decimalseparator:"."},adjustChild_scriptlevel:function(g){var f=this.scriptlevel;if(f==null){f=this.Get("scriptlevel")}else{if(String(f).match(/^ *[-+]/)){delete this.scriptlevel;var e=this.Get("scriptlevel");this.scriptlevel=f;f=e+parseInt(f)}}return f},inheritFromMe:true,noInherit:{mpadded:{width:true,height:true,depth:true,lspace:true,voffset:true},mtable:{width:true,height:true,depth:true,align:true}},setTeXclass:a.mbase.setChildTeXclass});a.merror=a.mbase.Subclass({type:"merror",inferRow:true,linebreakContainer:true,texClass:a.TEXCLASS.ORD});a.mpadded=a.mbase.Subclass({type:"mpadded",inferRow:true,isSpacelike:a.mbase.childrenSpacelike,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,width:"",height:"",depth:"",lspace:0,voffset:0},setTeXclass:a.mbase.setChildTeXclass});a.mphantom=a.mbase.Subclass({type:"mphantom",texClass:a.TEXCLASS.ORD,inferRow:true,isSpacelike:a.mbase.childrenSpacelike,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,setTeXclass:a.mbase.setChildTeXclass});a.mfenced=a.mbase.Subclass({type:"mfenced",defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,open:"(",close:")",separators:","},texClass:a.TEXCLASS.OPEN,setTeXclass:function(h){this.getPrevClass(h);var f=this.getValues("open","close","separators");f.open=f.open.replace(/[ \t\n\r]/g,"");f.close=f.close.replace(/[ \t\n\r]/g,"");f.separators=f.separators.replace(/[ \t\n\r]/g,"");if(f.open!==""){this.SetData("open",a.mo(f.open).With({fence:true,form:a.FORM.PREFIX,texClass:a.TEXCLASS.OPEN}));this.data.open.useMMLspacing&=~this.data.open.SPACE_ATTR.form;h=this.data.open.setTeXclass(h)}if(f.separators!==""){while(f.separators.length0){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(f){var e=this.Get("scriptlevel");if(f>0){e++}return e},adjustChild_texprimestyle:function(e){if(e===this.sub){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setBaseTeXclasses});a.msub=a.msubsup.Subclass({type:"msub"});a.msup=a.msubsup.Subclass({type:"msup",sub:2,sup:1});a.mmultiscripts=a.msubsup.Subclass({type:"mmultiscripts",adjustChild_texprimestyle:function(e){if(e%2===1){return true}return this.Get("texprimestyle")}});a.mprescripts=a.mbase.Subclass({type:"mprescripts"});a.none=a.mbase.Subclass({type:"none"});a.munderover=a.mbase.Subclass({type:"munderover",base:0,under:1,over:2,sub:1,sup:2,ACCENTS:["","accentunder","accent"],linebreakContainer:true,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,accent:a.AUTO,accentunder:a.AUTO,align:a.ALIGN.CENTER,texClass:a.AUTO,subscriptshift:"",superscriptshift:""},autoDefault:function(e){if(e==="texClass"){return(this.isEmbellished()?this.CoreMO().Get(e):a.TEXCLASS.ORD)}if(e==="accent"&&this.data[this.over]){return this.data[this.over].CoreMO().Get("accent")}if(e==="accentunder"&&this.data[this.under]){return this.data[this.under].CoreMO().Get("accent")}return false},adjustChild_displaystyle:function(e){if(e>0){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(g){var f=this.Get("scriptlevel");var e=(this.data[this.base]&&!this.Get("displaystyle")&&this.data[this.base].CoreMO().Get("movablelimits"));if(g==this.under&&(e||!this.Get("accentunder"))){f++}if(g==this.over&&(e||!this.Get("accent"))){f++}return f},adjustChild_texprimestyle:function(e){if(e===this.base&&this.data[this.over]){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setBaseTeXclasses});a.munder=a.munderover.Subclass({type:"munder"});a.mover=a.munderover.Subclass({type:"mover",over:1,under:2,sup:1,sub:2,ACCENTS:["","accent","accentunder"]});a.mtable=a.mbase.Subclass({type:"mtable",defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,align:a.ALIGN.AXIS,rowalign:a.ALIGN.BASELINE,columnalign:a.ALIGN.CENTER,groupalign:"{left}",alignmentscope:true,columnwidth:a.WIDTH.AUTO,width:a.WIDTH.AUTO,rowspacing:"1ex",columnspacing:".8em",rowlines:a.LINES.NONE,columnlines:a.LINES.NONE,frame:a.LINES.NONE,framespacing:"0.4em 0.5ex",equalrows:false,equalcolumns:false,displaystyle:false,side:a.SIDE.RIGHT,minlabelspacing:"0.8em",texClass:a.TEXCLASS.ORD,useHeight:1},inheritFromMe:true,noInherit:{mover:{align:true},munder:{align:true},munderover:{align:true},mtable:{align:true,rowalign:true,columnalign:true,groupalign:true,alignmentscope:true,columnwidth:true,width:true,rowspacing:true,columnspacing:true,rowlines:true,columnlines:true,frame:true,framespacing:true,equalrows:true,equalcolumns:true,side:true,minlabelspacing:true,texClass:true,useHeight:1}},linebreakContainer:true,Append:function(){for(var f=0,e=arguments.length;f>10)+55296)+String.fromCharCode((e&1023)+56320)}});a.xml=a.mbase.Subclass({type:"xml",Init:function(){this.div=document.createElement("div");return this.SUPER(arguments).Init.apply(this,arguments)},Append:function(){for(var f=0,e=arguments.length;f":d.REL,"?":[1,1,b.CLOSE],"\\":d.ORD,"^":d.ORD11,_:d.ORD11,"|":[2,2,b.ORD,{fence:true,stretchy:true,symmetric:true}],"#":d.ORD,"$":d.ORD,"\u002E":[0,3,b.PUNCT,{separator:true}],"\u02B9":d.ORD,"\u0300":d.ACCENT,"\u0301":d.ACCENT,"\u0303":d.WIDEACCENT,"\u0304":d.ACCENT,"\u0306":d.ACCENT,"\u0307":d.ACCENT,"\u0308":d.ACCENT,"\u030C":d.ACCENT,"\u0332":d.WIDEACCENT,"\u0338":d.REL4,"\u2015":[0,0,b.ORD,{stretchy:true}],"\u2017":[0,0,b.ORD,{stretchy:true}],"\u2020":d.BIN3,"\u2021":d.BIN3,"\u20D7":d.ACCENT,"\u2111":d.ORD,"\u2113":d.ORD,"\u2118":d.ORD,"\u211C":d.ORD,"\u2205":d.ORD,"\u221E":d.ORD,"\u2305":d.BIN3,"\u2306":d.BIN3,"\u2322":d.REL4,"\u2323":d.REL4,"\u2329":d.OPEN,"\u232A":d.CLOSE,"\u23AA":d.ORD,"\u23AF":[0,0,b.ORD,{stretchy:true}],"\u23B0":d.OPEN,"\u23B1":d.CLOSE,"\u2500":d.ORD,"\u25EF":d.BIN3,"\u2660":d.ORD,"\u2661":d.ORD,"\u2662":d.ORD,"\u2663":d.ORD,"\u3008":d.OPEN,"\u3009":d.CLOSE,"\uFE37":d.WIDEACCENT,"\uFE38":d.WIDEACCENT}}},{OPTYPES:d});var c=a.mo.prototype.OPTABLE;c.infix["^"]=d.WIDEREL;c.infix._=d.WIDEREL;c.prefix["\u2223"]=d.OPEN;c.prefix["\u2225"]=d.OPEN;c.postfix["\u2223"]=d.CLOSE;c.postfix["\u2225"]=d.CLOSE})(MathJax.ElementJax.mml);MathJax.ElementJax.mml.loadComplete("jax.js"); diff --git a/docs/_static/jax/element/mml/optable/Arrows.js b/docs/_static/jax/element/mml/optable/Arrows.js deleted file mode 100644 index 8714801..0000000 --- a/docs/_static/jax/element/mml/optable/Arrows.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/Arrows.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u219A":c.RELACCENT,"\u219B":c.RELACCENT,"\u219C":c.WIDEREL,"\u219D":c.WIDEREL,"\u219E":c.WIDEREL,"\u219F":c.WIDEREL,"\u21A0":c.WIDEREL,"\u21A1":c.RELSTRETCH,"\u21A2":c.WIDEREL,"\u21A3":c.WIDEREL,"\u21A4":c.WIDEREL,"\u21A5":c.RELSTRETCH,"\u21A7":c.RELSTRETCH,"\u21A8":c.RELSTRETCH,"\u21AB":c.WIDEREL,"\u21AC":c.WIDEREL,"\u21AD":c.WIDEREL,"\u21AE":c.RELACCENT,"\u21AF":c.RELSTRETCH,"\u21B0":c.RELSTRETCH,"\u21B1":c.RELSTRETCH,"\u21B2":c.RELSTRETCH,"\u21B3":c.RELSTRETCH,"\u21B4":c.RELSTRETCH,"\u21B5":c.RELSTRETCH,"\u21B6":c.RELACCENT,"\u21B7":c.RELACCENT,"\u21B8":c.REL,"\u21B9":c.WIDEREL,"\u21BA":c.REL,"\u21BB":c.REL,"\u21BE":c.RELSTRETCH,"\u21BF":c.RELSTRETCH,"\u21C2":c.RELSTRETCH,"\u21C3":c.RELSTRETCH,"\u21C4":c.WIDEREL,"\u21C5":c.RELSTRETCH,"\u21C6":c.WIDEREL,"\u21C7":c.WIDEREL,"\u21C8":c.RELSTRETCH,"\u21C9":c.WIDEREL,"\u21CA":c.RELSTRETCH,"\u21CB":c.WIDEREL,"\u21CD":c.RELACCENT,"\u21CE":c.RELACCENT,"\u21CF":c.RELACCENT,"\u21D6":c.RELSTRETCH,"\u21D7":c.RELSTRETCH,"\u21D8":c.RELSTRETCH,"\u21D9":c.RELSTRETCH,"\u21DA":c.WIDEREL,"\u21DB":c.WIDEREL,"\u21DC":c.WIDEREL,"\u21DD":c.WIDEREL,"\u21DE":c.REL,"\u21DF":c.REL,"\u21E0":c.WIDEREL,"\u21E1":c.RELSTRETCH,"\u21E2":c.WIDEREL,"\u21E3":c.RELSTRETCH,"\u21E4":c.WIDEREL,"\u21E5":c.WIDEREL,"\u21E6":c.WIDEREL,"\u21E7":c.RELSTRETCH,"\u21E8":c.WIDEREL,"\u21E9":c.RELSTRETCH,"\u21EA":c.RELSTRETCH,"\u21EB":c.RELSTRETCH,"\u21EC":c.RELSTRETCH,"\u21ED":c.RELSTRETCH,"\u21EE":c.RELSTRETCH,"\u21EF":c.RELSTRETCH,"\u21F0":c.WIDEREL,"\u21F1":c.REL,"\u21F2":c.REL,"\u21F3":c.RELSTRETCH,"\u21F4":c.RELACCENT,"\u21F5":c.RELSTRETCH,"\u21F6":c.WIDEREL,"\u21F7":c.RELACCENT,"\u21F8":c.RELACCENT,"\u21F9":c.RELACCENT,"\u21FA":c.RELACCENT,"\u21FB":c.RELACCENT,"\u21FC":c.RELACCENT,"\u21FD":c.WIDEREL,"\u21FE":c.WIDEREL,"\u21FF":c.WIDEREL}}});MathJax.Ajax.loadComplete(a.optableDir+"/Arrows.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/BasicLatin.js b/docs/_static/jax/element/mml/optable/BasicLatin.js deleted file mode 100644 index 3b733d0..0000000 --- a/docs/_static/jax/element/mml/optable/BasicLatin.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/BasicLatin.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"||":[0,0,b.BIN,{fence:true,stretchy:true,symmetric:true}],"|||":[0,0,b.ORD,{fence:true,stretchy:true,symmetric:true}]},postfix:{"!!":[1,0,b.BIN],"'":c.ACCENT,"++":[0,0,b.BIN],"--":[0,0,b.BIN],"..":[0,0,b.BIN],"...":c.ORD,"||":[0,0,b.BIN,{fence:true,stretchy:true,symmetric:true}],"|||":[0,0,b.ORD,{fence:true,stretchy:true,symmetric:true}]},infix:{"!=":c.BIN4,"&&":c.BIN4,"**":[1,1,b.BIN],"*=":c.BIN4,"+=":c.BIN4,"-=":c.BIN4,"->":c.BIN5,"//":[1,1,b.BIN],"/=":c.BIN4,":=":c.BIN4,"<=":c.BIN5,"<>":[1,1,b.BIN],"==":c.BIN4,">=":c.BIN5,"@":c.ORD11,"||":[2,2,b.BIN,{fence:true,stretchy:true,symmetric:true}],"|||":[2,2,b.ORD,{fence:true,stretchy:true,symmetric:true}]}}});MathJax.Ajax.loadComplete(a.optableDir+"/BasicLatin.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/CombDiacritMarks.js b/docs/_static/jax/element/mml/optable/CombDiacritMarks.js deleted file mode 100644 index 7e2988a..0000000 --- a/docs/_static/jax/element/mml/optable/CombDiacritMarks.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/CombDiacritMarks.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u0311":c.ACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/CombDiacritMarks.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/CombDiactForSymbols.js b/docs/_static/jax/element/mml/optable/CombDiactForSymbols.js deleted file mode 100644 index 7c97b4b..0000000 --- a/docs/_static/jax/element/mml/optable/CombDiactForSymbols.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/CombDiactForSymbols.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u20DB":c.ACCENT,"\u20DC":c.ACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/CombDiactForSymbols.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/Dingbats.js b/docs/_static/jax/element/mml/optable/Dingbats.js deleted file mode 100644 index 63ac532..0000000 --- a/docs/_static/jax/element/mml/optable/Dingbats.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/Dingbats.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2772":c.OPEN},postfix:{"\u2773":c.CLOSE}}});MathJax.Ajax.loadComplete(a.optableDir+"/Dingbats.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/GeneralPunctuation.js b/docs/_static/jax/element/mml/optable/GeneralPunctuation.js deleted file mode 100644 index 6f05a87..0000000 --- a/docs/_static/jax/element/mml/optable/GeneralPunctuation.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/GeneralPunctuation.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2016":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2018":[0,0,b.OPEN,{fence:true}],"\u201C":[0,0,b.OPEN,{fence:true}]},postfix:{"\u2016":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2019":[0,0,b.CLOSE,{fence:true}],"\u201D":[0,0,b.CLOSE,{fence:true}]}}});MathJax.Ajax.loadComplete(a.optableDir+"/GeneralPunctuation.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/GeometricShapes.js b/docs/_static/jax/element/mml/optable/GeometricShapes.js deleted file mode 100644 index 08a71db..0000000 --- a/docs/_static/jax/element/mml/optable/GeometricShapes.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/GeometricShapes.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u25A0":c.BIN3,"\u25A1":c.BIN3,"\u25AA":c.BIN3,"\u25AB":c.BIN3,"\u25AD":c.BIN3,"\u25AE":c.BIN3,"\u25AF":c.BIN3,"\u25B0":c.BIN3,"\u25B1":c.BIN3,"\u25B2":c.BIN4,"\u25B4":c.BIN4,"\u25B6":c.BIN4,"\u25B7":c.BIN4,"\u25B8":c.BIN4,"\u25BC":c.BIN4,"\u25BE":c.BIN4,"\u25C0":c.BIN4,"\u25C1":c.BIN4,"\u25C2":c.BIN4,"\u25C4":c.BIN4,"\u25C5":c.BIN4,"\u25C6":c.BIN4,"\u25C7":c.BIN4,"\u25C8":c.BIN4,"\u25C9":c.BIN4,"\u25CC":c.BIN4,"\u25CD":c.BIN4,"\u25CE":c.BIN4,"\u25CF":c.BIN4,"\u25D6":c.BIN4,"\u25D7":c.BIN4,"\u25E6":c.BIN4}}});MathJax.Ajax.loadComplete(a.optableDir+"/GeometricShapes.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/GreekAndCoptic.js b/docs/_static/jax/element/mml/optable/GreekAndCoptic.js deleted file mode 100644 index e6eb8da..0000000 --- a/docs/_static/jax/element/mml/optable/GreekAndCoptic.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/GreekAndCoptic.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u03F6":c.REL}}});MathJax.Ajax.loadComplete(a.optableDir+"/GreekAndCoptic.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/Latin1Supplement.js b/docs/_static/jax/element/mml/optable/Latin1Supplement.js deleted file mode 100644 index de4d14b..0000000 --- a/docs/_static/jax/element/mml/optable/Latin1Supplement.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/Latin1Supplement.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u00B0":c.ORD,"\u00B4":c.ACCENT,"\u00B8":c.ACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/Latin1Supplement.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/LetterlikeSymbols.js b/docs/_static/jax/element/mml/optable/LetterlikeSymbols.js deleted file mode 100644 index 97fc212..0000000 --- a/docs/_static/jax/element/mml/optable/LetterlikeSymbols.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/LetterlikeSymbols.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2145":c.ORD21,"\u2146":[2,0,b.ORD]}}});MathJax.Ajax.loadComplete(a.optableDir+"/LetterlikeSymbols.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/MathOperators.js b/docs/_static/jax/element/mml/optable/MathOperators.js deleted file mode 100644 index 850906a..0000000 --- a/docs/_static/jax/element/mml/optable/MathOperators.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/MathOperators.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2204":c.ORD21,"\u221B":c.ORD11,"\u221C":c.ORD11,"\u2221":c.ORD,"\u2222":c.ORD,"\u222C":c.INTEGRAL,"\u222D":c.INTEGRAL,"\u222F":c.INTEGRAL,"\u2230":c.INTEGRAL,"\u2231":c.INTEGRAL,"\u2232":c.INTEGRAL,"\u2233":c.INTEGRAL},infix:{"\u2201":[1,2,b.ORD],"\u2206":c.BIN3,"\u220A":c.REL,"\u220C":c.REL,"\u220D":c.REL,"\u220E":c.BIN3,"\u2214":c.BIN4,"\u221F":c.REL,"\u2224":c.REL,"\u2226":c.REL,"\u2234":c.REL,"\u2235":c.REL,"\u2236":c.REL,"\u2237":c.REL,"\u2238":c.BIN4,"\u2239":c.REL,"\u223A":c.BIN4,"\u223B":c.REL,"\u223D":c.REL,"\u223D\u0331":c.BIN3,"\u223E":c.REL,"\u223F":c.BIN3,"\u2241":c.REL,"\u2242":c.REL,"\u2242\u0338":c.REL,"\u2244":c.REL,"\u2246":c.REL,"\u2247":c.REL,"\u2249":c.REL,"\u224A":c.REL,"\u224B":c.REL,"\u224C":c.REL,"\u224E":c.REL,"\u224E\u0338":c.REL,"\u224F":c.REL,"\u224F\u0338":c.REL,"\u2251":c.REL,"\u2252":c.REL,"\u2253":c.REL,"\u2254":c.REL,"\u2255":c.REL,"\u2256":c.REL,"\u2257":c.REL,"\u2258":c.REL,"\u2259":c.REL,"\u225A":c.REL,"\u225C":c.REL,"\u225D":c.REL,"\u225E":c.REL,"\u225F":c.REL,"\u2262":c.REL,"\u2263":c.REL,"\u2266":c.REL,"\u2266\u0338":c.REL,"\u2267":c.REL,"\u2268":c.REL,"\u2269":c.REL,"\u226A\u0338":c.REL,"\u226B\u0338":c.REL,"\u226C":c.REL,"\u226D":c.REL,"\u226E":c.REL,"\u226F":c.REL,"\u2270":c.REL,"\u2271":c.REL,"\u2272":c.REL,"\u2273":c.REL,"\u2274":c.REL,"\u2275":c.REL,"\u2276":c.REL,"\u2277":c.REL,"\u2278":c.REL,"\u2279":c.REL,"\u227C":c.REL,"\u227D":c.REL,"\u227E":c.REL,"\u227F":c.REL,"\u227F\u0338":c.REL,"\u2280":c.REL,"\u2281":c.REL,"\u2282\u20D2":c.REL,"\u2283\u20D2":c.REL,"\u2284":c.REL,"\u2285":c.REL,"\u2288":c.REL,"\u2289":c.REL,"\u228A":c.REL,"\u228B":c.REL,"\u228C":c.BIN4,"\u228D":c.BIN4,"\u228F":c.REL,"\u228F\u0338":c.REL,"\u2290":c.REL,"\u2290\u0338":c.REL,"\u229A":c.BIN4,"\u229B":c.BIN4,"\u229C":c.BIN4,"\u229D":c.BIN4,"\u229E":c.BIN4,"\u229F":c.BIN4,"\u22A0":c.BIN4,"\u22A1":c.BIN4,"\u22A6":c.REL,"\u22A7":c.REL,"\u22A9":c.REL,"\u22AA":c.REL,"\u22AB":c.REL,"\u22AC":c.REL,"\u22AD":c.REL,"\u22AE":c.REL,"\u22AF":c.REL,"\u22B0":c.REL,"\u22B1":c.REL,"\u22B2":c.REL,"\u22B3":c.REL,"\u22B4":c.REL,"\u22B5":c.REL,"\u22B6":c.REL,"\u22B7":c.REL,"\u22B8":c.REL,"\u22B9":c.REL,"\u22BA":c.BIN4,"\u22BB":c.BIN4,"\u22BC":c.BIN4,"\u22BD":c.BIN4,"\u22BE":c.BIN3,"\u22BF":c.BIN3,"\u22C7":c.BIN4,"\u22C9":c.BIN4,"\u22CA":c.BIN4,"\u22CB":c.BIN4,"\u22CC":c.BIN4,"\u22CD":c.REL,"\u22CE":c.BIN4,"\u22CF":c.BIN4,"\u22D0":c.REL,"\u22D1":c.REL,"\u22D2":c.BIN4,"\u22D3":c.BIN4,"\u22D4":c.REL,"\u22D5":c.REL,"\u22D6":c.REL,"\u22D7":c.REL,"\u22D8":c.REL,"\u22D9":c.REL,"\u22DA":c.REL,"\u22DB":c.REL,"\u22DC":c.REL,"\u22DD":c.REL,"\u22DE":c.REL,"\u22DF":c.REL,"\u22E0":c.REL,"\u22E1":c.REL,"\u22E2":c.REL,"\u22E3":c.REL,"\u22E4":c.REL,"\u22E5":c.REL,"\u22E6":c.REL,"\u22E7":c.REL,"\u22E8":c.REL,"\u22E9":c.REL,"\u22EA":c.REL,"\u22EB":c.REL,"\u22EC":c.REL,"\u22ED":c.REL,"\u22F0":c.REL,"\u22F2":c.REL,"\u22F3":c.REL,"\u22F4":c.REL,"\u22F5":c.REL,"\u22F6":c.REL,"\u22F7":c.REL,"\u22F8":c.REL,"\u22F9":c.REL,"\u22FA":c.REL,"\u22FB":c.REL,"\u22FC":c.REL,"\u22FD":c.REL,"\u22FE":c.REL,"\u22FF":c.REL}}});MathJax.Ajax.loadComplete(a.optableDir+"/MathOperators.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/MiscMathSymbolsA.js b/docs/_static/jax/element/mml/optable/MiscMathSymbolsA.js deleted file mode 100644 index 1210628..0000000 --- a/docs/_static/jax/element/mml/optable/MiscMathSymbolsA.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/MiscMathSymbolsA.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u27E6":c.OPEN,"\u27EA":c.OPEN,"\u27EC":c.OPEN},postfix:{"\u27E7":c.CLOSE,"\u27EB":c.CLOSE,"\u27ED":c.CLOSE}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscMathSymbolsA.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/MiscMathSymbolsB.js b/docs/_static/jax/element/mml/optable/MiscMathSymbolsB.js deleted file mode 100644 index 8181f3e..0000000 --- a/docs/_static/jax/element/mml/optable/MiscMathSymbolsB.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/MiscMathSymbolsB.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2980":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2983":c.OPEN,"\u2985":c.OPEN,"\u2987":c.OPEN,"\u2989":c.OPEN,"\u298B":c.OPEN,"\u298D":c.OPEN,"\u298F":c.OPEN,"\u2991":c.OPEN,"\u2993":c.OPEN,"\u2995":c.OPEN,"\u2997":c.OPEN,"\u29FC":c.OPEN},postfix:{"\u2980":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2984":c.CLOSE,"\u2986":c.CLOSE,"\u2988":c.CLOSE,"\u298A":c.CLOSE,"\u298C":c.CLOSE,"\u298E":c.CLOSE,"\u2990":c.CLOSE,"\u2992":c.CLOSE,"\u2994":c.CLOSE,"\u2996":c.CLOSE,"\u2998":c.CLOSE,"\u29FD":c.CLOSE},infix:{"\u2981":c.BIN3,"\u2982":c.BIN3,"\u2999":c.BIN3,"\u299A":c.BIN3,"\u299B":c.BIN3,"\u299C":c.BIN3,"\u299D":c.BIN3,"\u299E":c.BIN3,"\u299F":c.BIN3,"\u29A0":c.BIN3,"\u29A1":c.BIN3,"\u29A2":c.BIN3,"\u29A3":c.BIN3,"\u29A4":c.BIN3,"\u29A5":c.BIN3,"\u29A6":c.BIN3,"\u29A7":c.BIN3,"\u29A8":c.BIN3,"\u29A9":c.BIN3,"\u29AA":c.BIN3,"\u29AB":c.BIN3,"\u29AC":c.BIN3,"\u29AD":c.BIN3,"\u29AE":c.BIN3,"\u29AF":c.BIN3,"\u29B0":c.BIN3,"\u29B1":c.BIN3,"\u29B2":c.BIN3,"\u29B3":c.BIN3,"\u29B4":c.BIN3,"\u29B5":c.BIN3,"\u29B6":c.BIN4,"\u29B7":c.BIN4,"\u29B8":c.BIN4,"\u29B9":c.BIN4,"\u29BA":c.BIN4,"\u29BB":c.BIN4,"\u29BC":c.BIN4,"\u29BD":c.BIN4,"\u29BE":c.BIN4,"\u29BF":c.BIN4,"\u29C0":c.REL,"\u29C1":c.REL,"\u29C2":c.BIN3,"\u29C3":c.BIN3,"\u29C4":c.BIN4,"\u29C5":c.BIN4,"\u29C6":c.BIN4,"\u29C7":c.BIN4,"\u29C8":c.BIN4,"\u29C9":c.BIN3,"\u29CA":c.BIN3,"\u29CB":c.BIN3,"\u29CC":c.BIN3,"\u29CD":c.BIN3,"\u29CE":c.REL,"\u29CF":c.REL,"\u29CF\u0338":c.REL,"\u29D0":c.REL,"\u29D0\u0338":c.REL,"\u29D1":c.REL,"\u29D2":c.REL,"\u29D3":c.REL,"\u29D4":c.REL,"\u29D5":c.REL,"\u29D6":c.BIN4,"\u29D7":c.BIN4,"\u29D8":c.BIN3,"\u29D9":c.BIN3,"\u29DB":c.BIN3,"\u29DC":c.BIN3,"\u29DD":c.BIN3,"\u29DE":c.REL,"\u29DF":c.BIN3,"\u29E0":c.BIN3,"\u29E1":c.REL,"\u29E2":c.BIN4,"\u29E3":c.REL,"\u29E4":c.REL,"\u29E5":c.REL,"\u29E6":c.REL,"\u29E7":c.BIN3,"\u29E8":c.BIN3,"\u29E9":c.BIN3,"\u29EA":c.BIN3,"\u29EB":c.BIN3,"\u29EC":c.BIN3,"\u29ED":c.BIN3,"\u29EE":c.BIN3,"\u29EF":c.BIN3,"\u29F0":c.BIN3,"\u29F1":c.BIN3,"\u29F2":c.BIN3,"\u29F3":c.BIN3,"\u29F4":c.REL,"\u29F5":c.BIN4,"\u29F6":c.BIN4,"\u29F7":c.BIN4,"\u29F8":c.BIN3,"\u29F9":c.BIN3,"\u29FA":c.BIN3,"\u29FB":c.BIN3,"\u29FE":c.BIN4,"\u29FF":c.BIN4}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscMathSymbolsB.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/MiscSymbolsAndArrows.js b/docs/_static/jax/element/mml/optable/MiscSymbolsAndArrows.js deleted file mode 100644 index 7a546a2..0000000 --- a/docs/_static/jax/element/mml/optable/MiscSymbolsAndArrows.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/MiscSymbolsAndArrows.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u2B45":c.RELSTRETCH,"\u2B46":c.RELSTRETCH}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscSymbolsAndArrows.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/MiscTechnical.js b/docs/_static/jax/element/mml/optable/MiscTechnical.js deleted file mode 100644 index e706f98..0000000 --- a/docs/_static/jax/element/mml/optable/MiscTechnical.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/MiscTechnical.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u23B4":c.WIDEACCENT,"\u23B5":c.WIDEACCENT,"\u23DC":c.WIDEACCENT,"\u23DD":c.WIDEACCENT,"\u23E0":c.WIDEACCENT,"\u23E1":c.WIDEACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscTechnical.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/SpacingModLetters.js b/docs/_static/jax/element/mml/optable/SpacingModLetters.js deleted file mode 100644 index 8128e99..0000000 --- a/docs/_static/jax/element/mml/optable/SpacingModLetters.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/SpacingModLetters.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u02CD":c.WIDEACCENT,"\u02DA":c.ACCENT,"\u02DD":c.ACCENT,"\u02F7":c.WIDEACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/SpacingModLetters.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/SuppMathOperators.js b/docs/_static/jax/element/mml/optable/SuppMathOperators.js deleted file mode 100644 index 331c3bb..0000000 --- a/docs/_static/jax/element/mml/optable/SuppMathOperators.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/SuppMathOperators.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2A03":c.OP,"\u2A05":c.OP,"\u2A07":c.OP,"\u2A08":c.OP,"\u2A09":c.OP,"\u2A0A":c.OP,"\u2A0B":c.INTEGRAL2,"\u2A0C":c.INTEGRAL,"\u2A0D":c.INTEGRAL2,"\u2A0E":c.INTEGRAL2,"\u2A0F":c.INTEGRAL2,"\u2A10":c.OP,"\u2A11":c.OP,"\u2A12":c.OP,"\u2A13":c.OP,"\u2A14":c.OP,"\u2A15":c.INTEGRAL2,"\u2A16":c.INTEGRAL2,"\u2A17":c.INTEGRAL2,"\u2A18":c.INTEGRAL2,"\u2A19":c.INTEGRAL2,"\u2A1A":c.INTEGRAL2,"\u2A1B":c.INTEGRAL2,"\u2A1C":c.INTEGRAL2,"\u2AFC":c.OP,"\u2AFF":c.OP},infix:{"\u2A1D":c.BIN3,"\u2A1E":c.BIN3,"\u2A1F":c.BIN3,"\u2A20":c.BIN3,"\u2A21":c.BIN3,"\u2A22":c.BIN4,"\u2A23":c.BIN4,"\u2A24":c.BIN4,"\u2A25":c.BIN4,"\u2A26":c.BIN4,"\u2A27":c.BIN4,"\u2A28":c.BIN4,"\u2A29":c.BIN4,"\u2A2A":c.BIN4,"\u2A2B":c.BIN4,"\u2A2C":c.BIN4,"\u2A2D":c.BIN4,"\u2A2E":c.BIN4,"\u2A30":c.BIN4,"\u2A31":c.BIN4,"\u2A32":c.BIN4,"\u2A33":c.BIN4,"\u2A34":c.BIN4,"\u2A35":c.BIN4,"\u2A36":c.BIN4,"\u2A37":c.BIN4,"\u2A38":c.BIN4,"\u2A39":c.BIN4,"\u2A3A":c.BIN4,"\u2A3B":c.BIN4,"\u2A3C":c.BIN4,"\u2A3D":c.BIN4,"\u2A3E":c.BIN4,"\u2A40":c.BIN4,"\u2A41":c.BIN4,"\u2A42":c.BIN4,"\u2A43":c.BIN4,"\u2A44":c.BIN4,"\u2A45":c.BIN4,"\u2A46":c.BIN4,"\u2A47":c.BIN4,"\u2A48":c.BIN4,"\u2A49":c.BIN4,"\u2A4A":c.BIN4,"\u2A4B":c.BIN4,"\u2A4C":c.BIN4,"\u2A4D":c.BIN4,"\u2A4E":c.BIN4,"\u2A4F":c.BIN4,"\u2A50":c.BIN4,"\u2A51":c.BIN4,"\u2A52":c.BIN4,"\u2A53":c.BIN4,"\u2A54":c.BIN4,"\u2A55":c.BIN4,"\u2A56":c.BIN4,"\u2A57":c.BIN4,"\u2A58":c.BIN4,"\u2A59":c.REL,"\u2A5A":c.BIN4,"\u2A5B":c.BIN4,"\u2A5C":c.BIN4,"\u2A5D":c.BIN4,"\u2A5E":c.BIN4,"\u2A5F":c.BIN4,"\u2A60":c.BIN4,"\u2A61":c.BIN4,"\u2A62":c.BIN4,"\u2A63":c.BIN4,"\u2A64":c.BIN4,"\u2A65":c.BIN4,"\u2A66":c.REL,"\u2A67":c.REL,"\u2A68":c.REL,"\u2A69":c.REL,"\u2A6A":c.REL,"\u2A6B":c.REL,"\u2A6C":c.REL,"\u2A6D":c.REL,"\u2A6E":c.REL,"\u2A6F":c.REL,"\u2A70":c.REL,"\u2A71":c.BIN4,"\u2A72":c.BIN4,"\u2A73":c.REL,"\u2A74":c.REL,"\u2A75":c.REL,"\u2A76":c.REL,"\u2A77":c.REL,"\u2A78":c.REL,"\u2A79":c.REL,"\u2A7A":c.REL,"\u2A7B":c.REL,"\u2A7C":c.REL,"\u2A7D":c.REL,"\u2A7D\u0338":c.REL,"\u2A7E":c.REL,"\u2A7E\u0338":c.REL,"\u2A7F":c.REL,"\u2A80":c.REL,"\u2A81":c.REL,"\u2A82":c.REL,"\u2A83":c.REL,"\u2A84":c.REL,"\u2A85":c.REL,"\u2A86":c.REL,"\u2A87":c.REL,"\u2A88":c.REL,"\u2A89":c.REL,"\u2A8A":c.REL,"\u2A8B":c.REL,"\u2A8C":c.REL,"\u2A8D":c.REL,"\u2A8E":c.REL,"\u2A8F":c.REL,"\u2A90":c.REL,"\u2A91":c.REL,"\u2A92":c.REL,"\u2A93":c.REL,"\u2A94":c.REL,"\u2A95":c.REL,"\u2A96":c.REL,"\u2A97":c.REL,"\u2A98":c.REL,"\u2A99":c.REL,"\u2A9A":c.REL,"\u2A9B":c.REL,"\u2A9C":c.REL,"\u2A9D":c.REL,"\u2A9E":c.REL,"\u2A9F":c.REL,"\u2AA0":c.REL,"\u2AA1":c.REL,"\u2AA1\u0338":c.REL,"\u2AA2":c.REL,"\u2AA2\u0338":c.REL,"\u2AA3":c.REL,"\u2AA4":c.REL,"\u2AA5":c.REL,"\u2AA6":c.REL,"\u2AA7":c.REL,"\u2AA8":c.REL,"\u2AA9":c.REL,"\u2AAA":c.REL,"\u2AAB":c.REL,"\u2AAC":c.REL,"\u2AAD":c.REL,"\u2AAE":c.REL,"\u2AAF\u0338":c.REL,"\u2AB0\u0338":c.REL,"\u2AB1":c.REL,"\u2AB2":c.REL,"\u2AB3":c.REL,"\u2AB4":c.REL,"\u2AB5":c.REL,"\u2AB6":c.REL,"\u2AB7":c.REL,"\u2AB8":c.REL,"\u2AB9":c.REL,"\u2ABA":c.REL,"\u2ABB":c.REL,"\u2ABC":c.REL,"\u2ABD":c.REL,"\u2ABE":c.REL,"\u2ABF":c.REL,"\u2AC0":c.REL,"\u2AC1":c.REL,"\u2AC2":c.REL,"\u2AC3":c.REL,"\u2AC4":c.REL,"\u2AC5":c.REL,"\u2AC6":c.REL,"\u2AC7":c.REL,"\u2AC8":c.REL,"\u2AC9":c.REL,"\u2ACA":c.REL,"\u2ACB":c.REL,"\u2ACC":c.REL,"\u2ACD":c.REL,"\u2ACE":c.REL,"\u2ACF":c.REL,"\u2AD0":c.REL,"\u2AD1":c.REL,"\u2AD2":c.REL,"\u2AD3":c.REL,"\u2AD4":c.REL,"\u2AD5":c.REL,"\u2AD6":c.REL,"\u2AD7":c.REL,"\u2AD8":c.REL,"\u2AD9":c.REL,"\u2ADA":c.REL,"\u2ADB":c.REL,"\u2ADC":c.REL,"\u2ADD":c.REL,"\u2ADE":c.REL,"\u2ADF":c.REL,"\u2AE0":c.REL,"\u2AE1":c.REL,"\u2AE2":c.REL,"\u2AE3":c.REL,"\u2AE4":c.REL,"\u2AE5":c.REL,"\u2AE6":c.REL,"\u2AE7":c.REL,"\u2AE8":c.REL,"\u2AE9":c.REL,"\u2AEA":c.REL,"\u2AEB":c.REL,"\u2AEC":c.REL,"\u2AED":c.REL,"\u2AEE":c.REL,"\u2AEF":c.REL,"\u2AF0":c.REL,"\u2AF1":c.REL,"\u2AF2":c.REL,"\u2AF3":c.REL,"\u2AF4":c.BIN4,"\u2AF5":c.BIN4,"\u2AF6":c.BIN4,"\u2AF7":c.REL,"\u2AF8":c.REL,"\u2AF9":c.REL,"\u2AFA":c.REL,"\u2AFB":c.BIN4,"\u2AFD":c.BIN4,"\u2AFE":c.BIN3}}});MathJax.Ajax.loadComplete(a.optableDir+"/SuppMathOperators.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/SupplementalArrowsA.js b/docs/_static/jax/element/mml/optable/SupplementalArrowsA.js deleted file mode 100644 index c3c2444..0000000 --- a/docs/_static/jax/element/mml/optable/SupplementalArrowsA.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/SupplementalArrowsA.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u27F0":c.RELSTRETCH,"\u27F1":c.RELSTRETCH,"\u27FB":c.WIDEREL,"\u27FD":c.WIDEREL,"\u27FE":c.WIDEREL,"\u27FF":c.WIDEREL}}});MathJax.Ajax.loadComplete(a.optableDir+"/SupplementalArrowsA.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/element/mml/optable/SupplementalArrowsB.js b/docs/_static/jax/element/mml/optable/SupplementalArrowsB.js deleted file mode 100644 index ed2c2a0..0000000 --- a/docs/_static/jax/element/mml/optable/SupplementalArrowsB.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/element/mml/optable/SupplementalArrowsB.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u2900":c.RELACCENT,"\u2901":c.RELACCENT,"\u2902":c.RELACCENT,"\u2903":c.RELACCENT,"\u2904":c.RELACCENT,"\u2905":c.RELACCENT,"\u2906":c.RELACCENT,"\u2907":c.RELACCENT,"\u2908":c.REL,"\u2909":c.REL,"\u290A":c.RELSTRETCH,"\u290B":c.RELSTRETCH,"\u290C":c.WIDEREL,"\u290D":c.WIDEREL,"\u290E":c.WIDEREL,"\u290F":c.WIDEREL,"\u2910":c.WIDEREL,"\u2911":c.RELACCENT,"\u2912":c.RELSTRETCH,"\u2913":c.RELSTRETCH,"\u2914":c.RELACCENT,"\u2915":c.RELACCENT,"\u2916":c.RELACCENT,"\u2917":c.RELACCENT,"\u2918":c.RELACCENT,"\u2919":c.RELACCENT,"\u291A":c.RELACCENT,"\u291B":c.RELACCENT,"\u291C":c.RELACCENT,"\u291D":c.RELACCENT,"\u291E":c.RELACCENT,"\u291F":c.RELACCENT,"\u2920":c.RELACCENT,"\u2921":c.RELSTRETCH,"\u2922":c.RELSTRETCH,"\u2923":c.REL,"\u2924":c.REL,"\u2925":c.REL,"\u2926":c.REL,"\u2927":c.REL,"\u2928":c.REL,"\u2929":c.REL,"\u292A":c.REL,"\u292B":c.REL,"\u292C":c.REL,"\u292D":c.REL,"\u292E":c.REL,"\u292F":c.REL,"\u2930":c.REL,"\u2931":c.REL,"\u2932":c.REL,"\u2933":c.RELACCENT,"\u2934":c.REL,"\u2935":c.REL,"\u2936":c.REL,"\u2937":c.REL,"\u2938":c.REL,"\u2939":c.REL,"\u293A":c.RELACCENT,"\u293B":c.RELACCENT,"\u293C":c.RELACCENT,"\u293D":c.RELACCENT,"\u293E":c.REL,"\u293F":c.REL,"\u2940":c.REL,"\u2941":c.REL,"\u2942":c.RELACCENT,"\u2943":c.RELACCENT,"\u2944":c.RELACCENT,"\u2945":c.RELACCENT,"\u2946":c.RELACCENT,"\u2947":c.RELACCENT,"\u2948":c.RELACCENT,"\u2949":c.REL,"\u294A":c.RELACCENT,"\u294B":c.RELACCENT,"\u294C":c.REL,"\u294D":c.REL,"\u294E":c.WIDEREL,"\u294F":c.RELSTRETCH,"\u2950":c.WIDEREL,"\u2951":c.RELSTRETCH,"\u2952":c.WIDEREL,"\u2953":c.WIDEREL,"\u2954":c.RELSTRETCH,"\u2955":c.RELSTRETCH,"\u2956":c.RELSTRETCH,"\u2957":c.RELSTRETCH,"\u2958":c.RELSTRETCH,"\u2959":c.RELSTRETCH,"\u295A":c.WIDEREL,"\u295B":c.WIDEREL,"\u295C":c.RELSTRETCH,"\u295D":c.RELSTRETCH,"\u295E":c.WIDEREL,"\u295F":c.WIDEREL,"\u2960":c.RELSTRETCH,"\u2961":c.RELSTRETCH,"\u2962":c.RELACCENT,"\u2963":c.REL,"\u2964":c.RELACCENT,"\u2965":c.REL,"\u2966":c.RELACCENT,"\u2967":c.RELACCENT,"\u2968":c.RELACCENT,"\u2969":c.RELACCENT,"\u296A":c.RELACCENT,"\u296B":c.RELACCENT,"\u296C":c.RELACCENT,"\u296D":c.RELACCENT,"\u296E":c.RELSTRETCH,"\u296F":c.RELSTRETCH,"\u2970":c.RELACCENT,"\u2971":c.RELACCENT,"\u2972":c.RELACCENT,"\u2973":c.RELACCENT,"\u2974":c.RELACCENT,"\u2975":c.RELACCENT,"\u2976":c.RELACCENT,"\u2977":c.RELACCENT,"\u2978":c.RELACCENT,"\u2979":c.RELACCENT,"\u297A":c.RELACCENT,"\u297B":c.RELACCENT,"\u297C":c.RELACCENT,"\u297D":c.RELACCENT,"\u297E":c.REL,"\u297F":c.REL}}});MathJax.Ajax.loadComplete(a.optableDir+"/SupplementalArrowsB.js")})(MathJax.ElementJax.mml); diff --git a/docs/_static/jax/input/TeX/config.js b/docs/_static/jax/input/TeX/config.js deleted file mode 100644 index e446b53..0000000 --- a/docs/_static/jax/input/TeX/config.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/input/TeX/config.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.4.0",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%",equationNumbers:{autoNumber:"none",formatNumber:function(a){return a},formatTag:function(a){return"("+a+")"},formatID:function(a){return"mjx-eqn-"+String(a).replace(/[:"'<>&]/g,"")},formatURL:function(a){return"#"+escape(a)},useLabelIds:true}}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js"); diff --git a/docs/_static/jax/input/TeX/jax.js b/docs/_static/jax/input/TeX/jax.js deleted file mode 100644 index eb98c16..0000000 --- a/docs/_static/jax/input/TeX/jax.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/input/TeX/jax.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(d,c,i){var h,g="\u00A0";var j=function(l){return MathJax.Localization._.apply(MathJax.Localization,[["TeX",l]].concat([].slice.call(arguments,1)))};var e=MathJax.Object.Subclass({Init:function(m,l){this.global={isInner:l};this.data=[b.start(this.global)];if(m){this.data[0].env=m}this.env=this.data[0].env},Push:function(){var n,l,o,p;for(n=0,l=arguments.length;n":"27E9","\\lt":"27E8","\\gt":"27E9","/":"/","|":["|",{texClass:h.TEXCLASS.ORD}],".":"","\\\\":"\\","\\lmoustache":"23B0","\\rmoustache":"23B1","\\lgroup":"27EE","\\rgroup":"27EF","\\arrowvert":"23D0","\\Arrowvert":"2016","\\bracevert":"23AA","\\Vert":["2225",{texClass:h.TEXCLASS.ORD}],"\\|":["2225",{texClass:h.TEXCLASS.ORD}],"\\vert":["|",{texClass:h.TEXCLASS.ORD}],"\\uparrow":"2191","\\downarrow":"2193","\\updownarrow":"2195","\\Uparrow":"21D1","\\Downarrow":"21D3","\\Updownarrow":"21D5","\\backslash":"\\","\\rangle":"27E9","\\langle":"27E8","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"2309","\\lceil":"2308","\\rfloor":"230B","\\lfloor":"230A","\\lbrack":"[","\\rbrack":"]"},macros:{displaystyle:["SetStyle","D",true,0],textstyle:["SetStyle","T",false,0],scriptstyle:["SetStyle","S",false,1],scriptscriptstyle:["SetStyle","SS",false,2],rm:["SetFont",h.VARIANT.NORMAL],mit:["SetFont",h.VARIANT.ITALIC],oldstyle:["SetFont",h.VARIANT.OLDSTYLE],cal:["SetFont",h.VARIANT.CALIGRAPHIC],it:["SetFont","-tex-mathit"],bf:["SetFont",h.VARIANT.BOLD],bbFont:["SetFont",h.VARIANT.DOUBLESTRUCK],scr:["SetFont",h.VARIANT.SCRIPT],frak:["SetFont",h.VARIANT.FRAKTUR],sf:["SetFont",h.VARIANT.SANSSERIF],tt:["SetFont",h.VARIANT.MONOSPACE],tiny:["SetSize",0.5],Tiny:["SetSize",0.6],scriptsize:["SetSize",0.7],small:["SetSize",0.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],arcsin:["NamedFn"],arccos:["NamedFn"],arctan:["NamedFn"],arg:["NamedFn"],cos:["NamedFn"],cosh:["NamedFn"],cot:["NamedFn"],coth:["NamedFn"],csc:["NamedFn"],deg:["NamedFn"],det:"NamedOp",dim:["NamedFn"],exp:["NamedFn"],gcd:"NamedOp",hom:["NamedFn"],inf:"NamedOp",ker:["NamedFn"],lg:["NamedFn"],lim:"NamedOp",liminf:["NamedOp","lim inf"],limsup:["NamedOp","lim sup"],ln:["NamedFn"],log:["NamedFn"],max:"NamedOp",min:"NamedOp",Pr:"NamedOp",sec:["NamedFn"],sin:["NamedFn"],sinh:["NamedFn"],sup:"NamedOp",tan:["NamedFn"],tanh:["NamedFn"],limits:["Limits",1],nolimits:["Limits",0],overline:["UnderOver","00AF"],underline:["UnderOver","005F"],overbrace:["UnderOver","23DE",1],underbrace:["UnderOver","23DF",1],overrightarrow:["UnderOver","2192"],underrightarrow:["UnderOver","2192"],overleftarrow:["UnderOver","2190"],underleftarrow:["UnderOver","2190"],overleftrightarrow:["UnderOver","2194"],underleftrightarrow:["UnderOver","2194"],overset:"Overset",underset:"Underset",stackrel:["Macro","\\mathrel{\\mathop{#2}\\limits^{#1}}",2],over:"Over",overwithdelims:"Over",atop:"Over",atopwithdelims:"Over",above:"Over",abovewithdelims:"Over",brace:["Over","{","}"],brack:["Over","[","]"],choose:["Over","(",")"],frac:"Frac",sqrt:"Sqrt",root:"Root",uproot:["MoveRoot","upRoot"],leftroot:["MoveRoot","leftRoot"],left:"LeftRight",right:"LeftRight",middle:"Middle",llap:"Lap",rlap:"Lap",raise:"RaiseLower",lower:"RaiseLower",moveleft:"MoveLeftRight",moveright:"MoveLeftRight",",":["Spacer",h.LENGTH.THINMATHSPACE],":":["Spacer",h.LENGTH.MEDIUMMATHSPACE],">":["Spacer",h.LENGTH.MEDIUMMATHSPACE],";":["Spacer",h.LENGTH.THICKMATHSPACE],"!":["Spacer",h.LENGTH.NEGATIVETHINMATHSPACE],enspace:["Spacer",".5em"],quad:["Spacer","1em"],qquad:["Spacer","2em"],thinspace:["Spacer",h.LENGTH.THINMATHSPACE],negthinspace:["Spacer",h.LENGTH.NEGATIVETHINMATHSPACE],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip",mspace:"Hskip",mkern:"Hskip",Rule:["Rule"],Space:["Rule","blank"],big:["MakeBig",h.TEXCLASS.ORD,0.85],Big:["MakeBig",h.TEXCLASS.ORD,1.15],bigg:["MakeBig",h.TEXCLASS.ORD,1.45],Bigg:["MakeBig",h.TEXCLASS.ORD,1.75],bigl:["MakeBig",h.TEXCLASS.OPEN,0.85],Bigl:["MakeBig",h.TEXCLASS.OPEN,1.15],biggl:["MakeBig",h.TEXCLASS.OPEN,1.45],Biggl:["MakeBig",h.TEXCLASS.OPEN,1.75],bigr:["MakeBig",h.TEXCLASS.CLOSE,0.85],Bigr:["MakeBig",h.TEXCLASS.CLOSE,1.15],biggr:["MakeBig",h.TEXCLASS.CLOSE,1.45],Biggr:["MakeBig",h.TEXCLASS.CLOSE,1.75],bigm:["MakeBig",h.TEXCLASS.REL,0.85],Bigm:["MakeBig",h.TEXCLASS.REL,1.15],biggm:["MakeBig",h.TEXCLASS.REL,1.45],Biggm:["MakeBig",h.TEXCLASS.REL,1.75],mathord:["TeXAtom",h.TEXCLASS.ORD],mathop:["TeXAtom",h.TEXCLASS.OP],mathopen:["TeXAtom",h.TEXCLASS.OPEN],mathclose:["TeXAtom",h.TEXCLASS.CLOSE],mathbin:["TeXAtom",h.TEXCLASS.BIN],mathrel:["TeXAtom",h.TEXCLASS.REL],mathpunct:["TeXAtom",h.TEXCLASS.PUNCT],mathinner:["TeXAtom",h.TEXCLASS.INNER],vcenter:["TeXAtom",h.TEXCLASS.VCENTER],mathchoice:["Extension","mathchoice"],buildrel:"BuildRel",hbox:["HBox",0],text:"HBox",mbox:["HBox",0],fbox:"FBox",strut:"Strut",mathstrut:["Macro","\\vphantom{(}"],phantom:"Phantom",vphantom:["Phantom",1,0],hphantom:["Phantom",0,1],smash:"Smash",acute:["Accent","00B4"],grave:["Accent","0060"],ddot:["Accent","00A8"],tilde:["Accent","007E"],bar:["Accent","00AF"],breve:["Accent","02D8"],check:["Accent","02C7"],hat:["Accent","005E"],vec:["Accent","2192"],dot:["Accent","02D9"],widetilde:["Accent","007E",1],widehat:["Accent","005E",1],matrix:"Matrix",array:"Matrix",pmatrix:["Matrix","(",")"],cases:["Matrix","{","","left left",null,".1em",null,true],eqalign:["Matrix",null,null,"right left",h.LENGTH.THICKMATHSPACE,".5em","D"],displaylines:["Matrix",null,null,"center",null,".5em","D"],cr:"Cr","\\":"CrLaTeX",newline:"Cr",hline:["HLine","solid"],hdashline:["HLine","dashed"],eqalignno:["Matrix",null,null,"right left right",h.LENGTH.THICKMATHSPACE+" 3em",".5em","D"],leqalignno:["Matrix",null,null,"right left right",h.LENGTH.THICKMATHSPACE+" 3em",".5em","D"],bmod:["Macro",'\\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}'],pmod:["Macro","\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:["Macro","\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:["Macro","\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:["Macro","\\;\\Longleftrightarrow\\;"],skew:["Macro","{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],mathcal:["Macro","{\\cal #1}",1],mathscr:["Macro","{\\scr #1}",1],mathrm:["Macro","{\\rm #1}",1],mathbf:["Macro","{\\bf #1}",1],mathbb:["Macro","{\\bbFont #1}",1],Bbb:["Macro","{\\bbFont #1}",1],mathit:["Macro","{\\it #1}",1],mathfrak:["Macro","{\\frak #1}",1],mathsf:["Macro","{\\sf #1}",1],mathtt:["Macro","{\\tt #1}",1],textrm:["Macro","\\mathord{\\rm\\text{#1}}",1],textit:["Macro","\\mathord{\\it\\text{#1}}",1],textbf:["Macro","\\mathord{\\bf\\text{#1}}",1],textsf:["Macro","\\mathord{\\sf\\text{#1}}",1],texttt:["Macro","\\mathord{\\tt\\text{#1}}",1],pmb:["Macro","\\rlap{#1}\\kern1px{#1}",1],TeX:["Macro","T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:["Macro","L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"]," ":["Macro","\\text{ }"],not:"Not",dots:"Dots",space:"Tilde","\u00A0":"Tilde",begin:"BeginEnd",end:"BeginEnd",newcommand:["Extension","newcommand"],renewcommand:["Extension","newcommand"],newenvironment:["Extension","newcommand"],renewenvironment:["Extension","newcommand"],def:["Extension","newcommand"],let:["Extension","newcommand"],verb:["Extension","verb"],boldsymbol:["Extension","boldsymbol"],tag:["Extension","AMSmath"],notag:["Extension","AMSmath"],label:["Extension","AMSmath"],ref:["Extension","AMSmath"],eqref:["Extension","AMSmath"],nonumber:["Macro","\\notag"],unicode:["Extension","unicode"],color:"Color",href:["Extension","HTML"],"class":["Extension","HTML"],style:["Extension","HTML"],cssId:["Extension","HTML"],bbox:["Extension","bbox"],mmlToken:"MmlToken",require:"Require"},environment:{array:["AlignedArray"],matrix:["Array",null,null,null,"c"],pmatrix:["Array",null,"(",")","c"],bmatrix:["Array",null,"[","]","c"],Bmatrix:["Array",null,"\\{","\\}","c"],vmatrix:["Array",null,"\\vert","\\vert","c"],Vmatrix:["Array",null,"\\Vert","\\Vert","c"],cases:["Array",null,"\\{",".","ll",null,".2em","T"],equation:[null,"Equation"],"equation*":[null,"Equation"],eqnarray:["ExtensionEnv",null,"AMSmath"],"eqnarray*":["ExtensionEnv",null,"AMSmath"],align:["ExtensionEnv",null,"AMSmath"],"align*":["ExtensionEnv",null,"AMSmath"],aligned:["ExtensionEnv",null,"AMSmath"],multline:["ExtensionEnv",null,"AMSmath"],"multline*":["ExtensionEnv",null,"AMSmath"],split:["ExtensionEnv",null,"AMSmath"],gather:["ExtensionEnv",null,"AMSmath"],"gather*":["ExtensionEnv",null,"AMSmath"],gathered:["ExtensionEnv",null,"AMSmath"],alignat:["ExtensionEnv",null,"AMSmath"],"alignat*":["ExtensionEnv",null,"AMSmath"],alignedat:["ExtensionEnv",null,"AMSmath"]},p_height:1.2/0.85});if(this.config.Macros){var l=this.config.Macros;for(var m in l){if(l.hasOwnProperty(m)){if(typeof(l[m])==="string"){f.macros[m]=["Macro",l[m]]}else{f.macros[m]=["Macro"].concat(l[m])}f.macros[m].isUser=true}}}};var a=MathJax.Object.Subclass({Init:function(m,n){this.string=m;this.i=0;this.macroCount=0;var l;if(n){l={};for(var o in n){if(n.hasOwnProperty(o)){l[o]=n[o]}}}this.stack=d.Stack(l,!!n);this.Parse();this.Push(b.stop())},Parse:function(){var m,l;while(this.i=55296&&l<56320){m+=this.string.charAt(this.i++)}if(f.special[m]){this[f.special[m]](m)}else{if(f.letter.test(m)){this.Variable(m)}else{if(f.digit.test(m)){this.Number(m)}else{this.Other(m)}}}}},Push:function(){this.stack.Push.apply(this.stack,arguments)},mml:function(){if(this.stack.Top().type!=="mml"){return null}return this.stack.Top().data[0]},mmlToken:function(l){return l},ControlSequence:function(o){var l=this.GetCS(),n=this.csFindMacro(l);if(n){if(!(n instanceof Array)){n=[n]}var m=n[0];if(!(m instanceof Function)){m=this[m]}m.apply(this,[o+l].concat(n.slice(1)))}else{if(f.mathchar0mi[l]){this.csMathchar0mi(l,f.mathchar0mi[l])}else{if(f.mathchar0mo[l]){this.csMathchar0mo(l,f.mathchar0mo[l])}else{if(f.mathchar7[l]){this.csMathchar7(l,f.mathchar7[l])}else{if(f.delimiter["\\"+l]!=null){this.csDelimiter(l,f.delimiter["\\"+l])}else{this.csUndefined(o+l)}}}}}},csFindMacro:function(l){return f.macros[l]},csMathchar0mi:function(l,n){var m={mathvariant:h.VARIANT.ITALIC};if(n instanceof Array){m=n[1];n=n[0]}this.Push(this.mmlToken(h.mi(h.entity("#x"+n)).With(m)))},csMathchar0mo:function(l,n){var m={stretchy:false};if(n instanceof Array){m=n[1];m.stretchy=false;n=n[0]}this.Push(this.mmlToken(h.mo(h.entity("#x"+n)).With(m)))},csMathchar7:function(l,n){var m={mathvariant:h.VARIANT.NORMAL};if(n instanceof Array){m=n[1];n=n[0]}if(this.stack.env.font){m.mathvariant=this.stack.env.font}this.Push(this.mmlToken(h.mi(h.entity("#x"+n)).With(m)))},csDelimiter:function(l,n){var m={};if(n instanceof Array){m=n[1];n=n[0]}if(n.length===4){n=h.entity("#x"+n)}else{n=h.chars(n)}this.Push(this.mmlToken(h.mo(n).With({fence:false,stretchy:false}).With(m)))},csUndefined:function(l){d.Error(["UndefinedControlSequence","Undefined control sequence %1",l])},Variable:function(m){var l={};if(this.stack.env.font){l.mathvariant=this.stack.env.font}this.Push(this.mmlToken(h.mi(h.chars(m)).With(l)))},Number:function(o){var l,m=this.string.slice(this.i-1).match(f.number);if(m){l=h.mn(m[0].replace(/[{}]/g,""));this.i+=m[0].length-1}else{l=h.mo(h.chars(o))}if(this.stack.env.font){l.mathvariant=this.stack.env.font}this.Push(this.mmlToken(l))},Open:function(l){this.Push(b.open())},Close:function(l){this.Push(b.close())},Tilde:function(l){this.Push(h.mtext(h.chars(g)))},Space:function(l){},Superscript:function(p){if(this.GetNext().match(/\d/)){this.string=this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}var l,o,m,n=this.stack.Top();if(n.type==="prime"){m=n.data[0];o=n.data[1];this.stack.Pop()}else{m=this.stack.Prev();if(!m){m=h.mi("")}}if(m.isEmbellishedWrapper){m=m.data[0].data[0]}if(m.type==="msubsup"){if(m.data[m.sup]){d.Error(["DoubleExponent","Double exponent: use braces to clarify"])}l=m.sup}else{if(m.movesupsub){if(m.type!=="munderover"||m.data[m.over]){if(m.movablelimits&&m.isa(h.mi)){m=this.mi2mo(m)}m=h.munderover(m,null,null).With({movesupsub:true})}l=m.over}else{m=h.msubsup(m,null,null);l=m.sup}}this.Push(b.subsup(m).With({position:l,primes:o}))},Subscript:function(p){if(this.GetNext().match(/\d/)){this.string=this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}var l,o,m,n=this.stack.Top();if(n.type==="prime"){m=n.data[0];o=n.data[1];this.stack.Pop()}else{m=this.stack.Prev();if(!m){m=h.mi("")}}if(m.isEmbellishedWrapper){m=m.data[0].data[0]}if(m.type==="msubsup"){if(m.data[m.sub]){d.Error(["DoubleSubscripts","Double subscripts: use braces to clarify"])}l=m.sub}else{if(m.movesupsub){if(m.type!=="munderover"||m.data[m.under]){if(m.movablelimits&&m.isa(h.mi)){m=this.mi2mo(m)}m=h.munderover(m,null,null).With({movesupsub:true})}l=m.under}else{m=h.msubsup(m,null,null);l=m.sub}}this.Push(b.subsup(m).With({position:l,primes:o}))},PRIME:"\u2032",SMARTQUOTE:"\u2019",Prime:function(n){var m=this.stack.Prev();if(!m){m=h.mi()}if(m.type==="msubsup"&&m.data[m.sup]){d.Error(["DoubleExponentPrime","Prime causes double exponent: use braces to clarify"])}var l="";this.i--;do{l+=this.PRIME;this.i++,n=this.GetNext()}while(n==="'"||n===this.SMARTQUOTE);l=["","\u2032","\u2033","\u2034","\u2057"][l.length]||l;this.Push(b.prime(m,this.mmlToken(h.mo(l))))},mi2mo:function(l){var m=h.mo();m.Append.apply(m,l.data);var n;for(n in m.defaults){if(m.defaults.hasOwnProperty(n)&&l[n]!=null){m[n]=l[n]}}for(n in h.copyAttributes){if(h.copyAttributes.hasOwnProperty(n)&&l[n]!=null){m[n]=l[n]}}return m},Comment:function(l){while(this.id.config.MAXMACROS){d.Error(["MaxMacroSub1","MathJax maximum macro substitution count exceeded; is there a recursive macro call?"])}},Matrix:function(m,o,t,q,s,n,l,u){var r=this.GetNext();if(r===""){d.Error(["MissingArgFor","Missing argument for %1",m])}if(r==="{"){this.i++}else{this.string=r+"}"+this.string.slice(this.i+1);this.i=0}var p=b.array().With({requireClose:true,arraydef:{rowspacing:(n||"4pt"),columnspacing:(s||"1em")}});if(u){p.isCases=true}if(o||t){p.open=o;p.close=t}if(l==="D"){p.arraydef.displaystyle=true}if(q!=null){p.arraydef.columnalign=q}this.Push(p)},Entry:function(o){this.Push(b.cell().With({isEntry:true,name:o}));if(this.stack.Top().isCases){var n=this.string;var r=0,p=this.i,l=n.length;while(pd.config.MAXMACROS){d.Error(["MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?"])}if(p[0]&&this[p[0]]){m=this[p[0]].apply(this,[m].concat(p.slice(2)))}}this.Push(m)},envFindName:function(l){return f.environment[l]},Equation:function(l,m){return m},ExtensionEnv:function(m,l){this.Extension(m.name,l,"environment")},Array:function(m,o,t,r,s,n,l,p){if(!r){r=this.GetArgument("\\begin{"+m.name+"}")}var u=("c"+r).replace(/[^clr|:]/g,"").replace(/[^|:]([|:])+/g,"$1");r=r.replace(/[^clr]/g,"").split("").join(" ");r=r.replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center");var q=b.array().With({arraydef:{columnalign:r,columnspacing:(s||"1em"),rowspacing:(n||"4pt")}});if(u.match(/[|:]/)){if(u.charAt(0).match(/[|:]/)){q.frame.push("left");q.frame.dashed=u.charAt(0)===":"}if(u.charAt(u.length-1).match(/[|:]/)){q.frame.push("right")}u=u.substr(1,u.length-2);q.arraydef.columnlines=u.split("").join(" ").replace(/[^|: ]/g,"none").replace(/\|/g,"solid").replace(/:/g,"dashed")}if(o){q.open=this.convertDelimiter(o)}if(t){q.close=this.convertDelimiter(t)}if(l==="D"){q.arraydef.displaystyle=true}else{if(l){q.arraydef.displaystyle=false}}if(l==="S"){q.arraydef.scriptlevel=1}if(p){q.arraydef.useHeight=false}this.Push(m);return q},AlignedArray:function(l){var m=this.GetBrackets("\\begin{"+l.name+"}");return this.setArrayAlign(this.Array.apply(this,arguments),m)},setArrayAlign:function(m,l){l=this.trimSpaces(l||"");if(l==="t"){m.arraydef.align="baseline 1"}else{if(l==="b"){m.arraydef.align="baseline -1"}else{if(l==="c"){m.arraydef.align="center"}else{if(l){m.arraydef.align=l}}}}return m},convertDelimiter:function(l){if(l){l=f.delimiter[l]}if(l==null){return null}if(l instanceof Array){l=l[0]}if(l.length===4){l=String.fromCharCode(parseInt(l,16))}return l},trimSpaces:function(l){if(typeof(l)!="string"){return l}return l.replace(/^\s+|\s+$/g,"")},nextIsSpace:function(){return this.string.charAt(this.i).match(/\s/)},GetNext:function(){while(this.nextIsSpace()){this.i++}return this.string.charAt(this.i)},GetCS:function(){var l=this.string.slice(this.i).match(/^([a-z]+|.) ?/i);if(l){this.i+=l[1].length;return l[1]}else{this.i++;return" "}},GetArgument:function(m,n){switch(this.GetNext()){case"":if(!n){d.Error(["MissingArgFor","Missing argument for %1",m])}return null;case"}":if(!n){d.Error(["ExtraCloseMissingOpen","Extra close brace or missing open brace"])}return null;case"\\":this.i++;return"\\"+this.GetCS();case"{":var l=++this.i,o=1;while(this.im.length){d.Error(["IllegalMacroParam","Illegal macro parameter reference"])}o=this.AddArgs(this.AddArgs(o,p),m[q-1]);p=""}}else{p+=q}}}return this.AddArgs(o,p)},AddArgs:function(m,l){if(l.match(/^[a-z]/i)&&m.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)){m+=" "}if(m.length+l.length>d.config.MAXBUFFER){d.Error(["MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?"])}return m+l}});d.Augment({Stack:e,Parse:a,Definitions:f,Startup:k,config:{MAXMACROS:10000,MAXBUFFER:5*1024},sourceMenuTitle:["TeXCommands","TeX Commands"],annotationEncoding:"application/x-tex",prefilterHooks:MathJax.Callback.Hooks(true),postfilterHooks:MathJax.Callback.Hooks(true),Config:function(){this.SUPER(arguments).Config.apply(this,arguments);if(this.config.equationNumbers.autoNumber!=="none"){if(!this.config.extensions){this.config.extensions=[]}this.config.extensions.push("AMSmath.js")}},Translate:function(l){var m,n=false,p=MathJax.HTML.getScript(l);var r=(l.type.replace(/\n/g," ").match(/(;|\s|\n)mode\s*=\s*display(;|\s|\n|$)/)!=null);var q={math:p,display:r,script:l};this.prefilterHooks.Execute(q);p=q.math;try{m=d.Parse(p).mml()}catch(o){if(!o.texError){throw o}m=this.formatError(o,p,r,l);n=true}if(m.inferred){m=h.apply(MathJax.ElementJax,m.data)}else{m=h(m)}if(r){m.root.display="block"}if(n){m.texError=true}q.math=m;this.postfilterHooks.Execute(q);return q.math},prefilterMath:function(m,n,l){return m},postfilterMath:function(m,n,l){this.combineRelations(m.root);return m},formatError:function(o,n,p,l){var m=o.message.replace(/\n.*/,"");c.signal.Post(["TeX Jax - parse error",m,n,p,l]);return h.Error(m)},Error:function(l){if(l instanceof Array){l=j.apply(j,l)}throw c.Insert(Error(l),{texError:true})},Macro:function(l,m,n){f.macros[l]=["Macro"].concat([].slice.call(arguments,1));f.macros[l].isUser=true},fenced:function(n,m,o){var l=h.mrow().With({open:n,close:o,texClass:h.TEXCLASS.INNER});if(n){l.Append(h.mo(n).With({fence:true,stretchy:true,texClass:h.TEXCLASS.OPEN}))}if(m.type==="mrow"){l.Append.apply(l,m.data)}else{l.Append(m)}if(o){l.Append(h.mo(o).With({fence:true,stretchy:true,texClass:h.TEXCLASS.CLOSE}))}return l},combineRelations:function(p){var q,l,o,n;for(q=0,l=p.data.length;qthis.data.length){this.selection=1}var k=this;while(k.type!=="math"){k=k.inherit}var h=MathJax.Hub.getJaxFor(k.inputID),j=!!h.hover;h.Update();if(j){var i=document.getElementById(h.inputID+"-Span");MathJax.Extension.MathEvents.Hover.Hover(h,i)}return MathJax.Extension.MathEvents.Event.False(l)},HTMLsetStatus:function(h){this.messageID=MathJax.Message.Set((this.data[1]&&this.data[1].isToken)?this.data[1].data.join(""):this.data[1].toString())},HTMLclearStatus:function(h){if(this.messageID){MathJax.Message.Clear(this.messageID,0)}delete this.messageID},HTMLtooltipOver:function(i){if(!i){i=window.event}if(b){clearTimeout(b);b=null}if(f){clearTimeout(f)}var h=i.pageX;var k=i.pageY;if(h==null){h=i.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;k=i.clientY+document.body.scrollTop+document.documentElement.scrollTop}var j=MathJax.Callback(["HTMLtooltipPost",this,h+a.offsetX,k+a.offsetY]);f=setTimeout(j,a.delayPost)},HTMLtooltipOut:function(h){if(f){clearTimeout(f);f=null}if(b){clearTimeout(b)}var i=MathJax.Callback(["HTMLtooltipClear",this,80]);b=setTimeout(i,a.delayClear)},HTMLtooltipPost:function(o,m){f=null;if(b){clearTimeout(b);b=null}var p=this.HTMLtooltip;p.style.display="block";p.style.opacity="";p.style.filter=e.config.styles["#MathJax_Tooltip"].filter;if(this===d){return}p.style.left=o+"px";p.style.top=m+"px";p.innerHTML='';var q=p.insertBefore(e.EmExSpan.cloneNode(true),p.firstChild);var l=q.firstChild.offsetHeight/60,h=q.lastChild.firstChild.offsetHeight/60;e.em=e.outerEm=c.mbase.prototype.em=h;var i=Math.floor(Math.max(e.config.minScaleAdjust/100,(l/e.TeX.x_height)/h)*e.config.scale);p.firstChild.style.fontSize=i+"%";q.parentNode.removeChild(q);var n=e.createStack(p.firstChild.firstChild);var k=e.createBox(n);try{e.Measured(this.data[1].toHTML(k),k)}catch(j){if(!j.restart){throw j}p.style.display="none";MathJax.Callback.After(["HTMLtooltipPost",this,o,m],j.restart);return}e.placeBox(k,0,0);e.createRule(p.firstChild.firstChild,k.bbox.h,k.bbox.d,0);d=this},HTMLtooltipClear:function(i){var h=this.HTMLtooltip;if(i<=0){h.style.display="none";h.style.opacity=h.style.filter="";b=null}else{h.style.opacity=i/100;h.style.filter="alpha(opacity="+i+")";b=setTimeout(MathJax.Callback(["HTMLtooltipClear",this,i-20]),50)}}});MathJax.Hub.Browser.Select({MSIE:function(h){e.msieHitBoxBug=true}});MathJax.Hub.Startup.signal.Post("HTML-CSS maction Ready");MathJax.Ajax.loadComplete(e.autoloadDir+"/maction.js")}); diff --git a/docs/_static/jax/output/HTML-CSS/autoload/menclose.js b/docs/_static/jax/output/HTML-CSS/autoload/menclose.js deleted file mode 100644 index 518d274..0000000 --- a/docs/_static/jax/output/HTML-CSS/autoload/menclose.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/output/HTML-CSS/autoload/menclose.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var d="2.4.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];var c="http://www.w3.org/2000/svg";var f="urn:schemas-microsoft-com:vml";var e="mjxvml";a.menclose.Augment({toHTML:function(ac){var j=this.getValues("notation","thickness","padding","mathcolor","color");if(j.color&&!this.mathcolor){j.mathcolor=j.color}if(j.thickness==null){j.thickness=".075em"}if(j.padding==null){j.padding=".2em"}ac=this.HTMLcreateSpan(ac);var V=this.HTMLgetMu(ac),af=this.HTMLgetScale();var X=b.length2em(j.padding,V,1/b.em)*af;var N=b.length2em(j.thickness,V,1/b.em)*af;N=Math.max(1/b.em,N);var E=b.Em(N)+" solid";var z=b.createStack(ac);var v=b.createBox(z);this.HTMLmeasureChild(0,v);var K=v.bbox.h+X+N,P=v.bbox.d+X+N,o=v.bbox.w+2*(X+N);var O=b.createFrame(z,K+P,0,o,N,"none");O.id="MathJax-frame-"+this.spanID;b.addBox(z,O);z.insertBefore(O,v);var s=0,U=0,u=0,A=0,M=0,J=0;var S,g;var I,ad,Q;if(!j.mathcolor){j.mathcolor="black"}else{ac.style.color=j.mathcolor}var k=MathJax.Hub.SplitList(j.notation),q={};for(var ab=0,Z=k.length;abj.bbox.rw){j.bbox.rw=j.bbox.w}if(k.bbox.h>j.bbox.h){j.bbox.h=k.bbox.h}if(k.bbox.d>j.bbox.d){j.bbox.d=k.bbox.d}}}this.HTMLhandleSpace(k);this.HTMLhandleColor(k);return k},HTMLimgLoaded:function(f,e){if(typeof(f)==="string"){e=f}this.img.status=(e||"OK")},HTMLimgError:function(){this.img.img.onload("error")}},{GLYPH:{}});MathJax.Hub.Startup.signal.Post("HTML-CSS mglyph Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/mglyph.js")}); diff --git a/docs/_static/jax/output/HTML-CSS/autoload/mmultiscripts.js b/docs/_static/jax/output/HTML-CSS/autoload/mmultiscripts.js deleted file mode 100644 index 2314ae4..0000000 --- a/docs/_static/jax/output/HTML-CSS/autoload/mmultiscripts.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/output/HTML-CSS/autoload/mmultiscripts.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var c="2.4.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.mmultiscripts.Augment({toHTML:function(L,J,E){L=this.HTMLcreateSpan(L);var R=this.HTMLgetScale();var n=b.createStack(L),g;var l=b.createBox(n);if(this.data[this.base]){var m=this.data[this.base].toHTML(l);if(E!=null){this.data[this.base].HTMLstretchV(l,J,E)}else{if(J!=null){this.data[this.base].HTMLstretchH(l,J)}}b.Measured(m,l)}else{l.bbox=this.HTMLzeroBBox()}var P=b.TeX.x_height*R,C=b.TeX.scriptspace*R*0.75;var B=this.HTMLgetScripts(n,C);var o=B[0],f=B[1],y=B[2],k=B[3];var j=R;for(var M=1;M0){z+=G;x-=G}}z=Math.max(z,K.superscriptshift);x=Math.max(x,K.subscriptshift);if(f){b.placeBox(f,w+l.bbox.w+C,z)}if(k){b.placeBox(k,w+Q-k.bbox.w,z)}if(o){b.placeBox(o,w+l.bbox.w+C-Q,-x)}if(y){b.placeBox(y,w-y.bbox.w,-x)}}}this.HTMLhandleSpace(L);this.HTMLhandleColor(L);var e=L.bbox;e.dx=w;e.s=C;e.u=z;e.v=x;e.delta=Q;e.px=w+l.bbox.w;return L},HTMLgetScripts:function(p,q){var o,d,e=[];var n=1,g=this.data.length,f=0;for(var h=0;h<4;h+=2){while(no.bbox.w){b.createBlank(o,d.bbox.w-o.bbox.w);o.bbox.w=d.bbox.w;o.bbox.rw=Math.max(o.bbox.w,o.bbox.rw)}}}if(d){f=d.bbox.w}else{if(o){f=o.bbox.w}}}n++;f=0}for(l=0;l<4;l++){if(e[l]){e[l].bbox.w+=q;e[l].bbox.rw=Math.max(e[l].bbox.w,e[l].bbox.rw);e[l].bbox.name=(["sub","sup","presub","presup"])[l];this.HTMLcleanBBox(e[l].bbox)}}return e},HTMLstretchH:a.mbase.HTMLstretchH,HTMLstretchV:a.mbase.HTMLstretchV});MathJax.Hub.Startup.signal.Post("HTML-CSS mmultiscripts Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/mmultiscripts.js")}); diff --git a/docs/_static/jax/output/HTML-CSS/autoload/ms.js b/docs/_static/jax/output/HTML-CSS/autoload/ms.js deleted file mode 100644 index cc0c9dc..0000000 --- a/docs/_static/jax/output/HTML-CSS/autoload/ms.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/output/HTML-CSS/autoload/ms.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var c="2.4.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.ms.Augment({toHTML:function(e){e=this.HTMLhandleSize(this.HTMLcreateSpan(e));var d=this.getValues("lquote","rquote");var f=this.data.join("");this.HTMLhandleVariant(e,this.HTMLgetVariant(),d.lquote+f+d.rquote);this.HTMLhandleSpace(e);this.HTMLhandleColor(e);this.HTMLhandleDir(e);return e}});a.ms.prototype.defaults.mathvariant="monospace";MathJax.Hub.Startup.signal.Post("HTML-CSS ms Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/ms.js")}); diff --git a/docs/_static/jax/output/HTML-CSS/autoload/mtable.js b/docs/_static/jax/output/HTML-CSS/autoload/mtable.js deleted file mode 100644 index 9baebd7..0000000 --- a/docs/_static/jax/output/HTML-CSS/autoload/mtable.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/output/HTML-CSS/autoload/mtable.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var c="2.4.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.mtable.Augment({toHTML:function(t){t=this.HTMLcreateSpan(t);if(this.data.length===0){return t}var K=this.getValues("columnalign","rowalign","columnspacing","rowspacing","columnwidth","equalcolumns","equalrows","columnlines","rowlines","frame","framespacing","align","useHeight","width","side","minlabelspacing");var aI=K.width.match(/%$/);var ax=b.createStack(t);var aF=this.HTMLgetScale(),az=this.HTMLgetMu(t),aA=-1;var ap=[],at=[],ak=[],av=[],au=[],af,ae,ao=-1,ad,an,Z,aE,R,aB,aN=[],aS;var I=b.FONTDATA.lineH*aF*K.useHeight,O=b.FONTDATA.lineD*aF*K.useHeight;for(af=0,ad=this.data.length;afao){ao=ae}au[ae]=b.createStack(b.createBox(ax));ak[ae]=-b.BIGDIMEN}av[af][ae]=b.createBox(au[ae]);aN.push(aE.data[ae-Z].toHTML(av[af][ae]))}}b.MeasureSpans(aN);for(af=0,ad=this.data.length;afap[af]){ap[af]=aR*aK.h/aS}if(aR*aK.d/aS>at[af]){at[af]=aR*aK.d/aS}}}else{if(aB.HTMLcanStretch("Horizontal")){aR=b.length2em(aR,az,aK.w);if(aR>ak[ae]){ak[ae]=aR}}}}}if(av[af][ae].bbox.h>ap[af]){ap[af]=av[af][ae].bbox.h}if(av[af][ae].bbox.d>at[af]){at[af]=av[af][ae].bbox.d}if(av[af][ae].bbox.w>ak[ae]){ak[ae]=av[af][ae].bbox.w}}}var aD=MathJax.Hub.SplitList;var ay=aD(K.columnspacing),aP=aD(K.rowspacing),e=aD(K.columnalign),E=aD(K.rowalign),d=aD(K.columnlines),z=aD(K.rowlines),aL=aD(K.columnwidth),V=[];for(af=0,ad=ay.length;afav.length){ab=av.length}}aj=0;aT=-(aS+aG)+ap[0];for(af=0,ad=ab-1;af0.98){S=0.98/ag;ag=0.98}}else{if(K.width==="auto"){if(ag>0.98){S=L/(B+L);ac=B+L}else{ac=B/(1-ag)}}else{ac=b.length2em(K.width,az);for(af=0,ad=Math.min(ao+1,ay.length);af0.01){if(ah&&ac>B){ac=(ac-B)/ah;for(af=0,ad=ar.length;afap[af]){av[af][ae].bbox.H=av[af][ae].bbox.h;av[af][ae].bbox.h=ap[af]}if(av[af][ae].bbox.d>at[af]){av[af][ae].bbox.D=av[af][ae].bbox.d;av[af][ae].bbox.d=at[af]}aB.symmetric=aJ}}aQ=R.rowalign||this.data[af].rowalign||E[af];o=({top:ap[af]-av[af][ae].bbox.h,bottom:av[af][ae].bbox.d-at[af],center:((ap[af]-at[af])-(av[af][ae].bbox.h-av[af][ae].bbox.d))/2,baseline:0,axis:0})[aQ]||0;aQ=(R.columnalign||V[af][ae]||e[ae]);b.alignBox(av[af][ae],aQ,T+o)}if(af=b.linebreakWidth||i.penalty===e.newline)){this.HTMLaddLine(m,g,i.index,f,i.values,j);g=i.index.slice(0);j=true;k=this.HTMLgetAlign(f,i.values);h=this.HTMLgetShift(f,i.values,k);if(k===a.INDENTALIGN.CENTER){h=0}i.W=i.shift=i.scanW=h;i.penalty=e.nobreak}f.isLast=true;this.HTMLaddLine(m,g,[],f,c,j);if(l){m.style.width="100%";if(o.type==="math"){n.bbox.width="100%"}}this.HTMLhandleSpace(n);this.HTMLhandleColor(n);n.bbox.isMultiline=true;return n},HTMLbetterBreak:function(h,f){if(this.isToken){return false}if(this.isEmbellished()){h.embellished=this;return this.CoreMO().HTMLbetterBreak(h,f)}if(this.linebreakContainer){return false}var p=h.index.slice(0),n=h.index.shift(),l=this.data.length,k,q,j,o=(h.index.length>0),g=false;if(n==null){n=-1}if(!o){n++;h.W+=h.w;h.w=0}j=h.scanW=h.W;h.nest++;while(n0){var k=b.FONTDATA.baselineskip*f.scale;var i=(f.values.lineleading==null?f.VALUES:f.values).lineleading*f.scale;f.Y-=Math.max(k,f.d+line.bbox.h+i)}b.alignBox(line,m,f.Y);f.d=line.bbox.d;f.values=o;f.n++},HTMLgetAlign:function(i,f){var j=f,g=i.values,h=i.VALUES,k;if(i.n===0){k=j.indentalignfirst||g.indentalignfirst||h.indentalignfirst}else{if(i.isLast){k=g.indentalignlast||h.indentalignlast}else{k=g.indentalign||h.indentalign}}if(k===a.INDENTALIGN.INDENTALIGN){k=g.indentalign||h.indentalign}if(k===a.INDENTALIGN.AUTO){k=(i.isTop?this.displayAlign:a.INDENTALIGN.LEFT)}return k},HTMLgetShift:function(j,g,l){if(l===a.INDENTALIGN.CENTER){return 0}var k=g,h=j.values,i=j.VALUES,f;if(j.n===0){f=k.indentshiftfirst||h.indentshiftfirst||i.indentshiftfirst}else{if(j.isLast){f=h.indentshiftlast||i.indentshiftlast}else{f=h.indentshift||i.indentshift}}if(f===a.INDENTSHIFT.INDENTSHIFT){f=h.indentshift||i.indentshift}if(f==="auto"||f===""){f=(j.isTSop?this.displayIndent:"0")}return b.length2em(f,0)},HTMLmoveLine:function(o,f,l,n,g){var k=o[0],h=f[0];if(k==null){k=-1}if(h==null){h=this.data.length-1}if(k===h&&o.length>1){this.data[k].HTMLmoveSlice(o.slice(1),f.slice(1),l,n,g,"paddingLeft")}else{var m=n.last;n.last=false;while(k0),g=false;if(r==null){r=-1}if(!s){r++;h.W+=h.w;h.w=0}l=h.scanW=h.W;h.nest++;if(!this.dataI){this.dataI=[];if(this.data.open){this.dataI.push("open")}if(o){this.dataI.push(0)}for(var q=1;q1){this.data[this.dataI[n]].HTMLmoveSlice(g.slice(1),l.slice(1),o,f,q,"paddingLeft")}else{var p=f.last;f.last=false;var h=this.dataI[n];while(n0),g=false;if(!m){h.W+=h.w;h.w=0}j=h.scanW=h.W;if(l==null){this.HTMLbaseW=this.data[this.base].HTMLspanElement().bbox.w;this.HTMLdw=this.HTMLspanElement().bbox.w-this.HTMLbaseW}if(this.data[this.base].HTMLbetterBreak(h,f)){g=true;n=[this.base].concat(h.index);k=h.W;o=h.w;if(h.penalty===e.newline){g=m=true}}if(!m){this.HTMLaddWidth(this.base,h,j)}h.scanW+=this.HTMLdw;h.W=h.scanW;h.index=[];if(g){h.W=k;h.w=o;h.index=n}return g},HTMLmoveLine:function(m,g,j,l,h){if(this.data[this.base]){if(m.length>1){this.data[this.base].HTMLmoveSlice(m.slice(1),g.slice(1),j,l,h,"paddingLeft")}else{if(g.length<=1){this.data[this.base].HTMLmoveSpan(j,l,h)}else{this.data[this.base].HTMLmoveSlice([],g.slice(1),j,l,h,"paddingRight")}}}if(g.length===0){var i=this.data[this.sup]||this.data[this.sub];if(i){var k=i.HTMLspanElement().parentNode,f=k.parentNode;if(this.data[this.base]){f.removeChild(f.firstChild)}for(k=f.firstChild;k;k=k.nextSibling){k.style.left=b.Em(b.unEm(k.style.left)-this.HTMLbaseW)}f.bbox.w-=this.HTMLbaseW;f.style.width=b.Em(f.bbox.w);this.HTMLcombineBBoxes(f,j.bbox);j.appendChild(f)}}}});a.mmultiscripts.Augment({HTMLbetterBreak:function(k,g){if(!this.data[this.base]){return false}var p=k.index.slice(0),n=k.index.shift(),m,q,l,o=(k.index.length>0),j=false;if(!o){k.W+=k.w;k.w=0}k.scanW=k.W;var r=this.HTMLspanElement().bbox,h=this.data[this.base].HTMLspanElement().bbox;var f=r.w-h.w;k.scanW+=r.dx;l=k.scanW;if(this.data[this.base].HTMLbetterBreak(k,g)){j=true;p=[this.base].concat(k.index);m=k.W;q=k.w;if(k.penalty===e.newline){j=o=true}}if(!o){this.HTMLaddWidth(this.base,k,l)}k.scanW+=f;k.W=k.scanW;k.index=[];if(j){k.W=m;k.w=q;k.index=p}return j},HTMLmoveLine:function(h,i,o,g,p){var m=this.HTMLspanElement(),k=m.bbox,n=m.firstChild,f={};if(b.msiePaddingWidthBug){n=n.nextSibling}var l=n.firstChild;while(l){if(l.bbox&&l.bbox.name){f[l.bbox.name]=l}l=l.nextSibling}if(h.length<1){if(f.presub||f.presup){var j=b.createStack(o);if(f.presup){b.addBox(j,f.presup);b.placeBox(f.presup,k.dx-f.presup.bbox.w,k.u)}if(f.presub){b.addBox(j,f.presub);b.placeBox(f.presub,k.dx+k.delta-f.presub.bbox.w,-k.v)}this.HTMLcombineBBoxes(j,o.bbox);o.appendChild(j);j.style.width=b.Em(k.dx)}}if(this.data[this.base]){if(h.length>1){this.data[this.base].HTMLmoveSlice(h.slice(1),i.slice(1),o,g,p,"paddingLeft")}else{if(i.length<=1){this.data[this.base].HTMLmoveSpan(o,g,p)}else{this.data[this.base].HTMLmoveSlice([],i.slice(1),o,g,p,"paddingRight")}}}if(i.length===0){if(this.data[this.base]){n.removeChild(n.firstChild)}for(l=n.firstChild;l;l=l.nextSibling){l.style.left=b.Em(b.unEm(l.style.left)-k.px)}n.bbox.w-=k.px;n.style.width=b.Em(n.bbox.w);this.HTMLcombineBBoxes(n,o.bbox);o.appendChild(n)}}});a.mo.Augment({HTMLbetterBreak:function(h,f){if(h.values&&h.values.id===this.spanID){return false}var p=this.getValues("linebreak","linebreakstyle","lineleading","linebreakmultchar","indentalign","indentshift","indentalignfirst","indentshiftfirst","indentalignlast","indentshiftlast","texClass","fence");if(p.linebreakstyle===a.LINEBREAKSTYLE.INFIXLINEBREAKSTYLE){p.linebreakstyle=this.Get("infixlinebreakstyle")}if(p.texClass===a.TEXCLASS.OPEN){h.nest++}if(p.texClass===a.TEXCLASS.CLOSE&&h.nest){h.nest--}var i=h.scanW,j=(h.embellished||this);delete h.embellished;var n=j.HTMLspanElement(),o=n.bbox.w;if(n.style.paddingLeft){o+=b.unEm(n.style.paddingLeft)}if(p.linebreakstyle===a.LINEBREAKSTYLE.AFTER){i+=o;o=0}if(i-h.shift===0&&p.linebreak!==a.LINEBREAK.NEWLINE){return false}var k=b.linebreakWidth-i;if(f.n===0&&(p.indentshiftfirst!==f.VALUES.indentshiftfirst||p.indentalignfirst!==f.VALUES.indentalignfirst)){var l=this.HTMLgetAlign(f,p),g=this.HTMLgetShift(f,p,l);k+=(h.shift-g)}var m=Math.floor(k/b.linebreakWidth*1000);if(m<0){m=e.toobig-3*m}if(p.fence){m+=e.fence}if((p.linebreakstyle===a.LINEBREAKSTYLE.AFTER&&p.texClass===a.TEXCLASS.OPEN)||p.texClass===a.TEXCLASS.CLOSE){m+=e.close}m+=h.nest*e.nestfactor;var q=e[p.linebreak||a.LINEBREAK.AUTO];if(!(q instanceof Array)){if(k>=0){m=q*h.nest}}else{m=Math.max(1,m+q[0]*h.nest)}if(m>=h.penalty){return false}h.penalty=m;h.values=p;h.W=i;h.w=o;p.lineleading=b.length2em(p.lineleading,f.VALUES.lineleading);p.id=this.spanID;return true}});a.mspace.Augment({HTMLbetterBreak:function(g,f){if(g.values&&g.values.id===this.spanID){return false}var n=this.getValues("linebreak");var k=n.linebreak;if(!k||this.hasDimAttr()){k=a.LINEBREAK.AUTO}var h=g.scanW,l=this.HTMLspanElement(),m=l.bbox.w;if(l.style.paddingLeft){m+=b.unEm(l.style.paddingLeft)}if(h-g.shift===0){return false}var i=b.linebreakWidth-h;var j=Math.floor(i/b.linebreakWidth*1000);if(j<0){j=e.toobig-3*j}j+=g.nest*e.nestfactor;var o=e[k];if(k===a.LINEBREAK.AUTO&&m>=e.spacelimit&&!this.mathbackground&&!this.background){o=[(m+e.spaceoffset)*e.spacefactor]}if(!(o instanceof Array)){if(i>=0){j=o*g.nest}}else{j=Math.max(1,j+o[0]*g.nest)}if(j>=g.penalty){return false}g.penalty=j;g.values=n;g.W=h;g.w=m;n.lineleading=f.VALUES.lineleading;n.linebreakstyle="before";n.id=this.spanID;return true}});MathJax.Hub.Register.StartupHook("TeX mathchoice Ready",function(){a.TeXmathchoice.Augment({HTMLbetterBreak:function(g,f){return this.Core().HTMLbetterBreak(g,f)},HTMLmoveLine:function(j,f,h,i,g){return this.Core().HTMLmoveSlice(j,f,h,i,g)}})});a.maction.Augment({HTMLbetterBreak:function(g,f){return this.Core().HTMLbetterBreak(g,f)},HTMLmoveLine:function(j,f,h,i,g){return this.Core().HTMLmoveSlice(j,f,h,i,g)},HTMLmoveSlice:function(g,i,l,f,m,j){var o=document.getElementById("MathJax-HitBox-"+this.spanID+b.idPostfix);if(o){o.parentNode.removeChild(o)}var k=this.SUPER(arguments).HTMLmoveSlice.apply(this,arguments);if(i.length===0){l=this.HTMLspanElement();var h=0;while(l){o=this.HTMLhandleHitBox(l,"-Continue-"+h);l=l.nextMathJaxSpan;h++}}return k}});a.semantics.Augment({HTMLbetterBreak:function(g,f){return(this.data[0]?this.data[0].HTMLbetterBreak(g,f):false)},HTMLmoveLine:function(j,f,h,i,g){return(this.data[0]?this.data[0].HTMLmoveSlice(j,f,h,i,g):null)}});MathJax.Hub.Startup.signal.Post("HTML-CSS multiline Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/multiline.js")}); diff --git a/docs/_static/jax/output/HTML-CSS/blank.gif b/docs/_static/jax/output/HTML-CSS/blank.gif deleted file mode 100644 index 8b27096..0000000 Binary files a/docs/_static/jax/output/HTML-CSS/blank.gif and /dev/null differ diff --git a/docs/_static/jax/output/HTML-CSS/config.js b/docs/_static/jax/output/HTML-CSS/config.js deleted file mode 100644 index 1f012ca..0000000 --- a/docs/_static/jax/output/HTML-CSS/config.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/output/HTML-CSS/config.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.OutputJax["HTML-CSS"]=MathJax.OutputJax({id:"HTML-CSS",version:"2.4.0",directory:MathJax.OutputJax.directory+"/HTML-CSS",extensionDir:MathJax.OutputJax.extensionDir+"/HTML-CSS",autoloadDir:MathJax.OutputJax.directory+"/HTML-CSS/autoload",fontDir:MathJax.OutputJax.directory+"/HTML-CSS/fonts",webfontDir:MathJax.OutputJax.fontDir+"/HTML-CSS",config:{matchFontHeight:true,scale:100,minScaleAdjust:50,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFont:"TeX",undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",mtextFontInherit:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_Display":{"text-align":"center",margin:"1em 0em"},".MathJax .merror":{"background-color":"#FFFF88",color:"#CC0000",border:"1px solid #CC0000",padding:"1px 3px","font-style":"normal","font-size":"90%"},".MathJax .MJX-monospace":{"font-family":"monospace"},".MathJax .MJX-sans-serif":{"font-family":"sans-serif"},"#MathJax_Tooltip":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')",padding:"3px 4px","z-index":401}}}});if(MathJax.Hub.Browser.isMSIE&&document.documentMode>=9){delete MathJax.OutputJax["HTML-CSS"].config.styles["#MathJax_Tooltip"].filter}if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax["HTML-CSS"].Register("jax/mml")}MathJax.Hub.Register.StartupHook("End Config",[function(b,c){var a=b.Insert({minBrowserVersion:{Firefox:3,Opera:9.52,MSIE:6,Chrome:0.3,Safari:2,Konqueror:4},inlineMathDelimiters:["$","$"],displayMathDelimiters:["$$","$$"],multilineDisplay:true,minBrowserTranslate:function(f){var e=b.getJaxFor(f),k=["[Math]"],j;var h=document.createElement("span",{className:"MathJax_Preview"});if(e.inputJax==="TeX"){if(e.root.Get("displaystyle")){j=a.displayMathDelimiters;k=[j[0]+e.originalText+j[1]];if(a.multilineDisplay){k=k[0].split(/\n/)}}else{j=a.inlineMathDelimiters;k=[j[0]+e.originalText.replace(/^\s+/,"").replace(/\s+$/,"")+j[1]]}}for(var g=0,d=k.length;g T d \u23A6 \u2A00",skew:{84:0.0278,58096:0.0319},32:[0,0,250,0,0],62:[540,40,778,83,694],84:[717,68,545,34,833],100:[694,11,511,101,567],160:[0,0,250,0,0],8899:[750,249,833,55,777],9126:[1155,644,667,0,347],10752:[949,449,1511,56,1454],58096:[720,69,644,38,947],58097:[587,85,894,96,797]};MathJax.Callback.Queue(["initFont",MathJax.OutputJax["HTML-CSS"],"MathJax_WinChrome"],["loadComplete",MathJax.Ajax,MathJax.OutputJax["HTML-CSS"].fontDir+"/WinChrome/Regular/Main.js"]); diff --git a/docs/_static/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js b/docs/_static/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js deleted file mode 100644 index 9b11058..0000000 --- a/docs/_static/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.MathJax_WinIE6,{58048:[437,-64,500,58,417],58049:[437,-64,500,64,422],58050:[430,23,222,91,131],58051:[431,23,389,55,331],58052:[365,-132,778,55,719],58053:[753,175,778,83,694],58054:[753,175,778,83,694],58055:[708,209,778,82,693],58056:[708,209,778,82,693],58058:[694,-306,500,55,444],58059:[694,-306,500,55,444],58060:[366,22,500,55,444],58061:[366,22,500,55,444],58062:[694,195,889,0,860],58063:[694,195,889,0,860],58064:[689,0,778,55,722],58065:[689,0,778,55,722],58066:[575,20,722,84,637],58067:[575,20,722,84,637],58068:[539,41,778,83,694],58069:[576,19,722,84,637],58070:[576,19,722,84,637],58071:[539,41,778,83,694],58072:[716,132,667,56,611],58073:[471,82,667,24,643],58074:[471,82,667,23,643],58075:[601,101,778,15,762],58076:[694,111,944,49,895],58077:[367,-133,778,56,722]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/WinIE6/Regular/AMS.js"); diff --git a/docs/_static/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js b/docs/_static/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js deleted file mode 100644 index 740a107..0000000 --- a/docs/_static/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.MathJax_WinIE6,{57920:[518,17,1150,64,1084],57921:[694,193,575,14,561],57922:[518,17,1150,65,1085],57923:[694,194,575,14,561],57924:[518,17,1150,64,1085],57925:[767,267,575,14,561],57926:[724,194,1150,64,1084],57927:[724,193,1150,64,1085],57928:[694,224,1150,65,1085],57929:[694,224,1150,64,1085],57930:[547,46,1150,64,1084],57931:[547,46,1150,47,1102],57932:[694,16,639,1,640],57933:[710,17,628,60,657],57934:[694,-1,639,64,574],57935:[686,24,958,56,901],57936:[587,86,767,97,670],57937:[587,86,767,96,670],57938:[750,250,575,63,511],57939:[820,180,958,78,988],57940:[451,8,894,65,830],57941:[452,8,1150,65,1084],57942:[714,0,722,55,676],57943:[750,249,319,129,190],57944:[750,248,575,145,430],57945:[604,17,767,64,702],57946:[604,16,767,64,702],57947:[603,16,767,64,702],57948:[604,16,767,64,702],57949:[711,211,569,64,632],57950:[391,-109,894,64,828],57951:[524,-32,894,64,829],57952:[711,210,894,64,829],57953:[505,3,894,64,829],57954:[697,199,894,96,797],57955:[697,199,894,96,797],57956:[617,116,1150,64,1085],57957:[618,116,1150,64,1085],57958:[587,85,894,96,797],57959:[587,86,894,96,796],57960:[697,199,894,96,797],57961:[697,199,894,96,796],57962:[632,132,894,64,828],57963:[632,132,894,64,828],57964:[693,-1,894,65,829],57965:[711,-1,1022,69,953],57966:[500,210,1022,68,953],57967:[711,211,1150,65,1084],57968:[719,129,894,64,829],57969:[711,24,894,65,828],57970:[719,154,894,64,828],57971:[719,129,894,32,861],57972:[750,17,447,64,381],57973:[741,223,447,57,389],57974:[724,224,447,63,382]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/WinIE6/Regular/Bold.js"); diff --git a/docs/_static/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js b/docs/_static/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js deleted file mode 100644 index d84875e..0000000 --- a/docs/_static/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.MathJax_WinIE6={directory:"WinIE6/Regular",family:"MathJax_WinIE6",testString:"\uE247 \uE257 \uE2CF",skew:{57869:0.0833,57933:0.0958},Ranges:[[57920,57983,"Bold"],[58048,58079,"AMS"]],32:[0,0,250,0,0],160:[0,0,250,0,0],57856:[511,11,1000,55,944],57857:[694,193,500,17,483],57858:[511,11,1000,56,944],57859:[694,194,500,17,483],57860:[511,11,1000,55,944],57861:[772,272,500,17,483],57862:[720,195,1000,29,944],57863:[720,195,1000,55,970],57864:[695,220,1000,55,970],57865:[695,220,1000,29,944],57866:[525,24,1000,56,944],57867:[526,25,1000,34,966],57868:[694,22,556,0,556],57869:[715,22,531,42,566],57870:[694,0,556,56,500],57871:[683,33,833,46,786],57872:[540,40,667,84,583],57873:[540,40,667,83,582],57874:[750,250,500,56,445],57875:[800,200,833,72,853],57876:[442,11,778,56,722],57877:[442,11,1000,55,944],57878:[694,0,722,55,666],57879:[750,249,278,119,159],57880:[750,250,500,132,367],57881:[598,22,667,55,611],57882:[598,22,667,55,611],57883:[598,22,667,55,611],57884:[598,22,667,55,611],57885:[716,216,417,55,472],57886:[367,-133,778,55,722],57887:[483,-55,778,55,722],57888:[716,215,778,56,722],57889:[464,-36,778,56,722],57890:[636,138,778,83,694],57891:[636,138,778,83,694],57892:[568,67,1000,56,944],57893:[567,67,1000,55,944],57894:[540,40,778,84,694],57895:[540,40,778,83,693],57896:[636,138,778,84,694],57897:[636,138,778,83,693],57898:[583,83,778,56,722],57899:[583,83,778,56,722],57900:[668,0,778,55,723],57901:[716,0,889,59,828],57902:[500,215,889,59,828],57903:[715,215,1000,56,944],57904:[727,130,778,55,723],57905:[716,33,778,55,723],57906:[727,162,778,55,723],57907:[726,130,778,28,750],57908:[750,22,389,55,332],57909:[734,223,389,65,324],57910:[723,223,389,55,333],57984:[0,1000,944,55,888],57985:[0,1000,1056,56,999],57986:[40,1160,1000,111,1020],57987:[21,621,333,145,188],57988:[21,621,556,145,410],57989:[0,1111,472,55,610],57990:[0,1111,472,55,610],57991:[0,600,667,112,555],57992:[0,600,667,112,555],57993:[1,601,667,312,355],58000:[0,1400,1278,56,1221],58001:[0,1400,1444,55,1388],58002:[40,1760,1000,111,1020],58005:[0,2222,556,55,944],58006:[0,2222,556,55,944],58018:[40,2360,1000,111,1020],58034:[40,2960,1000,111,1020]};MathJax.Callback.Queue(["initFont",MathJax.OutputJax["HTML-CSS"],"MathJax_WinIE6"],["loadComplete",MathJax.Ajax,MathJax.OutputJax["HTML-CSS"].fontDir+"/WinIE6/Regular/Main.js"]); diff --git a/docs/_static/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js b/docs/_static/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js deleted file mode 100644 index 6b88b56..0000000 --- a/docs/_static/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(g){var l="2.4.0";var k=g.FONTDATA.DELIMITERS;var f="MathJax_Main",h="MathJax_Main-bold",i="MathJax_AMS",d="MathJax_Size1",a="MathJax_Size4";var j="H",e="V";var c={61:{dir:j,HW:[[0.767,f]],stretch:{rep:[61,f]}},8606:{dir:j,HW:[[1,i]],stretch:{left:[8606,i],rep:[8722,f]}},8608:{dir:j,HW:[[1,i]],stretch:{right:[8608,i],rep:[8722,f]}},8612:{dir:j,HW:[],stretch:{min:1,left:[8592,f],rep:[8722,f],right:[8739,d,0,-0.05,0.9]}},8613:{dir:e,HW:[],stretch:{min:0.6,bot:[8869,h,0,0,0.75],ext:[9168,d],top:[8593,d]}},8614:{dir:j,HW:[[1,f]],stretch:{left:[8739,d,-0.09,-0.05,0.9],rep:[8722,f],right:[8594,f]}},8615:{dir:e,HW:[],stretch:{min:0.6,top:[8868,h,0,0,0.75],ext:[9168,d],bot:[8595,d]}},8624:{dir:e,HW:[[0.722,i]],stretch:{top:[8624,i],ext:[9168,d,0.097]}},8625:{dir:e,HW:[[0.722,i]],stretch:{top:[8625,i,0.27],ext:[9168,d]}},8636:{dir:j,HW:[[1,f]],stretch:{left:[8636,f],rep:[8722,f]}},8637:{dir:j,HW:[[1,f]],stretch:{left:[8637,f],rep:[8722,f]}},8638:{dir:e,HW:[[0.888,i]],stretch:{top:[8638,i,0.12,0,1.1],ext:[9168,d]}},8639:{dir:e,HW:[[0.888,i]],stretch:{top:[8639,i,0.12,0,1.1],ext:[9168,d]}},8640:{dir:j,HW:[[1,f]],stretch:{right:[8640,f],rep:[8722,f]}},8641:{dir:j,HW:[[1,f]],stretch:{right:[8641,f],rep:[8722,f]}},8642:{dir:e,HW:[[0.888,i]],stretch:{bot:[8642,i,0.12,0,1.1],ext:[9168,d]}},8643:{dir:e,HW:[[0.888,i]],stretch:{bot:[8643,i,0.12,0,1.1],ext:[9168,d]}},8666:{dir:j,HW:[[1,i]],stretch:{left:[8666,i],rep:[8801,f]}},8667:{dir:j,HW:[[1,i]],stretch:{right:[8667,i],rep:[8801,f]}},9140:{dir:j,HW:[],stretch:{min:0.5,left:[9484,i,0,-0.1],rep:[8722,f,0,0.35],right:[9488,i,0,-0.1]}},9141:{dir:j,HW:[],stretch:{min:0.5,left:[9492,i,0,0.26],rep:[8722,f,0,0,0,0.25],right:[9496,i,0,0.26]}},9180:{dir:j,HW:[[0.778,i,0,8994],[1,f,0,8994]],stretch:{left:[57680,a],rep:[57684,a],right:[57681,a]}},9181:{dir:j,HW:[[0.778,i,0,8995],[1,f,0,8995]],stretch:{left:[57682,a],rep:[57684,a],right:[57683,a]}},9184:{dir:j,HW:[],stretch:{min:1.25,left:[714,f,-0.1],rep:[713,f,0,0.13],right:[715,f],fullExtenders:true}},9185:{dir:j,HW:[],stretch:{min:1.5,left:[715,f,-0.1,0.1],rep:[713,f],right:[714,f,-0.1,0.1],fullExtenders:true}},10502:{dir:j,HW:[],stretch:{min:1,left:[8656,f],rep:[61,f],right:[8739,d,0,-0.1]}},10503:{dir:j,HW:[],stretch:{min:0.7,left:[8872,i,0,-0.12],rep:[61,f],right:[8658,f]}},10574:{dir:j,HW:[],stretch:{min:0.5,left:[8636,f],rep:[8722,f],right:[8640,f]}},10575:{dir:e,HW:[],stretch:{min:0.5,top:[8638,i,0.12,0,1.1],ext:[9168,d],bot:[8642,i,0.12,0,1.1]}},10576:{dir:j,HW:[],stretch:{min:0.5,left:[8637,f],rep:[8722,f],right:[8641,f]}},10577:{dir:e,HW:[],stretch:{min:0.5,top:[8639,i,0.12,0,1.1],ext:[9168,d],bot:[8643,i,0.12,0,1.1]}},10586:{dir:j,HW:[],stretch:{min:1,left:[8636,f],rep:[8722,f],right:[8739,d,0,-0.05,0.9]}},10587:{dir:j,HW:[],stretch:{min:1,left:[8739,d,-0.05,-0.05,0.9],rep:[8722,f],right:[8640,f]}},10588:{dir:e,HW:[],stretch:{min:0.7,bot:[8869,h,0,0,0.75],ext:[9168,d],top:[8638,i,0.12,0,1.1]}},10589:{dir:e,HW:[],stretch:{min:0.7,top:[8868,h,0,0,0.75],ext:[9168,d],bot:[8642,i,0.12,0,1.1]}},10590:{dir:j,HW:[],stretch:{min:1,left:[8637,f],rep:[8722,f],right:[8739,d,0,-0.05,0.9]}},10591:{dir:j,HW:[],stretch:{min:1,left:[8739,d,-0.05,-0.05,0.9],rep:[8722,f],right:[8641,f]}},10592:{dir:e,HW:[],stretch:{min:0.7,bot:[8869,h,0,0,0.75],ext:[9168,d],top:[8639,i,0.12,0,1.1]}},10593:{dir:e,HW:[],stretch:{min:0.7,top:[8868,h,0,0,0.75],ext:[9168,d],bot:[8643,i,0.12,0,1.1]}}};for(var b in c){if(c.hasOwnProperty(b)){k[b]=c[b]}}MathJax.Ajax.loadComplete(g.fontDir+"/fontdata-extra.js")})(MathJax.OutputJax["HTML-CSS"]); diff --git a/docs/_static/jax/output/HTML-CSS/fonts/TeX/fontdata.js b/docs/_static/jax/output/HTML-CSS/fonts/TeX/fontdata.js deleted file mode 100644 index 1618c96..0000000 --- a/docs/_static/jax/output/HTML-CSS/fonts/TeX/fontdata.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/output/HTML-CSS/fonts/TeX/fontdata.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(g,k,l){var p="2.4.0";var f="MathJax_Main",j="MathJax_Main-bold",h="MathJax_Math-italic",m="MathJax_AMS",d="MathJax_Size1",c="MathJax_Size2",b="MathJax_Size3",a="MathJax_Size4";var n="H",e="V",i={load:"extra",dir:n},o={load:"extra",dir:e};g.Augment({FONTDATA:{version:p,TeX_factor:1,baselineskip:1.2,lineH:0.8,lineD:0.2,hasStyleChar:true,FONTS:{MathJax_Main:"Main/Regular/Main.js","MathJax_Main-bold":"Main/Bold/Main.js","MathJax_Main-italic":"Main/Italic/Main.js","MathJax_Math-italic":"Math/Italic/Main.js","MathJax_Math-bold-italic":"Math/BoldItalic/Main.js",MathJax_Caligraphic:"Caligraphic/Regular/Main.js",MathJax_Size1:"Size1/Regular/Main.js",MathJax_Size2:"Size2/Regular/Main.js",MathJax_Size3:"Size3/Regular/Main.js",MathJax_Size4:"Size4/Regular/Main.js",MathJax_AMS:"AMS/Regular/Main.js",MathJax_Fraktur:"Fraktur/Regular/Main.js","MathJax_Fraktur-bold":"Fraktur/Bold/Main.js",MathJax_SansSerif:"SansSerif/Regular/Main.js","MathJax_SansSerif-bold":"SansSerif/Bold/Main.js","MathJax_SansSerif-italic":"SansSerif/Italic/Main.js",MathJax_Script:"Script/Regular/Main.js",MathJax_Typewriter:"Typewriter/Regular/Main.js","MathJax_Caligraphic-bold":"Caligraphic/Bold/Main.js"},VARIANT:{normal:{fonts:[f,d,m],offsetG:945,variantG:"italic",remap:{913:65,914:66,917:69,918:90,919:72,921:73,922:75,924:77,925:78,927:79,929:80,932:84,935:88,8726:[8726,"-TeX-variant"],8463:[8463,"-TeX-variant"],8242:[39,"sans-serif-italic"],10744:[47,k.VARIANT.ITALIC]}},bold:{fonts:[j,d,m],bold:true,offsetG:945,variantG:"bold-italic",remap:{913:65,914:66,917:69,918:90,919:72,921:73,922:75,924:77,925:78,927:79,929:80,932:84,935:88,10744:[47,"bold-italic"],8602:"\u2190\u0338",8603:"\u2192\u0338",8622:"\u2194\u0338",8653:"\u21D0\u0338",8654:"\u21D4\u0338",8655:"\u21D2\u0338",8708:"\u2203\u0338",8740:"\u2223\u0338",8742:"\u2225\u0338",8769:"\u223C\u0338",8775:"\u2245\u0338",8814:"<\u0338",8815:">\u0338",8816:"\u2264\u0338",8817:"\u2265\u0338",8832:"\u227A\u0338",8833:"\u227B\u0338",8840:"\u2286\u0338",8841:"\u2287\u0338",8876:"\u22A2\u0338",8877:"\u22A8\u0338",8928:"\u227C\u0338",8929:"\u227D\u0338"}},italic:{fonts:[h,"MathJax_Main-italic",f,d,m],italic:true,remap:{913:65,914:66,917:69,918:90,919:72,921:73,922:75,924:77,925:78,927:79,929:80,932:84,935:88}},"bold-italic":{fonts:["MathJax_Math-bold-italic",j,d,m],bold:true,italic:true,remap:{913:65,914:66,917:69,918:90,919:72,921:73,922:75,924:77,925:78,927:79,929:80,932:84,935:88}},"double-struck":{fonts:[m,f]},fraktur:{fonts:["MathJax_Fraktur",f,d,m]},"bold-fraktur":{fonts:["MathJax_Fraktur-bold",j,d,m],bold:true},script:{fonts:["MathJax_Script",f,d,m]},"bold-script":{fonts:["MathJax_Script",j,d,m],bold:true},"sans-serif":{fonts:["MathJax_SansSerif",f,d,m]},"bold-sans-serif":{fonts:["MathJax_SansSerif-bold",j,d,m],bold:true},"sans-serif-italic":{fonts:["MathJax_SansSerif-italic","MathJax_Main-italic",d,m],italic:true},"sans-serif-bold-italic":{fonts:["MathJax_SansSerif-italic","MathJax_Main-italic",d,m],bold:true,italic:true},monospace:{fonts:["MathJax_Typewriter",f,d,m]},"-tex-caligraphic":{fonts:["MathJax_Caligraphic",f],offsetA:65,variantA:"italic"},"-tex-oldstyle":{fonts:["MathJax_Caligraphic",f]},"-tex-mathit":{fonts:["MathJax_Main-italic",h,f,d,m],italic:true,noIC:true,remap:{913:65,914:66,917:69,918:90,919:72,921:73,922:75,924:77,925:78,927:79,929:80,932:84,935:88}},"-TeX-variant":{fonts:[m,f,d],remap:{8808:57356,8809:57357,8816:57361,8817:57358,10887:57360,10888:57359,8740:57350,8742:57351,8840:57366,8841:57368,8842:57370,8843:57371,10955:57367,10956:57369,988:57352,1008:57353,8726:[8726,k.VARIANT.NORMAL],8463:[8463,k.VARIANT.NORMAL]}},"-largeOp":{fonts:[c,d,f]},"-smallOp":{fonts:[d,f]},"-tex-caligraphic-bold":{fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1"],bold:true,offsetA:65,variantA:"bold-italic"},"-tex-oldstyle-bold":{fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1"],bold:true}},RANGES:[{name:"alpha",low:97,high:122,offset:"A",add:32},{name:"number",low:48,high:57,offset:"N"},{name:"greek",low:945,high:1014,offset:"G"}],RULECHAR:8722,REMAP:{8254:713,8400:8636,8401:8640,8406:8592,8417:8596,8428:8641,8429:8637,8430:8592,8431:8594,8432:42,65079:9182,65080:9183,183:8901,697:8242,978:933,8213:8212,8215:95,8226:8729,8260:47,8965:8892,8966:10846,9642:9632,9652:9650,9653:9651,9656:9654,9662:9660,9663:9661,9666:9664,9001:10216,9002:10217,12296:10216,12297:10217,10072:8739,10799:215,9723:9633,9724:9632,8450:[67,k.VARIANT.DOUBLESTRUCK],8459:[72,k.VARIANT.SCRIPT],8460:[72,k.VARIANT.FRAKTUR],8461:[72,k.VARIANT.DOUBLESTRUCK],8462:[104,k.VARIANT.ITALIC],8464:[74,k.VARIANT.SCRIPT],8465:[73,k.VARIANT.FRAKTUR],8466:[76,k.VARIANT.SCRIPT],8469:[78,k.VARIANT.DOUBLESTRUCK],8473:[80,k.VARIANT.DOUBLESTRUCK],8474:[81,k.VARIANT.DOUBLESTRUCK],8475:[82,k.VARIANT.SCRIPT],8476:[82,k.VARIANT.FRAKTUR],8477:[82,k.VARIANT.DOUBLESTRUCK],8484:[90,k.VARIANT.DOUBLESTRUCK],8486:[937,k.VARIANT.NORMAL],8488:[90,k.VARIANT.FRAKTUR],8492:[66,k.VARIANT.SCRIPT],8493:[67,k.VARIANT.FRAKTUR],8496:[69,k.VARIANT.SCRIPT],8497:[70,k.VARIANT.SCRIPT],8499:[77,k.VARIANT.SCRIPT],8775:8774,8988:9484,8989:9488,8990:9492,8991:9496,8708:"\u2203\u0338",8716:"\u220B\u0338",8772:"\u2243\u0338",8777:"\u2248\u0338",8802:"\u2261\u0338",8813:"\u224D\u0338",8820:"\u2272\u0338",8821:"\u2273\u0338",8824:"\u2276\u0338",8825:"\u2277\u0338",8836:"\u2282\u0338",8837:"\u2283\u0338",8930:"\u2291\u0338",8931:"\u2292\u0338",10764:"\u222C\u222C",8243:"\u2032\u2032",8244:"\u2032\u2032\u2032",8246:"\u2035\u2035",8247:"\u2035\u2035\u2035",8279:"\u2032\u2032\u2032\u2032",8411:"...",8412:"...."},REMAPACCENT:{"\u2192":"\u20D7","\u2032":"'","\u2035":"`"},REMAPACCENTUNDER:{},PLANE1MAP:[[119808,119833,65,k.VARIANT.BOLD],[119834,119859,97,k.VARIANT.BOLD],[119860,119885,65,k.VARIANT.ITALIC],[119886,119911,97,k.VARIANT.ITALIC],[119912,119937,65,k.VARIANT.BOLDITALIC],[119938,119963,97,k.VARIANT.BOLDITALIC],[119964,119989,65,k.VARIANT.SCRIPT],[120068,120093,65,k.VARIANT.FRAKTUR],[120094,120119,97,k.VARIANT.FRAKTUR],[120120,120145,65,k.VARIANT.DOUBLESTRUCK],[120172,120197,65,k.VARIANT.BOLDFRAKTUR],[120198,120223,97,k.VARIANT.BOLDFRAKTUR],[120224,120249,65,k.VARIANT.SANSSERIF],[120250,120275,97,k.VARIANT.SANSSERIF],[120276,120301,65,k.VARIANT.BOLDSANSSERIF],[120302,120327,97,k.VARIANT.BOLDSANSSERIF],[120328,120353,65,k.VARIANT.SANSSERIFITALIC],[120354,120379,97,k.VARIANT.SANSSERIFITALIC],[120432,120457,65,k.VARIANT.MONOSPACE],[120458,120483,97,k.VARIANT.MONOSPACE],[120488,120513,913,k.VARIANT.BOLD],[120546,120570,913,k.VARIANT.ITALIC],[120572,120603,945,k.VARIANT.ITALIC],[120604,120628,913,k.VARIANT.BOLDITALIC],[120630,120661,945,k.VARIANT.BOLDITALIC],[120662,120686,913,k.VARIANT.BOLDSANSSERIF],[120720,120744,913,k.VARIANT.SANSSERIFBOLDITALIC],[120782,120791,48,k.VARIANT.BOLD],[120802,120811,48,k.VARIANT.SANSSERIF],[120812,120821,48,k.VARIANT.BOLDSANSSERIF],[120822,120831,48,k.VARIANT.MONOSPACE]],REMAPGREEK:{913:65,914:66,917:69,918:90,919:72,921:73,922:75,924:77,925:78,927:79,929:80,930:920,932:84,935:88,938:8711,970:8706,971:1013,972:977,973:1008,974:981,975:1009,976:982},RemapPlane1:function(t,s){for(var r=0,q=this.PLANE1MAP.length;r T d \u23A6 \u2A00",skew:{84:0.0278,58096:0.0319},32:[0,0,250,0,0],62:[540,40,778,83,694],84:[717,68,545,34,833],100:[694,11,511,101,567],160:[0,0,250,0,0],8899:[750,249,833,55,777],9126:[1155,644,667,0,347],10752:[949,449,1511,56,1454],58096:[720,69,644,38,947],58097:[587,85,894,96,797]}}}})}(function(){var t=g.FONTDATA.FONTS,s=g.config.availableFonts;var r,q=[];if(g.allowWebFonts){for(r in t){if(t[r].family){if(s&&s.length&&g.Font.testFont(t[r])){t[r].available=true;g.Font.loadComplete(t[r])}else{t[r].isWebFont=true;if(g.FontFaceBug){t[r].family=r}q.push(g.Font.fontFace(r))}}}if(!g.config.preloadWebFonts){g.config.preloadWebFonts=[]}g.config.preloadWebFonts.push(f,h,d);if(q.length){g.config.styles["@font-face"]=q}}else{if(s&&s.length){for(r in t){if(t[r].family&&g.Font.testFont(t[r])){t[r].available=true;g.Font.loadComplete(t[r])}}}}})();l.loadComplete(g.fontDir+"/fontdata.js")})(MathJax.OutputJax["HTML-CSS"],MathJax.ElementJax.mml,MathJax.Ajax); diff --git a/docs/_static/jax/output/HTML-CSS/imageFonts.js b/docs/_static/jax/output/HTML-CSS/imageFonts.js deleted file mode 100644 index 6ee1fe3..0000000 --- a/docs/_static/jax/output/HTML-CSS/imageFonts.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * /MathJax/jax/output/HTML-CSS/imageFonts.js - * - * Copyright (c) 2009-2014 The MathJax Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(b,c,a){var d="2.4.0";b.Register.LoadHook(c.fontDir+"/fontdata.js",function(){c.Augment({allowWebFonts:false,imgDir:c.webfontDir+"/png",imgPacked:(MathJax.isPacked?"":"/unpacked"),imgSize:["050","060","071","085",100,120,141,168,200,238,283,336,400,476],imgBaseIndex:4,imgSizeForEm:{},imgSizeForScale:{},imgZoom:1,handleImg:function(t,i,r,h,u){if(u.length){this.addText(t,u)}var s=r[5].orig;if(!s){s=r[5].orig=[r[0],r[1],r[2],r[3],r[4]]}var m=this.imgZoom;if(!t.scale){t.scale=1}var p=this.imgIndex(t.scale*m);if(p==this.imgEmWidth.length-1&&this.em*t.scale*m/this.imgEmWidth[p]>1.1){m=this.imgEmWidth[p]/(this.em*t.scale)}var q=this.imgEmWidth[p]/(this.em*(t.scale||1)*m);r[0]=s[0]*q;r[1]=s[1]*q;r[2]=s[2]*q;r[3]=s[3]*q;r[4]=s[4]*q;var k=this.imgDir+"/"+i.directory+"/"+this.imgSize[p];var l=h.toString(16).toUpperCase();while(l.length<4){l="0"+l}var j=k+"/"+l+".png";var o=r[5].img[p];var g={width:Math.floor(o[0]/m+0.5)+"px",height:Math.floor(o[1]/m+0.5)+"px"};if(o[2]){g.verticalAlign=Math.floor(-o[2]/m+0.5)+"px"}if(r[3]<0){g.marginLeft=this.Em(r[3]/1000)}if(r[4]!=r[2]){g.marginRight=this.Em((r[2]-r[4])/1000)}if(this.msieIE6){g.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+a.urlRev(j)+"', sizingMethod='scale')";j=this.directory+"/blank.gif"}this.addElement(t,"img",{src:a.urlRev(j),style:g,isMathJax:true});return""},defineImageData:function(i){for(var g in i){if(i.hasOwnProperty(g)){var h=c.FONTDATA.FONTS[g];if(h){g=i[g];for(var j in g){if(g.hasOwnProperty(j)&&h[j]){h[j][5]={img:g[j]}}}}}}},initImg:function(j){if(this.imgSizeForEm[this.em]){this.imgBaseIndex=this.imgSizeForEm[this.em]}for(var h=0,g=this.imgEmWidth.length-1;hthis.em-this.imgEmWidth[h-1]){h--}this.imgSizeForEm[this.em]=this.imgBaseIndex=h;this.imgZoom=this.imgBrowserZoom()},imgIndex:function(k){if(!k){return this.imgBaseIndex}if(!this.imgSizeForScale[this.em]){this.imgSizeForScale[this.em]={}}if(this.imgSizeForScale[this.em][k]){return this.imgSizeForScale[this.em][k]}var j=this.em*k;for(var h=0,g=this.imgEmWidth.length-1;hj-this.imgEmWidth[h-1]){h--}this.imgSizeForScale[this.em][k]=h;return h},imgBrowserZoom:function(){return 1}});b.Browser.Select({Firefox:function(h){var g=c.addElement(document.body,"div",{style:{display:"none",visibility:"hidden",overflow:"scroll",position:"absolute",top:0,left:0,width:"200px",height:"200px",padding:0,border:0,margin:0}});var i=c.addElement(g,"div",{style:{position:"absolute",left:0,top:0,right:0,bottom:0,padding:0,border:0,margin:0}});c.Augment({imgSpaceBug:true,imgSpace:"\u00A0",imgZoomLevel:(h.isMac?{50:0.3,30:0.5,22:0.67,19:0.8,16:0.9,15:1,13:1.1,12:1.2,11:1.33,10:1.5,9:1.7,7:2,6:2.4,5:3,0:15}:{56:0.3,34:0.5,25:0.67,21:0.8,19:0.9,17:1,15:1.1,14:1.2,13:1.33,11:1.5,10:1.7,8:2,7:2.4,6:3,0:17}),imgZoomDiv:g,imgBrowserZoom:function(){var j=this.imgZoomLevel;g.style.display="";var k=(g.offsetWidth-i.offsetWidth);k=(j[k]?j[k]:j[0]/k);g.style.display="none";return k}})},Safari:function(g){c.Augment({imgBrowserZoom:function(){return 3}})},Chrome:function(g){c.Augment({imgHeightBug:true,imgBrowserZoom:function(){return 3}})},Opera:function(g){c.Augment({imgSpaceBug:true,imgSpace:"\u00A0\u00A0",imgDoc:(document.compatMode=="BackCompat"?document.body:document.documentElement),imgBrowserZoom:function(){if(g.isMac){return 3}var h=this.imgDoc.clientHeight,i=Math.floor(15*h/window.innerHeight);if(this.imgDoc.clientWidth=p.HTMLCSSlast+p.HTMLCSSchunk){this.postTranslate(p,true);p.HTMLCSSchunk=Math.floor(p.HTMLCSSchunk*this.config.EqnChunkFactor);p.HTMLCSSdelay=true}}},postTranslate:function(s,o){var l=s.jax[this.id];if(!this.hideProcessedMath){return}for(var q=s.HTMLCSSlast,k=s.HTMLCSSeqn;qk){w.style.width=(s+100)+"px"}}}w.style.position="absolute";if(!n){v.style.position="absolute"}var u=w.offsetWidth,r=w.offsetHeight,x=v.offsetHeight,q=v.offsetWidth;if(q===0){q=v.parentNode.offsetWidth}w.style.position=v.style.position="";return{Y:-j.getBBox(w).h,mW:q,mH:x,zW:u,zH:r}},initImg:function(k){},initHTML:function(l,k){},initFont:function(k){var m=d.FONTDATA.FONTS,l=d.config.availableFonts;if(l&&l.length&&d.Font.testFont(m[k])){m[k].available=true;if(m[k].familyFixed){m[k].family=m[k].familyFixed;delete m[k].familyFixed}return null}if(!this.allowWebFonts){return null}m[k].isWebFont=true;if(d.FontFaceBug){m[k].family=k;if(d.msieFontCSSBug){m[k].family+="-Web"}}return h.Styles({"@font-face":this.Font.fontFace(k)})},Remove:function(k){var l=document.getElementById(k.inputID+"-Frame");if(l){if(k.HTMLCSS.display){l=l.parentNode}l.parentNode.removeChild(l)}delete k.HTMLCSS},getHD:function(l){var k=l.style.position;l.style.position="absolute";this.HDimg.style.height="0px";l.appendChild(this.HDspan);var m={h:l.offsetHeight};this.HDimg.style.height=m.h+"px";m.d=l.offsetHeight-m.h;m.h-=m.d;m.h/=this.em;m.d/=this.em;l.removeChild(this.HDspan);l.style.position=k;return m},getW:function(o){var l,n,m=(o.bbox||{}).w,p=o;if(o.bbox&&o.bbox.exactW){return m}if((o.bbox&&m>=0&&!this.initialSkipBug&&!this.msieItalicWidthBug)||this.negativeBBoxes||!o.firstChild){l=o.offsetWidth;n=o.parentNode.offsetHeight}else{if(o.bbox&&m<0&&this.msieNegativeBBoxBug){l=-o.offsetWidth,n=o.parentNode.offsetHeight}else{var k=o.style.position;o.style.position="absolute";p=this.startMarker;o.insertBefore(p,o.firstChild);o.appendChild(this.endMarker);l=this.endMarker.offsetLeft-p.offsetLeft;o.removeChild(this.endMarker);o.removeChild(p);o.style.position=k}}if(n!=null){o.parentNode.HH=n/this.em}return l/this.em},Measured:function(m,l){var n=m.bbox;if(n.width==null&&n.w&&!n.isMultiline){var k=this.getW(m);n.rw+=k-n.w;n.w=k;n.exactW=true}if(!l){l=m.parentNode}if(!l.bbox){l.bbox=n}return m},Remeasured:function(l,k){k.bbox=this.Measured(l,k).bbox},MeasureSpans:function(o){var r=[],t,q,n,u,k,p,l,s;for(q=0,n=o.length;q=0&&!this.initialSkipBug)||(u.w<0&&this.msieNegativeBBoxBug)){r.push([t])}else{if(this.initialSkipBug){k=this.startMarker.cloneNode(true);p=this.endMarker.cloneNode(true);t.insertBefore(k,t.firstChild);t.appendChild(p);r.push([t,k,p,t.style.position]);t.style.position="absolute"}else{p=this.endMarker.cloneNode(true);t.appendChild(p);r.push([t,null,p])}}}for(q=0,n=r.length;q=0&&!this.initialSkipBug)||this.negativeBBoxes||!t.firstChild){l=t.offsetWidth;s.HH=s.offsetHeight/this.em}else{if(u.w<0&&this.msieNegativeBBoxBug){l=-t.offsetWidth,s.HH=s.offsetHeight/this.em}else{l=r[q][2].offsetLeft-((r[q][1]||{}).offsetLeft||0)}}l/=this.em;u.rw+=l-u.w;u.w=l;u.exactW=true;if(!s.bbox){s.bbox=u}}for(q=0,n=r.length;q=0){p.style.width=this.Em(q);p.style.display="inline-block";p.style.overflow="hidden"}else{if(this.msieNegativeSpaceBug){p.style.height=""}p.style.marginLeft=this.Em(q);if(d.safariNegativeSpaceBug&&p.parentNode.firstChild==p){this.createBlank(p,0,true)}}if(m&&m!==g.COLOR.TRANSPARENT){p.style.backgroundColor=m;p.style.position="relative"}return p},createRule:function(r,n,p,s,l){if(n<-p){p=-n}var m=d.TeX.min_rule_thickness,o=1;if(s>0&&s*this.em0&&(n+p)*this.em0&&q.offsetWidth==0){q.style.width=this.Em(s)}if(r.isBox||r.className=="mspace"){r.bbox=q.bbox,r.HH=n+p}return q},createFrame:function(s,q,r,u,x,l){if(q<-r){r=-q}var p=2*x;if(this.msieFrameSizeBug){if(uC.w){d.createBlank(u,C.rw-C.w+0.1)}}if(!this.msieClipRectBug&&!C.noclip&&!o){var B=3/this.em;var A=(C.H==null?C.h:C.H),m=(C.D==null?C.d:C.D);var E=w-A-B,p=w+m+B,n=C.lw-3*B,k=1000;if(this.initialSkipBug&&C.lw<0){n=-3*B}if(C.isFixed){k=C.width-n}u.style.clip="rect("+this.Em(E)+" "+this.Em(k)+" "+this.Em(p)+" "+this.Em(n)+")"}}u.style.top=this.Em(-q-w);u.style.left=this.Em(s+F);if(C&&z){if(C.H!=null&&(z.H==null||C.H+q>z.H)){z.H=C.H+q}if(C.D!=null&&(z.D==null||C.D-q>z.D)){z.D=C.D-q}if(C.h+q>z.h){z.h=C.h+q}if(C.d-q>z.d){z.d=C.d-q}if(z.H!=null&&z.H<=z.h){delete z.H}if(z.D!=null&&z.D<=z.d){delete z.D}if(C.w+s>z.w){z.w=C.w+s;if(z.width==null){v.style.width=this.Em(z.w)}}if(C.rw+s>z.rw){z.rw=C.rw+s}if(C.lw+s=n-0.01||(s==p-1&&!l.stretch)){if(l.HW[s][2]){q*=l.HW[s][2]}if(l.HW[s][3]){k=l.HW[s][3]}var r=this.addElement(u,"span");this.createChar(r,[k,l.HW[s][1]],q,o);u.bbox=r.bbox;u.offset=0.65*u.bbox.w;u.scale=q;return}}if(l.stretch){this["extendDelimiter"+l.dir](u,t,l.stretch,q,o)}},extendDelimiterV:function(A,t,E,F,w){var o=this.createStack(A,true);var v=this.createBox(o),u=this.createBox(o);this.createChar(v,(E.top||E.ext),F,w);this.createChar(u,(E.bot||E.ext),F,w);var m={bbox:{w:0,lw:0,rw:0}},D=m,p;var B=v.bbox.h+v.bbox.d+u.bbox.h+u.bbox.d;var r=-v.bbox.h;this.placeBox(v,0,r,true);r-=v.bbox.d;if(E.mid){D=this.createBox(o);this.createChar(D,E.mid,F,w);B+=D.bbox.h+D.bbox.d}if(E.min&&tB){m=this.Element("span");this.createChar(m,E.ext,F,w);var C=m.bbox.h+m.bbox.d,l=C-0.05,x,q,z=(E.mid?2:1);q=x=Math.min(Math.ceil((t-B)/(z*l)),this.maxStretchyParts);if(!E.fullExtenders){l=(t-B)/(z*x)}var s=(x/(x+1))*(C-l);l=C-s;r+=s+l-m.bbox.h;while(z-->0){while(x-->0){if(!this.msieCloneNodeBug){p=m.cloneNode(true)}else{p=this.Element("span");this.createChar(p,E.ext,F,w)}p.bbox=m.bbox;r-=l;this.placeBox(this.addBox(o,p),0,r,true)}r+=s-m.bbox.d;if(E.mid&&z){this.placeBox(D,0,r-D.bbox.h,true);x=q;r+=-(D.bbox.h+D.bbox.d)+s+l-m.bbox.h}}}else{r+=(B-t)/2;if(E.mid){this.placeBox(D,0,r-D.bbox.h,true);r+=-(D.bbox.h+D.bbox.d)}r+=(B-t)/2}this.placeBox(u,0,r-u.bbox.h,true);r-=u.bbox.h+u.bbox.d;A.bbox={w:Math.max(v.bbox.w,m.bbox.w,u.bbox.w,D.bbox.w),lw:Math.min(v.bbox.lw,m.bbox.lw,u.bbox.lw,D.bbox.lw),rw:Math.max(v.bbox.rw,m.bbox.rw,u.bbox.rw,D.bbox.rw),h:0,d:-r,exactW:true};A.scale=F;A.offset=0.55*A.bbox.w;A.isMultiChar=true;this.setStackWidth(o,A.bbox.w)},extendDelimiterH:function(B,o,E,G,y){var r=this.createStack(B,true);var p=this.createBox(r),C=this.createBox(r);this.createChar(p,(E.left||E.rep),G,y);this.createChar(C,(E.right||E.rep),G,y);var l=this.Element("span");this.createChar(l,E.rep,G,y);var D={bbox:{h:-this.BIGDIMEN,d:-this.BIGDIMEN}},m;this.placeBox(p,-p.bbox.lw,0,true);var u=(p.bbox.rw-p.bbox.lw)+(C.bbox.rw-C.bbox.lw)-0.05,t=p.bbox.rw-p.bbox.lw-0.025,v;if(E.mid){D=this.createBox(r);this.createChar(D,E.mid,G,y);u+=D.bbox.w}if(E.min&&ou){var F=l.bbox.rw-l.bbox.lw,q=F-0.05,z,s,A=(E.mid?2:1);s=z=Math.min(Math.ceil((o-u)/(A*q)),this.maxStretchyParts);if(!E.fillExtenders){q=(o-u)/(A*z)}v=(z/(z+1))*(F-q);q=F-v;t-=l.bbox.lw+v;while(A-->0){while(z-->0){if(!this.cloneNodeBug){m=l.cloneNode(true)}else{m=this.Element("span");this.createChar(m,E.rep,G,y)}m.bbox=l.bbox;this.placeBox(this.addBox(r,m),t,0,true);t+=q}if(E.mid&&A){this.placeBox(D,t,0,true);t+=D.bbox.w-v;z=s}}}else{t-=(u-o)/2;if(E.mid){this.placeBox(D,t,0,true);t+=D.bbox.w}t-=(u-o)/2}this.placeBox(C,t,0,true);B.bbox={w:t+C.bbox.rw,lw:0,rw:t+C.bbox.rw,H:Math.max(p.bbox.h,l.bbox.h,C.bbox.h,D.bbox.h),D:Math.max(p.bbox.d,l.bbox.d,C.bbox.d,D.bbox.d),h:l.bbox.h,d:l.bbox.d,exactW:true};B.scale=G;B.isMultiChar=true;this.setStackWidth(r,B.bbox.w)},createChar:function(s,p,n,k){s.isMathJax=true;var r=s,t="",o={fonts:[p[1]],noRemap:true};if(k&&k===g.VARIANT.BOLD){o.fonts=[p[1]+"-bold",p[1]]}if(typeof(p[1])!=="string"){o=p[1]}if(p[0] instanceof Array){for(var q=0,l=p[0].length;q=55296&&w<56319){A++;w=(((w-55296)<<10)+(r.charCodeAt(A)-56320))+65536;if(this.FONTDATA.RemapPlane1){var D=this.FONTDATA.RemapPlane1(w,o);w=D.n;o=D.variant}}else{var t,q,u=this.FONTDATA.RANGES;for(t=0,q=u.length;t=u[t].low&&w<=u[t].high){if(u[t].remap&&u[t].remap[w]){w=p+u[t].remap[w]}else{w=w-u[t].low+p;if(u[t].add){w+=u[t].add}}if(o["variant"+u[t].offset]){o=this.FONTDATA.VARIANT[o["variant"+u[t].offset]]}break}}}if(o.remap&&o.remap[w]){w=o.remap[w];if(o.remap.variant){o=this.FONTDATA.VARIANT[o.remap.variant]}}else{if(this.FONTDATA.REMAP[w]&&!o.noRemap){w=this.FONTDATA.REMAP[w]}}if(w instanceof Array){o=this.FONTDATA.VARIANT[w[1]];w=w[0]}if(typeof(w)==="string"){r=w+r.substr(A+1);x=r.length;A=-1;continue}s=this.lookupChar(o,w);B=s[w];if(l||(!this.checkFont(s,k.style)&&!B[5].img)){if(y.length){this.addText(k,y);y=""}var v=!!k.style.fontFamily||!!z.style.fontStyle||!!z.style.fontWeight||!s.directory||l;l=false;if(k!==z){v=!this.checkFont(s,z.style);k=z}if(v){k=this.addElement(z,"span",{isMathJax:true,subSpan:true})}this.handleFont(k,s,k!==z)}y=this.handleChar(k,s,B,w,y);if(!(B[5]||{}).space){if(B[0]/1000>z.bbox.h){z.bbox.h=B[0]/1000}if(B[1]/1000>z.bbox.d){z.bbox.d=B[1]/1000}}if(z.bbox.w+B[3]/1000z.bbox.rw){z.bbox.rw=z.bbox.w+B[4]/1000}z.bbox.w+=B[2]/1000}if(y.length){this.addText(k,y)}if(z.scale&&z.scale!==1){z.bbox.h*=z.scale;z.bbox.d*=z.scale;z.bbox.w*=z.scale;z.bbox.lw*=z.scale;z.bbox.rw*=z.scale}if(r.length==1&&s.skew&&s.skew[w]){z.bbox.skew=s.skew[w]}},checkFont:function(k,l){var m=(l.fontWeight||"normal");if(m.match(/^\d+$/)){m=(parseInt(m)>=600?"bold":"normal")}return(k.family.replace(/'/g,"")===l.fontFamily.replace(/'/g,"")&&(k.style||"normal")===(l.fontStyle||"normal")&&(k.weight||"normal")===m)},handleFont:function(m,k,o){m.style.fontFamily=k.family;if(!k.directory){m.style.fontSize=Math.floor(100/d.scale+0.5)+"%"}if(!(d.FontFaceBug&&k.isWebFont)){var l=k.style||"normal",n=k.weight||"normal";if(l!=="normal"||o){m.style.fontStyle=l}if(n!=="normal"||o){m.style.fontWeight=n}}},handleChar:function(l,k,s,r,q){var p=s[5];if(p.space){if(q.length){this.addText(l,q)}d.createShift(l,s[2]/1000);return""}if(p.img){return this.handleImg(l,k,s,r,q)}if(p.isUnknown&&this.FONTDATA.DELIMITERS[r]){if(q.length){this.addText(l,q)}var o=l.scale;d.createDelimiter(l,r,0,1,k);if(this.FONTDATA.DELIMITERS[r].dir==="V"){l.style.verticalAlign=this.Em(l.bbox.d);l.bbox.h+=l.bbox.d;l.bbox.d=0}l.scale=o;s[0]=l.bbox.h*1000;s[1]=l.bbox.d*1000;s[2]=l.bbox.w*1000;s[3]=l.bbox.lw*1000;s[4]=l.bbox.rw*1000;return""}if(p.c==null){if(r<=65535){p.c=String.fromCharCode(r)}else{var m=r-65536;p.c=String.fromCharCode((m>>10)+55296)+String.fromCharCode((m&1023)+56320)}}if(p.rfix){this.addText(l,q+p.c);d.createShift(l,p.rfix/1000);return""}if(s[2]||!this.msieAccentBug||q.length){return q+p.c}d.createShift(l,s[3]/1000);d.createShift(l,(s[4]-s[3])/1000);this.addText(l,p.c);d.createShift(l,-s[4]/1000);return""},handleImg:function(l,k,p,o,m){return m},lookupChar:function(p,s){var o,k;if(!p.FONTS){var r=this.FONTDATA.FONTS;var q=(p.fonts||this.FONTDATA.VARIANT.normal.fonts);if(!(q instanceof Array)){q=[q]}if(p.fonts!=q){p.fonts=q}p.FONTS=[];for(o=0,k=q.length;o=0;n--){if(l.Ranges[n][2]==o){l.Ranges.splice(n,1)}}this.loadFont(l.directory+"/"+o+".js")}}}},loadFont:function(l){var k=MathJax.Callback.Queue();k.Push(["Require",h,this.fontDir+"/"+l]);if(this.imgFonts){if(!MathJax.isPacked){l=l.replace(/\/([^\/]*)$/,d.imgPacked+"/$1")}k.Push(["Require",h,this.webfontDir+"/png/"+l])}b.RestartAfter(k.Push({}))},loadWebFont:function(k){k.available=k.isWebFont=true;if(d.FontFaceBug){k.family=k.name;if(d.msieFontCSSBug){k.family+="-Web"}}b.RestartAfter(this.Font.loadWebFont(k))},loadWebFontError:function(l,k){b.Startup.signal.Post("HTML-CSS Jax - disable web fonts");l.isWebFont=false;if(this.config.imageFont&&this.config.imageFont===this.fontInUse){this.imgFonts=true;b.Startup.signal.Post("HTML-CSS Jax - switch to image fonts");b.Startup.signal.Post("HTML-CSS Jax - using image fonts");e(["WebFontNotAvailable","Web-Fonts not available -- using image fonts instead"],null,3000);h.Require(this.directory+"/imageFonts.js",k)}else{this.allowWebFonts=false;k()}},Element:MathJax.HTML.Element,addElement:MathJax.HTML.addElement,TextNode:MathJax.HTML.TextNode,addText:MathJax.HTML.addText,ucMatch:MathJax.HTML.ucMatch,BIGDIMEN:10000000,ID:0,idPostfix:"",GetID:function(){this.ID++;return this.ID},MATHSPACE:{veryverythinmathspace:1/18,verythinmathspace:2/18,thinmathspace:3/18,mediummathspace:4/18,thickmathspace:5/18,verythickmathspace:6/18,veryverythickmathspace:7/18,negativeveryverythinmathspace:-1/18,negativeverythinmathspace:-2/18,negativethinmathspace:-3/18,negativemediummathspace:-4/18,negativethickmathspace:-5/18,negativeverythickmathspace:-6/18,negativeveryverythickmathspace:-7/18},TeX:{x_height:0.430554,quad:1,num1:0.676508,num2:0.393732,num3:0.44373,denom1:0.685951,denom2:0.344841,sup1:0.412892,sup2:0.362892,sup3:0.288888,sub1:0.15,sub2:0.247217,sup_drop:0.386108,sub_drop:0.05,delim1:2.39,delim2:1,axis_height:0.25,rule_thickness:0.06,big_op_spacing1:0.111111,big_op_spacing2:0.166666,big_op_spacing3:0.2,big_op_spacing4:0.6,big_op_spacing5:0.1,scriptspace:0.1,nulldelimiterspace:0.12,delimiterfactor:901,delimitershortfall:0.1,min_rule_thickness:1.25},NBSP:"\u00A0",rfuzz:0});MathJax.Hub.Register.StartupHook("mml Jax Ready",function(){g=MathJax.ElementJax.mml;g.mbase.Augment({toHTML:function(o){o=this.HTMLcreateSpan(o);if(this.type!="mrow"){o=this.HTMLhandleSize(o)}for(var l=0,k=this.data.length;ll.d){l.d=m.d}if(m.h>l.h){l.h=m.h}if(m.D!=null&&m.D>l.D){l.D=m.D}if(m.H!=null&&m.H>l.H){l.H=m.H}if(n.style.paddingLeft){l.w+=d.unEm(n.style.paddingLeft)*(n.scale||1)}if(l.w+m.lwl.rw){l.rw=l.w+m.rw}l.w+=m.w;if(n.style.paddingRight){l.w+=d.unEm(n.style.paddingRight)*(n.scale||1)}if(m.width){l.width=m.width;l.minWidth=m.minWidth}if(m.ic){l.ic=m.ic}else{delete l.ic}if(l.exactW&&!m.exactW){delete l.exactW}},HTMLemptyBBox:function(k){k.h=k.d=k.H=k.D=k.rw=-d.BIGDIMEN;k.w=0;k.lw=d.BIGDIMEN;return k},HTMLcleanBBox:function(k){if(k.h===this.BIGDIMEN){k.h=k.d=k.H=k.D=k.w=k.rw=k.lw=0}if(k.D<=k.d){delete k.D}if(k.H<=k.h){delete k.H}},HTMLzeroBBox:function(){return{h:0,d:0,w:0,lw:0,rw:0}},HTMLcanStretch:function(l){if(this.isEmbellished()){var k=this.Core();if(k&&k!==this){return k.HTMLcanStretch(l)}}return false},HTMLstretchH:function(l,k){return this.HTMLspanElement()},HTMLstretchV:function(l,k,m){return this.HTMLspanElement()},HTMLnotEmpty:function(k){while(k){if((k.type!=="mrow"&&k.type!=="texatom")||k.data.length>1){return true}k=k.data[0]}return false},HTMLmeasureChild:function(l,k){if(this.data[l]){d.Measured(this.data[l].toHTML(k),k)}else{k.bbox=this.HTMLzeroBBox()}},HTMLboxChild:function(l,k){if(!this.data[l]){this.SetData(l,g.mrow())}return this.data[l].toHTML(k)},HTMLcreateSpan:function(k){if(this.spanID){var l=this.HTMLspanElement();if(l&&(l.parentNode===k||(l.parentNode||{}).parentNode===k)){while(l.firstChild){l.removeChild(l.firstChild)}l.bbox=this.HTMLzeroBBox();l.scale=1;l.isMultChar=l.HH=null;l.style.cssText="";return l}}if(this.href){k=d.addElement(k,"a",{href:this.href,isMathJax:true})}k=d.addElement(k,"span",{className:this.type,isMathJax:true});if(d.imgHeightBug){k.style.display="inline-block"}if(this["class"]){k.className+=" "+this["class"]}if(!this.spanID){this.spanID=d.GetID()}k.id=(this.id||"MathJax-Span-"+this.spanID)+d.idPostfix;k.bbox=this.HTMLzeroBBox();this.styles={};if(this.style){k.style.cssText=this.style;if(k.style.fontSize){this.mathsize=k.style.fontSize;k.style.fontSize=""}this.styles={border:d.getBorders(k),padding:d.getPadding(k)};if(this.styles.border){k.style.border=""}if(this.styles.padding){k.style.padding=""}}if(this.href){k.parentNode.bbox=k.bbox}return k},HTMLspanElement:function(){if(!this.spanID){return null}return document.getElementById((this.id||"MathJax-Span-"+this.spanID)+d.idPostfix)},HTMLhandleVariant:function(l,k,m){d.handleVariant(l,k,m)},HTMLhandleSize:function(k){if(!k.scale){k.scale=this.HTMLgetScale();if(k.scale!==1){k.style.fontSize=d.Percent(k.scale)}}return k},HTMLhandleDir:function(l){var k=this.Get("dir",true);if(k){l.dir=k}return l},HTMLhandleColor:function(w){var y=this.getValues("mathcolor","color");if(this.mathbackground){y.mathbackground=this.mathbackground}if(this.background){y.background=this.background}if(this.style&&w.style.backgroundColor){y.mathbackground=w.style.backgroundColor;w.style.backgroundColor="transparent"}var t=(this.styles||{}).border,v=(this.styles||{}).padding;if(y.color&&!this.mathcolor){y.mathcolor=y.color}if(y.background&&!this.mathbackground){y.mathbackground=y.background}if(y.mathcolor){w.style.color=y.mathcolor}if((y.mathbackground&&y.mathbackground!==g.COLOR.TRANSPARENT)||t||v){var A=w.bbox,z=(A.exact?0:1/d.em),u=0,s=0,m=w.style.paddingLeft,q=w.style.paddingRight;if(this.isToken){u=A.lw;s=A.rw-A.w}if(m!==""){u+=d.unEm(m)*(w.scale||1)}if(q!==""){s-=d.unEm(q)*(w.scale||1)}var l=(d.PaddingWidthBug||A.keepPadding||A.exactW?0:s-u);var o=Math.max(0,d.getW(w)+l);var x=A.h+A.d,k=-A.d,r=0,p=0;if(o>0){o+=2*z;u-=z}if(x>0){x+=2*z;k-=z}s=-o-u;if(t){s-=t.right;k-=t.bottom;r+=t.left;p+=t.right;A.h+=t.top;A.d+=t.bottom;A.w+=t.left+t.right;A.lw-=t.left;A.rw+=t.right}if(v){x+=v.top+v.bottom;o+=v.left+v.right;s-=v.right;k-=v.bottom;r+=v.left;p+=v.right;A.h+=v.top;A.d+=v.bottom;A.w+=v.left+v.right;A.lw-=v.left;A.rw+=v.right}if(p){w.style.paddingRight=d.Em(p)}var n=d.Element("span",{id:"MathJax-Color-"+this.spanID+d.idPostfix,isMathJax:true,style:{display:"inline-block",backgroundColor:y.mathbackground,width:d.Em(o),height:d.Em(x),verticalAlign:d.Em(k),marginLeft:d.Em(u),marginRight:d.Em(s)}});d.setBorders(n,t);if(A.width){n.style.width=A.width;n.style.marginRight="-"+A.width}if(d.msieInlineBlockAlignBug){n.style.position="relative";n.style.width=n.style.height=0;n.style.verticalAlign=n.style.marginLeft=n.style.marginRight="";n.style.border=n.style.padding="";if(t&&d.msieBorderWidthBug){x+=t.top+t.bottom;o+=t.left+t.right}n.style.width=d.Em(r+z);d.placeBox(d.addElement(n,"span",{noAdjust:true,isMathJax:true,style:{display:"inline-block",position:"absolute",overflow:"hidden",background:(y.mathbackground||"transparent"),width:d.Em(o),height:d.Em(x)}}),u,A.h+z);d.setBorders(n.firstChild,t)}w.parentNode.insertBefore(n,w);if(d.msieColorPositionBug){w.style.position="relative"}return n}return null},HTMLremoveColor:function(){var k=document.getElementById("MathJax-Color-"+this.spanID+d.idPostfix);if(k){k.parentNode.removeChild(k)}},HTMLhandleSpace:function(o){if(this.useMMLspacing){if(this.type!=="mo"){return}var m=this.getValues("scriptlevel","lspace","rspace");if(m.scriptlevel<=0||this.hasValue("lspace")||this.hasValue("rspace")){var l=this.HTMLgetMu(o);m.lspace=Math.max(0,d.length2em(m.lspace,l));m.rspace=Math.max(0,d.length2em(m.rspace,l));var k=this,n=this.Parent();while(n&&n.isEmbellished()&&n.Core()===k){k=n;n=n.Parent();o=k.HTMLspanElement()}if(m.lspace){o.style.paddingLeft=d.Em(m.lspace)}if(m.rspace){o.style.paddingRight=d.Em(m.rspace)}}}else{var p=this.texSpacing();if(p!==""){this.HTMLgetScale();p=d.length2em(p,this.scale)/(o.scale||1)*this.mscale;if(o.style.paddingLeft){p+=d.unEm(o.style.paddingLeft)}o.style.paddingLeft=d.Em(p)}}},HTMLgetScale:function(){if(this.scale){return this.scale*this.mscale}var m=1,k=this.getValues("scriptlevel","fontsize");k.mathsize=(this.isToken?this:this.Parent()).Get("mathsize");if(this.style){var l=this.HTMLspanElement();if(l.style.fontSize!=""){k.fontsize=l.style.fontSize}}if(k.fontsize&&!this.mathsize){k.mathsize=k.fontsize}if(k.scriptlevel!==0){if(k.scriptlevel>2){k.scriptlevel=2}m=Math.pow(this.Get("scriptsizemultiplier"),k.scriptlevel);k.scriptminsize=d.length2em(this.Get("scriptminsize"));if(m2){l.scriptlevel=2}k=Math.sqrt(Math.pow(l.scriptsizemultiplier,l.scriptlevel))}return k},HTMLgetVariant:function(){var k=this.getValues("mathvariant","fontfamily","fontweight","fontstyle");k.hasVariant=this.Get("mathvariant",true);if(!k.hasVariant){k.family=k.fontfamily;k.weight=k.fontweight;k.style=k.fontstyle}if(this.style){var m=this.HTMLspanElement();if(!k.family&&m.style.fontFamily){k.family=m.style.fontFamily}if(!k.weight&&m.style.fontWeight){k.weight=m.style.fontWeight}if(!k.style&&m.style.fontStyle){k.style=m.style.fontStyle}}if(k.weight&&k.weight.match(/^\d+$/)){k.weight=(parseInt(k.weight)>600?"bold":"normal")}var l=k.mathvariant;if(this.variantForm){l="-"+d.fontInUse+"-variant"}if(k.family&&!k.hasVariant){if(!k.weight&&k.mathvariant.match(/bold/)){k.weight="bold"}if(!k.style&&k.mathvariant.match(/italic/)){k.style="italic"}return{FONTS:[],fonts:[],noRemap:true,defaultFont:{family:k.family,style:k.style,weight:k.weight}}}if(k.weight==="bold"){l={normal:g.VARIANT.BOLD,italic:g.VARIANT.BOLDITALIC,fraktur:g.VARIANT.BOLDFRAKTUR,script:g.VARIANT.BOLDSCRIPT,"sans-serif":g.VARIANT.BOLDSANSSERIF,"sans-serif-italic":g.VARIANT.SANSSERIFBOLDITALIC}[l]||l}else{if(k.weight==="normal"){l={bold:g.VARIANT.normal,"bold-italic":g.VARIANT.ITALIC,"bold-fraktur":g.VARIANT.FRAKTUR,"bold-script":g.VARIANT.SCRIPT,"bold-sans-serif":g.VARIANT.SANSSERIF,"sans-serif-bold-italic":g.VARIANT.SANSSERIFITALIC}[l]||l}}if(k.style==="italic"){l={normal:g.VARIANT.ITALIC,bold:g.VARIANT.BOLDITALIC,"sans-serif":g.VARIANT.SANSSERIFITALIC,"bold-sans-serif":g.VARIANT.SANSSERIFBOLDITALIC}[l]||l}else{if(k.style==="normal"){l={italic:g.VARIANT.NORMAL,"bold-italic":g.VARIANT.BOLD,"sans-serif-italic":g.VARIANT.SANSSERIF,"sans-serif-bold-italic":g.VARIANT.BOLDSANSSERIF}[l]||l}}if(!(l in d.FONTDATA.VARIANT)){l="normal"}return d.FONTDATA.VARIANT[l]}},{HTMLautoload:function(){var k=d.autoloadDir+"/"+this.type+".js";b.RestartAfter(h.Require(k))},HTMLautoloadFile:function(k){var l=d.autoloadDir+"/"+k+".js";b.RestartAfter(h.Require(l))},HTMLstretchH:function(l,k){this.HTMLremoveColor();return this.toHTML(l,k)},HTMLstretchV:function(l,k,m){this.HTMLremoveColor();return this.toHTML(l,k,m)}});g.chars.Augment({toHTML:function(n,m,l,o){var r=this.data.join("").replace(/[\u2061-\u2064]/g,"");if(l){r=l(r,o)}if(m.fontInherit){var q=Math.floor(100/d.scale+0.5)+"%";d.addElement(n,"span",{style:{"font-size":q}},[r]);if(m.bold){n.lastChild.style.fontWeight="bold"}if(m.italic){n.lastChild.style.fontStyle="italic"}var p=d.getHD(n),k=d.getW(n);n.bbox={h:p.h,d:p.d,w:k,lw:0,rw:k,exactW:true}}else{this.HTMLhandleVariant(n,m,r)}}});g.entity.Augment({toHTML:function(n,m,l,o){var r=this.toString().replace(/[\u2061-\u2064]/g,"");if(l){r=l(r,o)}if(m.fontInherit){var q=Math.floor(100/d.scale+0.5)+"%";d.addElement(n,"span",{style:{"font-size":q}},[r]);if(m.bold){n.lastChild.style.fontWeight="bold"}if(m.italic){n.lastChild.style.fontStyle="italic"}var p=d.getHD(n),k=d.getW(n);n.bbox={h:p.h,d:p.d,w:k,lw:0,rw:k,exactW:true}}else{this.HTMLhandleVariant(n,m,r)}}});g.mi.Augment({toHTML:function(o){o=this.HTMLhandleSize(this.HTMLcreateSpan(o));o.bbox=null;var n=this.HTMLgetVariant();for(var l=0,k=this.data.length;lp.w&&q.length===1&&!n.noIC){p.ic=p.rw-p.w;d.createBlank(o,p.ic/this.mscale);p.w=p.rw}this.HTMLhandleSpace(o);this.HTMLhandleColor(o);this.HTMLhandleDir(o);return o}});g.mn.Augment({toHTML:function(o){o=this.HTMLhandleSize(this.HTMLcreateSpan(o));o.bbox=null;var n=this.HTMLgetVariant();for(var l=0,k=this.data.length;lv.bbox.w){v.bbox.ic=v.bbox.rw-v.bbox.w;d.createBlank(v,v.bbox.ic/this.mscale);v.bbox.w=v.bbox.rw}}this.HTMLhandleSpace(v);this.HTMLhandleColor(v);this.HTMLhandleDir(v);return v},CoreParent:function(){var k=this;while(k&&k.isEmbellished()&&k.CoreMO()===this&&!k.isa(g.math)){k=k.Parent()}return k},CoreText:function(k){if(!k){return""}if(k.isEmbellished()){return k.CoreMO().data.join("")}while((k.isa(g.mrow)||k.isa(g.TeXAtom)||k.isa(g.mstyle)||k.isa(g.mphantom))&&k.data.length===1&&k.data[0]){k=k.data[0]}if(!k.isToken){return""}else{return k.data.join("")}},HTMLremapChars:{"*":"\u2217",'"':"\u2033","\u00B0":"\u2218","\u00B2":"2","\u00B3":"3","\u00B4":"\u2032","\u00B9":"1"},HTMLremap:function(l,k){l=l.replace(/-/g,"\u2212");if(k){l=l.replace(/'/g,"\u2032").replace(/`/g,"\u2035");if(l.length===1){l=k[l]||l}}return l},HTMLcanStretch:function(o){if(!this.Get("stretchy")){return false}var p=this.data.join("");if(p.length>1){return false}var m=this.CoreParent();if(m&&m.isa(g.munderover)&&this.CoreText(m.data[m.base]).length===1){var n=m.data[m.over],l=m.data[m.under];if(n&&this===n.CoreMO()&&m.Get("accent")){p=d.FONTDATA.REMAPACCENT[p]||p}else{if(l&&this===l.CoreMO()&&m.Get("accentunder")){p=d.FONTDATA.REMAPACCENTUNDER[p]||p}}}p=d.FONTDATA.DELIMITERS[p.charCodeAt(0)];var k=(p&&p.dir===o.substr(0,1));this.forceStretch=(k&&(this.Get("minsize",true)||this.Get("maxsize",true)));return k},HTMLstretchV:function(m,n,o){this.HTMLremoveColor();var r=this.getValues("symmetric","maxsize","minsize");var p=this.HTMLspanElement(),s=this.HTMLgetMu(p),q;var l=this.HTMLgetScale(),k=d.TeX.axis_height*l;if(r.symmetric){q=2*Math.max(n-k,o+k)}else{q=n+o}r.maxsize=d.length2em(r.maxsize,s,p.bbox.h+p.bbox.d);r.minsize=d.length2em(r.minsize,s,p.bbox.h+p.bbox.d);q=Math.max(r.minsize,Math.min(r.maxsize,q));p=this.HTMLcreateSpan(m);d.createDelimiter(p,this.data.join("").charCodeAt(0),q,l);if(r.symmetric){q=(p.bbox.h+p.bbox.d)/2+k}else{q=(p.bbox.h+p.bbox.d)*n/(n+o)}d.positionDelimiter(p,q);this.HTMLhandleSpace(p);this.HTMLhandleColor(p);return p},HTMLstretchH:function(o,k){this.HTMLremoveColor();var m=this.getValues("maxsize","minsize","mathvariant","fontweight");if((m.fontweight==="bold"||parseInt(m.fontweight)>=600)&&!this.Get("mathvariant",true)){m.mathvariant=g.VARIANT.BOLD}var n=this.HTMLspanElement(),l=this.HTMLgetMu(n),p=n.scale;m.maxsize=d.length2em(m.maxsize,l,n.bbox.w);m.minsize=d.length2em(m.minsize,l,n.bbox.w);k=Math.max(m.minsize,Math.min(m.maxsize,k));n=this.HTMLcreateSpan(o);d.createDelimiter(n,this.data.join("").charCodeAt(0),k,p,m.mathvariant);this.HTMLhandleSpace(n);this.HTMLhandleColor(n);return n}});g.mtext.Augment({toHTML:function(o){o=this.HTMLhandleSize(this.HTMLcreateSpan(o));var n=this.HTMLgetVariant();if(d.config.mtextFontInherit||this.Parent().type==="merror"){var p=this.Get("mathvariant");if(p==="monospace"){o.className+=" MJX-monospace"}else{if(p.match(/sans-serif/)){o.className+=" MJX-sans-serif"}}n={bold:n.bold,italic:n.italic,fontInherit:true}}for(var l=0,k=this.data.length;ld.linebreakWidth)||this.hasNewline()},HTMLstretchH:function(m,k){this.HTMLremoveColor();var l=this.HTMLspanElement();this.data[this.core].HTMLstretchH(l,k);this.HTMLcomputeBBox(l,true);this.HTMLhandleColor(l);return l},HTMLstretchV:function(m,l,n){this.HTMLremoveColor();var k=this.HTMLspanElement();this.data[this.core].HTMLstretchV(k,l,n);this.HTMLcomputeBBox(k,true);this.HTMLhandleColor(k);return k}});g.mstyle.Augment({toHTML:function(l,k,m){l=this.HTMLcreateSpan(l);if(this.data[0]!=null){var n=this.data[0].toHTML(l);if(m!=null){this.data[0].HTMLstretchV(l,k,m)}else{if(k!=null){this.data[0].HTMLstretchH(l,k)}}l.bbox=n.bbox}this.HTMLhandleSpace(l);this.HTMLhandleColor(l);return l},HTMLstretchH:g.mbase.HTMLstretchH,HTMLstretchV:g.mbase.HTMLstretchV});g.mfrac.Augment({toHTML:function(D){D=this.HTMLcreateSpan(D);var m=d.createStack(D);var r=d.createBox(m),o=d.createBox(m);d.MeasureSpans([this.HTMLboxChild(0,r),this.HTMLboxChild(1,o)]);var k=this.getValues("displaystyle","linethickness","numalign","denomalign","bevelled");var I=this.HTMLgetScale(),C=k.displaystyle;var G=d.TeX.axis_height*I;if(k.bevelled){var F=(C?0.4:0.15);var s=Math.max(r.bbox.h+r.bbox.d,o.bbox.h+o.bbox.d)+2*F;var E=d.createBox(m);d.createDelimiter(E,47,s);d.placeBox(r,0,(r.bbox.d-r.bbox.h)/2+G+F);d.placeBox(E,r.bbox.w-F/2,(E.bbox.d-E.bbox.h)/2+G);d.placeBox(o,r.bbox.w+E.bbox.w-F,(o.bbox.d-o.bbox.h)/2+G-F)}else{var l=Math.max(r.bbox.w,o.bbox.w);var y=d.thickness2em(k.linethickness,this.scale)*this.mscale,A,z,x,w;var B=d.TeX.min_rule_thickness/this.em;if(C){x=d.TeX.num1;w=d.TeX.denom1}else{x=(y===0?d.TeX.num3:d.TeX.num2);w=d.TeX.denom2}x*=I;w*=I;if(y===0){A=Math.max((C?7:3)*d.TeX.rule_thickness,2*B);z=(x-r.bbox.d)-(o.bbox.h-w);if(zy){l=((s.bbox.h+s.bbox.d)-(y-A))/2}var B=d.FONTDATA.DELIMITERS[d.FONTDATA.RULECHAR];if(!B||oK){K=r[M].bbox.w}if(!N[M]&&K>n){n=K}}}if(F==null&&H!=null){n=H}else{if(n==-d.BIGDIMEN){n=K}}for(M=K=0,I=this.data.length;MK){K=w.bbox.w}}}var E=d.TeX.rule_thickness*this.mscale,G=d.FONTDATA.TeX_factor;var p=r[this.base]||{bbox:this.HTMLzeroBBox()};var v,s,A,z,u,C,J,O=0;if(p.bbox.ic){O=1.3*p.bbox.ic+0.05}for(M=0,I=this.data.length;M0){z+=F;y-=F}}d.placeBox(k,o.bbox.w+M,Math.max(z,J.superscriptshift));d.placeBox(x,o.bbox.w,-Math.max(y,J.subscriptshift))}}this.HTMLhandleSpace(K);this.HTMLhandleColor(K);return K},HTMLstretchH:g.mbase.HTMLstretchH,HTMLstretchV:g.mbase.HTMLstretchV});g.mmultiscripts.Augment({toHTML:g.mbase.HTMLautoload});g.mtable.Augment({toHTML:g.mbase.HTMLautoload});g["annotation-xml"].Augment({toHTML:g.mbase.HTMLautoload});g.math.Augment({toHTML:function(u,l){var r=this.Get("alttext");if(r&&r!==""){l.setAttribute("aria-label",r)}var m=d.addElement(u,"nobr",{isMathJax:true});u=this.HTMLcreateSpan(m);var s=d.createStack(u),n=d.createBox(s),t;s.style.fontSize=m.parentNode.style.fontSize;m.parentNode.style.fontSize="";if(this.data[0]!=null){if(d.msieColorBug){if(this.background){this.data[0].background=this.background;delete this.background}if(this.mathbackground){this.data[0].mathbackground=this.mathbackground;delete this.mathbackground}}g.mbase.prototype.displayAlign=b.config.displayAlign;g.mbase.prototype.displayIndent=b.config.displayIndent;var o=this.data[0].toHTML(n);o.bbox.exactW=false;t=d.Measured(o,n)}d.placeBox(n,0,0);u.style.width=d.Em((Math.round(t.bbox.w*this.em)+0.25)/d.outerEm);u.style.display="inline-block";var k=1/d.em,q=d.em/d.outerEm;d.em/=q;u.bbox.h*=q;u.bbox.d*=q;u.bbox.w*=q;u.bbox.lw*=q;u.bbox.rw*=q;if(t&&t.bbox.width!=null){u.style.minWidth=(t.bbox.minWidth||u.style.width);u.style.width=s.style.width=t.bbox.width;n.style.width="100%"}this.HTMLhandleColor(u);if(t){d.createRule(u,(t.bbox.h+k)*q,(t.bbox.d+k)*q,0)}if(!this.isMultiline&&this.Get("display")==="block"&&u.bbox.width==null){var v=this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");if(v.indentalignfirst!==g.INDENTALIGN.INDENTALIGN){v.indentalign=v.indentalignfirst}if(v.indentalign===g.INDENTALIGN.AUTO){v.indentalign=this.displayAlign}l.style.textAlign=v.indentalign;if(v.indentshiftfirst!==g.INDENTSHIFT.INDENTSHIFT){v.indentshift=v.indentshiftfirst}if(v.indentshift==="auto"){v.indentshift=this.displayIndent}if(v.indentshift&&v.indentalign!==g.INDENTALIGN.CENTER){u.style[{left:"marginLeft",right:"marginRight"}[v.indentalign]]=d.Em(d.length2em(v.indentshift))}}return u},HTMLspanElement:g.mbase.prototype.HTMLspanElement});g.TeXAtom.Augment({toHTML:function(o,m,q){o=this.HTMLcreateSpan(o);if(this.data[0]!=null){if(this.texClass===g.TEXCLASS.VCENTER){var k=d.createStack(o);var p=d.createBox(k);var r=this.data[0].toHTML(p);if(q!=null){d.Remeasured(this.data[0].HTMLstretchV(p,m,q),p)}else{if(m!=null){d.Remeasured(this.data[0].HTMLstretchH(p,m),p)}else{d.Measured(r,p)}}var l=d.TeX.axis_height*this.HTMLgetScale();d.placeBox(p,0,l-(p.bbox.h+p.bbox.d)/2+p.bbox.d)}else{var n=this.data[0].toHTML(o,m,q);if(q!=null){n=this.data[0].HTMLstretchV(p,m,q)}else{if(m!=null){n=this.data[0].HTMLstretchH(p,m)}}o.bbox=n.bbox}}this.HTMLhandleSpace(o);this.HTMLhandleColor(o);return o},HTMLstretchH:g.mbase.HTMLstretchH,HTMLstretchV:g.mbase.HTMLstretchV});MathJax.Hub.Register.StartupHook("onLoad",function(){setTimeout(MathJax.Callback(["loadComplete",d,"jax.js"]),0)})});b.Register.StartupHook("End Config",function(){b.Browser.Select({MSIE:function(k){var o=(document.documentMode||0);var n=k.versionAtLeast("7.0");var m=k.versionAtLeast("8.0")&&o>7;var l=(document.compatMode==="BackCompat");if(o<9){d.config.styles[".MathJax .MathJax_HitBox"]["background-color"]="white";d.config.styles[".MathJax .MathJax_HitBox"].opacity=0;d.config.styles[".MathJax .MathJax_HitBox"].filter="alpha(opacity=0)"}d.Augment({PaddingWidthBug:true,msieAccentBug:true,msieColorBug:true,msieColorPositionBug:true,msieRelativeWidthBug:l,msieDisappearingBug:(o>=8),msieMarginScaleBug:(o<8),msiePaddingWidthBug:true,msieBorderWidthBug:l,msieFrameSizeBug:(o<=8),msieInlineBlockAlignBug:(!m||l),msiePlaceBoxBug:(m&&!l),msieClipRectBug:!m,msieNegativeSpaceBug:l,cloneNodeBug:(m&&k.version==="8.0"),msieItalicWidthBug:true,initialSkipBug:(o<8),msieNegativeBBoxBug:(o>=8),msieIE6:!n,msieItalicWidthBug:true,FontFaceBug:true,msieFontCSSBug:k.isIE9,allowWebFonts:(o>=9?"woff":"eot")})},Firefox:function(l){var m=false;if(l.versionAtLeast("3.5")){var k=String(document.location).replace(/[^\/]*$/,"");if(document.location.protocol!=="file:"||b.config.root.match(/^https?:\/\//)||(b.config.root+"/").substr(0,k.length)===k){m="otf"}}d.Augment({ffVerticalAlignBug:!l.versionAtLeast("20.0"),AccentBug:true,allowWebFonts:m})},Safari:function(p){var n=p.versionAtLeast("3.0");var m=p.versionAtLeast("3.1");var k=navigator.appVersion.match(/ Safari\/\d/)&&navigator.appVersion.match(/ Version\/\d/)&&navigator.vendor.match(/Apple/);var l=(navigator.appVersion.match(/ Android (\d+)\.(\d+)/));var q=(m&&p.isMobile&&((navigator.platform.match(/iPad|iPod|iPhone/)&&!p.versionAtLeast("5.0"))||(l!=null&&(l[1]<2||(l[1]==2&&l[2]<2)))));d.Augment({config:{styles:{".MathJax img, .MathJax nobr, .MathJax a":{"max-width":"5000em","max-height":"5000em"}}},rfuzz:0.011,AccentBug:true,AdjustSurd:true,negativeBBoxes:true,safariNegativeSpaceBug:true,safariVerticalAlignBug:!m,safariTextNodeBug:!n,forceReflow:true,allowWebFonts:(m&&!q?"otf":false)});if(k){d.Augment({webFontDefault:(p.isMobile?"sans-serif":"serif")})}if(p.isPC){d.Augment({adjustAvailableFonts:d.removeSTIXfonts,checkWebFontsTwice:true})}if(q){var o=b.config["HTML-CSS"];if(o){o.availableFonts=[];o.preferredFont=null}else{b.config["HTML-CSS"]={availableFonts:[],preferredFont:null}}}},Chrome:function(k){d.Augment({Em:d.EmRounded,cloneNodeBug:true,rfuzz:-0.02,AccentBug:true,AdjustSurd:true,FontFaceBug:k.versionAtLeast("32.0"),negativeBBoxes:true,safariNegativeSpaceBug:true,safariWebFontSerif:[""],forceReflow:true,allowWebFonts:(k.versionAtLeast("4.0")?"otf":"svg")})},Opera:function(k){k.isMini=(navigator.appVersion.match("Opera Mini")!=null);d.config.styles[".MathJax .merror"]["vertical-align"]=null;d.config.styles[".MathJax span"]["z-index"]=0;d.Augment({operaHeightBug:true,operaVerticalAlignBug:true,operaFontSizeBug:k.versionAtLeast("10.61"),initialSkipBug:true,FontFaceBug:true,PaddingWidthBug:true,allowWebFonts:(k.versionAtLeast("10.0")&&!k.isMini?"otf":false),adjustAvailableFonts:d.removeSTIXfonts})},Konqueror:function(k){d.Augment({konquerorVerticalAlignBug:true})}})});MathJax.Hub.Register.StartupHook("End Cookie",function(){if(b.config.menuSettings.zoom!=="None"){h.Require("[MathJax]/extensions/MathZoom.js")}})})(MathJax.Ajax,MathJax.Hub,MathJax.OutputJax["HTML-CSS"]); diff --git a/docs/_themes/solar/layout.html b/docs/_themes/solar/layout.html deleted file mode 100644 index f575370..0000000 --- a/docs/_themes/solar/layout.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "basic/layout.html" %} - -{%- block doctype -%} - -{%- endblock -%} - -{%- block extrahead -%} - - -{%- endblock -%} - -{# put the sidebar before the body #} -{% block sidebar1 %}{{ sidebar() }}{% endblock %} -{% block sidebar2 %}{% endblock %} - -{%- block footer %} - -{%- endblock %} diff --git a/docs/_themes/solar/static/solar.css b/docs/_themes/solar/static/solar.css deleted file mode 100644 index 0485383..0000000 --- a/docs/_themes/solar/static/solar.css +++ /dev/null @@ -1,331 +0,0 @@ -/* solar.css - * - * Modified from sphinxdoc.css from - * sphinxdoc theme. Originally created by - * Armin Ronacher for Werkzeug. - * - * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: 'Open Sans', sans-serif; - font-size: 14px; - letter-spacing: -0.01em; - line-height: 150%; - text-align: center; - color: #002b36; - padding: 0; - margin: 0px 80px 0px 80px; - min-width: 740px; - -moz-box-shadow: 0px 0px 10px #93a1a1; - -webkit-box-shadow: 0px 0px 10px #93a1a1; - box-shadow: 0px 0px 10px #93a1a1; - background: url("subtle_dots.png") repeat; - -} - -div.document { - background-color: #fcfcfc; - text-align: left; - background-repeat: repeat-x; -} - -div.bodywrapper { - margin: 0 240px 0 0; - border-right: 1px dotted #eee8d5; -} - -div.body { - background-color: white; - margin: 0; - padding: 0.5em 20px 20px 20px; -} - -div.related { - font-size: 1em; - background: #002b36; - color: #839496; - padding: 5px 0px; -} - -div.related ul { - height: 2em; -} - -div.related ul li { - margin: 0; - padding: 0; - height: 2em; - float: left; -} - -div.related ul li.right { - float: right; - margin-right: 5px; -} - -div.related ul li a { - margin: 0; - padding: 0 5px 0 5px; - line-height: 2emiii; - text-decoration: none; - color: #839496; -} - -div.related ul li a:hover { - background-color: #073642; -} - -div.sphinxsidebarwrapper { - padding: 0; -} - -div.sphinxsidebar { - margin: 0; - padding: 0.5em 15px 15px 0; - width: 210px; - float: right; - font-size: 0.97em; - text-align: left; -} - -div.sphinxsidebar h3, div.sphinxsidebar h4 { - margin: 1em 0 0.5em 0; - font-size: 1.2em; - padding: 0.7em; - background-color: #eeeff1; -} - -div.sphinxsidebar h3 a { - color: #2E3436; -} - -div.sphinxsidebar ul { - padding-left: 1.5em; - margin-top: 7px; - padding: 0; - line-height: 150%; - color: #586e75; -} - -div.sphinxsidebar ul ul { - margin-left: 20px; -} - -div.sphinxsidebar input { - border: 1px solid #eee8d5; -} - -div.footer { - background-color: #93a1a1; - color: #eee; - padding: 3px 8px 3px 0; - clear: both; - font-size: 0.8em; - text-align: right; -} - -div.footer a { - color: #eee; - text-decoration: none; -} - -/* -- body styles ----------------------------------------------------------- */ - -p { - margin: 0.8em 0 0.5em 0; -} - -div.body a, div.sphinxsidebarwrapper a { - color: #268bd2; - text-decoration: none; -} - -div.body a:hover, div.sphinxsidebarwrapper a:hover { - border-bottom: 1px solid #268bd2; -} - -h1, h2, h3, h4, h5, h6 { - font-family: "Open Sans", sans-serif; - font-weight: 300; -} - -h1 { - margin: 0; - padding: 0.7em 0 0.3em 0; - line-height: 1.2em; - color: #002b36; - text-shadow: #eee 0.1em 0.1em 0.1em; -} - -h2 { - margin: 1.3em 0 0.2em 0; - padding: 0 0 10px 0; - color: #073642; - border-bottom: 1px solid #eee; -} - -h3 { - margin: 1em 0 -0.3em 0; - padding-bottom: 5px; -} - -h3, h4, h5, h6 { - color: #073642; -} - -div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.body h6 a { - color: black!important; -} - -h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { - display: none; - margin: 0 0 0 0.3em; - padding: 0 0.2em 0 0.2em; - color: #aaa!important; -} - -h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, -h5:hover a.anchor, h6:hover a.anchor { - display: inline; -} - -h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover, -h5 a.anchor:hover, h6 a.anchor:hover { - color: #777; - background-color: #eee; -} - -a.headerlink { - color: #c60f0f!important; - font-size: 1em; - margin-left: 6px; - padding: 0 4px 0 4px; - text-decoration: none!important; -} - -a.headerlink:hover { - background-color: #ccc; - color: white!important; -} - - -cite, code, tt { - font-family: 'PT Mono', monospace; - letter-spacing: 0.01em; - background-color: #eeeff2; - font-style: normal; -} - -hr { - border: 1px solid #eee; - margin: 2em; -} - -.highlight { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} - -pre { - font-family: 'PT Mono', monospace; - font-style: normal; - letter-spacing: 0.015em; - line-height: 120%; - padding: 0.7em; -} - -pre a { - color: inherit; - text-decoration: underline; -} - -td.linenos pre { - padding: 0.5em 0; -} - -div.quotebar { - background-color: #f8f8f8; - max-width: 250px; - float: right; - padding: 2px 7px; - border: 1px solid #ccc; -} - -div.topic { - background-color: #f8f8f8; -} - -table { - border-collapse: collapse; - margin: 0 -0.5em 0 -0.5em; -} - -table td, table th { - padding: 0.2em 0.5em 0.2em 0.5em; -} - -div.admonition, div.warning { - font-size: 0.9em; - margin: 1em 0 1em 0; - border: 1px solid #eee; - background-color: #f7f7f7; - padding: 0; -} - -div.admonition p, div.warning p { - margin: 0.5em 1em 0.5em 1em; - padding: 0.2em; -} - -div.admonition pre, div.warning pre { - margin: 0.4em 1em 0.4em 1em; -} - -div.admonition p.admonition-title, -div.warning p.admonition-title { - margin: 0; - padding: 0.2em 0 0.2em 0.6em; - color: white; - border-bottom: 1px solid #eee; - font-weight: bold; - background-color: #268bd2; -} - -div.warning { - border: 1px solid #eee8d5; -} - -div.warning p.admonition-title { - background-color: #cb4b16; - border-bottom-color: #eee; -} - -div.admonition ul, div.admonition ol, -div.warning ul, div.warning ol { - margin: 0.1em 0.5em 0.5em 3em; - padding: 0; -} - -div.versioninfo { - margin: 1em 0 0 0; - border: 1px solid #eee; - background-color: #DDEAF0; - padding: 8px; - line-height: 1.3em; - font-size: 0.9em; -} - - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #eee; - border-bottom: 1px solid #eee; -} diff --git a/docs/_themes/solar/static/solarized-dark.css b/docs/_themes/solar/static/solarized-dark.css deleted file mode 100644 index 6ebb945..0000000 --- a/docs/_themes/solar/static/solarized-dark.css +++ /dev/null @@ -1,84 +0,0 @@ -/* solarized dark style for solar theme */ - -/*style pre scrollbar*/ -pre::-webkit-scrollbar, .highlight::-webkit-scrollbar { - height: 0.5em; - background: #073642; -} - -pre::-webkit-scrollbar-thumb { - border-radius: 1em; - background: #93a1a1; -} - -/* pygments style */ -.highlight .hll { background-color: #ffffcc } -.highlight { background: #002B36!important; color: #93A1A1 } -.highlight .c { color: #586E75 } /* Comment */ -.highlight .err { color: #93A1A1 } /* Error */ -.highlight .g { color: #93A1A1 } /* Generic */ -.highlight .k { color: #859900 } /* Keyword */ -.highlight .l { color: #93A1A1 } /* Literal */ -.highlight .n { color: #93A1A1 } /* Name */ -.highlight .o { color: #859900 } /* Operator */ -.highlight .x { color: #CB4B16 } /* Other */ -.highlight .p { color: #93A1A1 } /* Punctuation */ -.highlight .cm { color: #586E75 } /* Comment.Multiline */ -.highlight .cp { color: #859900 } /* Comment.Preproc */ -.highlight .c1 { color: #586E75 } /* Comment.Single */ -.highlight .cs { color: #859900 } /* Comment.Special */ -.highlight .gd { color: #2AA198 } /* Generic.Deleted */ -.highlight .ge { color: #93A1A1; font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #DC322F } /* Generic.Error */ -.highlight .gh { color: #CB4B16 } /* Generic.Heading */ -.highlight .gi { color: #859900 } /* Generic.Inserted */ -.highlight .go { color: #93A1A1 } /* Generic.Output */ -.highlight .gp { color: #93A1A1 } /* Generic.Prompt */ -.highlight .gs { color: #93A1A1; font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #CB4B16 } /* Generic.Subheading */ -.highlight .gt { color: #93A1A1 } /* Generic.Traceback */ -.highlight .kc { color: #CB4B16 } /* Keyword.Constant */ -.highlight .kd { color: #268BD2 } /* Keyword.Declaration */ -.highlight .kn { color: #859900 } /* Keyword.Namespace */ -.highlight .kp { color: #859900 } /* Keyword.Pseudo */ -.highlight .kr { color: #268BD2 } /* Keyword.Reserved */ -.highlight .kt { color: #DC322F } /* Keyword.Type */ -.highlight .ld { color: #93A1A1 } /* Literal.Date */ -.highlight .m { color: #2AA198 } /* Literal.Number */ -.highlight .s { color: #2AA198 } /* Literal.String */ -.highlight .na { color: #93A1A1 } /* Name.Attribute */ -.highlight .nb { color: #B58900 } /* Name.Builtin */ -.highlight .nc { color: #268BD2 } /* Name.Class */ -.highlight .no { color: #CB4B16 } /* Name.Constant */ -.highlight .nd { color: #268BD2 } /* Name.Decorator */ -.highlight .ni { color: #CB4B16 } /* Name.Entity */ -.highlight .ne { color: #CB4B16 } /* Name.Exception */ -.highlight .nf { color: #268BD2 } /* Name.Function */ -.highlight .nl { color: #93A1A1 } /* Name.Label */ -.highlight .nn { color: #93A1A1 } /* Name.Namespace */ -.highlight .nx { color: #93A1A1 } /* Name.Other */ -.highlight .py { color: #93A1A1 } /* Name.Property */ -.highlight .nt { color: #268BD2 } /* Name.Tag */ -.highlight .nv { color: #268BD2 } /* Name.Variable */ -.highlight .ow { color: #859900 } /* Operator.Word */ -.highlight .w { color: #93A1A1 } /* Text.Whitespace */ -.highlight .mf { color: #2AA198 } /* Literal.Number.Float */ -.highlight .mh { color: #2AA198 } /* Literal.Number.Hex */ -.highlight .mi { color: #2AA198 } /* Literal.Number.Integer */ -.highlight .mo { color: #2AA198 } /* Literal.Number.Oct */ -.highlight .sb { color: #586E75 } /* Literal.String.Backtick */ -.highlight .sc { color: #2AA198 } /* Literal.String.Char */ -.highlight .sd { color: #93A1A1 } /* Literal.String.Doc */ -.highlight .s2 { color: #2AA198 } /* Literal.String.Double */ -.highlight .se { color: #CB4B16 } /* Literal.String.Escape */ -.highlight .sh { color: #93A1A1 } /* Literal.String.Heredoc */ -.highlight .si { color: #2AA198 } /* Literal.String.Interpol */ -.highlight .sx { color: #2AA198 } /* Literal.String.Other */ -.highlight .sr { color: #DC322F } /* Literal.String.Regex */ -.highlight .s1 { color: #2AA198 } /* Literal.String.Single */ -.highlight .ss { color: #2AA198 } /* Literal.String.Symbol */ -.highlight .bp { color: #268BD2 } /* Name.Builtin.Pseudo */ -.highlight .vc { color: #268BD2 } /* Name.Variable.Class */ -.highlight .vg { color: #268BD2 } /* Name.Variable.Global */ -.highlight .vi { color: #268BD2 } /* Name.Variable.Instance */ -.highlight .il { color: #2AA198 } /* Literal.Number.Integer.Long */ diff --git a/docs/_themes/solar/static/subtle_dots.png b/docs/_themes/solar/static/subtle_dots.png deleted file mode 100644 index bb2d611..0000000 Binary files a/docs/_themes/solar/static/subtle_dots.png and /dev/null differ diff --git a/docs/_themes/solar/theme.conf b/docs/_themes/solar/theme.conf deleted file mode 100644 index d8fc2f3..0000000 --- a/docs/_themes/solar/theme.conf +++ /dev/null @@ -1,4 +0,0 @@ -[theme] -inherit = basic -stylesheet = solar.css -pygments_style = none diff --git a/docs/api.rst b/docs/api.rst deleted file mode 100644 index 4851317..0000000 --- a/docs/api.rst +++ /dev/null @@ -1,159 +0,0 @@ -Using radon programmatically -============================ - -Radon has a set of functions and classes that you can call from within your -program to analyze files. - -Radon's API is composed of three layers: - -* at the very bottom (the lowest level) there are the **Visitors**: with these - classes one can build an AST out of the code and get basic metrics. - Currently, there are two available visitors: - :class:`~radon.visitors.ComplexityVisitor` and - :class:`~radon.visitors.HalsteadVisitor`. With the former one analyzes the - cyclomatic complexity of the code, while the latter gathers the so-called - Halstead metrics. With those and other raw metrics one can compute the - Maintainability Index. Example: - - .. code-block:: python - - >>> from radon.visitors import ComplexityVisitor - >>> v = ComplexityVisitor.from_code(''' - def factorial(n): - if n < 2: return 1 - return n * factorial(n - 1) - - def foo(bar): - return sum(i for i in range(bar ** 2) if bar % i) - ''') - >>> v.functions - [Function(name='factorial', lineno=2, col_offset=0, endline=4, is_method=False, - classname=None, closures=[], complexity=2), - Function(name='foo', lineno=6, col_offset=0, endline=7, is_method=False, classname=None, - closures=[], complexity=3)] - -* at a higher level, there are helper functions residing in separate modules. - For cyclomatic complexity, one can use those inside :mod:`radon.complexity`. - For Halstead metrics and MI index those inside :mod:`radon.metrics`. Finally, - for raw metrics (that includes SLOC, LLOC, LOC, &c.) one can use the function - :func:`~radon.raw.analyze` inside the :mod:`radon.raw` module. With the - majority of these functions the result is an object (``Module`` object in the - case of raw metrics) or a list of objects (``Function`` or ``Class`` objects - for cyclomatic complexity). Example: - - .. code-block:: python - - >>> from radon.complexity import cc_rank, cc_visit - >>> cc_rank(4), cc_rank(9), cc_rank(14), cc_rank(23) - ('A', 'B', 'C', 'D') - >>> cc_visit(''' - class A(object): - def meth(self): - return sum(i for i in range(10) if i - 2 < 5) - - def fib(n): - if n < 2: return 1 - return fib(n - 1) + fib(n - 2) - ''') - - [Function(name='fib', lineno=6, col_offset=0, endline=8, is_method=False, classname=None, - closures=[], complexity=2), Class(name='A', lineno=2, col_offset=0, endline=4, - methods=[Function(name='meth', lineno=3, col_offset=4, endline=4, is_method=True, - classname='A', closures=[], complexity=3)], real_complexity=3), - Function(name='meth', lineno=3, col_offset=4, endline=4, is_method=True, classname='A', - closures=[], complexity=3)] - - >>> from radon.raw import analyze - >>> analyze("""def _split_tokens(tokens, token, value): - '''Split a list of tokens on the specified token pair (token, value), - where *token* is the token type (i.e. its code) and *value* its actual - value in the code. - ''' - res = [[]] - for token_values in tokens: - if (token, value) == token_values[:2]: - res.append([]) - continue - res[-1].append(token_values) - return res - """) - >>> Module(loc=12, lloc=9, sloc=12, comments=0, multi=4, blank=0) - -* at the highest level there are the **Harvesters**. A Harvester implements all - the business logic of the CLI interface. To use a Harvester, it's sufficient - to create a :class:`~radon.cli.Config` object (which contains all the config - values) and pass it to the Harvester instance along with a list of paths to - analyze. An Harvester can then export its result to various formats (for - cyclomatic complexity both JSON and XML are available). It's possible to find - an example for this in the `Xenon project - `_. - - -Cyclomatic Complexity ---------------------- - -.. py:module:: radon.complexity - :synopsis: Complexity-related helper functions. - -.. autofunction:: cc_visit - -.. autofunction:: cc_visit_ast - -.. autofunction:: cc_rank - -.. autofunction:: sorted_results(blocks, order=SCORE) - -Raw metrics ------------ - -.. py:module:: radon.raw - :synopsis: Raw metrics functions. - -.. autofunction:: analyze - -Other metrics -------------- - -.. py:module:: radon.metrics - :synopsis: Halstead and Maintainability Index functions. - -.. autofunction:: h_visit - -.. autofunction:: h_visit_ast - -.. autofunction:: mi_visit - -.. autofunction:: mi_rank - -.. autofunction:: mi_parameters - -.. autofunction:: mi_compute - - -Visitors --------- - -.. py:module:: radon.visitors - :synopsis: AST visitors (they compute cyclomatic complexity and Halstead metrics) - -.. autoclass:: ComplexityVisitor - -.. autoclass:: HalsteadVisitor - - -Harvesters ----------- - -.. py:module:: radon.cli.harvest - :synopsis: Direct interface to Radon's CLI capabilities - -.. autoclass:: Harvester - :members: - - .. automethod:: __init__ - -.. autoclass:: CCHarvester - -.. autoclass:: RawHarvester - -.. autoclass:: MIHarvester diff --git a/docs/changelog.rst b/docs/changelog.rst deleted file mode 100644 index 4ccd509..0000000 --- a/docs/changelog.rst +++ /dev/null @@ -1,4 +0,0 @@ -Changelog -========= - -.. include:: ../CHANGELOG diff --git a/docs/commandline.rst b/docs/commandline.rst deleted file mode 100644 index 639b626..0000000 --- a/docs/commandline.rst +++ /dev/null @@ -1,299 +0,0 @@ -Command-line Usage -================== - -Radon currently has three commands: - - * :command:`cc`: compute Cyclomatic Complexity - * :command:`raw`: compute raw metrics - * :command:`mi`: compute Maintainability Index - -.. note:: - On some systems, such as Windows, the default encoding is not UTF-8. If you - are using Unicode characters in your Python file and want to analyze it - with Radon, you'll have to set the `RADONFILESENCODING` environment - variable to `UTF-8`. - -The :command:`cc` command -------------------------- - -.. program:: cc - -This command analyzes Python source files and compute Cyclomatic Complexity. -The output can be filtered by specifying the :option:`-n` and :option:`-x` -flags. By default, the complexity score is not displayed, the option -:option:`-s` (show complexity) toggles this behaviour. File or directories -exclusion is supported through glob patterns. Every positional argument is -interpreted as a path. The program then walks through its children and analyzes -Python files. -Every block will be ranked from A (best complexity score) to F (worst one). -Ranks corresponds to complexity scores as follows: - - ========== ====== ========================================= - CC score Rank Risk - ========== ====== ========================================= - 1 - 5 A low - simple block - 6 - 10 B low - well structured and stable block - 11 - 20 C moderate - slightly complex block - 21 - 30 D more than moderate - more complex block - 31 - 40 E high - complex block, alarming - 41+ F very high - error-prone, unstable block - ========== ====== ========================================= - -Blocks are also classified into three types: functions, methods and classes. -They're listed by letter in the command output for convenience when scanning -through a longer list of blocks: - - ============ ======== - Block type Letter - ============ ======== - Function F - Method M - Class C - ============ ======== - -Options -+++++++ - -.. option:: -x, --max - - Set the maximum complexity rank to display. - -.. option:: -n, --min - - Set the minimum complexity rank to display. - -.. option:: -a, --average - - If given, at the end of the analysis show the average Cyclomatic - Complexity. This option is influenced by :option:`-x, --max` and - :option:`-n, --min` options. - -.. option:: --total-average - - Like :option:`-a, --average`, but it is not influenced by `min` and `max`. - Every analyzed block is counted, no matter whether it is displayed or not. - -.. option:: -s, --show-complexity - - If given, show the complexity score along with its rank. - -.. option:: -e, --exclude - - Exclude files only when their path matches one of these glob patterns. - Usually needs quoting at the command line. - -.. option:: -i, --ignore - - Ignore directories when their name matches one of these glob patterns: radon - won't even descend into them. By default, hidden directories (starting with - '.') are ignored. - -.. option:: -o, --order - - The ordering function for the results. Can be one of: - - * `SCORE`: order by cyclomatic complexity (descending): - * `LINES`: order by line numbers; - * `ALPHA`: order by block names (alphabetically). - -.. option:: -j, --json - - If given, the results will be converted into JSON. This is useful in case - you need to export the results to another application. - -.. option:: --xml - - If given, the results will be converted into XML. Note that not all the - information is kept. This is specifically targeted to Jenkin's plugin CCM. - -.. option:: --no-assert - - Does not count assert statements when computing complexity. This is because - Python can be run with an optimize flag which removes assert statements. - -Examples -++++++++ - -:: - - $ radon cc path - -Radon will walk through the subdirectories of path and will analyze all -child nodes (every Python file it encounters). - -:: - - $ radon cc -e "path/tests*,path/docs/*" path - -As in the above example, Radon will walk the directories, excluding paths -matching ``path/tests/*`` and ``path/docs/*``. - -.. warning:: - - Remember to quote the patterns, otherwise your shell might expand them! - -Depending on the single cases, a more suitable alternative might be this:: - - $ radon cc -i "docs,tests" path - -:: - - $ cat path/to/file.py | radon cc - - -Setting the path to "-" will cause Radon to analyze code from stdin - -:: - - $ radon cc --min B --max E path - -Here Radon will only display blocks ranked between B and E (i.e. from ``CC=6`` -to ``CC=40``). - - -The :command:`mi` command -------------------------- - -.. program:: mi - -This command analyzes Python source code files and compute the Maintainability -Index score. -Every positional argument is treated as a starting point from which to walk -looking for Python files (as in the :command:`cc` command). Paths can be -excluded with the :option:`-e` option. -The Maintainability Index is always in the range 0-100. MI is ranked as -follows: - - ========== ====== ================= - MI score Rank Maintainability - ========== ====== ================= - 100 - 20 A Very high - 19 - 10 B Medium - 9 - 0 C Extremely low - ========== ====== ================= - - -Options -+++++++ - -.. option:: -x, --max - - Set the maximum MI to display. - -.. option:: -n, --min - - Set the minimum MI to display. - -.. option:: -e, --exclude - - Exclude files only when their path matches one of these glob patterns. - Usually needs quoting at the command line. - -.. option:: -i, --ignore - - Ignore directories when their name matches one of these glob patterns: radon - won't even descend into them. By default, hidden directories (starting with - '.') are ignored. - -.. option:: -m, --multi - - If given, Radon will not count multiline strings as comments. - Most of the time this is safe since multiline strings are used as functions - docstrings, but one should be aware that their use is not limited to that - and sometimes it would be wrong to count them as comment lines. - -.. option:: -s, --show - - If given, the actual MI value is shown in results, alongside the rank. - -.. option:: -j, --json - - Format results in JSON. - - -Examples -++++++++ - -:: - - $ radon mi path1 path2 - -Analyze every Python file under *path1* or *path2*. It checks recursively in -every subdirectory. - - -:: - - $ radon mi path1 -e "path1/tests/*" - -Like the previous example, but excluding from the analysis every path that -matches `path1/tests/*`. - -:: - - $ radon mi -m path1 - -Like the previous examples, but does not count multiline strings as comments. - - -The :command:`raw` command --------------------------- - -.. program:: raw - -This command analyzes the given Python modules in order to compute raw metrics. -These include: - - * **LOC**: the total number of lines of code - * **LLOC**: the number of logical lines of code - * **SLOC**: the number of source lines of code - not necessarily - corresponding to the **LLOC** [Wikipedia]_ - * **comments**: the number of Python comment lines (i.e. only single-line - comments ``#``) - * **multi**: the number of lines representing multi-line strings - * **blank**: the number of blank lines (or whitespace-only ones) - -The equation :math:`sloc + multi + single comments + blank = loc` should always -hold. - -.. [Wikipedia] More information on **LOC**, **SLOC**, **LLOC** here: http://en.wikipedia.org/wiki/Source_lines_of_code - - -Options -+++++++ - -.. option:: -e, --exclude - - Exclude files only when their path matches one of these glob patterns. - Usually needs quoting at the command line. - -.. option:: -i, --ignore - - Ignore directories when their name matches one of these glob patterns: radon - won't even descend into them. By default, hidden directories (starting with - '.') are ignored. - -.. option:: -s, --summary - - If given, at the end of the analysis a summary of the gathered - metrics will be shown. - -.. option:: -j, --json - - If given, the results will be converted into JSON. - -Examples -++++++++ - -:: - - $ radon raw path1 path2 - -Analyze every Python file under *path1* or *path2*. It checks recursively in -every subdirectory. - -:: - - $ radon raw path1 -e "path1/tests/*" - -Like the previous example, but excluding from the analysis every path that -matches ``path1/tests/*``. diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index 5e8298a..0000000 --- a/docs/conf.py +++ /dev/null @@ -1,251 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Radon documentation build configuration file, created by -# sphinx-quickstart on Thu Oct 11 16:08:21 2012. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import os -import sys -import datetime -sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), - '..'))) -import radon - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) - -# -- General configuration ----------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ext.autodoc'] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'Radon' -copyright = u'{0}, Michele Lacchia'.format('-'.join(map(str, - range(2012, - datetime.datetime.now().year + 1)))) - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = radon.__version__ -# The full version, including alpha/beta/rc tags. -release = version - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -#language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ['_build'] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - - -# -- Options for HTML output --------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'solar' -RTD_NEW_THEME = True - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ['_themes'] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Output file base name for HTML help builder. -htmlhelp_basename = 'Radondoc' - - -# -- Options for LaTeX output -------------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass [howto/manual]). -latex_documents = [ - ('index', 'Radon.tex', u'Radon Documentation', - u'Michele Lacchia', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'radon', u'Radon Documentation', - [u'Michele Lacchia'], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------------ - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'Radon', u'Radon Documentation', - u'Michele Lacchia', 'Radon', 'One line description of project.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' -mathjax_path = 'MathJax.js?config=TeX-AMS_HTML' diff --git a/docs/flake8.rst b/docs/flake8.rst deleted file mode 100644 index e36724b..0000000 --- a/docs/flake8.rst +++ /dev/null @@ -1,24 +0,0 @@ -Flake8 plugin -============= - -.. program:: flake8 - -Radon exposes a plugin for the Flake8 tool. In order to use it you will have to -install both `radon` and `flake8`. - -To enable the Radon checker, you will have to supply *at least* one of the -following options: - -.. option:: --radon-max-cc - - Set the cyclomatic complexity threshold. The default value is `10`. Blocks - with a greater complexity will be reported by the tool. - -.. option:: --radon-no-assert - - Instruct radon not to count `assert` statements towards cyclomatic - complexity. The default behaviour is the opposite. - - -For more information visit the `Flake8 documentation -`_. diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index ccf1da9..0000000 --- a/docs/index.rst +++ /dev/null @@ -1,64 +0,0 @@ -.. Radon documentation master file, created by - sphinx-quickstart on Thu Oct 11 16:08:21 2012. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to Radon's documentation! -================================= - -.. image:: http://img.shields.io/travis/rubik/radon/master.svg?style=flat - :alt: Travis-CI badge - :target: https://travis-ci.org/rubik/radon - -.. image:: http://img.shields.io/coveralls/rubik/radon/master.svg?style=flat - :alt: Coveralls badge - :target: https://coveralls.io/r/rubik/radon?branch=master - -.. image:: https://pypip.in/v/radon/badge.png?style=flat - :alt: PyPI latest version badge - :target: https://pypi.python.org/pypi/radon - -.. image:: https://pypip.in/d/radon/badge.png?style=flat - :alt: PyPI downloads badge - :target: https://pypi.python.org/pypi/radon - -.. image:: https://pypip.in/format/radon/badge.svg?style=flat - :target: http://pythonwheels.com/ - :alt: Download format - -.. image:: https://pypip.in/license/radon/badge.png?style=flat - :alt: Radon license - :target: https://pypi.python.org/pypi/radon - - ----- - -Radon is a Python tool which computes various code metrics. Supported metrics are: - - * raw metrics: SLOC, comment lines, blank lines, &c. - * Cyclomatic Complexity (i.e. McCabe's Complexity) - * Halstead metrics (all of them) - * the Maintainability Index (a Visual Studio metric) - -Radon can be used either from the command line or programmatically through its -API. - -Contents: - -.. toctree:: - :maxdepth: 2 - - intro - commandline - flake8 - api - changelog - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - diff --git a/docs/intro.rst b/docs/intro.rst deleted file mode 100644 index abd53de..0000000 --- a/docs/intro.rst +++ /dev/null @@ -1,148 +0,0 @@ -Introduction to Code Metrics -============================ - -This section contains a brief explanations of the metrics that Radon can -compute. - - -Cyclomatic Complexity ---------------------- - -Cyclomatic Complexity corresponds to the number of decisions a block of code -contains plus 1. This number (also called McCabe number) is equal to the number -of linearly independent paths through the code. This number can be used as a -guide when testing conditional logic in blocks. - -Radon analyzes the AST tree of a Python program to compute Cyclomatic -Complexity. Statements have the following effects on Cyclomatic Complexity: - -================== ============== =========================================================================================== - Construct Effect on CC Reasoning -================== ============== =========================================================================================== - if +1 An `if` statement is a single decision. - elif +1 The `elif` statement adds another decision. - else +0 The `else` statement does not cause a new decision. The decision is at the `if`. - for +1 There is a decision at the start of the loop. - while +1 There is a decision at the `while` statement. - except +1 Each `except` branch adds a new conditional path of execution. - finally +0 The finally block is unconditionally executed. - with +1 The `with` statement roughly corresponds to a try/except block (see PEP 343 for details). - assert +1 The `assert` statement internally roughly equals a conditional statement. - Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop. - Boolean Operator +1 Every boolean operator (and, or) adds a decision point. -================== ============== =========================================================================================== - - -Maintainability Index ---------------------- -Maintainability Index is a software metric which measures how maintainable -(easy to support and change) the source code is. The maintainability index is -calculated as a factored formula consisting of SLOC (Source Lines Of Code), -Cyclomatic Complexity and Halstead volume. It is used in several automated -software metric tools, including the Microsoft Visual Studio 2010 development -environment, which uses a shifted scale (0 to 100) derivative. - -Common formulas are: - -* the original formula: - - .. math:: - - MI = 171 - 5.2 \ln V - 0.23 G - 16.2 \ln L - -* the derivative used by SEI: - - .. math:: - - MI = 171 - 5.2\log_2 V - 0.23 G - 16.2 \log_2 L + 50 \sin(\sqrt{2.4 C}) - -* the derivative used by Visual Studio: - - .. math:: - - MI = \max \left [ 0, 100\dfrac{171 - 5.2\ln V - 0.23 G - 16.2 \ln L}{171} \right ]. - -Radon uses another derivative, computed from both SEI derivative and Visual -Studio one: - -.. math:: - - MI = \max \left [ 0, 100\dfrac{171 - 5.2\ln V - 0.23 G - 16.2 \ln L + 50 \sin(\sqrt{2.4 C}))}{171} \right ] - -Where: - * ``V`` is the Halstead Volume (see below); - * ``G`` is the total Cyclomatic Complexity; - * ``L`` is the number of Source Lines of Code (SLOC); - * ``C`` is the percent of comment lines (important: converted to radians). - -.. note:: Maintainability Index is still a very experimental metric, and - should not be taken into account as seriously as the other metrics. - -Raw Metrics ------------ - -The following are the definitions employed by Radon: - - * **LOC**: The total number of lines of code. It does not necessarily - correspond to the number of lines in the file. - * **LLOC**: The number of logical lines of code. Every logical line of code - contains exactly one statement. - * **SLOC**: The number of source lines of code - not necessarily - corresponding to the **LLOC**. - * Comments: The number of comment lines. Multi-line strings are not counted - as comment since, to the Python interpreter, they are just strings. - * Multi: The number of lines which represent multi-line strings. - * Blanks: The number of blank lines (or whitespace-only ones). - -The equation ``SLOC + Multi + Single comments + Blank = LOC`` should always -hold. Additionally, comment stats are calculated: - - * `C % L`: the ratio between number of comment lines and **LOC**, - expressed as a percentage; - * `C % S`: the ratio between number of comment lines and **SLOC**, - expressed as a percentage; - * `C + M % L`: the ratio between number of comment and multiline strings - lines and **LOC**, expressed as a percentage. - -Halstead Metrics ----------------- - -Halstead's goal was to identify measurable properties of software, and the -relations between them. These numbers are statically computed from the source -code: - - * :math:`\eta_1` = the number of distinct operators - * :math:`\eta_2` = the number of distinct operands - * :math:`N_1` = the total number of operators - * :math:`N_2` = the total number of operands - -From these numbers several measures can be calculated: - - * Program vocabulary: :math:`\eta = \eta_1 + \eta_2` - * Program length: :math:`N = N_1 + N_2` - * Calculated program length: :math:`\widehat{N} = \eta_1 \log_2 \eta_1 + - \eta_2 \log_2 \eta_2` - * Volume: :math:`V = N \log_2 \eta` - * Difficulty: :math:`D = \dfrac{\eta_1}{2} \cdot \dfrac{N_2}{\eta_2}` - * Effort: :math:`E = D \cdot V` - * Time required to program: :math:`T = \dfrac{E}{18}` seconds - * Number of delivered bugs: :math:`B = \dfrac{V}{3000}`. - -Further Reading ---------------- - -1. Paul Omand and Jack Hagemeister. “Metrics for assessing a software system’s - maintainability”. Proceedings International Conference on Software - Mainatenance (ICSM), 1992. (`doi `_) - -2. Don M. Coleman, Dan Ash, Bruce Lowther, Paul W. Oman. Using Metrics to - Evaluate Software System Maintainability. IEEE Computer 27(8), 1994. (`doi - `_, `postprint - `_) - -3. `Maintainability Index Range and Meaning - `_. - Code Analysis Team Blog, blogs.msdn, 20 November 2007. - -4. Arie van Deursen, `Think Twice Before Using the “Maintainability Index” - `_. diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 1754244..0000000 --- a/docs/make.bat +++ /dev/null @@ -1,190 +0,0 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set BUILDDIR=_build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -set I18NSPHINXOPTS=%SPHINXOPTS% . -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% - set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. singlehtml to make a single large HTML file - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. devhelp to make HTML files and a Devhelp project - echo. epub to make an epub - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. text to make text files - echo. man to make manual pages - echo. texinfo to make Texinfo files - echo. gettext to make PO message catalogs - echo. changes to make an overview over all changed/added/deprecated items - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end -) - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "singlehtml" ( - %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Radon.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Radon.ghc - goto end -) - -if "%1" == "devhelp" ( - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. - goto end -) - -if "%1" == "epub" ( - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The epub file is in %BUILDDIR%/epub. - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "text" ( - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The text files are in %BUILDDIR%/text. - goto end -) - -if "%1" == "man" ( - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The manual pages are in %BUILDDIR%/man. - goto end -) - -if "%1" == "texinfo" ( - %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. - goto end -) - -if "%1" == "gettext" ( - %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The message catalogs are in %BUILDDIR%/locale. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - if errorlevel 1 exit /b 1 - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - if errorlevel 1 exit /b 1 - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - if errorlevel 1 exit /b 1 - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - -:end diff --git a/engine.py b/engine.py new file mode 100755 index 0000000..ea52f14 --- /dev/null +++ b/engine.py @@ -0,0 +1,36 @@ +import json +import os +import shlex +import sys + +class Engine: + def __init__(self): + self.threshold = "b" + self.include_paths = ["."] + self.load_config("/config.json") + + def load_config(self, config_path): + if os.path.exists(config_path): + with open(config_path) as f: + config = json.load(f) + + if config.get("config"): + if config["config"].get("threshold"): + self.threshold = config["config"]["threshold"].lower() + + if config["config"].get("encoding"): + encoding = config["config"].get("encoding") + os.environ["RADONFILESENCODING"] = encoding + + python_paths = config.get("include_paths", ["."]) + self.include_paths = [shlex.quote(path) for path in python_paths if os.path.isdir(path) or path.endswith(".py")] + + def run(self): + if len(self.include_paths) > 0: + paths = " ".join(self.include_paths) + print("Running radon...", file = sys.stderr) + command = f"radon cc {paths} -n{self.threshold} --codeclimate" + print(f'running command: {command}', file = sys.stderr) + os.system(command) + else: + print("Empty workspace; skipping...", file = sys.stderr) diff --git a/pylintrc b/pylintrc deleted file mode 100644 index 7457c5e..0000000 --- a/pylintrc +++ /dev/null @@ -1,247 +0,0 @@ -[MASTER] - -# Specify a configuration file. -#rcfile= - -# Python code to execute, usually for sys.path manipulation such as -# pygtk.require(). -#init-hook= - -# Profiled execution. -profile=no - -# Add files or directories to the blacklist. They should be base names, not -# paths. -ignore=CVS,tests - -# Pickle collected data for later comparisons. -persistent=yes - -# List of plugins (as comma separated values of python modules names) to load, -# usually to register additional checkers. -load-plugins= - - -[MESSAGES CONTROL] - -# Enable the message, report, category or checker with the given id(s). You can -# either give multiple identifier separated by comma (,) or put this option -# multiple time. -#enable= - -# Disable the message, report, category or checker with the given id(s). You -# can either give multiple identifier separated by comma (,) or put this option -# multiple time (only on the command line, not in the configuration file where -# it should appear only once). -disable=W0141,W0142,E1101,C0103,W0231,W0232,E0213,E1102,F0401,W0212 - - -[REPORTS] -msg-template={msg_id}:{line:3d},{column}: {obj}: {msg} - -# Set the output format. Available formats are text, parseable, colorized, msvs -# (visual studio) and html -output-format=colorized - -# Put messages in a separate file for each module / package specified on the -# command line instead of printing them on stdout. Reports (if any) will be -# written in a file name "pylint_global.[txt|html]". -files-output=no - -# Tells whether to display a full report or only the messages -reports=yes - -# Python expression which should return a note less than 10 (10 is the highest -# note). You have access to the variables errors warning, statement which -# respectively contain the number of errors / warnings messages and the total -# number of statements analyzed. This is used by the global evaluation report -# (RP0004). -evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) - -# Add a comment according to your evaluation note. This is used by the global -# evaluation report (RP0004). -comment=no - - -[BASIC] - -# Required attributes for module, separated by a comma -required-attributes= - -# List of builtins function names that should not be used, separated by a comma -bad-functions=map,filter,apply,input - -# Regular expression which should only match correct module names -module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ - -# Regular expression which should only match correct module level names -const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ - -# Regular expression which should only match correct class names -class-rgx=[A-Z_][a-zA-Z0-9]+$ - -# Regular expression which should only match correct function names -function-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct method names -method-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct instance attribute names -attr-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct argument names -argument-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct variable names -variable-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct list comprehension / -# generator expression variable names -inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ - -# Good variable names which should always be accepted, separated by a comma -good-names=i,j,k,ex,Run,_ - -# Bad variable names which should always be refused, separated by a comma -bad-names=foo,bar,baz,toto,tutu,tata - -# Regular expression which should only match functions or classes name which do -# not require a docstring -no-docstring-rgx=__.*__ - - -[TYPECHECK] - -# Tells whether missing members accessed in mixin class should be ignored. A -# mixin class is detected if its name ends with "mixin" (case insensitive). -ignore-mixin-members=yes - -# List of classes names for which member attributes should not be checked -# (useful for classes with attributes dynamically set). -ignored-classes=SQLObject - -# When zope mode is activated, add a predefined set of Zope acquired attributes -# to generated-members. -zope=no - -# List of members which are set dynamically and missed by pylint inference -# system, and so shouldn't trigger E0201 when accessed. Python regular -# expressions are accepted. -generated-members=REQUEST,acl_users,aq_parent - - -[FORMAT] - -# Maximum number of characters on a single line. -max-line-length=80 - -# Maximum number of lines in a module -max-module-lines=1000 - -# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 -# tab). -indent-string=' ' - - -[SIMILARITIES] - -# Minimum lines number of a similarity. -min-similarity-lines=4 - -# Ignore comments when computing similarities. -ignore-comments=yes - -# Ignore docstrings when computing similarities. -ignore-docstrings=yes - - -[MISCELLANEOUS] - -# List of note tags to take in consideration, separated by a comma. -notes=FIXME,XXX,TODO - - -[VARIABLES] - -# Tells whether we should check for unused import in __init__ files. -init-import=no - -# A regular expression matching the beginning of the name of dummy variables -# (i.e. not used). -dummy-variables-rgx=_|dummy - -# List of additional names supposed to be defined in builtins. Remember that -# you should avoid to define new builtins when possible. -additional-builtins= - - -[CLASSES] - -# List of interface methods to ignore, separated by a comma. This is used for -# instance to not check methods defines in Zope's Interface base class. -ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by - -# List of method names used to declare (i.e. assign) instance attributes. -defining-attr-methods=__init__,__new__,setUp - -# List of valid names for the first argument in a class method. -valid-classmethod-first-arg=cls - - -[DESIGN] - -# Maximum number of arguments for function / method -max-args=5 - -# Argument names that match this expression will be ignored. Default to name -# with leading underscore -ignored-argument-names=_.* - -# Maximum number of locals for function / method body -max-locals=15 - -# Maximum number of return / yield for function / method body -max-returns=6 - -# Maximum number of branch for function / method body -max-branchs=12 - -# Maximum number of statements in function / method body -max-statements=50 - -# Maximum number of parents for a class (see R0901). -max-parents=7 - -# Maximum number of attributes for a class (see R0902). -max-attributes=7 - -# Minimum number of public methods for a class (see R0903). -min-public-methods=2 - -# Maximum number of public methods for a class (see R0904). -max-public-methods=20 - - -[IMPORTS] - -# Deprecated modules which should not be used, separated by a comma -deprecated-modules=regsub,string,TERMIOS,Bastion,rexec - -# Create a graph of every (i.e. internal and external) dependencies in the -# given file (report RP0402 must not be disabled) -import-graph= - -# Create a graph of external dependencies in the given file (report RP0402 must -# not be disabled) -ext-import-graph= - -# Create a graph of internal dependencies in the given file (report RP0402 must -# not be disabled) -int-import-graph= - - -[EXCEPTIONS] - -# Exceptions that will emit a warning when being caught. Defaults to -# "Exception" -overgeneral-exceptions=Exception diff --git a/radon/__init__.py b/radon/__init__.py deleted file mode 100644 index e77ee3f..0000000 --- a/radon/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -'''This module contains the main() function, which is the entry point for the -command line interface.''' - -__version__ = '2.1.1' - - -def main(): - '''The entry point for Setuptools.''' - import sys - from radon.cli import program, log_error - - if not sys.argv[1:]: - sys.argv.append('-h') - try: - program() - except Exception as e: - log_error(e) - - -if __name__ == '__main__': - main() diff --git a/radon/cli/__init__.py b/radon/cli/__init__.py deleted file mode 100644 index d74cc7a..0000000 --- a/radon/cli/__init__.py +++ /dev/null @@ -1,223 +0,0 @@ -'''In this module the CLI interface is created.''' - -import sys -import inspect -from mando import Program - -import radon.complexity as cc_mod -from radon.cli.colors import BRIGHT, RED, RESET -from radon.cli.harvest import CCHarvester, RawHarvester, MIHarvester - - -program = Program(version=sys.modules['radon'].__version__) - - -@program.command -@program.arg('paths', nargs='+') -def cc(paths, min='A', max='F', show_complexity=False, average=False, - exclude=None, ignore=None, order='SCORE', json=False, no_assert=False, - show_closures=False, total_average=False, xml=False, codeclimate=False): - '''Analyze the given Python modules and compute Cyclomatic - Complexity (CC). - - The output can be filtered using the *min* and *max* flags. In addition - to that, by default complexity score is not displayed. - - :param paths: The paths where to find modules or packages to analyze. More - than one path is allowed. - :param -n, --min : The minimum complexity to display (default to A). - :param -x, --max : The maximum complexity to display (default to F). - :param -e, --exclude : Exclude files only when their path matches one - of these glob patterns. Usually needs quoting at the command line. - :param -i, --ignore : Ignore directories when their name matches one - of these glob patterns: radon won't even descend into them. By default, - hidden directories (starting with '.') are ignored. - :param -s, --show-complexity: Whether or not to show the actual complexity - score together with the A-F rank. Default to False. - :param -a, --average: If True, at the end of the analysis display the - average complexity. Default to False. - :param --total-average: Like `-a, --average`, but it is not influenced by - `min` and `max`. Every analyzed block is counted, no matter whether it - is displayed or not. - :param -o, --order : The ordering function. Can be SCORE, LINES or - ALPHA. - :param -j, --json: Format results in JSON. - :param --xml: Format results in XML (compatible with CCM). - :param --codeclimate: Format results for Code Climate. - :param --no-assert: Do not count `assert` statements when computing - complexity. - :param --show-closures: Add closures/inner classes to the output. - ''' - config = Config( - min=min.upper(), - max=max.upper(), - exclude=exclude, - ignore=ignore, - show_complexity=show_complexity, - average=average, - total_average=total_average, - order=getattr(cc_mod, order.upper(), getattr(cc_mod, 'SCORE')), - no_assert=no_assert, - show_closures=show_closures, - ) - harvester = CCHarvester(paths, config) - log_result(harvester, json=json, xml=xml, codeclimate=codeclimate) - - -@program.command -@program.arg('paths', nargs='+') -def raw(paths, exclude=None, ignore=None, summary=False, json=False): - '''Analyze the given Python modules and compute raw metrics. - - :param paths: The paths where to find modules or packages to analyze. More - than one path is allowed. - :param -e, --exclude : Exclude files only when their path matches one - of these glob patterns. Usually needs quoting at the command line. - :param -i, --ignore : Ignore directories when their name matches one - of these glob patterns: radon won't even descend into them. By default, - hidden directories (starting with '.') are ignored. - :param -s, --summary: If given, at the end of the analysis display the - summary of the gathered metrics. Default to False. - :param -j, --json: Format results in JSON. - ''' - config = Config( - exclude=exclude, - ignore=ignore, - summary=summary, - ) - harvester = RawHarvester(paths, config) - log_result(harvester, json=json) - - -@program.command -@program.arg('paths', nargs='+') -def mi(paths, min='A', max='C', multi=True, exclude=None, ignore=None, - show=False, json=False, sort=False): - '''Analyze the given Python modules and compute the Maintainability Index. - - The maintainability index (MI) is a compound metric, with the primary aim - being to determine how easy it will be to maintain a particular body of - code. - - :param paths: The paths where to find modules or packages to analyze. More - than one path is allowed. - :param -n, --min : The minimum MI to display (default to A). - :param -x, --max : The maximum MI to display (default to C). - :param -e, --exclude : Exclude files only when their path matches one - of these glob patterns. Usually needs quoting at the command line. - :param -i, --ignore : Ignore directories when their name matches one - of these glob patterns: radon won't even descend into them. By default, - hidden directories (starting with '.') are ignored. - :param -m, --multi: If given, multiline strings are not counted as - comments. - :param -s, --show: If given, the actual MI value is shown in results. - :param -j, --json: Format results in JSON. - :param --sort: If given, results are sorted in ascending order. - ''' - config = Config( - min=min.upper(), - max=max.upper(), - exclude=exclude, - ignore=ignore, - multi=multi, - show=show, - sort=sort, - ) - - harvester = MIHarvester(paths, config) - log_result(harvester, json=json) - - -class Config(object): - '''An object holding config values.''' - - def __init__(self, **kwargs): - '''Configuration values are passed as keyword parameters.''' - self.config_values = kwargs - - def __getattr__(self, attr): - '''If an attribute is not found inside the config values, the request - is handed to `__getattribute__`. - ''' - if attr in self.config_values: - return self.config_values[attr] - return self.__getattribute__(attr) - - def __repr__(self): - '''The string representation of the Config object is just the one of - the dictionary holding the configuration values. - ''' - return repr(self.config_values) - - def __eq__(self, other): - '''Two Config objects are equals if their contents are equal.''' - return self.config_values == other.config_values - - @classmethod - def from_function(cls, func): - '''Construct a Config object from a function's defaults.''' - kwonlydefaults = {} - try: - argspec = inspect.getfullargspec(func) - kwonlydefaults = argspec.kwonlydefaults or {} - except AttributeError: # pragma: no cover - argspec = inspect.getargspec(func) - args, _, _, defaults = argspec[:4] - values = dict(zip(reversed(args), reversed(defaults or []))) - values.update(kwonlydefaults) - return cls(**values) - - -def log_result(harvester, **kwargs): - '''Log the results of an :class:`~radon.cli.harvest.Harvester object. - - Keywords parameters determine how the results are formatted. If *json* is - `True`, then `harvester.as_json()` is called. If *xml* is `True`, then - `harvester.as_xml()` is called. If *codeclimate* is True, then - `harvester.as_codeclimate_issues()` is called. - Otherwise, `harvester.to_terminal()` is executed and `kwargs` is directly - passed to the :func:`~radon.cli.log` function. - ''' - if kwargs.get('json'): - log(harvester.as_json(), noformat=True) - elif kwargs.get('xml'): - log(harvester.as_xml(), noformat=True) - elif kwargs.get('codeclimate'): - log_list(harvester.as_codeclimate_issues(), delimiter='\0', - noformat=True) - else: - for msg, args, kwargs in harvester.to_terminal(): - if kwargs.get('error', False): - log(msg) - log_error(args[0], indent=1) - continue - msg = [msg] if not isinstance(msg, (list, tuple)) else msg - log_list(msg, *args, **kwargs) - - -def log(msg, *args, **kwargs): - '''Log a message, passing *args* to the strings' `format()` method. - - *indent*, if present as a keyword argument, specifies the indent level, so - that `indent=0` will log normally, `indent=1` will indent the message by 4 - spaces, &c.. - *noformat*, if present and True, will cause the message not to be formatted - in any way. - ''' - indent = 4 * kwargs.get('indent', 0) - delimiter = kwargs.get('delimiter', '\n') - m = msg if kwargs.get('noformat', False) else msg.format(*args) - sys.stdout.write(' ' * indent + m + delimiter) - - -def log_list(lst, *args, **kwargs): - '''Log an entire list, line by line. All the arguments are directly passed - to :func:`~radon.cli.log`. - ''' - for line in lst: - log(line, *args, **kwargs) - - -def log_error(msg, *args, **kwargs): - '''Log an error message. Arguments are the same as log().''' - log('{0}{1}ERROR{2}: {3}'.format(BRIGHT, RED, RESET, msg), *args, **kwargs) diff --git a/radon/cli/colors.py b/radon/cli/colors.py deleted file mode 100644 index 747fe92..0000000 --- a/radon/cli/colors.py +++ /dev/null @@ -1,27 +0,0 @@ -'''Module holding constants used to format lines that are printed to the -terminal. -''' - -import sys -try: - import colorama - colorama.init(strip=(not sys.stdout.isatty())) - GREEN, YELLOW, RED = (colorama.Fore.GREEN, colorama.Fore.YELLOW, - colorama.Fore.RED) - MAGENTA, CYAN, WHITE = (colorama.Fore.MAGENTA, colorama.Fore.CYAN, - colorama.Fore.WHITE) - BRIGHT, RESET = colorama.Style.BRIGHT, colorama.Style.RESET_ALL -except ImportError: # pragma: no cover - # No colorama, so let's fallback to no-color mode - GREEN = YELLOW = RED = MAGENTA = CYAN = WHITE = BRIGHT = RESET = '' - -RANKS_COLORS = {'A': GREEN, 'B': GREEN, - 'C': YELLOW, 'D': YELLOW, - 'E': RED, 'F': RED} - -LETTERS_COLORS = {'F': MAGENTA, - 'C': CYAN, - 'M': WHITE} - -MI_RANKS = {'A': GREEN, 'B': YELLOW, 'C': RED} -TEMPLATE = '{0}{1} {reset}{2}:{3} {4} - {5}{6}{reset}' diff --git a/radon/cli/harvest.py b/radon/cli/harvest.py deleted file mode 100644 index ddce660..0000000 --- a/radon/cli/harvest.py +++ /dev/null @@ -1,280 +0,0 @@ -'''This module holds the base Harvester class and all its subclassess.''' - -import json -import collections -from radon.raw import analyze -from radon.metrics import mi_visit, mi_rank -from radon.complexity import (cc_visit, sorted_results, cc_rank, - add_inner_blocks) -from radon.cli.colors import RANKS_COLORS, MI_RANKS, RESET -from radon.cli.tools import (iter_filenames, _open, cc_to_dict, dict_to_xml, - dict_to_codeclimate_issues, cc_to_terminal, - raw_to_dict) - - -class Harvester(object): - '''Base class defining the interface of a Harvester object. - - A Harvester has the following lifecycle: - - 1. **Initialization**: `h = Harvester(paths, config)` - - 2. **Execution**: `r = h.results`. `results` holds an iterable object. - The first time `results` is accessed, `h.run()` is called. This method - should not be subclassed. Instead, the :meth:`gobble` method should be - implemented. - - 3. **Reporting**: the methods *as_json* and *as_xml* return a string - with the corresponding format. The method *to_terminal* is a generator - that yields the lines to be printed in the terminal. - - This class is meant to be subclasses and cannot be used directly, since - the methods :meth:`gobble`, :meth:`as_xml` and :meth:`to_terminal` are - not implemented. - ''' - - def __init__(self, paths, config): - '''Initialize the Harvester. - - *paths* is a list of paths to analyze. - *config* is a :class:`~radon.cli.Config` object holding the - configuration values specific to the Harvester. - ''' - self.paths = paths - self.config = config - self._results = [] - - def _iter_filenames(self): - '''A wrapper around :func:`~radon.cli.tools.iter_filenames`.''' - return iter_filenames(self.paths, self.config.exclude, - self.config.ignore) - - def gobble(self, fobj): - '''Subclasses must implement this method to define behavior. - - This method is called for every file to analyze. *fobj* is the file - object. This method should return the results from the analysis, - preferably a dictionary. - ''' - raise NotImplementedError - - def run(self): - '''Start the analysis. For every file, this method calls the - :meth:`gobble` method. Results are yielded as tuple: - ``(filename, analysis_results)``. - ''' - for name in self._iter_filenames(): - with _open(name) as fobj: - try: - yield (name, self.gobble(fobj)) - except Exception as e: - yield (name, {'error': str(e)}) - - @property - def results(self): - '''This property holds the results of the analysis. - - The first time it is accessed, an iterator is returned. Its - elements are cached into a list as it is iterated over. Therefore, if - `results` is accessed multiple times after the first one, a list will - be returned. - ''' - def caching_iterator(it, r): - '''An iterator that caches another iterator.''' - for t in it: - yield t - r.append(t) - - if self._results: - return self._results - return caching_iterator(self.run(), self._results) - - def as_json(self): - '''Format the results as JSON.''' - return json.dumps(dict(self.results)) - - def as_xml(self): - '''Format the results as XML.''' - raise NotImplementedError - - def as_codeclimate_issues(self): - '''Format the results as Code Climate issues.''' - raise NotImplementedError - - def to_terminal(self): - '''Yields tuples representing lines to be printed to a terminal. - - The tuples have the following format: ``(line, args, kwargs)``. - The line is then formatted with `line.format(*args, **kwargs)`. - ''' - raise NotImplementedError - - -class CCHarvester(Harvester): - '''A class that analyzes Python modules' Cyclomatic Complexity.''' - - def gobble(self, fobj): - '''Analyze the content of the file object.''' - r = cc_visit(fobj.read(), no_assert=self.config.no_assert) - if self.config.show_closures: - r = add_inner_blocks(r) - return sorted_results(r, order=self.config.order) - - def _to_dicts(self): - '''Format the results as a dictionary of dictionaries.''' - result = {} - for key, data in self.results: - if 'error' in data: - result[key] = data - continue - values = [v for v in map(cc_to_dict, data) - if self.config.min <= v['rank'] <= self.config.max] - if values: - result[key] = values - return result - - def as_json(self): - '''Format the results as JSON.''' - return json.dumps(self._to_dicts()) - - def as_xml(self): - '''Format the results as XML. This is meant to be compatible with - Jenkin's CCM plugin. Therefore not all the fields are kept. - ''' - return dict_to_xml(self._to_dicts()) - - def as_codeclimate_issues(self): - '''Format the result as Code Climate issues.''' - return dict_to_codeclimate_issues(self._to_dicts(), self.config.min) - - def to_terminal(self): - '''Yield lines to be printed in a terminal.''' - average_cc = .0 - analyzed = 0 - for name, blocks in self.results: - if 'error' in blocks: - yield name, (blocks['error'],), {'error': True} - continue - res, cc, n = cc_to_terminal(blocks, self.config.show_complexity, - self.config.min, self.config.max, - self.config.total_average) - average_cc += cc - analyzed += n - if res: - yield name, (), {} - yield res, (), {'indent': 1} - - if (self.config.average or self.config.total_average) and analyzed: - cc = average_cc / analyzed - ranked_cc = cc_rank(cc) - yield ('\n{0} blocks (classes, functions, methods) analyzed.', - (analyzed,), {}) - yield ('Average complexity: {0}{1} ({2}){3}', - (RANKS_COLORS[ranked_cc], ranked_cc, cc, RESET), {}) - - -class RawHarvester(Harvester): - '''A class that analyzes Python modules' raw metrics.''' - - headers = ['LOC', 'LLOC', 'SLOC', 'Comments', 'Single comments', 'Multi', - 'Blank'] - - def gobble(self, fobj): - '''Analyze the content of the file object.''' - return raw_to_dict(analyze(fobj.read())) - - def as_xml(self): - '''Placeholder method. Currently not implemented.''' - raise NotImplementedError('RawHarvester: cannot export results as XML') - - def to_terminal(self): - '''Yield lines to be printed to a terminal.''' - sum_metrics = collections.defaultdict(int) - for path, mod in self.results: - if 'error' in mod: - yield path, (mod['error'],), {'error': True} - continue - yield path, (), {} - for header in self.headers: - value = mod[header.lower().replace(' ', '_')] - yield '{0}: {1}', (header, value), {'indent': 1} - sum_metrics[header] += value - - loc, comments = mod['loc'], mod['comments'] - yield '- Comment Stats', (), {'indent': 1} - yield ('(C % L): {0:.0%}', (comments / (float(loc) or 1),), - {'indent': 2}) - yield ('(C % S): {0:.0%}', (comments / (float(mod['sloc']) or 1),), - {'indent': 2}) - yield ('(C + M % L): {0:.0%}', - ((comments + mod['multi']) / (float(loc) or 1),), - {'indent': 2}) - - if self.config.summary: - _get = lambda k, v=0: sum_metrics.get(k, v) - comments = float(_get('Comments')) - yield '** Total **', (), {} - for header in self.headers: - yield '{0}: {1}', (header, sum_metrics[header]), {'indent': 1} - - yield '- Comment Stats', (), {'indent': 1} - yield ( - '(C % L): {0:.0%}', - (comments / (_get('LOC', 1) or 1),), - {'indent': 2}, - ) - yield ( - '(C % S): {0:.0%}', - (comments / (_get('SLOC', 1) or 1),), - {'indent': 2}, - ) - yield ( - '(C + M % L): {0:.0%}', - (float(_get('Comments', 0) + _get('Multi')) / - (_get('LOC', 1) or 1),), - {'indent': 2}, - ) - - -class MIHarvester(Harvester): - '''A class that analyzes Python modules' Maintainability Index.''' - - def gobble(self, fobj): - '''Analyze the content of the file object.''' - mi = mi_visit(fobj.read(), self.config.multi) - rank = mi_rank(mi) - return {'mi': mi, 'rank': rank} - - @property - def filtered_results(self): - '''Filter results with respect with their rank.''' - for key, value in self.results: - if ('error' in value or - self.config.min <= value['rank'] <= self.config.max): - yield (key, value) - - def _sort(self, results): - if self.config.sort: - return sorted(results, key=lambda el: el[1]['mi']) - return results - - def as_json(self): - '''Format the results as JSON.''' - return json.dumps(dict(self.filtered_results)) - - def as_xml(self): - '''Placeholder method. Currently not implemented.''' - raise NotImplementedError('Cannot export results as XML') - - def to_terminal(self): - '''Yield lines to be printed to a terminal.''' - for name, mi in self._sort(self.filtered_results): - if 'error' in mi: - yield name, (mi['error'],), {'error': True} - continue - rank = mi['rank'] - color = MI_RANKS[rank] - to_show = '' - if self.config.show: - to_show = ' ({0:.2f})'.format(mi['mi']) - yield '{0} - {1}{2}{3}{4}', (name, color, rank, to_show, RESET), {} diff --git a/radon/cli/tools.py b/radon/cli/tools.py deleted file mode 100644 index 2d3214c..0000000 --- a/radon/cli/tools.py +++ /dev/null @@ -1,484 +0,0 @@ -'''This module contains various utility functions used in the CLI interface. -Attributes: - _encoding (str): encoding with all files will be opened. Configured by - environment variable RADONFILESENCODING -''' - -import os -import re -import sys -import json -import locale -import hashlib -import fnmatch -import platform -import xml.etree.cElementTree as et -from contextlib import contextmanager -from radon.visitors import Function -from radon.complexity import cc_rank -from radon.cli.colors import (LETTERS_COLORS, RANKS_COLORS, TEMPLATE, BRIGHT, - RESET) - - -# PyPy doesn't support encoding parameter in `open()` function and works with -# UTF-8 encoding by default -if platform.python_implementation() == 'PyPy': - @contextmanager - def _open(path): - '''Mock of the built-in `open()` function. If `path` is `-` then - `sys.stdin` is returned. - ''' - if path == '-': - yield sys.stdin - else: - with open(path) as f: - yield f -else: - # Add customized file encoding to fix #86. - # By default `open()` function uses `locale.getpreferredencoding(False)` - # encoding (see https://docs.python.org/3/library/functions.html#open). - # This code allows to change `open()` encoding by setting an environment - # variable. - _encoding = os.getenv('RADONFILESENCODING', - locale.getpreferredencoding(False)) - - if sys.version_info[:2] < (2, 7): - # This open function treats line-endings slightly differently than - # io.open. But the latter is implemented in pure Python in version 2.6, - # so we'll live with the differences instead of taking a hit on the - # speed. Radon does a lot of file reading, so the difference in speed - # is significant. - from codecs import open as _open_function - elif sys.version_info[:2] < (3, 0): - from io import open as _io_open_function, TextIOWrapper - from codecs import lookup, BOM_UTF8 - cookie_re = re.compile(r'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)') - blank_re = re.compile(r'^[ \t\f]*(?:[#\r\n]|$)') - - def _get_normal_name(orig_enc): - '''Imitates get_normal_name in tokenizer.c.''' - # Only care about the first 12 characters. - enc = orig_enc[:12].lower().replace('_', '-') - if enc == 'utf-8' or enc.startswith('utf-8-'): - return 'utf-8' - if enc in ('latin-1', 'iso-8859-1', 'iso-latin-1') or \ - enc.startswith(('latin-1-', 'iso-8859-1-', 'iso-latin-1-')): - return 'iso-8859-1' - return orig_enc - - def detect_encoding(readline): - ''' - The detect_encoding() function is used to detect the encoding that - should be used to decode a Python source file. It requires one - argument, readline, in the same way as the tokenize() generator. - - It will call readline a maximum of twice, and return the encoding - used (as a string) and a list of any lines (left as bytes) it has - read in. - - It detects the encoding from the presence of a utf-8 bom or an - encoding cookie as specified in pep-0263. If both a bom and a - cookie are present, but disagree, a SyntaxError will be raised. If - the encoding cookie is an invalid charset, raise a SyntaxError. - Note that if a utf-8 bom is found, 'utf-8-sig' is returned. - - If no encoding is specified, then the default of 'utf-8' will be - returned. The third argument indicates whether the encoding cookie - was found or not. - ''' - try: - filename = readline.__self__.name - except AttributeError: - filename = None - bom_found = False - encoding = None - default = 'utf-8' - - def read_or_stop(): - try: - return readline() - except StopIteration: - return b'' - - def find_cookie(line): - try: - # Decode as UTF-8. Either the line is an encoding - # declaration, in which case it should be pure ASCII, or it - # must be UTF-8 per default encoding. - line_string = line.decode('utf-8') - except UnicodeDecodeError: - msg = 'invalid or missing encoding declaration' - if filename is not None: - msg = '{} for {!r}'.format(msg, filename) - raise SyntaxError(msg) - - match = cookie_re.match(line_string) - if not match: - return None - encoding = _get_normal_name(match.group(1)) - try: - lookup(encoding) - except LookupError: - # This behaviour mimics the Python interpreter - if filename is None: - msg = 'unknown encoding: ' + encoding - else: - msg = ('unknown encoding for {!r}: ' - '{}'.format(filename, encoding)) - raise SyntaxError(msg) - - if bom_found: - if encoding != 'utf-8': - # This behaviour mimics the Python interpreter - if filename is None: - msg = 'encoding problem: utf-8' - else: - msg = ('encoding problem for ' - '{!r}: utf-8'.format(filename)) - raise SyntaxError(msg) - encoding += '-sig' - return encoding - - first = read_or_stop() - if first.startswith(BOM_UTF8): - bom_found = True - first = first[3:] - default = 'utf-8-sig' - if not first: - return default, [], False - - encoding = find_cookie(first) - if encoding: - return encoding, [first], True - if not blank_re.match(first): - return default, [first], False - - second = read_or_stop() - if not second: - return default, [first], False - - encoding = find_cookie(second) - if encoding: - return encoding, [first, second], True - - return default, [first, second], False - - def _open_function(filename, encoding=None): - '''Open a file in read only mode using the encoding detected by - detect_encoding(). - ''' - # Note: Python 3 uses builtins.open here.. - buffer = _io_open_function(filename, 'rb') - try: - encoding, lines, found = detect_encoding(buffer.readline) - # Note: Python 3's tokenize does buffer seek(0), but that - # leaves the encoding cookie in the file and ast.parse - # does not like Unicode text with an encoding cookie. - # If the encoding was not found we seek to the start anyway - if found: - buffer.seek(sum(len(line) for line in lines)) - else: - buffer.seek(0) - text = TextIOWrapper(buffer, encoding, line_buffering=True) - text.mode = 'r' - return text - except: - buffer.close() - raise - - else: - _open_function = open - - @contextmanager - def _open(path): - '''Mock of the built-in `open()` function. If `path` is `-` then - `sys.stdin` is returned. - ''' - if path == '-': - yield sys.stdin - else: - with _open_function(path, encoding=_encoding) as f: - yield f - - -def iter_filenames(paths, exclude=None, ignore=None): - '''A generator that yields all sub-paths of the ones specified in - `paths`. Optional `exclude` filters can be passed as a comma-separated - string of regexes, while `ignore` filters are a comma-separated list of - directory names to ignore. Ignore patterns are can be plain names or glob - patterns. If paths contains only a single hyphen, stdin is implied, - returned as is. - ''' - if set(paths) == set(('-',)): - yield '-' - return - for path in paths: - if os.path.isfile(path): - yield path - continue - for filename in explore_directories(path, exclude, ignore): - yield filename - - -def explore_directories(start, exclude, ignore): - '''Explore files and directories under `start`. `explore` and `ignore` - arguments are the same as in :func:`iter_filenames`. - ''' - e = '*[!p][!y]' - exclude = '{0},{1}'.format(e, exclude).split(',') if exclude else [e] - ignore = '.*,{0}'.format(ignore).split(',') if ignore else ['.*'] - for root, dirs, files in os.walk(start): - dirs[:] = list(filter_out(dirs, ignore)) - fullpaths = (os.path.normpath(os.path.join(root, p)) for p in files) - for filename in filter_out(fullpaths, exclude): - if (not os.path.basename(filename).startswith('.') and - filename.endswith('.py')): - yield filename - - -def filter_out(strings, patterns): - '''Filter out any string that matches any of the specified patterns.''' - for s in strings: - if all(not fnmatch.fnmatch(s, p) for p in patterns): - yield s - - -def cc_to_dict(obj): - '''Convert an object holding CC results into a dictionary. This is meant - for JSON dumping.''' - def get_type(obj): - '''The object can be of type *method*, *function* or *class*.''' - if isinstance(obj, Function): - return 'method' if obj.is_method else 'function' - return 'class' - - result = { - 'type': get_type(obj), - 'rank': cc_rank(obj.complexity), - } - attrs = set(Function._fields) - set(('is_method', 'closures')) - for a in attrs: - v = getattr(obj, a, None) - if v is not None: - result[a] = v - for key in ('methods', 'closures'): - if hasattr(obj, key): - result[key] = list(map(cc_to_dict, getattr(obj, key))) - return result - - -def raw_to_dict(obj): - '''Convert an object holding raw analysis results into a dictionary. This - is meant for JSON dumping.''' - result = {} - for a in obj._fields: - v = getattr(obj, a, None) - if v is not None: - result[a] = v - return result - - -def dict_to_xml(results): - '''Convert a dictionary holding CC analysis result into a string containing - xml.''' - ccm = et.Element('ccm') - for filename, blocks in results.items(): - for block in blocks: - metric = et.SubElement(ccm, 'metric') - et.SubElement(metric, 'complexity').text = str(block['complexity']) - - unit = et.SubElement(metric, 'unit') - name = block['name'] - if 'classname' in block: - name = '{0}.{1}'.format(block['classname'], block['name']) - unit.text = name - - et.SubElement(metric, 'classification').text = block['rank'] - et.SubElement(metric, 'file').text = filename - et.SubElement(metric, 'startLineNumber').text = \ - str(block['lineno']) - et.SubElement(metric, 'endLineNumber').text = str(block['endline']) - return et.tostring(ccm).decode('utf-8') - - -def dict_to_codeclimate_issues(results, threshold='B'): - '''Convert a dictionary holding CC analysis results into Code Climate - issue json.''' - codeclimate_issues = [] - content = get_content() - error_content = 'We encountered an error attempting to analyze this line.' - - for path in results: - info = results[path] - if type(info) is dict and info.get('error'): - description = 'Error: {0}'.format(info.get('error', error_content)) - beginline = re.search(r'\d+', description) - error_category = 'Bug Risk' - - if beginline: - beginline = int(beginline.group()) - else: - beginline = 1 - - endline = beginline - remediation_points = 1000000 - fingerprint = get_fingerprint(path, ['error']) - codeclimate_issues.append( - format_cc_issue(path, description, error_content, - error_category, beginline, endline, - remediation_points, fingerprint)) - else: - for offender in info: - beginline = offender['lineno'] - endline = offender['endline'] - complexity = offender['complexity'] - category = 'Complexity' - description = ('Cyclomatic complexity is too high in {0} {1}. ' - '({2})'.format(offender['type'], - offender['name'], - complexity)) - remediation_points = get_remediation_points( - complexity, threshold) - fingerprint = get_fingerprint(path, [offender['type'], - offender['name']]) - - if remediation_points > 0: - codeclimate_issues.append( - format_cc_issue(path, description, content, category, - beginline, endline, - remediation_points, fingerprint)) - return codeclimate_issues - - -def cc_to_terminal(results, show_complexity, min, max, total_average): - '''Transform Cyclomatic Complexity results into a 3-elements tuple: - - ``(res, total_cc, counted)`` - - `res` is a list holding strings that are specifically formatted to be - printed to a terminal. - `total_cc` is a number representing the total analyzed cyclomatic - complexity. - `counted` holds the number of the analyzed blocks. - - If *show_complexity* is `True`, then the complexity of a block will be - shown in the terminal line alongside its rank. - *min* and *max* are used to control which blocks are shown in the resulting - list. A block is formatted only if its rank is `min <= rank <= max`. - If *total_average* is `True`, the `total_cc` and `counted` count every - block, regardless of the fact that they are formatted in `res` or not. - ''' - res = [] - counted = 0 - total_cc = .0 - for line in results: - ranked = cc_rank(line.complexity) - if min <= ranked <= max: - total_cc += line.complexity - counted += 1 - res.append(_format_line(line, ranked, show_complexity)) - elif total_average: - total_cc += line.complexity - counted += 1 - return res, total_cc, counted - - -def _format_line(block, ranked, show_complexity=False): - '''Format a single block as a line. - - *ranked* is the rank given by the `~radon.complexity.rank` function. If - *show_complexity* is True, then the complexity score is added alongside. - ''' - letter_colored = LETTERS_COLORS[block.letter] + block.letter - rank_colored = RANKS_COLORS[ranked] + ranked - compl = '' if not show_complexity else ' ({0})'.format(block.complexity) - return TEMPLATE.format(BRIGHT, letter_colored, block.lineno, - block.col_offset, block.fullname, rank_colored, - compl, reset=RESET) - - -def format_cc_issue(path, description, content, category, beginline, endline, - remediation_points, fingerprint): - '''Return properly formatted Code Climate issue json.''' - issue = { - 'type': 'issue', - 'check_name': 'Complexity', - 'description': description, - 'content': { - 'body': content, - }, - 'categories': [category], - 'fingerprint': fingerprint, - 'location': { - 'path': path, - 'lines': { - 'begin': beginline, - 'end': endline, - }, - }, - 'remediation_points': remediation_points, - } - return json.dumps(issue) - - -def get_remediation_points(complexity, grade_threshold): - '''Calculate quantity of remediation work needed to reduce complexity to grade - threshold permitted.''' - grade_to_max_permitted_cc = { - 'B': 5, - 'C': 10, - 'D': 20, - 'E': 30, - 'F': 40, - } - - threshold = grade_to_max_permitted_cc.get(grade_threshold, 5) - - if complexity and complexity > threshold: - return 1000000 + 100000 * (complexity - threshold) - else: - return 0 - - -def get_content(): - '''Return explanation string for Code Climate issue document.''' - content = ['##Cyclomatic Complexity', - 'Cyclomatic Complexity corresponds to the number of decisions ' - 'a block of code contains plus 1. This number (also called ' - 'McCabe number) is equal to the number of linearly independent ' - 'paths through the code. This number can be used as a guide ' - 'when testing conditional logic in blocks.\n', - 'Radon analyzes the AST tree of a Python program to compute ' - 'Cyclomatic Complexity. Statements have the following effects ' - 'on Cyclomatic Complexity:\n\n', - '| Construct | Effect on CC | Reasoning |', - '| --------- | ------------ | --------- |', - '| if | +1 | An *if* statement is a single decision. |', - '| elif| +1| The *elif* statement adds another decision. |', - '| else| +0| The *else* statement does not cause a new ' - 'decision. The decision is at the *if*. |', - '| for| +1| There is a decision at the start of the loop. |', - '| while| +1| There is a decision at the *while* statement. |', - '| except| +1| Each *except* branch adds a new conditional ' - 'path of execution. |', - '| finally| +0| The finally block is unconditionally ' - 'executed. |', - '| with| +1| The *with* statement roughly corresponds to a ' - 'try/except block (see PEP 343 for details). |', - '| assert| +1| The *assert* statement internally roughly ' - 'equals a conditional statement. |', - '| Comprehension| +1| A list/set/dict comprehension of ' - 'generator expression is equivalent to a for loop. |', - '| Boolean Operator| +1| Every boolean operator (and, or) ' - 'adds a decision point. |\n', - 'Source: http://radon.readthedocs.org/en/latest/intro.html'] - return '\n'.join(content) - - -def get_fingerprint(path, additional_parts): - '''Return fingerprint string for Code Climate issue document.''' - m = hashlib.md5() - parts = [path, 'Complexity'] + additional_parts - key = '|'.join(parts) - m.update(key.encode('utf-8')) - return m.hexdigest() diff --git a/radon/complexity.py b/radon/complexity.py deleted file mode 100644 index 1902c9e..0000000 --- a/radon/complexity.py +++ /dev/null @@ -1,157 +0,0 @@ -'''This module contains all high-level helpers function that allow to work with -Cyclomatic Complexity -''' - -import math -from flake8_polyfill import options -from radon.visitors import GET_COMPLEXITY, ComplexityVisitor, code2ast - - -# sorted_block ordering functions -SCORE = lambda block: -GET_COMPLEXITY(block) -LINES = lambda block: block.lineno -ALPHA = lambda block: block.name - - -def cc_rank(cc): - r'''Rank the complexity score from A to F, where A stands for the simplest - and best score and F the most complex and worst one: - - ============= ===================================================== - 1 - 5 A (low risk - simple block) - 6 - 10 B (low risk - well structured and stable block) - 11 - 20 C (moderate risk - slightly complex block) - 21 - 30 D (more than moderate risk - more complex block) - 31 - 40 E (high risk - complex block, alarming) - 41+ F (very high risk - error-prone, unstable block) - ============= ===================================================== - - Here *block* is used in place of function, method or class. - - The formula used to convert the score into an index is the following: - - .. math:: - - \text{rank} = \left \lceil \dfrac{\text{score}}{10} \right \rceil - - H(5 - \text{score}) - - where ``H(s)`` stands for the Heaviside Step Function. - The rank is then associated to a letter (0 = A, 5 = F). - ''' - if cc < 0: - raise ValueError('Complexity must be a non-negative value') - return chr(min(int(math.ceil(cc / 10.) or 1) - (1, 0)[5 - cc < 0], 5) + 65) - - -def average_complexity(blocks): - '''Compute the average Cyclomatic complexity from the given blocks. - Blocks must be either :class:`~radon.visitors.Function` or - :class:`~radon.visitors.Class`. If the block list is empty, then 0 is - returned. - ''' - size = len(blocks) - if size == 0: - return 0 - return sum((GET_COMPLEXITY(block) for block in blocks), .0) / len(blocks) - - -def sorted_results(blocks, order=SCORE): - '''Given a ComplexityVisitor instance, returns a list of sorted blocks - with respect to complexity. A block is a either - :class:`~radon.visitors.Function` object or a - :class:`~radon.visitors.Class` object. - The blocks are sorted in descending order from the block with the highest - complexity. - - The optional `order` parameter indicates how to sort the blocks. It can be: - - * `LINES`: sort by line numbering; - * `ALPHA`: sort by name (from A to Z); - * `SCORE`: sorty by score (descending). - - Default is `SCORE`. - ''' - return sorted(blocks, key=order) - - -def add_inner_blocks(blocks): - '''Process a list of blocks by adding all closures and inner classes as - top-level blocks. - ''' - new_blocks = [] - all_blocks = blocks[:] - while all_blocks: - block = all_blocks.pop() - new_blocks.append(block) - for inner_block in ('closures', 'inner_classes'): - for i_block in getattr(block, inner_block, ()): - named = i_block._replace(name=block.name + '.' + i_block.name) - all_blocks.append(named) - for meth in getattr(named, 'methods', ()): - m_named = meth._replace(classname=named.name) - all_blocks.append(m_named) - return new_blocks - - -def cc_visit(code, **kwargs): - '''Visit the given code with :class:`~radon.visitors.ComplexityVisitor`. - All the keyword arguments are directly passed to the visitor. - ''' - return cc_visit_ast(code2ast(code), **kwargs) - - -def cc_visit_ast(ast_node, **kwargs): - '''Visit the AST node with :class:`~radon.visitors.ComplexityVisitor`. All - the keyword arguments are directly passed to the visitor. - ''' - return ComplexityVisitor.from_ast(ast_node, **kwargs).blocks - - -class Flake8Checker(object): - '''Entry point for the Flake8 tool.''' - - name = 'radon' - version = __import__('radon').__version__ - _code = 'R701' - _error_tmpl = 'R701 %r is too complex (%d)' - no_assert = False - max_cc = -1 - - def __init__(self, tree, filename): - '''Accept the AST tree and a filename (unused).''' - self.tree = tree - - @classmethod - def add_options(cls, parser): # pragma: no cover - '''Add custom options to the global parser.''' - options.register( - parser, - '--radon-max-cc', default=-1, action='store', - type='int', help='Radon complexity threshold', - parse_from_config=True - ) - options.register( - parser, - '--radon-no-assert', dest='no_assert', action='store_true', - default=False, help='Radon will ignore assert statements', - parse_from_config=True, - ) - - @classmethod - def parse_options(cls, options): # pragma: no cover - '''Save actual options as class attributes.''' - cls.max_cc = options.radon_max_cc - cls.no_assert = options.no_assert - - def run(self): - '''Run the ComplexityVisitor over the AST tree.''' - if self.max_cc < 0: - if not self.no_assert: - return - self.max_cc = 10 - visitor = ComplexityVisitor.from_ast(self.tree, - no_assert=self.no_assert) - for block in visitor.blocks: - if block.complexity > self.max_cc: - text = self._error_tmpl % (block.name, block.complexity) - yield block.lineno, block.col_offset, text, type(self) diff --git a/radon/metrics.py b/radon/metrics.py deleted file mode 100644 index 9a86f6b..0000000 --- a/radon/metrics.py +++ /dev/null @@ -1,111 +0,0 @@ -'''Module holding functions related to miscellaneous metrics, such as Halstead -metrics or the Maintainability Index. -''' - -import ast -import math -import collections -from radon.visitors import HalsteadVisitor, ComplexityVisitor -from radon.raw import analyze - - -# Halstead metrics -Halstead = collections.namedtuple('Halstead', 'h1 h2 N1 N2 vocabulary length ' - 'calculated_length volume ' - 'difficulty effort time bugs') - - -def h_visit(code): - '''Compile the code into an AST tree and then pass it to - :func:`~radon.metrics.h_visit_ast`. - ''' - return h_visit_ast(ast.parse(code)) - - -def h_visit_ast(ast_node): - '''Visit the AST node using the :class:`~radon.visitors.HalsteadVisitor` - visitor. A namedtuple with the following fields is returned: - - * h1: the number of distinct operators - * h2: the number of distinct operands - * N1: the total number of operators - * N2: the total number of operands - * h: the vocabulary, i.e. h1 + h2 - * N: the length, i.e. N1 + N2 - * calculated_length: h1 * log2(h1) + h2 * log2(h2) - * volume: V = N * log2(h) - * difficulty: D = h1 / 2 * N2 / h2 - * effort: E = D * V - * time: T = E / 18 seconds - * bugs: B = V / 3000 - an estimate of the errors in the implementation - ''' - visitor = HalsteadVisitor.from_ast(ast_node) - h1, h2 = visitor.distinct_operators, visitor.distinct_operands - N1, N2 = visitor.operators, visitor.operands - h = h1 + h2 - N = N1 + N2 - if h1 and h2: - length = h1 * math.log(h1, 2) + h2 * math.log(h2, 2) - else: - length = 0 - volume = N * math.log(h, 2) if h != 0 else 0 - difficulty = (h1 * N2) / float(2 * h2) if h2 != 0 else 0 - effort = difficulty * volume - return Halstead( - h1, h2, N1, N2, h, N, length, volume, difficulty, effort, - effort / 18., volume / 3000. - ) - - -def mi_compute(halstead_volume, complexity, sloc, comments): - '''Compute the Maintainability Index (MI) given the Halstead Volume, the - Cyclomatic Complexity, the SLOC number and the number of comment lines. - Usually it is not used directly but instead :func:`~radon.metrics.mi_visit` - is preferred. - ''' - if any(metric <= 0 for metric in (halstead_volume, sloc)): - return 100. - sloc_scale = math.log(sloc) - volume_scale = math.log(halstead_volume) - comments_scale = math.sqrt(2.46 * math.radians(comments)) - # Non-normalized MI - nn_mi = (171 - 5.2 * volume_scale - .23 * complexity - 16.2 * sloc_scale + - 50 * math.sin(comments_scale)) - return min(max(0., nn_mi * 100 / 171.), 100.) - - -def mi_parameters(code, count_multi=True): - '''Given a source code snippet, compute the necessary parameters to - compute the Maintainability Index metric. These include: - - * the Halstead Volume - * the Cyclomatic Complexity - * the number of LLOC (Logical Lines of Code) - * the percent of lines of comment - - :param multi: If True, then count multiline strings as comment lines as - well. This is not always safe because Python multiline strings are not - always docstrings. - ''' - ast_node = ast.parse(code) - raw = analyze(code) - comments_lines = raw.comments + (raw.multi if count_multi else 0) - comments = comments_lines / float(raw.sloc) * 100 if raw.sloc != 0 else 0 - return (h_visit_ast(ast_node).volume, - ComplexityVisitor.from_ast(ast_node).total_complexity, raw.lloc, - comments) - - -def mi_visit(code, multi): - '''Visit the code and compute the Maintainability Index (MI) from it.''' - return mi_compute(*mi_parameters(code, multi)) - - -def mi_rank(score): - r'''Rank the score with a letter: - - * A if :math:`\text{score} > 19`; - * B if :math:`9 < \text{score} \le 19`; - * C if :math:`\text{score} \le 9`. - ''' - return chr(65 + (9 - score >= 0) + (19 - score >= 0)) diff --git a/radon/raw.py b/radon/raw.py deleted file mode 100644 index ab6658b..0000000 --- a/radon/raw.py +++ /dev/null @@ -1,228 +0,0 @@ -'''This module contains functions related to raw metrics. - -The main function is :func:`~radon.raw.analyze`, and should be the only one -that is used. -''' - -import tokenize -import operator -import collections -try: - import StringIO as io -except ImportError: # pragma: no cover - import io - - -__all__ = ['OP', 'COMMENT', 'TOKEN_NUMBER', 'NL', 'EM', 'Module', '_generate', - '_less_tokens', '_find', '_logical', 'analyze'] - -COMMENT = tokenize.COMMENT -OP = tokenize.OP -NL = tokenize.NL -EM = tokenize.ENDMARKER - -# Helper for map() -TOKEN_NUMBER = operator.itemgetter(0) - -# A module object. It contains the following data: -# loc = Lines of Code (total lines) -# lloc = Logical Lines of Code -# comments = Comments lines -# multi = Multi-line strings (assumed to be docstrings) -# blank = Blank lines (or whitespace-only lines) -# single_comments = Single-line comments or docstrings -Module = collections.namedtuple('Module', ['loc', 'lloc', 'sloc', - 'comments', 'multi', 'blank', - 'single_comments']) - - -def _generate(code): - '''Pass the code into `tokenize.generate_tokens` and convert the result - into a list. - ''' - # tokenize.generate_tokens is an undocumented function accepting text - return list(tokenize.generate_tokens(io.StringIO(code).readline)) - - -def _less_tokens(tokens, remove): - '''Process the output of `tokenize.generate_tokens` removing - the tokens specified in `remove`. - ''' - for values in tokens: - if values[0] in remove: - continue - yield values - - -def _find(tokens, token, value): - '''Return the position of the last token with the same (token, value) - pair supplied. The position is the one of the rightmost term. - ''' - for index, token_values in enumerate(reversed(tokens)): - if (token, value) == token_values[:2]: - return len(tokens) - index - 1 - raise ValueError('(token, value) pair not found') - - -def _split_tokens(tokens, token, value): - '''Split a list of tokens on the specified token pair (token, value), - where *token* is the token type (i.e. its code) and *value* its actual - value in the code. - ''' - res = [[]] - for token_values in tokens: - if (token, value) == token_values[:2]: - res.append([]) - continue - res[-1].append(token_values) - return res - - -def _get_all_tokens(line, lines): - '''Starting from *line*, generate the necessary tokens which represent the - shortest tokenization possible. This is done by catching - :exc:`tokenize.TokenError` when a multi-line string or statement is - encountered. - :returns: tokens, lines - ''' - buffer = line - used_lines = [line] - while True: - try: - tokens = _generate(buffer) - except tokenize.TokenError: - # A multi-line string or statement has been encountered: - # start adding lines and stop when tokenize stops complaining - pass - else: - if not any(t[0] == tokenize.ERRORTOKEN for t in tokens): - return tokens, used_lines - - # Add another line - next_line = next(lines) - buffer = buffer + '\n' + next_line - used_lines.append(next_line) - - -def _logical(tokens): - '''Find how many logical lines are there in the current line. - - Normally 1 line of code is equivalent to 1 logical line of code, - but there are cases when this is not true. For example:: - - if cond: return 0 - - this line actually corresponds to 2 logical lines, since it can be - translated into:: - - if cond: - return 0 - - Examples:: - - if cond: -> 1 - - if cond: return 0 -> 2 - - try: 1/0 -> 2 - - try: -> 1 - - if cond: # Only a comment -> 1 - - if cond: return 0 # Only a comment -> 2 - ''' - def aux(sub_tokens): - '''The actual function which does the job.''' - # Get the tokens and, in the meantime, remove comments - processed = list(_less_tokens(sub_tokens, [COMMENT])) - try: - # Verify whether a colon is present among the tokens and that - # it is the last token. - token_pos = _find(processed, OP, ':') - return 2 - (token_pos == len(processed) - 2) - except ValueError: - # The colon is not present - # If the line is only composed by comments, newlines and endmarker - # then it does not count as a logical line. - # Otherwise it count as 1. - if not list(_less_tokens(processed, [NL, EM])): - return 0 - return 1 - return sum(aux(sub) for sub in _split_tokens(tokens, OP, ';')) - - -def is_single_token(token_number, tokens): - '''Is this a single token matching token_number followed by ENDMARKER or NL - tokens. - ''' - return (TOKEN_NUMBER(tokens[0]) == token_number and - all(TOKEN_NUMBER(t) in (tokenize.ENDMARKER, tokenize.NL) - for t in tokens[1:])) - - -def analyze(source): - '''Analyze the source code and return a namedtuple with the following - fields: - - * **loc**: The number of lines of code (total) - * **lloc**: The number of logical lines of code - * **sloc**: The number of source lines of code (not necessarily - corresponding to the LLOC) - * **comments**: The number of Python comment lines - * **multi**: The number of lines which represent multi-line strings - * **single_comments**: The number of lines which are just comments with - no code - * **blank**: The number of blank lines (or whitespace-only ones) - - The equation :math:`sloc + blanks + multi + single_comments = loc` should - always hold. Multiline strings are not counted as comments, since, to the - Python interpreter, they are not comments but strings. - ''' - lloc = comments = single_comments = multi = blank = sloc = 0 - lines = (l.strip() for l in source.splitlines()) - lineno = 1 - for line in lines: - try: - # Get a syntactically complete set of tokens that spans a set of - # lines - tokens, parsed_lines = _get_all_tokens(line, lines) - except StopIteration: - raise SyntaxError('SyntaxError at line: {0}'.format(lineno)) - - lineno += len(parsed_lines) - - comments += sum(1 for t in tokens - if TOKEN_NUMBER(t) == tokenize.COMMENT) - - # Identify single line comments, conservatively - if is_single_token(tokenize.COMMENT, tokens): - single_comments += 1 - - # Identify docstrings, conservatively - elif is_single_token(tokenize.STRING, tokens): - _, _, (start_row, _), (end_row, _), _ = tokens[0] - if end_row == start_row: - # Consider single-line docstrings separately from other - # multiline docstrings - single_comments += 1 - else: - multi += sum(1 for l in parsed_lines if l) # Skip empty lines - blank += sum(1 for l in parsed_lines if not l) - - else: # Everything else is either code or blank lines - - for parsed_line in parsed_lines: - if parsed_line: - sloc += 1 - else: - blank += 1 - - # Process a logical line - # Split it on semicolons because they increase the number of - # logical lines - for sub_tokens in _split_tokens(tokens, OP, ';'): - lloc += _logical(sub_tokens) - - loc = sloc + blank + multi + single_comments - return Module(loc, lloc, sloc, comments, multi, blank, single_comments) diff --git a/radon/tests/__init__.py b/radon/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/radon/tests/data/__init__.py b/radon/tests/data/__init__.py deleted file mode 100644 index c9a1173..0000000 --- a/radon/tests/data/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# -*- coding: utf-8 -*- - - -def fun(arg): - a = 'èèèè' diff --git a/radon/tests/data/no_encoding.py b/radon/tests/data/no_encoding.py deleted file mode 100644 index 0b910b8..0000000 --- a/radon/tests/data/no_encoding.py +++ /dev/null @@ -1,2 +0,0 @@ -class Foo(object): - pass diff --git a/radon/tests/data/py3unicode.py b/radon/tests/data/py3unicode.py deleted file mode 100644 index e20eb33..0000000 --- a/radon/tests/data/py3unicode.py +++ /dev/null @@ -1,5 +0,0 @@ -# -*- coding: utf-8 -*- - - -def èèèè(òòòò): - pass diff --git a/radon/tests/run.py b/radon/tests/run.py deleted file mode 100644 index 3cb5ec5..0000000 --- a/radon/tests/run.py +++ /dev/null @@ -1,3 +0,0 @@ -if __name__ == '__main__': - import pytest - pytest.main(['--strict']) diff --git a/radon/tests/test_cli.py b/radon/tests/test_cli.py deleted file mode 100644 index a589bcf..0000000 --- a/radon/tests/test_cli.py +++ /dev/null @@ -1,215 +0,0 @@ -import os -import sys - -import pytest - -import radon.cli as cli -import radon.complexity as cc_mod -from radon.cli.harvest import Harvester, MIHarvester, RawHarvester, CCHarvester - -from radon.tests.test_cli_harvest import ( - BASE_CONFIG, CC_CONFIG, RAW_CONFIG, MI_CONFIG, -) - -DIRNAME = os.path.dirname(__file__) - - -def func(a, b=2, c=[], d=None): - pass - - -def func2(*args, **kwargs): - pass - - -def func3(b=3, *args): - pass - - -def fake_to_terminal(): - yield ('a', ('mystr',), {'error': True}) - yield ('b', (), {}) - yield (('p1', 'p2'), (), {'indent': 1}) - - -def test_config_base_behavior(): - c = cli.Config(a=2, b=3) - assert c.config_values == {'a': 2, 'b': 3} - assert c.a == 2 - assert c.b == 3 - - -def test_config_exceptions(): - c = cli.Config(a=2) - assert c.__dict__, {'config_values': {'a': 2}} - with pytest.raises(AttributeError): - c.notexistent - - -def test_config_str(): - assert str(cli.Config()) == '{}' - assert str(cli.Config(a=2)) == '{\'a\': 2}' - - -def test_config_eq(): - assert cli.Config() == cli.Config() - assert cli.Config(a=2) == cli.Config(a=2) - assert cli.Config(a=2) != cli.Config(b=2) - - -def test_config_for(): - assert cli.Config.from_function(func) == cli.Config(b=2, c=[], d=None) - assert cli.Config.from_function(func2) == cli.Config() - assert cli.Config.from_function(func3) == cli.Config(b=3) - - -@pytest.fixture -def log_mock(mocker): - return mocker.patch('radon.cli.log_result') - - -def test_cc(mocker, log_mock): - harv_mock = mocker.patch('radon.cli.CCHarvester') - harv_mock.return_value = mocker.sentinel.harvester - - cli.cc(['-'], json=True) - - harv_mock.assert_called_once_with(['-'], cli.Config( - min='A', max='F', exclude=None, ignore=None, show_complexity=False, - average=False, order=getattr(cc_mod, 'SCORE'), no_assert=False, - total_average=False, show_closures=False)) - log_mock.assert_called_once_with(mocker.sentinel.harvester, - codeclimate=False, json=True, xml=False) - - -def test_raw(mocker, log_mock): - harv_mock = mocker.patch('radon.cli.RawHarvester') - harv_mock.return_value = mocker.sentinel.harvester - - cli.raw(['-'], summary=True, json=True) - - harv_mock.assert_called_once_with(['-'], cli.Config(exclude=None, - ignore=None, - summary=True)) - log_mock.assert_called_once_with(mocker.sentinel.harvester, json=True) - - -def test_mi(mocker, log_mock): - harv_mock = mocker.patch('radon.cli.MIHarvester') - harv_mock.return_value = mocker.sentinel.harvester - - cli.mi(['-'], show=True, multi=False) - - harv_mock.assert_called_once_with(['-'], cli.Config( - min='A', max='C', exclude=None, ignore=None, show=True, - multi=False, sort=False)) - log_mock.assert_called_once_with(mocker.sentinel.harvester, json=False) - - -def test_encoding(mocker, log_mock): - mi_cfg = cli.Config( - **BASE_CONFIG.config_values - ) - mi_cfg.config_values.update(MI_CONFIG.config_values) - raw_cfg = cli.Config( - **BASE_CONFIG.config_values - ) - raw_cfg.config_values.update(RAW_CONFIG.config_values) - mappings = { - MIHarvester: mi_cfg, - RawHarvester: raw_cfg, - CCHarvester: CC_CONFIG, - } - if sys.version_info[0] < 3: - target = 'data/__init__.py' - else: - target = 'data/py3unicode.py' - fnames = [ - os.path.join(DIRNAME, target), - # This one will fail if detect_encoding() removes the first lines - # See #133 - os.path.join(DIRNAME, 'data/no_encoding.py'), - ] - for h_class, cfg in mappings.items(): - for f in fnames: - harvester = h_class([f], cfg) - assert not any(['error' in kw - for msg, args, kw in harvester.to_terminal()]) - - -@pytest.fixture -def stdout_mock(mocker): - return mocker.patch('radon.cli.sys.stdout.write') - - -def test_log(mocker, stdout_mock): - cli.log('msg') - cli.log('msg', indent=1) - cli.log('{0} + 1', 2) - cli.log('{0} + 1', 2, noformat=True) - - stdout_mock.assert_has_calls([ - mocker.call('msg\n'), - mocker.call(' msg\n'), - mocker.call('2 + 1\n'), - mocker.call('{0} + 1\n'), - ]) - assert stdout_mock.call_count == 4 - - -def test_log_list(stdout_mock): - cli.log_list([]) - cli.log_list(['msg']) - - stdout_mock.assert_called_once_with('msg\n') - - -def test_log_error(mocker, stdout_mock): - reset_mock = mocker.patch('radon.cli.RESET') - red_mock = mocker.patch('radon.cli.RED') - bright_mock = mocker.patch('radon.cli.BRIGHT') - - bright_mock.__str__.return_value = '@' - red_mock.__str__.return_value = '<|||>' - reset_mock.__str__.return_value = '__R__' - - cli.log_error('mystr') - - stdout_mock.assert_called_once_with('@<|||>ERROR__R__: mystr\n') - - -def test_log_result(mocker, stdout_mock): - le_mock = mocker.patch('radon.cli.log_error') - ll_mock = mocker.patch('radon.cli.log_list') - log_mock = mocker.patch('radon.cli.log') - - h = mocker.Mock(spec=Harvester) - h.as_json.return_value = mocker.sentinel.json - h.as_xml.return_value = mocker.sentinel.xml - h.to_terminal.side_effect = fake_to_terminal - - cli.log_result(h, json=True) - h.as_json.assert_called_once_with() - - h.as_json.reset_mock() - cli.log_result(h, json=True, xml=True) - h.as_json.assert_called_once_with() - assert h.as_xml.call_count == 0 - - cli.log_result(h, xml=True) - h.as_xml.assert_called_once_with() - - cli.log_result(h) - h.to_terminal.assert_called_once_with() - - log_mock.assert_has_calls([ - mocker.call(mocker.sentinel.json, noformat=True), - mocker.call(mocker.sentinel.json, noformat=True), - mocker.call(mocker.sentinel.xml, noformat=True), - mocker.call('a'), - ]) - le_mock.assert_called_once_with('mystr', indent=1) - ll_mock.assert_has_calls([ - mocker.call(['b']), - mocker.call(('p1', 'p2'), indent=1), - ]) diff --git a/radon/tests/test_cli_harvest.py b/radon/tests/test_cli_harvest.py deleted file mode 100644 index e80471a..0000000 --- a/radon/tests/test_cli_harvest.py +++ /dev/null @@ -1,341 +0,0 @@ -import collections - -import pytest - -from radon.cli import Config -import radon.complexity as cc_mod -import radon.cli.harvest as harvest - - -BASE_CONFIG = Config( - exclude='test_[^.]+\.py', - ignore='tests,docs', -) - -CC_CONFIG = Config( - order=getattr(cc_mod, 'SCORE'), - no_assert=False, - min='A', - max='F', - show_complexity=False, - show_closures=False, - average=True, - total_average=False, - **BASE_CONFIG.config_values -) - -RAW_CONFIG = Config( - summary=True, -) - -MI_CONFIG = Config( - multi=True, - min='B', - max='C', - show=True, - sort=False, -) - - -def fake_gobble(fobj): - return 42 - - -def fake_gobble_raising(fobj): - raise TypeError('mystr') - - -def fake_run(): - for i in range(3): - yield {'file-{0}'.format(i): i**2} - - -@pytest.fixture -def base_config(): - return Config(**BASE_CONFIG.config_values.copy()) - - -@pytest.fixture -def cc_config(): - return Config(**CC_CONFIG.config_values.copy()) - - -@pytest.fixture -def raw_config(): - return Config(**RAW_CONFIG.config_values.copy()) - - -@pytest.fixture -def mi_config(): - return Config(**MI_CONFIG.config_values.copy()) - - -def test_base_iter_filenames(base_config, mocker): - iter_mock = mocker.patch('radon.cli.harvest.iter_filenames') - h = harvest.Harvester([], base_config) - h._iter_filenames() - - iter_mock.assert_called_with([], base_config.exclude, - base_config.ignore) - - -def test_base_gobble_not_implemented(base_config): - h = harvest.Harvester([], base_config) - with pytest.raises(NotImplementedError): - h.gobble(None) - - -def test_base_as_xml_not_implemented(base_config): - h = harvest.Harvester([], base_config) - with pytest.raises(NotImplementedError): - h.as_xml() - - -def test_base_to_terminal_not_implemented(base_config): - h = harvest.Harvester([], base_config) - with pytest.raises(NotImplementedError): - h.to_terminal() - - -def test_base_run(base_config): - h = harvest.Harvester(['-'], base_config) - h.gobble = fake_gobble - assert isinstance(h.run(), collections.Iterator) - assert list(h.run()) == [('-', 42)] - h.gobble = fake_gobble_raising - assert list(h.run()) == [('-', {'error': 'mystr'})] - - -def test_base_results(base_config): - h = harvest.Harvester([], base_config) - h.run = fake_run - results = h.results - assert isinstance(results, collections.Iterator) - assert list(results) == [{'file-0': 0}, {'file-1': 1}, {'file-2': 4}] - assert not isinstance(h.results, collections.Iterator) - assert isinstance(h.results, collections.Iterable) - assert isinstance(h.results, list) - - -def test_base_as_json(base_config): - h = harvest.Harvester([], base_config) - h._results = {'filename': {'complexity': 2}} - assert h.as_json() == '{"filename": {"complexity": 2}}' - - -def test_cc_gobble(cc_config, mocker): - sr_mock = mocker.patch('radon.cli.harvest.sorted_results') - cc_mock = mocker.patch('radon.cli.harvest.cc_visit') - cc_mock.return_value = [] - fobj = mocker.MagicMock() - fobj.read.return_value = mocker.sentinel.one - - h = harvest.CCHarvester([], cc_config) - h.config.show_closures = True - h.gobble(fobj) - - assert fobj.read.called - cc_mock.assert_called_with(mocker.sentinel.one, - no_assert=cc_config.no_assert) - sr_mock.assert_called_with([], order=cc_config.order) - - -def test_cc_to_dicts(cc_config, mocker): - c2d_mock = mocker.patch('radon.cli.harvest.cc_to_dict') - c2d_mock.side_effect = lambda i: i - h = harvest.CCHarvester([], cc_config) - sample_results = [('a', [{'rank': 'A'}]), ('b', [{'rank': 'B'}]), - ('c', {'error': 'An ERROR!'})] - h._results = sample_results - - assert h._to_dicts() == dict(sample_results) - assert c2d_mock.call_count == 2 - - h.config.min = 'B' - h._results = sample_results[1:] - assert h._to_dicts() == dict(sample_results[1:]) - - -def test_cc_as_json_xml(cc_config, mocker): - d2x_mock = mocker.patch('radon.cli.harvest.dict_to_xml') - to_dicts_mock = mocker.MagicMock() - to_dicts_mock.return_value = {'a': {'rank': 'A'}} - - h = harvest.CCHarvester([], cc_config) - h._to_dicts = to_dicts_mock - assert h.as_json() == '{"a": {"rank": "A"}}' - - h.as_xml() - assert d2x_mock.called - d2x_mock.assert_called_with(to_dicts_mock.return_value) - assert to_dicts_mock.call_count == 2 - - -def test_cc_to_terminal(cc_config, mocker): - reset_mock = mocker.patch('radon.cli.harvest.RESET') - ranks_mock = mocker.patch('radon.cli.harvest.RANKS_COLORS') - c2t_mock = mocker.patch('radon.cli.harvest.cc_to_terminal') - h = harvest.CCHarvester([], cc_config) - h._results = [ - ('a', {'error': 'mystr'}), ('b', {}) - ] - c2t_mock.return_value = (['res'], 9, 3) - ranks_mock.__getitem__.return_value = '<|A|>' - reset_mock.__eq__.side_effect = lambda o: o == '__R__' - - results = list(h.to_terminal()) - c2t_mock.assert_called_once_with({}, cc_config.show_complexity, - cc_config.min, cc_config.max, - cc_config.total_average) - assert results == [ - ('a', ('mystr',), {'error': True}), - ('b', (), {}), - (['res'], (), {'indent': 1}), - ('\n{0} blocks (classes, functions, methods) analyzed.', (3,), {}), - ('Average complexity: {0}{1} ({2}){3}', - ('<|A|>', 'A', 3, '__R__'), {}), - ] - - -def test_raw_gobble(raw_config, mocker): - r2d_mock = mocker.patch('radon.cli.harvest.raw_to_dict') - analyze_mock = mocker.patch('radon.cli.harvest.analyze') - fobj = mocker.MagicMock() - fobj.read.return_value = mocker.sentinel.one - analyze_mock.return_value = mocker.sentinel.two - - h = harvest.RawHarvester([], raw_config) - h.gobble(fobj) - - assert fobj.read.call_count == 1 - analyze_mock.assert_called_once_with(mocker.sentinel.one) - r2d_mock.assert_called_once_with(mocker.sentinel.two) - - -def test_raw_as_xml(raw_config): - h = harvest.RawHarvester([], raw_config) - with pytest.raises(NotImplementedError): - h.as_xml() - - -def test_raw_to_terminal(raw_config): - h = harvest.RawHarvester([], raw_config) - h._results = [ - ('a', {'error': 'mystr'}), - ('b', {'loc': 24, 'lloc': 27, 'sloc': 15, 'comments': 3, - 'multi': 3, 'single_comments': 3, 'blank': 9}), - ('c', {'loc': 24, 'lloc': 27, 'sloc': 15, 'comments': 3, - 'multi': 3, 'single_comments': 13, 'blank': 9}), - ('e', {'loc': 0, 'lloc': 0, 'sloc': 0, 'comments': 0, - 'single_comments': 12, 'multi': 0, 'blank': 0}), - ] - - assert list(h.to_terminal()) == [ - ('a', ('mystr',), {'error': True}), - ('b', (), {}), - ('{0}: {1}', ('LOC', 24), {'indent': 1}), - ('{0}: {1}', ('LLOC', 27), {'indent': 1}), - ('{0}: {1}', ('SLOC', 15), {'indent': 1}), - ('{0}: {1}', ('Comments', 3), {'indent': 1}), - ('{0}: {1}', ('Single comments', 3), {'indent': 1}), - ('{0}: {1}', ('Multi', 3), {'indent': 1}), - ('{0}: {1}', ('Blank', 9), {'indent': 1}), - ('- Comment Stats', (), {'indent': 1}), - ('(C % L): {0:.0%}', (0.125,), {'indent': 2}), - ('(C % S): {0:.0%}', (0.2,), {'indent': 2}), - ('(C + M % L): {0:.0%}', (0.25,), {'indent': 2}), - ('c', (), {}), - ('{0}: {1}', ('LOC', 24), {'indent': 1}), - ('{0}: {1}', ('LLOC', 27), {'indent': 1}), - ('{0}: {1}', ('SLOC', 15), {'indent': 1}), - ('{0}: {1}', ('Comments', 3), {'indent': 1}), - ('{0}: {1}', ('Single comments', 13), {'indent': 1}), - ('{0}: {1}', ('Multi', 3), {'indent': 1}), - ('{0}: {1}', ('Blank', 9), {'indent': 1}), - ('- Comment Stats', (), {'indent': 1}), - ('(C % L): {0:.0%}', (0.125,), {'indent': 2}), - ('(C % S): {0:.0%}', (0.2,), {'indent': 2}), - ('(C + M % L): {0:.0%}', (0.25,), {'indent': 2}), - ('e', (), {}), - ('{0}: {1}', ('LOC', 0), {'indent': 1}), - ('{0}: {1}', ('LLOC', 0), {'indent': 1}), - ('{0}: {1}', ('SLOC', 0), {'indent': 1}), - ('{0}: {1}', ('Comments', 0), {'indent': 1}), - ('{0}: {1}', ('Single comments', 12), {'indent': 1}), - ('{0}: {1}', ('Multi', 0), {'indent': 1}), - ('{0}: {1}', ('Blank', 0), {'indent': 1}), - ('- Comment Stats', (), {'indent': 1}), - ('(C % L): {0:.0%}', (0.0,), {'indent': 2}), - ('(C % S): {0:.0%}', (0.0,), {'indent': 2}), - ('(C + M % L): {0:.0%}', (0.0,), {'indent': 2}), - ('** Total **', (), {}), - ('{0}: {1}', ('LOC', 48), {'indent': 1}), - ('{0}: {1}', ('LLOC', 54), {'indent': 1}), - ('{0}: {1}', ('SLOC', 30), {'indent': 1}), - ('{0}: {1}', ('Comments', 6), {'indent': 1}), - ('{0}: {1}', ('Single comments', 28), {'indent': 1}), - ('{0}: {1}', ('Multi', 6), {'indent': 1}), - ('{0}: {1}', ('Blank', 18), {'indent': 1}), - ('- Comment Stats', (), {'indent': 1}), - ('(C % L): {0:.0%}', (0.125,), {'indent': 2}), - ('(C % S): {0:.0%}', (0.2,), {'indent': 2}), - ('(C + M % L): {0:.0%}', (0.25,), {'indent': 2}), - ] - - -def test_mi_gobble(mi_config, mocker): - mv_mock = mocker.patch('radon.cli.harvest.mi_visit') - fobj = mocker.MagicMock() - fobj.read.return_value = mocker.sentinel.one - mv_mock.return_value = 23.5 - - h = harvest.MIHarvester([], mi_config) - result = h.gobble(fobj) - - assert fobj.read.call_count == 1 - mv_mock.assert_called_once_with(mocker.sentinel.one, mi_config.multi) - assert result == {'mi': 23.5, 'rank': 'A'} - - -def test_mi_as_json(mi_config, mocker): - d_mock = mocker.patch('radon.cli.harvest.json.dumps') - h = harvest.MIHarvester([], mi_config) - h.config.min = 'C' - h._results = [ - ('a', {'error': 'mystr'}), - ('b', {'mi': 25, 'rank': 'A'}), - ('c', {'mi': 15, 'rank': 'B'}), - ('d', {'mi': 0, 'rank': 'C'}), - ] - - h.as_json() - d_mock.assert_called_with(dict([h._results[0], h._results[-1]])) - - -def test_mi_as_xml(mi_config): - h = harvest.MIHarvester([], mi_config) - with pytest.raises(NotImplementedError): - h.as_xml() - - -def test_mi_to_terminal(mi_config, mocker): - reset_mock = mocker.patch('radon.cli.harvest.RESET') - ranks_mock = mocker.patch('radon.cli.harvest.MI_RANKS') - ranks_mock.__getitem__.side_effect = lambda j: '<|{0}|>'.format(j) - reset_mock.__eq__.side_effect = lambda o: o == '__R__' - - h = harvest.MIHarvester([], mi_config) - h._results = [ - ('a', {'error': 'mystr'}), - ('b', {'mi': 25, 'rank': 'A'}), - ('c', {'mi': 15, 'rank': 'B'}), - ('d', {'mi': 0, 'rank': 'C'}), - ] - - assert list(h.to_terminal()) == [ - ('a', ('mystr',), {'error': True}), - ('{0} - {1}{2}{3}{4}', ('c', '<|B|>', 'B', ' (15.00)', '__R__'), - {}), - ('{0} - {1}{2}{3}{4}', ('d', '<|C|>', 'C', ' (0.00)', '__R__'), - {}), - ] diff --git a/radon/tests/test_cli_tools.py b/radon/tests/test_cli_tools.py deleted file mode 100644 index 865a3af..0000000 --- a/radon/tests/test_cli_tools.py +++ /dev/null @@ -1,346 +0,0 @@ -import os -import sys -import json -import locale -import platform - -import pytest - -import radon.cli.tools as tools -from radon.visitors import Function, Class -from radon.raw import Module - - -def fake_isfile(filename): - if filename == 'file.py': - return True - return False - - -def fake_walk(start): - dirs = ['tests', 'sub', '.hid'] - contents = {'tests': ['test_amod.py', 'run.py', '.hid.py'], - 'sub': ['amod.py', 'bmod.py']} - yield '.', dirs, ['tox.ini', 'amod.py', 'test_all.py', 'fake.yp', 'noext'] - for d in dirs: - yield './{0}'.format(d), [], contents[d] - - -def assert_pequal(a, b): - a, b = [list(map(os.path.normpath, p)) for p in (a, b)] - assert a == b - - -def test_open(mocker): - with tools._open('-') as fobj: - assert fobj is sys.stdin - - try: - with tools._open(__file__) as fobj: - assert True - except TypeError: # issue 101 - assert False, 'tools._open raised TypeError' - - m = mocker.mock_open() - - if platform.python_implementation() == 'PyPy': - mocker.patch('radon.cli.tools.open', m, create=True) - tools._open('randomfile.py').__enter__() - m.assert_called_with('randomfile.py') - else: - mocker.patch('radon.cli.tools._open_function', m, create=True) - tools._open('randomfile.py').__enter__() - except_encoding = os.getenv('RADONFILESENCODING', - locale.getpreferredencoding(False)) - m.assert_called_with('randomfile.py', encoding=except_encoding) - - -@pytest.fixture -def iter_files(): - return lambda *a, **kw: list(tools.iter_filenames(*a, **kw)) - - -def test_iter_files_stdin(iter_files): - assert iter_files(['-']) == ['-'] - - -def test_iter_files(mocker, iter_files): - os_mod = mocker.patch('radon.cli.tools.os') - os_path_mod = mocker.patch('radon.cli.tools.os.path') - os_path_mod.normpath = os.path.normpath - os_path_mod.basename = os.path.basename - os_path_mod.join = os.path.join - os_path_mod.isfile.side_effect = fake_isfile - os_mod.walk = fake_walk - - assert_pequal(iter_files(['file.py', 'random/path']), - ['file.py', 'amod.py', 'test_all.py', - 'tests/test_amod.py', 'tests/run.py', 'sub/amod.py', - 'sub/bmod.py']) - - assert_pequal(iter_files(['file.py', 'random/path'], 'test_*'), - ['file.py', 'amod.py', 'tests/test_amod.py', - 'tests/run.py', 'sub/amod.py', 'sub/bmod.py']) - - assert_pequal(iter_files(['file.py', 'random/path'], '*test_*'), - ['file.py', 'amod.py', 'tests/run.py', 'sub/amod.py', - 'sub/bmod.py']) - - assert_pequal(iter_files(['file.py', 'random/path'], '*/test_*,amod*'), - ['file.py', 'test_all.py', 'tests/run.py', - 'sub/amod.py', 'sub/bmod.py']) - - assert_pequal(iter_files(['file.py', 'random/path'], None, 'tests'), - ['file.py', 'amod.py', 'test_all.py', 'sub/amod.py', - 'sub/bmod.py']) - - assert_pequal(iter_files(['file.py', 'random/path'], None, 'tests,sub'), - ['file.py', 'amod.py', 'test_all.py']) - - -CC_RESULTS_CASES = [ - ( - Function('name', 12, 0, 16, False, None, [], 6), - { - 'type': 'function', 'name': 'name', 'lineno': 12, 'col_offset': 0, - 'endline': 16, 'closures': [], 'complexity': 6, 'rank': 'B', - }), - ( - Class('Classname', 17, 0, 29, [ - Function('name', 19, 4, 26, True, 'Classname', [], 7), - ], [], 7), - { - 'type': 'class', 'name': 'Classname', 'lineno': 17, 'col_offset': 0, - 'endline': 29, 'complexity': 7, 'rank': 'B', 'methods': [ - { - 'type': 'method', 'lineno': 19, 'col_offset': 4, 'endline': 26, - 'closures': [], 'complexity': 7, 'rank': 'B', 'classname': - 'Classname', 'name': 'name', - } - ], - }), - ( - Function('name', 12, 0, 16, False, None, [ - Function('aux', 13, 4, 17, False, None, [], 4), - ], 10), - { - 'type': 'function', 'name': 'name', 'lineno': 12, 'col_offset': 0, - 'endline': 16, 'complexity': 10, 'rank': 'B', 'closures': [ - { - 'name': 'aux', 'lineno': 13, 'col_offset': 4, 'endline': 17, - 'closures': [], 'complexity': 4, 'rank': 'A', 'type': - 'function', - } - ] - }), -] - - -@pytest.mark.parametrize('blocks,dict_result', CC_RESULTS_CASES) -def test_cc_to_dict(blocks, dict_result): - assert tools.cc_to_dict(blocks) == dict_result - - -CC_TO_XML_CASE = [ - {'closures': [], 'endline': 16, 'complexity': 6, 'lineno': 12, 'is_method': - False, 'name': 'name', 'col_offset': 0, 'rank': 'B'}, - - {'complexity': 8, 'endline': 29, 'rank': 'B', 'lineno': 17, 'name': - 'Classname', 'col_offset': 0}, - - {'classname': 'Classname', 'closures': [], 'endline': 26, 'complexity': 7, - 'lineno': 19, 'is_method': True, 'name': 'name', 'col_offset': 4, - 'rank': 'B'}, - - {'closures': [], 'endline': 17, 'complexity': 4, 'lineno': 13, 'is_method': - False, 'name': 'aux', 'col_offset': 4, 'rank': 'A'}, - - {'endline': 16, 'complexity': 10, 'lineno': 12, 'is_method': False, 'name': - 'name', 'col_offset': 0, 'rank': 'B'}, -] - - -CC_TO_CODECLIMATE_CASE = [ - {'closures': [], 'endline': 16, 'complexity': 6, 'lineno': 12, 'type': - 'function', 'name': 'foo', 'col_offset': 0, 'rank': 'B'}, - - {'complexity': 8, 'endline': 29, 'rank': 'B', 'lineno': 17, 'type': 'class', - 'name': 'Classname', 'col_offset': 0}, - - {'closures': [], 'endline': 17, 'complexity': 4, 'lineno': 13, 'type': - 'method', 'name': 'bar', 'col_offset': 4, 'rank': 'A'}, -] - - -def test_raw_to_dict(): - assert tools.raw_to_dict(Module(103, 123, 98, 8, 19, 5, 3)) == \ - {'loc': 103, 'lloc': 123, 'sloc': 98, 'comments': 8, - 'multi': 19, 'blank': 5, 'single_comments': 3} - - -def test_cc_to_xml(): - assert tools.dict_to_xml({'filename': CC_TO_XML_CASE}) == \ - ''' - - 6 - name - B - filename - 12 - 16 - - - 8 - Classname - B - filename - 17 - 29 - - - 7 - Classname.name - B - filename - 19 - 26 - - - 4 - aux - A - filename - 13 - 17 - - - 10 - name - B - filename - 12 - 16 - - '''.replace('\n', '').replace(' ', '') - - -def test_cc_error_to_codeclimate(): - error_result = { - 'error': 'Error: invalid syntax (, line 100)' - } - - expected_results = \ - [ - json.dumps({ - 'description':'Error: Error: invalid syntax (, line 100)', - 'check_name':'Complexity', - 'content': { 'body': 'We encountered an error attempting to analyze this line.' }, - 'location': { 'path': 'filename', 'lines': {'begin': 100, 'end': 100}}, - 'type':'issue', - 'categories': ['Bug Risk'], - 'remediation_points': 1000000, - 'fingerprint': '10ac332cd7f638664e8865b098a1707c' - }), - ] - - actual_results = tools.dict_to_codeclimate_issues({'filename': error_result}) - - actual_sorted = [] - for i in actual_results: - actual_sorted.append(json.loads(i)) - - expected_sorted = [] - for i in expected_results: - expected_sorted.append(json.loads(i)) - - assert actual_sorted == expected_sorted - - -def test_cc_to_codeclimate(): - actual_results = tools.dict_to_codeclimate_issues({'filename': CC_TO_CODECLIMATE_CASE}) - expected_results = \ - [ - json.dumps({ - 'description':'Cyclomatic complexity is too high in function foo. (6)', - 'check_name':'Complexity', - 'content': { 'body': tools.get_content()}, - 'location': { 'path': 'filename', 'lines': {'begin': 12, 'end': 16}}, - 'type':'issue', - 'categories': ['Complexity'], - 'remediation_points': 1100000, - 'fingerprint': 'afbe2b8d9a57fde5f3235ec97e7a22e1' - }), - json.dumps({ - 'description':'Cyclomatic complexity is too high in class Classname. (8)', - 'check_name':'Complexity', - 'content': {'body': tools.get_content()}, - 'location': {'path': 'filename', 'lines': {'begin': 17, 'end': 29}}, - 'type':'issue', - 'categories': ['Complexity'], - 'remediation_points': 1300000, - 'fingerprint': '8caecbb525375d825b95c23bc8f881d7' - }), - ] - - actual_sorted = [] - for i in actual_results: - actual_sorted.append(json.loads(i)) - - expected_sorted = [] - for i in expected_results: - expected_sorted.append(json.loads(i)) - - assert actual_sorted == expected_sorted - - -CC_TO_TERMINAL_CASES = [ - Class(name='Classname', lineno=17, col_offset=0, endline=29, - methods=[Function(name='meth', lineno=19, col_offset=4, endline=26, - is_method=True, classname='Classname', closures=[], - complexity=4)], - inner_classes=[], real_complexity=4), - Function(name='meth', lineno=19, col_offset=4, endline=26, is_method=True, - classname='Classname', closures=[], complexity=7), - Function(name='f1', lineno=12, col_offset=0, endline=16, is_method=False, - classname=None, closures=[], complexity=14), - Function(name='f2', lineno=12, col_offset=0, endline=16, is_method=False, - classname=None, closures=[], complexity=22), - Function(name='f3', lineno=12, col_offset=0, endline=16, is_method=False, - classname=None, closures=[], complexity=32), - Function(name='f4', lineno=12, col_offset=0, endline=16, is_method=False, - classname=None, closures=[], complexity=41), -] - - -def test_cc_to_terminal(): - # do the patching - tools.LETTERS_COLORS = dict((l, ''.format(l)) for l in 'FMC') - tools.RANKS_COLORS = dict((r, '<|{0}|>'.format(r)) for r in 'ABCDEF') - tools.BRIGHT = '@' - tools.RESET = '__R__' - - results = CC_TO_TERMINAL_CASES - res = [ - '@C __R__17:0 Classname - <|A|>A (4)__R__', - '@M __R__19:4 Classname.meth - <|B|>B (7)__R__', - '@F __R__12:0 f1 - <|C|>C (14)__R__', - '@F __R__12:0 f2 - <|D|>D (22)__R__', - '@F __R__12:0 f3 - <|E|>E (32)__R__', - '@F __R__12:0 f4 - <|F|>F (41)__R__', - ] - res_noshow = ['{0}__R__'.format(r[:r.index('(') - 1]) for r in res] - - assert tools.cc_to_terminal(results, False, 'A', 'F', False) == \ - (res_noshow, 120, 6) - assert tools.cc_to_terminal(results, True, 'A', 'F', False) == \ - (res, 120, 6) - assert tools.cc_to_terminal(results, True, 'A', 'D', False) == \ - (res[:-2], 47, 4) - assert tools.cc_to_terminal(results, False, 'A', 'D', False) == \ - (res_noshow[:-2], 47, 4) - assert tools.cc_to_terminal(results, True, 'C', 'F', False) == \ - (res[2:], 109, 4) - assert tools.cc_to_terminal(results, True, 'B', 'E', False) == \ - (res[1:-1], 75, 4) - assert tools.cc_to_terminal(results, True, 'B', 'F', True) == \ - (res[1:], 120, 6) diff --git a/radon/tests/test_complexity_utils.py b/radon/tests/test_complexity_utils.py deleted file mode 100644 index 9e28034..0000000 --- a/radon/tests/test_complexity_utils.py +++ /dev/null @@ -1,109 +0,0 @@ -import ast -import operator - -import pytest - -from radon.complexity import * -from radon.visitors import Class, Function -from .test_complexity_visitor import GENERAL_CASES, dedent - - -get_index = lambda seq: lambda index: seq[index] - - -def _compute_cc_rank(score): - # This is really ugly - # Luckily the rank function in radon.complexity is not like this! - if score < 0: - rank = ValueError - elif 0 <= score <= 5: - rank = 'A' - elif 6 <= score <= 10: - rank = 'B' - elif 11 <= score <= 20: - rank = 'C' - elif 21 <= score <= 30: - rank = 'D' - elif 31 <= score <= 40: - rank = 'E' - else: - rank = 'F' - return rank - - -RANK_CASES = [(score, _compute_cc_rank(score)) for score in range(-1, 100)] - - -@pytest.mark.parametrize('score,expected_rank', RANK_CASES) -def test_rank(score, expected_rank): - if (hasattr(expected_rank, '__call__') and - isinstance(expected_rank(), Exception)): - with pytest.raises(expected_rank): - cc_rank(score) - else: - assert cc_rank(score) == expected_rank - - -fun = lambda complexity: Function('randomname', 1, 4, 23, False, None, [], complexity) -cls = lambda complexity: Class('randomname_', 3, 21, 18, [], [], complexity) - -# This works with both the next two tests -SIMPLE_BLOCKS = [ - ([], [], 0.), - ([fun(12), fun(14), fun(1)], [1, 0, 2], 9.), - ([fun(4), cls(5), fun(2), cls(21)], [3, 1, 0, 2], 8.), -] - - -@pytest.mark.parametrize('blocks,indices,_', SIMPLE_BLOCKS) -def test_sorted_results(blocks, indices, _): - expected_result = list(map(get_index(blocks), indices)) - assert sorted_results(blocks) == expected_result - - -@pytest.mark.parametrize('blocks,_,expected_average', SIMPLE_BLOCKS) -def test_average_complexity(blocks, _, expected_average): - assert average_complexity(blocks) == expected_average - - -CC_VISIT_CASES = [ - (GENERAL_CASES[0][0], 1, 1, 'f.inner'), - (GENERAL_CASES[1][0], 3, 1, 'f.inner'), - (''' - class joe1: - i = 1 - def doit1(self): - pass - class joe2: - ii = 2 - def doit2(self): - pass - class joe3: - iii = 3 - def doit3(self): - pass - ''', 2, 4, 'joe1.joe2.joe3'), -] - - -@pytest.mark.parametrize('code,number_of_blocks,diff,lookfor', CC_VISIT_CASES) -def test_cc_visit(code, number_of_blocks, diff, lookfor): - code = dedent(code) - - blocks = cc_visit(code) - assert isinstance(blocks, list) - assert len(blocks) == number_of_blocks - - with_inner_blocks = add_inner_blocks(blocks) - names = set(map(operator.attrgetter('name'), with_inner_blocks)) - assert len(with_inner_blocks) - len(blocks) == diff - assert lookfor in names - - -def test_flake8_checker(): - c = Flake8Checker(ast.parse(dedent(GENERAL_CASES[0][0])), 'test case') - assert c.max_cc == -1 - assert c.no_assert is False - assert list(c.run()) == [] - c.max_cc = 3 - assert list(c.run()) == [(7, 0, 'R701 \'f\' is too complex (4)', type(c))] diff --git a/radon/tests/test_complexity_visitor.py b/radon/tests/test_complexity_visitor.py deleted file mode 100644 index fbfa364..0000000 --- a/radon/tests/test_complexity_visitor.py +++ /dev/null @@ -1,529 +0,0 @@ -import sys -import textwrap - -import pytest - -from radon.visitors import * - - -dedent = lambda code: textwrap.dedent(code).strip() - - -SIMPLE_BLOCKS = [ - (''' - if a: pass - ''', 2, {}), - - (''' - if a: pass - else: pass - ''', 2, {}), - - (''' - if a: pass - elif b: pass - ''', 3, {}), - - (''' - if a: pass - elif b: pass - else: pass - ''', 3, {}), - - (''' - if a and b: pass - ''', 3, {}), - - (''' - if a and b: pass - else: pass - ''', 3, {}), - - (''' - if a and b: pass - elif c and d: pass - else: pass - ''', 5, {}), - - (''' - if a and b or c and d: pass - else: pass - ''', 5, {}), - - (''' - if a and b or c: pass - else: pass - ''', 4, {}), - - (''' - for x in range(10): print(x) - ''', 2, {}), - - (''' - for x in xrange(10): print(x) - else: pass - ''', 3, {}), - - (''' - while a < 4: pass - ''', 2, {}), - - (''' - while a < 4: pass - else: pass - ''', 3, {}), - - (''' - while a < 4 and b < 42: pass - ''', 3, {}), - - (''' - while a and b or c < 10: pass - else: pass - ''', 5, {}), - - (''' - with open('raw.py') as fobj: print(fobj.read()) - ''', 2, {}), - - (''' - [i for i in range(4)] - ''', 2, {}), - - (''' - [i for i in range(4) if i&1] - ''', 3, {}), - - (''' - (i for i in range(4)) - ''', 2, {}), - - (''' - (i for i in range(4) if i&1) - ''', 3, {}), - - (''' - [i for i in range(42) if sum(k ** 2 for k in divisors(i)) & 1] - ''', 4, {}), - - (''' - try: raise TypeError - except TypeError: pass - ''', 2, {}), - - (''' - try: raise TypeError - except TypeError: pass - else: pass - ''', 3, {}), - - (''' - try: raise TypeError - finally: pass - ''', 1, {}), - - (''' - try: raise TypeError - except TypeError: pass - finally: pass - ''', 2, {}), - - (''' - try: raise TypeError - except TypeError: pass - else: pass - finally: pass - ''', 3, {}), - - # Lambda are not counted anymore as per #68 - (''' - k = lambda a, b: k(b, a) - ''', 1, {}), - - (''' - k = lambda a, b, c: c if a else b - ''', 2, {}), - - (''' - v = a if b else c - ''', 2, {}), - - (''' - v = a if sum(i for i in xrange(c)) < 10 else c - ''', 3, {}), - - (''' - sum(i for i in range(12) for z in range(i ** 2) if i * z & 1) - ''', 4, {}), - - (''' - sum(i for i in range(10) if i >= 2 and val and val2 or val3) - ''', 6, {}), - - (''' - for i in range(10): - print(i) - else: - print('wah') - print('really not found') - print(3) - ''', 3, {}), - - (''' - while True: - print(1) - else: - print(2) - print(1) - print(0) - print(-1) - ''', 3, {}), - - (''' - assert i < 0 - ''', 2, {}), - - (''' - assert i < 0, "Fail" - ''', 2, {}), - - (''' - assert i < 0 - ''', 1, {'no_assert': True}), - - (''' - def f(): - assert 10 > 20 - ''', 1, {'no_assert': True}), - - (''' - class TestYo(object): - def test_yo(self): - assert self.n > 4 - ''', 1, {'no_assert': True}), -] - - -# These run only if Python version is >= 2.7 -ADDITIONAL_BLOCKS = [ - (''' - {i for i in range(4)} - ''', 2, {}), - - (''' - {i for i in range(4) if i&1} - ''', 3, {}), - - (''' - {i:i**4 for i in range(4)} - ''', 2, {}), - - (''' - {i:i**4 for i in range(4) if i&1} - ''', 3, {}), -] - -BLOCKS = SIMPLE_BLOCKS[:] -if sys.version_info[:2] >= (2, 7): - BLOCKS.extend(ADDITIONAL_BLOCKS) - - -@pytest.mark.parametrize('code,expected,kwargs', BLOCKS) -def test_visitor_simple(code, expected, kwargs): - visitor = ComplexityVisitor.from_code(dedent(code), **kwargs) - assert visitor.complexity == expected - - -SINGLE_FUNCTIONS_CASES = [ - (''' - def f(a, b, c): - if a and b == 4: - return c ** c - elif a and not c: - return sum(i for i in range(41) if i&1) - return a + b - ''', (1, 7)), - - (''' - if a and not b: pass - elif b or c: pass - else: pass - - for i in range(4): - print(i) - - def g(a, b): - while a < b: - b, a = a **2, b ** 2 - return b - ''', (6, 2)), - - (''' - def f(a, b): - while a**b: - a, b = b, a * (b - 1) - if a and b: - b = 0 - else: - b = 1 - return sum(i for i in range(b)) - ''', (1, 5)), -] - -if sys.version_info[:2] >= (3, 5): - SINGLE_FUNCTIONS_CASES.append( - (''' - async def f(a, b): - async with open('blabla.log', 'w') as f: - async for i in range(100): - f.write(str(i) + '\\n') - ''', (1, 3)), - ) - - -@pytest.mark.parametrize('code,expected', SINGLE_FUNCTIONS_CASES) -def test_visitor_single_functions(code, expected): - visitor = ComplexityVisitor.from_code(dedent(code)) - assert len(visitor.functions) == 1 - assert (visitor.complexity, visitor.functions[0].complexity) == expected - - -FUNCTIONS_CASES = [ - (''' - def f(a, b): - return a if b else 2 - - def g(a, b, c): - if a and b: - return a / b + b / a - elif b and c: - return b / c - c / b - return a + b + c - - def h(a, b): - return 2 * (a + b) - ''', (2, 5, 1)), - - (''' - def f(p, q): - while p: - p, q = q, p - q - if q < 1: - return 1 / q ** 2 - elif q > 100: - return 1 / q ** .5 - return 42 if not q else p - - def g(a, b, c): - if a and b or a - b: - return a / b - c - elif b or c: - return 1 - else: - k = 0 - with open('results.txt', 'w') as fobj: - for i in range(b ** c): - k += sum(1 / j for j in range(i ** 2) if j > 2) - fobj.write(str(k)) - return k - 1 - ''', (5, 10)), -] - - -@pytest.mark.parametrize('code,expected', FUNCTIONS_CASES) -def test_visitor_functions(code, expected): - visitor = ComplexityVisitor.from_code(dedent(code)) - assert len(visitor.functions) == len(expected) - assert tuple(map(GET_COMPLEXITY, visitor.functions)) == expected - - -CLASSES_CASES = [ - (''' - class A(object): - - def m(self, a, b): - if not a or b: - return b - 1 - try: - return a / b - except ZeroDivisionError: - return a - - def n(self, k): - while self.m(k) < k: - k -= self.m(k ** 2 - min(self.m(j) for j in range(k ** 4))) - return k - ''', (6, 4, 3)), - - (''' - class B(object): - - ATTR = 9 if A().n(9) == 9 else 10 - import sys - if sys.version_info >= (3, 3): - import os - AT = os.openat('/random/loc') - - def __iter__(self): - return __import__('itertools').tee(B.__dict__) - - def test(self, func): - a = func(self.ATTR, self.AT) - if a < self.ATTR: - yield self - elif a > self.ATTR ** 2: - yield self.__iter__() - yield iter(a) - ''', (5, 1, 3)), -] - - -@pytest.mark.parametrize('code,expected', CLASSES_CASES) -def test_visitor_classes(code, expected): - total_class_complexity = expected[0] - methods_complexity = expected[1:] - visitor = ComplexityVisitor.from_code(dedent(code)) - assert len(visitor.classes) == 1 - assert len(visitor.functions) == 0 - cls = visitor.classes[0] - assert cls.real_complexity == total_class_complexity - assert tuple(map(GET_COMPLEXITY, cls.methods)) == methods_complexity - - -GENERAL_CASES = [ - (''' - if a and b: - print - else: - print - a = sum(i for i in range(1000) if i % 3 == 0 and i % 5 == 0) - - def f(n): - def inner(n): - return n ** 2 - - if n == 0: - return 1 - elif n == 1: - return n - elif n < 5: - return (n - 1) ** 2 - return n * pow(inner(n), f(n - 1), n - 3) - ''', (6, 3, 0, 9)), - - (''' - try: - 1 / 0 - except ZeroDivisionError: - print - except TypeError: - pass - - class J(object): - - def aux(self, w): - if w == 0: - return 0 - return w - 1 + sum(self.aux(w - 3 - i) for i in range(2)) - - def f(a, b): - def inner(n): - return n ** 2 - if a < b: - b, a = a, inner(b) - return a, b - ''', (3, 1, 2, 6)), - - (''' - class f(object): - class inner(object): - pass - ''', (1, 0, 0, 1)), -] - - -@pytest.mark.parametrize('code,expected', GENERAL_CASES) -def test_visitor_module(code, expected): - (module_complexity, - functions_complexity, - classes_complexity, - total_complexity) = expected - - visitor = ComplexityVisitor.from_code(dedent(code)) - assert visitor.complexity, module_complexity - assert visitor.functions_complexity == functions_complexity - assert visitor.classes_complexity == classes_complexity - assert visitor.total_complexity == total_complexity - - -CLOSURES_CASES = [ - (''' - def f(n): - def g(l): - return l ** 4 - def h(i): - return i ** 5 + 1 if i & 1 else 2 - return sum(g(u + 4) / float(h(u)) for u in range(2, n)) - ''', ('g', 'h'), (1, 2, 2)), - - (''' - # will it work? :D - def memoize(func): - cache = {} - def aux(*args, **kwargs): - key = (args, kwargs) - if key in cache: - return cache[key] - cache[key] = res = func(*args, **kwargs) - return res - return aux - ''', ('aux',), (2, 1)), -] - - -@pytest.mark.parametrize('code,closure_names,expected', CLOSURES_CASES) -def test_visitor_closures(code, closure_names, expected): - visitor = ComplexityVisitor.from_code(dedent(code)) - func = visitor.functions[0] - closure_names = closure_names - expected_cs_cc = expected[:-1] - expected_total_cc = expected[-1] - - assert len(visitor.functions) == 1 - - names = tuple(cs.name for cs in func.closures) - assert names == closure_names - - cs_complexity = tuple(cs.complexity for cs in func.closures) - assert cs_complexity == expected_cs_cc - assert func.complexity == expected_total_cc - - # There was a bug for which `blocks` increased while it got accessed - v = visitor - assert v.blocks == v.blocks == v.blocks - - -CONTAINERS_CASES = [ - (('func', 12, 0, 18, False, None, [], 5), - ('F', 'func', 'F 12:0->18 func - 5')), - - (('meth', 12, 0, 21, True, 'cls', [], 5), - ('M', 'cls.meth', 'M 12:0->21 cls.meth - 5')), - - (('cls', 12, 0, 15, [], [], 5), - ('C', 'cls', 'C 12:0->15 cls - 5')), - - (('cls', 12, 0, 19, [object, object, object, object], [], 30), - ('C', 'cls', 'C 12:0->19 cls - 8')), -] - - -@pytest.mark.parametrize('values,expected', CONTAINERS_CASES) -def test_visitor_containers(values, expected): - expected_letter, expected_name, expected_str = expected - - cls = Function if len(values) == 8 else Class - obj = cls(*values) - assert obj.letter == expected_letter - assert obj.fullname == expected_name - assert str(obj) == expected_str diff --git a/radon/tests/test_halstead.py b/radon/tests/test_halstead.py deleted file mode 100644 index f77877d..0000000 --- a/radon/tests/test_halstead.py +++ /dev/null @@ -1,72 +0,0 @@ -import textwrap - -import pytest - -from radon.visitors import HalsteadVisitor - - -dedent = lambda code: textwrap.dedent(code).strip() - - -SIMPLE_BLOCKS = [ - (''' - if a and b: pass - ''', (1, 2, 1, 2)), - - (''' - if a and b: pass - elif b or c: pass - ''', (2, 4, 2, 3)), - - (''' - if a and b: pass - elif b and c: pass - ''', (2, 4, 1, 3)), - - (''' - a = b * c - ''', (1, 2, 1, 2)), - - (''' - b = -x - ''', (1, 1, 1, 1)), - - (''' - a = -x - c = -x - ''', (2, 2, 1, 1)), - - (''' - a = -x - b = +x - ''', (2, 2, 2, 1)), - - (''' - a += 3 - b += 4 - c *= 3 - ''', (3, 6, 2, 5)), - - (''' - a = 2 - b = 3 - a *= b - - def f(): - b = 2 - b += 4 - ''', (2, 4, 2, 4)), - - (''' - a = b < 4 - c = i <= 45 >= d - k = 4 < 2 - ''', (4, 7, 3, 6)), -] - - -@pytest.mark.parametrize('code,expected', SIMPLE_BLOCKS) -def test_visitor(code, expected): - visitor = HalsteadVisitor.from_code(dedent(code)) - assert expected == (visitor.operators, visitor.operands, - visitor.distinct_operators, visitor.distinct_operands) diff --git a/radon/tests/test_other_metrics.py b/radon/tests/test_other_metrics.py deleted file mode 100644 index 87e4c9b..0000000 --- a/radon/tests/test_other_metrics.py +++ /dev/null @@ -1,126 +0,0 @@ -import textwrap - -import pytest - -from radon.metrics import * - - -dedent = lambda code: textwrap.dedent(code).strip() - - -def _compute_mi_rank(score): - if 0 <= score < 10: - res = 'C' - elif 10 <= score < 20: - res = 'B' - elif 20 <= score <= 100: - res = 'A' - else: - raise ValueError(score) - return res - - -MI_COMPUTE_CASES = [ - ((0, 0, 0, 0), 100.), - ((0, 1, 2, 0), 100.), - ((10, 2, 5, .5), 81.75051711476864), - ((200, 10, 78, 45), 70.0321877686122), -] - - -@pytest.mark.parametrize('values,expected', MI_COMPUTE_CASES) -def test_mi_compute(values, expected): - # Equivalent to unittest's assertAlmostEqual - assert round(mi_compute(*values) - expected, 5) == 0 - - -MI_RANK_CASES = [(score, _compute_mi_rank(score)) for score in range(0, 100)] - - -@pytest.mark.parametrize('score,expected', MI_RANK_CASES) -def test_mi_rank(score, expected): - assert mi_rank(score) == expected - - -H_VISIT_CASES = [ - (''' - ''', (0,) * 12), - - (''' - a = b + c - d = c - f - - def f(b): - a = 2 - 4 - d = a + b - return a ** d - ''', (3, 8, 5, 10, 11, 15, 28.75488750216347, 51.89147427955947, - 1.875, 97.296514274174, 5.405361904120777, 0.01729715809318649)), -] - - -@pytest.mark.parametrize('code,expected', H_VISIT_CASES) -def test_h_visit(code, expected): - code = dedent(code) - expected = expected - assert h_visit(code) == expected - - -first_mi = ''' - def f(a, b, c): - return (a ** b) % c - - k = f(1, 2, 3) - print(k ** 2 - 1) -''' - -second_mi = ''' - class A(object): - - def __init__(self, n): - # this is awesome - self.n = sum(i for i in range(n) if i&1) - - def m(self, j): - """Just compute it. - Example. - """ - if j > 421: - return (self.n + 2) ** j - return (self.n - 2) ** j - - a = A(4) - a.m(42) # i don't know why, but it works -''' - -MI_VISIT_CASES = [ - (''' - ''', 100., True), - - (''' - ''', 100., False), - - # V = 41.51317942364757 - # CC = 1 - # LLOC = 4 - # CM % = 0 - (first_mi, 75.40162245189028, True), - (first_mi, 75.40162245189028, False), - - # V = 66.60791492653966 - # CC = 4 - # LLOC = 9 - # CM % = 38.46153846153847 - (second_mi, 95.10743260514764, True), - - # CM % = 15.384615384615385 - (second_mi, 90.10892143724502, False), -] - - -@pytest.mark.parametrize('code,expected,count_multi', MI_VISIT_CASES) -def test_mi_visit(code, expected, count_multi): - code = dedent(code) - expected = expected - count_multi = count_multi - assert mi_visit(code, count_multi) == expected diff --git a/radon/tests/test_raw.py b/radon/tests/test_raw.py deleted file mode 100644 index e1394be..0000000 --- a/radon/tests/test_raw.py +++ /dev/null @@ -1,344 +0,0 @@ -import textwrap - -import pytest - -from radon.raw import * - - -dedent = lambda code: textwrap.dedent(code).strip() - - -FIND_CASES = [ - (''' - return 0 - ''', None), - - (''' - # most useless comment : - ''', None), - - (''' - if a: pass - ''', 2), - - (''' - # useless comment - if a: pass - ''', 4), - - (''' - d[3:] - ''', 3), -] - - -@pytest.mark.parametrize('code,result', FIND_CASES) -def test_find(code, result): - code = _generate(dedent(code)) - if result is None: - with pytest.raises(ValueError): - _find(code, OP, ':') - else: - assert _find(code, OP, ':') == result - - -LOGICAL_LINES_CASES = [ - (''' - ''', 0), - - (''' - # most useless comment - ''', 0), - - (''' - a * b + c - ''', 1), - - (''' - if a: - ''', 1), - - (''' - try: - ''', 1), - - (''' - if a: # just a comment - ''', 1), - - (''' - try: # just a comment - ''', 1), - - (''' - if a: pass - ''', 2), - - (''' - if a: continue - ''', 2), - - (''' - if a: break - ''', 2), - - (''' - if a: return - ''', 2), - - (''' - if a: pass # just a comment - ''', 2), - - (''' - if a: continue # just a comment - ''', 2), - - (''' - if a: break # just a comment - ''', 2), - - (''' - if a: return # just a comment - ''', 2), - - (''' - 42 # a comment - ''', 1), - - (''' - """ - multiple - """ - ''', 1), - - (''' - # just a comment - ''', 0), - - (''' - a = 2; b = 43 - ''', 2), - - (''' - a = 1; b = 2; - ''', 2), -] - - -@pytest.mark.parametrize('code,expected_number_of_lines', LOGICAL_LINES_CASES) -def test_logical(code, expected_number_of_lines): - code = _generate(dedent(code)) - assert _logical(code) == expected_number_of_lines - - -ANALYZE_CASES = [ - (''' - ''', (0, 0, 0, 0, 0, 0, 0)), - - (''' - """ - doc? - """ - ''', (3, 0, 0, 0, 3, 0, 0)), - - (''' - # just a comment - if a and b: - print('woah') - else: - # you'll never get here - print('ven') - ''', (6, 4, 4, 2, 0, 0, 2)), - - (''' - # - # - # - ''', (3, 0, 0, 3, 0, 0, 3)), - - (''' - if a: - print - - - else: - print - ''', (6, 4, 4, 0, 0, 2, 0)), - - # In this case the docstring is not counted as a multi-line string - # because in fact it is on one line! - (''' - def f(n): - """here""" - return n * f(n - 1) - ''', (3, 2, 2, 0, 0, 0, 1)), - - (''' - def hip(a, k): - if k == 1: return a - # getting high... - return a ** hip(a, k - 1) - - def fib(n): - """Compute the n-th Fibonacci number. - - Try it with n = 294942: it will take a fairly long time. - """ - if n <= 1: return 1 # otherwise it will melt the cpu - return fib(n - 2) + fib(n - 1) - ''', (12, 8, 6, 2, 3, 2, 1)), - - (''' - a = [1, 2, 3, - ''', SyntaxError), - - # Test that handling of parameters with a value passed in. - (''' - def foo(n=1): - """ - Try it with n = 294942: it will take a fairly long time. - """ - if n <= 1: return 1 # otherwise it will melt the cpu - ''', (5, 3, 2, 1, 3, 0, 0)), - - (''' - def foo(n=1): - """ - Try it with n = 294942: it will take a fairly long time. - """ - if n <= 1: return 1 # otherwise it will melt the cpu - string = """This is a string not a comment""" - ''', (6, 4, 3, 1, 3, 0, 0)), - - (''' - def foo(n=1): - """ - Try it with n = 294942: it will take a fairly long time. - """ - if n <= 1: return 1 # otherwise it will melt the cpu - string = """ - This is a string not a comment - """ - ''', (8, 4, 5, 1, 3, 0, 0)), - - (''' - def foo(n=1): - """ - Try it with n = 294942: it will take a fairly long time. - """ - if n <= 1: return 1 # otherwise it will melt the cpu - string =""" - This is a string not a comment - """ - test = 0 - ''', (9, 5, 6, 1, 3, 0, 0)), - - # Breaking lines still treated as single line of code. - (r''' - def foo(n=1): - """ - Try it with n = 294942: it will take a fairly long time. - """ - if n <= 1: return 1 # otherwise it will melt the cpu - string =\ - """ - This is a string not a comment - """ - test = 0 - ''', (10, 5, 7, 1, 3, 0, 0)), - - # Test handling of last line comment. - (r''' - def foo(n=1): - """ - Try it with n = 294942: it will take a fairly long time. - """ - if n <= 1: return 1 # otherwise it will melt the cpu - string =\ - """ - This is a string not a comment - """ - test = 0 - # Comment - ''', (11, 5, 7, 2, 3, 0, 1)), - - (r''' - def foo(n=1): - """ - Try it with n = 294942: it will take a fairly long time. - """ - if n <= 1: return 1 # otherwise it will melt the cpu - test = 0 - string =\ - """ - This is a string not a comment - """ - ''', (10, 5, 7, 1, 3, 0, 0)), - - (''' - def function( - args - ): - """This is a multi-line docstring - for the function - """ - pass - ''', (7, 2, 4, 0, 3, 0, 0)), - (''' - def function(): - multiline_with_equals_in_it = """ """ - pass - ''', (3, 3, 3, 0, 0, 0, 0)), - (''' - def function(): - """ a docstring in a single line counts as a single-line comment """ - ''', (2, 1, 1, 0, 0, 0, 1)), - (''' - def function(): - """ this is not a """ """ docstring because it is concatenated """ - ''', (2, 2, 2, 0, 0, 0, 0)), - (r''' - def function(): - " this is not a multiline " \ - " docstring " - ''', (3, 2, 3, 0, 0, 0, 0)), - (''' - def function(): - """ this is not a docstring """ # because it also has a comment on the line - ''', (2, 2, 2, 1, 0, 0, 0)), - (r''' - def function(): - " a docstring is a not single-line comment when " \ - # followed by a comment on a another line - ''', (3, 2, 3, 1, 0, 0, 0)), - (r''' - def function(): - """ docstring continued by blank line is not a single-line comment """ \ - - pass - ''', (4, 2, 3, 0, 0, 1, 0)), - (r''' - def function(): - pass; pass - ''', (2, 3, 2, 0, 0, 0, 0)), - (r''' - def function(): - """ doc string """; pass - ''', (2, 3, 2, 0, 0, 0, 0)), -] - - -@pytest.mark.parametrize('code,expected', ANALYZE_CASES) -def test_analyze(code, expected): - code = dedent(code) - - try: - len(expected) - except: - with pytest.raises(expected): - analyze(code) - else: - result = analyze(code) - assert result == Module(*expected) - assert result.loc == result.blank + result.sloc + result.single_comments + result.multi diff --git a/radon/visitors.py b/radon/visitors.py deleted file mode 100644 index 5dd4401..0000000 --- a/radon/visitors.py +++ /dev/null @@ -1,373 +0,0 @@ -'''This module contains the ComplexityVisitor class which is where all the -analysis concerning Cyclomatic Complexity is done. There is also the class -HalsteadVisitor, that counts Halstead metrics.''' - -import ast -import operator -import collections - - -# Helper functions to use in combination with map() -GET_COMPLEXITY = operator.attrgetter('complexity') -GET_REAL_COMPLEXITY = operator.attrgetter('real_complexity') -NAMES_GETTER = operator.attrgetter('name', 'asname') -GET_ENDLINE = operator.attrgetter('endline') - -BaseFunc = collections.namedtuple('Function', ['name', 'lineno', 'col_offset', - 'endline', 'is_method', - 'classname', 'closures', - 'complexity']) -BaseClass = collections.namedtuple('Class', ['name', 'lineno', 'col_offset', - 'endline', 'methods', - 'inner_classes', - 'real_complexity']) - - -def code2ast(source): - '''Convert a string object into an AST object. - - This function is retained for backwards compatibility, but it no longer - attempts any conversions. It's equivalent to a call to ``ast.parse``. - ''' - return ast.parse(source) - - -class Function(BaseFunc): - '''Object representing a function block.''' - - @property - def letter(self): - '''The letter representing the function. It is `M` if the function is - actually a method, `F` otherwise. - ''' - return 'M' if self.is_method else 'F' - - @property - def fullname(self): - '''The full name of the function. If it is a method, then the full name - is: - {class name}.{method name} - Otherwise it is just the function name. - ''' - if self.classname is None: - return self.name - return '{0}.{1}'.format(self.classname, self.name) - - def __str__(self): - '''String representation of a function block.''' - return '{0} {1}:{2}->{3} {4} - {5}'.format(self.letter, self.lineno, - self.col_offset, - self.endline, - self.fullname, - self.complexity) - - -class Class(BaseClass): - '''Object representing a class block.''' - - letter = 'C' - - @property - def fullname(self): - '''The full name of the class. It is just its name. This attribute - exists for consistency (see :data:`Function.fullname`). - ''' - return self.name - - @property - def complexity(self): - '''The average complexity of the class. It corresponds to the average - complexity of its methods plus one. - ''' - if not self.methods: - return self.real_complexity - methods = len(self.methods) - return int(self.real_complexity / float(methods)) + (methods > 1) - - def __str__(self): - '''String representation of a class block.''' - return '{0} {1}:{2}->{3} {4} - {5}'.format(self.letter, self.lineno, - self.col_offset, - self.endline, self.name, - self.complexity) - - -class CodeVisitor(ast.NodeVisitor): - '''Base class for every NodeVisitors in `radon.visitors`. It implements a - couple utility class methods and a static method. - ''' - - @staticmethod - def get_name(obj): - '''Shorthand for ``obj.__class__.__name__``.''' - return obj.__class__.__name__ - - @classmethod - def from_code(cls, code, **kwargs): - '''Instantiate the class from source code (string object). The - `**kwargs` are directly passed to the `ast.NodeVisitor` constructor. - ''' - return cls.from_ast(code2ast(code), **kwargs) - - @classmethod - def from_ast(cls, ast_node, **kwargs): - '''Instantiate the class from an AST node. The `**kwargs` are - directly passed to the `ast.NodeVisitor` constructor. - ''' - visitor = cls(**kwargs) - visitor.visit(ast_node) - return visitor - - -class ComplexityVisitor(CodeVisitor): - '''A visitor that keeps track of the cyclomatic complexity of - the elements. - - :param to_method: If True, every function is treated as a method. In this - case the *classname* parameter is used as class name. - :param classname: Name of parent class. - :param off: If True, the starting value for the complexity is set to 1, - otherwise to 0. - ''' - - def __init__(self, to_method=False, classname=None, off=True, - no_assert=False): - self.off = off - self.complexity = 1 if off else 0 - self.functions = [] - self.classes = [] - self.to_method = to_method - self.classname = classname - self.no_assert = no_assert - self._max_line = float('-inf') - - @property - def functions_complexity(self): - '''The total complexity from all functions (i.e. the total number of - decision points + 1). - - This is *not* the sum of all the complexity from the functions. Rather, - it's the complexity of the code *inside* all the functions. - ''' - return sum(map(GET_COMPLEXITY, self.functions)) - len(self.functions) - - @property - def classes_complexity(self): - '''The total complexity from all classes (i.e. the total number of - decision points + 1). - ''' - return sum(map(GET_REAL_COMPLEXITY, self.classes)) - len(self.classes) - - @property - def total_complexity(self): - '''The total complexity. Computed adding up the visitor complexity, the - functions complexity, and the classes complexity. - ''' - return (self.complexity + self.functions_complexity + - self.classes_complexity + (not self.off)) - - @property - def blocks(self): - '''All the blocks visited. These include: all the functions, the - classes and their methods. The returned list is not sorted. - ''' - blocks = [] - blocks.extend(self.functions) - for cls in self.classes: - blocks.append(cls) - blocks.extend(cls.methods) - return blocks - - @property - def max_line(self): - '''The maximum line number among the analyzed lines.''' - return self._max_line - - @max_line.setter - def max_line(self, value): - '''The maximum line number among the analyzed lines.''' - if value > self._max_line: - self._max_line = value - - def generic_visit(self, node): - '''Main entry point for the visitor.''' - # Get the name of the class - name = self.get_name(node) - # Check for a lineno attribute - if hasattr(node, 'lineno'): - self.max_line = node.lineno - # The Try/Except block is counted as the number of handlers - # plus the `else` block. - # In Python 3.3 the TryExcept and TryFinally nodes have been merged - # into a single node: Try - if name in ('Try', 'TryExcept'): - self.complexity += len(node.handlers) + len(node.orelse) - elif name == 'BoolOp': - self.complexity += len(node.values) - 1 - # Ifs, with and assert statements count all as 1. - # Note: Lambda functions are not counted anymore, see #68 - elif name in ('With', 'If', 'IfExp', 'AsyncWith'): - self.complexity += 1 - # The For and While blocks count as 1 plus the `else` block. - elif name in ('For', 'While', 'AsyncFor'): - self.complexity += bool(node.orelse) + 1 - # List, set, dict comprehensions and generator exps count as 1 plus - # the `if` statement. - elif name == 'comprehension': - self.complexity += len(node.ifs) + 1 - - super(ComplexityVisitor, self).generic_visit(node) - - def visit_Assert(self, node): - '''When visiting `assert` statements, the complexity is increased only - if the `no_assert` attribute is `False`. - ''' - self.complexity += not self.no_assert - - def visit_AsyncFunctionDef(self, node): - '''Async function definition is the same thing as the synchronous - one. - ''' - self.visit_FunctionDef(node) - - def visit_FunctionDef(self, node): - '''When visiting functions a new visitor is created to recursively - analyze the function's body. - ''' - # The complexity of a function is computed taking into account - # the following factors: number of decorators, the complexity - # the function's body and the number of closures (which count - # double). - closures = [] - body_complexity = 1 - for child in node.body: - visitor = ComplexityVisitor(off=False, no_assert=self.no_assert) - visitor.visit(child) - closures.extend(visitor.functions) - # Add general complexity but not closures' complexity, see #68 - body_complexity += visitor.complexity - - func = Function(node.name, node.lineno, node.col_offset, - max(node.lineno, visitor.max_line), self.to_method, - self.classname, closures, body_complexity) - self.functions.append(func) - - def visit_ClassDef(self, node): - '''When visiting classes a new visitor is created to recursively - analyze the class' body and methods. - ''' - # The complexity of a class is computed taking into account - # the following factors: number of decorators and the complexity - # of the class' body (which is the sum of all the complexities). - methods = [] - # According to Cyclomatic Complexity definition it has to start off - # from 1. - body_complexity = 1 - classname = node.name - visitors_max_lines = [node.lineno] - inner_classes = [] - for child in node.body: - visitor = ComplexityVisitor(True, classname, off=False, - no_assert=self.no_assert) - visitor.visit(child) - methods.extend(visitor.functions) - body_complexity += (visitor.complexity + - visitor.functions_complexity) - visitors_max_lines.append(visitor.max_line) - inner_classes.extend(visitor.classes) - - cls = Class(classname, node.lineno, node.col_offset, - max(visitors_max_lines + list(map(GET_ENDLINE, methods))), - methods, inner_classes, body_complexity) - self.classes.append(cls) - - -class HalsteadVisitor(CodeVisitor): - '''Visitor that keeps track of operators and operands, in order to compute - Halstead metrics (see :func:`radon.metrics.h_visit`). - ''' - - types = {ast.Num: 'n', - ast.Name: 'id', - ast.Attribute: 'attr'} - - def __init__(self, context=None): - '''*context* is a string used to keep track the analysis' context.''' - self.operators_seen = set() - self.operands_seen = set() - self.operators = 0 - self.operands = 0 - self.context = context - - @property - def distinct_operators(self): - '''The number of distinct operators.''' - return len(self.operators_seen) - - @property - def distinct_operands(self): - '''The number of distinct operands.''' - return len(self.operands_seen) - - def dispatch(meth): - '''This decorator does all the hard work needed for every node. - - The decorated method must return a tuple of 4 elements: - - * the number of operators - * the number of operands - * the operators seen (a sequence) - * the operands seen (a sequence) - ''' - def aux(self, node): - '''Actual function that updates the stats.''' - results = meth(self, node) - self.operators += results[0] - self.operands += results[1] - self.operators_seen.update(results[2]) - for operand in results[3]: - new_operand = getattr(operand, - self.types.get(type(operand), ''), - operand) - - self.operands_seen.add((self.context, new_operand)) - # Now dispatch to children - super(HalsteadVisitor, self).generic_visit(node) - return aux - - @dispatch - def visit_BinOp(self, node): - '''A binary operator.''' - return (1, 2, (self.get_name(node.op),), (node.left, node.right)) - - @dispatch - def visit_UnaryOp(self, node): - '''A unary operator.''' - return (1, 1, (self.get_name(node.op),), (node.operand,)) - - @dispatch - def visit_BoolOp(self, node): - '''A boolean operator.''' - return (1, len(node.values), (self.get_name(node.op),), node.values) - - @dispatch - def visit_AugAssign(self, node): - '''An augmented assign (contains an operator).''' - return (1, 2, (self.get_name(node.op),), (node.target, node.value)) - - @dispatch - def visit_Compare(self, node): - '''A comparison.''' - return (len(node.ops), len(node.comparators) + 1, - map(self.get_name, node.ops), node.comparators + [node.left]) - - def visit_FunctionDef(self, node): - '''When visiting functions, another visitor is created to recursively - analyze the function's body. - ''' - for child in node.body: - visitor = HalsteadVisitor.from_ast(child, context=node.name) - self.operators += visitor.operators - self.operands += visitor.operands - self.operators_seen.update(visitor.operators_seen) - self.operands_seen.update(visitor.operands_seen) diff --git a/requirements.txt b/requirements.txt index 56504c3..c3131e2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -mando>=0.6,<0.7 -colorama>=0.3,<0.4 -flake8_polyfill +radon==6.0.1 +pytest>=7.3.1 +pytest-mock>=3.10.0 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 7c964b4..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[wheel] -universal=1 diff --git a/setup.py b/setup.py deleted file mode 100644 index 578bcb6..0000000 --- a/setup.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -from setuptools import setup, find_packages -import radon - - -with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fobj: - readme = fobj.read() - -setup(name='radon', - version=radon.__version__, - author='Michele Lacchia', - author_email='michelelacchia@gmail.com', - url='https://radon.readthedocs.org/', - download_url='https://pypi.python.org/radon/', - license='MIT', - description='Code Metrics in Python', - platforms='any', - long_description=readme, - packages=find_packages(), - tests_require=['tox'], - install_requires=[ - 'mando>=0.6,<0.7', - 'colorama>=0.3,<0.4', - 'flake8-polyfill', - ], - entry_points={ - 'console_scripts': ['radon = radon:main'], - 'setuptools.installation': [ - 'eggsecutable = radon:main', - ], - 'flake8.extension': [ - 'R70 = radon.complexity:Flake8Checker', - ], - }, - keywords='static analysis code complexity metrics', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.1', - 'Programming Language :: Python :: 3.2', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Topic :: Software Development', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Topic :: Software Development :: Quality Assurance', - 'Topic :: Utilities', - ] -) diff --git a/test_requirements.txt b/test_requirements.txt deleted file mode 100644 index 2e6853c..0000000 --- a/test_requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -coverage -coveralls -pytest>=2.7 -pytest-mock -argparse diff --git a/tests/test_engine.py b/tests/test_engine.py new file mode 100644 index 0000000..88c19f9 --- /dev/null +++ b/tests/test_engine.py @@ -0,0 +1,49 @@ +import sys +import os +import json +import shlex + +sys.path.append('/usr/src/app') +os.environ['PYTHONDONTWRITEBYTECODE'] = "no" + +from engine import Engine # your module name + +def test_engine(mocker): + config_path = "/config.json" + config_data = { + "config": { + "threshold": "a", + "encoding": "utf-8" + }, + "include_paths": ["./tests/test_dir1", "./tests/test_dir2.py"] + } + + mocker.patch("os.path.exists", return_value=True) + mocker.patch("os.system") + mocker.patch("builtins.open", mocker.mock_open(read_data=json.dumps(config_data))) + + engine = Engine() + engine.run() + + # Check if the correct file was opened + open.assert_called_with(config_path) + + # Check if environment variable was set + assert os.environ["RADONFILESENCODING"] == config_data["config"]["encoding"] + + # Check if the command was run with the correct arguments + expected_paths = " ".join([shlex.quote(path) for path in config_data["include_paths"] + if os.path.isdir(path) or path.endswith(".py")]) + os.system.assert_called_with("radon cc ./tests/test_dir1 ./tests/test_dir2.py -na --codeclimate") + +def test_engine_no_config(mocker): + mocker.patch("os.path.exists", return_value=False) + mocker.patch("os.system") + del os.environ["RADONFILESENCODING"] + + engine = Engine() + engine.run() + + assert "RADONFILESENCODING" not in os.environ + + os.system.assert_called_with("radon cc . -nb --codeclimate") diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 2b57d5b..0000000 --- a/tox.ini +++ /dev/null @@ -1,7 +0,0 @@ -[tox] -envlist = py27,py33,py34,py35,py36,pypy - -[testenv] -deps = -r{toxinidir}/test_requirements.txt -commands = python radon/tests/run.py -downloadcache = build