pax_global_header00006660000000000000000000000064145474712260014526gustar00rootroot0000000000000052 comment=46701fd4afde46fff767754e263240e83460ac50 sphinxcontrib-bibtex-2.6.2/000077500000000000000000000000001454747122600157025ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/.coveragerc000066400000000000000000000002231454747122600200200ustar00rootroot00000000000000[run] branch = True source = test,sphinxcontrib [report] exclude_lines = pragma: no cover if TYPE_CHECKING: raise NotImplementedError sphinxcontrib-bibtex-2.6.2/.flake8000066400000000000000000000002321454747122600170520ustar00rootroot00000000000000[flake8] exclude = .git,.mypy_cache,.pytest_cache,__pycache__,build,data,dist,htmlcov,venv* max-complexity = 10 max-line-length = 88 extend-ignore = E203 sphinxcontrib-bibtex-2.6.2/.github/000077500000000000000000000000001454747122600172425ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/.github/workflows/000077500000000000000000000000001454747122600212775ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/.github/workflows/build.yml000066400000000000000000000060261454747122600231250ustar00rootroot00000000000000name: build on: push: branches: [ develop ] pull_request: branches: [ develop ] jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: ['3.8', '3.9', '3.10', '3.11'] pip-sphinx: ['sphinx'] pytest-options: [''] include: # python 3.7 (needs older docutils and jinja2) - python-version: '3.7' pip-sphinx: '"docutils<0.18" "jinja2<3.1"' pytest-options: '' # numpydoc tests - python-version: '3.11' pip-sphinx: 'sphinx https://github.com/numpy/numpydoc/archive/refs/heads/master.zip' pytest-options: '-m "numpydoc"' # rinohtype tests - python-version: '3.11' pip-sphinx: 'sphinx https://github.com/brechtm/rinohtype/archive/refs/heads/master.zip' pytest-options: '-m "rinohtype"' # cython tests - python-version: '3.11' pip-sphinx: 'sphinx test/some_cython_module' pytest-options: '-m "cython"' # latest of sphinx 3.x series (released for Python 3.9) - python-version: '3.9' pip-sphinx: '"sphinx<4" "jinja2<3.1"' pytest-options: '' # latest of sphinx 4.x series (released for Python 3.10) - python-version: '3.10' pip-sphinx: '"sphinx<5"' pytest-options: '' # latest of sphinx 5.x series - python-version: '3.11' pip-sphinx: '"sphinx<6"' pytest-options: '' # latest of sphinx 6.x series - python-version: '3.11' pip-sphinx: '"sphinx<7"' pytest-options: '' steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install pytest codecov coverage python -m pip install . sphinx-autoapi ${{ matrix.pip-sphinx }} - name: Install extra dependencies run: | python -m pip install flake8 check-manifest mypy types-setuptools types-docutils if: matrix.pip-sphinx == 'sphinx' && matrix.python-version == '3.11' - name: Check manifest run: | check-manifest if: matrix.pip-sphinx == 'sphinx' && matrix.python-version == '3.11' - name: Lint with flake8 run: | flake8 . --count --select=E9,F63,F7,F82 --show-source flake8 . --count --max-complexity=10 if: matrix.pip-sphinx == 'sphinx' && matrix.python-version == '3.11' - name: Type checking with mypy run: mypy if: matrix.pip-sphinx == 'sphinx' && matrix.python-version == '3.11' - name: Documentation run: | pushd doc && make html && popd if: matrix.pip-sphinx == 'sphinx' && matrix.python-version == '3.11' - name: Test with pytest run: | coverage run -m pytest ${{ matrix.pytest-options }} codecov sphinxcontrib-bibtex-2.6.2/.github/workflows/release.yml000066400000000000000000000020611454747122600234410ustar00rootroot00000000000000name: release on: push: branches: - develop tags: - '**' jobs: release: if: github.repository == 'mcmtroffaes/sphinxcontrib-bibtex' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: 3.x - name: Install dependencies run: | python -m pip install -U pip python -m pip install -U setuptools twine wheel build - name: Build package run: | python -m build --sdist --wheel twine check dist/* - name: Publish to Test PyPI if: ${{ !startsWith(github.ref, 'refs/tags') }} uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ - name: Publish to PyPI if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} sphinxcontrib-bibtex-2.6.2/.gitignore000066400000000000000000000002221454747122600176660ustar00rootroot00000000000000*~ *.pyc /.noseids /.coverage /nosetests.xml /doc/_build/ /.pytest_cache/ /.mypy_cache/ /venv*/ /htmlcov/ /.idea/ /src/*.egg-info/ /dist/ /build/ sphinxcontrib-bibtex-2.6.2/CHANGELOG.rst000066400000000000000000000503421454747122600177270ustar00rootroot000000000000002.6.2 (10 January 2023) ----------------------- * Fix bibliography header repetition when recompiling documents (reported by ragonneau, see issue #342 and pull request #343). 2.6.1 (27 August 2023) ---------------------- * The ``:cite:alp:`` role in the super style now also suppresses the sup tag in addition to the brackets, to make it easier to apply the necessary formatting around the citation. 2.6.0 (24 August 2023) ---------------------- * Pre- and post-text in citations are now supported for the author_year, label, and super referencing styles. The syntax is ``:cite:p:`{pre-text}key{post-text}``` (requested by RobertoBagnara, see issue #288 and pull request #316). Refer to the documentation for more details. * New alternative style citations are now supported for the author_year, label, and super parenthetical referencing styles, which are identical to parenthetical citations but without the brackets. The syntax is ``:cite:alp:`key``` (requested by davidorme, see pull request #316). Refer to the documentation for more details. * Exclude docutils 0.18 and 0.19 to fix generation of a spurious div tag in the html builder (see issues #330, #329, #323, #322, #309). * Add test for running the extension on Cython modules (see issue #308). * Add test for running the extension with autoapi (see issue #319). * Sphinx versions 2.x (and lower) are no longer supported. New minimum required version of Sphinx is 3.5. * Running pytest without arguments will now by default skip all marked tests that require additional dependencies (currently numpydoc, rinohtype, and cython). * Fix encoding issues when running tests on Windows. * Python 3.6 is EOL and is therefore no longer officially supported. 2.5.0 (22 August 2022) ---------------------- * Add support for the rinohtype builder (reported by brechtm, see issue #275). * Migrate from ``pkg_resources`` to ``importlib.metadata``. A side effect of this migration is that **plugins registered at runtime are longer exposed as entry points**. This is because ``importlib`` does not allow runtime modification of entry points. * Remove sphinxcontrib namespace ``__init__.py`` file (no longer needed for Python 3.3+ by PEP420). * Add support for docutils 0.18. * Suppress LaTeX url commands in tooltips (see issue #305, reported by 1kastner). * Document Markdown syntax for MyST (suggested by jacopok, see issue #310). 2.4.2 (10 April 2022) --------------------- * Add support for Python 3.10 and 3.11. * New ``bibtex_tooltips`` option. Set to ``False`` to disable tooltip generation. See issue #286. * New ``bibtex_tooltips_style`` option to customize tooltip text style. If empty (the default), the bibliography style is used. See issue #286. * Support for ``root_doc`` option introduced in Sphinx 4.0 (see issue #292, reported by jhmeinke). * Use container node instead of paragraph node for containing bibliographies, fixing a violation against the docutils spec (see issue #273, reported by rappdw, with additional input from brechtm). * Fix mutable dataclass fields for Python 3.11 (see issue #284 and pull request #285; reported and fixed by jamesjer) * Internal refactor: embed ``reference_text_class`` directly inside the pybtex nodes. This enables different text classes to be used by different styles, so different sorts of docutils nodes can be generated on rendering depending on the pybtex node used. See discussion in issue #275. * Add numpydoc regression test. * Bump minimal pybtex requirement to 0.24. 2.4.1 (10 September 2021) ------------------------- * Gracefully handle textual citations when author or year are missing (see issue #267, reported by fbkarsdorp). 2.4.0 (8 September 2021) ------------------------ * Allow specific warnings to be suppressed (see issue #255, contributed by stevenrhall). * Fix parsing of LaTeX url commands in bibtex fields (see issue #258, reported by Matthew Giassa). * Remove space between footnote and author for textual footnote citations in the default foot referencing style. * Document how to use a backslash escaped space to suppress space before footnotes (see issue #256, reported by hagenw). * Parse all bib files together, so macros specified in one file can be used in another file (see issue #216, reported by mforbes). As a consequence, duplicate citation keys across bib files will now also result in proper warnings. The ``parse_bibfile`` and ``process_bibfile`` functions have been been replaced by ``parse_bibdata`` and ``process_bibdata`` in the API. * New ``bibtex_cite_id``, ``bibtex_footcite_id``, ``bibtex_bibliography_id``, and ``bibtex_footbibliography_id`` settings, which allow custom ids (which can be used as html anchors) to be generated for citations and bibliographies, based on the citation keys rather than some random numbers (see issue #264, reported by kmuehlbauer). Refer to the documentation for detailed usage and examples. * Switch to github actions for regression testing. * The API is now fully type checked. * Various minor improvements in documentation and code. 2.3.0 (1 June 2021) ------------------- * Add ``:footcite:p:`` and ``:footcite:t:`` roles. For capitalizing the first letter and/or listing the full author list, you can use ``:footcite:ct:``, ``:footcite:ts:``, ``:footcite:cts:``, and ``:footcite:ps:``. * To configure your footnote referencing style, an optional config setting ``bibtex_foot_reference_style`` has been added. If not specified, this defaults to the ``foot`` style, which will use plain footnote references for citation references, matching the referencing style as in previous versions. Footnote reference styles can be fully customized to your heart's desire, similar to regular citation reference styles. * New ``:cite:empty:`` role which registers a citation without generating a reference, similar to LaTeX's nocite command (see issue #131). * Citation keys can now be listed directly under the bibliography directive, one key per line; such citations will always be included, regardless of any filter settings (see issue #54). * A plain text preview of the full citation information will be shown when hovering over a citation reference (see issue #198, requested by eric-wieser). * The separator between the text and the reference of all textual citation styles can now be customized. 2.2.1 (16 May 2021) ------------------- * The LaTeX output now uses hyperlink instead of sphinxcite. This fixes issues with double brackets and other mismatches between LaTeX and HTML outputs (see issue #244 reported by zhi-wang). * The setup function now also returns the version of the extension (see issue #239 reported by lcnittl). 2.2.0 (5 March 2021) -------------------- * Support the ``:any:`` role (see issue #232). * New natbib/biblatex inspired roles for textual and parenthetical citation references (see issue #203 reported by matthew-brett). For textual citation references, use ``:cite:t:`` and for parenthetical citation references, use ``:cite:p:``. The old ``:cite:`` role is an alias for ``:cite:p:``. * Use the ``s`` suffix to include the full author list rather than abbreviating it with "et al.": ``:cite:ts:``, ``:cite:ps:``. * For textual citation references, use the ``c`` prefix to capitalize the first letter: ``:cite:ct:``, ``:cite:cts:``. * New natbib inspired roles for citing just the author, year, or label, optionally with brackets, and optionally capitalizing the first letter of the author: ``:cite:author:``, ``:cite:authorpar:``, ``:cite:cauthor:``, ``:cite:cauthorpar:`` ``:cite:year:``, ``:cite:yearpar:``, ``:cite:label:``, ``:cite:labelpar:`` (see issue #71 reported by bk322). * To configure your referencing style, an optional config setting ``bibtex_reference_style`` has been added. If not specified, this defaults to the ``label`` style, which will use the label to format citation references, matching the referencing style as in previous versions. The other style currently available is ``author_year``, for author-year style referencing. * Reference styles can be fully customized to your heart's desire (see issue #203 reported by amichuda). They are based on pybtex's template system, which was already used for customizing bibliography styles. Refer to the user documentation for examples, and to the API documentation for full details. * Other packages can register custom reference styles through entry points. Refer to the user documentation for details. * Propagate pybtex FieldIsMissing exception as a warning (see issue #235 reported by Zac-HD). 2.1.4 (8 January 2021) ---------------------- * Fix ValueError exception when having citations from orphans (see issue #228, reported by VincentRouvreau). 2.1.3 (1 January 2021) ---------------------- * Sphinx 2.1 or later is now formally required (up from 2.0). * Fix unresolved references when running the latex build immediately after the html build, or when rerunning the html build after deleting the generated html files without deleting the pickled doctrees/environment (see issue #226, reported by skirpichev). * No longer insert user defined header for bibliography directives if there are no citations in it. * Warnings now consistently provide source file and line number of where the issue originated. * Simpler and faster implementation of footcite and footbibliography. * Improved type annotations throughout the API, now using forward declarations where possible. 2.1.2 (30 December 2020) ------------------------ * Fix KeyError exception when building documents with footbibliography directives but without any footnotes needing to be generated for this directive (see issue #223, reported by drammock). 2.1.1 (29 December 2020) ------------------------ * Fix latex builder KeyError exception (see issue #221, reported by jedbrown). * Fix citation references across documents in latex build. 2.1.0 (28 December 2020) ------------------------ * The extension no longer relies on the ``bibtex.json`` method. Instead, the extension now postpones identifying all citation cross-references to Sphinx's consistency check phase. The actual citation references and bibliography citations are then generated in the resolve phase using post-transforms. As a result, ``bibtex.json`` is no longer needed and thus Sphinx no longer needs to run twice as in the past if the file did not exist (closes issues #214 and #215). *Thanks to everyone who chimed in on this, especially everyone who made helpful suggestions to find better implementation approaches, and everyone who helped with testing.* * Citations with multiple keys will now reside in the same bracket (closes issue #94). * Consistent use of doctutils note_explicit_target to set ids, to ensure no clashing ids. * Improved and robustified test suite, using regular expressions to verify generated html. * The test suite now includes a patched version of the awesome but abandoned sphinx-natbib extension, to help comparing and testing implementations and features. The long term intention is to fully support sphinx-natbib style citations. * **BACKWARD INCOMPATIBLE** The API has been refactored to accommodate the new design. Refer to the API documentation for details. 2.0.0 (12 December 2020) ------------------------ * There is a new ``footcite`` role and a new ``footbibliography`` directive, to allow easy and simple local (per document) bibliographies through footnotes. See issues #184 and #185. * Parallel builds are now finally supported. See issues #80, #96, and #164, as well as pull request #210. * **BACKWARD INCOMPATIBLE** To enable parallel builds, a new mandatory config setting ``bibtex_bibfiles`` has been added. This setting specifies all bib files used throughout the project, relative to the source folder. * **BACKWARD INCOMPATIBLE** The encoding of bib files has been moved to an optional config setting ``bibtex_encoding``. The ``:encoding:`` option is no longer supported. * Headers for ``bibliography`` and ``footbibliography`` directives can be configured via the ``bibtex_bibliography_header`` and ``bibtex_footbibliography_header`` config setting. * The ``bibliography`` directive no longer requires the bib files to be specified as an argument. However, if you do, citations will be constrained to those bib files. * Support newlines/whitespace around cite keys when multiple keys are specified. Thanks to dizcza for help with testing. See issue #205 and pull request #206. * Improve citation ordering code (reported by ukos-git, see issue #182). * The unresolved citations across documents issue has been resolved. The extension stores all citation information in a ``bibtex.json`` file. If it does not exist, the file will be created on your first sphinx build, and you will have to rerun the build to make use of it. The file is automatically kept up to date, with a warning whenever you need to rerun the build. Thanks to dizcza for help with testing. See issues #197 and #204. Also see pull request #208. * Migrate test suite to pytest, using sphinx's testing fixtures. * **BACKWARD INCOMPATIBLE** The API has been refactored. Some functions have moved to different modules. Refer to the API documentation for details. * Drop Python 3.5 support. * Add Python 3.9 support. 1.0.0 (20 September 2019) ------------------------- * Drop Python 2.7 and 3.4 support (as upstream sphinx has dropped support for these as well). * Add Python 3.8 support (contributed by hroncok). * Update for Sphinx 2.x, and drop Sphinx 1.x support (as there is too much difference between the two versions). * Non-bibtex citations will now no longer issue warnings (fix contributed by chrisjsewell). * Switch to codecov for coverage reporting. 0.4.2 (7 January 2018) ---------------------- * Drop Python 3.3 support, add Python 3.7 support. * Work around issue with sphinx-testing on Fedora (reported by jamesjer in issue #157, fix contributed by mitya57 in pull request #158). 0.4.1 (28 November 2018) ------------------------ * Disable tinkerer test due to upstream bug. * Remove crossref test due to changed upstream behaviour in pybtex. * Fix latex test to match new upstream code generation. * Fix documentation of encoding option (contributed by Kai Mühlbauer). * Migrate to sphinx.util.logging in favour of old deprecated logging method. 0.4.0 (19 April 2018) --------------------- * Remove latexcodec and curly bracket strip functionality, as this is now supported by pybtex natively (see issue #127, reported by erosennin). * Fix tests failures with Sphinx 1.7 (see pull request #136, reported and fixed by mitya57). 0.3.6 (25 September 2017) ------------------------- * Real fix for issue #111 (again reported by jamesjer). * Fix test regressions due to latest Sphinx updates (see issues #115, #120, #121, and #122, reported by ndarmage and ghisvail). * Fix test regressions on ascii locale (see issue #121, reported by ghisvail). * Support and test Python 3.6. 0.3.5 (22 February 2017) ------------------------ * Fix extremely high memory usage when handling large bibliographies (reported by agjohnson, see issue #102). * Fix tests for Sphinx 1.5.1 (see issue #111, reported by jamesjer). 0.3.4 (20 May 2016) ------------------- * Document LaTeX workaround for ``:cite:`` in figure captions (contributed by xuhdev, see issue #92 and pull request #93). * Add ``bibtex_default_style`` config value to override the default bibliography style (see issue #91 and pull request #97). * Support Python 3.5 (see issue #100). 0.3.3 (23 October 2015) ----------------------- * Add per-bibliography key prefixes, enabling local bibliographies to be used in isolation from each other (see issue #87, reported by marscher). * Documentation now points to new location of pybtex on bitbucket. * Simplified testing code by using the new sphinx_testing package. 0.3.2 (20 March 2015) --------------------- * Document how to create custom label styles (see issue #77, reported by tino). * Disable parallel_read_safe for Sphinx 1.3 and later (see issue #80, reported by andreacassioli). 0.3.1 (10 July 2014) -------------------- * Fix for ``type_.lower()`` bug: pybtex 0.18 expects type to be a string (this fixes issue #68 reported by jluttine). 0.3.0 (4 May 2014) ------------------ * **BACKWARD INCOMPATIBLE** The alpha style is now default, so citations are labelled in a way that is more standard for Sphinx. To get the old behaviour back, add ``:style: plain`` to your bibliography directives. * **BACKWARD INCOMPATIBLE** :meth:`~sphinxcontrib.bibtex.cache.Cache.is_cited` has been removed. Use :meth:`~sphinxcontrib.bibtex.cache.Cache.get_cited_docnames` instead, which will return an empty list for keys that are not cited. * Improved support for local bibliographies (see issues #52, #62, and #63; test case provided by Boris Kheyfets): - New ``docname`` and ``docnames`` filter identifiers. - Filter expressions now also support set literals and the operators ``in``, ``not in``, ``&``, and ``|``. See documentation for details. * Multiple comma-separated citation keys per cite command (see issue #61, suggested by Boris Kheyfets). * Add support for pypy and Python 3.4. * Drop support for Python 2.6 and Python 3.2. * Drop 2to3 and instead use six to support both Python 2 and 3 from a single code base. * Simplify instructions for custom styles. * Various test suite improvements. 0.2.9 (9 October 2013) ---------------------- * Upgrade to the latest pybtex-docutils to produce more optimal html output (specifically: no more nested ````\ s). * Remove latex codec code, and rely on latexcodec package instead. * :class:`FilterVisitor` has been removed from the public API. Use :meth:`~sphinxcontrib.bibtex.cache.Cache.get_bibliography_entries` instead. * Fix upstream Sphinx bug concerning LaTeX citation hyperlinks (contributed by erikb85; see pull request #45). * Fix most pylint warnings, refactor code. 0.2.8 (7 August 2013) --------------------- * Use pybtex-docutils to remove dependency on pybtex.backends.doctree. 0.2.7 (4 August 2013) --------------------- * Integrate with coveralls.io, first release with 100% test coverage. * Minor bug fixes and code improvements. * Remove ordereddict dependency for Python 2.7 and higher (contributed by Paul Romano, see pull requests #27 and #28). * New ``:filter:`` option for advanced filtering (contributed by d9pouces, see pull requests #30 and #31). * Refactor documentation of advanced features. * Document how to create custom pybtex styles (see issues #25, #29, and #34). * Code is now mostly pep8 compliant. 0.2.6 (2 March 2013) -------------------- * For unsorted styles, citation entries are now sorted in the order they are cited, instead of following the order in the bib file, to reflect more closely the way LaTeX handles unsorted styles (addresses issue #15). * Skip citation label warnings on Sphinx [source] links (issue #17, contributed by Simon Clift). 0.2.5 (18 October 2012) ----------------------- * Duplicate label detection (issue #14). * New ``:labelprefix:`` option to avoid duplicate labels when having multiple bibliographies with a numeric label style (addresses issue #14). 0.2.4 (24 August 2012) ---------------------- * New options for the bibliography directive for rendering the bibliography as bullet lists or enumerated lists: ``:list:``, ``:enumtype:``, and ``:start:``. * Minor latex codec fixes. * Turn exception into warning when a citation cannot be relabeled (fixes issue #2). * Document LaTeX encoding, and how to turn it off (issue #4). * Use pybtex labels (fixes issue #6 and issue #7). * Cache tracked citation keys and labels, and bibliography enumeration counts (fixes issues with citations in repeated Sphinx runs). * Bibliography ids are now unique across documents (fixes issue that could cause the wrong bibliography to be inserted). * The plain style is now the default (addresses issue #9). 0.2.3 (30 July 2012) -------------------- * Document workaround for Tinkerer (issue #1). * Use tox for testing. * Full 2to3 compatibility. * Document supported versions of Python (2.6, 2.7, 3.1, and 3.2). 0.2.2 (6 July 2012) ------------------- * Documentation and manifest fixes. 0.2.1 (19 June 2012) -------------------- * First public release. sphinxcontrib-bibtex-2.6.2/LICENSE.rst000066400000000000000000000025541454747122600175240ustar00rootroot00000000000000| sphinxcontrib-bibtex is a Sphinx extension for BibTeX style citations | Copyright (c) 2011-2021 by Matthias C. M. Troffaes | All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. sphinxcontrib-bibtex-2.6.2/MANIFEST.in000066400000000000000000000005121454747122600174360ustar00rootroot00000000000000include README.rst include CHANGELOG.rst include LICENSE.rst include requirements.txt include mypy.ini include pytest.ini include .coveragerc include .flake8 recursive-include src *.py py.typed recursive-include doc * recursive-include test * global-exclude *.pyc exclude .gitignore exclude release_checklist.txt prune doc/_build sphinxcontrib-bibtex-2.6.2/README.rst000066400000000000000000000111351454747122600173720ustar00rootroot00000000000000sphinxcontrib-bibtex ==================== |ci| |codecov| |version| |license| Sphinx extension for BibTeX style citations. Overview -------- The bibtex extension allows `BibTeX `_ citations to be inserted into documentation generated by `Sphinx `_, via a ``bibliography`` directive, along with ``:cite:p:`` and ``:cite:t:`` roles. These work similarly to LaTeX's ``thebibliography`` environment and the ``\citet`` and ``\citep`` commands. For formatting, the extension relies on `pybtex `_ written by Andrey Golovizin. The extension is inspired by Matthew Brett's `bibstuff.sphinxext.bibref `_ and Weston Nielson's `sphinx-natbib `_. * Download: https://pypi.org/project/sphinxcontrib-bibtex/#files * Documentation: https://sphinxcontrib-bibtex.readthedocs.io/en/latest/ * Development: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/ .. |ci| image:: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/actions/workflows/build.yml/badge.svg :target: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/actions/workflows/build.yml :alt: ci .. |codecov| image:: https://codecov.io/gh/mcmtroffaes/sphinxcontrib-bibtex/branch/develop/graph/badge.svg :target: https://app.codecov.io/gh/mcmtroffaes/sphinxcontrib-bibtex :alt: codecov .. |version| image:: https://img.shields.io/pypi/v/sphinxcontrib-bibtex.svg :target: https://pypi.org/project/sphinxcontrib-bibtex/ :alt: latest version .. |license| image:: https://img.shields.io/pypi/l/sphinxcontrib-bibtex.svg :target: https://pypi.org/project/sphinxcontrib-bibtex/ :alt: license Installation ------------ Install the module with ``pip install sphinxcontrib-bibtex``, or from source using ``pip install -e .``. Then add: .. code-block:: python extensions = ['sphinxcontrib.bibtex'] bibtex_bibfiles = ['refs.bib'] to your project's Sphinx configuration file ``conf.py``. Installation with ``python setup.py install`` is discouraged due to potential issues with the sphinxcontrib namespace. Minimal Example --------------- In your project's documentation, you can use ``:cite:t:`` for textual citation references, ``:cite:p:`` for parenthetical citation references, and ``.. bibliography::`` for inserting the bibliography. For `example `_: .. code-block:: rest See :cite:t:`1987:nelson` for an introduction to non-standard analysis. Non-standard analysis is fun :cite:p:`1987:nelson`. .. bibliography:: where ``refs.bib`` would contain an entry:: @Book{1987:nelson, author = {Edward Nelson}, title = {Radically Elementary Probability Theory}, publisher = {Princeton University Press}, year = {1987} } In the default style, this will get rendered as: See Nelson [Nel87a]_ for an introduction to non-standard analysis. Non-standard analysis is fun [Nel87a]_. .. [Nel87a] Edward Nelson. *Radically Elementary Probability Theory*. Princeton University Press, 1987. Citations in sphinx are resolved globally across all documents. Typically, you have a single ``bibliography`` directive across your entire project which collects all citations. Advanced use cases with multiple ``bibliography`` directives across your project are also supported, but some care needs to be taken from your end to avoid duplicate citations. In contrast, footnotes in sphinx are resolved locally per document. To achieve local bibliographies per document, you can use citations represented by footnotes as follows: .. code-block:: rest See :footcite:t:`1987:nelson` for an introduction to non-standard analysis. Non-standard analysis is fun\ :footcite:p:`1987:nelson`. .. footbibliography:: which will get rendered as: See Nelson\ [#Nel87b]_ for an introduction to non-standard analysis. Non-standard analysis is fun\ [#Nel87b]_. .. [#Nel87b] Edward Nelson. *Radically Elementary Probability Theory*. Princeton University Press, 1987. Note the use of the `backslash escaped space `_ to suppress the space that would otherwise precede the footnote. Typically, you have a single ``footbibliography`` directive at the bottom of each document that has footnote citations. Advanced use cases with multiple ``footbibliography`` directives per document are also supported. Since everything is local, there is no concern with duplicate citations when using footnotes. sphinxcontrib-bibtex-2.6.2/doc/000077500000000000000000000000001454747122600164475ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/doc/Makefile000066400000000000000000000127631454747122600201200ustar00rootroot00000000000000# 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/sphinxcontrib-bibtex.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/sphinxcontrib-bibtex.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/sphinxcontrib-bibtex" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/sphinxcontrib-bibtex" @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." sphinxcontrib-bibtex-2.6.2/doc/api.rst000066400000000000000000000003421454747122600177510ustar00rootroot00000000000000Extension API ~~~~~~~~~~~~~ .. toctree:: :maxdepth: 2 api/interface api/roles api/nodes api/directives api/transforms api/domains api/bibfile api/referencing api/plugin api/pybtex sphinxcontrib-bibtex-2.6.2/doc/api/000077500000000000000000000000001454747122600172205ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/doc/api/bibfile.rst000066400000000000000000000001021454747122600213370ustar00rootroot00000000000000Bib Files ========= .. automodule:: sphinxcontrib.bibtex.bibfile sphinxcontrib-bibtex-2.6.2/doc/api/directives.rst000066400000000000000000000002261454747122600221130ustar00rootroot00000000000000New Docutils Directives ======================= .. automodule:: sphinxcontrib.bibtex.directives .. automodule:: sphinxcontrib.bibtex.foot_directives sphinxcontrib-bibtex-2.6.2/doc/api/domains.rst000066400000000000000000000001661454747122600214070ustar00rootroot00000000000000New Domains =========== .. automodule:: sphinxcontrib.bibtex.domain .. automodule:: sphinxcontrib.bibtex.foot_domain sphinxcontrib-bibtex-2.6.2/doc/api/interface.rst000066400000000000000000000001101454747122600217020ustar00rootroot00000000000000Sphinx Interface ================ .. automodule:: sphinxcontrib.bibtex sphinxcontrib-bibtex-2.6.2/doc/api/nodes.rst000066400000000000000000000001221454747122600210550ustar00rootroot00000000000000New Docutils Nodes ================== .. automodule:: sphinxcontrib.bibtex.nodes sphinxcontrib-bibtex-2.6.2/doc/api/plugin.rst000066400000000000000000000001121454747122600212420ustar00rootroot00000000000000Plugins ======= .. automodule:: sphinxcontrib.bibtex.plugin :members: sphinxcontrib-bibtex-2.6.2/doc/api/pybtex.rst000066400000000000000000000005261454747122600212700ustar00rootroot00000000000000Pybtex Extensions ================= New Text Elements ----------------- .. automodule:: sphinxcontrib.bibtex.richtext :members: New Template Nodes ------------------ .. automodule:: sphinxcontrib.bibtex.style.template :members: New Names Styles ---------------- .. automodule:: sphinxcontrib.bibtex.style.names.last :members: sphinxcontrib-bibtex-2.6.2/doc/api/referencing.rst000066400000000000000000000032061454747122600222420ustar00rootroot00000000000000Referencing Styles ================== Base Classes For Composing Styles --------------------------------- .. automodule:: sphinxcontrib.bibtex.style.referencing :members: Basic Styles ------------ Basic styles that support both textual and parenthetical citations. Should provide roles with names ``p``, ``ps``, ``t``, ``ts``, ``ct``, and ``cts``. Here, ``t`` stands for textual and ``p`` for parenthetical. The ``c`` prefix causes the first letter to be capitalized, and the ``s`` suffix causes all authors to be named rather than shortening the list using "et al." or some other suffix as specified by the style. .. automodule:: sphinxcontrib.bibtex.style.referencing.basic_label :members: .. automodule:: sphinxcontrib.bibtex.style.referencing.basic_author_year :members: Extra Styles ------------ For styles providing additional roles, e.g. for citations that specifically use the label, the author, the year, etc. The convention for these styles is to have one role for producing whichever text needs to be had, and to have a ``par`` suffix in the role name if the citation text needs to be embedded in brackets (for example ``label`` and ``labelpar``). .. automodule:: sphinxcontrib.bibtex.style.referencing.extra_label :members: .. automodule:: sphinxcontrib.bibtex.style.referencing.extra_author :members: .. automodule:: sphinxcontrib.bibtex.style.referencing.extra_year :members: Full Styles ----------- For styles that combine a basic style with one or more extra styles. .. automodule:: sphinxcontrib.bibtex.style.referencing.label :members: .. automodule:: sphinxcontrib.bibtex.style.referencing.author_year :members: sphinxcontrib-bibtex-2.6.2/doc/api/roles.rst000066400000000000000000000001601454747122600210730ustar00rootroot00000000000000New Roles ========= .. automodule:: sphinxcontrib.bibtex.roles .. automodule:: sphinxcontrib.bibtex.foot_roles sphinxcontrib-bibtex-2.6.2/doc/api/transforms.rst000066400000000000000000000001171454747122600221470ustar00rootroot00000000000000New Transforms ============== .. automodule:: sphinxcontrib.bibtex.transforms sphinxcontrib-bibtex-2.6.2/doc/changes.rst000066400000000000000000000000761454747122600206140ustar00rootroot00000000000000:tocdepth: 1 Changes ======= .. include:: ../CHANGELOG.rst sphinxcontrib-bibtex-2.6.2/doc/conf.py000066400000000000000000000012451454747122600177500ustar00rootroot00000000000000import re needs_sphinx = "2.1" extensions = [ "sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.coverage", "sphinx.ext.viewcode", ] master_doc = "index" project = "sphinxcontrib-bibtex" copyright = "2011-2023, Matthias C. M. Troffaes" with open("../src/sphinxcontrib/bibtex/__init__.py", "rt") as version_file: release = re.search('"version": "(.+)"', version_file.read()).group(1) version = ".".join(release.split(".")[:2]) exclude_patterns = ["_build"] pygments_style = "sphinx" intersphinx_mapping = { "python": ("https://docs.python.org/3/", None), "sphinx": ("http://www.sphinx-doc.org/en/master/", None), } html_theme = "alabaster" sphinxcontrib-bibtex-2.6.2/doc/index.rst000066400000000000000000000005271454747122600203140ustar00rootroot00000000000000Welcome to sphinxcontrib-bibtex's documentation! ================================================ :Release: |release| :Date: |today| Contents -------- .. toctree:: :maxdepth: 2 quickstart usage api changes license related Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` sphinxcontrib-bibtex-2.6.2/doc/license.rst000066400000000000000000000000561454747122600206240ustar00rootroot00000000000000License ======= .. include:: ../LICENSE.rst sphinxcontrib-bibtex-2.6.2/doc/make.bat000066400000000000000000000120041454747122600200510ustar00rootroot00000000000000@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\sphinxcontrib-bibtex.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\sphinxcontrib-bibtex.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 sphinxcontrib-bibtex-2.6.2/doc/quickstart.rst000066400000000000000000000001161454747122600213710ustar00rootroot00000000000000Getting Started =============== .. include:: ../README.rst :start-line: 7 sphinxcontrib-bibtex-2.6.2/doc/related.rst000066400000000000000000000027061454747122600206260ustar00rootroot00000000000000Related Projects ================ Below is a list of projects which include functionality that is similar or related to sphinxcontrib-bibtex. If you know of any other, leave a message on the issue tracker. * Andrey Golovizin's `pybtex `_, a general purpose Python library for working with bibtex files. Drives sphinxcontrib-bibtex. * Matthew Brett's `bibstuff `_. Includes a Sphinx extension similar to sphinxcontrib-bibtex, as well as an assorted collection of bibtex tools. This is a fork of Dylan W. Schwilk and Alan G. Isaac's `dschwilk/bibstuff `_. * Weston Nielson's sphinx-natbib. This extension is similar to sphinxcontrib-bibtex, and aims to support `natbib `_ style citations. Sadly, sphinx-natbib appears no longer maintained and the original repository is no longer available. A `patched version of sphinx-natbib `_, with various bug fixes, is maintained in the test suite of sphinxcontrib-bibtex, for the purpose of comparison. Additionally, a few forks of the original repository can be `found on github `_. * Jeff Terrace's Sphinx Thesis Resource `sphinxtr `_, is a fork of Sphinx which includes a fork of sphinx-natbib. sphinxcontrib-bibtex-2.6.2/doc/usage.rst000066400000000000000000001027461454747122600203170ustar00rootroot00000000000000Usage ===== Configuration ------------- Bibliography Files and Encoding ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.0.0 To configure the extension, in your ``conf.py`` file, set ``bibtex_bibfiles`` to your list of bib files. For instance, a minimal configuration may look as follows: .. code-block:: python extensions = ['sphinxcontrib.bibtex'] bibtex_bibfiles = ['refs.bib'] In bib files, LaTeX control characters are automatically converted to unicode characters (for instance, to convert ``\'e`` into ``é``). Be sure to write ``\%`` when you intend to format a percent sign. You can set the encoding of the bibliography files, using the ``bibtex_encoding`` variable in your ``conf.py``. If no encoding is specified, ``utf-8-sig`` is assumed. For example: .. code-block:: python bibtex_encoding = 'latin' Bibliography Style ~~~~~~~~~~~~~~~~~~ You can change the bibliography style, using the ``bibtex_default_style`` variable in your ``conf.py``. If none is specified, the ``alpha`` style is used. Other supported styles are ``plain``, ``unsrt``, and ``unsrtalpha``. Note that these four styles are identical except for labelling and sorting. For example: .. code-block:: python bibtex_default_style = 'unsrt' You can also create your own style (see :ref:`bibtex-custom-formatting`). Referencing Style ~~~~~~~~~~~~~~~~~ .. versionadded:: 2.2.0 You can change the inline referencing style (i.e. the formatting of the citation references themselves) using the ``bibtex_reference_style`` variable in your ``conf.py``. Currently available built-in styles are: * ``label``: Use the labels generated by the bibliography style. Similar to natbib's ``numbers`` style and biblatex's ``numeric`` and ``alphabetic`` styles (depending on the labelling style of your bibliography style). This is the default style. * ``author_year``: Use the author and year. Similar to natbib's and biblatex's ``authoryear`` style. Note that this does not remove labels from bibliographies. This is because, in docutils, every citation must have a label. * ``super``: Use the labels generated by the bibliography style as superscripts. This works best with numeric bibliography styles such as ``plain``. Similar to natbib's ``super`` style and biblatex's ``\supercite`` command. The inline referencing style for footnote citations can be configured through the ``bibtex_foot_reference_style`` variable in your ``conf.py``. Currently available built-in styles are: * ``foot``: Use footnotes for parenthetical citations, and author with footnote for textual citations. This is the default style (and currently also the only built-in style). Python packages can make new styles available through the ``sphinxcontrib.bibtex.style.referencing`` `entry point `_ group. See sphinxcontrib-bibtex's own ``setup.py`` script for examples. Tooltips ~~~~~~~~ .. versionadded:: 2.4.2 The extension will generate plain text tooltips for citation references, via the html *title* attribute, to allow a preview of the citation by hovering over the citation reference. To disable these tooltips, set ``bibtex_tooltips`` to ``False``. By default, the bibliography style is used to format the tooltips. You can set the ``bibtex_tooltips_style`` option to use a different style. Roles and Directives -------------------- .. rst:role:: cite:p .. versionadded:: 2.2.0 Create a parenthetical citation reference to a bibliographic entry. This will put the citation reference information (author and year, or label, depending on the style) between brackets. Similar to natbib's ``\citep`` command, or biblatex's ``\parencite`` command. For example: .. code-block:: rest We will make use of non-standard analysis :cite:p:`1987:nelson`. which would be equivalent to the following LaTeX code: .. code-block:: latex We will make use of non-standard analysis \citep{1987:nelson}. Multiple keys can be specified at once: .. code-block:: rest I love analysis :cite:p:`1987:nelson,2001:schechter`! .. rst:role:: cite:t .. versionadded:: 2.2.0 Create a textual citation. This will typically render the name of the first author followed by the year or by the label, depending on the citation reference style. Similar to natbib's ``\citet`` command, or biblatex's ``\textcite`` command. For example: .. code-block:: rest See :cite:t:`1987:nelson` for an introduction to non-standard analysis. which would be equivalent to the following LaTeX code: .. code-block:: latex See \citet{1987:nelson} for an introduction to non-standard analysis. Here too, multiple keys can be specified at once. .. rst:role:: cite:ps .. rst:role:: cite:ts .. rst:role:: cite:ct .. rst:role:: cite:cts .. versionadded:: 2.2.0 All these roles modify :rst:role:`cite:p` and :rst:role:`cite:t`. The ones starting with ``c`` will capitalize the first letter. The ones ending with ``s`` will give the full author list. .. rst:role:: cite:alp .. rst:role:: cite:alps .. versionadded:: 2.6.0 These are identical to :rst:role:`cite:p` and :rst:role:`cite:ps` but suppress brackets. This is useful for instance when needing to add formatted pre-text or post-text. .. seealso:: :ref:`section-pre-post-text` .. rst:role:: cite This is an alias for the :rst:role:`cite:p` role, and will create a parenthetical citation reference. Provided for convenience and compatibility with older versions. .. rst:role:: cite:label .. rst:role:: cite:labelpar .. versionadded:: 2.2.0 Create a citation using just the label. Use the ``par`` version to include brackets. .. rst:role:: cite:year .. rst:role:: cite:yearpar .. versionadded:: 2.2.0 Create a citation using just the year. Use the ``par`` version to include brackets. .. rst:role:: cite:author .. rst:role:: cite:authors .. rst:role:: cite:authorpar .. rst:role:: cite:authorpars .. rst:role:: cite:cauthor .. rst:role:: cite:cauthors .. versionadded:: 2.2.0 Create a citation using just the author(s). Use the ``par`` version to include brackets, and the ``c`` version to capitalize the first letter. .. rst:role:: cite:empty .. versionadded:: 2.3.0 Register a citation key as being cited without generating a reference, similar to LaTeX's nocite command. .. rst:directive:: .. bibliography:: Create bibliography for all cited references. Citations in sphinx are resolved globally across all documents. Typically, you have a single bibliography directive across your entire project which collects all citations. Citation keys can also be explicitly listed under the directive; see :ref:`section-listing-citation-keys`. .. warning:: Sphinx will attempt to resolve references to the bibliography across all documents, so you must take care that no citation key is included more than once. The following options are recognized (all are optional). .. rst:directive:option:: all Include all references, instead of just the cited ones (equivalent to ``\nocite{*}`` in LaTeX). For example: .. code-block:: rest .. bibliography:: :all: .. rst:directive:option:: notcited Causes all references that were not cited to be included. Listed references remain included. .. rst:directive:option:: cited This is the default and need not be specified. .. rst:directive:option:: style Overrides the default bibliography style. For example: .. code-block:: rest .. bibliography:: :style: unsrt .. rst:directive:option:: list .. rst:directive:option:: enumtype .. rst:directive:option:: start See :ref:`section-lists`. .. rst:directive:option:: labelprefix See :ref:`section-label-prefixing`. .. rst:directive:option:: keyprefix See :ref:`section-key-prefixing`. .. rst:directive:option:: filter See :ref:`section-filtering`. Note that listed references are always included, regardless of any filtering. .. XXX not documenting disable-curly-bracket-strip for now; might remove it Finally, curly brackets are automatically removed when the bib file is parsed. Usually, this is what you want. If you desire to disable this behaviour, use the ``disable-curly-bracket-strip`` option: .. code-block:: rest .. bibliography:: :disable-curly-bracket-strip: .. rst:role:: footcite:p .. versionadded:: 2.3.0 Create a parenthetical footnote reference to a bibliographic entry. For example: .. code-block:: rest We will make use of non-standard analysis\ :footcite:p:`1987:nelson`. which would be equivalent to the following LaTeX code: .. code-block:: latex We will make use of non-standard analysis\footcite{1987:nelson}. Note the use of the `backslash escaped space `_ to suppress the space that would otherwise precede the footnote. As with all citation roles, multiple keys can be specified: .. code-block:: rest I love analysis\ :footcite:p:`1987:nelson,2001:schechter`! .. rst:role:: footcite:t .. versionadded:: 2.3.0 Create a textual footnote reference to a bibliographic entry. For example: .. code-block:: rest See :footcite:t:`1987:nelson` for an introduction to non-standard analysis. which would be equivalent to the following LaTeX code: .. code-block:: latex See Nelson\footcite{1987:nelson} for an introduction to non-standard analysis. Here too, multiple keys can be specified at once. .. rst:role:: footcite:ps .. rst:role:: footcite:ts .. rst:role:: footcite:ct .. rst:role:: footcite:cts .. versionadded:: 2.3.0 All these roles modify :rst:role:`footcite:p` and :rst:role:`footcite:t`. The ones starting with ``c`` will capitalize the first letter. The ones ending with ``s`` will give the full author list. .. rst:role:: footcite .. versionadded:: 2.0.0 This is an alias for the :rst:role:`footcite:p` role, and will create a parenthetical footnote citation reference. Provided for convenience and compatibility with older versions. .. rst:directive:: .. footbibliography:: .. versionadded:: 2.0.0 Create footnotes at this location for all references that are cited in the current document up to this point. Typically, you have a single footbibliography directive at the bottom of each document that has footcite citations. Standard numeric footnote labels are used, so the label style is ignored. Footnotes are inserted in the order in which they occur in the document, so the sorting style is also ignored. If specified multiple times in the same document, footnotes are only created for references that do not yet have a footnote earlier in the document. Markdown Syntax Using MyST ~~~~~~~~~~~~~~~~~~~~~~~~~~ If you use the MyST parser, all roles and directives are also available in Markdown syntax. For example: .. code-block:: markdown See {cite:p}`1987:nelson` for an introduction to non-standard analysis. ```{bibliography} references.bib ``` .. seealso:: https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html Advanced Features ----------------- .. _section-pre-post-text: Adding pre-text and post-text to citations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.6.0 You can add unformatted pre-text and post-text to any citation reference using the following syntax: .. code-block:: rest The axioms were introduced by :cite:t:`{see}1977:nelson`. The axioms were introduced by :cite:t:`1977:nelson{p. 1166}`. The axioms were introduced by :cite:t:`{see}1977:nelson{p. 1166}`. Axioms were introduced :cite:p:`{see}1977:nelson`. Axioms were introduced :cite:p:`1977:nelson{p. 1166}`. Axioms were introduced :cite:p:`{see}1977:nelson{p. 1166}`. Pre- and post-text is not supported for footnote citations. For formatted pre- and post-text in parenthetical citations, you can use the :rst:role:`cite:alp` and :rst:role:`cite:alps` roles. These roles suppress the brackets, leaving it to you to add them in the right format and place: .. code-block:: rest The three new axioms [the *IST axioms*, :cite:alp:`1977:nelson`] are discussed next. Splitting Bibliographies Per Bib File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.0.0 If you want multiple bibliographies each of which only contains references from specific bib files, you can specify the relevant bib files as an optional argument to the directive. The next example shows how to split your citations between articles and books, assuming your articles are in ``articles.bib`` and your books are in ``books1.bib`` and ``books2.bib``. .. code-block:: rest .. rubric:: Articles .. bibliography:: articles.bib .. rubric:: Books .. bibliography:: books1.bib books2.bib The bib files must be specified as a path that is relative to the containing document. .. _section-lists: Bullet Lists and Enumerated Lists ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 0.2.4 You can change the type of list used for rendering the bibliography. By default, a paragraph of standard citations is generated. However, instead, you can also generate a bullet list, or an enumerated list. .. code-block:: rest .. bibliography:: :list: bullet :all: .. bibliography:: :list: enumerated :all: Note that citations to these types of bibliography lists will not be resolved. For enumerated lists, you can also specify the type (default is ``arabic``), and the start of the sequence (default is ``1``). .. code-block:: rest .. bibliography:: :list: enumerated :enumtype: upperroman :start: 3 :all: The enumtype can be any of ``arabic`` (1, 2, 3, ...), ``loweralpha`` (a, b, c, ...), ``upperalpha`` (A, B, C, ...), ``lowerroman`` (i, ii, iii, ...), or ``upperroman`` (I, II, III, ...). The start can be any positive integer (1, 2, 3, ...) or ``continue`` if you wish the enumeration to continue from the last :rst:dir:`bibliography` directive. This is helpful if you split up your bibliography but still want to enumerate the entries continuously. .. _section-listing-citation-keys: Listing Citation Keys ~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.3.0 If you have many citations to include that are not referenced anywhere, then instead of using :rst:role:`cite:empty` it can be more convenient to simply list the citation keys directly under the bibliography directive where you want them to appear. Such references can be listed by having one bibtex key per line under the directive. The keys should not have a key prefix if you are using that option (see :ref:`section-key-prefixing`). For example: .. code-block:: rest .. bibliography:: nelson1987 boole1854 This would cause the bibliography to generate citations for all cited references, in addition to citations with bibtex keys ``nelson1987`` and ``boole1854``. The listed keys are always included regardless of filtering. So, if you only want the listed keys to be included, you can use the ``:filter: False`` option: .. code-block:: rest .. bibliography:: :filter: False nelson1987 boole1854 See :ref:`section-filtering` for more information on filtering. .. _section-label-prefixing: Label Prefixing ~~~~~~~~~~~~~~~ .. versionadded:: 0.2.5 If you have multiple bibliographies, and experience duplicate labels, use the ``labelprefix`` option. .. code-block:: rest .. rubric:: References .. bibliography:: :cited: :labelprefix: A .. rubric:: Further reading .. bibliography:: :notcited: :labelprefix: B .. _section-key-prefixing: Key Prefixing ~~~~~~~~~~~~~ .. versionadded:: 0.3.3 If you have multiple bibliographies, and you would like entries to be repeated in different documents, then use the ``keyprefix`` option. For example, suppose you have two documents, and you would like to cite ``boole1854`` in both of these documents, with the bibliography entries showing in both of the documents. In one document you could have: .. code-block:: rest See :cite:`a-boole1854` .. bibliography:: :labelprefix: A :keyprefix: a- whilst in the other document you could have: .. code-block:: rest See :cite:`b-boole1854` .. bibliography:: :labelprefix: B :keyprefix: b- The bibliographies will then both generate an entry for ``boole1854``, with links and backlinks as expected. If you list citation keys, you should include those *without* key prefix. For example: .. code-block:: rest .. bibliography:: :labelprefix: B :keyprefix: b- nelson1987 .. seealso:: :ref:`section-local-bibliographies` .. _section-filtering: Filtering ~~~~~~~~~ .. versionadded:: 0.2.7 Whilst the ``cited``, ``all``, and ``notcited`` options along with :ref:`section-listing-citation-keys` will cover many use cases, sometimes more advanced selection of bibliographic entries is desired. For this purpose, you can use the ``filter`` option: .. code-block:: rest .. bibliography:: :list: bullet :filter: author % "Einstein" The string specified in the filter option must be a valid Python expression. .. note:: The expression is parsed using :func:`ast.parse` and then evaluated using an :class:`ast.NodeVisitor`. The filter expression supports: * The boolean operators ``and``, ``or``. * The unary operator ``not``. * The comparison operators ``==``, ``<=``, ``<``, ``>=``, and ``>``. * Regular expression matching using the ``%`` operator, where the left hand side is the string to be matched, and the right hand side is the regular expression. Matching is case insensitive. For example: .. code-block:: rest .. bibliography:: :list: bullet :filter: title % "relativity" would include all entries that have the word "relativity" in the title. .. note:: The implementation uses :func:`re.search`. * Single and double quoted strings, such as ``'hello'`` or ``"world"``. * Set literals, such has ``{"hello", "world"}``, as well as the set operators ``&``, ``|``, ``in``, and ``not in``. .. versionadded:: 0.3.0 * Various identifiers, such as: - ``type`` is the entry type, as a lower case string (i.e. ``"inproceedings"``). - ``key`` is the entry key, as a lower case string (this is because keys are considered case insensitive). - ``cited`` evaluates to ``True`` if the entry was cited in the document, and to ``False`` otherwise. - ``docname`` evaluates to the name of the current document. .. versionadded:: 0.3.0 - ``docnames`` evaluates to a set of names from which the entry is cited. .. versionadded:: 0.3.0 - ``True`` and ``False``. - ``author`` is the entry string of authors in standard format (last, first), separated by "and". - ``editor`` is similar to ``author`` but for editors. - Any other (lower case) identifier evaluates to a string containing the value of the correspondingly named field, such as ``title``, ``publisher``, ``year``, and so on. If the item is missing in the entry then it evaluates to the empty string. Here is an example of how one would typically write an expression to filter on an optional field: .. code-block:: rest .. bibliography:: :list: bullet :filter: cited and year and (year <= "2003") which would include all cited entries that have a year that is less or equal than 2003; any entries that do not specify a year would be omitted. .. _section-local-bibliographies: Local Bibliographies ~~~~~~~~~~~~~~~~~~~~ The easiest way to have a local bibliography per document is to use :rst:role:`footcite` along with :rst:dir:`footbibliography`. If you prefer to have regular citations instead of footnotes, both the ``keyprefix`` and ``filter`` options can be used to achieve local bibliographies with :rst:role:`cite` and :rst:dir:`bibliography`. The ``filter`` system for local bibliographies can only be used if no citation key is used in more than one document. This is not always satisfied. If you need to cite the same reference in multiple documents with references to multiple local bibliographies, use the ``keyprefix`` system; see :ref:`section-key-prefixing`. To create a bibliography that includes only citations that were cited in the current document, use the following filter: .. code-block:: rest .. bibliography:: :filter: docname in docnames More generally, you can create bibliographies for citations that were cited from specific documents only: .. code-block:: rest .. bibliography:: :filter: {"doc1", "doc2"} & docnames This bibliography will include all citations that were cited from :file:`doc1.rst` or :file:`doc2.rst`. Another hypothetical example: .. code-block:: rest .. bibliography:: :filter: cited and ({"doc1", "doc2"} >= docnames) This bibliography will include all citations that were cited in :file:`doc1.rst` or :file:`doc2.rst`, but nowhere else. .. _bibtex-custom-formatting: Custom Formatting, Sorting, and Labelling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :mod:`pybtex` provides a very powerful way to create and register new styles, using setuptools entry points, as documented here: https://docs.pybtex.org/api/plugins.html Simply add the following code to your ``conf.py``: .. code-block:: python import pybtex.plugin from pybtex.style.formatting.unsrt import Style as UnsrtStyle from pybtex.style.template import toplevel # ... and anything else needed class MyStyle(UnsrtStyle): def format_XXX(self, e): template = toplevel [ # etc. ] return template.format_data(e) pybtex.plugin.register_plugin('pybtex.style.formatting', 'mystyle', MyStyle) Now ``mystyle`` will be available to you as a formatting style: .. code-block:: python bibtex_default_style = 'mystyle' An minimal example is available here: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/tree/develop/test/roots/test-bibliography_style_nowebref The formatting code uses a very intuitive template engine. The source code for ``unsrt`` provides many great examples: https://bitbucket.org/pybtex-devs/pybtex/src/master/pybtex/style/formatting/unsrt.py?at=master&fileviewer=file-view-default The above example only demonstrates a custom formatting style plugin. It is also possible to register custom author/editor naming plugins (using the ``pybtex.style.names`` group), labelling plugins (using the ``pybtex.style.labels`` group), and sorting plugins (using the ``pybtex.style.sorting`` group). A few minimal examples demonstrating how to create custom label styles are available here: * https://github.com/mcmtroffaes/sphinxcontrib-bibtex/tree/develop/test/roots/test-bibliography_style_label_1 * https://github.com/mcmtroffaes/sphinxcontrib-bibtex/tree/develop/test/roots/test-bibliography_style_label_2 Custom Inline Citation References ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.2.0 You can create and register your own referencing styles. For instance, say we wish to use the author-year style with round brackets instead of the default square brackets. Simply add the following code to your ``conf.py``: .. code-block:: python from dataclasses import dataclass, field import sphinxcontrib.bibtex.plugin from sphinxcontrib.bibtex.style.referencing import BracketStyle from sphinxcontrib.bibtex.style.referencing.author_year \ import AuthorYearReferenceStyle def bracket_style() -> BracketStyle: return BracketStyle( left='(', right=')', ) @dataclass class MyReferenceStyle(AuthorYearReferenceStyle): bracket_parenthetical: BracketStyle = field(default_factory=bracket_style) bracket_textual: BracketStyle = field(default_factory=bracket_style) bracket_author: BracketStyle = field(default_factory=bracket_style) bracket_label: BracketStyle = field(default_factory=bracket_style) bracket_year: BracketStyle = field(default_factory=bracket_style) sphinxcontrib.bibtex.plugin.register_plugin( 'sphinxcontrib.bibtex.style.referencing', 'author_year_round', MyReferenceStyle) .. warning:: You must decorate your style as a dataclass, and **include a type annotation with every field**, to ensure these values are correctly passed to the constructor when sphinxcontrib-bibtex instantiates your style. Now ``author_year_round`` will be available to you as a formatting style: .. code-block:: python bibtex_reference_style = 'author_year_round' An minimal example is available here: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/tree/develop/test/roots/test-citation_style_round_brackets Custom Html Anchors ~~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.4.0 For every citation and every bibliography, an identifier of the form ``idxxx`` (where ``xxx`` is some number) is generated. These identifiers can be used as html anchors. They are automatically generated by docutils and are thereby guaranteed not to clash. However, sometimes it is useful to refer to bibliographic entries from other external documents that have not been generated with Sphinx. Since the generated identifiers can easily break when updating documents, they can be customized through string templates should you need this. If you do so, it is your responsibility to ensure that no anchors will clash, by setting up the appropriate identifier templates in your ``conf.py`` file, for instance as follows: .. code-block:: python bibtex_cite_id = "cite-{bibliography_count}-{key}" bibtex_footcite_id = "footcite-{key}" bibtex_bibliography_id = "bibliography-{bibliography_count}" bibtex_footbibliography_id = "footbibliography-{footbibliography_count}" If you have at most one :rst:dir:`bibliography` directive per document, then you can also use: .. code-block:: python bibtex_cite_id = "cite-{key}" The ``bibliography_count`` template variable counts :rst:dir:`bibliography` directives in the current document, thus giving a unique number for each :rst:dir:`bibliography` directive within a document. The ``footbibliography_count`` template variable works similarly but for :rst:dir:`footbibliography` directives. The ``key`` template variable corresponds to the bibtex citation key, including the key prefix if specified. After formatting the template, the resulting string is filtered through docutils's ``make_id`` function, which will remove and/or translate any illegal characters. In particular, colons and underscores will be translated into dashes. .. warning:: If you have more than one :rst:dir:`bibliography` directive in any document, then you *must* include ``bibliography_count`` as part of your ``bibtex_cite_id`` template to avoid issues with duplicate identifiers, *even if there are no duplicate citations*. This is because the extension must generate an identifier for every key for each :rst:dir:`bibliography` directive prior to knowing whether or not the citation needs to be included. Custom Bibliography Header ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.0.0 By default, the :rst:dir:`bibliography` and :rst:dir:`footbibliography` directives simply insert a paragraph. The ``bibtex_bibliography_header`` and ``bibtex_footbibliography_header`` configuration variables can be set to add a header to this. For example, in your ``conf.py`` you could have: .. code-block:: python bibtex_bibliography_header = ".. rubric:: References" bibtex_footbibliography_header = bibtex_bibliography_header This adds a rubric title to every bibliography. Suppressing Warnings ~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.3.1 To suppress *all* warnings from ``sphinxcontrib-bibtex`` (which is probably a bad idea!), add this to your ``conf.py``: .. code-block:: python suppress_warnings = ["bibtex"] To suppress only a subset of warnings, such as duplicate label warnings, you can use: .. code-block:: python suppress_warnings = ["bibtex.duplicate_label"] The complete list of warning subtypes that can be suppressed is:: bibtex.bibfile_data_error bibtex.bibfile_error bibtex.duplicate_citation bibtex.duplicate_id bibtex.duplicate_label bibtex.filter_overrides bibtex.filter_syntax_error bibtex.key_not_found bibtex.list_type_error bibtex.missing_field Known Issues and Workarounds ---------------------------- LaTeX Formatting Inside Bibtex Entries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Beyond simple unicode/LaTeX symbol conversions, LaTeX formatting in bib files is not supported by pybtex. Since sphinxcontrib-bibtex uses pybtex to parse and format bibtex entries, that limitation is carried over to sphinxcontrib-bibtex. Encoding: Percent Signs ~~~~~~~~~~~~~~~~~~~~~~~ Be sure to write ``\%`` for percent signs at all times in your bib files (unless your file contains a genuine comment), otherwise the pybtex parser will ignore the remainder of the line. Duplicate Labels When Using ``:style: plain`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ With ``:style: plain``, labels are numeric, restarting at ``[1]`` for each :rst:dir:`bibliography` directive. Consequently, when inserting multiple :rst:dir:`bibliography` directives with ``:style: plain``, you are bound to get duplicate labels for entries. There are a few ways to work around this problem: * Use a single bibliography directive for all your references. * Use the ``labelprefix`` option, as documented above. * Use a style that has non-numeric labelling, such as ``:style: alpha``. LaTeX Backend Fails with Citations In Figure Captions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sphinx generates ``\phantomsection`` commands for references, however LaTeX does not support these in figure captions. You can work around this problem by adding the following code to your ``conf.py``: .. code-block:: python latex_elements = { 'preamble': r''' % make phantomsection empty inside figures \usepackage{etoolbox} \AtBeginEnvironment{figure}{\renewcommand{\phantomsection}{}} ''' } .. warning:: The above workaround no longer appears to work. If you know of a solution, please report at https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/276 Mismatch Between Output of HTML/Text and LaTeX Backends ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sphinx's LaTeX writer currently collects all citations together, and puts them on a separate page, with a separate title, whereas the html and text writers puts citations at the location where they are defined. This issue will occur also if you use regular citations in Sphinx: it has nothing to do with sphinxcontrib-bibtex per se. To get a closer match between the two outputs, first tell Sphinx to suppress its custom bibliography transform by adding the following code to your ``conf.py``: .. code-block:: python import sphinx.builders.latex.transforms class DummyTransform(sphinx.builders.latex.transforms.BibliographyTransform): def run(self, **kwargs): pass sphinx.builders.latex.transforms.BibliographyTransform = DummyTransform Then create a :file:`references.rst` file that you include at the end of your toctree, containing the following code: .. code-block:: rest References ========== .. raw:: latex \begingroup \def\section#1#2{} \def\chapter#1#2{} \begin{thebibliography}{1234} .. bibliography:: .. raw:: latex \end{thebibliography} \endgroup .. seealso:: This issue is being tracked on the Sphinx bug tracker here, where you might find other workarounds if the above one does not work for your use case: https://github.com/sphinx-doc/sphinx/issues/4775 Citation References Not Rendered In TocTree Directives ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When a document title has a citation reference in it, the toctree directive will simply take the target of the reference for rendering in the table of contents, rather than the fully rendered reference. This appears to be a limitation of the toctree directive. No workaround is currently known. Unknown Target Name When Using Footnote Citations With Numpydoc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Numpydoc will sometimes duplicate the short description (i.e. the first line of the docstring) of some python objects such as member functions. If it does that, and you have a footnote citation in the short description, Sphinx may not be able to properly resolve the footnote target. If this happens, the workaround is not to have footnote citations in the first line of your docstrings. Instead, put them in the long description. Alternatively, set ``numpydoc_class_members_toctree`` to ``False`` in your ``conf.py`` file. This will cause numpydoc not to duplicate the short descriptions for class members. Import errors after using setup.py install ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Because sphinxcontrib-bibtex uses the standard sphinxcontrib namespace, installing the package using .. code-block:: python setup.py install may result in a broken installation. This appears to be an issue with setuptools. As pip does not have this problem, it is recommended to install the package with pip: .. code-block:: pip install . Import errors when running pytest ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The test suite relies on the entry points being installed, whence, sphinxcontrib-bibtex cannot be tested without first installing the package. To run the tests, please do as follows (ideally, in a virtual environment): .. code-block:: pip install -e . cd test/ pytest sphinxcontrib-bibtex-2.6.2/mypy.ini000066400000000000000000000003421454747122600174000ustar00rootroot00000000000000[mypy] files = src/sphinxcontrib/**/*.py,test/*.py,setup.py [mypy-pybtex.*] ignore_missing_imports = True [mypy-setuptools] ignore_missing_imports = True [mypy-docutils.parsers.rst.directives] ignore_missing_imports = True sphinxcontrib-bibtex-2.6.2/pytest.ini000066400000000000000000000005461454747122600177400ustar00rootroot00000000000000[pytest] norecursedirs = doc src testpaths = test markers = numpydoc: tests for the numpydoc extension, requires numpydoc to be installed rinohtype: tests for rinoh builder, requires rinohtype to be installed cython: tests for cython, requires cython and test/some_cython_module to be installed addopts = -m "not (numpydoc or rinohtype or cython)" sphinxcontrib-bibtex-2.6.2/release_checklist.txt000066400000000000000000000026421454747122600221200ustar00rootroot00000000000000* git checkout -b release/x.x.x * sphinxcontrib/bibtex/__init__.py: set final version * CHANGELOG.rst: - set release date - all important changes are documented * doc: - all new features are properly documented - all new features have versionadded - all workarounds are properly documented - fixed workarounds are removed - git clean -xfd - python setup.py install --user && cd doc && make html && make linkcheck * make pull request on github - travis build passes - coverage at 100% - on github, merge release/x.x.x into develop and delete the release branch - git remote update --prune && git checkout develop && git merge --ff-only origin/develop * create and register source zip - git clean -xfd - python3 setup.py sdist bdist_wheel - twine upload dist/* * test upload - pip uninstall sphinxcontrib-bibtex - pip install --user -U sphinxcontrib-bibtex - cd sphinxcontrib-bibtex/test - nosetests * push release - git checkout master && git merge --ff-only develop - git tag -a -m "Tagging version `cat VERSION`" `cat VERSION` - git push origin master - git push --tags - git checkout develop - git branch -d release/x.x.x * activate new version on readthedocs.org * prep for next cycle - git checkout develop - sphinxcontrib/bibtex/__init__.py: bump to x.x.xa0 - CHANGELOG.rst: bump to x.x.x (in development) - git commit -a -m "Version bump. [skip ci]" - git push origin develop sphinxcontrib-bibtex-2.6.2/requirements.txt000066400000000000000000000002451454747122600211670ustar00rootroot00000000000000Sphinx>=3.5 docutils>=0.8,!=0.18.*,!=0.19.* pybtex>=0.24 pybtex-docutils>=1.0.0 dataclasses; python_version < '3.7' importlib_metadata>=3.6; python_version < '3.10' sphinxcontrib-bibtex-2.6.2/setup.py000066400000000000000000000054441454747122600174230ustar00rootroot00000000000000import io import re from typing import Optional from setuptools import find_namespace_packages, setup def readfile(filename: str) -> str: with io.open(filename, encoding="utf-8") as stream: return stream.read() readme = readfile("README.rst").split("\n")[5:] # skip title and badges requires = readfile("requirements.txt").split("\n") version_match = re.search( '"version": "(.+)"', readfile("src/sphinxcontrib/bibtex/__init__.py") ) assert version_match is not None, "version not found" version = version_match.group(1) # make entry point specifications def plugin(plugin_name: str, mod_name: Optional[str] = None) -> str: if mod_name is None: mod_name = plugin_name path = "sphinxcontrib.bibtex.style.referencing" class_name = "".join(part.capitalize() for part in plugin_name.split("_")) return f"{plugin_name} = {path}.{mod_name}:{class_name}ReferenceStyle" setup( name="sphinxcontrib-bibtex", version=version, url="https://github.com/mcmtroffaes/sphinxcontrib-bibtex", download_url="https://pypi.python.org/pypi/sphinxcontrib-bibtex", license="BSD", author="Matthias C. M. Troffaes", author_email="matthias.troffaes@gmail.com", description=readme[0], long_description="\n".join(readme[2:]), long_description_content_type="text/x-rst", zip_safe=False, classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Documentation", "Topic :: Utilities", ], platforms="any", packages=find_namespace_packages("src"), package_dir={"": "src"}, package_data={"sphinxcontrib.bibtex": ["py.typed"]}, include_package_data=True, python_requires=">=3.7", install_requires=requires, tests_require=["pytest", "pytest-cov"], namespace_packages=["sphinxcontrib"], entry_points={ "pybtex.style.names": [ "last = sphinxcontrib.bibtex.style.names.last:LastNameStyle", ], "sphinxcontrib.bibtex.style.referencing": [ plugin("author_year"), plugin("label"), plugin("super", "super_"), plugin("foot"), ], }, ) sphinxcontrib-bibtex-2.6.2/src/000077500000000000000000000000001454747122600164715ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/000077500000000000000000000000001454747122600213635ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/000077500000000000000000000000001454747122600226405ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/__init__.py000066400000000000000000000041551454747122600247560ustar00rootroot00000000000000""" .. autofunction:: setup """ from typing import Any, Dict from sphinx.application import Sphinx from .directives import BibliographyDirective from .domain import BibtexDomain from .foot_directives import FootBibliographyDirective from .foot_domain import BibtexFootDomain from .foot_roles import FootCiteRole from .nodes import bibliography, depart_raw_latex, raw_latex, visit_raw_latex from .roles import CiteRole from .transforms import BibliographyTransform def setup(app: Sphinx) -> Dict[str, Any]: """Set up the bibtex extension: * register config values * register directives * register nodes * register roles * register transforms * connect events to functions """ app.add_config_value("bibtex_default_style", "alpha", "html") app.add_config_value("bibtex_tooltips", True, "html") app.add_config_value("bibtex_tooltips_style", "", "html") app.add_config_value("bibtex_bibfiles", None, "html") app.add_config_value("bibtex_encoding", "utf-8-sig", "html") app.add_config_value("bibtex_bibliography_header", "", "html") app.add_config_value("bibtex_footbibliography_header", "", "html") app.add_config_value("bibtex_reference_style", "label", "env") app.add_config_value("bibtex_foot_reference_style", "foot", "env") app.add_config_value("bibtex_cite_id", "", "html") app.add_config_value("bibtex_footcite_id", "", "html") app.add_config_value("bibtex_bibliography_id", "", "html") app.add_config_value("bibtex_footbibliography_id", "", "html") app.add_domain(BibtexDomain) app.add_directive("bibliography", BibliographyDirective) app.add_role("cite", CiteRole()) app.add_node(bibliography, override=True) app.add_node(raw_latex, latex=(visit_raw_latex, depart_raw_latex), override=True) app.add_post_transform(BibliographyTransform) app.add_domain(BibtexFootDomain) app.add_directive("footbibliography", FootBibliographyDirective) app.add_role("footcite", FootCiteRole()) return { "version": "2.6.2", "env_version": 9, "parallel_read_safe": True, "parallel_write_safe": True, } sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/bibfile.py000066400000000000000000000103701454747122600246070ustar00rootroot00000000000000""" Classes and methods to work with bib files. .. autoclass:: BibFile :members: .. autoclass:: BibData :members: .. autofunction:: normpath_filename .. autofunction:: parse_bibdata .. autofunction:: is_bibdata_outdated .. autofunction:: process_bibdata """ import math import os.path from typing import TYPE_CHECKING, Dict, List, NamedTuple, Set from docutils.nodes import make_id from pybtex.database import BibliographyData, BibliographyDataError from pybtex.database.input.bibtex import Parser from sphinx.util.logging import getLogger if TYPE_CHECKING: from sphinx.environment import BuildEnvironment logger = getLogger(__name__) class BibFile(NamedTuple): """Contains information about a parsed bib file.""" mtime: float #: Modification time of file when last parsed. keys: Dict[str, None] #: Set of keys for this bib file as ordered dict. class BibData(NamedTuple): """Contains information about a collection of bib files.""" encoding: str #: Encoding of all bib files. bibfiles: Dict[str, BibFile] #: Maps bib filename to information about it. data: BibliographyData #: Data parsed from all bib files. def normpath_filename(env: "BuildEnvironment", filename: str) -> str: """Return normalised path to *filename* for the given environment *env*.""" return os.path.normpath(env.relfn2path(filename.strip())[1]) def get_mtime(bibfilename: str) -> float: try: return os.path.getmtime(bibfilename) except OSError: return -math.inf def parse_bibdata(bibfilenames: List[str], encoding: str) -> BibData: """Parse *bibfilenames* with given *encoding*, and return parsed data.""" parser = Parser(encoding) bibfiles: Dict[str, BibFile] = {} keys: Dict[str, None] = {} for filename in bibfilenames: logger.info("parsing bibtex file {0}... ".format(filename), nonl=True) if not os.path.isfile(filename): logger.warning( "could not open bibtex file {0}.".format(filename), type="bibtex", subtype="bibfile_error", ) new_keys: Dict[str, None] = {} else: try: parser.parse_file(filename) except BibliographyDataError as exc: logger.warning( "bibliography data error in {0}: {1}".format(filename, exc), type="bibtex", subtype="bibfile_data_error", ) keys, old_keys = dict.fromkeys(parser.data.entries.keys()), keys assert all(key in keys for key in old_keys) new_keys = dict.fromkeys(key for key in keys if key not in old_keys) logger.info("parsed {0} entries".format(len(new_keys))) bibfiles[filename] = BibFile(mtime=get_mtime(filename), keys=new_keys) return BibData(encoding=encoding, bibfiles=bibfiles, data=parser.data) def is_bibdata_outdated( bibdata: BibData, bibfilenames: List[str], encoding: str ) -> bool: return ( bibdata.encoding != encoding or list(bibdata.bibfiles) != bibfilenames or any( bibfile.mtime != get_mtime(filename) for filename, bibfile in bibdata.bibfiles.items() ) ) def process_bibdata( bibdata: BibData, bibfilenames: List[str], encoding: str ) -> BibData: """Parse *bibfilenames* and store parsed data in *bibdata*.""" logger.info("checking bibtex cache... ", nonl=True) if is_bibdata_outdated(bibdata, bibfilenames, encoding): logger.info("out of date") return parse_bibdata(bibfilenames, encoding) else: logger.info("up to date") return bibdata # function does not really fit in any module, but used by both # cite and footcite domains, so for now it's residing here def _make_ids(docname: str, lineno: int, ids: Set[str], raw_id: str) -> List[str]: if raw_id: id_ = make_id(raw_id) if id_ in ids: logger.warning( f"duplicate citation id {id_}", location=(docname, lineno), type="bibtex", subtype="duplicate_id", ) return [] else: ids.add(id_) return [id_] else: return [] sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/citation_target.py000066400000000000000000000017361454747122600264010ustar00rootroot00000000000000"""Citation keys.""" import re from typing import Iterable, NamedTuple class CitationTarget(NamedTuple): """Citation key, pre-text, and post-text.""" key: str pre: str post: str _re_citation_target = re.compile( r"\s*([{](?P
[^{}]+)[}])?"
    r"\s*(?P[^{}\s,]+)"
    r"\s*([{](?P[^{}]+)[}])?\s*"
)


def parse_citation_targets(targets: str, pos=0) -> Iterable[CitationTarget]:
    """Parse citation target string into a list of citation keys."""
    match = _re_citation_target.match(targets, pos=pos)
    if match is None:
        raise ValueError(f"malformed citation target: {targets}")
    yield CitationTarget(
        key=match.group("key") or "",
        pre=match.group("pre") or "",
        post=match.group("post") or "",
    )
    end = match.end()
    if end < len(targets):
        if targets[end] != ",":
            raise ValueError(f"malformed citation target: {targets}")
        yield from parse_citation_targets(targets, end + 1)
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/directives.py000066400000000000000000000221321454747122600253530ustar00rootroot00000000000000"""
    .. autoclass:: BibliographyKey
        :members:

    .. autoclass:: BibliographyValue
        :members:

    .. autoclass:: BibliographyDirective

        .. automethod:: run
"""

import ast  # parse(), used for filter
from typing import TYPE_CHECKING, Dict, List, NamedTuple, cast

import docutils.nodes
import docutils.parsers.rst.directives as directives
import sphinx.util
from docutils.parsers.rst import Directive

from .bibfile import _make_ids, normpath_filename
from .nodes import bibliography as bibliography_node

if TYPE_CHECKING:
    from sphinx.environment import BuildEnvironment

    from .domain import BibtexDomain


logger = sphinx.util.logging.getLogger(__name__)


class BibliographyKey(NamedTuple):
    """Unique key for each bibliography directive."""

    docname: str  #: Name of the document where the bibliography resides.
    id_: str  #: The id of the bibliography node in the document.


class BibliographyValue(NamedTuple):
    """Contains information about a bibliography directive."""

    line: int  #: Line number of the directive in the document.
    bibfiles: List[str]  #: List of bib files for this directive.
    style: str  #: The pybtex style.
    list_: str  #: The list type.
    enumtype: str  #: The sequence type (for enumerated lists).
    start: int  #: The start of the sequence (for enumerated lists).
    labelprefix: str  #: String prefix for pybtex generated labels.
    keyprefix: str  #: String prefix for citation keys.
    filter_: ast.AST  #: Parsed filter expression.
    citation_nodes: Dict[str, docutils.nodes.Element]  #: key -> citation node
    keys: List[str]  #: Keys listed as content of the directive.


class BibliographyDirective(Directive):

    """Class for processing the :rst:dir:`bibliography` directive.

    Produces a
    :class:`~sphinxcontrib.bibtex.nodes.bibliography` node,
    along with (empty) citation nodes that will be formatted later in the
    *env-updated* stage, and inserted into the document in a post-transform.
    We cannot insert the citation nodes here because we do not yet know
    which keys have been cited.

    .. seealso::

       Further processing of the resulting
       :class:`~sphinxcontrib.bibtex.nodes.bibliography` node is done
       by
       :class:`~sphinxcontrib.bibtex.transforms.BibliographyTransform`.
    """

    required_arguments = 0
    optional_arguments = 1
    final_argument_whitespace = True
    has_content = True
    option_spec = {
        "cited": directives.flag,
        "notcited": directives.flag,
        "all": directives.flag,
        "filter": directives.unchanged,
        "style": directives.unchanged,
        "list": directives.unchanged,
        "enumtype": directives.unchanged,
        "start": (
            lambda value: directives.positive_int(value) if value != "continue" else -1
        ),
        "labelprefix": directives.unchanged,
        "keyprefix": directives.unchanged,
    }

    def _get_filter(self):
        """Get parsed filter from options."""
        env = cast("BuildEnvironment", self.state.document.settings.env)
        if "filter" in self.options:
            if "all" in self.options:
                logger.warning(
                    ":filter: overrides :all:",
                    location=(env.docname, self.lineno),
                    type="bibtex",
                    subtype="filter_overrides",
                )
            if "notcited" in self.options:
                logger.warning(
                    ":filter: overrides :notcited:",
                    location=(env.docname, self.lineno),
                    type="bibtex",
                    subtype="filter_overrides",
                )
            if "cited" in self.options:
                logger.warning(
                    ":filter: overrides :cited:",
                    location=(env.docname, self.lineno),
                    type="bibtex",
                    subtype="filter_overrides",
                )
            try:
                return ast.parse(self.options["filter"])
            except SyntaxError:
                logger.warning(
                    "syntax error in :filter: expression"
                    + " ("
                    + self.options["filter"]
                    + "); "
                    "the option will be ignored",
                    location=(env.docname, self.lineno),
                    type="bibtex",
                    subtype="filter_syntax_error",
                )
                return ast.parse("cited")
        elif "all" in self.options:
            return ast.parse("True")
        elif "notcited" in self.options:
            return ast.parse("not cited")
        else:
            # the default filter: include only cited entries
            return ast.parse("cited")

    def run(self):
        """Process .bib files, set file dependencies, and create a
        node that is to be transformed to the entries of the
        bibliography.
        """
        env = cast("BuildEnvironment", self.state.document.settings.env)
        domain = cast("BibtexDomain", env.get_domain("cite"))
        filter_ = self._get_filter()
        if self.arguments:
            bibfiles = []
            for bibfile in self.arguments[0].split():
                normbibfile = normpath_filename(env, bibfile)
                if normbibfile not in domain.bibdata.bibfiles:
                    logger.warning(
                        "{0} not found or not configured"
                        " in bibtex_bibfiles".format(bibfile),
                        location=(env.docname, self.lineno),
                        type="bibtex",
                        subtype="bibfile_error",
                    )
                else:
                    bibfiles.append(normbibfile)
        else:
            bibfiles = list(domain.bibdata.bibfiles.keys())
        for bibfile in bibfiles:
            env.note_dependency(bibfile)
        # generate nodes and ids
        keyprefix: str = self.options.get("keyprefix", "")
        list_: str = self.options.get("list", "citation")
        if list_ not in {"bullet", "enumerated", "citation"}:
            logger.warning(
                "unknown bibliography list type '{0}'.".format(list_),
                location=(env.docname, self.lineno),
                type="bibtex",
                subtype="list_type_error",
            )
            list_ = "citation"
        if list_ in {"bullet", "enumerated"}:
            citation_node_class = docutils.nodes.list_item
        else:
            citation_node_class = docutils.nodes.citation
        bibliography_count = env.temp_data["bibtex_bibliography_count"] = (
            env.temp_data.get("bibtex_bibliography_count", 0) + 1
        )
        ids = set(self.state.document.ids.keys())
        node = bibliography_node(
            "",
            docname=env.docname,
            ids=_make_ids(
                docname=env.docname,
                lineno=self.lineno,
                ids=ids,
                raw_id=env.app.config.bibtex_bibliography_id.format(
                    bibliography_count=bibliography_count
                ),
            ),
        )
        self.state.document.note_explicit_target(node, node)
        # we only know which citations to included at resolve stage
        # but we need to know their ids before resolve stage
        # so for now we generate a node, and thus, an id, for every entry
        citation_nodes: Dict[str, docutils.nodes.Element] = {
            keyprefix
            + entry.key: citation_node_class(
                ids=_make_ids(
                    docname=env.docname,
                    lineno=self.lineno,
                    ids=ids,
                    raw_id=env.app.config.bibtex_cite_id.format(
                        bibliography_count=bibliography_count, key=keyprefix + entry.key
                    ),
                )
            )
            for entry in domain.get_entries(bibfiles)
        }
        for citation_node in citation_nodes.values():
            self.state.document.note_explicit_target(citation_node, citation_node)
        # check and get keys
        keys = []
        for key in self.content:
            if keyprefix + key not in citation_nodes:
                logger.warning(
                    'could not find bibtex key "%s"' % key,
                    location=(env.docname, self.lineno),
                    type="bibtex",
                    subtype="key_not_found",
                )
            else:
                keys.append(key)
        # create bibliography object
        bibliography = BibliographyValue(
            line=self.lineno,
            list_=list_,
            enumtype=self.options.get("enumtype", "arabic"),
            start=self.options.get("start", 1),
            style=self.options.get("style", env.app.config.bibtex_default_style),
            filter_=filter_,
            labelprefix=self.options.get("labelprefix", ""),
            keyprefix=keyprefix,
            bibfiles=bibfiles,
            citation_nodes=citation_nodes,
            keys=keys,
        )
        bib_key = BibliographyKey(docname=env.docname, id_=node["ids"][0])
        assert bib_key not in domain.bibliographies
        domain.bibliographies[bib_key] = bibliography
        return [node]
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/domain.py000066400000000000000000000532651454747122600244740ustar00rootroot00000000000000"""
    Classes and methods to maintain any bibtex information that is stored
    outside the doctree.

    .. autoclass:: Citation
        :members:

    .. autoclass:: BibtexDomain
        :members:
"""

import ast
import re
from typing import (
    TYPE_CHECKING,
    Dict,
    Iterable,
    List,
    NamedTuple,
    Optional,
    Set,
    Tuple,
    cast,
)

import docutils.frontend
import docutils.nodes
import docutils.parsers.rst
import docutils.utils
import pybtex.plugin
import pybtex_docutils
import sphinx.util
from pybtex.richtext import Tag
from pybtex.style import FormattedEntry
from pybtex.style.template import FieldIsMissing
from sphinx.domains import Domain, ObjType
from sphinx.errors import ExtensionError
from sphinx.locale import _

import sphinxcontrib.bibtex.plugin

from .bibfile import BibData, normpath_filename, process_bibdata
from .citation_target import CitationTarget, parse_citation_targets
from .roles import CiteRole
from .style.referencing import BaseReferenceStyle, format_references
from .style.template import SphinxReferenceInfo

if TYPE_CHECKING:
    from pybtex.database import Entry
    from pybtex.style.formatting import BaseStyle
    from sphinx.addnodes import pending_xref
    from sphinx.application import Sphinx
    from sphinx.builders import Builder
    from sphinx.environment import BuildEnvironment

    from .directives import BibliographyKey, BibliographyValue
    from .roles import CitationRef

logger = sphinx.util.logging.getLogger(__name__)


def _raise_invalid_node(node):
    """Helper method to raise an exception when an invalid node is
    visited.
    """
    raise ValueError("invalid node %s in filter expression" % node)


class _FilterVisitor(ast.NodeVisitor):

    """Visit the abstract syntax tree of a parsed filter expression."""

    entry = None
    """The bibliographic entry to which the filter must be applied."""

    cited_docnames = False
    """The documents where the entry is cited (empty if not cited)."""

    def __init__(self, entry, docname, cited_docnames):
        self.entry = entry
        self.docname = docname
        self.cited_docnames = cited_docnames

    def visit_Module(self, node):
        if len(node.body) != 1:
            raise ValueError("filter expression cannot contain multiple expressions")
        return self.visit(node.body[0])

    def visit_Expr(self, node):
        return self.visit(node.value)

    def visit_BoolOp(self, node):
        outcomes = (self.visit(value) for value in node.values)
        if isinstance(node.op, ast.And):
            return all(outcomes)
        elif isinstance(node.op, ast.Or):
            return any(outcomes)
        else:  # pragma: no cover
            # there are no other boolean operators
            # so this code should never execute
            assert False, "unexpected boolean operator %s" % node.op

    def visit_UnaryOp(self, node):
        if isinstance(node.op, ast.Not):
            return not self.visit(node.operand)
        else:
            _raise_invalid_node(node)

    def visit_BinOp(self, node):
        left = self.visit(node.left)
        op = node.op
        right = self.visit(node.right)
        if isinstance(op, ast.Mod):
            # modulo operator is used for regular expression matching
            if not isinstance(left, str):
                raise ValueError("expected a string on left side of %s" % node.op)
            if not isinstance(right, str):
                raise ValueError("expected a string on right side of %s" % node.op)
            return re.search(right, left, re.IGNORECASE)
        elif isinstance(op, ast.BitOr):
            return left | right
        elif isinstance(op, ast.BitAnd):
            return left & right
        else:
            _raise_invalid_node(node)

    def visit_Compare(self, node):
        # keep it simple: binary comparators only
        if len(node.ops) != 1:
            raise ValueError("syntax for multiple comparators not supported")
        left = self.visit(node.left)
        op = node.ops[0]
        right = self.visit(node.comparators[0])
        if isinstance(op, ast.Eq):
            return left == right
        elif isinstance(op, ast.NotEq):
            return left != right
        elif isinstance(op, ast.Lt):
            return left < right
        elif isinstance(op, ast.LtE):
            return left <= right
        elif isinstance(op, ast.Gt):
            return left > right
        elif isinstance(op, ast.GtE):
            return left >= right
        elif isinstance(op, ast.In):
            return left in right
        elif isinstance(op, ast.NotIn):
            return left not in right
        else:
            # not used currently: ast.Is | ast.IsNot
            _raise_invalid_node(op)

    def visit_Name(self, node):
        """Calculate the value of the given identifier."""
        id_ = node.id
        if id_ == "type":
            return self.entry.type.lower()
        elif id_ == "key":
            return self.entry.key.lower()
        elif id_ == "cited":
            return bool(self.cited_docnames)
        elif id_ == "docname":
            return self.docname
        elif id_ == "docnames":
            return self.cited_docnames
        elif id_ == "author" or id_ == "editor":
            if id_ in self.entry.persons:
                return " and ".join(
                    str(person)  # XXX needs fix in pybtex?
                    for person in self.entry.persons[id_]
                )
            else:
                return ""
        else:
            return self.entry.fields.get(id_, "")

    def visit_Set(self, node):
        return frozenset(self.visit(elt) for elt in node.elts)

    # NameConstant is Python 3.4 only
    def visit_NameConstant(self, node):
        return node.value  # pragma: no cover

    # Constant is Python 3.6+ only
    # Since 3.8 Num, Str, Bytes, NameConstant and Ellipsis are just Constant
    def visit_Constant(self, node):
        return node.value

    # Not used on 3.8+
    def visit_Str(self, node):
        return node.s  # pragma: no cover

    def generic_visit(self, node):
        _raise_invalid_node(node)


def get_docnames(env):
    """Get document names in order."""
    rel = env.collect_relations()
    docname = (
        env.config.master_doc if sphinx.version_info < (4, 0) else env.config.root_doc
    )
    docnames = set()
    while docname is not None:
        docnames.add(docname)
        yield docname
        parent, prevdoc, nextdoc = rel[docname]
        docname = nextdoc
    for docname in sorted(env.found_docs - docnames):
        yield docname


class Citation(NamedTuple):
    """Information about a citation."""

    citation_id: str  #: Unique id of this citation.
    bibliography_key: "BibliographyKey"  #: Key of its bibliography directive.
    key: str  #: Key (with prefix).
    entry: "Entry"  #: Entry from pybtex.
    formatted_entry: "FormattedEntry"  #: Formatted entry for bibliography.
    tooltip_entry: Optional["FormattedEntry"]  #: Formatted entry for tooltip.


def env_updated(app: "Sphinx", env: "BuildEnvironment") -> Iterable[str]:
    domain = cast(BibtexDomain, env.get_domain("cite"))
    return domain.env_updated()


def parse_header(header: str, source_path: str):
    parser = docutils.parsers.rst.Parser()
    # note: types stub for docutils doesn't know about components argument
    settings = docutils.frontend.OptionParser(
        components=(docutils.parsers.rst.Parser,)  # type: ignore
    ).get_default_values()
    document = docutils.utils.new_document(source_path, settings)
    parser.parse(header, document)
    return document[0]


class BibtexDomain(Domain):
    """Sphinx domain for the bibtex extension."""

    name = "cite"
    label = "BibTeX Citations"
    data_version = 4
    initial_data = dict(
        bibdata=BibData(
            encoding="", bibfiles={}, data=pybtex.database.BibliographyData()
        ),
        bibliography_header=docutils.nodes.container(),
        bibliographies={},
        citations=[],
        citation_refs=[],
    )
    backend = pybtex_docutils.Backend()
    reference_style: BaseReferenceStyle

    @property
    def bibdata(self) -> BibData:
        """Information about the bibliography files."""
        return self.data["bibdata"]

    @property
    def bibliography_header(self) -> docutils.nodes.Element:
        return self.data["bibliography_header"]

    @property
    def bibliographies(self) -> Dict["BibliographyKey", "BibliographyValue"]:
        """Map storing information about each bibliography directive."""
        return self.data["bibliographies"]

    @property
    def citations(self) -> List[Citation]:
        """Citation data."""
        return self.data["citations"]

    @property
    def citation_refs(self) -> List["CitationRef"]:
        """Citation reference data."""
        return self.data["citation_refs"]

    def __init__(self, env: "BuildEnvironment"):
        # set up referencing style
        style = sphinxcontrib.bibtex.plugin.find_plugin(
            "sphinxcontrib.bibtex.style.referencing",
            env.app.config.bibtex_reference_style,
        )
        self.reference_style = style()
        # set up object types and roles for referencing style
        role_names = self.reference_style.role_names()
        self.object_types = dict(
            citation=ObjType(_("citation"), *role_names, searchprio=-1),
        )
        self.roles = dict((name, CiteRole()) for name in role_names)
        # initialize the domain
        super().__init__(env)
        # connect env-updated
        env.app.connect("env-updated", env_updated)
        # check config
        if env.app.config.bibtex_bibfiles is None:
            raise ExtensionError("You must configure the bibtex_bibfiles setting")
        # update bib file information in the cache
        bibfiles = [
            normpath_filename(env, "/" + bibfile)
            for bibfile in env.app.config.bibtex_bibfiles
        ]
        self.data["bibdata"] = process_bibdata(
            self.bibdata, bibfiles, env.app.config.bibtex_encoding
        )
        # parse bibliography header
        header = getattr(env.app.config, "bibtex_bibliography_header")
        if header:
            self.data["bibliography_header"] = docutils.nodes.container()
            self.data["bibliography_header"] += parse_header(
                header, "bibliography_header"
            )

    def clear_doc(self, docname: str) -> None:
        self.data["citations"] = [
            citation
            for citation in self.citations
            if citation.bibliography_key.docname != docname
        ]
        self.data["citation_refs"] = [
            ref for ref in self.citation_refs if ref.docname != docname
        ]
        for bib_key in list(self.bibliographies.keys()):
            if bib_key.docname == docname:
                del self.bibliographies[bib_key]

    def merge_domaindata(self, docnames: List[str], otherdata: Dict) -> None:
        for bib_key, bib_value in otherdata["bibliographies"].items():
            if bib_key.docname in docnames:
                self.bibliographies[bib_key] = bib_value
        for citation_ref in otherdata["citation_refs"]:
            if citation_ref.docname in docnames:
                self.citation_refs.append(citation_ref)
        # 'citations' domain data calculated in env_updated

    def env_updated(self) -> Iterable[str]:
        # This function is called when all doctrees are parsed,
        # but before any post transforms are applied. We use it to
        # determine which citations will be added to which bibliography
        # directive, and also to format the labels. We need to format
        # the labels here because they must be known when resolve_xref is
        # called.
        self.citations.clear()  # might have been restored from pickle
        docnames = list(get_docnames(self.env))
        # we keep track of this to quickly check for duplicates
        used_keys: Set[str] = set()
        used_labels: Dict[str, str] = {}
        for bibliography_key, bibliography in self.bibliographies.items():
            for entry, formatted_entry, tooltip_entry in self.get_formatted_entries(
                bibliography_key,
                docnames,
                self.env.app.config.bibtex_tooltips,
                self.env.app.config.bibtex_tooltips_style,
            ):
                key = bibliography.keyprefix + formatted_entry.key
                if bibliography.list_ == "citation" and key in used_keys:
                    logger.warning(
                        'duplicate citation for key "%s"' % key,
                        location=(bibliography_key.docname, bibliography.line),
                        type="bibtex",
                        subtype="duplicate_citation",
                    )
                self.citations.append(
                    Citation(
                        citation_id=bibliography.citation_nodes[key]["ids"][0],
                        bibliography_key=bibliography_key,
                        key=key,
                        entry=entry,
                        formatted_entry=formatted_entry,
                        tooltip_entry=tooltip_entry,
                    )
                )
                if bibliography.list_ == "citation":
                    used_keys.add(key)
                    if formatted_entry.label not in used_labels:
                        used_labels[formatted_entry.label] = key
                    elif used_labels[formatted_entry.label] != key:
                        # if used_label[label] == key then already
                        # duplicate key warning
                        logger.warning(
                            'duplicate label "%s" for keys "%s" and "%s"'
                            % (
                                formatted_entry.label,
                                used_labels[formatted_entry.label],
                                key,
                            ),
                            location=(bibliography_key.docname, bibliography.line),
                            type="bibtex",
                            subtype="duplicate_label",
                        )
        return []  # expects list of updated docnames

    def resolve_xref(
        self,
        env: "BuildEnvironment",
        fromdocname: str,
        builder: "Builder",
        typ: str,
        target: str,
        node: "pending_xref",
        contnode: docutils.nodes.Element,
    ) -> docutils.nodes.Element:
        """Replace node by list of citation references (one for each key)."""
        targets = parse_citation_targets(target)
        keys: Dict[str, CitationTarget] = {target2.key: target2 for target2 in targets}
        citations: Dict[str, Citation] = {
            cit.key: cit
            for cit in self.citations
            if cit.key in keys
            and self.bibliographies[cit.bibliography_key].list_ == "citation"
        }
        for key in keys:
            if key not in citations:
                logger.warning(
                    'could not find bibtex key "%s"' % key,
                    location=node,
                    type="bibtex",
                    subtype="key_not_found",
                )
        plaintext = pybtex.plugin.find_plugin("pybtex.backends", "plaintext")()
        references = [
            (
                citation.entry,
                citation.formatted_entry,
                SphinxReferenceInfo(
                    builder=builder,
                    fromdocname=fromdocname,
                    todocname=citation.bibliography_key.docname,
                    citation_id=citation.citation_id,
                    title=(
                        citation.tooltip_entry.text.render(plaintext).replace(
                            "\\url ", ""
                        )
                        if citation.tooltip_entry
                        else None
                    ),
                    pre_text=keys[citation.key].pre,
                    post_text=keys[citation.key].post,
                ),
            )
            for citation in citations.values()
        ]
        formatted_references = format_references(self.reference_style, typ, references)
        result_node = docutils.nodes.inline(rawsource=target)
        result_node += formatted_references.render(self.backend)
        return result_node

    def resolve_any_xref(
        self,
        env: "BuildEnvironment",
        fromdocname: str,
        builder: "Builder",
        target: str,
        node: "pending_xref",
        contnode: docutils.nodes.Element,
    ) -> List[Tuple[str, docutils.nodes.Element]]:
        """Replace node by list of citation references (one for each key),
        provided that the target has citation keys.
        """
        keys = [key.strip() for key in target.split(",")]
        citations: Set[str] = {
            cit.key
            for cit in self.citations
            if cit.key in keys
            and self.bibliographies[cit.bibliography_key].list_ == "citation"
        }
        if any(key in citations for key in keys):
            result_node = self.resolve_xref(
                env, fromdocname, builder, "p", target, node, contnode
            )
            return [("p", result_node)]
        else:
            return []

    def get_all_cited_keys(self, docnames):
        """Yield all citation keys for given *docnames* in order, then
        ordered by citation order.
        """
        for citation_ref in sorted(
            self.citation_refs, key=lambda c: docnames.index(c.docname)
        ):
            for target in citation_ref.targets:
                yield target.key

    def get_entries(self, bibfiles: List[str]) -> Iterable["Entry"]:
        """Return all bibliography entries from the bib files, unsorted (i.e.
        in order of appearance in the bib files.
        """
        for bibfile in bibfiles:
            for key in self.bibdata.bibfiles[bibfile].keys:
                yield self.bibdata.data.entries[key]

    def get_filtered_entries(
        self, bibliography_key: "BibliographyKey"
    ) -> Iterable[Tuple[str, "Entry"]]:
        """Return unsorted bibliography entries filtered by the filter
        expression.
        """
        bibliography = self.bibliographies[bibliography_key]
        for entry in self.get_entries(bibliography.bibfiles):
            key = bibliography.keyprefix + entry.key
            cited_docnames = {
                citation_ref.docname
                for citation_ref in self.citation_refs
                if key in {target.key for target in citation_ref.targets}
            }
            visitor = _FilterVisitor(
                entry=entry,
                docname=bibliography_key.docname,
                cited_docnames=cited_docnames,
            )
            try:
                success = visitor.visit(bibliography.filter_)
            except ValueError as err:
                logger.warning(
                    "syntax error in :filter: expression; %s" % err,
                    location=(bibliography_key.docname, bibliography.line),
                    type="bibtex",
                    subtype="filter_syntax_error",
                )
                # recover by falling back to the default
                success = bool(cited_docnames)
            if success or entry.key in bibliography.keys:
                yield key, entry

    def get_sorted_entries(
        self, bibliography_key: "BibliographyKey", docnames: List[str]
    ) -> Iterable[Tuple[str, "Entry"]]:
        """Return filtered bibliography entries sorted by citation order."""
        entries = dict(self.get_filtered_entries(bibliography_key))
        for key in self.get_all_cited_keys(docnames):
            try:
                entry = entries.pop(key)
            except KeyError:
                pass
            else:
                yield key, entry
        # then all remaining keys, in order of bibliography file
        for key, entry in entries.items():
            yield key, entry

    def get_formatted_entries(
        self,
        bibliography_key: "BibliographyKey",
        docnames: List[str],
        tooltips: bool,
        tooltips_style: str,
    ) -> Iterable[Tuple["Entry", "FormattedEntry", Optional["FormattedEntry"]]]:
        """Get sorted bibliography entries along with their pybtex labels,
        with additional sorting and formatting applied from the pybtex style.
        """
        bibliography = self.bibliographies[bibliography_key]
        entries = dict(self.get_sorted_entries(bibliography_key, docnames))
        style: BaseStyle = cast(
            "BaseStyle",
            pybtex.plugin.find_plugin("pybtex.style.formatting", bibliography.style)(),
        )
        style2: Optional[BaseStyle] = (
            (
                cast(
                    "BaseStyle",
                    pybtex.plugin.find_plugin(
                        "pybtex.style.formatting", tooltips_style
                    )(),
                )
                if tooltips_style
                else style
            )
            if tooltips
            else None
        )
        sorted_entries: Iterable[Entry] = style.sort(entries.values())
        labels = style.format_labels(sorted_entries)
        for label, entry in zip(labels, sorted_entries):
            try:
                yield (
                    entry,
                    style.format_entry(bibliography.labelprefix + label, entry),
                    style2.format_entry(bibliography.labelprefix + label, entry)
                    if style2
                    else None,
                )
            except FieldIsMissing as exc:
                logger.warning(
                    str(exc),
                    location=(bibliography_key.docname, bibliography.line),
                    type="bibtex",
                    subtype="missing_field",
                )
                formatted_error_entry = FormattedEntry(
                    entry.key, Tag("b", str(exc)), bibliography.labelprefix + label
                )
                yield entry, formatted_error_entry, None
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/foot_directives.py000066400000000000000000000044101454747122600264010ustar00rootroot00000000000000"""
    .. autoclass:: FootBibliographyDirective

        .. automethod:: run
"""

from typing import TYPE_CHECKING, cast

from docutils.parsers.rst import Directive

from .bibfile import _make_ids

if TYPE_CHECKING:
    from sphinx.environment import BuildEnvironment

    from .domain import BibtexDomain
    from .foot_domain import BibtexFootDomain


class FootBibliographyDirective(Directive):

    """Class for processing the :rst:dir:`footbibliography` directive."""

    required_arguments = 0
    optional_arguments = 0
    has_content = False

    def run(self):
        """Set file dependencies, and insert the footnotes that were created
        earlier by :meth:`.foot_roles.FootCiteRole.result_nodes`.
        """
        env = cast("BuildEnvironment", self.state.document.settings.env)
        foot_old_refs = env.temp_data.setdefault("bibtex_foot_old_refs", set())
        foot_new_refs = env.temp_data.setdefault("bibtex_foot_new_refs", set())
        footbibliography_count = env.temp_data["bibtex_footbibliography_count"] = (
            env.temp_data.get("bibtex_footbibliography_count", 0) + 1
        )
        if not foot_new_refs:
            return []
        else:
            foot_old_refs |= foot_new_refs
            foot_new_refs.clear()
            # bibliography stored in env.temp_data["bibtex_foot_bibliography"]
            foot_domain = cast("BibtexFootDomain", env.get_domain("footcite"))
            foot_bibliography, env.temp_data["bibtex_foot_bibliography"] = (
                env.temp_data["bibtex_foot_bibliography"],
                foot_domain.bibliography_header.deepcopy(),
            )
            domain = cast("BibtexDomain", env.get_domain("cite"))
            for bibfile in domain.bibdata.bibfiles:
                env.note_dependency(bibfile)
            foot_bibliography["ids"] += _make_ids(
                docname=env.docname,
                lineno=self.lineno,
                ids=set(self.state.document.ids.keys()),
                raw_id=env.app.config.bibtex_footbibliography_id.format(
                    footbibliography_count=footbibliography_count
                ),
            )
            self.state.document.note_explicit_target(
                foot_bibliography, foot_bibliography
            )
            return [foot_bibliography]
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/foot_domain.py000066400000000000000000000056211454747122600255140ustar00rootroot00000000000000"""
    Domain for footnote citations.

    .. autoclass:: BibtexFootDomain
        :members:
"""

from typing import TYPE_CHECKING, Dict, List, Tuple

import docutils.nodes
import docutils.utils
import sphinx.util
from sphinx.domains import Domain, ObjType
from sphinx.locale import _

import sphinxcontrib.bibtex.plugin

from .domain import parse_header
from .foot_roles import FootCiteRole
from .style.referencing import BaseReferenceStyle

if TYPE_CHECKING:
    from sphinx.addnodes import pending_xref
    from sphinx.builders import Builder
    from sphinx.environment import BuildEnvironment

logger = sphinx.util.logging.getLogger(__name__)


class BibtexFootDomain(Domain):
    """Sphinx domain for footnote citations."""

    name = "footcite"
    label = "BibTeX Footnote Citations"
    data_version = 0
    initial_data = dict(
        bibliography_header=docutils.nodes.container(),
    )
    reference_style: BaseReferenceStyle

    @property
    def bibliography_header(self) -> docutils.nodes.Element:
        return self.data["bibliography_header"]

    def __init__(self, env: "BuildEnvironment"):
        # set up referencing style
        style = sphinxcontrib.bibtex.plugin.find_plugin(
            "sphinxcontrib.bibtex.style.referencing",
            env.app.config.bibtex_foot_reference_style,
        )
        self.reference_style = style()
        # set up object types and roles for referencing style
        role_names = self.reference_style.role_names()
        self.object_types = dict(
            citation=ObjType(_("citation"), *role_names, searchprio=-1),
        )
        self.roles = dict((name, FootCiteRole()) for name in role_names)
        # initialize the domain
        super().__init__(env)
        # parse bibliography header
        header = getattr(env.app.config, "bibtex_footbibliography_header")
        if header:
            self.data["bibliography_header"] = docutils.nodes.container()
            self.data["bibliography_header"] += parse_header(
                header, "foot_bibliography_header"
            )

    def merge_domaindata(self, docnames: List[str], otherdata: Dict) -> None:
        """Merge in data regarding *docnames* from domain data
        inventory *otherdata*.

        As there is no document specific data for this domain, this function
        does nothing.
        """
        pass

    def resolve_any_xref(
        self,
        env: "BuildEnvironment",
        fromdocname: str,
        builder: "Builder",
        target: str,
        node: "pending_xref",
        contnode: docutils.nodes.Element,
    ) -> List[Tuple[str, docutils.nodes.Element]]:
        """Resolve the pending reference *node* with the given *target*,
        where the reference comes from an "any" role.

        Since citation references are resolved to regular citations,
        and not to footnote citations,
        this implementation simply returns an empty list.
        """
        return []
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/foot_roles.py000066400000000000000000000112171454747122600253670ustar00rootroot00000000000000"""
    .. autoclass:: FootCiteRole
        :show-inheritance:

        .. automethod:: result_nodes
"""

from typing import TYPE_CHECKING, List, Tuple, cast

import docutils.nodes
from docutils.nodes import make_id
from pybtex.plugin import find_plugin
from sphinx.roles import XRefRole
from sphinx.util.logging import getLogger

from .style.referencing import format_references
from .style.template import FootReferenceInfo
from .transforms import node_text_transform

if TYPE_CHECKING:
    from sphinx.environment import BuildEnvironment

    from .domain import BibtexDomain
    from .foot_domain import BibtexFootDomain

logger = getLogger(__name__)


class FootCiteRole(XRefRole):
    """Class for processing the :rst:role:`footcite` role."""

    def result_nodes(
        self,
        document: "docutils.nodes.document",
        env: "BuildEnvironment",
        node: "docutils.nodes.Element",
        is_ref: bool,
    ) -> Tuple[List["docutils.nodes.Node"], List["docutils.nodes.system_message"]]:
        """Transform node into footnote references, and
        add footnotes to a node stored in the environment's temporary data
        if they are not yet present.

        .. seealso::

           The node containing all footnotes is inserted into the document by
           :meth:`.foot_directives.FootBibliographyDirective.run`.
        """
        if not node.get("refdomain"):
            assert node["reftype"] == "footcite"
            node["refdomain"] = "footcite"
            node["reftype"] = "p"
        foot_domain = cast("BibtexFootDomain", self.env.get_domain("footcite"))
        keys = [key.strip() for key in self.target.split(",")]  # type: ignore
        try:
            foot_bibliography = env.temp_data["bibtex_foot_bibliography"]
        except KeyError:
            env.temp_data[
                "bibtex_foot_bibliography"
            ] = foot_bibliography = foot_domain.bibliography_header.deepcopy()
        foot_old_refs = env.temp_data.setdefault("bibtex_foot_old_refs", set())
        foot_new_refs = env.temp_data.setdefault("bibtex_foot_new_refs", set())
        style = find_plugin(
            "pybtex.style.formatting", self.config.bibtex_default_style
        )()
        references = []
        domain = cast("BibtexDomain", self.env.get_domain("cite"))
        # count only incremented at directive, see foot_directives run method
        footbibliography_count = env.temp_data.setdefault(
            "bibtex_footbibliography_count", 0
        )
        footcite_names = env.temp_data.setdefault("bibtex_footcite_names", {})
        for key in keys:
            entry = domain.bibdata.data.entries.get(key)
            if entry is not None:
                formatted_entry = style.format_entry(label="", entry=entry)
                if key not in (foot_old_refs | foot_new_refs):
                    footnote = docutils.nodes.footnote(auto=1)
                    # no automatic ids for footnotes: force non-empty template
                    template: str = (
                        env.app.config.bibtex_footcite_id
                        if env.app.config.bibtex_footcite_id
                        else "footcite-{key}"
                    )
                    raw_id = template.format(
                        footbibliography_count=footbibliography_count + 1, key=entry.key
                    )
                    # format name with make_id for consistency with cite role
                    name = make_id(raw_id)
                    footnote["names"] += [name]
                    footcite_names[entry.key] = name
                    footnote += domain.backend.paragraph(formatted_entry)
                    document.note_autofootnote(footnote)
                    document.note_explicit_target(footnote, footnote)
                    node_text_transform(footnote)
                    foot_bibliography += footnote
                    foot_new_refs.add(key)
                references.append(
                    (
                        entry,
                        formatted_entry,
                        FootReferenceInfo(
                            key=entry.key,
                            refname=footcite_names[entry.key],
                            document=document,
                        ),
                    )
                )
            else:
                logger.warning(
                    'could not find bibtex key "%s"' % key,
                    location=(env.docname, self.lineno),
                    type="bibtex",
                    subtype="key_not_found",
                )
        ref_nodes = format_references(
            foot_domain.reference_style, node["reftype"], references
        ).render(domain.backend)
        return ref_nodes, []
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/nodes.py000066400000000000000000000016461454747122600243310ustar00rootroot00000000000000"""
    .. autoclass:: bibliography
    .. autoclass:: raw_latex
    .. autofunction:: visit_raw_latex
    .. autofunction:: depart_raw_latex
"""

from docutils import nodes
from sphinx.writers.latex import LaTeXTranslator


class bibliography(nodes.General, nodes.Element):
    """Node for representing a bibliography. Replaced by a list of
    citations by
    :class:`~sphinxcontrib.bibtex.transforms.BibliographyTransform`.
    """

    pass


class raw_latex(
    nodes.Special, nodes.Inline, nodes.PreBibliographic, nodes.FixedTextElement
):
    """Node for representing raw latex data."""

    pass


def visit_raw_latex(self: LaTeXTranslator, node: raw_latex):
    """Called when entering a raw_latex node. Appends the node's raw source
    to the latex body.
    """
    self.body.append(node.rawsource)


def depart_raw_latex(self: LaTeXTranslator, node: raw_latex):
    """Called when leaving a raw_latex node."""
    pass
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/plugin.py000066400000000000000000000031201454747122600245040ustar00rootroot00000000000000import sys

if sys.version_info >= (3, 10):
    from importlib.metadata import EntryPoint, entry_points
else:
    from importlib_metadata import entry_points, EntryPoint

from typing import Any, Dict, List, Type

_runtime_plugins: Dict[str, Dict[str, Type]] = {
    "sphinxcontrib.bibtex.style.referencing": {}
}


# wrapper to work around missing type annotations for entry_points function
def _entry_points(group: str, name: str) -> List[EntryPoint]:
    return entry_points(group=group, name=name)  # type: ignore


def find_plugin(group: str, name: str) -> Type[Any]:
    """Load a sphinxcontrib-bibtex plugin, either from the runtime store,
    or from the entry points.
    """
    global _runtime_plugins
    if group not in _runtime_plugins:
        raise ImportError(f"plugin group {group} not found")
    try:
        return _runtime_plugins[group][name]
    except KeyError:
        for entry_point in _entry_points(group=group, name=name):
            return entry_point.load()
    raise ImportError(f"plugin {group}.{name} not found")


def register_plugin(
    group: str, name: str, klass: Type[Any], force: bool = False
) -> bool:
    """Register a sphinxcontrib-bibtex plugin into the runtime store."""
    global _runtime_plugins
    if group not in _runtime_plugins:
        raise ImportError(f"plugin group {group} not found")
    eps: List[Any]
    try:
        eps = [_runtime_plugins[group][name]]
    except KeyError:
        eps = _entry_points(group=group, name=name)
    if not eps or force:
        _runtime_plugins[group][name] = klass
        return True
    else:
        return False
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/py.typed000066400000000000000000000000001454747122600243250ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/richtext.py000066400000000000000000000017071454747122600250510ustar00rootroot00000000000000from abc import ABC
from typing import Generic, TypeVar

from pybtex.richtext import BaseMultipartText, BaseText

ReferenceInfo = TypeVar("ReferenceInfo")
"""Generic type parameter for types that store reference information.
To be implemented by clients. See for instance
:class:`~sphinxcontrib.bibtex.domain.SphinxReferenceInfo`.
"""


class BaseReferenceText(BaseMultipartText, Generic[ReferenceInfo], ABC):
    """Generic rich text element for citation references.
    Instances store some extra reference info that can be used when formatting.
    This base class renders its children without further formatting.
    Implementations must create a derivation from this class which
    overrides the *render* method to create the desired output.
    See for instance
    :class:`~sphinxcontrib.bibtex.domain.SphinxReferenceText`.
    """

    def __init__(self, info: ReferenceInfo, *parts: "BaseText"):
        self.info = (info,)
        super().__init__(*parts)
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/roles.py000066400000000000000000000032021454747122600243330ustar00rootroot00000000000000"""
    .. autoclass:: CitationRef
        :members:

    .. autoclass:: CiteRole
        :show-inheritance:

        .. automethod:: result_nodes
"""

from typing import TYPE_CHECKING, List, NamedTuple, cast

import docutils.nodes
from pybtex.plugin import find_plugin
from sphinx.roles import XRefRole

from .citation_target import CitationTarget, parse_citation_targets

if TYPE_CHECKING:
    from .domain import BibtexDomain


class CitationRef(NamedTuple):
    """Information about a citation reference."""

    citation_ref_id: str  #: Unique id of this citation reference.
    docname: str  #: Document name.
    line: int  #: Line number.
    targets: List[CitationTarget]  #: Citation targets (key, pre, post).


class CiteRole(XRefRole):

    """Class for processing the :rst:role:`cite` role."""

    backend = find_plugin("pybtex.backends", "docutils")()
    innernodeclass = docutils.nodes.inline

    def result_nodes(self, document, env, node, is_ref):
        """Associate the pending_xref with the cite domain,
        and note the cited citation keys.
        """
        if not node.get("refdomain"):
            assert node["reftype"] == "cite"
            node["refdomain"] = "cite"
            node["reftype"] = "p"
        document.note_explicit_target(node, node)  # for backrefs
        domain = cast("BibtexDomain", env.get_domain("cite"))
        domain.citation_refs.append(
            CitationRef(
                citation_ref_id=node["ids"][0],
                docname=env.docname,
                line=document.line,
                targets=list(parse_citation_targets(self.target)),
            )
        )
        return [node], []
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/000077500000000000000000000000001454747122600240005ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/__init__.py000066400000000000000000000000001454747122600260770ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/names/000077500000000000000000000000001454747122600251035ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/names/__init__.py000066400000000000000000000000001454747122600272020ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/names/last.py000066400000000000000000000006441454747122600264240ustar00rootroot00000000000000from pybtex.style.names import BaseNameStyle, name_part
from pybtex.style.template import join


class LastNameStyle(BaseNameStyle):
    """A simple name style for formatting the last name of an author."""

    def format(self, person, abbr=True):
        """Format last names."""

        return join[
            name_part(tie=True)[person.rich_prelast_names],
            name_part[person.rich_last_names],
        ]
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/000077500000000000000000000000001454747122600262675ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/__init__.py000066400000000000000000000154761454747122600304150ustar00rootroot00000000000000from abc import ABC
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Dict, Iterable, List, Optional, Tuple, Union

import pybtex.plugin
from pybtex.richtext import Tag, Text

from sphinxcontrib.bibtex.style.template import (
    author_or_editor_or_title,
    join,
    names,
    sentence,
)

if TYPE_CHECKING:
    from pybtex.database import Entry
    from pybtex.richtext import BaseText
    from pybtex.style import FormattedEntry
    from pybtex.style.names import BaseNameStyle
    from pybtex.style.template import Node

    from sphinxcontrib.bibtex.richtext import ReferenceInfo


@dataclass
class BaseReferenceStyle(ABC):
    """Base class for citation reference styles.

    For consistency, all subclasses of this class must be decorated
    as a :class:`dataclass`,
    and must provide a type annotation and default value for all attributes
    (unless ``init=False`` is used, in which case they can be
    initialized in :meth:`~dataclass.__post_init__`).
    This allows client code to instantiate any reference style
    without needing to specify any arguments through the constructor.
    """

    # see https://stackoverflow.com/a/59987363 as to why this is here
    def __post_init__(self):
        pass

    def role_names(self) -> Iterable[str]:
        """Get list of role names supported by this style."""
        raise NotImplementedError

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        """Returns outer template for formatting the references."""
        raise NotImplementedError

    def inner(self, role_name: str) -> "Node":
        """Returns inner template for formatting the references."""
        raise NotImplementedError


def format_references(
    style: BaseReferenceStyle,
    role_name: str,
    references: Iterable[Tuple["Entry", "FormattedEntry", "ReferenceInfo"]],
) -> "BaseText":
    """Format the list of references according to the given role.

    First formats each reference using the style's
    :meth:`~BaseReferenceStyle.inner` method,
    then joins all these formatted references together using
    the style's :meth:`~BaseReferenceStyle.outer` method.
    """
    children = [
        style.inner(role_name).format_data(
            data=dict(
                entry=entry,
                formatted_entry=formatted_entry,
                reference_info=info,
                style=style,
            )
        )
        for entry, formatted_entry, info in references
    ]
    return style.outer(role_name, children).format()


@dataclass
class BracketStyle:
    """A class which provides brackets, as well as separators
    and a function to facilitate formatting of the outer template.
    """

    #: Left bracket.
    left: Union["BaseText", str] = "["

    #: Right bracket.
    right: Union["BaseText", str] = "]"

    #: Separators used for outer template (i.e. in between references
    #: if multiple keys are referenced in a single citation).
    sep: Union["BaseText", str] = ", "

    #: Separator for outer template, if only two items.
    sep2: Optional[Union["BaseText", str]] = None

    #: Separator for outer template, for last item if three or more items.
    last_sep: Optional[Union["BaseText", str]] = None

    def outer(
        self, children: List["BaseText"], brackets=False, capfirst=False
    ) -> "Node":
        """Creates an outer template with separators,
        adding brackets if requested,
        and capitalizing the first word if requested.
        """
        return join[
            self.left if brackets else "",
            sentence(
                capfirst=capfirst,
                add_period=False,
                sep=self.sep,
                sep2=self.sep2,
                last_sep=self.last_sep,
            )[children],
            self.right if brackets else "",
        ]


@dataclass
class PersonStyle:
    """A class providing additional data and helper functions
    to facilitate formatting of person names.
    """

    #: Plugin name of the style used for formatting person names.
    style: str = "last"

    #: Plugin class instance used for formatting person names.
    #: Automatically initialised from :attr:`style`.
    style_plugin: "BaseNameStyle" = field(init=False)

    #: Whether or not to abbreviate first names.
    abbreviate: bool = True

    #: Separator between persons.
    sep: Union["BaseText", str] = ", "

    #: Separator between persons, if only two persons.
    sep2: Optional[Union["BaseText", str]] = " and "

    #: Separator between persons, for last person if three or more persons.
    last_sep: Optional[Union["BaseText", str]] = ", and "

    #: Abbreviation text if three or more persons.
    other: Optional[Union["BaseText", str]] = field(
        default_factory=lambda: Text(" ", Tag("em", "et al."))
    )

    def __post_init__(self):
        self.style_plugin = pybtex.plugin.find_plugin(
            "pybtex.style.names", name=self.style
        )()

    def names(self, role: str, full: bool) -> "Node":
        """Returns a template formatting the persons with correct separators
        and using the full person list if so requested.
        """
        return names(
            role=role,
            sep=self.sep,
            sep2=self.sep2,
            last_sep=self.last_sep,
            other=None if full else self.other,
        )

    def author_or_editor_or_title(self, full: bool) -> "Node":
        """Returns a template formatting the author, falling back on editor
        or title if author is not specified.
        """
        return author_or_editor_or_title(
            sep=self.sep,
            sep2=self.sep2,
            last_sep=self.last_sep,
            other=None if full else self.other,
        )


@dataclass
class GroupReferenceStyle(BaseReferenceStyle):
    """Composes a group of reference styles into a single consistent style."""

    #: List of style types.
    styles: List[BaseReferenceStyle] = field(default_factory=list)

    #: Dictionary from role names to styles.
    #: Automatically initialized from :attr:`styles`.
    role_style: Dict[str, BaseReferenceStyle] = field(default_factory=dict)

    def __post_init__(self):
        super().__post_init__()
        self.role_style.update(
            (role_name, style)
            for style in self.styles
            for role_name in style.role_names()
        )

    def role_names(self):
        return self.role_style.keys()

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        """Gets the outer template associated with *role_name*
        in one of the :attr:`styles`.
        """
        style = self.role_style[role_name]
        return style.outer(role_name, children)

    def inner(self, role_name: str) -> "Node":
        """Gets the inner template associated with *role_name*
        in one of the :attr:`styles`.
        """
        style = self.role_style[role_name]
        return style.inner(role_name)
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/author_year.py000066400000000000000000000061621454747122600311700ustar00rootroot00000000000000from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Union

from sphinxcontrib.bibtex.style.referencing import (
    BracketStyle,
    GroupReferenceStyle,
    PersonStyle,
)

from .basic_author_year import (
    BasicAuthorYearParentheticalReferenceStyle,
    BasicAuthorYearTextualReferenceStyle,
)
from .extra_author import ExtraAuthorReferenceStyle
from .extra_empty import ExtraEmptyReferenceStyle
from .extra_label import ExtraLabelReferenceStyle
from .extra_year import ExtraYearReferenceStyle

if TYPE_CHECKING:
    from pybtex.richtext import BaseText


@dataclass
class AuthorYearReferenceStyle(GroupReferenceStyle):
    """Textual or parenthetical reference by author-year,
    or just by author, label, or year.
    """

    #: Bracket style for textual citations (:cite:t: and variations).
    bracket_textual: BracketStyle = field(default_factory=BracketStyle)

    #: Bracket style for parenthetical citations
    #: (:cite:p: and variations).
    bracket_parenthetical: BracketStyle = field(default_factory=BracketStyle)

    #: Bracket style for author citations
    #: (:cite:author: and variations).
    bracket_author: BracketStyle = field(default_factory=BracketStyle)

    #: Bracket style for label citations
    #: (:cite:label: and variations).
    bracket_label: BracketStyle = field(default_factory=BracketStyle)

    #: Bracket style for year citations
    #: (:cite:year: and variations).
    bracket_year: BracketStyle = field(default_factory=BracketStyle)

    #: Person style (applies to all relevant citation commands).
    person: PersonStyle = field(default_factory=PersonStyle)

    #: Separator between author and year for parenthetical citations.
    author_year_sep: Union["BaseText", str] = ", "

    #: Separator between text and reference for textual citations.
    text_reference_sep: Union["BaseText", str] = " "

    #: Separator between pre-text and citation.
    pre_text_sep: Union["BaseText", str] = " "

    #: Separator between citation and post-text.
    post_text_sep: Union["BaseText", str] = ", "

    def __post_init__(self):
        self.styles.extend(
            [
                BasicAuthorYearParentheticalReferenceStyle(
                    bracket=self.bracket_parenthetical,
                    person=self.person,
                    author_year_sep=self.author_year_sep,
                    pre_text_sep=self.pre_text_sep,
                    post_text_sep=self.post_text_sep,
                ),
                BasicAuthorYearTextualReferenceStyle(
                    bracket=self.bracket_textual,
                    person=self.person,
                    text_reference_sep=self.text_reference_sep,
                    pre_text_sep=self.pre_text_sep,
                    post_text_sep=self.post_text_sep,
                ),
                ExtraAuthorReferenceStyle(
                    bracket=self.bracket_author, person=self.person
                ),
                ExtraLabelReferenceStyle(bracket=self.bracket_label),
                ExtraYearReferenceStyle(bracket=self.bracket_year),
                ExtraEmptyReferenceStyle(),
            ]
        )
        super().__post_init__()
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/basic_author_year.py000066400000000000000000000060671454747122600323350ustar00rootroot00000000000000from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Iterable, List, Union

from sphinxcontrib.bibtex.style.template import (
    join,
    join2,
    post_text,
    pre_text,
    reference,
    year,
)

from . import BaseReferenceStyle, BracketStyle, PersonStyle

if TYPE_CHECKING:
    from pybtex.richtext import BaseText
    from pybtex.style.template import Node


@dataclass
class BasicAuthorYearParentheticalReferenceStyle(BaseReferenceStyle):
    """Parenthetical reference by author-year."""

    #: Bracket style.
    bracket: BracketStyle = field(default_factory=BracketStyle)

    #: Person style.
    person: PersonStyle = field(default_factory=PersonStyle)

    #: Separator between author and year.
    author_year_sep: Union["BaseText", str] = ", "

    #: Separator between pre-text and citation.
    pre_text_sep: Union["BaseText", str] = " "

    #: Separator between citation and post-text.
    post_text_sep: Union["BaseText", str] = ", "

    def role_names(self) -> Iterable[str]:
        return [
            f"{alt}p{full_author}" for alt in ["", "al"] for full_author in ["", "s"]
        ]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        return self.bracket.outer(
            children, brackets="al" not in role_name, capfirst=False
        )

    def inner(self, role_name: str) -> "Node":
        return join2(sep1=self.pre_text_sep, sep2=self.post_text_sep)[
            pre_text,
            reference[
                join(sep=self.author_year_sep)[
                    self.person.author_or_editor_or_title(full="s" in role_name),
                    year,
                ]
            ],
            post_text,
        ]


@dataclass
class BasicAuthorYearTextualReferenceStyle(BaseReferenceStyle):
    """Textual reference by author-year."""

    #: Bracket style.
    bracket: BracketStyle = field(default_factory=BracketStyle)

    #: Person style.
    person: PersonStyle = field(default_factory=PersonStyle)

    #: Separator between text and reference.
    text_reference_sep: Union["BaseText", str] = " "

    #: Separator between pre-text and citation.
    pre_text_sep: Union["BaseText", str] = " "

    #: Separator between citation and post-text.
    post_text_sep: Union["BaseText", str] = ", "

    def role_names(self) -> Iterable[str]:
        return [
            f"{capfirst}t{full_author}"
            for capfirst in ["", "c"]
            for full_author in ["", "s"]
        ]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        return self.bracket.outer(children, brackets=False, capfirst="c" in role_name)

    def inner(self, role_name: str) -> "Node":
        return join(sep=self.text_reference_sep)[
            self.person.author_or_editor_or_title(full="s" in role_name),
            join[
                self.bracket.left,
                join2(sep1=self.pre_text_sep, sep2=self.post_text_sep)[
                    pre_text,
                    reference[year],
                    post_text,
                ],
                self.bracket.right,
            ],
        ]
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/basic_foot.py000066400000000000000000000031751454747122600307570ustar00rootroot00000000000000from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Iterable, List, Union

from sphinxcontrib.bibtex.style.template import footnote_reference, join

from . import BaseReferenceStyle, BracketStyle, PersonStyle

if TYPE_CHECKING:
    from pybtex.richtext import BaseText
    from pybtex.style.template import Node


@dataclass
class BasicFootParentheticalReferenceStyle(BaseReferenceStyle):
    """Parenthetical footnote reference."""

    def role_names(self) -> Iterable[str]:
        return ["p", "ps"]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        return join[children]

    def inner(self, role_name: str) -> "Node":
        return footnote_reference


@dataclass
class BasicFootTextualReferenceStyle(BaseReferenceStyle):
    """Textual footnote reference."""

    #: Bracket style.
    bracket: BracketStyle = field(default_factory=BracketStyle)

    #: Person style.
    person: PersonStyle = field(default_factory=PersonStyle)

    #: Separator between text and reference.
    text_reference_sep: Union["BaseText", str] = " "

    def role_names(self) -> Iterable[str]:
        return [
            f"{capfirst}t{full_author}"
            for capfirst in ["", "c"]
            for full_author in ["", "s"]
        ]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        return self.bracket.outer(children, brackets=False, capfirst="c" in role_name)

    def inner(self, role_name: str) -> "Node":
        return join(sep=self.text_reference_sep)[
            self.person.author_or_editor_or_title(full="s" in role_name),
            footnote_reference,
        ]
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/basic_label.py000066400000000000000000000054641454747122600310720ustar00rootroot00000000000000from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Iterable, List, Union

from sphinxcontrib.bibtex.style.template import (
    entry_label,
    join,
    join2,
    post_text,
    pre_text,
    reference,
)

from . import BaseReferenceStyle, BracketStyle, PersonStyle

if TYPE_CHECKING:
    from pybtex.richtext import BaseText
    from pybtex.style.template import Node


@dataclass
class BasicLabelParentheticalReferenceStyle(BaseReferenceStyle):
    """Reference by label if parenthetical,
    and by author and label if textual.
    """

    #: Bracket style.
    bracket: BracketStyle = field(default_factory=BracketStyle)

    #: Separator between pre-text and citation.
    pre_text_sep: Union["BaseText", str] = " "

    #: Separator between citation and post-text.
    post_text_sep: Union["BaseText", str] = ", "

    def role_names(self) -> Iterable[str]:
        return [
            f"{alt}p{full_author}" for alt in ["", "al"] for full_author in ["", "s"]
        ]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        return self.bracket.outer(
            children, brackets="al" not in role_name, capfirst=False
        )

    def inner(self, role_name: str) -> "Node":
        return join2(sep1=self.pre_text_sep, sep2=self.post_text_sep)[
            pre_text,
            reference[entry_label],
            post_text,
        ]


@dataclass
class BasicLabelTextualReferenceStyle(BaseReferenceStyle):
    """Reference by label if parenthetical,
    and by author and label if textual.
    """

    #: Bracket style.
    bracket: BracketStyle = field(default_factory=BracketStyle)

    #: Person style.
    person: PersonStyle = field(default_factory=PersonStyle)

    #: Separator between text and reference.
    text_reference_sep: Union["BaseText", str] = " "

    #: Separator between pre-text and citation.
    pre_text_sep: Union["BaseText", str] = " "

    #: Separator between citation and post-text.
    post_text_sep: Union["BaseText", str] = ", "

    def role_names(self) -> Iterable[str]:
        return [
            f"{capfirst}t{full_author}"
            for capfirst in ["", "c"]
            for full_author in ["", "s"]
        ]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        return self.bracket.outer(children, brackets=False, capfirst="c" in role_name)

    def inner(self, role_name: str) -> "Node":
        return join(sep=self.text_reference_sep)[
            self.person.author_or_editor_or_title(full="s" in role_name),
            join[
                self.bracket.left,
                join2(sep1=self.pre_text_sep, sep2=self.post_text_sep)[
                    pre_text,
                    reference[entry_label],
                    post_text,
                ],
                self.bracket.right,
            ],
        ]
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/basic_super.py000066400000000000000000000065571454747122600311550ustar00rootroot00000000000000from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Iterable, List, Union

from pybtex.style.template import tag

from sphinxcontrib.bibtex.style.template import (
    entry_label,
    join,
    join2,
    post_text,
    pre_text,
    reference,
)

from . import BaseReferenceStyle, BracketStyle, PersonStyle

if TYPE_CHECKING:
    from pybtex.richtext import BaseText
    from pybtex.style.template import Node


@dataclass
class BasicSuperParentheticalReferenceStyle(BaseReferenceStyle):
    """Reference by label superscript if parenthetical,
    and by author and label superscript if textual.
    """

    #: Bracket style. Left and right brackets are empty by default.
    bracket: BracketStyle = field(
        default_factory=lambda: BracketStyle(left="", right="", sep=",")
    )

    #: Person style.
    person: PersonStyle = field(default_factory=PersonStyle)

    #: Separator between pre-text and citation.
    pre_text_sep: Union["BaseText", str] = " "

    #: Separator between citation and post-text.
    post_text_sep: Union["BaseText", str] = ", "

    def role_names(self) -> Iterable[str]:
        return [
            f"{alt}p{full_author}" for alt in ["", "al"] for full_author in ["", "s"]
        ]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        if "al" not in role_name:
            return tag("sup")[
                self.bracket.outer(children, brackets=True, capfirst=False)
            ]
        else:
            return self.bracket.outer(children, brackets=False, capfirst=False)

    def inner(self, role_name: str) -> "Node":
        return join2(sep1=self.pre_text_sep, sep2=self.post_text_sep)[
            pre_text,
            reference[entry_label],
            post_text,
        ]


@dataclass
class BasicSuperTextualReferenceStyle(BaseReferenceStyle):
    """Reference by label superscript if parenthetical,
    and by author and label superscript if textual.
    """

    #: Bracket style. Left and right brackets are empty by default.
    bracket: BracketStyle = field(
        default_factory=lambda: BracketStyle(left="", right="", sep=", ")
    )

    #: Person style.
    person: PersonStyle = field(default_factory=PersonStyle)

    #: Separator between text and reference.
    text_reference_sep: Union["BaseText", str] = ""

    #: Separator between pre-text and citation.
    pre_text_sep: Union["BaseText", str] = " "

    #: Separator between citation and post-text.
    post_text_sep: Union["BaseText", str] = ", "

    def role_names(self) -> Iterable[str]:
        return [
            f"{capfirst}t{full_author}"
            for capfirst in ["", "c"]
            for full_author in ["", "s"]
        ]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        return self.bracket.outer(children, brackets=False, capfirst="c" in role_name)

    def inner(self, role_name: str) -> "Node":
        return join(sep=self.text_reference_sep)[
            self.person.author_or_editor_or_title(full="s" in role_name),
            tag("sup")[
                join[
                    self.bracket.left,
                    join2(sep1=self.pre_text_sep, sep2=self.post_text_sep)[
                        pre_text,
                        reference[entry_label],
                        post_text,
                    ],
                    self.bracket.right,
                ]
            ],
        ]
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/extra_author.py000066400000000000000000000023271454747122600313520ustar00rootroot00000000000000from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Iterable, List

from sphinxcontrib.bibtex.style.template import reference

from . import BaseReferenceStyle, BracketStyle, PersonStyle

if TYPE_CHECKING:
    from pybtex.richtext import BaseText
    from pybtex.style.template import Node


@dataclass
class ExtraAuthorReferenceStyle(BaseReferenceStyle):
    """Reference just by author names."""

    #: Bracket style.
    bracket: BracketStyle = field(default_factory=BracketStyle)

    #: Person style.
    person: PersonStyle = field(default_factory=PersonStyle)

    def role_names(self) -> Iterable[str]:
        return [
            f"{capfirst}author{parenthetical}{full_author}"
            for parenthetical in ["par", ""]
            for capfirst in (["", "c"] if parenthetical == "" else [""])
            for full_author in ["", "s"]
        ]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        return self.bracket.outer(
            children,
            brackets="par" in role_name,
            capfirst="c" in role_name,
        )

    def inner(self, role_name: str) -> "Node":
        return reference[self.person.author_or_editor_or_title(full="s" in role_name)]
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/extra_empty.py000066400000000000000000000012021454747122600311750ustar00rootroot00000000000000from dataclasses import dataclass
from typing import TYPE_CHECKING, Iterable, List

from sphinxcontrib.bibtex.style.template import join

from . import BaseReferenceStyle

if TYPE_CHECKING:
    from pybtex.richtext import BaseText
    from pybtex.style.template import Node


@dataclass
class ExtraEmptyReferenceStyle(BaseReferenceStyle):
    """A style which generates nothing, similar to LaTeX's nocite."""

    def role_names(self) -> Iterable[str]:
        return ["empty"]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        return join

    def inner(self, role_name: str) -> "Node":
        return join
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/extra_label.py000066400000000000000000000015571454747122600311330ustar00rootroot00000000000000from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Iterable, List

from sphinxcontrib.bibtex.style.template import entry_label, reference

from . import BaseReferenceStyle, BracketStyle

if TYPE_CHECKING:
    from pybtex.richtext import BaseText
    from pybtex.style.template import Node


@dataclass
class ExtraLabelReferenceStyle(BaseReferenceStyle):
    """Reference just by label."""

    #: Bracket style.
    bracket: BracketStyle = field(default_factory=BracketStyle)

    def role_names(self) -> Iterable[str]:
        return ["label", "labelpar"]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        return self.bracket.outer(
            children,
            brackets="par" in role_name,
            capfirst=False,
        )

    def inner(self, role_name: str) -> "Node":
        return reference[entry_label]
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/extra_year.py000066400000000000000000000015351454747122600310100ustar00rootroot00000000000000from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Iterable, List

from sphinxcontrib.bibtex.style.template import reference, year

from . import BaseReferenceStyle, BracketStyle

if TYPE_CHECKING:
    from pybtex.richtext import BaseText
    from pybtex.style.template import Node


@dataclass
class ExtraYearReferenceStyle(BaseReferenceStyle):
    """Reference just by year."""

    #: Bracket style.
    bracket: BracketStyle = field(default_factory=BracketStyle)

    def role_names(self) -> Iterable[str]:
        return ["year", "yearpar"]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        return self.bracket.outer(
            children,
            brackets="par" in role_name,
            capfirst=False,
        )

    def inner(self, role_name: str) -> "Node":
        return reference[year]
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/foot.py000066400000000000000000000023121454747122600276060ustar00rootroot00000000000000from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Union

from . import BracketStyle, GroupReferenceStyle, PersonStyle
from .basic_foot import (
    BasicFootParentheticalReferenceStyle,
    BasicFootTextualReferenceStyle,
)

if TYPE_CHECKING:
    from pybtex.richtext import BaseText


@dataclass
class FootReferenceStyle(GroupReferenceStyle):
    """Textual or parenthetical reference using footnotes."""

    #: Bracket style for textual citations (:cite:t: and variations).
    bracket_textual: BracketStyle = field(default_factory=BracketStyle)

    #: Person style (applies to all relevant citation commands).
    person: PersonStyle = field(default_factory=PersonStyle)

    #: Separator between text and reference for textual citations.
    text_reference_sep: Union["BaseText", str] = ""

    def __post_init__(self):
        self.styles.extend(
            [
                BasicFootParentheticalReferenceStyle(),
                BasicFootTextualReferenceStyle(
                    bracket=self.bracket_textual,
                    person=self.person,
                    text_reference_sep=self.text_reference_sep,
                ),
            ]
        )
        super().__post_init__()
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/label.py000066400000000000000000000055051454747122600277250ustar00rootroot00000000000000from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Union

from sphinxcontrib.bibtex.style.referencing import (
    BracketStyle,
    GroupReferenceStyle,
    PersonStyle,
)

from .basic_label import (
    BasicLabelParentheticalReferenceStyle,
    BasicLabelTextualReferenceStyle,
)
from .extra_author import ExtraAuthorReferenceStyle
from .extra_empty import ExtraEmptyReferenceStyle
from .extra_label import ExtraLabelReferenceStyle
from .extra_year import ExtraYearReferenceStyle

if TYPE_CHECKING:
    from pybtex.richtext import BaseText


@dataclass
class LabelReferenceStyle(GroupReferenceStyle):
    """Textual or parenthetical reference by label,
    or just by author, label, or year.
    """

    #: Bracket style for textual citations (:cite:t: and variations).
    bracket_textual: BracketStyle = field(default_factory=BracketStyle)

    #: Bracket style for parenthetical citations
    #: (:cite:p: and variations).
    bracket_parenthetical: BracketStyle = field(default_factory=BracketStyle)

    #: Bracket style for author citations
    #: (:cite:author: and variations).
    bracket_author: BracketStyle = field(default_factory=BracketStyle)

    #: Bracket style for label citations
    #: (:cite:label: and variations).
    bracket_label: BracketStyle = field(default_factory=BracketStyle)

    #: Bracket style for year citations
    #: (:cite:year: and variations).
    bracket_year: BracketStyle = field(default_factory=BracketStyle)

    #: Person style.
    person: PersonStyle = field(default_factory=PersonStyle)

    #: Separator between text and reference for textual citations.
    text_reference_sep: Union["BaseText", str] = " "

    #: Separator between pre-text and citation.
    pre_text_sep: Union["BaseText", str] = " "

    #: Separator between citation and post-text.
    post_text_sep: Union["BaseText", str] = ", "

    def __post_init__(self):
        self.styles.extend(
            [
                BasicLabelParentheticalReferenceStyle(
                    bracket=self.bracket_parenthetical,
                    pre_text_sep=self.pre_text_sep,
                    post_text_sep=self.post_text_sep,
                ),
                BasicLabelTextualReferenceStyle(
                    bracket=self.bracket_textual,
                    person=self.person,
                    text_reference_sep=self.text_reference_sep,
                    pre_text_sep=self.pre_text_sep,
                    post_text_sep=self.post_text_sep,
                ),
                ExtraAuthorReferenceStyle(
                    bracket=self.bracket_author, person=self.person
                ),
                ExtraLabelReferenceStyle(bracket=self.bracket_label),
                ExtraYearReferenceStyle(bracket=self.bracket_year),
                ExtraEmptyReferenceStyle(),
            ]
        )
        super().__post_init__()
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/referencing/super_.py000066400000000000000000000057371454747122600301520ustar00rootroot00000000000000from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Union

from sphinxcontrib.bibtex.style.referencing import (
    BracketStyle,
    GroupReferenceStyle,
    PersonStyle,
)

from .basic_super import (
    BasicSuperParentheticalReferenceStyle,
    BasicSuperTextualReferenceStyle,
)
from .extra_author import ExtraAuthorReferenceStyle
from .extra_empty import ExtraEmptyReferenceStyle
from .extra_label import ExtraLabelReferenceStyle
from .extra_year import ExtraYearReferenceStyle

if TYPE_CHECKING:
    from pybtex.richtext import BaseText


@dataclass
class SuperReferenceStyle(GroupReferenceStyle):
    """Textual or parenthetical reference by superscripted label,
    or just by author, label, or year.
    """

    #: Bracket style for textual citations (:cite:t: and variations).
    bracket_textual: BracketStyle = field(
        default_factory=lambda: BracketStyle(left="", right="", sep=", ")
    )

    #: Bracket style for parenthetical citations
    #: (:cite:p: and variations).
    bracket_parenthetical: BracketStyle = field(
        default_factory=lambda: BracketStyle(left="", right="", sep=",")
    )

    #: Bracket style for author citations
    #: (:cite:author: and variations).
    bracket_author: BracketStyle = field(default_factory=BracketStyle)

    #: Bracket style for label citations
    #: (:cite:label: and variations).
    bracket_label: BracketStyle = field(default_factory=BracketStyle)

    #: Bracket style for year citations
    #: (:cite:year: and variations).
    bracket_year: BracketStyle = field(default_factory=BracketStyle)

    #: Person style.
    person: PersonStyle = field(default_factory=PersonStyle)

    #: Separator between text and reference for textual citations.
    text_reference_sep: Union["BaseText", str] = ""

    #: Separator between pre-text and citation.
    pre_text_sep: Union["BaseText", str] = " "

    #: Separator between citation and post-text.
    post_text_sep: Union["BaseText", str] = ", "

    def __post_init__(self):
        self.styles.extend(
            [
                BasicSuperParentheticalReferenceStyle(
                    bracket=self.bracket_parenthetical,
                    person=self.person,
                    pre_text_sep=self.pre_text_sep,
                    post_text_sep=self.post_text_sep,
                ),
                BasicSuperTextualReferenceStyle(
                    bracket=self.bracket_textual,
                    person=self.person,
                    text_reference_sep=self.text_reference_sep,
                    pre_text_sep=self.pre_text_sep,
                    post_text_sep=self.post_text_sep,
                ),
                ExtraAuthorReferenceStyle(
                    bracket=self.bracket_author, person=self.person
                ),
                ExtraLabelReferenceStyle(bracket=self.bracket_label),
                ExtraYearReferenceStyle(bracket=self.bracket_year),
                ExtraEmptyReferenceStyle(),
            ]
        )
        super().__post_init__()
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/style/template.py000066400000000000000000000212511454747122600261660ustar00rootroot00000000000000"""
.. autofunction:: sphinxcontrib.bibtex.style.template.join(\
        sep='', sep2=None, last_sep=None, other=None)

.. autofunction:: sphinxcontrib.bibtex.style.template.sentence(\
        capfirst=False, capitalize=False, add_period=True, \
        sep=', ', sep2=None, last_sep=None, other=None)

.. autofunction:: sphinxcontrib.bibtex.style.template.names(\
        role, sep='', sep2=None, last_sep=None, other=None)

.. autofunction:: sphinxcontrib.bibtex.style.template.entry_label()

.. autofunction:: sphinxcontrib.bibtex.style.template.reference()

.. autofunction:: sphinxcontrib.bibtex.style.template.footnote_reference()
"""

from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, cast

import docutils.nodes
import pybtex_docutils
from pybtex.richtext import Text
from pybtex.style.template import (
    FieldIsMissing,
    Node,
    _format_list,
    field,
    first_of,
    optional,
    tag,
)
from sphinx.util.nodes import make_refnode

from sphinxcontrib.bibtex.nodes import raw_latex
from sphinxcontrib.bibtex.richtext import BaseReferenceText

if TYPE_CHECKING:
    from pybtex.backends import BaseBackend
    from pybtex.richtext import BaseText
    from pybtex.style import FormattedEntry
    from sphinx.builders import Builder


# extended from pybtex: also copies the docstring into the wrapped object
def node(f):
    n = Node(f.__name__, f)
    n.__doc__ = f.__doc__
    return n


# copied from pybtex join but extended to allow "et al" formatting
@node
def join(children, data, sep="", sep2=None, last_sep=None, other=None):
    """Join text fragments together."""

    if sep2 is None:
        sep2 = sep
    if last_sep is None:
        last_sep = sep
    parts = [part for part in _format_list(children, data) if part]
    if len(parts) <= 1:
        return Text(*parts)
    elif len(parts) == 2:
        return Text(sep2).join(parts)
    elif other is None:
        return Text(last_sep).join([Text(sep).join(parts[:-1]), parts[-1]])
    else:
        return Text(parts[0], other)


@node
def join2(children, data, sep1="", sep2=""):
    """Join text fragments together."""
    if not children:
        return Text()
    else:
        return join(sep=sep1)[children[0], join(sep=sep2)[children[1:]]].format_data(
            data
        )


# copied from pybtex names but using the new join
@node
def sentence(
    children,
    data,
    capfirst=False,
    capitalize=False,
    add_period=True,
    sep=", ",
    sep2=None,
    last_sep=None,
    other=None,
):
    """Join text fragments, capitalize the first letter,
    and add a period to the end.
    """
    text = join(sep=sep, sep2=sep2, last_sep=last_sep, other=other)[
        children
    ].format_data(data)
    if capfirst:
        text = text.capfirst()
    if capitalize:
        text = text.capitalize()
    if add_period:
        text = text.add_period()
    return text


# copied from pybtex names but using the new join allowing "et al" formatting
@node
def names(children, data, role, **kwargs):
    """Return formatted names."""
    assert not children
    try:
        persons = data["entry"].persons[role]
    except KeyError:
        raise FieldIsMissing(role, data["entry"])
    style = data["style"]
    formatted_names = [
        style.person.style_plugin.format(person, style.person.abbreviate)
        for person in persons
    ]
    return join(**kwargs)[formatted_names].format_data(data)


@node
def entry_label(children, data) -> "BaseText":
    """Node for inserting the label of a formatted entry."""
    assert not children
    entry = cast("FormattedEntry", data["formatted_entry"])
    return Text(entry.label)


class SphinxReferenceInfo(NamedTuple):
    """Tuple containing reference info to enable sphinx to resolve a reference
    to a citation.
    """

    builder: "Builder"  #: The Sphinx builder.
    fromdocname: str  #: Document name of the citation reference.
    todocname: str  #: Document name of the bibliography.
    citation_id: str  #: Unique id of the citation within the bibliography.
    title: str  #: Title attribute for reference node.
    pre_text: str  #: Text to come before citation.
    post_text: str  #: Text to come after citation.


class SphinxReferenceText(BaseReferenceText[SphinxReferenceInfo]):
    """Pybtex rich text class generating
    a docutils reference node to a citation
    for use with :class:`SphinxReferenceInfo`.
    """

    def render(self, backend: "BaseBackend") -> List[docutils.nodes.Element]:
        assert isinstance(
            backend, pybtex_docutils.Backend
        ), "SphinxReferenceText only supports the docutils backend"
        info = self.info[0]
        if info.builder.name == "latex":
            key = f"cite.{info.todocname}:{info.citation_id}"
            return (
                [raw_latex(f"\\hyperlink{{{key}}}{{")]
                + super().render(backend)
                + [raw_latex("}")]
            )
        elif info.builder.name == "rinoh":
            children = super().render(backend)
            refid = f"%{info.todocname}#{info.citation_id}"
            refnode = docutils.nodes.citation_reference(
                text=children[0], refid=refid, reftitle=info.title
            )
            refnode.extend(children[1:])
            return [refnode]
        else:
            children = super().render(backend)
            # make_refnode only takes a single child
            refnode2 = make_refnode(
                builder=info.builder,
                fromdocname=info.fromdocname,
                todocname=info.todocname,
                targetid=info.citation_id,
                child=children[0],
                title=info.title,
            )
            refnode2.extend(children[1:])  # type: ignore
            return [refnode2]


@node
def reference(children, data: Dict[str, Any]):
    """Pybtex node for inserting a docutils reference node to a citation.
    The children of the node
    comprise the content of the reference, and any referencing information
    is stored in the *reference_info* key of the *data*.
    The data must also contain a *style* key pointing to the corresponding
    :class:`~sphinxcontrib.bibtex.style.referencing.BaseReferenceStyle`.
    """
    parts = _format_list(children, data)
    info = data["reference_info"]
    assert isinstance(info, SphinxReferenceInfo)
    return SphinxReferenceText(info, *parts)


@node
def pre_text(children, data: Dict[str, Any]):
    assert not children
    info = data["reference_info"]
    assert isinstance(info, SphinxReferenceInfo)
    return Text(info.pre_text)


@node
def post_text(children, data: Dict[str, Any]):
    assert not children
    info = data["reference_info"]
    assert isinstance(info, SphinxReferenceInfo)
    return Text(info.post_text)


class FootReferenceInfo(NamedTuple):
    """Tuple containing reference info to enable sphinx to resolve a footnote
    reference.
    """

    key: str  #: Citation key.
    document: "docutils.nodes.document"  #: Current docutils document.
    refname: str  #: Citation reference name.


class FootReferenceText(BaseReferenceText[FootReferenceInfo]):
    """Pybtex rich text class generating
    a docutils footnote_reference node to a citation
    for use with :class:`FootReferenceInfo`.
    """

    def render(self, backend: "BaseBackend"):
        assert isinstance(
            backend, pybtex_docutils.Backend
        ), "FootReferenceText only supports the docutils backend"
        info = self.info[0]
        # see docutils.parsers.rst.states.Body.footnote_reference()
        refnode = docutils.nodes.footnote_reference(
            "[#%s]_" % info.key, refname=info.refname, auto=1
        )
        info.document.note_autofootnote_ref(refnode)
        info.document.note_footnote_ref(refnode)
        return [refnode]


@node
def footnote_reference(children, data: Dict[str, Any]):
    """Pybtex node for inserting a footnote_reference docutils node.
    Any referencing information
    is stored in the *reference_info* key of the *data*.
    The data must also contain a *style* key pointing to the corresponding
    :class:`~sphinxcontrib.bibtex.style.referencing.BaseReferenceStyle`.
    """
    assert not children
    info = data["reference_info"]
    assert isinstance(info, FootReferenceInfo)
    # we need to give the footnote text some fake content
    # otherwise pybtex richtext engine will mess things up
    return FootReferenceText(info, "#")


@node
def year(children, data: Dict[str, Any]) -> "BaseText":
    assert not children
    return first_of[optional[field("year")], "n.d."].format_data(data)


@node
def author_or_editor_or_title(children, data, **kwargs):
    assert not children
    return first_of[
        optional[names("author", **kwargs)],
        optional[names("editor", **kwargs)],
        tag("em")[field("title")],
    ].format_data(data)
sphinxcontrib-bibtex-2.6.2/src/sphinxcontrib/bibtex/transforms.py000066400000000000000000000116101454747122600254070ustar00rootroot00000000000000"""
    .. autoclass:: BibliographyTransform
        :show-inheritance:

        .. autoattribute:: default_priority
        .. automethod:: run
"""
from itertools import zip_longest
from typing import TYPE_CHECKING, cast

import docutils.nodes
from pybtex.plugin import find_plugin
from sphinx.transforms.post_transforms import SphinxPostTransform
from sphinx.util.logging import getLogger

from .directives import BibliographyKey
from .nodes import bibliography as bibliography_node

if TYPE_CHECKING:
    from sphinx.environment import BuildEnvironment

    from .domain import BibtexDomain

logger = getLogger(__name__)


def node_text_transform(node: docutils.nodes.Element) -> None:
    """Apply extra text transformations to a node."""
    for child, next_child in zip_longest(node.children[:], node.children[1:]):
        if isinstance(child, docutils.nodes.Text):
            if child.endswith(r"\url ") and isinstance(next_child, docutils.nodes.Text):
                node.replace(child, docutils.nodes.Text(child[:-5]))
                ref_node = docutils.nodes.reference(refuri=next_child.astext())
                ref_node += next_child
                node.replace(next_child, ref_node)
        elif isinstance(child, docutils.nodes.Element):  # pragma: no branch
            node_text_transform(child)


class BibliographyTransform(SphinxPostTransform):
    """A docutils transform to generate citation entries for
    bibliography nodes.
    """

    # transform must be applied before sphinx runs its ReferencesResolver
    # which has priority 10, so when ReferencesResolver calls the cite domain
    # resolve_xref, the target is present and all will work fine
    default_priority = 5
    backend = find_plugin("pybtex.backends", "docutils")()

    def run(self, **kwargs):
        """Transform each
        :class:`~sphinxcontrib.bibtex.nodes.bibliography` node into a
        list of citations.
        """
        env = cast("BuildEnvironment", self.document.settings.env)
        domain = cast("BibtexDomain", env.get_domain("cite"))
        # Can just use "findall" once docutils 0.18+ is required
        meth = "findall" if hasattr(self.document, "findall") else "traverse"
        for bibnode in getattr(self.document, meth)(bibliography_node):
            # reminder: env.docname may be equal to 'index' instead of
            # bibnode['docname'] in post-transform phase (e.g. latex builder)
            bib_key = BibliographyKey(docname=bibnode["docname"], id_=bibnode["ids"][0])
            bibliography = domain.bibliographies[bib_key]
            citations = [
                citation
                for citation in domain.citations
                if citation.bibliography_key == bib_key
            ]
            # create citation nodes for all references
            if bibliography.list_ == "enumerated":
                nodes = docutils.nodes.enumerated_list()
                nodes["enumtype"] = bibliography.enumtype
                if bibliography.start >= 1:
                    nodes["start"] = bibliography.start
                    env.temp_data["bibtex_enum_count"] = bibliography.start
                else:
                    nodes["start"] = env.temp_data.setdefault("bibtex_enum_count", 1)
            elif bibliography.list_ == "bullet":
                nodes = docutils.nodes.bullet_list()
            else:  # "citation"
                nodes = []
            for citation in citations:
                citation_node = bibliography.citation_nodes[citation.key]
                if bibliography.list_ in {"enumerated", "bullet"}:
                    citation_node += self.backend.paragraph(citation.formatted_entry)
                else:  # "citation"
                    # backrefs only supported in same document
                    backrefs = [
                        citation_ref.citation_ref_id
                        for citation_ref in domain.citation_refs
                        if bib_key.docname == citation_ref.docname
                        and citation.key
                        in {target.key for target in citation_ref.targets}
                    ]
                    if backrefs:
                        citation_node["backrefs"] = backrefs
                    citation_node += docutils.nodes.label(
                        "", citation.formatted_entry.label, support_smartquotes=False
                    )
                    citation_node += self.backend.paragraph(citation.formatted_entry)
                citation_node["docname"] = bib_key.docname
                node_text_transform(citation_node)
                nodes.append(citation_node)
                if bibliography.list_ == "enumerated":
                    env.temp_data["bibtex_enum_count"] += 1
            if citations:
                final_node = domain.bibliography_header.deepcopy()
                final_node += nodes
                bibnode.replace_self(final_node)
            else:
                bibnode.replace_self(docutils.nodes.target())
sphinxcontrib-bibtex-2.6.2/test/000077500000000000000000000000001454747122600166615ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/test/__init__.py000066400000000000000000000000001454747122600207600ustar00rootroot00000000000000sphinxcontrib-bibtex-2.6.2/test/common.py000066400000000000000000000154051454747122600205300ustar00rootroot00000000000000"""Some common helper functions for the test suite."""

import re
from typing import Optional

import docutils

RE_ID = r"[a-z][-?a-z0-9]*"
RE_NUM = r"\d+"
RE_LABEL = r"[^<]+"
RE_TEXT = r".*"
RE_DOCNAME = r"[^:]+"
RE_TITLE = r'[^"]*'


def html_citation_refs(refid=RE_ID, label=RE_LABEL, title: Optional[str] = RE_TITLE):
    title_pattern = rf' title="(?P{title})"' if title is not None else ""
    return re.compile(
        r'<a class="reference internal"'
        r' href="(?P<refdoc>[^#]+)?#(?P<refid>{refid})"'
        r"{title_pattern}"
        r">"
        r"(?P<label>{label})"
        r"</a>".format(refid=refid, label=label, title_pattern=title_pattern)
    )


# match single citation with square brackets
# also gets the id of the citation itself (which will appear in backref)
def html_citation_refs_single(
    id_=RE_ID, refid=RE_ID, label=RE_LABEL, title: Optional[str] = RE_TITLE
):
    title_pattern = rf' title="{title}"' if title is not None else ""
    return re.compile(
        r'<span id="(?P<id_>{id_})">\['
        r'<a class="reference internal"'
        r' href="(?P<refdoc>[^#]+)?#(?P<refid>{refid})"'
        r"{title_pattern}"
        r">"
        r"(?P<label>{label})"
        r"</a>"
        r"]</span>".format(
            id_=id_, refid=refid, label=label, title_pattern=title_pattern
        )
    )


def html_docutils_citation_refs(refid=RE_ID, label=RE_LABEL, id_=RE_ID):
    return re.compile(
        r'<a class="reference internal" '
        r'href="(?P<refdoc>[^#]+)?#(?P<refid>{refid})" '
        r'id="(?P<id_>{id_})">'
        r"<span>\[(?P<label>{label})]</span>"
        r"</a>".format(refid=refid, label=label, id_=id_)
    )


def html_citations(id_=RE_ID, label=RE_LABEL, text=RE_TEXT):
    if docutils.__version_info__ < (0, 18):
        return re.compile(
            r'<dt class="label" id="(?P<id_>{id_})">'
            r'<span class="brackets">'
            r'(?:<a class="fn-backref" href="#(?P<backref>{backref_id})">)?'
            r"(?P<label>{label})"
            r"(?:</a>)?"
            r"</span>"
            r'(?:<span class="fn-backref">\('
            r'<a href="#(?P<backref1>{backref_id})">1</a>'
            r',<a href="#(?P<backref2>{backref_id}\w+)">2</a>'
            r'(,<a href="#(?P<backref3>{backref_id}\w+)">3</a>)?'
            r'(,<a href="#\w+">\d+</a>)*'  # no named group for extra backrefs
            r"\)</span>)?"
            r"</dt>\n"
            r"<dd><p>(?P<text>{text})</p>\n</dd>".format(
                id_=id_, label=label, text=text, backref_id=RE_ID
            )
        )
    else:
        return re.compile(
            r'<div class="citation" id="(?P<id_>{id_})"'
            r' role="doc-biblioentry">\s*'
            r'<span class="label">'
            r'<span class="fn-bracket">\[</span>'
            r'(?:<a role="doc-backlink" href="#(?P<backref>{backref_id})">)?'
            r"(?P<label>{label})"
            r"(?:</a>)?"
            r'<span class="fn-bracket">]</span>'
            r"</span>\s*"
            r'(?:<span class="backrefs">\('
            r'<a {back_role} href="#(?P<backref1>{backref_id})">1</a>'
            r',<a {back_role} href="#(?P<backref2>{backref_id}\w+)">2</a>'
            r'(,<a {back_role} href="#(?P<backref3>{backref_id}\w+)">3</a>)?'
            r'(,<a {back_role} href="#\w+">\d+</a>)*'
            r"\)</span>\s*)?"
            r"<p>(?P<text>{text})</p>\s*"
            r"</div>".format(
                back_role='role="doc-backlink"',
                id_=id_,
                label=label,
                text=text,
                backref_id=RE_ID,
            )
        )


def html_footnote_refs(refid=RE_ID):
    if docutils.__version_info__ < (0, 18):
        return re.compile(
            r'<a class="footnote-reference brackets"'
            r' href="#(?P<refid>{refid})" id="(?P<id_>{id_})">'
            r"(?P<label>{label})"
            r"</a>".format(refid=refid, id_=RE_ID, label=RE_NUM)
        )
    else:
        return re.compile(
            r'<a class="footnote-reference brackets" '
            r'href="#(?P<refid>{refid})" id="(?P<id_>{id_})" '
            r'role="doc-noteref">'
            r'<span class="fn-bracket">\[</span>'
            r"(?P<label>{label})"
            r'<span class="fn-bracket">]</span>'
            r"</a>".format(refid=refid, id_=RE_ID, label=RE_NUM)
        )


def html_footnotes(id_=RE_ID, text=RE_TEXT):
    if docutils.__version_info__ < (0, 18):
        return re.compile(
            r'<dt class="label" id="(?P<id_>{id_})">'
            r'<span class="brackets">'
            r'(?:<a class="fn-backref" href="#(?P<backref>{backref_id})">)?'
            r"(?P<label>{label})"
            r"(?:</a>)?"
            r"</span>"
            r'(?:<span class="fn-backref">\('
            r'<a href="#(?P<backref1>{backref_id})">1</a>'
            r',<a href="#(?P<backref2>{backref_id}\w+)">2</a>'
            r'(,<a href="#(?P<backref3>{backref_id}\w+)">3</a>)?'
            r'(,<a href="#\w+">\d+</a>)*'
            r"\)</span>)?"
            r"</dt>\n"
            r"<dd><p>(?P<text>{text})</p>\n</dd>".format(
                id_=id_, backref_id=RE_ID, label=RE_NUM, text=text
            )
        )
    else:
        foot_role = (
            'role="note"'
            if docutils.__version_info__ < (0, 20)
            else 'role="doc-footnote"'
        )
        return re.compile(
            r'<aside class="footnote brackets" id="(?P<id_>{id_})"'
            r" {foot_role}>\s*"
            r'<span class="label">'
            r'<span class="fn-bracket">\[</span>'
            r'(?:<a {back_role} href="#(?P<backref>{backref_id})">)?'
            r"{label}"
            r"(?:</a>)?"
            r'<span class="fn-bracket">]</span>'
            r"</span>\s*"
            r'(?:<span class="backrefs">\('
            r'<a {back_role} href="#(?P<backref1>{backref_id})">1</a>'
            r',<a {back_role} href="#(?P<backref2>{backref_id}\w+)">2</a>'
            r'(,<a {back_role} href="#(?P<backref3>{backref_id}\w+)">3</a>)?'
            r'(,<a {back_role} href="#\w+">\d+</a>)*'
            r"\)</span>\s*)?"
            r"<p>(?P<text>{text})</p>\s*"
            r"</aside>".format(
                foot_role=foot_role,
                back_role='role="doc-backlink"',
                id_=id_,
                label=RE_NUM,
                text=text,
                backref_id=RE_ID,
            )
        )


def latex_citations(docname=RE_DOCNAME, id_=RE_ID, label=RE_LABEL, text=RE_TEXT):
    return re.compile(
        r"\\bibitem\[(?P<label>{label})]"
        r"{{(?P<docname>{docname}):(?P<id_>{id_})}}\n"
        r"\\sphinxAtStartPar\n"
        r"(?P<text>{text})\n".format(docname=docname, label=label, id_=id_, text=text)
    )


def latex_citation_refs(docname=RE_DOCNAME, refid=RE_ID):
    return re.compile(
        rf"\\hyperlink{{cite[.](?P<docname>{docname}):(?P<refid>{refid})}}"
    )
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/conftest.py���������������������������������������������������������0000664�0000000�0000000�00000000674�14547471226�0021067�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import pytest
import sphinx

if sphinx.version_info >= (7, 2):
    from pathlib import Path

    _rootdir = Path(__file__).parent.resolve() / "roots"
else:
    from sphinx.testing.path import path as Path  # type: ignore

    _rootdir = Path(__file__).parent.abspath() / "roots"  # type: ignore

pytest_plugins = "sphinx.testing.fixtures"
collect_ignore = ["roots"]


@pytest.fixture(scope="session")
def rootdir() -> Path:
    return _rootdir
��������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/natbib.py�����������������������������������������������������������0000664�0000000�0000000�00000042267�14547471226�0020505�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# patched version of Weston Nielson's sphinx-natbib

# changes:
#   * fix some typos and flake warnings, add a few type annotations
#   * remove unused latex_to_nodes and SUBSUP_RE
#   * remove latex special casing to fix build error
#   * simplify super calls
#   * fix refdoc bug
#   * use XRefRole.result_nodes instead of XRefRole.__call__
#   * use dictionary as ordered set (assuming Python 3.6+)

from typing import List, Tuple, cast

import docutils.parsers.rst.directives as directives
import pybtex.backends.plaintext
import pybtex.style.names.lastfirst
import pybtex.style.names.plain
from docutils import nodes
from docutils.parsers.rst import Directive
from pybtex.database.input import bibtex
from sphinx import addnodes
from sphinx.domains import Domain, ObjType
from sphinx.environment import BuildEnvironment
from sphinx.locale import _
from sphinx.roles import XRefRole
from sphinx.util import logging

logger = logging.getLogger(__name__)

DEFAULT_CONF = {
    "file": "",
    "brackets": "()",
    "separator": ";",
    "style": "authoryear",  # 'numbers', 'super'
    "sort": False,
    "sort_compress": False,
}

ROLES = [
    "p",
    "ps",
    "alp",
    "alps",
    "t",
    "ts",
    "alt",
    "alts",
    "author",
    "authors",
    "year",
    "yearpar",
    "text",
    "title",
]


def parse_keys(rawtext) -> Tuple[List[str], str, str]:
    # Get the keys and any pre- and post-citation text
    # Spaces nor commas are allowed in cite keys, so we split on commas
    # first.  This will give us a list of keys, however, the last item may have
    # pre- and post-citation text (in brackets "[pre][post]")
    #
    # TODO: This isn't the best implementation and this should also
    #       handle errors
    pre = ""
    post = ""
    keys = []
    for k in rawtext.split(","):
        k = k.strip()  # Remove leading and trailing whitespace
        k = k.split(" ", 1)  # Split on the first space in the key, if any
        if len(k) > 1:
            # We have some extra text here
            k, text = k
            bo, bc = 0, 0
            for c in text.strip():
                if c == "[" and bo == bc:
                    bo += 1
                elif c == "]" and bo == bc + 1:
                    bc += 1
                else:
                    if bc == 0:
                        pre += c
                    else:
                        post += c
            if bc == bo and bc == 1:
                post = pre
                pre = ""
        else:
            k = k[0]
        keys.append(k)
    return keys, pre, post


class Citations:
    def __init__(self, env):
        self.conf = DEFAULT_CONF.copy()
        self.conf.update(env.app.config.natbib)

        self.file_name = None
        self.parser = None
        self.data = None
        self.ref_map = {}
        self.file_name = env.relfn2path(self.conf["file"], env.app.config.master_doc)[1]
        self.parser = bibtex.Parser()
        self.data = self.parser.parse_file(self.file_name)

    def get(self, key):
        return self.data.entries.get(key)


class CitationTransform:
    """
    This class is meant to be applied to a ``docutils.nodes.pending`` node when
    a ``cite`` role is encountered.  Later (during the resolve_xref stage) this
    class can be used to generate the proper citation reference nodes for
    insertion into the actual document.
    """

    def __init__(self, refs, pre, post, typ, global_keys, config):
        self.refs = refs
        self.pre = pre
        self.post = post
        self.config = config
        self.typ = typ
        self.global_keys = global_keys

    def __repr__(self):
        return "<%s>" % self.__str__()

    def __str__(self):
        return ",".join([r.key for r in self.refs])

    def get_ref_num(self, key):
        return list(self.global_keys.keys()).index(key) + 1

    def get_author(self, authors, all_authors=False):
        if len(authors) == 0:
            author = ""
        elif len(authors) > 2 and not all_authors:
            author = "%s et al." % authors[0].last_names[0]
        elif len(authors) == 1:
            author = authors[0].last_names[0]
        else:
            author = "%s and %s" % (
                ", ".join([a.last_names[0] for a in authors[:-1]]),
                authors[-1].last_names[0],
            )
        author = author.replace("{", "")
        author = author.replace("}", "")
        return author

    # TODO refactor to reduce complexity, for now ignore C901
    def cite(self, cmd, refuri, global_keys):  # noqa: C901
        """
        Return a docutils Node consisting of properly formatted citations
        children nodes.
        """
        self.global_keys = global_keys
        bo, bc = self.config["brackets"]
        sep = "%s " % self.config["separator"]
        style = self.config["style"]
        all_auths = cmd.endswith("s")

        if (cmd.startswith("p") or cmd == "yearpar") and style != "super":
            node = nodes.inline(bo, bo, classes=["citation"])
        else:
            node = nodes.inline("", "", classes=["citation"])

        if self.pre:
            pre = "%s " % self.pre
            node += nodes.inline(pre, pre, classes=["pre"])

        for i, ref in enumerate(self.refs):
            authors = ref.persons.get("author", [])
            author_text = self.get_author(authors, all_auths)
            lrefuri = refuri + "#citation-" + nodes.make_id(ref.key)

            if 0 < i < len(self.refs):
                if style == "authoryear":
                    node += nodes.inline(sep, sep)
                else:
                    if style == "super":
                        node += nodes.superscript(", ", ", ")
                    else:
                        node += nodes.inline(", ", ", ")

            if cmd == "title":
                title = ref.fields.get("title")
                if title is None:
                    title = ref.fields.get("key", "")
                author_text = title

            if (
                style == "authoryear" and (cmd.startswith("p") or cmd.startswith("alp"))
            ) or (
                cmd.startswith("t") or cmd.startswith("alt") or cmd.startswith("author")
            ):
                node += nodes.reference(
                    author_text, author_text, internal=True, refuri=lrefuri
                )

                if cmd.startswith("p") or cmd.startswith("alp"):
                    node += nodes.inline(", ", ", ")
                else:
                    node += nodes.inline(" ", " ")

            # Add in either the year or the citation number
            if cmd == "title":
                pass
            elif cmd.startswith("author"):
                pass
            else:
                if style != "authoryear":
                    num = self.get_ref_num(ref.key)
                else:
                    num = ref.fields.get("year")

                refnode = nodes.reference(
                    str(num), str(num), internal=True, refuri=lrefuri
                )

                if cmd.startswith("t") and style != "super":
                    node += nodes.inline(bo, bo)

                if style == "super":
                    node += nodes.superscript("", "", refnode)
                else:
                    node += refnode

                if cmd.startswith("t") and style != "super":
                    node += nodes.inline(bc, bc)

        if self.post:
            post = ", %s" % self.post
            node += nodes.inline(post, post, classes=["post"])

        if (cmd.startswith("p") or cmd == "yearpar") and style != "super":
            node += nodes.inline(bc, bc, classes=["citation"])

        return node


def sort_references(refs, citations):
    def sortkey(key):
        # sort by author last names, but if no author, sort by title
        citation = citations.get(key)
        authorsort = "".join(map(str, citation.persons.get("author", "")))
        if len(authorsort) > 0:
            authorsort = authorsort.replace("{", "")
            authorsort = authorsort.replace("}", "")
            return authorsort.upper()
        titlesort = citation.fields.get("title", "")
        titlesort = titlesort.replace("{", "")
        titlesort = titlesort.replace("}", "")
        return titlesort.upper()

    sortedrefs = sorted(refs, key=sortkey)
    return {ref: None for ref in sortedrefs}


class CitationXRefRole(XRefRole):
    def result_nodes(
        self,
        document: nodes.document,
        env: BuildEnvironment,
        node: nodes.Element,
        is_ref: bool,
    ) -> Tuple[List[nodes.Node], List[nodes.system_message]]:
        """
        When a ``cite`` role is encountered, we replace it with a
        ``docutils.nodes.pending`` node that uses a ``CitationTransform`` for
        generating the proper citation reference representation during the
        resolve_xref phase.
        """
        domain = cast(CitationDomain, env.get_domain("cite"))

        # Get the config at this point in the document
        config = {}
        for opt in ["style", "brackets", "separator", "sort", "sort_compress"]:
            config[opt] = env.temp_data.get(
                "cite_%s" % opt,
                env.domaindata["cite"]["conf"].get(opt, DEFAULT_CONF[opt]),
            )

        if self.name == "cite:text":
            # A ``text`` citation is unique because it doesn't reference a
            # cite-key
            keys: List[str] = []
            pre, post = self.text, ""
        else:
            keys, pre, post = parse_keys(self.text)
            for key in keys:
                if domain.citations.get(key) is None:
                    logger.warning(
                        "cite-key `%s` not found in bibtex file" % key,
                        location=(env.docname, self.lineno),
                    )
                    continue
                env.domaindata["cite"]["keys"][key] = None
                env.domaindata["cite"]["keys"] = sort_references(
                    env.domaindata["cite"]["keys"], domain.citations
                )

        data = {
            "keys": keys,
            "pre": pre,
            "post": post,
            "typ": self.name,
            "global_keys": env.domaindata["cite"]["keys"],
            "config": config,
        }

        # TODO bad design here, pending is meant to get the Transform object
        node += nodes.pending(CitationTransform, data)  # type: ignore
        return [node], []


class CitationConfDirective(Directive):
    """
    Allows the user to change the citation style on a per-page or
    per-block basis.
    """

    has_content = False
    required_arguments = 0
    optional_arguments = 1
    option_spec = {
        "brackets": directives.unchanged,
        "separator": directives.unchanged,
        "style": directives.unchanged,
        "sort": directives.flag,
        "sort_compress": directives.flag,
    }

    def run(self):
        env = self.state.document.settings.env

        # TODO: verify options
        if self.arguments:
            env.temp_data["cite_style"] = self.arguments[0]
        else:
            env.temp_data["cite_style"] = self.options.get(
                "style", DEFAULT_CONF["style"]
            )

        try:
            self.options.pop("style")
        except KeyError:
            pass

        for k, v in self.options.items():
            env.temp_data["cite_%s" % k] = v

        return []


class CitationReferencesDirective(Directive):
    """
    Generates the actual reference list.
    """

    has_content = False
    required_arguments = 0
    optional_arguments = 0

    # TODO: Implement support for multiple bib files
    option_spec = {
        "path": directives.unchanged,
    }

    # TODO refactor to reduce complexity, for now ignore C901
    def get_reference_node(self, ref):  # noqa: C901
        node = nodes.inline("", "", classes=[ref.type, "reference"])

        namestyler = pybtex.style.names.plain.NameStyle()
        plaintext = pybtex.backends.plaintext.Backend()

        # Authors
        authors = ref.persons.get("author", [])
        for i, author in enumerate(authors):
            authortext = namestyler.format(author, abbr=True).format().render(plaintext)
            authortext = authortext.replace("{", "")
            authortext = authortext.replace("}", "")
            text = authortext

            text = text.strip()
            auth_node = nodes.inline(text, text)
            auth_node["classes"].append("author")
            node += auth_node

            if i + 1 < len(authors):
                node += nodes.inline(", ", ", ")
            else:
                ending = "%s  " % ("" if text.endswith(".") else ".")
                node += nodes.inline(ending, ending)

        # Title
        title = ref.fields.get("title")
        if title is None:
            title = ref.fields.get("key")
        if title:
            title = title.replace("{", "")
            title = title.replace("}", "")
            node += nodes.inline(title, title, classes=["title"])
            node += nodes.inline(".  ", ".  ")

        # @phdthesis
        if ref.type == "phdthesis":
            school = ref.fields.get("school")
            text = "PhD Thesis, %s, " % school
            node += nodes.inline(text, text)

        # Publication
        pub = ref.fields.get("journal")
        if not pub:
            pub = ref.fields.get("booktitle")
        if pub:
            pub = pub.replace("{", "")
            pub = pub.replace("}", "")
            node += nodes.emphasis(pub, pub, classes=["publication"])
            node += nodes.inline(", ", ", ")

        vol = ref.fields.get("volume")
        pages = ref.fields.get("pages")
        year = ref.fields.get("year")

        if pub is None:
            howpub = ref.fields.get("howpublished")
            if howpub is not None and howpub.startswith("\\url{"):
                url = howpub[5:-1]
                refnode = nodes.reference("", "", internal=False, refuri=url)
                refnode += nodes.Text(url)
                node += refnode
                if vol or pages or year:
                    node += nodes.inline(", ", ", ")

        if vol:
            node += nodes.inline(vol, vol, classes=["volume"])
            node += nodes.inline(":", ":")

        if pages:
            node += nodes.inline(pages, pages, classes=["pages"])
            node += nodes.inline(", ", ", ")

        if year:
            node += nodes.inline(year, year, classes=["year"])
            node += nodes.inline(".", ".")

        return node

    def run(self):
        """
        Generate the definition list that displays the actual references.
        """
        env = self.state.document.settings.env
        keys = env.domaindata["cite"]["keys"]
        env.domaindata["cite"]["refdoc"] = env.docname

        citations = env.domains["cite"].citations

        tbody = nodes.tbody("")
        for i, key in enumerate(keys):
            row = nodes.row("")
            nid = "citation-%s" % nodes.make_id(key)
            row["classes"].append("footnote")
            row["ids"].append(nid)
            row["names"].append(nid)

            numcol = nodes.entry("", nodes.paragraph("", "[%d]" % (i + 1)))
            definition = self.get_reference_node(citations.get(key))
            refcol = nodes.entry("", nodes.paragraph("", "", definition))
            row.extend([numcol, refcol])

            tbody.append(row)

        table_spec_node = addnodes.tabular_col_spec()
        table_spec_node["spec"] = "cl"

        node = nodes.table(
            "",
            table_spec_node,
            nodes.tgroup(
                "",
                nodes.colspec(colwidth=10, classes=["label"]),
                nodes.colspec(colwidth=90),
                tbody,
            ),
        )

        return [node]


class CitationDomain(Domain):
    name = "cite"
    label = "citation"

    object_types = {
        "citation": ObjType(_("citation"), *ROLES, searchprio=-1),
    }

    directives = {"conf": CitationConfDirective, "refs": CitationReferencesDirective}
    roles = dict([(r, CitationXRefRole()) for r in ROLES])

    initial_data = {
        "keys": {},  # cite-keys in order of reference using dict as sorted set
        "conf": DEFAULT_CONF,
        "refdoc": None,
    }

    def __init__(self, env):
        super().__init__(env)

        # Update conf
        self.data["conf"].update(env.app.config.natbib)

        # TODO: warn if citations can't parse bibtex file
        self.citations = Citations(env)

    def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
        refdoc = self.data["refdoc"]
        if not refdoc:
            logger.warning(
                "no `refs` directive found; citations will have dead links",
                location=node,
            )
            refuri = ""
        else:
            refuri = builder.get_relative_uri(fromdocname, refdoc)

        for nd in node.children:
            if isinstance(nd, nodes.pending):
                nd.details["refs"] = []

                for key in nd.details.pop("keys"):
                    ref = self.citations.get(key)
                    if ref is None:
                        continue
                    nd.details["refs"].append(ref)

                transform = nd.transform(**nd.details)
                node = transform.cite(typ, refuri, global_keys=self.data["keys"])

        return node


def setup(app):
    app.add_config_value("natbib", DEFAULT_CONF, "env")
    app.add_domain(CitationDomain)
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/��������������������������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0020027�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/.gitignore����������������������������������������������������0000664�0000000�0000000�00000000007�14547471226�0022014�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������_build/�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autoapi/�������������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0022446�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autoapi/conf.py������������������������������������������0000664�0000000�0000000�00000000462�14547471226�0023747�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex", "autoapi.extension"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
autoapi_python_class_content = "both"  # document __init__ method too
autoapi_dirs = ["some_module/"]
autoapi_keep_files = True  # useful for debugging
autoapi_add_toctree_entry = False
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autoapi/index.rst����������������������������������������0000664�0000000�0000000�00000000113�14547471226�0024302�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������index
=====

.. toctree::

   autoapi/some_module/index

.. bibliography::
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autoapi/some_module/�������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024756�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autoapi/some_module/__init__.py��������������������������0000664�0000000�0000000�00000000023�14547471226�0027062�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""Some module."""
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autoapi/some_module/cite.py������������������������������0000664�0000000�0000000�00000002152�14547471226�0026254�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""Docstring for some_module. :cite:`testmodule`"""


def func(funcarg):
    """Docstring for function func.

    Long description goes here. See :cite:`testfunc`.

    :param funcarg: Docstring for parameter. :cite:`testfuncarg`
    """


a = 1
"""Docstring for variable a.

Long description goes here. See :cite:`testdata`.
"""


class Foo:
    """Docstring for class Foo.

    Long description goes here. See :cite:`testclass`.
    """

    b = 2
    """Docstring for class attribute b.

    Long description goes here. See :cite:`testclassattr`.
    """

    def __init__(self, initarg):
        """Docstring for constructor.

        Long description goes here. See :cite:`testinit`

        :param initarg: Docstring for parameter. :cite:`testinitarg`
        """

        self.c = 3
        """Docstring for instance attribute c.

        Long description goes here. See :cite:`testinstanceattr`.
        """

    def method(self, methodarg):
        """Docstring for method.

        Long description goes here. See :cite:`testmethod`.

        :param methodarg: Docstring for parameter. :cite:`testmethodarg`
        """
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autoapi/some_module/footcite.py��������������������������0000664�0000000�0000000�00000002564�14547471226�0027153�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""Docstring for some_module. :footcite:`testmodule`

.. footbibliography::
"""


def func(funcarg):
    """Docstring for function func.

    Long description goes here. See :footcite:`testfunc`.

    :param funcarg: Docstring for parameter. :footcite:`testfuncarg`

    .. footbibliography::
    """


a = 1
"""Docstring for variable a.

Long description goes here. See :footcite:`testdata`.

.. footbibliography::
"""


class Foo:
    """Docstring for class Foo.

    Long description goes here. See :footcite:`testclass`.

    .. footbibliography::
    """

    b = 2
    """Docstring for class attribute b.

    Long description goes here. See :footcite:`testclassattr`.

    .. footbibliography::
    """

    def __init__(self, initarg):
        """Docstring for constructor.

        Long description goes here. See :footcite:`testinit`.

        :param initarg: Docstring for parameter. :footcite:`testinitarg`

        .. footbibliography::
        """

        self.c = 3
        """Docstring for instance attribute c.

        Long description goes here. See :footcite:`testinstanceattr`

        .. footbibliography::
        """

    def method(self, methodarg):
        """Docstring for method.

        Long description goes here. See  :footcite:`testmethod`.

        :param methodarg: Docstring for parameter. :footcite:`testmethodarg`

        .. footbibliography::
        """
��������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autoapi/test.bib�����������������������������������������0000664�0000000�0000000�00000001350�14547471226�0024102�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testmodule,
  author =    {A. One},
  title =     {Een},
}
@Misc{testfunc,
  author =    {B. Two},
  title =     {Twee},
}
@Misc{testfuncarg,
  author =    {C. Three},
  title =     {Drie},
}
@Misc{testdata,
  author =    {D. Four},
  title =     {Vier},
}
@Misc{testclass,
  author =    {E. Five},
  title =     {Vijf},
}
@Misc{testclassattr,
  author =    {F. Six},
  title =     {Zes},
}
@Misc{testinstanceattr,
  author =    {G. Seven},
  title =     {Zeven},
}
@Misc{testinit,
  author =    {H. Eight},
  title =     {Acht},
}
@Misc{testinitarg,
  author =    {I. Nine},
  title =     {Negen},
}
@Misc{testmethod,
  author =    {J. Ten},
  title =     {Tien},
}
@Misc{testmethodarg,
  author =    {K. Eleven},
  title =     {Elf},
}
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc/�������������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0022442�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc/conf.py������������������������������������������0000664�0000000�0000000�00000000264�14547471226�0023743�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex", "sphinx.ext.autodoc"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
autoclass_content = "both"  # document __init__ method too
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc/doc_cite.rst�������������������������������������0000664�0000000�0000000�00000000142�14547471226�0024742�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������cite
====

.. automodule:: test.some_module.cite
   :members:

.. bibliography::
   :style: alpha
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc/doc_footcite.rst���������������������������������0000664�0000000�0000000�00000000141�14547471226�0025631�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������footcite
========

.. automodule:: test.some_module.footcite
   :members:

.. footbibliography::
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc/index.rst����������������������������������������0000664�0000000�0000000�00000000067�14547471226�0024306�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������index
=====

.. toctree::

   doc_cite
   doc_footcite
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc/test.bib�����������������������������������������0000664�0000000�0000000�00000001350�14547471226�0024076�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testmodule,
  author =    {A. One},
  title =     {Een},
}
@Misc{testfunc,
  author =    {B. Two},
  title =     {Twee},
}
@Misc{testfuncarg,
  author =    {C. Three},
  title =     {Drie},
}
@Misc{testdata,
  author =    {D. Four},
  title =     {Vier},
}
@Misc{testclass,
  author =    {E. Five},
  title =     {Vijf},
}
@Misc{testclassattr,
  author =    {F. Six},
  title =     {Zes},
}
@Misc{testinstanceattr,
  author =    {G. Seven},
  title =     {Zeven},
}
@Misc{testinit,
  author =    {H. Eight},
  title =     {Acht},
}
@Misc{testinitarg,
  author =    {I. Nine},
  title =     {Negen},
}
@Misc{testmethod,
  author =    {J. Ten},
  title =     {Tien},
}
@Misc{testmethodarg,
  author =    {K. Eleven},
  title =     {Elf},
}
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc_cython/������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024026�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc_cython/conf.py�����������������������������������0000664�0000000�0000000�00000000264�14547471226�0025327�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex", "sphinx.ext.autodoc"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
autoclass_content = "both"  # document __init__ method too
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc_cython/doc_cite.rst������������������������������0000664�0000000�0000000�00000000144�14547471226�0026330�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������cite
====

.. automodule:: some_cython_module.cite
   :members:

.. bibliography::
   :style: alpha
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc_cython/doc_footcite.rst��������������������������0000664�0000000�0000000�00000000143�14547471226�0027217�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������footcite
========

.. automodule:: some_cython_module.footcite
   :members:

.. footbibliography::
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc_cython/index.rst���������������������������������0000664�0000000�0000000�00000000067�14547471226�0025672�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������index
=====

.. toctree::

   doc_cite
   doc_footcite
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc_cython/test.bib����������������������������������0000664�0000000�0000000�00000001350�14547471226�0025462�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testmodule,
  author =    {A. One},
  title =     {Een},
}
@Misc{testfunc,
  author =    {B. Two},
  title =     {Twee},
}
@Misc{testfuncarg,
  author =    {C. Three},
  title =     {Drie},
}
@Misc{testdata,
  author =    {D. Four},
  title =     {Vier},
}
@Misc{testclass,
  author =    {E. Five},
  title =     {Vijf},
}
@Misc{testclassattr,
  author =    {F. Six},
  title =     {Zes},
}
@Misc{testinstanceattr,
  author =    {G. Seven},
  title =     {Zeven},
}
@Misc{testinit,
  author =    {H. Eight},
  title =     {Acht},
}
@Misc{testinitarg,
  author =    {I. Nine},
  title =     {Negen},
}
@Misc{testmethod,
  author =    {J. Ten},
  title =     {Tien},
}
@Misc{testmethodarg,
  author =    {K. Eleven},
  title =     {Elf},
}
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc_viewcode/����������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024327�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc_viewcode/conf.py���������������������������������0000664�0000000�0000000�00000000434�14547471226�0025627�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import os
import sys

# viewcode extension specifically needed for this test
extensions = ["sphinxcontrib.bibtex", "sphinx.ext.viewcode", "sphinx.ext.autodoc"]
bibtex_bibfiles = []
# make sure we find the module
sys.path.insert(0, os.path.abspath("."))

exclude_patterns = ["_build"]
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc_viewcode/index.rst�������������������������������0000664�0000000�0000000�00000000050�14547471226�0026163�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. automodule:: somemodule
   :members:
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-autodoc_viewcode/somemodule.py���������������������������0000664�0000000�0000000�00000000106�14547471226�0027047�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""Some module."""


class someclass:
    """Some class."""

    pass
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-backrefs/������������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0022564�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-backrefs/conf.py�����������������������������������������0000664�0000000�0000000�00000000143�14547471226�0024061�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-backrefs/index.rst���������������������������������������0000664�0000000�0000000�00000000232�14547471226�0024422�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������First reference: :cite:`Test1,Test2,Test3`.

Second reference: :cite:`Test2,Test3`.

Third reference: :cite:`Test3`.

.. bibliography:: test.bib
   :all:
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-backrefs/test.bib����������������������������������������0000664�0000000�0000000�00000000406�14547471226�0024221�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test0,
  author =    {Mr. A},
  title =     {Test Zero},
}

@Misc{Test1,
  author =    {Mr. B},
  title =     {Test One},
}

@Misc{Test2,
  author =    {Mr. C},
  title =     {Test Two},
}

@Misc{Test3,
  author =    {Mr. D},
  title =     {Test Three},
}
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_crossref/���������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024471�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_crossref/conf.py��������������������������������0000664�0000000�0000000�00000000143�14547471226�0025766�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_crossref/index.rst������������������������������0000664�0000000�0000000�00000000033�14547471226�0026326�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :all:
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_crossref/test.bib�������������������������������0000664�0000000�0000000�00000001712�14547471226�0026127�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@inbook{srivastava+klassen_2016_functionala,
  crossref = {srivastava+klassen_2016_functional},
  title = {Functional Data and Elastic Registration},
  pages = {73--123},
}

@inbook{srivastava+klassen_2016_statistical,
  crossref = {srivastava+klassen_2016_functional},
  title = {Statistical Modeling of Functional Data},
  pages = {269--303},
}

@book{srivastava+klassen_2016_functional,
  title = {Functional and Shape Data Analysis},
  booktitle = {Functional and Shape Data Analysis},
  author = {Srivastava, Anuj and Klassen, Eric P.},
  editor = {Bicke, Peter and Diggle, Peter and Fienberg, Stephen E. and Gather, Ursula and Olkin, Ingram and Zeger, Scott},
  year = {2016},
  series = {Springer {{Series}} in {{Statistics}}},
  publisher = {{Springer-Verlag}},
  address = {{New York}},
  doi = {10.1007/978-1-4939-4020-2},
  url = {https://www.springer.com/gp/book/9781493940189},
  urldate = {2020-01-12},
  isbn = {978-1-4939-4018-9},
  langid = {english}
}
������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_encoding/���������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024431�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_encoding/conf.py��������������������������������0000664�0000000�0000000�00000000202�14547471226�0025722�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
bibtex_encoding = "iso-8859-1"
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_encoding/index.rst������������������������������0000664�0000000�0000000�00000000051�14547471226�0026266�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`Test`

.. bibliography::
   :all:
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_encoding/test.bib�������������������������������0000664�0000000�0000000�00000000101�14547471226�0026056�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test,
  author =    {Mr. ppl\'e},
  title =     {Test},
}
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_missing_conf/�����������������������������������0000775�0000000�0000000�00000000000�14547471226�0025321�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_missing_conf/conf.py����������������������������0000664�0000000�0000000�00000000104�14547471226�0026613�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_missing_conf/index.rst��������������������������0000664�0000000�0000000�00000000000�14547471226�0027150�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_multiple_keys/����������������������������������0000775�0000000�0000000�00000000000�14547471226�0025531�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_multiple_keys/conf.py���������������������������0000664�0000000�0000000�00000000161�14547471226�0027026�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test1.bib", "test2.bib"]
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_multiple_keys/index.rst�������������������������0000664�0000000�0000000�00000000054�14547471226�0027371�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :style: plain
   :all:
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_multiple_keys/test1.bib�������������������������0000664�0000000�0000000�00000000077�14547471226�0027253�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{test,
  author =    {Mr. A},
  title =     {Test one},
}
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_multiple_keys/test2.bib�������������������������0000664�0000000�0000000�00000000077�14547471226�0027254�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{test,
  author =    {Mr. B},
  title =     {Test two},
}
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_multiple_macros/��������������������������������0000775�0000000�0000000�00000000000�14547471226�0026042�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_multiple_macros/conf.py�������������������������0000664�0000000�0000000�00000000161�14547471226�0027337�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["macros.bib", "test.bib"]
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_multiple_macros/index.rst�����������������������0000664�0000000�0000000�00000000054�14547471226�0027702�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :style: plain
   :all:
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_multiple_macros/macros.bib����������������������0000664�0000000�0000000�00000000040�14547471226�0027776�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@string{rmp = "Rev. Mod. Phys."}������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_multiple_macros/test.bib������������������������0000664�0000000�0000000�00000000417�14547471226�0027501�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@article{Toussaint:2011,
	author = {von Toussaint, Udo},
	doi = {10.1103/RevModPhys.83.943},
	issue = 3,
	journal = rmp,
	month = sep,
	pages = {943-999},
	publisher = {American Physical Society},
	title = {Bayesian inference in physics},
	volume = {83},
	year = {2011}
}�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_not_found/��������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024636�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_not_found/conf.py�������������������������������0000664�0000000�0000000�00000000146�14547471226�0026136�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["unknown.bib"]
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_not_found/index.rst�����������������������������0000664�0000000�0000000�00000000046�14547471226�0026477�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography:: another_unknown.bib
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_out_of_date/������������������������������������0000775�0000000�0000000�00000000000�14547471226�0025133�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_out_of_date/conf.py�����������������������������0000664�0000000�0000000�00000000143�14547471226�0026430�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_out_of_date/index.rst���������������������������0000664�0000000�0000000�00000000204�14547471226�0026770�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Original Index
==============

:cite:`test1`
:cite:`test2`
:cite:`test3`
:cite:`test4`

.. bibliography::
   :style: plain
   :all:
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_out_of_date/index_new.xxx�����������������������0000664�0000000�0000000�00000000172�14547471226�0027664�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������New Index
=========

:cite:`test1`
:cite:`test2`
:cite:`test3`
:cite:`test4`

.. bibliography::
   :style: plain
   :all:
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_out_of_date/test.bib����������������������������0000664�0000000�0000000�00000000433�14547471226�0026570�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{test1,
  author =    {Mr. Test Akkerdju},
  title =     {Test 1},
}
@Misc{test2,
  author =    {Mr. Test Bro},
  title =     {Test 2},
}
@Misc{test3,
  author =    {Mr. Test Chap},
  title =     {Test 3},
}
@Misc{test4,
  author =    {Mr. Test Dude},
  title =     {Test 4},
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_out_of_date/test_new.xxx������������������������0000664�0000000�0000000�00000000442�14547471226�0027534�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{test1,
  author =    {Mr. Test Eminence},
  title =     {Test 1},
}
@Misc{test2,
  author =    {Mr. Test Frater},
  title =     {Test 2},
}
@Misc{test3,
  author =    {Mr. Test Giggles},
  title =     {Test 3},
}
@Misc{test4,
  author =    {Mr. Test Handy},
  title =     {Test 4},
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_subfolder/��������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024630�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_subfolder/bibfiles/�����������������������������0000775�0000000�0000000�00000000000�14547471226�0026407�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_subfolder/bibfiles/test.bib���������������������0000664�0000000�0000000�00000000076�14547471226�0030047�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test,
  author =    {Mr. Test},
  title =     {Test},
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_subfolder/conf.py�������������������������������0000664�0000000�0000000�00000000154�14547471226�0026127�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["bibfiles/test.bib"]
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_subfolder/index.rst�����������������������������0000664�0000000�0000000�00000000104�14547471226�0026464�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

.. toctree::

   subfolder/doc
   subfolder2/doc
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_subfolder/subfolder/����������������������������0000775�0000000�0000000�00000000000�14547471226�0026615�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_subfolder/subfolder/doc.rst���������������������0000664�0000000�0000000�00000000074�14547471226�0030115�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Doc1
====

:cite:`Test`

.. bibliography::
   :style: plain
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_subfolder/subfolder2/���������������������������0000775�0000000�0000000�00000000000�14547471226�0026677�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibfiles_subfolder/subfolder2/doc.rst��������������������0000664�0000000�0000000�00000000114�14547471226�0030172�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Doc2
====

.. bibliography:: ../bibfiles/test.bib
   :all:
   :list: bullet
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_bad_key/������������������������������������0000775�0000000�0000000�00000000000�14547471226�0025135�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_bad_key/conf.py�����������������������������0000664�0000000�0000000�00000000143�14547471226�0026432�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_bad_key/index.rst���������������������������0000664�0000000�0000000�00000000035�14547471226�0026774�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::

   badkey
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_bad_key/test.bib����������������������������0000664�0000000�0000000�00000000000�14547471226�0026560�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_bad_option/���������������������������������0000775�0000000�0000000�00000000000�14547471226�0025655�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_bad_option/conf.py��������������������������0000664�0000000�0000000�00000000143�14547471226�0027152�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_bad_option/index.rst������������������������0000664�0000000�0000000�00000000062�14547471226�0027514�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :thisisintentionallyinvalid:
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_bad_option/test.bib�������������������������0000664�0000000�0000000�00000000000�14547471226�0027300�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_content/������������������������������������0000775�0000000�0000000�00000000000�14547471226�0025211�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_content/conf.py�����������������������������0000664�0000000�0000000�00000000143�14547471226�0026506�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_content/doc1.rst����������������������������0000664�0000000�0000000�00000000145�14547471226�0026571�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc1
====

:cite:`test1,test2`

.. bibliography::
   :filter: docname in docnames

   test2
   test3
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_content/doc2.rst����������������������������0000664�0000000�0000000�00000000131�14547471226�0026565�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc2
====

:cite:`x-test4,test5`

.. bibliography::
   :filter: False

   test5
   test6
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_content/doc3.rst����������������������������0000664�0000000�0000000�00000000113�14547471226�0026566�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc3
====

.. bibliography::
   :keyprefix: x-
   :filter: False

   test4
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_content/index.rst���������������������������0000664�0000000�0000000�00000000063�14547471226�0027051�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������index
=====

.. toctree::

   doc1
   doc2
   doc3
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_content/test.bib����������������������������0000664�0000000�0000000�00000001254�14547471226�0026650�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{test1,
  author =    {A. One},
  title =     {Een},
}
@Misc{test2,
  author =    {B. Two},
  title =     {Twee},
}
@Misc{test3,
  author =    {C. Three},
  title =     {Drie},
}
@Misc{test4,
  author =    {D. Four},
  title =     {Vier},
}
@Misc{test5,
  author =    {E. Five},
  title =     {Vijf},
}
@Misc{test6,
  author =    {F. Six},
  title =     {Zes},
}
@Misc{test7,
  author =    {G. Seven},
  title =     {Zeven},
}
@Misc{test8,
  author =    {H. Eight},
  title =     {Acht},
}
@Misc{test9,
  author =    {I. Nine},
  title =     {Negen},
}
@Misc{test10,
  author =    {J. Ten},
  title =     {Tien},
}
@Misc{test11,
  author =    {K. Eleven},
  title =     {Elf},
}
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_custom_ids/���������������������������������0000775�0000000�0000000�00000000000�14547471226�0025710�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_custom_ids/conf.py��������������������������0000664�0000000�0000000�00000000516�14547471226�0027211�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
bibtex_cite_id = "cite-id-{bibliography_count}-{key}"
bibtex_footcite_id = "footcite-id-{key}"
bibtex_bibliography_id = "bibliography-id-{bibliography_count}"
bibtex_footbibliography_id = "footbibliography-id-{footbibliography_count}"
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_custom_ids/index.rst������������������������0000664�0000000�0000000�00000001047�14547471226�0027553�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Custom Ids
==========

Regular Citations
-----------------

First citation :cite:`2009:mandel`.
Second citation :cite:`2003:evensen`.
Third citation :cite:`1986:lorenc`.

.. bibliography::
   :filter: False

   2009:mandel
   2003:evensen

.. bibliography::
   :filter: False

   1986:lorenc

Footnote Citations
------------------

First citation :footcite:`2009:mandel`.
Second citation :footcite:`2003:evensen`.

.. footbibliography::

And first citation again :footcite:`2009:mandel`.
Third citation :footcite:`1986:lorenc`.

.. footbibliography::
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_custom_ids/test.bib�������������������������0000664�0000000�0000000�00000002164�14547471226�0027350�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{2009:mandel,
author = {Jan Mandel},
title = {A Brief Tutorial on the Ensemble {K}alman Filter},
howpublished = {arXiv:0901.3725v1 [physics.ao-ph]},
month =     jan,
year =      {2009},
OPTnote =      {},
OPTannote =    {},
archivePrefix = {arXiv},
eprint        = {0901.3725},
primaryClass  = {physics.ao-ph}
}

@Article{2003:evensen,
  author =       {Geir Evensen},
  title =        {The Ensemble {K}alman Filter: theoretical formulation and practical implementation},
  journal =      {Ocean Dynamics},
  year =         {2003},
  OPTkey =       {},
  volume =    {53},
  number =    {4},
  pages =     {343-367},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {},
  doi = {10.1007/s10236-003-0036-9}
}

@Article{1986:lorenc,
  author =       {Andrew C. Lorenc},
  title =        {Analysis methods for numerical weather prediction},
  journal =      {Quarterly Journal of the Royal Meteorological Society},
  year =         {1986},
  OPTkey =       {},
  volume =    {112},
  number =    {474},
  pages =     {1177-1194},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {},
  doi = {10.1002/qj.49711247414}
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_empty/��������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024675�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_empty/conf.py�������������������������������0000664�0000000�0000000�00000000131�14547471226�0026167�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = []
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_empty/index.rst�����������������������������0000664�0000000�0000000�00000000051�14547471226�0026532�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_header/�������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024767�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_header/conf.py������������������������������0000664�0000000�0000000�00000000342�14547471226�0026265�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
bibtex_bibliography_header = ".. rubric:: Regular Citations"
bibtex_footbibliography_header = ".. rubric:: Footnote Citations"
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_header/index.rst����������������������������0000664�0000000�0000000�00000000130�14547471226�0026622�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`1986:lorenc`.
:footcite:`2009:mandel`.

.. bibliography::

.. footbibliography::
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_header/test.bib�����������������������������0000664�0000000�0000000�00000002164�14547471226�0026427�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{2009:mandel,
author = {Jan Mandel},
title = {A Brief Tutorial on the Ensemble {K}alman Filter},
howpublished = {arXiv:0901.3725v1 [physics.ao-ph]},
month =     jan,
year =      {2009},
OPTnote =      {},
OPTannote =    {},
archivePrefix = {arXiv},
eprint        = {0901.3725},
primaryClass  = {physics.ao-ph}
}

@Article{2003:evensen,
  author =       {Geir Evensen},
  title =        {The Ensemble {K}alman Filter: theoretical formulation and practical implementation},
  journal =      {Ocean Dynamics},
  year =         {2003},
  OPTkey =       {},
  volume =    {53},
  number =    {4},
  pages =     {343-367},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {},
  doi = {10.1007/s10236-003-0036-9}
}

@Article{1986:lorenc,
  author =       {Andrew C. Lorenc},
  title =        {Analysis methods for numerical weather prediction},
  journal =      {Quarterly Journal of the Royal Meteorological Society},
  year =         {1986},
  OPTkey =       {},
  volume =    {112},
  number =    {474},
  pages =     {1177-1194},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {},
  doi = {10.1002/qj.49711247414}
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_key_prefix/���������������������������������0000775�0000000�0000000�00000000000�14547471226�0025704�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_key_prefix/conf.py��������������������������0000664�0000000�0000000�00000000143�14547471226�0027201�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_key_prefix/doc0.rst�������������������������0000664�0000000�0000000�00000000171�14547471226�0027262�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc0
----

:cite:`tag0-2009:mandel`
:cite:`tag0-2003:evensen`

.. bibliography::
   :labelprefix: A
   :keyprefix: tag0-
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_key_prefix/doc1.rst�������������������������0000664�0000000�0000000�00000000137�14547471226�0027265�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc1
----

:cite:`tag1-2009:mandel`

.. bibliography::
   :labelprefix: B
   :keyprefix: tag1-
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_key_prefix/index.rst������������������������0000664�0000000�0000000�00000000061�14547471226�0027542�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

.. toctree::

   doc0
   doc1
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_key_prefix/test.bib�������������������������0000664�0000000�0000000�00000001324�14547471226�0027341�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{2009:mandel,
author = {Jan Mandel},
title = {A Brief Tutorial on the Ensemble {K}alman Filter},
howpublished = {arXiv:0901.3725v1 [physics.ao-ph]},
month =     jan,
year =      {2009},
OPTnote =      {},
OPTannote =    {},
archivePrefix = {arXiv},
eprint        = {0901.3725},
primaryClass  = {physics.ao-ph}
}

@Article{2003:evensen,
  author =       {Geir Evensen},
  title =        {The Ensemble {K}alman Filter: theoretical formulation and practical implementation},
  journal =      {Ocean Dynamics},
  year =         {2003},
  OPTkey =       {},
  volume =    {53},
  number =    {4},
  pages =     {343--367},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {},
  doi = {10.1007/s10236-003-0036-9}
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_1/�����������������������������0000775�0000000�0000000�00000000000�14547471226�0026413�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_1/conf.py����������������������0000664�0000000�0000000�00000000161�14547471226�0027710�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test1.bib", "test2.bib"]
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_1/doc1.rst���������������������0000664�0000000�0000000�00000000142�14547471226�0027770�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Doc1
====

:cite:`Test`

.. bibliography:: test1.bib
   :all:
   :style: plain
   :labelprefix: A
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_1/doc2.rst���������������������0000664�0000000�0000000�00000000143�14547471226�0027772�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Doc2
====

:cite:`Test2`

.. bibliography:: test2.bib
   :all:
   :style: plain
   :labelprefix: B
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_1/index.rst��������������������0000664�0000000�0000000�00000000061�14547471226�0030251�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

.. toctree::

   doc1
   doc2
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_1/test1.bib��������������������0000664�0000000�0000000�00000000076�14547471226�0030134�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test,
  author =    {Mr. Test},
  title =     {Test},
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_1/test2.bib��������������������0000664�0000000�0000000�00000000115�14547471226�0030127�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test2,
  author =    {Mr. Other Test},
  title =     {Another Test},
}
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_2/�����������������������������0000775�0000000�0000000�00000000000�14547471226�0026414�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_2/conf.py����������������������0000664�0000000�0000000�00000000143�14547471226�0027711�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["refs.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_2/doc1.rst���������������������0000664�0000000�0000000�00000003401�14547471226�0027772�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������2014-Feb-20
###########

JACS paper
**********

:cite:`fuhrmans_molecular_2012`


Abstract
========

We present molecular dynamics simulations investigating the effect of
a particular fusion peptide, the **influenza hemagglutinin fusion
peptide** and some of its mutants, on the lipid phase diagram.

We detect a systematic shift toward phases with more positive mean
curvature in the presence of the peptides, as well as an occurrence of
bicontinuous cubic phases, which indicates a stabilization of Gaussian
curvature.

To study the ability of the HA fusion peptide to modulate the lipid
phase diagram, we focus on DOPE (dioleoylphosphatidylethanolamine) and
DOPC (dioleoylphosphatidylcholine) lipids. These lipids were chosen as
they display a broad range of phases, ranging from predominantly
lamellar states for pure DOPC to inverted-hexagonal for pure DOPE, as
well as the so-called rhombohedral phase ("stalk" phase) observed for
mixed PC/PE systems at low hydration. The inverted phases and stalk
phase.

To construct the phase diagram, we performed self-assembly simulations
of systems composed of 256 lipids and four peptides, corresponding to
a mole fraction of peptides of almost 2%. The ratio of PC/PE,
hydration level, and temperature were systematically varied. At each
state point, multiple simulations were performed starting from a
randomized initial distribution of the components. Each simulation was
run for an effective time of 12 μs, which proved to be long enough for
the system to adopt a stable phase.


Calorimetry experiments:

* :cite:`blume_apparent_1983`    
* :cite:`grabitz_relaxation_2002`

Atomistic Monte-Carlo experiments:

* :cite:`wustner_atomistic_2014`


Bibliography
************

.. bibliography::
   :labelprefix: A
   :filter: docname in docnames
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_2/doc2.rst���������������������0000664�0000000�0000000�00000002345�14547471226�0030001�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������2014-Mar-08
###########


How to test an ensemble
***********************

These are notes on :cite:`shirts_simple_2013`.


Abstract
========

It is often difficult to quantitatively determine if a new molecular
simulation algorithm or software properly implements sampling of the
desired thermodynamic ensemble.

We present some simple statistical analysis procedures to allow
sensitive determination of whether the desired thermodynamic ensemble
is properly sampled.

These procedures use paired simulations to cancel out system dependent
densities of state and directly test the extent to which the Boltzmann
distribution associated with the ensemble (usually canonical,
isobaric−isothermal, or grand canonical) is satisfied.


Introduction
============

Molecular simulations, including both molecular dynamics (MD) and
Monte Carlo (MC) techniques, are powerful tools used to study the
properties of complex molecular systems.

When used to specifically study thermodynamics of such systems, rather
than dynamics, the primary goal of molecular simulation is to generate
uncorrelated samples from the appropriate ensemble as efficiently as
possible.


Bibliography
============

.. bibliography::
   :labelprefix: B
   :filter: docname in docnames
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_2/index.rst��������������������0000664�0000000�0000000�00000000075�14547471226�0030257�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

.. toctree::

   doc1
   doc2
   summary

�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_2/refs.bib���������������������0000664�0000000�0000000�00000007455�14547471226�0030044�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@article{grabitz_relaxation_2002,
	title = {Relaxation kinetics of lipid membranes and its relation to the heat capacity.},
	volume = {82},
	number = {1},
	journal = {Biophysical Journal},
	author = {Grabitz, Peter and Ivanova, Vesselka P and Heimburg, Thomas},
	month = jan,
	year = {2002},
	pages = {299--309}
}

@article{blume_apparent_1983,
	title = {Apparent molar heat capacities of phospholipids in aqueous dispersion. Effects of chain length and head group structure},
	volume = {22},
	doi = {10.1021/bi00292a027},
	number = {23},
	journal = {Biochemistry},
	author = {Blume, Alfred},
	month = nov,
	year = {1983},
	pages = {5436--5442}
}

@article{wustner_atomistic_2014,
	title = {Atomistic Monte Carlo Simulation of Lipid Membranes},
	volume = {15},
	copyright = {http://creativecommons.org/licenses/by/3.0/},
	doi = {10.3390/ijms15021767},
	number = {2},
	journal = {International Journal of Molecular Sciences},
	author = {Wüstner, Daniel and Sklenar, Heinz},
	month = jan,
	year = {2014},
	pages = {1767--1803}
}

@article{fuhrmans_molecular_2012,
	title = {Molecular View of the Role of Fusion Peptides in Promoting Positive Membrane Curvature},
	volume = {134},
	doi = {10.1021/ja207290b},
	number = {3},
	journal = {Journal of the American Chemical Society},
	author = {Fuhrmans, Marc and Marrink, Siewert J.},
	month = jan,
	year = {2012},
	pages = {1543--1552}
}

@article{shirts_simple_2013,
	title = {Simple Quantitative Tests to Validate Sampling from Thermodynamic Ensembles},
	volume = {9},
	doi = {10.1021/ct300688p},
	number = {2},
	journal = {Journal of Chemical Theory and Computation},
	author = {Shirts, Michael R.},
	month = feb,
	year = {2013},
	pages = {909--926}
}

@article{mcmahon_membrane_2010,
	title = {Membrane Curvature in Synaptic Vesicle Fusion and Beyond},
	volume = {140},
	doi = {10.1016/j.cell.2010.02.017},
	number = {5},
	journal = {Cell},
	author = {{McMahon}, Harvey T. and Kozlov, Michael M. and Martens, Sascha},
	month = mar,
	year = {2010},
	pages = {601--605}
}

@article{hu_gaussian_2013,
	title = {Gaussian curvature elasticity determined from global shape transformations and local stress distributions: a comparative study using the {MARTINI} model},
	volume = {161},
	journal = {Faraday discussions},
	author = {Hu, Mingyang and de Jong, Djurre H and Marrink, Siewert J and Deserno, Markus},
	year = {2013},
	pages = {365--382}
}

@article{baoukina_molecular_2012,
	title = {Molecular structure of membrane tethers},
	volume = {102},
	doi = {10.1016/j.bpj.2012.03.048},
	number = {8},
	journal = {Biophysical journal},
	author = {Baoukina, Svetlana and Marrink, Siewert J and Tieleman, D Peter},
	month = apr,
	year = {2012},
	pages = {1866--1871}
}

@article{risselada_curvature-dependent_2011,
	title = {Curvature-Dependent Elastic Properties of Liquid-Ordered Domains Result in Inverted Domain Sorting on Uniaxially Compressed Vesicles},
	volume = {106},
	doi = {10.1103/PhysRevLett.106.148102},
	number = {14},
	journal = {Physical Review Letters},
	author = {Risselada, H. Jelger and Marrink, Siewert Jan and Müller, Marcus},
	month = apr,
	year = {2011},
	pages = {148102}
}

@article{risselada_curvature_2009,
	title = {Curvature effects on lipid packing and dynamics in liposomes revealed by coarse grained molecular dynamics simulations},
	volume = {11},
	doi = {10.1039/b818782g},
	number = {12},
	journal = {Physical chemistry chemical physics: {PCCP}},
	author = {Risselada, H Jelger and Marrink, Siewert J},
	month = mar,
	year = {2009},
	pages = {2056--2067}
}

@article{marrink_mechanism_2003,
	title = {The Mechanism of Vesicle Fusion as Revealed by Molecular Dynamics Simulations},
	volume = {125},
	doi = {10.1021/ja036138+},
	number = {37},
	journal = {Journal of the American Chemical Society},
	author = {Marrink, Siewert J. and Mark, Alan E.},
	month = sep,
	year = {2003},
	pages = {11144--11145}
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_label_prefix_2/summary.rst������������������0000664�0000000�0000000�00000001750�14547471226�0030646�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Summary
#######

Постановка задачи
*****************

:cite:`mcmahon_membrane_2010`: Рис. 1, C, D, E, F.


Утверждение
***********

Выпуклость/вогнутось в центре круга белков с положительной кривизной —
это локальный минимум энергии.



Метод
*****

Крупно-зернистая молекулярная динамика для симуляции большой
мембраны. Martini используется для упругих расчётов
:cite:`hu_gaussian_2013`,
:cite:`fuhrmans_molecular_2012`,
:cite:`risselada_curvature-dependent_2011`,
:cite:`risselada_curvature_2009`,
:cite:`marrink_mechanism_2003`.


Аргумент
********




Проверка ансамбля
*****************

Не сделано.


Библиография
************

.. bibliography::
   :labelprefix: C
   :filter: docname in docnames and key != "fuhrmans_molecular_2012"
������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_missing_field/������������������������������0000775�0000000�0000000�00000000000�14547471226�0026353�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_missing_field/conf.py�����������������������0000664�0000000�0000000�00000000143�14547471226�0027650�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_missing_field/index.rst���������������������0000664�0000000�0000000�00000000043�14547471226�0030211�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`testkey`

.. bibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_missing_field/test.bib����������������������0000664�0000000�0000000�00000000131�14547471226�0030003�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@article{testkey,
author = {Some Author},
title = {The Title},
journal = {The Journal}
}
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_multi_foot/���������������������������������0000775�0000000�0000000�00000000000�14547471226�0025720�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_multi_foot/conf.py��������������������������0000664�0000000�0000000�00000000234�14547471226�0027216�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
bibtex_footbibliography_header = ".. rubric:: Citations"
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_multi_foot/index.rst������������������������0000664�0000000�0000000�00000000363�14547471226�0027563�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������First citation :footcite:`2009:mandel`.

.. footbibliography::

Second citation :footcite:`2003:evensen`.
And first citation again :footcite:`2009:mandel`.

.. footbibliography::

Third citation :footcite:`1986:lorenc`.

.. footbibliography::
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_multi_foot/test.bib�������������������������0000664�0000000�0000000�00000002164�14547471226�0027360�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{2009:mandel,
author = {Jan Mandel},
title = {A Brief Tutorial on the Ensemble {K}alman Filter},
howpublished = {arXiv:0901.3725v1 [physics.ao-ph]},
month =     jan,
year =      {2009},
OPTnote =      {},
OPTannote =    {},
archivePrefix = {arXiv},
eprint        = {0901.3725},
primaryClass  = {physics.ao-ph}
}

@Article{2003:evensen,
  author =       {Geir Evensen},
  title =        {The Ensemble {K}alman Filter: theoretical formulation and practical implementation},
  journal =      {Ocean Dynamics},
  year =         {2003},
  OPTkey =       {},
  volume =    {53},
  number =    {4},
  pages =     {343-367},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {},
  doi = {10.1007/s10236-003-0036-9}
}

@Article{1986:lorenc,
  author =       {Andrew C. Lorenc},
  title =        {Analysis methods for numerical weather prediction},
  journal =      {Quarterly Journal of the Royal Meteorological Society},
  year =         {1986},
  OPTkey =       {},
  volume =    {112},
  number =    {474},
  pages =     {1177-1194},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {},
  doi = {10.1002/qj.49711247414}
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_order_unsorted/�����������������������������0000775�0000000�0000000�00000000000�14547471226�0026575�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_order_unsorted/conf.py����������������������0000664�0000000�0000000�00000000143�14547471226�0030072�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_order_unsorted/index.rst��������������������0000664�0000000�0000000�00000000101�14547471226�0030426�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`first`
:cite:`second`

.. bibliography::
   :style: unsrt
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_order_unsorted/test.bib���������������������0000664�0000000�0000000�00000000204�14547471226�0030226�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{second,
  author =    {B. Second},
  title =     {Test 2},
}
@Misc{first,
  author =    {A. First},
  title =     {Test 1},
}
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_default/������������������������������0000775�0000000�0000000�00000000000�14547471226�0026403�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_default/conf.py�����������������������0000664�0000000�0000000�00000000202�14547471226�0027674�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_default_style = "plain"
bibtex_bibfiles = ["test.bib"]
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_default/index.rst���������������������0000664�0000000�0000000�00000000047�14547471226�0030245�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`2009:mandel`

.. bibliography::
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_default/test.bib����������������������0000664�0000000�0000000�00000000427�14547471226�0030043�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{2009:mandel,
author = {Jan Mandel},
title = {A Brief Tutorial on the Ensemble {K}alman Filter},
howpublished = {arXiv:0901.3725v1 [physics.ao-ph]},
month =     jan,
year =      {2009},
archivePrefix = {arXiv},
eprint        = {0901.3725},
primaryClass  = {physics.ao-ph}
}
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_label_1/������������������������������0000775�0000000�0000000�00000000000�14547471226�0026256�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_label_1/conf.py�����������������������0000664�0000000�0000000�00000001162�14547471226�0027555�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������from pybtex.plugin import register_plugin
from pybtex.style.formatting.unsrt import Style as UnsrtStyle
from pybtex.style.labels import BaseLabelStyle

extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
bibtex_default_style = "mystyle"


# a simple label style which uses the bibtex keys for labels
class MyLabelStyle(BaseLabelStyle):
    def format_labels(self, sorted_entries):
        for entry in sorted_entries:
            yield entry.key


class MyStyle(UnsrtStyle):
    default_label_style = MyLabelStyle


register_plugin("pybtex.style.formatting", "mystyle", MyStyle)
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_label_1/index.rst���������������������0000664�0000000�0000000�00000000112�14547471226�0030111�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`myfancybibtexkey`
:cite:`myotherfancybibtexkey`

.. bibliography::
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_label_1/test.bib����������������������0000664�0000000�0000000�00000001342�14547471226�0027713�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{myfancybibtexkey,
author = {Jan Mandel},
title = {A Brief Tutorial on the Ensemble {K}alman Filter},
howpublished = {arXiv:0901.3725v1 [physics.ao-ph]},
month =     jan,
year =      {2009},
OPTnote =      {},
OPTannote =    {},
archivePrefix = {arXiv},
eprint        = {0901.3725},
primaryClass  = {physics.ao-ph}
}

@Article{myotherfancybibtexkey,
  author =       {Geir Evensen},
  title =        {The Ensemble {K}alman Filter: theoretical formulation and practical implementation},
  journal =      {Ocean Dynamics},
  year =         {2003},
  OPTkey =       {},
  volume =    {53},
  number =    {4},
  pages =     {343--367},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {},
  doi = {10.1007/s10236-003-0036-9}
}
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_label_2/������������������������������0000775�0000000�0000000�00000000000�14547471226�0026257�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_label_2/conf.py�����������������������0000664�0000000�0000000�00000001056�14547471226�0027560�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������from pybtex.plugin import register_plugin
from pybtex.style.formatting.unsrt import Style as UnsrtStyle
from pybtex.style.labels.alpha import LabelStyle as AlphaLabelStyle

extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]


class ApaLabelStyle(AlphaLabelStyle):
    def format_label(self, entry):
        return "APA"


class ApaStyle(UnsrtStyle):
    default_label_style = "apa"


register_plugin("pybtex.style.labels", "apa", ApaLabelStyle)
register_plugin("pybtex.style.formatting", "apastyle", ApaStyle)
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_label_2/index.rst���������������������0000664�0000000�0000000�00000000120�14547471226�0030111�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`2009:mandel`
:cite:`2003:evensen`

.. bibliography::
   :style: apastyle
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_label_2/test.bib����������������������0000664�0000000�0000000�00000001324�14547471226�0027714�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{2009:mandel,
author = {Jan Mandel},
title = {A Brief Tutorial on the Ensemble {K}alman Filter},
howpublished = {arXiv:0901.3725v1 [physics.ao-ph]},
month =     jan,
year =      {2009},
OPTnote =      {},
OPTannote =    {},
archivePrefix = {arXiv},
eprint        = {0901.3725},
primaryClass  = {physics.ao-ph}
}

@Article{2003:evensen,
  author =       {Geir Evensen},
  title =        {The Ensemble {K}alman Filter: theoretical formulation and practical implementation},
  journal =      {Ocean Dynamics},
  year =         {2003},
  OPTkey =       {},
  volume =    {53},
  number =    {4},
  pages =     {343--367},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {},
  doi = {10.1007/s10236-003-0036-9}
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_nowebref/�����������������������������0000775�0000000�0000000�00000000000�14547471226�0026566�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_nowebref/conf.py����������������������0000664�0000000�0000000�00000000774�14547471226�0030075�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import pybtex.plugin
from pybtex.style.formatting.unsrt import Style as UnsrtStyle
from pybtex.style.template import words

extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
bibtex_default_style = "nowebref"


class NoWebRefStyle(UnsrtStyle):
    def format_web_refs(self, e):
        # the following is just one simple way to return an empty node
        return words[""]


pybtex.plugin.register_plugin("pybtex.style.formatting", "nowebref", NoWebRefStyle)
����sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_nowebref/index.rst��������������������0000664�0000000�0000000�00000000054�14547471226�0030426�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :all:
   :list: bullet
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_style_nowebref/test.bib���������������������0000664�0000000�0000000�00000001324�14547471226�0030223�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{2009:mandel,
author = {Jan Mandel},
title = {A Brief Tutorial on the Ensemble {K}alman Filter},
howpublished = {arXiv:0901.3725v1 [physics.ao-ph]},
month =     jan,
year =      {2009},
OPTnote =      {},
OPTannote =    {},
archivePrefix = {arXiv},
eprint        = {0901.3725},
primaryClass  = {physics.ao-ph}
}

@Article{2003:evensen,
  author =       {Geir Evensen},
  title =        {The Ensemble {K}alman Filter: theoretical formulation and practical implementation},
  journal =      {Ocean Dynamics},
  year =         {2003},
  OPTkey =       {},
  volume =    {53},
  number =    {4},
  pages =     {343--367},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {},
  doi = {10.1007/s10236-003-0036-9}
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_url/����������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024341�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_url/conf.py���������������������������������0000664�0000000�0000000�00000000143�14547471226�0025636�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_url/index.rst�������������������������������0000664�0000000�0000000�00000000117�14547471226�0026201�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`one`
:cite:`two`
:cite:`three`
:cite:`four`

.. bibliography::
   :all:
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-bibliography_url/test.bib��������������������������������0000664�0000000�0000000�00000000617�14547471226�0026002�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{one,
    title = {One},
    author = {A. Een},
    note = {\url{https://github.com/}}
}

@Misc{two,
    title = {Two},
    author = {B. Twee},
    note = {aaa\url{https://google.com/}bbb}
}

@Misc{three,
    title = {Three},
    author = {C. Drie},
    howpublished = {\url{https://youtube.com/}}
}

@Misc{four,
    title = {Four},
    author = {D. Vier},
    url = {https://wikipedia.org/}
}
�����������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_any_role/���������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024506�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_any_role/conf.py��������������������������������0000664�0000000�0000000�00000000143�14547471226�0026003�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["refs.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_any_role/index.rst������������������������������0000664�0000000�0000000�00000000172�14547471226�0026347�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

:any:`testone,testtwo`

:any:`someref`

.. _someref:

References
----------

.. bibliography::
   :all:������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_any_role/refs.bib�������������������������������0000664�0000000�0000000�00000000213�14547471226�0026117�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testone,
  author =    {A. Apple},
  title =     {TestOne},
}

@Misc{testtwo,
  author =    {B. Bramble},
  title =     {TestTwo},
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_from_orphan/������������������������������������0000775�0000000�0000000�00000000000�14547471226�0025210�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_from_orphan/conf.py�����������������������������0000664�0000000�0000000�00000000143�14547471226�0026505�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_from_orphan/index.rst���������������������������0000664�0000000�0000000�00000000066�14547471226�0027053�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

.. bibliography::
   :style: plain
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_from_orphan/orphan.rst��������������������������0000664�0000000�0000000�00000000046�14547471226�0027231�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:orphan:

Orphan
======

:cite:`Test`
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_from_orphan/test.bib����������������������������0000664�0000000�0000000�00000000076�14547471226�0026650�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test,
  author =    {Mr. Test},
  title =     {Test},
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_label_special_chars/����������������������������0000775�0000000�0000000�00000000000�14547471226�0026635�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_label_special_chars/conf.py���������������������0000664�0000000�0000000�00000000143�14547471226�0030132�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["refs.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_label_special_chars/index.rst�������������������0000664�0000000�0000000�00000000032�14547471226�0030471�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :all:������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_label_special_chars/refs.bib��������������������0000664�0000000�0000000�00000000557�14547471226�0030261�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@article{Serrano2009,
  author = {M. {\'A}ngeles Serrano and Mari{\'a}n Bogu{\~n}{\'a} and Alessandro Vespignani},
  title = {Extracting the multiscale backbone of complex weighted networks},
  journal = {Proceedings of the National Academy of Sciences},
  volume = {106},
  number = {16},
  year = {2009},
  pages = {6483--6488},
  doi = {10.1073/pnas.0808904106},
}�������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_mixed/������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024004�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_mixed/adoc1.rst���������������������������������0000664�0000000�0000000�00000000030�14547471226�0025516�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Doc1
====

:cite:`Test`
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_mixed/adoc2.rst���������������������������������0000664�0000000�0000000�00000000075�14547471226�0025530�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Doc2
====

[Test]_


.. [Test] This is a non-bibtex citation.�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_mixed/conf.py�����������������������������������0000664�0000000�0000000�00000000143�14547471226�0025301�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_mixed/index.rst���������������������������������0000664�0000000�0000000�00000000127�14547471226�0025645�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

.. toctree::

   adoc1
   adoc2

.. bibliography::
   :style: plain
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_mixed/test.bib����������������������������������0000664�0000000�0000000�00000000076�14547471226�0025444�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test,
  author =    {Mr. Test},
  title =     {Test},
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_multiple_keys/����������������������������������0000775�0000000�0000000�00000000000�14547471226�0025564�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_multiple_keys/conf.py���������������������������0000664�0000000�0000000�00000000143�14547471226�0027061�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["refs.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_multiple_keys/index.rst�������������������������0000664�0000000�0000000�00000000076�14547471226�0027430�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

:cite:`testone,testtwo`

.. bibliography::
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_multiple_keys/refs.bib��������������������������0000664�0000000�0000000�00000000213�14547471226�0027175�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testone,
  author =    {A. Apple},
  title =     {TestOne},
}

@Misc{testtwo,
  author =    {B. Bramble},
  title =     {TestTwo},
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_no_author_no_key/�������������������������������0000775�0000000�0000000�00000000000�14547471226�0026240�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_no_author_no_key/conf.py������������������������0000664�0000000�0000000�00000000212�14547471226�0027532�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
bibtex_reference_style = "author_year"
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_no_author_no_key/index.rst����������������������0000664�0000000�0000000�00000000304�14547471226�0030076�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:p:`software_2015`
:cite:t:`software_2015`

:cite:p:`2009:mandel`
:cite:t:`2009:mandel`

:cite:p:`onlytitle`
:cite:t:`onlytitle`

:cite:p:`onlyeditor`
:cite:t:`onlyeditor`

.. bibliography::
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_no_author_no_key/test.bib�����������������������0000664�0000000�0000000�00000001161�14547471226�0027674�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@misc{software_2015,
    title = {Software projects built on {Mesos}},
    url = {http://mesos.apache.org/documentation/latest/mesos-frameworks/},
    month = sep,
    year = 2015
}

@Misc{2009:mandel,
author = {Jan Mandel},
title = {A Brief Tutorial on the Ensemble {K}alman Filter},
howpublished = {arXiv:0901.3725v1 [physics.ao-ph]},
month =     jan,
year =      {2009},
archivePrefix = {arXiv},
eprint        = {0901.3725},
primaryClass  = {physics.ao-ph}
}

@misc{onlytitle,
    title = {This citation only has a title}
}

@misc{onlyeditor,
    editor = {Mr. Whatever},
    title = {Important Work},
    year = {2021}
}
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_not_found/��������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024671�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_not_found/conf.py�������������������������������0000664�0000000�0000000�00000000143�14547471226�0026166�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_not_found/index.rst�����������������������������0000664�0000000�0000000�00000000125�14547471226�0026530�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`nosuchkey1`

:footcite:`nosuchkey2`

.. bibliography::

.. footbibliography::
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_not_found/test.bib������������������������������0000664�0000000�0000000�00000000000�14547471226�0026314�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh/������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024015�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh/conf.py�����������������������������������0000664�0000000�0000000�00000000345�14547471226�0025316�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["rinoh.frontend.sphinx", "sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
rinoh_documents = [
    dict(doc="index", target="book", toctree_only=False, template="template.rtt"),
]
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh/index.rst���������������������������������0000664�0000000�0000000�00000000146�14547471226�0025657�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Main
====

Section
-------

A citation :cite:`testkey`.

Bibliography
------------

.. bibliography::
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh/ssheet.rts��������������������������������0000664�0000000�0000000�00000000165�14547471226�0026044�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[STYLESHEET]
base = sphinx_base14

[citation]
location = in-place

[citation marker]
label_prefix=''
label_suffix=''
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh/template.rtt������������������������������0000664�0000000�0000000�00000000145�14547471226�0026363�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[TEMPLATE_CONFIGURATION]
name=btex
template=article
stylesheet=ssheet.rts

[VARIABLES]
paper_size=A5
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh/test.bib����������������������������������0000664�0000000�0000000�00000000045�14547471226�0025451�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testkey,
title = {The Title}
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh_multidoc/���������������������������������0000775�0000000�0000000�00000000000�14547471226�0025715�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh_multidoc/conf.py��������������������������0000664�0000000�0000000�00000000345�14547471226�0027216�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["rinoh.frontend.sphinx", "sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
rinoh_documents = [
    dict(doc="index", target="book", toctree_only=False, template="template.rtt"),
]
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh_multidoc/doc.rst��������������������������0000664�0000000�0000000�00000000053�14547471226�0027212�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Doc
===

Another citation :cite:`testkey`.
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh_multidoc/index.rst������������������������0000664�0000000�0000000�00000000174�14547471226�0027560�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Main
====

.. toctree::

   doc

Section
-------

A citation :cite:`testkey`.

Bibliography
------------

.. bibliography::
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh_multidoc/ssheet.rts�����������������������0000664�0000000�0000000�00000000165�14547471226�0027744�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[STYLESHEET]
base = sphinx_base14

[citation]
location = in-place

[citation marker]
label_prefix=''
label_suffix=''
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh_multidoc/template.rtt���������������������0000664�0000000�0000000�00000000145�14547471226�0030263�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[TEMPLATE_CONFIGURATION]
name=btex
template=article
stylesheet=ssheet.rts

[VARIABLES]
paper_size=A5
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_rinoh_multidoc/test.bib�������������������������0000664�0000000�0000000�00000000045�14547471226�0027351�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testkey,
title = {The Title}
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_roles/������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024022�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_roles/conf.py�����������������������������������0000664�0000000�0000000�00000000143�14547471226�0025317�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["refs.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_roles/index.rst���������������������������������0000664�0000000�0000000�00000007771�14547471226�0025677�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

Single Citations
----------------

====================== ====================================================
role                   result
====================== ====================================================
``:cite:p:``           :cite:p:`testthree`
``:cite:ps:``          :cite:ps:`testthree`
``:cite:alp:``         :cite:alp:`testthree`
``:cite:alps:``        :cite:alps:`testthree`
``:cite:t:``           :cite:t:`testthree`
``:cite:ts:``          :cite:ts:`testthree`
``:cite:ct:``          :cite:ct:`testthree`
``:cite:cts:``         :cite:cts:`testthree`
``:cite:labelpar:``    :cite:labelpar:`testthree`
``:cite:label:``       :cite:label:`testthree`
``:cite:yearpar:``     :cite:yearpar:`testthree`
``:cite:year:``        :cite:year:`testthree`
``:cite:authorpar:``   :cite:authorpar:`testthree`
``:cite:authorpars:``  :cite:authorpars:`testthree`
``:cite:author:``      :cite:author:`testthree`
``:cite:authors:``     :cite:authors:`testthree`
``:cite:cauthor:``     :cite:cauthor:`testthree`
``:cite:cauthors:``    :cite:cauthors:`testthree`
``:cite:empty:``       AAA :cite:empty:`testthree` AAA
====================== ====================================================

Double Citations
----------------

====================== ====================================================
role                   result
====================== ====================================================
``:cite:p:``           :cite:p:`testone,testtwo`
``:cite:ps:``          :cite:ps:`testone,testtwo`
``:cite:alp:``         :cite:alp:`testone,testtwo`
``:cite:alps:``        :cite:alps:`testone,testtwo`
``:cite:t:``           :cite:t:`testone,testtwo`
``:cite:ts:``          :cite:ts:`testone,testtwo`
``:cite:ct:``          :cite:ct:`testone,testtwo`
``:cite:cts:``         :cite:cts:`testone,testtwo`
``:cite:labelpar:``    :cite:labelpar:`testone,testtwo`
``:cite:label:``       :cite:label:`testone,testtwo`
``:cite:yearpar:``     :cite:yearpar:`testone,testtwo`
``:cite:year:``        :cite:year:`testone,testtwo`
``:cite:authorpar:``   :cite:authorpar:`testone,testtwo`
``:cite:authorpars:``  :cite:authorpars:`testone,testtwo`
``:cite:author:``      :cite:author:`testone,testtwo`
``:cite:authors:``     :cite:authors:`testone,testtwo`
``:cite:cauthor:``     :cite:cauthor:`testone,testtwo`
``:cite:cauthors:``    :cite:cauthors:`testone,testtwo`
``:cite:empty:``       BBB :cite:empty:`testone,testtwo` BBB
====================== ====================================================

Triple Citations
----------------

====================== ====================================================
role                   result
====================== ====================================================
``:cite:p:``           :cite:p:`testfour,testfive,testsix`
``:cite:ps:``          :cite:ps:`testfour,testfive,testsix`
``:cite:alp:``         :cite:alp:`testfour,testfive,testsix`
``:cite:alps:``        :cite:alps:`testfour,testfive,testsix`
``:cite:t:``           :cite:t:`testfour,testfive,testsix`
``:cite:ts:``          :cite:ts:`testfour,testfive,testsix`
``:cite:ct:``          :cite:ct:`testfour,testfive,testsix`
``:cite:cts:``         :cite:cts:`testfour,testfive,testsix`
``:cite:labelpar:``    :cite:labelpar:`testfour,testfive,testsix`
``:cite:label:``       :cite:label:`testfour,testfive,testsix`
``:cite:yearpar:``     :cite:yearpar:`testfour,testfive,testsix`
``:cite:year:``        :cite:year:`testfour,testfive,testsix`
``:cite:authorpar:``   :cite:authorpar:`testfour,testfive,testsix`
``:cite:authorpars:``  :cite:authorpars:`testfour,testfive,testsix`
``:cite:author:``      :cite:author:`testfour,testfive,testsix`
``:cite:authors:``     :cite:authors:`testfour,testfive,testsix`
``:cite:cauthor:``     :cite:cauthor:`testfour,testfive,testsix`
``:cite:cauthors:``    :cite:cauthors:`testfour,testfive,testsix`
``:cite:empty:``       CCC :cite:empty:`testfour,testfive,testsix` CCC
====================== ====================================================

:cite:empty:`testseven`

Bibliography
------------

.. bibliography::
�������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_roles/refs.bib����������������������������������0000664�0000000�0000000�00000001121�14547471226�0025432�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testone,
  author = {Ad al Ap},
  title = {TestOne},
  year = 2001
}

@Misc{testtwo,
  author = {Bo Be and Cy Ci},
  title = {TestTwo},
  year = 2002
}

@Misc{testthree,
  author =    {Do de Du and Ed Em and Fo Fa},
  title =     {TestThree},
  year = 2003
}

@Misc{testfour,
  author =    {Ga Ge},
  title =     {TestFour},
  year = 2004
}

@Misc{testfive,
  author =    {Ho Hu},
  title =     {TestFive},
  year = 2005
}

@Misc{testsix,
  author =    {Ip Ix},
  title =     {TestSix},
  year = 2006
}

@Misc{testseven,
  author =    {Jo Ju},
  title =     {TestSeven},
  year = 2007
}
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_roles_pre_post/���������������������������������0000775�0000000�0000000�00000000000�14547471226�0025735�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_roles_pre_post/conf.py��������������������������0000664�0000000�0000000�00000000143�14547471226�0027232�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["refs.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_roles_pre_post/index.rst������������������������0000664�0000000�0000000�00000004210�14547471226�0027573�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

Single Citations
----------------

====================== ====================================================
role                   result
====================== ====================================================
``:cite:p:``           A :cite:p:`{see}testthree`
``:cite:p:``           B :cite:p:`testthree{p. 1}`
``:cite:p:``           C :cite:p:`{see}testthree{p. 1}`
``:cite:t:``           A :cite:t:`{see}testthree`
``:cite:t:``           B :cite:t:`testthree{p. 1}`
``:cite:t:``           C :cite:t:`{see}testthree{p. 1}`
====================== ====================================================

Double Citations
----------------

====================== ====================================================
role                   result
====================== ====================================================
``:cite:p:``           A :cite:p:`{see}testone,testtwo`
``:cite:p:``           B :cite:p:`testone{p. 1},testtwo`
``:cite:p:``           C :cite:p:`{see}testone{p. 1},testtwo`
``:cite:p:``           D :cite:p:`testone,{see}testtwo`
``:cite:p:``           E :cite:p:`testone,testtwo{p. 2}`
``:cite:p:``           F :cite:p:`testone,{see}testtwo{p. 2}`
``:cite:p:``           G :cite:p:`{see}testone,{see}testtwo`
``:cite:p:``           H :cite:p:`testone{p. 1},testtwo{p. 2}`
``:cite:p:``           I :cite:p:`{see}testone,testtwo{p. 2}`
``:cite:p:``           J :cite:p:`{see}testone{p. 1},{see}testtwo{p. 2}`
``:cite:t:``           A :cite:t:`{see}testone,testtwo`
``:cite:t:``           B :cite:t:`testone{p. 1},testtwo`
``:cite:t:``           C :cite:t:`{see}testone{p. 1},testtwo`
``:cite:t:``           D :cite:t:`testone,{see}testtwo`
``:cite:t:``           E :cite:t:`testone,testtwo{p. 2}`
``:cite:t:``           F :cite:t:`testone,{see}testtwo{p. 2}`
``:cite:t:``           G :cite:t:`{see}testone,{see}testtwo`
``:cite:t:``           H :cite:t:`testone{p. 1},testtwo{p. 2}`
``:cite:t:``           I :cite:t:`{see}testone,testtwo{p. 2}`
``:cite:t:``           J :cite:t:`{see}testone{p. 1},{see}testtwo{p. 2}`
====================== ====================================================

Bibliography
------------

.. bibliography::
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_roles_pre_post/refs.bib�������������������������0000664�0000000�0000000�00000000411�14547471226�0027346�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testone,
  author = {Ad al Ap},
  title = {TestOne},
  year = 2001
}

@Misc{testtwo,
  author = {Bo Be and Cy Ci},
  title = {TestTwo},
  year = 2002
}

@Misc{testthree,
  author =    {Do de Du and Ed Em and Fo Fa},
  title =     {TestThree},
  year = 2003
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_style_round_brackets/���������������������������0000775�0000000�0000000�00000000000�14547471226�0027123�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_style_round_brackets/conf.py��������������������0000664�0000000�0000000�00000002023�14547471226�0030417�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������from dataclasses import dataclass, field

import sphinxcontrib.bibtex.plugin
from sphinxcontrib.bibtex.style.referencing import BracketStyle
from sphinxcontrib.bibtex.style.referencing.author_year import AuthorYearReferenceStyle


def bracket_style() -> BracketStyle:
    return BracketStyle(
        left="(",
        right=")",
    )


@dataclass
class MyReferenceStyle(AuthorYearReferenceStyle):
    bracket_parenthetical: BracketStyle = field(default_factory=bracket_style)
    bracket_textual: BracketStyle = field(default_factory=bracket_style)
    bracket_author: BracketStyle = field(default_factory=bracket_style)
    bracket_label: BracketStyle = field(default_factory=bracket_style)
    bracket_year: BracketStyle = field(default_factory=bracket_style)


sphinxcontrib.bibtex.plugin.register_plugin(
    "sphinxcontrib.bibtex.style.referencing", "author_year_round", MyReferenceStyle
)


extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["refs.bib"]
bibtex_reference_style = "author_year_round"
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_style_round_brackets/index.rst������������������0000664�0000000�0000000�00000000302�14547471226�0030757�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Introduction
------------

This has been discussed in the literature :cite:p:`2003:evensen`.

:cite:ct:`2003:evensen` has discussed this at length.

Bibliography
------------

.. bibliography::
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_style_round_brackets/refs.bib�������������������0000664�0000000�0000000�00000000502�14547471226�0030535�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Article{2003:evensen,
  author =       {Geir Evensen},
  title =        {The Ensemble {K}alman Filter: theoretical formulation and practical implementation},
  journal =      {Ocean Dynamics},
  year =         {2003},
  volume =    {53},
  number =    {4},
  pages =     {343--367},
  doi = {10.1007/s10236-003-0036-9}
}
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_toctree/����������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024343�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_toctree/adoc1.rst�������������������������������0000664�0000000�0000000�00000000134�14547471226�0026062�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Doc1 :cite:`TestKey`
====================

Testing sphinxcontrib-bibtex citation in a title.������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_toctree/adoc2.rst�������������������������������0000664�0000000�0000000�00000000137�14547471226�0026066�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Doc2 [Test2]_
=============

Testing docutils citation in a title.

.. [Test2] The second test.���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_toctree/conf.py���������������������������������0000664�0000000�0000000�00000000143�14547471226�0025640�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_toctree/index.rst�������������������������������0000664�0000000�0000000�00000000127�14547471226�0026204�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

.. toctree::

   adoc1
   adoc2

.. bibliography::
   :style: plain
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_toctree/test.bib��������������������������������0000664�0000000�0000000�00000000113�14547471226�0025773�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{TestKey,
  author =    {Mickey Mouse},
  title =     {Test Title},
}
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_whitespace/�������������������������������������0000775�0000000�0000000�00000000000�14547471226�0025032�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_whitespace/conf.py������������������������������0000664�0000000�0000000�00000000143�14547471226�0026327�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_whitespace/index.rst����������������������������0000664�0000000�0000000�00000000072�14547471226�0026672�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`first,
second`

.. bibliography::
   :style: alpha
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-citation_whitespace/test.bib�����������������������������0000664�0000000�0000000�00000000204�14547471226�0026463�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{second,
  author =    {B. Second},
  title =     {Test 2},
}
@Misc{first,
  author =    {A. First},
  title =     {Test 1},
}
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-debug_bibtex_citation/�����������������������������������0000775�0000000�0000000�00000000000�14547471226�0025321�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-debug_bibtex_citation/conf.py����������������������������0000664�0000000�0000000�00000000143�14547471226�0026616�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-debug_bibtex_citation/index.rst��������������������������0000664�0000000�0000000�00000000043�14547471226�0027157�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`testkey`

.. bibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-debug_bibtex_citation/test.bib���������������������������0000664�0000000�0000000�00000000045�14547471226�0026755�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testkey,
title = {The Title}
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-debug_docutils_citation/���������������������������������0000775�0000000�0000000�00000000000�14547471226�0025672�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-debug_docutils_citation/conf.py��������������������������0000664�0000000�0000000�00000000036�14547471226�0027170�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������exclude_patterns = ["_build"]
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-debug_docutils_citation/index.rst������������������������0000664�0000000�0000000�00000000037�14547471226�0027533�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Label]_

.. [Label] The title.�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-debug_minimal_example/�����������������������������������0000775�0000000�0000000�00000000000�14547471226�0025313�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-debug_minimal_example/conf.py����������������������������0000664�0000000�0000000�00000000143�14547471226�0026610�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["refs.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-debug_minimal_example/index.rst��������������������������0000664�0000000�0000000�00000000217�14547471226�0027154�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������See :cite:t:`1987:nelson` for an introduction to non-standard analysis.
Non-standard analysis is fun :cite:p:`1987:nelson`.

.. bibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-debug_minimal_example/refs.bib���������������������������0000664�0000000�0000000�00000000242�14547471226�0026726�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Book{1987:nelson,
  author = {Edward Nelson},
  title = {Radically Elementary Probability Theory},
  publisher = {Princeton University Press},
  year = {1987}
}
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_citation/��������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024650�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_citation/conf.py�������������������������������0000664�0000000�0000000�00000000143�14547471226�0026145�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_citation/index.rst�����������������������������0000664�0000000�0000000�00000000111�14547471226�0026502�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography:: test.bib
   :all:

.. bibliography:: test.bib
   :all:
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_citation/test.bib������������������������������0000664�0000000�0000000�00000000076�14547471226�0026310�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test,
  author =    {Mr. Test},
  title =     {Test},
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_citation_id/�����������������������������������0000775�0000000�0000000�00000000000�14547471226�0025324�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_citation_id/conf.py����������������������������0000664�0000000�0000000�00000000143�14547471226�0026621�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_citation_id/index.rst��������������������������0000664�0000000�0000000�00000000310�14547471226�0027157�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _id1:

Section 1
=========

.. _id2:

Section 2
=========

.. _id3:

Section 3
=========

References: :ref:`id1` :ref:`id3` :ref:`id3`

Citations: :cite:`Test`

.. bibliography:: test.bib
   :all:
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_citation_id/test.bib���������������������������0000664�0000000�0000000�00000000076�14547471226�0026764�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test,
  author =    {Mr. Test},
  title =     {Test},
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_label/�����������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024115�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_label/conf.py����������������������������������0000664�0000000�0000000�00000000161�14547471226�0025412�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test1.bib", "test2.bib"]
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_label/doc1.rst���������������������������������0000664�0000000�0000000�00000000101�14547471226�0025465�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Doc1
====

.. bibliography:: test1.bib
   :style: plain
   :all:
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_label/doc2.rst���������������������������������0000664�0000000�0000000�00000000101�14547471226�0025466�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Doc2
====

.. bibliography:: test2.bib
   :style: plain
   :all:
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_label/index.rst��������������������������������0000664�0000000�0000000�00000000061�14547471226�0025753�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

.. toctree::

   doc1
   doc2
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_label/test1.bib��������������������������������0000664�0000000�0000000�00000000076�14547471226�0025636�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test,
  author =    {Mr. Test},
  title =     {Test},
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_label/test2.bib��������������������������������0000664�0000000�0000000�00000000115�14547471226�0025631�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test2,
  author =    {Mr. Other Test},
  title =     {Another Test},
}
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_nearly_identical_entries/����������������������0000775�0000000�0000000�00000000000�14547471226�0030075�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_nearly_identical_entries/conf.py���������������0000664�0000000�0000000�00000000143�14547471226�0031372�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_nearly_identical_entries/index.rst�������������0000664�0000000�0000000�00000000134�14547471226�0031734�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������First edition: :cite:`ABC_R1`.

Second edition: :cite:`ABC_R2`.

.. bibliography::
   :all:
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_nearly_identical_entries/test.bib��������������0000664�0000000�0000000�00000000350�14547471226�0031530�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@manual{ABC_R1,
  author       = {xyz},
  title        = {{ABC}},
  edition      = {1st},
  year         = {2019}
}
@manual{ABC_R2,
  author       = {xyz},
  title        = {{ABC}},
  edition      = {2nd},
  year         = {2019}
}
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_nearly_identical_keys/�������������������������0000775�0000000�0000000�00000000000�14547471226�0027377�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_nearly_identical_keys/conf.py������������������0000664�0000000�0000000�00000000143�14547471226�0030674�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_nearly_identical_keys/index.rst����������������0000664�0000000�0000000�00000000105�14547471226�0031234�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`Tèst`
:cite:`Tést`
:cite:`Têst`

.. bibliography:: test.bib�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-duplicate_nearly_identical_keys/test.bib�����������������0000664�0000000�0000000�00000000325�14547471226�0031034�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Tèst,
  author =    {John Smith},
  title =     {Title A},
}

@Misc{Tést,
  author =    {Mary Poppins},
  title =     {Title B},
}

@Misc{Têst,
  author =    {Albert Einstein},
  title =     {Title C},
}
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/��������������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0022271�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/bitand.rst����������������������������������������0000664�0000000�0000000�00000000124�14547471226�0024261�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Set
---

.. bibliography::
   :list: bullet
   :filter: {"doc1", "doc2"} & docnames
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/bitor.rst�����������������������������������������0000664�0000000�0000000�00000000124�14547471226�0024137�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Set
---

.. bibliography::
   :list: bullet
   :filter: {"doc1", "doc2"} | docnames
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/conf.py�������������������������������������������0000664�0000000�0000000�00000000143�14547471226�0023566�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/false.rst�����������������������������������������0000664�0000000�0000000�00000000102�14547471226�0024106�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������False
-----

.. bibliography::
   :list: bullet
   :filter: False
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/gt.rst��������������������������������������������0000664�0000000�0000000�00000000104�14547471226�0023430�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Gt
--

.. bibliography::
   :list: bullet
   :filter: year > "2011"
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/gte.rst�������������������������������������������0000664�0000000�0000000�00000000107�14547471226�0023600�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Gte
---

.. bibliography::
   :list: bullet
   :filter: year >= "2011"
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/in.rst��������������������������������������������0000664�0000000�0000000�00000000110�14547471226�0023421�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������In
--

.. bibliography::
   :list: bullet
   :filter: "bla" in docnames
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/index.rst�����������������������������������������0000664�0000000�0000000�00000000326�14547471226�0024133�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :list: bullet
   :filter: author % "Second" and type == "misc"

.. toctree::

   or
   noteq
   lt
   lte
   gt
   gte
   key
   false
   true
   title
   in
   notin
   set
   bitand
   bitor
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/key.rst�������������������������������������������0000664�0000000�0000000�00000000107�14547471226�0023611�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Key
---

.. bibliography::
   :list: bullet
   :filter: key == "third"
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/lt.rst��������������������������������������������0000664�0000000�0000000�00000000104�14547471226�0023435�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Lt
--

.. bibliography::
   :list: bullet
   :filter: year < "2011"
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/lte.rst�������������������������������������������0000664�0000000�0000000�00000000107�14547471226�0023605�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Lte
---

.. bibliography::
   :list: bullet
   :filter: year <= "2011"
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/noteq.rst�����������������������������������������0000664�0000000�0000000�00000000113�14547471226�0024144�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������NotEq
-----

.. bibliography::
   :list: bullet
   :filter: year != "2011"
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/notin.rst�����������������������������������������0000664�0000000�0000000�00000000124�14547471226�0024147�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Not In
------

.. bibliography::
   :list: bullet
   :filter: "bla" not in docnames
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/or.rst��������������������������������������������0000664�0000000�0000000�00000000134�14547471226�0023441�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Or
--

.. bibliography::
   :list: bullet
   :filter: author % "First" or type == "article"
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/set.rst�������������������������������������������0000664�0000000�0000000�00000000125�14547471226�0023614�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Set
---

.. bibliography::
   :list: bullet
   :filter: {"doc1", "doc2"} <= docnames
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/test.bib������������������������������������������0000664�0000000�0000000�00000000514�14547471226�0023726�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{second,
  author =    {B. Second},
  title =     {Tralalala},
  year =      {2010}
}

@Article{third,
  author =       {B. Second},
  title =        {Heb je een ideetje},
  journal =      {Journal of Kaatje},
  year =         {2012}
}

@Misc{first,
  author =    {A. First},
  title =     {Jakkamakka},
  year =      {2011}
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/title.rst�����������������������������������������0000664�0000000�0000000�00000000126�14547471226�0024143�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Title
-----

.. bibliography::
   :list: bullet
   :filter: title and title % "jakka"
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter/true.rst������������������������������������������0000664�0000000�0000000�00000000077�14547471226�0024006�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������True
----

.. bibliography::
   :list: bullet
   :filter: True
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter_fix_author_keyerror/������������������������������0000775�0000000�0000000�00000000000�14547471226�0026443�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter_fix_author_keyerror/conf.py�����������������������0000664�0000000�0000000�00000000143�14547471226�0027740�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter_fix_author_keyerror/index.rst���������������������0000664�0000000�0000000�00000000077�14547471226�0030310�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :list: bullet
   :filter: author % "Test"
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter_fix_author_keyerror/test.bib����������������������0000664�0000000�0000000�00000000100�14547471226�0030067�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{second,
  title =     {Tralalala},
  year =      {2010}
}
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter_option_clash/�������������������������������������0000775�0000000�0000000�00000000000�14547471226�0025033�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter_option_clash/conf.py������������������������������0000664�0000000�0000000�00000000143�14547471226�0026330�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter_option_clash/index.rst����������������������������0000664�0000000�0000000�00000000124�14547471226�0026671�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :all:
   :cited:
   :notcited:
   :filter: author % "Troffaes"
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter_option_clash/test.bib�����������������������������0000664�0000000�0000000�00000000000�14547471226�0026456�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter_syntax_error/�������������������������������������0000775�0000000�0000000�00000000000�14547471226�0025110�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter_syntax_error/conf.py������������������������������0000664�0000000�0000000�00000000143�14547471226�0026405�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter_syntax_error/index.rst����������������������������0000664�0000000�0000000�00000000616�14547471226�0026754�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :filter: $

.. bibliography::
   :filter: yield author

.. bibliography::
   :filter: author is title

.. bibliography::
   :filter: False % title

.. bibliography::
   :filter: title % False

.. bibliography::
   :filter: ~title

.. bibliography::
   :filter: "2000" <= year <= "2005"

.. bibliography::
   :filter: author + title

.. bibliography::
   :filter: author; title
������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-filter_syntax_error/test.bib�����������������������������0000664�0000000�0000000�00000000111�14547471226�0026536�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@misc{test,
  author = {Mr. Tee},
  title = {Baracuda},
  year = {1553}
}�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-footcite_roles/������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024024�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-footcite_roles/conf.py�����������������������������������0000664�0000000�0000000�00000000143�14547471226�0025321�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["refs.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-footcite_roles/index.rst���������������������������������0000664�0000000�0000000�00000003574�14547471226�0025676�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

Single Citations
----------------

====================== ====================================================
role                   result
====================== ====================================================
``:footcite:p:``       :footcite:p:`testthree`
``:footcite:ps:``      :footcite:ps:`testthree`
``:footcite:t:``       :footcite:t:`testthree`
``:footcite:ts:``      :footcite:ts:`testthree`
``:footcite:ct:``      :footcite:ct:`testthree`
``:footcite:cts:``     :footcite:cts:`testthree`
====================== ====================================================

Double Citations
----------------

====================== ====================================================
role                   result
====================== ====================================================
``:footcite:p:``       :footcite:p:`testone,testtwo`
``:footcite:ps:``      :footcite:ps:`testone,testtwo`
``:footcite:t:``       :footcite:t:`testone,testtwo`
``:footcite:ts:``      :footcite:ts:`testone,testtwo`
``:footcite:ct:``      :footcite:ct:`testone,testtwo`
``:footcite:cts:``     :footcite:cts:`testone,testtwo`
====================== ====================================================

Triple Citations
----------------

====================== ====================================================
role                   result
====================== ====================================================
``:footcite:p:``       :footcite:p:`testfour,testfive,testsix`
``:footcite:ps:``      :footcite:ps:`testfour,testfive,testsix`
``:footcite:t:``       :footcite:t:`testfour,testfive,testsix`
``:footcite:ts:``      :footcite:ts:`testfour,testfive,testsix`
``:footcite:ct:``      :footcite:ct:`testfour,testfive,testsix`
``:footcite:cts:``     :footcite:cts:`testfour,testfive,testsix`
====================== ====================================================

.. footbibliography::
������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-footcite_roles/refs.bib����������������������������������0000664�0000000�0000000�00000000775�14547471226�0025452�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testone,
  author = {Ad al Ap},
  title = {TestOne},
  year = 2001
}

@Misc{testtwo,
  author = {Bo Be and Cy Ci},
  title = {TestTwo},
  year = 2002
}

@Misc{testthree,
  author =    {Do de Du and Ed Em and Fo Fa},
  title =     {TestThree},
  year = 2003
}

@Misc{testfour,
  author =    {Ga Ge},
  title =     {TestFour},
  year = 2004
}

@Misc{testfive,
  author =    {Ho Hu},
  title =     {TestFive},
  year = 2005
}

@Misc{testsix,
  author =    {Ip Ix},
  title =     {TestSix},
  year = 2006
}
���sphinxcontrib-bibtex-2.6.2/test/roots/test-footcite_roles_pre_post/���������������������������������0000775�0000000�0000000�00000000000�14547471226�0025737�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-footcite_roles_pre_post/conf.py��������������������������0000664�0000000�0000000�00000000143�14547471226�0027234�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["refs.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-footcite_roles_pre_post/index.rst������������������������0000664�0000000�0000000�00000000254�14547471226�0027601�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

A\ :footcite:p:`testthree`
B\ :footcite:p:`{see}testthree`
C\ :footcite:p:`testthree{p. 1}`
D\ :footcite:p:`{see}testthree{p. 1}`

.. footbibliography::
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-footcite_roles_pre_post/refs.bib�������������������������0000664�0000000�0000000�00000000411�14547471226�0027350�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testone,
  author = {Ad al Ap},
  title = {TestOne},
  year = 2001
}

@Misc{testtwo,
  author = {Bo Be and Cy Ci},
  title = {TestTwo},
  year = 2002
}

@Misc{testthree,
  author =    {Do de Du and Ed Em and Fo Fa},
  title =     {TestThree},
  year = 2003
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_multidoc/������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024021�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_multidoc/conf.py�����������������������������������0000664�0000000�0000000�00000000227�14547471226�0025321�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
bibtex_bibfiles = ["sources.bib"]
latex_documents = [
    ("index", "test.tex", "Test", "Mr. Test", "manual"),
]
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_multidoc/index.rst���������������������������������0000664�0000000�0000000�00000000073�14547471226�0025662�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Index
=====

See :cite:`testkey`.

.. toctree::
   sources
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_multidoc/sources.bib�������������������������������0000664�0000000�0000000�00000000121�14547471226�0026154�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@misc{testkey,
    author        = {Mr. Test},
    title         = {Test One},
}
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_multidoc/sources.rst�������������������������������0000664�0000000�0000000�00000000103�14547471226�0026230�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������References
==========

Here are the references.

.. bibliography::
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_multidoc_2/����������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024242�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_multidoc_2/conf.py���������������������������������0000664�0000000�0000000�00000000604�14547471226�0025541�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import sphinx.builders.latex.transforms

extensions = ["sphinxcontrib.bibtex"]
bibtex_bibfiles = ["sources.bib"]
latex_documents = [
    ("index", "test.tex", "Test", "Mr. Test", "manual"),
]


class DummyTransform(sphinx.builders.latex.transforms.BibliographyTransform):
    def run(self, **kwargs):
        pass


sphinx.builders.latex.transforms.BibliographyTransform = DummyTransform
����������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_multidoc_2/index.rst�������������������������������0000664�0000000�0000000�00000000073�14547471226�0026103�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Index
=====

See :cite:`testkey`.

.. toctree::
   sources
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_multidoc_2/sources.bib�����������������������������0000664�0000000�0000000�00000000121�14547471226�0026375�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@misc{testkey,
    author        = {Mr. Test},
    title         = {Test One},
}
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_multidoc_2/sources.rst�����������������������������0000664�0000000�0000000�00000000355�14547471226�0026462�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������References
==========

Here are the references.

.. raw:: latex

    \begingroup
    \def\section#1#2{}
    \def\chapter#1#2{}
    \begin{thebibliography}{1234}

.. bibliography::

.. raw:: latex

    \end{thebibliography}
    \endgroup
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_refs/����������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0023140�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_refs/conf.py���������������������������������������0000664�0000000�0000000�00000000262�14547471226�0024437�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
latex_documents = [
    ("index", "test.tex", "Test", "Mr. Test", "manual"),
]
bibtex_bibfiles = ["test.bib"]
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_refs/index.rst�������������������������������������0000664�0000000�0000000�00000000074�14547471226�0025002�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Test
====

:cite:`1657:huygens`

.. bibliography::
   :all:
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-latex_refs/test.bib��������������������������������������0000664�0000000�0000000�00000000644�14547471226�0024601�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@InCollection{1657:huygens,
  author = 	 {Christiaan Huygens},
  title = 	 {De Ratiociniis in Ludo Ale{\ae}},
  booktitle = 	 {Exercitationum Mathematicarum Libri Quinque: Quibus accedit {C}hristiani {H}ugenii Tractatus de Ratiociniis in Ale{\ae} Ludo},
  pages = 	 {517--524},
  publisher = {Ex officina Johannis Elsevirii},
  year = 	 {1657},
  editor = 	 {Schooten, Franciscus {\'a}},
  address = 	 {Lugd. Batav.},
}
��������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_bullet/���������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0023326�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_bullet/conf.py��������������������������������������0000664�0000000�0000000�00000000143�14547471226�0024623�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_bullet/index.rst������������������������������������0000664�0000000�0000000�00000000054�14547471226�0025166�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :list: bullet
   :all:
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_bullet/test.bib�������������������������������������0000664�0000000�0000000�00000000433�14547471226�0024763�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{test1,
  author =    {Mr. Test Akkerdju},
  title =     {Test 1},
}
@Misc{test2,
  author =    {Mr. Test Bro},
  title =     {Test 2},
}
@Misc{test3,
  author =    {Mr. Test Chap},
  title =     {Test 3},
}
@Misc{test4,
  author =    {Mr. Test Dude},
  title =     {Test 4},
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_citation/�������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0023651�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_citation/conf.py������������������������������������0000664�0000000�0000000�00000000143�14547471226�0025146�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_citation/index.rst����������������������������������0000664�0000000�0000000�00000000170�14547471226�0025510�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`test1`
:cite:`test2`
:cite:`test3`
:cite:`test4`

.. bibliography::
   :style: plain
   :list: citation
   :all:
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_citation/test.bib�����������������������������������0000664�0000000�0000000�00000000433�14547471226�0025306�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{test1,
  author =    {Mr. Test Akkerdju},
  title =     {Test 1},
}
@Misc{test2,
  author =    {Mr. Test Bro},
  title =     {Test 2},
}
@Misc{test3,
  author =    {Mr. Test Chap},
  title =     {Test 3},
}
@Misc{test4,
  author =    {Mr. Test Dude},
  title =     {Test 4},
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_enumerated/�����������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024170�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_enumerated/conf.py����������������������������������0000664�0000000�0000000�00000000175�14547471226�0025472�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib", "test2.bib", "test3.bib"]
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_enumerated/index.rst��������������������������������0000664�0000000�0000000�00000000322�14547471226�0026026�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography:: test.bib
   :list: enumerated
   :all:

.. bibliography:: test2.bib
   :list: enumerated
   :start: continue
   :all:

.. bibliography:: test3.bib
   :list: enumerated
   :start: 23
   :all:

��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_enumerated/test.bib���������������������������������0000664�0000000�0000000�00000000433�14547471226�0025625�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{test1,
  author =    {Mr. Test Akkerdju},
  title =     {Test 1},
}
@Misc{test2,
  author =    {Mr. Test Bro},
  title =     {Test 2},
}
@Misc{test3,
  author =    {Mr. Test Chap},
  title =     {Test 3},
}
@Misc{test4,
  author =    {Mr. Test Dude},
  title =     {Test 4},
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_enumerated/test2.bib��������������������������������0000664�0000000�0000000�00000000442�14547471226�0025707�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{test5,
  author =    {Mr. Test Eminence},
  title =     {Test 5},
}
@Misc{test6,
  author =    {Mr. Test Frater},
  title =     {Test 6},
}
@Misc{test7,
  author =    {Mr. Test Giggles},
  title =     {Test 7},
}
@Misc{test8,
  author =    {Mr. Test Handy},
  title =     {Test 8},
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_enumerated/test3.bib��������������������������������0000664�0000000�0000000�00000000456�14547471226�0025715�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{test9,
  author =    {Mr. Test Iedereen},
  title =     {Test 9},
}
@Misc{test10,
  author =    {Mr. Test Joke},
  title =     {Test 10},
}
@Misc{test11,
  author =    {Mr. Test Klopgeest},
  title =     {Test 11},
}
@Misc{test12,
  author =    {Mr. Test Laterfanter},
  title =     {Test 12},
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_invalid/��������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0023465�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_invalid/conf.py�������������������������������������0000664�0000000�0000000�00000000143�14547471226�0024762�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_invalid/index.rst�����������������������������������0000664�0000000�0000000�00000000067�14547471226�0025331�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :list: thisisintentionallyinvalid
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-list_invalid/test.bib������������������������������������0000664�0000000�0000000�00000000000�14547471226�0025110�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib/��������������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0022243�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib/conf.py�������������������������������������������0000664�0000000�0000000�00000000140�14547471226�0023535�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["test.natbib"]
exclude_patterns = ["_build"]
natbib = {
    "file": "test.bib",
}
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib/doc0.rst������������������������������������������0000664�0000000�0000000�00000003021�14547471226�0023616�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc0
----

Testing the various cite roles using default settings.

Some citations
:cite:t:`1657:huygens`
:cite:t:`joyce:1999`
:cite:t:`2011:troffaes:isipta:natext`
:cite:t:`1996:fukuda`
:cite:t:`2009:defra:animal:health`
:cite:t:`test:url`
:cite:t:`test:url2`
:cite:t:`2000:troffaes:msthesis`
:cite:t:`2008:hable:thesis`
:cite:t:`Sherwood`
:cite:t:`2005:cormack`
:cite:t:`RSI`
:cite:t:`Kristensen83`
:cite:t:`Astrom2005`
:cite:t:`noauthor`.

Multiple keys in text were analysed by
:cite:t:`1657:huygens,joyce:1999`.

Multiple keys in parenthesis
:cite:p:`1657:huygens,joyce:1999`.

For post text, we refer you to
:cite:t:`1657:huygens [p. 3]`.
For pre and post text,
:cite:t:`joyce:1999 [see][p. 20]`.
For pre text,
:cite:t:`joyce:1999 [see][]`.

Now the same with parenthesis style.
Here we use post text
:cite:p:`1657:huygens [p. 3]`.
Here we use pre and post text
:cite:p:`joyce:1999 [see][p. 20]`.
Here we use pre text
:cite:p:`joyce:1999 [see][]`.

All the commands with the same reference:

* p :cite:p:`Kristensen83`
* ps :cite:ps:`Kristensen83`
* alp :cite:alp:`Kristensen83`
* alps :cite:alps:`Kristensen83`
* t :cite:t:`Kristensen83`
* ts :cite:ts:`Kristensen83`
* alt :cite:alt:`Kristensen83`
* alts :cite:alts:`Kristensen83`
* author :cite:author:`Kristensen83`
* authors :cite:authors:`Kristensen83`
* year :cite:year:`Kristensen83`
* yearpar :cite:yearpar:`Kristensen83`
* text :cite:text:`Kristensen83`
* title :cite:title:`Kristensen83`

Title cite if there is no title :cite:title:`notitle`.

Another special case :cite:t:`branchtest`.
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib/doc1.rst������������������������������������������0000664�0000000�0000000�00000001250�14547471226�0023621�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc1
----

Testing different settings.

.. cite:conf::
   :style: numbers
   :brackets: {}

Numbers style with curly brackets.
Some extra work was done by :cite:t:`1657:huygens,joyce:1999,2005:cormack`.

.. cite:conf::
   :style: authoryear
   :brackets: {}
   :separator: &

Author-year style with curly brackets and ampersand separator.
Some extra work was done by :cite:t:`1657:huygens,joyce:1999,2005:cormack`.

.. cite:conf::
   :style: super

Super style. Some extra work was done :cite:p:`1657:huygens,joyce:1999,2005:cormack`.

.. cite:conf:: authoryear

Author year style specified as argument.
Some extra work was done by :cite:t:`1657:huygens,joyce:1999,2005:cormack`.
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib/index.rst�����������������������������������������0000664�0000000�0000000�00000000111�14547471226�0024075�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

.. toctree::

   doc0
   doc1
   zdoc

.. cite:refs::
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib/test.bib������������������������������������������0000664�0000000�0000000�00000020634�14547471226�0023705�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@InCollection{1657:huygens,
  author = 	 {Christiaan Huygens},
  title = 	 {De Ratiociniis in Ludo Ale{\ae}},
  booktitle = 	 {Exercitationum Mathematicarum Libri Quinque: Quibus accedit {C}hristiani {H}ugenii Tractatus de Ratiociniis in Ale{\ae} Ludo},
  OPTcrossref =  {},
  OPTkey = 	 {},
  pages = 	 {517--524},
  publisher = {Ex officina Johannis Elsevirii},
  year = 	 {1657},
  editor = 	 {Schooten, Franciscus {\'a}},
  OPTvolume = 	 {},
  OPTnumber = 	 {},
  OPTseries = 	 {},
  OPTtype = 	 {},
  OPTchapter = 	 {},
  address = 	 {Lugd. Batav.},
  OPTedition = 	 {},
  OPTmonth = 	 {},
  OPTnote = 	 {},
  OPTannote = 	 {}
}

@Book{joyce:1999,
  author = 	 {Joyce, James},
  ALTeditor = 	 {},
  title = 		 {The Foundations of Causal Decision Theory},
  publisher = 	 {Cambridge University Press},
  year = 		 {1999},
  OPTkey = 		 {},
  OPTvolume = 	 {},
  OPTnumber = 	 {},
  OPTseries = 	 {},
  OPTaddress = 	 {},
  OPTedition = 	 {},
  OPTmonth = 	 {},
  OPTnote = 	 {},
  OPTannote = 	 {}
}

@Unpublished{2011:troffaes:isipta:natext,
  author =       {Matthias C. M. Troffaes and Robert Hable},
  title =        {Robustness of Natural Extension},
  OPTcrossref =  {},
  OPTkey =       {},
  OPTbooktitle = {},
  OPTpages =     {},
  year =      {2011},
  OPTeditor =    {},
  OPTvolume =    {},
  OPTnumber =    {},
  OPTseries =    {},
  OPTaddress =   {},
  OPTmonth =     {},
  OPTorganization = {},
  OPTpublisher = {},
  note =      {Submitted to ISIPTA'11},
  OPTannote =    {}
}

@Article{1996:fukuda,
  author =       {K. Fukuda and A. Prodon},
  title =        {Double description method revisited},
  journal =      {Combinatorics and Computer Science},
  year =         {1996},
  OPTkey =       {},
  volume =    {1120},
  OPTnumber =    {},
  pages =     {91--111},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {},
  note={\url{http://www.ifor.math.ethz.ch/~fukuda/cdd_home/}}
}

@Misc{2009:defra:animal:health,
  author =       {Defra},
  title =        {Impact assessment of an independent body for animal health in {E}ngland},
  year =         {2009},
  note =      {\url{http://www.defra.gov.uk/corporate/consult/newindependent-body-ah/impact-assessment.pdf}},
}

@Misc{test:url,
  OPTkey =       {},
  author =    {Mr. Test},
  title =     {Testing the url command in references},
  OPThowpublished = {},
  OPTmonth =     {},
  OPTyear =      {},
  note =      {\url{http://www.google.com} and \url{http://www.yahoo.com}},
  OPTannote =    {}
}

@Misc{test:url2,
  author =    {Mr. Test2},
  title =     {Testing the url command in howpublished},
  howpublished = {\url{http://www.google.com}},
  year = {2222}
}

@MASTERSTHESIS{2000:troffaes:msthesis,
  AUTHOR = {Matthias C. M. Troffaes},
  TITLE = {Quantum algorithmes: theoretische aspecten en toepassingen},
  SCHOOL = {Universiteit Gent},
  YEAR = {2000},
  OPTKEY = {},
  OPTTYPE = {},
  OPTADDRESS = {Gent},
  MONTH = {May},
  OPTNOTE = {},
  OPTANNOTE = {}
}

@PhdThesis{2008:hable:thesis,
  author =       {Robert Hable},
  title =        {Data-Based Decisions under Complex Uncertainty},
  school =       {Ludwig-Maximilians-Universit{\"a}t M{\"u}nchen},
  year =         {2008},
  OPTkey =       {},
  OPTtype =      {},
  OPTaddress =   {},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {}
}

@BOOKLET{Sherwood,
author="D.A. Sherwood",
title="Phosphorus Loads Entering Long Pond, A Small Embayment of Lake {O}ntario near {R}ochester, {N}ew {Y}ork",
howpublished="USGS Fact Sheet 128-99",
pages=4,
month="November",
year=1999,
}

@InProceedings{2005:cormack,
  author = 	 {Cormack, G. V. and Lynam, T. R.},
  title = 	 {Spam Corpus Creation for TREC},
  OPTcrossref =  {},
  OPTkey = 	 {},
  booktitle = {Proceedings of the Second Conference on Email and Anti-Spam},
  OPTpages = 	 {},
  year = 	 {2005},
  OPTeditor = 	 {},
  OPTvolume = 	 {},
  OPTnumber = 	 {},
  OPTseries = 	 {},
  address = 	 {Palo Alto},
  month = 	 {Jul},
  OPTorganization = {},
  OPTpublisher = {},
  OPTnote = 	 {},
  OPTannote = 	 {}
}

@MANUAL{RSI,
author="RSI",
title="ENVI User's Guide",
publisher="Reasearch Systems Incorporated",
organization="Research Systems Incorporated",
howpublished="PDF File",
address="Boulder, CO",
month="September",
year=2001,
}

@InBook{Kristensen83,
  author = 	 {B. B. Kristensen and Ole L. Madsen and B. M{\o}ller-Pedersen and K. Nygaard},
  editor = 	 {P. Degano and E. Sandewall},   
  title = 	 {Integrated Interactive Computing Systems},
  chapter = 	 {Syntax-directed program modularization},
  publisher = 	 {North-Holland, Amsterdam},
  year = 	 {1983},
  pages = 	 {207-219}
}

@InCollection{2004:seidenfeld::rubinesque,
  author = 	 {J. B. Kadane and Mark J. Schervish and Teddy Seidenfeld},
  title = 	 {A {R}ubinesque theory of decision},
  booktitle = 	 {A festschrift for {H}erman {R}ubin},
  OPTcrossref =  {},
  OPTkey = 	 {},
  pages = 	 {45--55},
  publisher = {Inst. Math. Statist.},
  year = 	 {2004},
  OPTeditor = 	 {},
  volume = 	 {45},
  OPTnumber = 	 {},
  series = 	 {IMS Lecture Notes -- Monograph Series},
  OPTtype = 	 {},
  OPTchapter = 	 {},
  address = 	 {Beachwood, Ohio},
  OPTedition = 	 {},
  OPTmonth = 	 {},
  OPTnote = 	 {},
  OPTannote = 	 {}
}

%%% taken from Jason K. Moore's thesis; it is a good complex long entry for testing
@ARTICLE{Astrom2005,
  author = {{\AA}str{\"o}m, Karl J. and Klein, Richard E. and Lennartsson, Anders},
  title = {Bicycle Dynamics and Control},
  journal = {IEEE Control Systems Magazine},
  year = {2005},
  volume = {25},
  pages = {26--47},
  number = {4},
  month = {August},
  abstract = {This article analyzes the dynamics of bicycles from the perspective
	of control. Models of different complexity are presented, starting
	with simple ones and ending with more realistic models generated
	from multibody software. We consider models that capture essential
	behavior such as self-stabilization as well as models that demonstrate
	difficulties with rear wheel steering. We relate our experiences
	using bicycles in control education along with suggestions for fun
	and thought-provoking experiments with proven student attraction.
	Finally, we describe bicycles and clinical programs designed for
	children with disabilities.},
  bib = {bibtex-keys#Astrom2005},
  bibpr = {private-bibtex-keys#Astrom2005},
  doi = {10.1109/MCS.2005.1499389},
  file = {Astrom2005.pdf:Astrom2005.pdf:PDF},
  keywords = {bicycles, control engineering computing, control engineering education,design,
	handicapped aids, nonlinear control systems, nonlinear dynamicalsystems,
	position control, stability bicycle control, bicycle dynamics, clinical
	programs, computer simulation, control education, disabled children,
	dynamic behavior, inverted pendulum, modelling, multibody software,
	nonminimum phase steering behavior, rear wheel steering difficulties,
	self-stabilization},
  owner = {moorepants},
  review = {Shows a steer torque measurement system constructed for the UCSB instrumented
	bicycle but with little extra information. They use a linear force
	transducer of some sort mounted on the handlebars.
	
	
	They first show the point mass model like Karnopp's 2004 model (older
	ones are referenced in Meijaard2007). They stablize the steer angel
	to roll angle transfer function with a negative feedback gain which
	has dependence on the forward velocity.
	
	
	He adds a basic model of the front fork geometry to the point mass
	model, giving a relationship between steer torque input and steer
	angle which is speed dependent. The roll angle to steer angle now
	has a builtin negative feedback law due to the front fork geometry
	and if the k2 gain is large enough (with steer torque = 0) the system
	is stable. He uses this to calculat a critical velocity for stability.
	
	
	Klein says you should grip the handlebars lightly to take advantage
	of the bicycle self stability. This corresponds to the differences
	in the Whipple model and one with arms.
	
	
	Cites Wier1972 as giving 0.1s and 0.3s of nueromuscular delay in steer
	torque and upper body lean, respectively.
	
	
	The gyroscopic effects give rise to derivative feedback.
	
	
	Claims that riders use variation in forward speed as an additional
	control variable.},
  timestamp = {2008.10.16},
  webpdf = {references-folder/Astrom2005.pdf}
}

@Misc{noauthor,
  title =        {Simple test with just a title and year, but no author},
  year =         {2020},
}

@Misc{notitle,
  key = {keyfornotitle},
  author = {Mr. Author},
  year = {1337}
}

@Misc{branchtest,
  author = {Mr. Author},
  howpublished = {\url{http://www.google.com}}
}
����������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib/zdoc.rst������������������������������������������0000664�0000000�0000000�00000000215�14547471226�0023732�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������zdoc
----

Citation in a document that is processed only after the document containing the references
:cite:p:`2004:seidenfeld::rubinesque`.
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib_conf/���������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0023250�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib_conf/conf.py��������������������������������������0000664�0000000�0000000�00000000247�14547471226�0024552�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["test.natbib"]
exclude_patterns = ["_build"]
natbib = {
    "file": "test.bib",
    "brackets": "{}",
    "separator": "/",
    "style": "authoryear",
}
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib_conf/index.rst������������������������������������0000664�0000000�0000000�00000000071�14547471226�0025107�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

:cite:p:`Test1,Test2`

.. cite:refs::
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib_conf/test.bib�������������������������������������0000664�0000000�0000000�00000000242�14547471226�0024703�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test1,
  author =    {Author One},
  title =     {Title1},
  year = 2001
}
@Misc{Test2,
  author =    {Author Two},
  title =     {Title2},
  year = 2002
}
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib_keynotfound/��������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024670�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib_keynotfound/conf.py�������������������������������0000664�0000000�0000000�00000000140�14547471226�0026162�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["test.natbib"]
exclude_patterns = ["_build"]
natbib = {
    "file": "test.bib",
}
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib_keynotfound/index.rst�����������������������������0000664�0000000�0000000�00000000061�14547471226�0026526�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

:cite:t:`XXX`

.. cite:refs::
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib_keynotfound/test.bib������������������������������0000664�0000000�0000000�00000000076�14547471226�0026330�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test,
  author =    {Mr. Test},
  title =     {Test},
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib_norefs/�������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0023617�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib_norefs/conf.py������������������������������������0000664�0000000�0000000�00000000140�14547471226�0025111�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["test.natbib"]
exclude_patterns = ["_build"]
natbib = {
    "file": "test.bib",
}
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib_norefs/index.rst����������������������������������0000664�0000000�0000000�00000000042�14547471226�0025454�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Contents
========

:cite:t:`Test`
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-natbib_norefs/test.bib�����������������������������������0000664�0000000�0000000�00000000076�14547471226�0025257�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{Test,
  author =    {Mr. Test},
  title =     {Test},
}
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/������������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0022600�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/conf.py�����������������������������������������0000664�0000000�0000000�00000000144�14547471226�0024076�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["listb.bib"]
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/�������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0023547�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc01.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025210�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc01
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc02.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025211�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc02
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc03.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025212�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc03
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc04.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025213�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc04
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc05.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025214�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc05
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc06.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025215�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc06
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc07.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025216�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc07
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc08.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025217�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc08
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc09.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025220�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc09
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc10.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025210�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc10
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc11.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025211�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc11
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc12.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025212�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc12
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc13.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025213�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc13
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc14.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025214�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc14
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc15.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025215�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc15
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc16.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025216�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc16
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc17.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025217�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc17
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc18.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025220�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc18
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc19.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025221�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc19
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc20.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025211�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc20
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc21.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025212�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc21
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc22.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025213�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc22
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc23.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025214�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc23
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc24.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025215�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc24
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc25.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025216�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc25
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc26.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025217�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc26
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc27.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025220�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc27
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc28.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025221�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc28
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc29.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025222�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc29
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/doc30.rst����������������������������������0000664�0000000�0000000�00000000065�14547471226�0025212�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc30
=====

:footcite:`Sh:1`

.. footbibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/foot/index.rst����������������������������������0000664�0000000�0000000�00000000434�14547471226�0025411�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. toctree::

   doc01
   doc02
   doc03
   doc04
   doc05
   doc06
   doc07
   doc08
   doc09
   doc10
   doc11
   doc12
   doc13
   doc14
   doc15
   doc16
   doc17
   doc18
   doc19
   doc20
   doc21
   doc22
   doc23
   doc24
   doc25
   doc26
   doc27
   doc28
   doc29
   doc30
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/index.rst���������������������������������������0000664�0000000�0000000�00000000074�14547471226�0024442�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������index
=====

.. toctree::

    regular/index
    foot/index
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/listb.bib���������������������������������������0000664�0000000�0000000�00000017774�14547471226�0024413�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������% entries taken from http://shelah.logic.at/eindex.html %%%%%%

@article{Sh:1,
author = {Shelah, Saharon},
ams-subject = {(02.50)},
journal = {Israel Journal of Mathematics},
review = {MR 40-7102},
pages = {187--202},
title = {{Stable theories}},
volume = {7},
year = {1969},
},

@article{Sh:2,
author = {Shelah, Saharon},
ams-subject = {(05.04)},
journal = {Journal of Combinatorial Theory},
review = {MR 39-2652},
pages = {298--300},
title = {{Note on a min-max problem of Leo Moser}},
volume = {6},
year = {1969},
},

@article{Sh:3,
author = {Shelah, Saharon},
ams-subject = {(02.50)},
journal = {Annals of Mathematical Logic},
review = {MR 44-2593},
pages = {69--118},
title = {{Finite diagrams stable in power}},
volume = {2},
year = {1970},
},

@article{Sh:4,
author = {Shelah, Saharon},
ams-subject = {(02.50)},
journal = {Journal of Symbolic Logic},
review = {MR 44-52},
pages = {73--82},
title = {{On theories $T$ categorical in $|T|$}},
volume = {35},
year = {1970},
},

@article{Sh:5,
author = {Shelah, Saharon},
ams-subject = {(02.35)},
journal = {Israel Journal of Mathematics},
review = {MR 41-6674},
pages = {75--79},
title = {{On languages with non-homogeneous strings of quantifiers}},
volume = {8},
year = {1970},
},

@article{Sh:6,
author = {Shelah, Saharon},
ams-subject = {(02.50)},
journal = {Pacific Journal of Mathematics},
review = {MR 42-2932},
pages = {541--545},
title = {{A note on Hanf numbers}},
volume = {34},
year = {1970},
},

@article{Sh:7,
author = {Shelah, Saharon},
ams-subject = {(02H13)},
journal = {Journal of Symbolic Logic},
review = {MR 48:3735},
pages = {83--84},
title = {{On the cardinality of ultraproduct of finite sets}},
volume = {35},
year = {1970},
},

@article{Sh:8,
author = {Shelah, Saharon},
ams-subject = {(02H05)},
journal = {Israel Journal of Mathematics},
review = {MR 46:1581},
pages = {193--198},
title = {{Two cardinal compactness}},
volume = {9},
year = {1971},
},

@article{Sh:9,
author = {Shelah, Saharon},
ams-subject = {(02.52)},
journal = {Annals of Mathematical Logic},
review = {MR 44-56},
pages = {441--447},
title = {{Remark to ``local definability theory'' of Reyes}},
volume = {2},
year = {1970},
},

@article{Sh:10,
author = {Shelah, Saharon},
ams-subject = {(02H05)},
journal = {Annals of Mathematical Logic},
review = {MR 47:6475},
pages = {271--362},
title = {{Stability, the f.c.p., and superstability; model theoretic
 properties of formulas in first order theory}},
volume = {3},
year = {1971},
},

@article{Sh:11,
author = {Shelah, Saharon},
ams-subject = {(02.50)},
journal = {Pacific Journal of Mathematics},
review = {MR 44-2594},
pages = {811--818},
title = {{On the number of non-almost isomorphic models of $T$ in a
 power}},
volume = {36},
year = {1971},
},

@article{Sh:12,
author = {Shelah, Saharon},
ams-subject = {(02.50)},
journal = {Israel Journal of Mathematics},
review = {MR 43-4652},
pages = {473--487},
title = {{The number of non-isomorphic models of an unstable first-order
 theory}},
volume = {9},
year = {1971},
},

@article{Sh:13,
author = {Shelah, Saharon},
ams-subject = {(02H99)},
journal = {Israel Journal of Mathematics},
review = {MR 45:6608},
pages = {224--233},
title = {{Every two elementarily equivalent models have isomorphic
 ultrapowers}},
volume = {10},
year = {1971},
},

@article{Sh:14,
author = {Shelah, Saharon},
ams-subject = {(02H99)},
journal = {Annals of Mathematical Logic},
review = {MR 45:3187},
pages = {75--114},
title = {{Saturation of ultrapowers and Keisler's order}},
volume = {4},
year = {1972},
},

@article{Sh:15,
author = {Shelah, Saharon},
ams-subject = {(02H05)},
journal = {Journal of Symbolic Logic},
review = {MR 47:4787},
pages = {107--113},
title = {{Uniqueness and characterization of prime models over sets for
 totally transcendental first-order theories}},
volume = {37},
year = {1972},
},

@article{Sh:16,
author = {Shelah, Saharon},
ams-subject = {(02H10)},
journal = {Pacific Journal of Mathematics},
review = {MR 46:7018},
pages = {247--261},
title = {{A combinatorial problem; stability and order for models	and
 theories in infinitary languages}},
volume = {41},
year = {1972},
},

@article{Sh:17,
author = {Shelah, Saharon},
ams-subject = {(02H13)},
journal = {Israel Journal of Mathematics},
review = {MR 46:3292},
pages = {23--31},
title = {{For what filters is every reduced product saturated?}},
volume = {12},
year = {1972},
},

@article{Sh:18,
author = {Shelah, Saharon},
ams-subject = {(02H13)},
journal = {Journal of Symbolic Logic},
review = {MR 56:5272},
pages = {247--267},
title = {{On models with power-like orderings}},
volume = {37},
year = {1972},
},

@article{ErSh:19,
author = {Erdos, Paul and Shelah, Saharon},
trueauthor = {Erd\H{o}s, Paul and Shelah, Saharon},
ams-subject = {(04A20)},
journal = {Israel Journal of Mathematics},
review = {MR 47:8312},
pages = {207--214},
title = {{Separability properties of almost-disjoint families of sets}},
volume = {12},
year = {1972},
},

@article{ScSh:20,
author = {Schmerl, James H. and Shelah, Saharon},
ams-subject = {(02H05)},
journal = {Journal of Symbolic Logic},
review = {MR 47:6474},
pages = {531--537},
title = {{On power-like models for hyperinaccessible cardinals}},
volume = {37},
year = {1972},
},

@incollection{ErSh:21,
author = {Erdos, Paul and Shelah, Saharon},
trueauthor = {Erd\H{o}s, Paul and Shelah, Saharon},
booktitle = {Graph theory and applications (Proc. Conf., Western
 Michigan Univ., Kalamazoo, Mich., 1972; dedicated to the memory of J.
 W. T. Youngs)},
ams-subject = {(05A15)},
review = {MR 49:2415},
pages = {75--79},
publisher = {Springer, Berlin},
series = {Lecture Notes in Mathematics},
title = {{On problems of Moser and Hanson}},
volume = {303},
year = {1972},
},

@article{Sh:22,
author = {Shelah, Saharon},
ams-subject = {(02H10)},
journal = {Proceedings of the American Mathematical Society},
review = {MR 45:3188},
pages = {509--514},
title = {{A note on model complete models and generic models}},
volume = {34},
year = {1972},
},

@article{GlSh:23,
author = {Galvin, Fred and Shelah, Saharon},
ams-subject = {(04A20)},
journal = {Journal of Combinatorial Theory. Ser. A},
review = {MR 48:8240},
pages = {167--174},
title = {{Some Counterexamples in the Partition Calculus}},
volume = {15},
year = {1973},
},

@article{Sh:24,
author = {Shelah, Saharon},
ams-subject = {(02H15)},
journal = {Israel Journal of Mathematics},
review = {MR 54:4972},
pages = {149--162},
title = {{First order theory of permutation groups}},
volume = {14},
year = {1973},
},

@article{Sh:25,
author = {Shelah, Saharon},
fromwhere = {IL},
journal = {Israel Journal of Mathematics},
pages = {437--441},
title = {{Errata to: First order theory of permutation groups}},
volume = {15},
year = {1973},
},

@article{Sh:26,
author = {Shelah, Saharon},
ams-subject = {(04A20)},
journal = {Israel Journal of Mathematics},
review = {MR 48:5864},
pages = {262--277},
title = {{Notes on combinatorial set theory}},
volume = {14},
year = {1973},
},

@article{MoSh:27,
author = {Moran, Gadi and Shelah, Saharon},
ams-subject = {(90D05)},
journal = {Israel Journal of Mathematics},
review = {MR 47:10084},
pages = {442--449},
title = {{Size direction games over the real line. III}},
volume = {14},
year = {1973},
},

@article{Sh:28,
author = {Shelah, Saharon},
ams-subject = {(02B15)},
journal = {Israel Journal of Mathematics},
review = {MR 49:20},
pages = {282--300},
title = {{There are just four second-order quantifiers}},
volume = {15},
year = {1973},
},

@article{Sh:29,
author = {Shelah, Saharon},
ams-subject = {(05A05)},
journal = {Journal of Combinatorial Theory. Ser. A},
review = {MR 48:10824},
pages = {199--208},
title = {{A substitute for Hall's theorem for families with infinite
 sets}},
volume = {16},
year = {1974},
},

@incollection{MzSh:30,
author = {McKenzie, Ralph and Shelah, Saharon},
booktitle = {Proceedings of the Tarski Symposium (Univ. California,
 Berkeley, Calif., 1971)},
ams-subject = {(02H15)},
review = {MR 50:12711},
pages = {53--74},
publisher = {Amer. Math. Soc., Providence, R.I},
series = {Proc. Sympos. Pure Math.},
title = {{The cardinals of simple models for universal theories}},
volume = {XXV},
year = {1974},
},
����sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/����������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024241�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/allrefs.rst�����������������������������0000664�0000000�0000000�00000000176�14547471226�0026427�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������allrefs
=======

.. bibliography::
   :filter: cited and not ({"regular/doc11", "regular/doc13", "regular/doc15"} & docnames)
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc01.rst�������������������������������0000664�0000000�0000000�00000000143�14547471226�0025677�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc01
=====

:cite:`Sh:1`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc02.rst�������������������������������0000664�0000000�0000000�00000000143�14547471226�0025700�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc02
=====

:cite:`Sh:2`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc03.rst�������������������������������0000664�0000000�0000000�00000000143�14547471226�0025701�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc03
=====

:cite:`Sh:3`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc04.rst�������������������������������0000664�0000000�0000000�00000000143�14547471226�0025702�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc04
=====

:cite:`Sh:4`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc05.rst�������������������������������0000664�0000000�0000000�00000000143�14547471226�0025703�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc05
=====

:cite:`Sh:5`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc06.rst�������������������������������0000664�0000000�0000000�00000000143�14547471226�0025704�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc06
=====

:cite:`Sh:6`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc07.rst�������������������������������0000664�0000000�0000000�00000000236�14547471226�0025710�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc07
=====

:cite:`Sh:7`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"

.. bibliography::
   :filter: "regular/doc15" in docnames
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc08.rst�������������������������������0000664�0000000�0000000�00000000236�14547471226�0025711�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc08
=====

:cite:`Sh:8`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"

.. bibliography::
   :filter: "regular/doc11" in docnames
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc09.rst�������������������������������0000664�0000000�0000000�00000000261�14547471226�0025710�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc09
=====

:cite:`Sh:9`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"

.. bibliography::
   :labelprefix: A
   :filter: "regular/doc13" in docnames
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc10.rst�������������������������������0000664�0000000�0000000�00000000144�14547471226�0025700�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc10
=====

:cite:`Sh:10`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc11.rst�������������������������������0000664�0000000�0000000�00000000144�14547471226�0025701�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc11
=====

:cite:`Sh:11`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc12.rst�������������������������������0000664�0000000�0000000�00000000144�14547471226�0025702�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc12
=====

:cite:`Sh:12`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc13.rst�������������������������������0000664�0000000�0000000�00000000144�14547471226�0025703�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc13
=====

:cite:`Sh:13`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc14.rst�������������������������������0000664�0000000�0000000�00000000144�14547471226�0025704�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc14
=====

:cite:`Sh:14`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc15.rst�������������������������������0000664�0000000�0000000�00000000144�14547471226�0025705�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc15
=====

:cite:`Sh:15`

.. bibliography::
   :list: enumerated
   :filter: title % "Godel case"
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc16.rst�������������������������������0000664�0000000�0000000�00000000034�14547471226�0025704�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc16
=====

:cite:`Sh:16`

����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc17.rst�������������������������������0000664�0000000�0000000�00000000034�14547471226�0025705�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc17
=====

:cite:`Sh:17`

����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc18.rst�������������������������������0000664�0000000�0000000�00000000034�14547471226�0025706�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc18
=====

:cite:`Sh:18`

����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc19.rst�������������������������������0000664�0000000�0000000�00000000036�14547471226�0025711�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc19
=====

:cite:`ErSh:19`

��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc20.rst�������������������������������0000664�0000000�0000000�00000000036�14547471226�0025701�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc20
=====

:cite:`ScSh:20`

��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc21.rst�������������������������������0000664�0000000�0000000�00000000036�14547471226�0025702�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc21
=====

:cite:`ErSh:21`

��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc22.rst�������������������������������0000664�0000000�0000000�00000000034�14547471226�0025701�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc22
=====

:cite:`Sh:22`

����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc23.rst�������������������������������0000664�0000000�0000000�00000000036�14547471226�0025704�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc23
=====

:cite:`GlSh:23`

��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc24.rst�������������������������������0000664�0000000�0000000�00000000034�14547471226�0025703�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc24
=====

:cite:`Sh:24`

����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc25.rst�������������������������������0000664�0000000�0000000�00000000034�14547471226�0025704�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc25
=====

:cite:`Sh:25`

����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc26.rst�������������������������������0000664�0000000�0000000�00000000034�14547471226�0025705�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc26
=====

:cite:`Sh:26`

����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc27.rst�������������������������������0000664�0000000�0000000�00000000036�14547471226�0025710�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc27
=====

:cite:`MoSh:27`

��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc28.rst�������������������������������0000664�0000000�0000000�00000000033�14547471226�0025706�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc28
=====

:cite:`Sh:1`

�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc29.rst�������������������������������0000664�0000000�0000000�00000000033�14547471226�0025707�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc29
=====

:cite:`Sh:1`

�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/doc30.rst�������������������������������0000664�0000000�0000000�00000000033�14547471226�0025677�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doc30
=====

:cite:`Sh:1`

�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-parallel/regular/index.rst�������������������������������0000664�0000000�0000000�00000000447�14547471226�0026107�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. toctree::

   allrefs
   doc01
   doc02
   doc03
   doc04
   doc05
   doc06
   doc07
   doc08
   doc09
   doc10
   doc11
   doc12
   doc13
   doc14
   doc15
   doc16
   doc17
   doc18
   doc19
   doc20
   doc21
   doc22
   doc23
   doc24
   doc25
   doc26
   doc27
   doc28
   doc29
   doc30
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-root_doc/������������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0022614�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-root_doc/conf.py�����������������������������������������0000664�0000000�0000000�00000000265�14547471226�0024116�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib"]
needs_sphinx = "4.0"
root_doc = "root"  # only supported on Sphinx 4.0 and higher
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-root_doc/root.rst����������������������������������������0000664�0000000�0000000�00000000043�14547471226�0024326�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������:cite:`testkey`

.. bibliography::
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-root_doc/test.bib����������������������������������������0000664�0000000�0000000�00000000045�14547471226�0024250�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@Misc{testkey,
title = {The Title}
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-sphinx/��������������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0022315�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-sphinx/Makefile������������������������������������������0000664�0000000�0000000�00000011072�14547471226�0023756�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# 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) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest

help:
	@echo "Please use \`make <target>' where <target> 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 "  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/Sphinxbibtexextensiontest.qhcp"
	@echo "To view the help file:"
	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Sphinxbibtexextensiontest.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/Sphinxbibtexextensiontest"
	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Sphinxbibtexextensiontest"
	@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."

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."
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-sphinx/bibliography.rst����������������������������������0000664�0000000�0000000�00000002453�14547471226�0025526�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Testing the bibliography directive
==================================

Text
----

Huyghens :cite:`1657:huygens` wrote one of the first books on
probability theory.

Mix with a footnote [#note]_ and a regular citation [Test01]_.

Another citation :cite:`dreze:2000`.

Another reference to footnotes [#note]_ and [#note2]_.
More regular citations [Test01]_ and [Test02]_.

Extra reference to a footnote [#footnote-walley2004]_.

Extra reference to a citation [Wa04]_.

Another few citations: :cite:`rockafellar:1970,1972:savage`.

More citations: 

.. rubric:: References

.. bibliography:: test.bib subfolder/test.bib
   :all:
   :labelprefix: A

.. rubric:: References (Cited Test)

.. bibliography:: test2.bib
   :cited:
   :labelprefix: B

.. rubric:: References (Not Cited Test)

.. bibliography:: test2.bib
   :notcited:
   :labelprefix: C

.. rubric:: Footnotes

.. [#note] A footnote.
.. [#note2] Another footnote.
.. [#footnote-walley2004]

    Peter Walley, Renato Pelessoni, and Paolo Vicig. Journal of
    Statistical Planning and Inference, 126(1):119-151, November 2004.

.. rubric:: Citations

.. [Test01] A regular citation.
.. [Test02] Another regular citation.
.. [Wa04]

    Peter Walley, Renato Pelessoni, and Paolo Vicig. Journal of
    Statistical Planning and Inference, 126(1):119-151, November 2004.
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-sphinx/conf.py�������������������������������������������0000664�0000000�0000000�00000000206�14547471226�0023612�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
exclude_patterns = ["_build"]
bibtex_bibfiles = ["test.bib", "test2.bib", "subfolder/test.bib"]
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-sphinx/fnbibliography.rst��������������������������������0000664�0000000�0000000�00000000552�14547471226�0026050�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Testing the footbibliography directive
======================================

Text
----

Huyghens :footcite:`1657:huygens` wrote one of the first books on
probability theory.

Mix with a footnote [#note]_.

Another few citations: :footcite:`rockafellar:1970,1972:savage`.

Cite it twice: :footcite:`1657:huygens`.

.. [#note] A footnote.

.. footbibliography::
������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-sphinx/index.rst�����������������������������������������0000664�0000000�0000000�00000001266�14547471226�0024163�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. Sphinx bibtex extension test documentation master file, created by
   sphinx-quickstart on Mon Mar 21 14:37:33 2011.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Welcome to Sphinx bibtex extension test's documentation!
========================================================

Citation :cite:`1996:fukuda` :cite:`dreze:2000` to other document.
Regular citation test [Test01]_ to other document.
Mix with a footnote [#note]_.

Contents:

.. toctree::
   :maxdepth: 2

   bibliography
   fnbibliography

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

.. [#note] A footnote.
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-sphinx/make.bat������������������������������������������0000664�0000000�0000000�00000010705�14547471226�0023725�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@ECHO OFF

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
	set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
if NOT "%PAPER%" == "" (
	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
)

if "%1" == "" goto help

if "%1" == "help" (
	:help
	echo.Please use `make ^<target^>` where ^<target^> 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.  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\Sphinxbibtexextensiontest.qhcp
	echo.To view the help file:
	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Sphinxbibtexextensiontest.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" == "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
�����������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-sphinx/subfolder/����������������������������������������0000775�0000000�0000000�00000000000�14547471226�0024302�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-sphinx/subfolder/test.bib��������������������������������0000664�0000000�0000000�00000000642�14547471226�0025741�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@TechReport{dreze:2000,
  author={Dr{\'e}ze, Jacques H. and Rustichini, Aldo},
  title={State-dependent utility and decision theory},
  year=2000,
  month=feb,
  institution={Universit{\'e} catholique de Louvain, Center for Operations Research and Econometrics (CORE)},
  type={CORE Discussion Papers},
  url={http://ideas.repec.org/p/cor/louvco/2000007.html},
  number={2000007},
  OPTabstract={},
  OPTkeywords={}
}
����������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-sphinx/test.bib������������������������������������������0000664�0000000�0000000�00000017715�14547471226�0023765�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@InCollection{1657:huygens,
  author = 	 {Christiaan Huygens},
  title = 	 {De Ratiociniis in Ludo Ale{\ae}},
  booktitle = 	 {Exercitationum Mathematicarum Libri Quinque: Quibus accedit {C}hristiani {H}ugenii Tractatus de Ratiociniis in Ale{\ae} Ludo},
  OPTcrossref =  {},
  OPTkey = 	 {},
  pages = 	 {517--524},
  publisher = {Ex officina Johannis Elsevirii},
  year = 	 {1657},
  editor = 	 {Schooten, Franciscus {\'a}},
  OPTvolume = 	 {},
  OPTnumber = 	 {},
  OPTseries = 	 {},
  OPTtype = 	 {},
  OPTchapter = 	 {},
  address = 	 {Lugd. Batav.},
  OPTedition = 	 {},
  OPTmonth = 	 {},
  OPTnote = 	 {},
  OPTannote = 	 {}
}

@Book{joyce:1999,
  author = 	 {Joyce, James},
  ALTeditor = 	 {},
  title = 		 {The Foundations of Causal Decision Theory},
  publisher = 	 {Cambridge University Press},
  year = 		 {1999},
  OPTkey = 		 {},
  OPTvolume = 	 {},
  OPTnumber = 	 {},
  OPTseries = 	 {},
  OPTaddress = 	 {},
  OPTedition = 	 {},
  OPTmonth = 	 {},
  OPTnote = 	 {},
  OPTannote = 	 {}
}

@Unpublished{2011:troffaes:isipta:natext,
  author =       {Matthias C. M. Troffaes and Robert Hable},
  title =        {Robustness of Natural Extension},
  OPTcrossref =  {},
  OPTkey =       {},
  OPTbooktitle = {},
  OPTpages =     {},
  year =      {2011},
  OPTeditor =    {},
  OPTvolume =    {},
  OPTnumber =    {},
  OPTseries =    {},
  OPTaddress =   {},
  OPTmonth =     {},
  OPTorganization = {},
  OPTpublisher = {},
  note =      {Submitted to ISIPTA'11},
  OPTannote =    {}
}

@Article{1996:fukuda,
  author =       {K. Fukuda and A. Prodon},
  title =        {Double description method revisited},
  journal =      {Combinatorics and Computer Science},
  year =         {1996},
  OPTkey =       {},
  volume =    {1120},
  OPTnumber =    {},
  pages =     {91--111},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {},
  note={\url{http://www.ifor.math.ethz.ch/~fukuda/cdd_home/}}
}

@Misc{2009:defra:animal:health,
  author =       {Defra},
  title =        {Impact assessment of an independent body for animal health in {E}ngland},
  year =         {2009},
  note =      {\url{http://www.defra.gov.uk/corporate/consult/newindependent-body-ah/impact-assessment.pdf}},
}

@Misc{test:url,
  OPTkey =       {},
  author =    {Mr. Test},
  title =     {Testing the url command in references},
  OPThowpublished = {},
  OPTmonth =     {},
  OPTyear =      {},
  note =      {\url{http://www.google.com} and \url{http://www.yahoo.com}},
  OPTannote =    {}
}

@MASTERSTHESIS{2000:troffaes:msthesis,
  AUTHOR = {Matthias C. M. Troffaes},
  TITLE = {Quantum algorithmes: theoretische aspecten en toepassingen},
  SCHOOL = {Universiteit Gent},
  YEAR = {2000},
  OPTKEY = {},
  OPTTYPE = {},
  OPTADDRESS = {Gent},
  MONTH = {May},
  OPTNOTE = {},
  OPTANNOTE = {}
}

@PhdThesis{2008:hable:thesis,
  author =       {Robert Hable},
  title =        {Data-Based Decisions under Complex Uncertainty},
  school =       {Ludwig-Maximilians-Universit{\"a}t M{\"u}nchen},
  year =         {2008},
  OPTkey =       {},
  OPTtype =      {},
  OPTaddress =   {},
  OPTmonth =     {},
  OPTnote =      {},
  OPTannote =    {}
}

@BOOKLET{Sherwood,
author="D.A. Sherwood",
title="Phosphorus Loads Entering Long Pond, A Small Embayment of Lake {O}ntario near {R}ochester, {N}ew {Y}ork",
howpublished="USGS Fact Sheet 128-99",
pages=4,
month="November",
year=1999,
}

@InProceedings{2005:cormack,
  author = 	 {Cormack, G. V. and Lynam, T. R.},
  title = 	 {Spam Corpus Creation for TREC},
  OPTcrossref =  {},
  OPTkey = 	 {},
  booktitle = {Proceedings of the Second Conference on Email and Anti-Spam},
  OPTpages = 	 {},
  year = 	 {2005},
  OPTeditor = 	 {},
  OPTvolume = 	 {},
  OPTnumber = 	 {},
  OPTseries = 	 {},
  address = 	 {Palo Alto},
  month = 	 {Jul},
  OPTorganization = {},
  OPTpublisher = {},
  OPTnote = 	 {},
  OPTannote = 	 {}
}

@MANUAL{RSI,
author="RSI",
title="ENVI User's Guide",
publisher="Reasearch Systems Incorporated",
organization="Research Systems Incorporated",
howpublished="PDF File",
address="Boulder, CO",
month="September",
year=2001,
}

@InBook{Kristensen83,
  author = 	 {B. B. Kristensen and Ole L. Madsen and B. M{\o}ller-Pedersen and K. Nygaard},
  editor = 	 {P. Degano and E. Sandewall},   
  title = 	 {Integrated Interactive Computing Systems},
  chapter = 	 {Syntax-directed program modularization},
  publisher = 	 {North-Holland, Amsterdam},
  year = 	 {1983},
  pages = 	 {207-219}
}

@InCollection{2004:seidenfeld::rubinesque,
  author = 	 {J. B. Kadane and Mark J. Schervish and Teddy Seidenfeld},
  title = 	 {A {R}ubinesque theory of decision},
  booktitle = 	 {A festschrift for {H}erman {R}ubin},
  OPTcrossref =  {},
  OPTkey = 	 {},
  pages = 	 {45--55},
  publisher = {Inst. Math. Statist.},
  year = 	 {2004},
  OPTeditor = 	 {},
  volume = 	 {45},
  OPTnumber = 	 {},
  series = 	 {IMS Lecture Notes -- Monograph Series},
  OPTtype = 	 {},
  OPTchapter = 	 {},
  address = 	 {Beachwood, Ohio},
  OPTedition = 	 {},
  OPTmonth = 	 {},
  OPTnote = 	 {},
  OPTannote = 	 {}
}

%%% taken from Jason K. Moore's thesis; it is a good complex long entry for testing
@ARTICLE{Astrom2005,
  author = {{\AA}str{\"o}m, Karl J. and Klein, Richard E. and Lennartsson, Anders},
  title = {Bicycle Dynamics and Control},
  journal = {IEEE Control Systems Magazine},
  year = {2005},
  volume = {25},
  pages = {26--47},
  number = {4},
  month = {August},
  abstract = {This article analyzes the dynamics of bicycles from the perspective
	of control. Models of different complexity are presented, starting
	with simple ones and ending with more realistic models generated
	from multibody software. We consider models that capture essential
	behavior such as self-stabilization as well as models that demonstrate
	difficulties with rear wheel steering. We relate our experiences
	using bicycles in control education along with suggestions for fun
	and thought-provoking experiments with proven student attraction.
	Finally, we describe bicycles and clinical programs designed for
	children with disabilities.},
  bib = {bibtex-keys#Astrom2005},
  bibpr = {private-bibtex-keys#Astrom2005},
  doi = {10.1109/MCS.2005.1499389},
  file = {Astrom2005.pdf:Astrom2005.pdf:PDF},
  keywords = {bicycles, control engineering computing, control engineering education,design,
	handicapped aids, nonlinear control systems, nonlinear dynamicalsystems,
	position control, stability bicycle control, bicycle dynamics, clinical
	programs, computer simulation, control education, disabled children,
	dynamic behavior, inverted pendulum, modelling, multibody software,
	nonminimum phase steering behavior, rear wheel steering difficulties,
	self-stabilization},
  owner = {moorepants},
  review = {Shows a steer torque measurement system constructed for the UCSB instrumented
	bicycle but with little extra information. They use a linear force
	transducer of some sort mounted on the handlebars.
	
	
	They first show the point mass model like Karnopp's 2004 model (older
	ones are referenced in Meijaard2007). They stablize the steer angel
	to roll angle transfer function with a negative feedback gain which
	has dependence on the forward velocity.
	
	
	He adds a basic model of the front fork geometry to the point mass
	model, giving a relationship between steer torque input and steer
	angle which is speed dependent. The roll angle to steer angle now
	has a builtin negative feedback law due to the front fork geometry
	and if the k2 gain is large enough (with steer torque = 0) the system
	is stable. He uses this to calculat a critical velocity for stability.
	
	
	Klein says you should grip the handlebars lightly to take advantage
	of the bicycle self stability. This corresponds to the differences
	in the Whipple model and one with arms.
	
	
	Cites Wier1972 as giving 0.1s and 0.3s of nueromuscular delay in steer
	torque and upper body lean, respectively.
	
	
	The gyroscopic effects give rise to derivative feedback.
	
	
	Claims that riders use variation in forward speed as an additional
	control variable.},
  timestamp = {2008.10.16},
  webpdf = {references-folder/Astrom2005.pdf}
}
���������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-sphinx/test2.bib�����������������������������������������0000664�0000000�0000000�00000002101�14547471226�0024026�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@ARTICLE{1979:shafer,
  AUTHOR = {Glenn Shafer},
  TITLE = {Allocations of Probability},
  JOURNAL = {The Annals of Probability},
  YEAR = {1979},
  OPTKEY = {},
  VOLUME = {7},
  NUMBER = {5},
  PAGES = {827--839},
  MONTH = OCT,
  OPTNOTE = {},
  OPTANNOTE = {}
}

@ARTICLE{1977:morris,
  AUTHOR = {Peter A. Morris},
  TITLE = {Combining expert judgments: a {B}ayesian approach},
  JOURNAL = {Management Science},
  YEAR = {1977},
  OPTKEY = {},
  VOLUME = {23},
  NUMBER = {7},
  PAGES = {679--693},
  MONTH = {March},
  OPTNOTE = {},
  OPTANNOTE = {}
}

@BOOK{1972:savage,
  AUTHOR = {Leonard J. Savage},
  ALTEDITOR = {},
  TITLE = {The Foundations of Statistics},
  PUBLISHER = {Dover},
  YEAR = {1972},
  OPTKEY = {},
  OPTVOLUME = {},
  OPTNUMBER = {},
  OPTSERIES = {},
  ADDRESS = {New York},
  OPTEDITION = {},
  OPTMONTH = {},
  NOTE = {Second revised edition},
  OPTANNOTE = {}
}

@BOOK{rockafellar:1970,
  AUTHOR = {R. Tyrrell Rockafellar},
  ALTEDITOR = {},
  TITLE = {Convex Analysis},
  PUBLISHER = {Princeton University Press},
  YEAR = {1970},
  ADDRESS = {Princeton}
}
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-spurious_div/��������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0023537�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-spurious_div/conf.py�������������������������������������0000664�0000000�0000000�00000000113�14547471226�0025031�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extensions = ["sphinxcontrib.bibtex"]
bibtex_bibfiles = ["references.bib"]
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-spurious_div/index.rst�����������������������������������0000664�0000000�0000000�00000000033�14547471226�0025374�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. bibliography::
   :all:
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-spurious_div/references.bib������������������������������0000664�0000000�0000000�00000000441�14547471226�0026335�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@article{perez2011python,
author = {Pérez, Fernando and Granger, Brian E. and Hunter, John D.},
title = {Python: An Ecosystem for Scientific Computing},
journal = {Computing in Science Engineering},
volume = 13,
number = 2,
pages = {13--21},
doi = {10.1109/MCSE.2010.119},
year = 2011,
}
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-spurious_div_2/������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0023760�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-spurious_div_2/conf.py�����������������������������������0000664�0000000�0000000�00000000000�14547471226�0025245�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/roots/test-spurious_div_2/index.rst���������������������������������0000664�0000000�0000000�00000000030�14547471226�0025612�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. [CIT2022] A citation.��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_cython_module/�������������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0022555�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_cython_module/.gitignore���������������������������������������0000664�0000000�0000000�00000000026�14547471226�0024543�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/build/
*.c
*.egg-info����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_cython_module/pyproject.toml�����������������������������������0000664�0000000�0000000�00000000074�14547471226�0025472�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[build-system]
requires = ["setuptools", "wheel", "Cython"]
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_cython_module/setup.py�����������������������������������������0000664�0000000�0000000�00000001067�14547471226�0024273�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������from Cython.Build import cythonize
from setuptools import find_packages, setup

setup(
    name="some-cython-module",
    version="0.0.1",
    license="BSD",
    author="Matthias C. M. Troffaes",
    author_email="matthias.troffaes@gmail.com",
    description="Test module for bibtex citations in cython modules",
    zip_safe=False,
    platforms="any",
    packages=find_packages("src"),
    package_dir={"": "src"},
    ext_modules=cythonize(
        ["src/some_cython_module/cite.pyx", "src/some_cython_module/footcite.pyx"]
    ),
    python_requires=">=3.6",
)
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_cython_module/src/���������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0023344�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_cython_module/src/some_cython_module/��������������������������0000775�0000000�0000000�00000000000�14547471226�0027240�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_cython_module/src/some_cython_module/__init__.py���������������0000664�0000000�0000000�00000000000�14547471226�0031337�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_cython_module/src/some_cython_module/cite.pyx������������������0000664�0000000�0000000�00000002152�14547471226�0030726�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""Docstring for some_module. :cite:`testmodule`"""


def func(funcarg):
    """Docstring for function func.

    Long description goes here. See :cite:`testfunc`.

    :param funcarg: Docstring for parameter. :cite:`testfuncarg`
    """


a = 1
"""Docstring for variable a.

Long description goes here. See :cite:`testdata`.
"""


class Foo:
    """Docstring for class Foo.

    Long description goes here. See :cite:`testclass`.
    """

    b = 2
    """Docstring for class attribute b.

    Long description goes here. See :cite:`testclassattr`.
    """

    def __init__(self, initarg):
        """Docstring for constructor.

        Long description goes here. See :cite:`testinit`

        :param initarg: Docstring for parameter. :cite:`testinitarg`
        """

        self.c = 3
        """Docstring for instance attribute c.

        Long description goes here. See :cite:`testinstanceattr`.
        """

    def method(self, methodarg):
        """Docstring for method.

        Long description goes here. See :cite:`testmethod`.

        :param methodarg: Docstring for parameter. :cite:`testmethodarg`
        """
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_cython_module/src/some_cython_module/footcite.pyx��������������0000664�0000000�0000000�00000002227�14547471226�0031621�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""Docstring for some_module. :footcite:`testmodule`"""


def func(funcarg):
    """Docstring for function func.

    Long description goes here. See :footcite:`testfunc`.

    :param funcarg: Docstring for parameter. :footcite:`testfuncarg`
    """


a = 1
"""Docstring for variable a.

Long description goes here. See :footcite:`testdata`.
"""


class Foo:
    """Docstring for class Foo.

    Long description goes here. See :footcite:`testclass`.
    """

    b = 2
    """Docstring for class attribute b.

    Long description goes here. See :footcite:`testclassattr`.
    """

    def __init__(self, initarg):
        """Docstring for constructor.

        Long description goes here. See :footcite:`testinit`.

        :param initarg: Docstring for parameter. :footcite:`testinitarg`
        """

        self.c = 3
        """Docstring for instance attribute c.

        Long description goes here. See :footcite:`testinstanceattr`
        """

    def method(self, methodarg):
        """Docstring for method.

        Long description goes here. See  :footcite:`testmethod`.

        :param methodarg: Docstring for parameter. :footcite:`testmethodarg`
        """
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_module/��������������������������������������������������������0000775�0000000�0000000�00000000000�14547471226�0021171�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_module/__init__.py���������������������������������������������0000664�0000000�0000000�00000000000�14547471226�0023270�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_module/cite.py�������������������������������������������������0000664�0000000�0000000�00000002152�14547471226�0022467�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""Docstring for some_module. :cite:`testmodule`"""


def func(funcarg):
    """Docstring for function func.

    Long description goes here. See :cite:`testfunc`.

    :param funcarg: Docstring for parameter. :cite:`testfuncarg`
    """


a = 1
"""Docstring for variable a.

Long description goes here. See :cite:`testdata`.
"""


class Foo:
    """Docstring for class Foo.

    Long description goes here. See :cite:`testclass`.
    """

    b = 2
    """Docstring for class attribute b.

    Long description goes here. See :cite:`testclassattr`.
    """

    def __init__(self, initarg):
        """Docstring for constructor.

        Long description goes here. See :cite:`testinit`

        :param initarg: Docstring for parameter. :cite:`testinitarg`
        """

        self.c = 3
        """Docstring for instance attribute c.

        Long description goes here. See :cite:`testinstanceattr`.
        """

    def method(self, methodarg):
        """Docstring for method.

        Long description goes here. See :cite:`testmethod`.

        :param methodarg: Docstring for parameter. :cite:`testmethodarg`
        """
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/some_module/footcite.py���������������������������������������������0000664�0000000�0000000�00000002227�14547471226�0023362�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""Docstring for some_module. :footcite:`testmodule`"""


def func(funcarg):
    """Docstring for function func.

    Long description goes here. See :footcite:`testfunc`.

    :param funcarg: Docstring for parameter. :footcite:`testfuncarg`
    """


a = 1
"""Docstring for variable a.

Long description goes here. See :footcite:`testdata`.
"""


class Foo:
    """Docstring for class Foo.

    Long description goes here. See :footcite:`testclass`.
    """

    b = 2
    """Docstring for class attribute b.

    Long description goes here. See :footcite:`testclassattr`.
    """

    def __init__(self, initarg):
        """Docstring for constructor.

        Long description goes here. See :footcite:`testinit`.

        :param initarg: Docstring for parameter. :footcite:`testinitarg`
        """

        self.c = 3
        """Docstring for instance attribute c.

        Long description goes here. See :footcite:`testinstanceattr`
        """

    def method(self, methodarg):
        """Docstring for method.

        Long description goes here. See  :footcite:`testmethod`.

        :param methodarg: Docstring for parameter. :footcite:`testmethodarg`
        """
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_autoapi.py�����������������������������������������������������0000664�0000000�0000000�00000003762�14547471226�0021744�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""
    test_autodoc
    ~~~~~~~~~~~~

    Test with autodoc.
"""

import sphinx

from test.common import (
    html_citation_refs_single,
    html_citations,
    html_footnote_refs,
    html_footnotes,
)

import pytest


@pytest.mark.skipif(
    sphinx.version_info < (7, 0),
    reason="autoapi appears broken on sphinx < 7.0",
)
@pytest.mark.sphinx("html", testroot="autoapi")
def test_autoapi(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    root = (app.outdir / "index.html").read_text()
    output = (app.outdir / "autoapi/some_module/cite/index.html").read_text()
    labels = [
        "One",
        "Two",
        "Thr",
        "Fou",
        "Fiv",
        "Six",
        "Sev",
        "Eig",
        "Nin",
        "Ten",
        "Ele",
    ]
    titles = [
        "Een",
        "Twee",
        "Drie",
        "Vier",
        "Vijf",
        "Zes",
        "Zeven",
        "Acht",
        "Negen",
        "Tien",
        "Elf",
    ]
    for label, title in zip(labels, titles):
        assert len(html_citation_refs_single(label=label).findall(output)) == 1
        assert len(html_citations(label=label).findall(root)) == 1
        match_ref = html_citation_refs_single(label=label).search(output)
        match = html_citations(label=label).search(root)
        assert match_ref
        assert match
        assert match_ref.group("refid") == match.group("id_")
        assert title in match.group("text")
        # no backrefs as citations are in other document
        # assert match_ref.group("id_") == match.group("backref")
    output2 = (app.outdir / "autoapi/some_module/footcite/index.html").read_text()
    assert len(html_footnote_refs().findall(output2)) == 11
    for title in titles:
        text = ".*" + title + ".*"
        assert len(html_footnotes(text=text).findall(output2)) == 1
        match = html_footnotes(text=text).search(output2)
        assert match
        id_ = match.group("id_")
        assert len(html_footnote_refs(refid=id_).findall(output2)) == 1
��������������sphinxcontrib-bibtex-2.6.2/test/test_autodoc.py�����������������������������������������������������0000664�0000000�0000000�00000007342�14547471226�0021736�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""
    test_autodoc
    ~~~~~~~~~~~~

    Test with autodoc.
"""

import test.some_module.cite
import test.some_module.footcite
from test.common import (
    html_citation_refs_single,
    html_citations,
    html_footnote_refs,
    html_footnotes,
)

import pytest


# for coverage
def test_some_module() -> None:
    f1 = test.some_module.cite.Foo(0)
    assert f1.c == 3
    f2 = test.some_module.footcite.Foo(0)
    assert f2.c == 3


@pytest.mark.sphinx("html", testroot="autodoc")
def test_autodoc(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "doc_cite.html").read_text()
    labels = [
        "One",
        "Two",
        "Thr",
        "Fou",
        "Fiv",
        "Six",
        "Sev",
        "Eig",
        "Nin",
        "Ten",
        "Ele",
    ]
    titles = [
        "Een",
        "Twee",
        "Drie",
        "Vier",
        "Vijf",
        "Zes",
        "Zeven",
        "Acht",
        "Negen",
        "Tien",
        "Elf",
    ]
    for label, title in zip(labels, titles):
        assert len(html_citation_refs_single(label=label).findall(output)) == 1
        assert len(html_citations(label=label).findall(output)) == 1
        match_ref = html_citation_refs_single(label=label).search(output)
        match = html_citations(label=label).search(output)
        assert match_ref
        assert match
        assert match_ref.group("refid") == match.group("id_")
        assert title in match.group("text")
        assert match_ref.group("id_") == match.group("backref")
    output2 = (app.outdir / "doc_footcite.html").read_text()
    assert len(html_footnote_refs().findall(output2)) == 11
    for title in titles:
        text = ".*" + title + ".*"
        assert len(html_footnotes(text=text).findall(output2)) == 1
        match = html_footnotes(text=text).search(output2)
        assert match
        id_ = match.group("id_")
        assert len(html_footnote_refs(refid=id_).findall(output2)) == 1


# test that sphinx [source] links do not generate a warning (issue 17)
@pytest.mark.sphinx("html", testroot="autodoc_viewcode")
def test_autodoc_viewcode(app, warning) -> None:
    app.build()
    assert not warning.getvalue()


@pytest.mark.cython
@pytest.mark.sphinx("html", testroot="autodoc_cython")
def test_autodoc_cython(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "doc_cite.html").read_text()
    labels = [
        "One",
        "Two",
        "Thr",
        # 'Fou',
        "Fiv",
        # 'Six', 'Sev',
        "Eig",
        "Nin",
        "Ten",
        "Ele",
    ]
    titles = [
        "Een",
        "Twee",
        "Drie",
        # 'Vier',
        "Vijf",
        # 'Zes', 'Zeven',
        "Acht",
        "Negen",
        "Tien",
        "Elf",
    ]
    for label, title in zip(labels, titles):
        assert len(html_citation_refs_single(label=label).findall(output)) == 1
        assert len(html_citations(label=label).findall(output)) == 1
        match_ref = html_citation_refs_single(label=label).search(output)
        match = html_citations(label=label).search(output)
        assert match_ref
        assert match
        assert match_ref.group("refid") == match.group("id_")
        assert title in match.group("text")
        assert match_ref.group("id_") == match.group("backref")
    output2 = (app.outdir / "doc_footcite.html").read_text()
    assert len(html_footnote_refs().findall(output2)) == len(labels)
    for title in titles:
        text = ".*" + title + ".*"
        assert len(html_footnotes(text=text).findall(output2)) == 1
        match = html_footnotes(text=text).search(output2)
        assert match
        id_ = match.group("id_")
        assert len(html_footnote_refs(refid=id_).findall(output2)) == 1
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_backrefs.py����������������������������������������������������0000664�0000000�0000000�00000002373�14547471226�0022057�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""Test back references."""

from test.common import html_citations

import pytest


@pytest.mark.sphinx("html", testroot="backrefs")
def test_backrefs(app, warning) -> None:
    app.build()
    output = (app.outdir / "index.html").read_text()
    match = html_citations(text=".*Test zero.*").search(output)
    assert match
    assert match.group("backref") is None
    assert match.group("backref1") is None
    assert match.group("backref2") is None
    assert match.group("backref3") is None
    match = html_citations(text=".*Test one.*").search(output)
    assert match
    assert match.group("backref") is not None
    assert match.group("backref1") is None
    assert match.group("backref2") is None
    assert match.group("backref3") is None
    match = html_citations(text=".*Test two.*").search(output)
    assert match
    assert match.group("backref") is None
    assert match.group("backref1") is not None
    assert match.group("backref2") is not None
    assert match.group("backref3") is None
    match = html_citations(text=".*Test three.*").search(output)
    assert match
    assert match.group("backref") is None
    assert match.group("backref1") is not None
    assert match.group("backref2") is not None
    assert match.group("backref3") is not None
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_bibfiles.py����������������������������������������������������0000664�0000000�0000000�00000012033�14547471226�0022050�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import re
import shutil
import time
from test.common import html_citations

import pytest
from pybtex.exceptions import PybtexError
from sphinx.errors import ExtensionError

status_up_to_date = "checking bibtex cache.*up to date"
status_out_of_date = "checking bibtex cache.*out of date"
status_parsing = "parsing bibtex file.*parsed [0-9]+ entries"


# Test that updates to the bibfile generate the correct result when
# Sphinx is run again.
@pytest.mark.sphinx("html", testroot="bibfiles_out_of_date")
def test_bibfiles_out_of_date(make_app, app_params) -> None:
    args, kwargs = app_params
    app = make_app(*args, **kwargs)
    app.build()
    status = app._status.getvalue()
    # not found, parsing
    assert re.search(status_up_to_date, status) is None
    assert re.search(status_out_of_date, status) is not None
    assert re.search(status_parsing, status) is not None
    output = (app.outdir / "index.html").read_text()
    assert html_citations(label="1", text=".*Akkerdju.*").search(output)
    assert html_citations(label="2", text=".*Bro.*").search(output)
    assert html_citations(label="3", text=".*Chap.*").search(output)
    assert html_citations(label="4", text=".*Dude.*").search(output)
    # wait to ensure different timestamp
    time.sleep(0.1)
    shutil.copyfile((app.srcdir / "test_new.xxx"), (app.srcdir / "test.bib"))
    app = make_app(*args, **kwargs)
    app.build()
    status = app._status.getvalue()
    # out of date, parsing
    assert re.search(status_up_to_date, status) is None
    assert re.search(status_out_of_date, status) is not None
    assert re.search(status_parsing, status) is not None
    output = (app.outdir / "index.html").read_text()
    assert html_citations(label="1", text=".*Eminence.*").search(output)
    assert html_citations(label="2", text=".*Frater.*").search(output)
    assert html_citations(label="3", text=".*Giggles.*").search(output)
    assert html_citations(label="4", text=".*Handy.*").search(output)
    # wait to ensure different timestamp
    time.sleep(0.1)
    shutil.copyfile((app.srcdir / "index_new.xxx"), (app.srcdir / "index.rst"))
    app = make_app(*args, **kwargs)
    app.build()
    status = app._status.getvalue()
    # up to date
    assert re.search(status_up_to_date, status) is not None
    assert re.search(status_out_of_date, status) is None
    assert re.search(status_parsing, status) is None


@pytest.mark.sphinx("html", testroot="bibfiles_not_found")
def test_bibfiles_not_found(app, warning) -> None:
    app.build()
    warning.seek(0)
    warnings = warning.readlines()
    assert len(warnings) == 2
    assert "could not open bibtex file" in warnings[0]
    assert "not found or not configured in bibtex_bibfiles" in warnings[1]


@pytest.mark.sphinx("html", testroot="bibfiles_missing_conf")
def test_bibfiles_missing_conf(make_app, app_params) -> None:
    args, kwargs = app_params
    with pytest.raises(ExtensionError, match="bibtex_bibfiles"):
        make_app(*args, **kwargs)


@pytest.mark.sphinx("html", testroot="bibfiles_encoding", freshenv=True)
def test_bibfiles_encoding(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8-sig")
    assert "Äpplé" in output


@pytest.mark.sphinx(
    "html",
    testroot="bibfiles_encoding",
    freshenv=True,
    confoverrides={"bibtex_encoding": "ascii"},
)
def test_bibfiles_encoding_bad(make_app, app_params) -> None:
    args, kwargs = app_params
    with pytest.raises(PybtexError, match="can't decode byte 0xc4"):
        make_app(*args, **kwargs)


@pytest.mark.sphinx(
    "html",
    testroot="bibfiles_encoding",
    freshenv=True,
    confoverrides={"bibtex_encoding": "invalid"},
)
def test_bibfiles_encoding_invalid(make_app, app_params) -> None:
    args, kwargs = app_params
    with pytest.raises(LookupError, match="unknown encoding"):
        make_app(*args, **kwargs)


@pytest.mark.sphinx("html", testroot="bibfiles_subfolder")
def test_bibfiles_subfolder(app, warning) -> None:
    app.build()
    assert not warning.getvalue()


@pytest.mark.sphinx("html", testroot="bibfiles_multiple_macros")
def test_bibfiles_multiple_macros(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text()
    assert html_citations(label="1", text=r".*Rev\. Mod\. Phys\..*").search(output)


@pytest.mark.sphinx("html", testroot="bibfiles_multiple_keys")
def test_bibfiles_multiple_keys(app, warning) -> None:
    app.build()
    assert (
        re.search(
            "bibliography data error in .*: repeated bibliograhpy entry: test",
            warning.getvalue(),
        )
        is not None
    )
    output = (app.outdir / "index.html").read_text()
    assert html_citations(label="1", text=".*Test one.*").search(output)


# https://bitbucket.org/pybtex-devs/pybtex/issues/441/author-editor-fields-not-resolved-via
@pytest.mark.xfail(reason="pybtex bug")
@pytest.mark.sphinx("html", testroot="bibfiles_crossref")
def test_bibfiles_crossref(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_bibliography.py������������������������������������������������0000664�0000000�0000000�00000025235�14547471226�0022754�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import re
from test.common import (
    html_citation_refs,
    html_citations,
    html_footnote_refs,
    html_footnotes,
)
from typing import Set

import pytest


def citation_refs(output) -> Set[str]:
    return {match.group("label") for match in html_citation_refs().finditer(output)}


def citations(output) -> Set[str]:
    return {match.group("label") for match in html_citations().finditer(output)}


@pytest.mark.sphinx("html", testroot="bibliography_empty", freshenv=True)
def test_bibliography_empty(app, warning) -> None:
    app.build()
    assert not warning.getvalue()


@pytest.mark.sphinx("html", testroot="bibliography_header")
def test_bibliography_header(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8")
    assert "Regular Citations" in output
    assert "Footnote Citations" in output


@pytest.mark.sphinx(
    "pseudoxml",
    testroot="bibliography_empty",
    freshenv=True,
    confoverrides={
        "bibtex_bibliography_header": ".. rubric:: Regular Citations",
        "bibtex_footbibliography_header": ".. rubric:: Footnote Citations",
    },
)
def test_bibliography_empty_no_header(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.pseudoxml").read_text(encoding="utf-8")
    assert "Regular Citations" not in output
    assert "Footnote Citations" not in output
    assert "<rubric" not in output


@pytest.mark.sphinx("html", testroot="bibliography_style_default")
def test_bibliography_style_default(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text()
    # ensure Man09 is cited with plain style and not with alpha style
    assert citation_refs(output) == citations(output) == {"1"}


@pytest.mark.sphinx("html", testroot="bibliography_style_label_1")
def test_bibliography_style_label_1(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text()
    # the custom style uses keys as labels
    # citations
    assert len(html_citations(label="myfancybibtexkey").findall(output)) == 1
    assert len(html_citations(label="myotherfancybibtexkey").findall(output)) == 1
    assert len(html_citation_refs(label="myfancybibtexkey").findall(output)) == 1
    assert len(html_citation_refs(label="myotherfancybibtexkey").findall(output)) == 1


@pytest.mark.sphinx("html", testroot="bibliography_style_label_2")
def test_bibliography_style_label_2(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text()
    assert len(html_citation_refs(label="APAa").findall(output)) == 1
    assert len(html_citation_refs(label="APAb").findall(output)) == 1


@pytest.mark.sphinx("html", testroot="bibliography_style_nowebref")
def test_bibliography_style_nowebref(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8")
    # the custom style suppresses web links
    assert "http://arxiv.org" not in output
    assert "http://dx.doi.org" not in output


@pytest.mark.sphinx("html", testroot="bibliography_bad_option")
def test_bibliography_bad_option(app, warning) -> None:
    app.build()
    assert 'unknown option: "thisisintentionallyinvalid"' in warning.getvalue()


# see issue 87
@pytest.mark.sphinx("html", testroot="bibliography_key_prefix")
def test_bibliography_key_prefix(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "doc0.html").read_text()
    assert citations(output) == citation_refs(output) == {"AMan09", "AEve03"}
    output = (app.outdir / "doc1.html").read_text()
    assert citations(output) == citation_refs(output) == {"BMan09"}


@pytest.mark.sphinx("html", testroot="bibliography_label_prefix_1")
def test_bibliography_label_prefix_1(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "doc1.html").read_text()
    assert citations(output) == citation_refs(output) == {"A1"}
    output = (app.outdir / "doc2.html").read_text()
    assert citations(output) == citation_refs(output) == {"B1"}


@pytest.mark.sphinx("html", testroot="bibliography_label_prefix_2")
def test_bibliography_label_prefix_2(app, warning) -> None:
    doc1_refs = {"AFM12", "ABlu83", "AGIH02", "AWS14"}
    doc1_cites = {"ABlu83", "AFM12", "AGIH02", "AWS14"}
    doc2_refs = {"BShi13"}
    doc2_cites = {"BShi13"}
    sum_refs = {"CMcMahonKM10", "CRMM11", "CRM09", "CMM03", "CHdJMD13", "AFM12"}
    sum_cites = {"CMcMahonKM10", "CRMM11", "CRM09", "CMM03", "CHdJMD13"}
    app.build()
    assert not warning.getvalue()
    output1 = (app.outdir / "doc1.html").read_text(encoding="utf-8-sig")
    # use <= instead of == as there are some extra reference nodes
    assert doc1_refs <= citation_refs(output1)
    assert doc1_cites == citations(output1)
    output2 = (app.outdir / "doc2.html").read_text(encoding="utf-8-sig")
    assert doc2_refs <= citation_refs(output2)
    assert doc2_cites == citations(output2)
    output3 = (app.outdir / "summary.html").read_text(encoding="utf-8-sig")
    assert sum_refs <= citation_refs(output3)
    assert sum_cites == citations(output3)
    # check citation reference from summary to doc1
    match1 = html_citations(label="AFM12").search(output1)
    match3 = html_citation_refs(label="AFM12").search(output3)
    assert match1
    assert match3
    assert match1.group("id_") == match3.group("refid")
    assert match3.group("refdoc") == "doc1.html"


# test order of bibliography entries when using an unsorted style
@pytest.mark.sphinx("html", testroot="bibliography_order_unsorted")
def test_bibliography_order_unsorted(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8-sig")
    assert re.search(
        r"<p>A\.\sFirst\. Test 1\.</p>.*<p>B\.\sSecond\. Test 2\.</p>",
        output,
        re.DOTALL,
    )


# see issue 187
@pytest.mark.sphinx("html", testroot="bibliography_multi_foot")
def test_bibliography_multi_foot(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8")
    assert output.count('<p class="rubric"') == 3
    assert len(re.findall(html_footnotes(id_="footcite-2009-mandel"), output)) == 1
    assert len(re.findall(html_footnotes(id_="footcite-2003-evensen"), output)) == 1
    assert len(re.findall(html_footnotes(id_="footcite-1986-lorenc"), output)) == 1
    assert (
        len(re.findall(html_footnote_refs(refid="footcite-2009-mandel"), output)) == 2
    )
    assert (
        len(re.findall(html_footnote_refs(refid="footcite-2003-evensen"), output)) == 1
    )
    assert (
        len(re.findall(html_footnote_refs(refid="footcite-1986-lorenc"), output)) == 1
    )


@pytest.mark.sphinx("html", testroot="bibliography_missing_field")
def test_bibliography_missing_field(app, warning) -> None:
    app.build()
    assert "missing year in testkey" in warning.getvalue()


@pytest.mark.sphinx("html", testroot="bibliography_content")
def test_bibliography_content(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output1 = (app.outdir / "doc1.html").read_text()
    output2 = (app.outdir / "doc2.html").read_text()
    output3 = (app.outdir / "doc3.html").read_text()
    assert citation_refs(output1) == {"One", "Two"}
    assert citations(output1) == {"One", "Two", "Thr"}
    assert citation_refs(output2) == {"Fou", "Fiv"}
    assert citations(output2) == {"Fiv", "Six"}
    assert not citation_refs(output3)
    assert citations(output3) == {"Fou"}


@pytest.mark.sphinx("html", testroot="bibliography_bad_key")
def test_bibliography_bad_key(app, warning) -> None:
    app.build()
    assert 'could not find bibtex key "badkey"' in warning.getvalue()


def url(link: str) -> str:
    return f'<a class="reference external" href="{link}">{link}</a>'


@pytest.mark.sphinx("html", testroot="bibliography_url")
def test_bibliography_url(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8")
    match1 = html_citations(label="Een").search(output)
    match2 = html_citations(label="Twe").search(output)
    match3 = html_citations(label="Dri").search(output)
    match4 = html_citations(label="Vie").search(output)
    assert match1 is not None
    assert match2 is not None
    assert match3 is not None
    assert match4 is not None
    assert url("https://github.com/") in match1.group("text")
    assert "aaa" + url("https://google.com/") + "bbb" in match2.group("text")
    assert url("https://youtube.com/") in match3.group("text")
    assert "URL: " + url("https://wikipedia.org/") in match4.group("text")
    # check tooltips do not contain \url command
    match4 = html_citation_refs(label="Een").search(output)
    match5 = html_citation_refs(label="Twe").search(output)
    match6 = html_citation_refs(label="Dri").search(output)
    match7 = html_citation_refs(label="Vie").search(output)
    assert match4 is not None
    assert match5 is not None
    assert match6 is not None
    assert match7 is not None
    assert "\\url " not in match4.group("title")
    assert "\\url " not in match5.group("title")
    assert "\\url " not in match6.group("title")
    assert "\\url " not in match7.group("title")


@pytest.mark.sphinx("html", testroot="bibliography_custom_ids")
def test_bibliography_custom_ids(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8")
    assert ' id="bibliography-id-1"' in output
    assert ' id="bibliography-id-2"' in output
    assert ' id="footbibliography-id-1"' in output
    assert ' id="footbibliography-id-2"' in output
    match1 = html_citations(text=".*Evensen.*").search(output)
    match2 = html_citations(text=".*Mandel.*").search(output)
    match3 = html_citations(text=".*Lorenc.*").search(output)
    assert match1 is not None
    assert match2 is not None
    assert match3 is not None
    assert match1.group("id_") == "cite-id-1-2003-evensen"
    assert match2.group("id_") == "cite-id-1-2009-mandel"
    assert match3.group("id_") == "cite-id-2-1986-lorenc"
    match1 = html_footnotes(text=".*Evensen.*").search(output)
    match2 = html_footnotes(text=".*Mandel.*").search(output)
    match3 = html_footnotes(text=".*Lorenc.*").search(output)
    assert match1 is not None
    assert match2 is not None
    assert match3 is not None
    assert match1.group("id_") == "footcite-id-2003-evensen"
    assert match2.group("id_") == "footcite-id-2009-mandel"
    assert match3.group("id_") == "footcite-id-1986-lorenc"
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_citation.py����������������������������������������������������0000664�0000000�0000000�00000051222�14547471226�0022106�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import re
from dataclasses import dataclass, field
from test.common import html_citation_refs, html_citations, html_docutils_citation_refs
from typing import cast

import pybtex.plugin
import pytest
from pybtex.style.formatting.unsrt import Style as UnsrtStyle
from pybtex.style.template import words

import sphinxcontrib.bibtex.plugin
from sphinxcontrib.bibtex.domain import BibtexDomain
from sphinxcontrib.bibtex.style.referencing import BracketStyle, PersonStyle
from sphinxcontrib.bibtex.style.referencing.author_year import AuthorYearReferenceStyle


@pytest.mark.sphinx("html", testroot="citation_not_found")
def test_citation_not_found(app, warning) -> None:
    app.build()
    assert 'could not find bibtex key "nosuchkey1"' in warning.getvalue()
    assert 'could not find bibtex key "nosuchkey2"' in warning.getvalue()


# test mixing of ``:cite:`` and ``[]_`` (issue 2)
@pytest.mark.sphinx("html", testroot="citation_mixed")
def test_citation_mixed(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    domain = cast(BibtexDomain, app.env.get_domain("cite"))
    assert len(domain.citation_refs) == 1
    citation_ref = domain.citation_refs.pop()
    assert citation_ref.targets == [("Test", "", "")]
    assert citation_ref.docname == "adoc1"
    assert len(domain.citations) == 1
    citation = domain.citations.pop()
    assert citation.formatted_entry.label == "1"


@pytest.mark.sphinx("html", testroot="citation_multiple_keys")
def test_citation_multiple_keys(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8-sig")
    cits = {match.group("label") for match in html_citations().finditer(output)}
    citrefs = {match.group("label") for match in html_citation_refs().finditer(output)}
    assert {"App", "Bra"} == cits == citrefs


@pytest.mark.sphinx("html", testroot="citation_any_role")
def test_citation_any_role(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8-sig")
    cits = {match.group("label") for match in html_citations().finditer(output)}
    citrefs = {match.group("label") for match in html_citation_refs().finditer(output)}
    assert {"App", "Bra"} == cits == citrefs


def find_label(output: str, label: str):
    assert html_citation_refs(label=label).search(output) is not None


# see issue 85
@pytest.mark.sphinx("html", testroot="citation_no_author_no_key")
def test_citation_no_author_no_key(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8-sig")
    find_label(output, "<em>Software projects built on Mesos</em>, 2015")
    find_label(output, "2015")
    find_label(output, "Mandel, 2009")
    find_label(output, "2009")
    find_label(output, "<em>This citation only has a title</em>, n.d.")
    find_label(output, "n.d.")
    find_label(output, "Whatever, 2021")
    find_label(output, "2021")


# test cites spanning multiple lines (issue 205)
@pytest.mark.sphinx("html", testroot="citation_whitespace")
def test_citation_whitespace(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8-sig")
    # ensure Man09 is cited
    assert len(html_citation_refs(label="Fir").findall(output)) == 1
    assert len(html_citation_refs(label="Sec").findall(output)) == 1


# test document not in toctree (issue 228)
@pytest.mark.sphinx("pseudoxml", testroot="citation_from_orphan")
def test_citation_from_orphan(app, warning) -> None:
    app.build()
    assert not warning.getvalue()


@pytest.mark.sphinx("text", testroot="citation_roles")
def test_citation_roles_label(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.txt").read_text(encoding="utf-8-sig")
    tests = [
        ("p", " [dDEF03] "),
        ("ps", " [dDEF03] "),
        ("t", " de Du *et al.* [dDEF03] "),
        ("ts", " de Du, Em, and Fa [dDEF03] "),
        ("ct", " De Du *et al.* [dDEF03] "),
        ("cts", " De Du, Em, and Fa [dDEF03] "),
        ("labelpar", " [dDEF03] "),
        ("label", " dDEF03 "),
        ("yearpar", " [2003] "),
        ("year", " 2003 "),
        ("authorpar", " [de Du *et al.*] "),
        ("authorpars", " [de Du, Em, and Fa] "),
        ("author", " de Du *et al.* "),
        ("authors", " de Du, Em, and Fa "),
        ("cauthor", " De Du *et al.* "),
        ("cauthors", " De Du, Em, and Fa "),
        ("empty", " AAA  AAA "),
        ("p", " [aA01, BC02] "),
        ("ps", " [aA01, BC02] "),
        ("t", " al Ap [aA01], Be and Ci [BC02] "),
        ("ts", " al Ap [aA01], Be and Ci [BC02] "),
        ("ct", " Al Ap [aA01], Be and Ci [BC02] "),
        ("cts", " Al Ap [aA01], Be and Ci [BC02] "),
        ("labelpar", " [aA01, BC02] "),
        ("label", " aA01, BC02 "),
        ("yearpar", " [2001, 2002] "),
        ("year", " 2001, 2002 "),
        ("authorpar", " [al Ap, Be and Ci] "),
        ("authorpars", " [al Ap, Be and Ci] "),
        ("author", " al Ap, Be and Ci "),
        ("authors", " al Ap, Be and Ci "),
        ("cauthor", " Al Ap, Be and Ci "),
        ("cauthors", " Al Ap, Be and Ci "),
        ("empty", " BBB  BBB "),
        ("p", " [Ge04, Hu05, Ix06] "),
        ("ps", " [Ge04, Hu05, Ix06] "),
        ("t", " Ge [Ge04], Hu [Hu05], Ix [Ix06] "),
        ("ts", " Ge [Ge04], Hu [Hu05], Ix [Ix06] "),
        ("ct", " Ge [Ge04], Hu [Hu05], Ix [Ix06] "),
        ("cts", " Ge [Ge04], Hu [Hu05], Ix [Ix06] "),
        ("labelpar", " [Ge04, Hu05, Ix06] "),
        ("label", " Ge04, Hu05, Ix06 "),
        ("yearpar", " [2004, 2005, 2006] "),
        ("year", " 2004, 2005, 2006 "),
        ("authorpar", " [Ge, Hu, Ix] "),
        ("authorpars", " [Ge, Hu, Ix] "),
        ("author", " Ge, Hu, Ix "),
        ("authors", " Ge, Hu, Ix "),
        ("cauthor", " Ge, Hu, Ix "),
        ("cauthors", " Ge, Hu, Ix "),
        ("empty", " CCC  CCC "),
    ]
    for role, text in tests:
        escaped_text = re.escape(text)
        pattern = f'":cite:{role}:".*{escaped_text}'
        assert re.search(pattern, output) is not None
    # check :cite:empty: generates citation
    assert "[Ju07] Jo Ju. Testseven. 2007." in output


@pytest.mark.sphinx(
    "text",
    testroot="citation_roles",
    confoverrides={"bibtex_reference_style": "author_year"},
)
def test_citation_roles_authoryear(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.txt").read_text(encoding="utf-8-sig")
    tests = [
        ("p", " [de Du *et al.*, 2003] "),
        ("ps", " [de Du, Em, and Fa, 2003] "),
        ("alp", " de Du *et al.*, 2003 "),
        ("alps", " de Du, Em, and Fa, 2003 "),
        ("t", " de Du *et al.* [2003] "),
        ("ts", " de Du, Em, and Fa [2003] "),
        ("ct", " De Du *et al.* [2003] "),
        ("cts", " De Du, Em, and Fa [2003] "),
        ("labelpar", " [dDEF03] "),
        ("label", " dDEF03 "),
        ("yearpar", " [2003] "),
        ("year", " 2003 "),
        ("authorpar", " [de Du *et al.*] "),
        ("authorpars", " [de Du, Em, and Fa] "),
        ("author", " de Du *et al.* "),
        ("authors", " de Du, Em, and Fa "),
        ("cauthor", " De Du *et al.* "),
        ("cauthors", " De Du, Em, and Fa "),
        ("empty", " AAA  AAA "),
        ("p", " [al Ap, 2001, Be and Ci, 2002] "),
        ("ps", " [al Ap, 2001, Be and Ci, 2002] "),
        ("alp", " al Ap, 2001, Be and Ci, 2002 "),
        ("alps", " al Ap, 2001, Be and Ci, 2002 "),
        ("t", " al Ap [2001], Be and Ci [2002] "),
        ("ts", " al Ap [2001], Be and Ci [2002] "),
        ("ct", " Al Ap [2001], Be and Ci [2002] "),
        ("cts", " Al Ap [2001], Be and Ci [2002] "),
        ("labelpar", " [aA01, BC02] "),
        ("label", " aA01, BC02 "),
        ("yearpar", " [2001, 2002] "),
        ("year", " 2001, 2002 "),
        ("authorpar", " [al Ap, Be and Ci] "),
        ("authorpars", " [al Ap, Be and Ci] "),
        ("author", " al Ap, Be and Ci "),
        ("authors", " al Ap, Be and Ci "),
        ("cauthor", " Al Ap, Be and Ci "),
        ("cauthors", " Al Ap, Be and Ci "),
        ("empty", " BBB  BBB "),
        ("p", " [Ge, 2004, Hu, 2005, Ix, 2006] "),
        ("ps", " [Ge, 2004, Hu, 2005, Ix, 2006] "),
        ("alp", " Ge, 2004, Hu, 2005, Ix, 2006 "),
        ("alps", " Ge, 2004, Hu, 2005, Ix, 2006 "),
        ("t", " Ge [2004], Hu [2005], Ix [2006] "),
        ("ts", " Ge [2004], Hu [2005], Ix [2006] "),
        ("ct", " Ge [2004], Hu [2005], Ix [2006] "),
        ("cts", " Ge [2004], Hu [2005], Ix [2006] "),
        ("labelpar", " [Ge04, Hu05, Ix06] "),
        ("label", " Ge04, Hu05, Ix06 "),
        ("yearpar", " [2004, 2005, 2006] "),
        ("year", " 2004, 2005, 2006 "),
        ("authorpar", " [Ge, Hu, Ix] "),
        ("authorpars", " [Ge, Hu, Ix] "),
        ("author", " Ge, Hu, Ix "),
        ("authors", " Ge, Hu, Ix "),
        ("cauthor", " Ge, Hu, Ix "),
        ("cauthors", " Ge, Hu, Ix "),
        ("empty", " CCC  CCC "),
    ]
    for role, text in tests:
        escaped_text = re.escape(text)
        pattern = f'":cite:{role}:".*{escaped_text}'
        assert re.search(pattern, output) is not None
    # check :cite:empty: generates citation
    assert "[Ju07] Jo Ju. Testseven. 2007." in output


@pytest.mark.sphinx("text", testroot="citation_roles_pre_post")
def test_citation_roles_label_pre_post(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.txt").read_text(encoding="utf-8-sig")
    lab1 = "dDEF03"
    lab2 = "aA01"
    lab3 = "BC02"
    ref1 = "de Du *et al.*"
    ref2 = "al Ap"
    ref3 = "Be and Ci"
    tests = [
        ("p", f" A [see {lab1}] "),
        ("p", f" B [{lab1}, p. 1] "),
        ("p", f" C [see {lab1}, p. 1] "),
        ("t", f" A {ref1} [see {lab1}] "),
        ("t", f" B {ref1} [{lab1}, p. 1] "),
        ("t", f" C {ref1} [see {lab1}, p. 1] "),
        ("p", f" A [see {lab2}, {lab3}] "),
        ("p", f" B [{lab2}, p. 1, {lab3}] "),
        ("p", f" C [see {lab2}, p. 1, {lab3}] "),
        ("p", f" D [{lab2}, see {lab3}] "),
        ("p", f" E [{lab2}, {lab3}, p. 2] "),
        ("p", f" F [{lab2}, see {lab3}, p. 2] "),
        ("p", f" G [see {lab2}, see {lab3}] "),
        ("p", f" H [{lab2}, p. 1, {lab3}, p. 2] "),
        ("p", f" I [see {lab2}, {lab3}, p. 2] "),
        ("p", f" J [see {lab2}, p. 1, see {lab3}, p. 2] "),
        ("t", f" A {ref2} [see {lab2}], {ref3} [{lab3}] "),
        ("t", f" B {ref2} [{lab2}, p. 1], {ref3} [{lab3}] "),
        ("t", f" C {ref2} [see {lab2}, p. 1], {ref3} [{lab3}] "),
        ("t", f" D {ref2} [{lab2}], {ref3} [see {lab3}] "),
        ("t", f" E {ref2} [{lab2}], {ref3} [{lab3}, p. 2] "),
        ("t", f" F {ref2} [{lab2}], {ref3} [see {lab3}, p. 2] "),
        ("t", f" G {ref2} [see {lab2}], {ref3} [see {lab3}] "),
        ("t", f" H {ref2} [{lab2}, p. 1], {ref3} [{lab3}, p. 2] "),
        ("t", f" I {ref2} [see {lab2}], {ref3} [{lab3}, p. 2] "),
        ("t", f" J {ref2} [see {lab2}, p. 1], {ref3} [see {lab3}, p. 2] "),
    ]
    for role, text in tests:
        escaped_text = re.escape(text)
        pattern = f'":cite:{role}:".*{escaped_text}'
        assert re.search(pattern, output) is not None, text


@pytest.mark.sphinx(
    "text",
    testroot="citation_roles_pre_post",
    confoverrides={"bibtex_reference_style": "author_year"},
)
def test_citation_roles_authoryear_pre_post(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.txt").read_text(encoding="utf-8-sig")
    ref1 = "de Du *et al.*"
    ref2 = "al Ap"
    ref3 = "Be and Ci"
    tests = [
        ("p", f" A [see {ref1}, 2003] "),
        ("p", f" B [{ref1}, 2003, p. 1] "),
        ("p", f" C [see {ref1}, 2003, p. 1] "),
        ("t", f" A {ref1} [see 2003] "),
        ("t", f" B {ref1} [2003, p. 1] "),
        ("t", f" C {ref1} [see 2003, p. 1] "),
        ("p", f" A [see {ref2}, 2001, {ref3}, 2002] "),
        ("p", f" B [{ref2}, 2001, p. 1, {ref3}, 2002] "),
        ("p", f" C [see {ref2}, 2001, p. 1, {ref3}, 2002] "),
        ("p", f" D [{ref2}, 2001, see {ref3}, 2002] "),
        ("p", f" E [{ref2}, 2001, {ref3}, 2002, p. 2] "),
        ("p", f" F [{ref2}, 2001, see {ref3}, 2002, p. 2] "),
        ("p", f" G [see {ref2}, 2001, see {ref3}, 2002] "),
        ("p", f" H [{ref2}, 2001, p. 1, {ref3}, 2002, p. 2] "),
        ("p", f" I [see {ref2}, 2001, {ref3}, 2002, p. 2] "),
        ("p", f" J [see {ref2}, 2001, p. 1, see {ref3}, 2002, p. 2] "),
        ("t", f" A {ref2} [see 2001], {ref3} [2002] "),
        ("t", f" B {ref2} [2001, p. 1], {ref3} [2002] "),
        ("t", f" C {ref2} [see 2001, p. 1], {ref3} [2002] "),
        ("t", f" D {ref2} [2001], {ref3} [see 2002] "),
        ("t", f" E {ref2} [2001], {ref3} [2002, p. 2] "),
        ("t", f" F {ref2} [2001], {ref3} [see 2002, p. 2] "),
        ("t", f" G {ref2} [see 2001], {ref3} [see 2002] "),
        ("t", f" H {ref2} [2001, p. 1], {ref3} [2002, p. 2] "),
        ("t", f" I {ref2} [see 2001], {ref3} [2002, p. 2] "),
        ("t", f" J {ref2} [see 2001, p. 1], {ref3} [see 2002, p. 2] "),
    ]
    for role, text in tests:
        escaped_text = re.escape(text)
        pattern = f'":cite:{role}:".*{escaped_text}'
        assert re.search(pattern, output) is not None, text


@pytest.mark.sphinx(
    "html",
    testroot="citation_roles",
    confoverrides={"bibtex_default_style": "plain", "bibtex_reference_style": "super"},
)
def test_citation_roles_super(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8-sig")
    # just a cursory check that superscript references are present
    assert '<sup><a class="reference internal" href="#' in output


@pytest.mark.sphinx(
    "pseudoxml",
    testroot="debug_bibtex_citation",
    confoverrides={"bibtex_reference_style": "non_existing"},
)
def test_citation_style_invalid(make_app, app_params) -> None:
    args, kwargs = app_params
    with pytest.raises(ImportError, match="plugin .*non_existing not found"):
        make_app(*args, **kwargs)


def my_bracket() -> BracketStyle:
    return BracketStyle(
        left="(",
        right=")",
        sep="; ",
        sep2="; ",
        last_sep="; ",
    )


def my_person() -> PersonStyle:
    return PersonStyle(
        style="last",
        abbreviate=False,
        sep=" & ",
        sep2=None,
        last_sep=None,
        other=" et al",
    )


@dataclass
class CustomReferenceStyle(AuthorYearReferenceStyle):
    bracket_textual: BracketStyle = field(default_factory=my_bracket)
    bracket_parenthetical: BracketStyle = field(default_factory=my_bracket)
    bracket_author: BracketStyle = field(default_factory=my_bracket)
    bracket_label: BracketStyle = field(default_factory=my_bracket)
    bracket_year: BracketStyle = field(default_factory=my_bracket)
    person: PersonStyle = field(default_factory=my_person)
    author_year_sep: str = " "


sphinxcontrib.bibtex.plugin.register_plugin(
    "sphinxcontrib.bibtex.style.referencing", "xxx_custom_xxx", CustomReferenceStyle
)


@pytest.mark.sphinx(
    "text",
    testroot="citation_roles",
    confoverrides={"bibtex_reference_style": "xxx_custom_xxx"},
)
def test_citation_style_custom(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.txt").read_text(encoding="utf-8-sig")
    tests = [
        ("p", " (de Du et al 2003) "),
        ("ps", " (de Du & Em & Fa 2003) "),
        ("t", " de Du et al (2003) "),
        ("ts", " de Du & Em & Fa (2003) "),
        ("ct", " De Du et al (2003) "),
        ("cts", " De Du & Em & Fa (2003) "),
        ("labelpar", " (dDEF03) "),
        ("label", " dDEF03 "),
        ("yearpar", " (2003) "),
        ("year", " 2003 "),
        ("authorpar", " (de Du et al) "),
        ("authorpars", " (de Du & Em & Fa) "),
        ("author", " de Du et al "),
        ("authors", " de Du & Em & Fa "),
        ("cauthor", " De Du et al "),
        ("cauthors", " De Du & Em & Fa "),
        ("empty", " AAA  AAA "),
        ("p", " (al Ap 2001; Be & Ci 2002) "),
        ("ps", " (al Ap 2001; Be & Ci 2002) "),
        ("t", " al Ap (2001); Be & Ci (2002) "),
        ("ts", " al Ap (2001); Be & Ci (2002) "),
        ("ct", " Al Ap (2001); Be & Ci (2002) "),
        ("cts", " Al Ap (2001); Be & Ci (2002) "),
        ("labelpar", " (aA01; BC02) "),
        ("label", " aA01; BC02 "),
        ("yearpar", " (2001; 2002) "),
        ("year", " 2001; 2002 "),
        ("authorpar", " (al Ap; Be & Ci) "),
        ("authorpars", " (al Ap; Be & Ci) "),
        ("author", " al Ap; Be & Ci "),
        ("authors", " al Ap; Be & Ci "),
        ("cauthor", " Al Ap; Be & Ci "),
        ("cauthors", " Al Ap; Be & Ci "),
        ("empty", " BBB  BBB "),
        ("p", " (Ge 2004; Hu 2005; Ix 2006) "),
        ("ps", " (Ge 2004; Hu 2005; Ix 2006) "),
        ("t", " Ge (2004); Hu (2005); Ix (2006) "),
        ("ts", " Ge (2004); Hu (2005); Ix (2006) "),
        ("ct", " Ge (2004); Hu (2005); Ix (2006) "),
        ("cts", " Ge (2004); Hu (2005); Ix (2006) "),
        ("labelpar", " (Ge04; Hu05; Ix06) "),
        ("label", " Ge04; Hu05; Ix06 "),
        ("yearpar", " (2004; 2005; 2006) "),
        ("year", " 2004; 2005; 2006 "),
        ("authorpar", " (Ge; Hu; Ix) "),
        ("authorpars", " (Ge; Hu; Ix) "),
        ("author", " Ge; Hu; Ix "),
        ("authors", " Ge; Hu; Ix "),
        ("cauthor", " Ge; Hu; Ix "),
        ("cauthors", " Ge; Hu; Ix "),
        ("empty", " CCC  CCC "),
    ]
    for role, text in tests:
        escaped_text = re.escape(text)
        pattern = f'":cite:{role}:".*{escaped_text}'
        assert re.search(pattern, output) is not None
    # check :cite:empty: generates citation
    assert "[Ju07] Jo Ju. Testseven. 2007." in output


@pytest.mark.sphinx("text", testroot="citation_style_round_brackets")
def test_citation_style_round_brackets(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.txt").read_text(encoding="utf-8-sig")
    assert "(Evensen, 2003)" in output
    assert "Evensen (2003)" in output


@pytest.mark.sphinx("html", testroot="citation_toctree")
def test_citation_toctree(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8-sig")
    output1 = (app.outdir / "adoc1.html").read_text(encoding="utf-8-sig")
    output2 = (app.outdir / "adoc2.html").read_text(encoding="utf-8-sig")
    assert len(html_citations(label="1").findall(output)) == 1
    assert len(html_citation_refs(label="1").findall(output1)) == 1
    assert len(html_docutils_citation_refs(label=r"Test2").findall(output2)) == 1
    assert len(html_citations(label="Test2").findall(output2)) == 1


@pytest.mark.sphinx("html", testroot="debug_bibtex_citation")
def test_citation_tooltip(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8-sig")
    assert len(html_citations(label="tes").findall(output)) == 1
    assert (
        len(html_citation_refs(label="tes", title=r"The title\.").findall(output)) == 1
    )


@pytest.mark.sphinx(
    "html", testroot="debug_bibtex_citation", confoverrides={"bibtex_tooltips": False}
)
def test_citation_tooltip2(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8-sig")
    assert len(html_citations(label="tes").findall(output)) == 1
    assert len(html_citation_refs(label="tes", title=None).findall(output)) == 1


class CustomTooltipStyle(UnsrtStyle):
    def get_misc_template(self, e):
        return words["whoop whoop"]


pybtex.plugin.register_plugin(
    "pybtex.style.formatting", "xxx_custom_tooltip_xxx", CustomTooltipStyle
)


@pytest.mark.sphinx(
    "html",
    testroot="debug_bibtex_citation",
    confoverrides={"bibtex_tooltips_style": "xxx_custom_tooltip_xxx"},
)
def test_citation_tooltip3(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8-sig")
    assert len(html_citations(label="tes").findall(output)) == 1
    assert (
        len(html_citation_refs(label="tes", title="whoop whoop").findall(output)) == 1
    )


# https://bitbucket.org/pybtex-devs/pybtex/issues/442/author-names-with-special-latex-characters
@pytest.mark.xfail(reason="upstream bug")
@pytest.mark.sphinx("html", testroot="citation_label_special_chars")
def test_citation_label_special_chars(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text(encoding="utf-8-sig")
    assert len(html_citations(label="SBV09").findall(output)) == 1
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_citation_rinoh.py����������������������������������������������0000664�0000000�0000000�00000001465�14547471226�0023311�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import re

import pytest


@pytest.mark.rinohtype
@pytest.mark.sphinx("rinoh", testroot="citation_rinoh")
def test_citation_rinoh(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "book.stylelog").read_text()
    assert len(re.findall(r"NoteMarkerByID\('tes', style='citation'\)", output)) == 1
    assert len(re.findall(r"DirectReference\('tes'\)", output)) == 1


@pytest.mark.rinohtype
@pytest.mark.sphinx("rinoh", testroot="citation_rinoh_multidoc")
def test_citation_rinoh_multidoc(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "book.stylelog").read_text()
    assert len(re.findall(r"NoteMarkerByID\('tes', style='citation'\)", output)) == 2
    assert len(re.findall(r"DirectReference\('tes'\)", output)) == 1
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_citation_target.py���������������������������������������������0000664�0000000�0000000�00000002237�14547471226�0023456�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import pytest

from sphinxcontrib.bibtex.citation_target import parse_citation_targets


@pytest.mark.parametrize(
    "target,expected",
    [
        ("abc", [("abc", "", "")]),
        ("{xyz}abc", [("abc", "xyz", "")]),
        ("abc{xyz}", [("abc", "", "xyz")]),
        ("{xyz}abc{123}", [("abc", "xyz", "123")]),
        ("  {xyz} abc  {123}   ", [("abc", "xyz", "123")]),
        ("abc,def", [("abc", "", ""), ("def", "", "")]),
        ("  abc ,   def  ", [("abc", "", ""), ("def", "", "")]),
        (
            "  {xyz }abc  {123} ,  {hi hi} def {oops, blah } ",
            [("abc", "xyz ", "123"), ("def", "hi hi", "oops, blah ")],
        ),
    ],
)
def test_citation_target(target, expected) -> None:
    assert list(parse_citation_targets(target)) == expected


@pytest.mark.parametrize(
    "target",
    [
        "}",
        "{}}",
        "abc}",
        "abc{}}",
        "",
        ",",
        ",a",
        "a,",
        "{}a",
        "a{}",
        "{a}b{}",
        "{}a{b}",
    ],
)
def test_citation_target_invalid(target) -> None:
    with pytest.raises(ValueError, match="malformed citation target"):
        list(parse_citation_targets(target))
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_debug.py�������������������������������������������������������0000664�0000000�0000000�00000007172�14547471226�0021367�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""Some tests purely used for stepping into the debugger
to help understand what docutils/sphinx are doing.
"""

import shutil

import pytest

docutils_citation_xml = """
    <paragraph>
        <reference ids="id1" internal="True" refid="label">
            <inline>
                [Label]
    <citation backrefs="id1" docname="index" ids="label" names="label">
        <label support_smartquotes="False">
            Label
        <paragraph>
            The title.
"""

bibtex_citation_xml = """
    <paragraph>
        <inline ids="id1">
            [
            <reference internal="True" refid="id3" reftitle="The title.">
                tes
            ]
    <container ids="id2">
        <citation backrefs="id1" docname="index" ids="id3">
            <label support_smartquotes="False">
                tes
            <paragraph>
                The title.
"""


@pytest.mark.sphinx("pseudoxml", testroot="debug_docutils_citation")
def test_debug_docutils_citation(app, warning):
    """A simple test with a single standard docutils citation."""
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.pseudoxml").read_text()
    assert output.split("\n")[1:] == docutils_citation_xml.split("\n")[1:]


@pytest.mark.sphinx("pseudoxml", testroot="debug_bibtex_citation")
def test_debug_bibtex_citation(app, warning):
    """A simple test with a single standard docutils citation."""
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.pseudoxml").read_text()
    assert output.split("\n")[1:] == bibtex_citation_xml.split("\n")[1:]


# see issue 226
@pytest.mark.sphinx("pseudoxml", testroot="debug_bibtex_citation")
def test_rebuild_empty_outdir(make_app, app_params):
    args, kwargs = app_params
    app0 = make_app(freshenv=True, *args, **kwargs)
    app0.build()
    assert not app0._warning.getvalue()
    shutil.rmtree(app0.outdir)
    app1 = make_app(freshenv=False, *args, **kwargs)
    app1.build()
    assert "could not find bibtex key" not in app1._warning.getvalue()


@pytest.mark.sphinx("pseudoxml", testroot="debug_minimal_example")
def test_debug_minimal_example(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.pseudoxml").read_text()
    assert [line for line in output.split("\n")][1:] == [
        "    <paragraph>",
        "        See ",
        '        <inline ids="id1">',
        "            Nelson [",
        '            <reference internal="True" refid="id4" '
        'reftitle="Edward Nelson. Radically Elementary Probability Theory. '
        'Princeton University Press, 1987.">',
        "                Nel87",
        "            ]",
        "         for an introduction to non-standard analysis.",
        "        Non-standard analysis is fun ",
        '        <inline ids="id2">',
        "            [",
        '            <reference internal="True" refid="id4" '
        'reftitle="Edward Nelson. Radically Elementary Probability Theory. '
        'Princeton University Press, 1987.">',
        "                Nel87",
        "            ]",
        "        .",
        '    <container ids="id3">',
        '        <citation backrefs="id1 id2" docname="index" ids="id4">',
        '            <label support_smartquotes="False">',
        "                Nel87",
        "            <paragraph>",
        "                Edward Nelson.",
        "                 ",
        "                <emphasis>",
        "                    Radically Elementary Probability Theory",
        "                .",
        "                 ",
        "                Princeton University Press, 1987.",
        "",
    ]
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_debug.txt������������������������������������������������������0000664�0000000�0000000�00000015113�14547471226�0021550�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������app.build
  builder.build(to_build, ...) [to_build is a list of files]
    builder.read() [via updated_docnames = set(self.read())]
      events.emit("env-get-outdated", added, changed, removed)
      events.emit('env-before-read-docs', self.env, docnames)
      builder._read_serial(docnames)
        for doc in docnames:
          events.emit('env-purge-doc', self.env, docname)
          env.clear_doc(docname)
            domain.clear_doc(docname) [for every domain]
          builder.read_doc(docname)
            env.prepare_settings
              env.temp_data['docname']
              env.temp_data['default_role']
              env.temp_data['default_domain']
            sphinx.io.read_doc(app, env, doc2path(docname))
            reader.read(...) [reads source and then calls...]
              parser.parse(...) [parser is sphinx.parsers.RSTParser]
              statemachine.run(...) [statemachine is docutils.parsers.rst.states.RSTStateMachine]
                statemachine.footnote_reference(...)
                statemachine.citation(...)
<document><paragraph><citation_reference ids="id1" refname="citationlabel">CitationLabel</citation_reference></paragraph><citation ids="citationlabel" names="citationlabel"><label>CitationLabel</label><paragraph>Citation Text.</paragraph></citation></document>
            publisher.apply_transforms
              [a lot of stuff here, a few of interest:]
              sphinx.transforms.UnreferencedFootnotesDetector
              sphinx.domains.citation.CitationDefinitionTransform
                [keeps track of all citation nodes across all documents]
                citation_node['docname'] = env.docname
                domain['citation'].note_citation
                  domaindata['citations'][label_node.astext()] = (citation_node['docname'], citation_node['ids'][0], citation_node.line) 
                label_node['support_smartquotes'] = False
              sphinx.domains.citation.CitationReferenceTransform
                [keeps track of citation_reference nodes, and replaces them with pending_xref so domain['citation'].resolve_xref will catch them later]
                target = citation_reference_node.astext()
                ref = pending_xref(target, refdomain='citation', reftype='ref',
                                   reftarget=target, refwarn=True,
                                   support_smartquotes=False,
                                   ids=citation_reference_node["ids"],
                                   classes=citation_reference_node.get('classes', []))
                ref += docutils.nodes.inline(target, '[%s]' % target)
                copy_source_info(citation_reference_node, ref)
                citation_reference_node.replace_self(ref)
                domain['citation'].note_citation_reference
                  self.citation_refs.add(target)
              sphinx.transforms.references.SphinxDomains
                domain.process_doc [for each domain]
              sphinx.transforms.DoctreeReadEvent
                emit('doctree-read', self.document)
            [doctree is now created]
            env.events.emit('source-read', env.docname, arg)
            env.temp_data.clear()
            builder.write_doctree [saves doctree to pickled file]
    [back into the builder.read function]
    events.emit('env-updated', builder.env)
  [back into the builder.build function]
  pickle.dump(builder.env, f, pickle.HIGHEST_PROTOCOL)
  builder.env.check_consistency()
    domain.check_consistency() [for every domain]
  builder.write(...)
    for doc in docnames:
      env.get_and_resolve_doctree(doc, env)
        env.apply_post_transforms
          sphinx.builders.latex.transforms.CitationReferenceTransform
          sphinx.transforms.post_transforms.ReferencesResolver
            for each pending_xref node:
              contnode = node[0]
              reftype = node['reftype'] [= 'ref' in standard run, see above]
              reftarget = node['reftarget'] [this is the label in standard run]
              refdoc = env.docname or node['refdoc'] [doc of the citation_reference_node, if same as env.docname then no need to specify]
              domain.resolve_xref(env, refdoc, self.app.builder,
                                  reftype, reftarget, node, contnode)
                [for the citation domain, this does the following]
                citation_node_docname, citation_node_id, citation_node_line = domaindata['citation'].citations[reftarget]
                make_refnode(builder, refdoc [= env.docname], citation_node_docname, citation_node_id, contnode)
                  docutils.nodes.reference('', '', internal=True)
                  # here the uri is constructed across documents etc.
                [the pending ref is replaced with this reference node]
                [if the resolve_xref returns None = missing link, if it raises NoUri, then no url is generated but no error]
          sphinx.builders.latex.transforms.BibliographyTransform

Transform Stages For Docutils Test
==================================

* docutils reader:
  <citation_reference ids="id1" refname="citationlabel">CitationLabel</citation_reference>
  <citation ids="citationlabel" names="citationlabel"><label>CitationLabel</label><paragraph>Citation Text.</paragraph></citation>

* sphinx.domains.citation.CitationDefinitionTransform
  <citation docname="index" ids="citationlabel" names="citationlabel"><label support_smartquotes="False">CitationLabel</label><paragraph>Citation Text.</paragraph></citation>

* sphinx.domains.citation.CitationReferenceTransform
  <pending_xref ids="id1" refdomain="citation" reftarget="CitationLabel" reftype="ref" refwarn="True" support_smartquotes="False"><inline>[CitationLabel]</inline></pending_xref>

* sphinx.transforms.post_transforms.ReferencesResolver
  <reference ids="id1" internal="True" refid="citationlabel"><inline>[CitationLabel]</inline></reference>

Transform Stages For BibTeX Test
================================

* docutils reader:
  <pending_xref ids="id1" refdoc="index" refdomain="cite" refexplicit="False" reftarget="testkey" reftype="cite" refwarn="False"><literal classes="xref cite">testkey</literal></pending_xref>
  <bibliography ids="['bibtex-bibliography-index-1']"/>

* sphinxcontrib.bibtex.transforms.BibliographyTransform
  <paragraph ids="bibtex-bibliography-index-1"><citation docname="index" ids="bibtex-citation-testkey" names="bibtex-citation-testkey"><label>Las20</label><paragraph>Firstname Lastname. The title. 2020.</paragraph></citation></paragraph>

* sphinx.transforms.post_transforms.ReferencesResolver
  <inline classes="cite" ids="id1"><reference internal="True" refid="bibtex-citation-testkey">[Las20]</reference></inline>
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_duplicate.py���������������������������������������������������0000664�0000000�0000000�00000010527�14547471226�0022251�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""Test warnings on duplicate labels/keys."""

from test.common import html_citation_refs, html_citations

import pytest


@pytest.mark.sphinx("html", testroot="duplicate_label")
def test_duplicate_label(app, warning) -> None:
    # see github issue 14
    app.build()
    assert 'duplicate label "1" for keys "Test" and "Test2"' in warning.getvalue()
    output = (app.outdir / "doc1.html").read_text()
    output2 = (app.outdir / "doc2.html").read_text()
    assert html_citations(label="1").search(output)
    assert html_citations(label="1").search(output2)


@pytest.mark.sphinx("html", testroot="duplicate_citation")
def test_duplicate_citation(app, warning) -> None:
    app.build()
    warning.seek(0)
    warnings = list(warning.readlines())
    assert len(warnings) == 1
    assert 'duplicate citation for key "Test"' in warnings[0]
    # assure distinct citation ids
    output = (app.outdir / "index.html").read_text()
    ids = [match.group("id_") for match in html_citations().finditer(output)]
    assert len(ids) == 2  # just to check ids are found
    assert len(set(ids)) == 2, "citation ids not unique"


@pytest.mark.sphinx("html", testroot="duplicate_nearly_identical_entries")
def test_duplicate_nearly_identical_entries(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text()
    cits = list(html_citations().finditer(output))
    cit_refs = list(html_citation_refs().finditer(output))
    assert len(cits) == len(cit_refs) == 2
    assert (
        {cit.group("label") for cit in cits}
        == {cit_ref.group("label") for cit_ref in cit_refs}
        == {"xyz19a", "xyz19b"}
    )


@pytest.mark.sphinx("html", testroot="duplicate_nearly_identical_keys", freshenv=True)
def test_duplicate_nearly_identical_keys_1(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text()
    # assure both citations and citation references are present
    assert html_citation_refs(label="Smi").search(output)
    assert html_citation_refs(label="Pop").search(output)
    assert html_citation_refs(label="Ein").search(output)
    assert html_citations(label="Smi").search(output)
    assert html_citations(label="Pop").search(output)
    assert html_citations(label="Ein").search(output)
    # assure distinct ids for citations
    ids = {match.group("id_") for match in html_citations().finditer(output)}
    refids = {match.group("refid") for match in html_citation_refs().finditer(output)}
    assert None not in ids
    assert len(ids) == 3
    assert ids == refids


@pytest.mark.sphinx(
    "html",
    testroot="duplicate_nearly_identical_keys",
    freshenv=True,
    confoverrides={"bibtex_cite_id": "cite-{bibliography_count}-{key}"},
)
def test_duplicate_nearly_identical_keys_2(app, warning) -> None:
    app.build()
    warning.seek(0)
    warnings = list(warning.readlines())
    assert len(warnings) == 2
    assert "duplicate citation id cite-1-test" in warnings[0]
    assert "duplicate citation id cite-1-test" in warnings[1]
    output = (app.outdir / "index.html").read_text()
    # assure both citations and citation references are present
    assert html_citation_refs(label="Smi").search(output)
    assert html_citation_refs(label="Pop").search(output)
    assert html_citation_refs(label="Ein").search(output)
    assert html_citations(label="Smi").search(output)
    assert html_citations(label="Pop").search(output)
    assert html_citations(label="Ein").search(output)
    # assure distinct ids for citations
    ids = {match.group("id_") for match in html_citations().finditer(output)}
    refids = {match.group("refid") for match in html_citation_refs().finditer(output)}
    assert None not in ids
    assert len(ids) == 3
    assert ids == refids


# this test "accidentally" includes a user provided id which
# clashes with a bibtex generated citation id
@pytest.mark.sphinx("html", testroot="duplicate_citation_id")
def test_duplicate_citation_id(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text()
    user_ids = {"id1", "id2", "id3"}
    ids = {match.group("id_") for match in html_citations().finditer(output)}
    refids = {match.group("refid") for match in html_citation_refs().finditer(output)}
    assert ids == refids
    assert len(ids) == 1
    assert not (user_ids & ids)
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_filter.py������������������������������������������������������0000664�0000000�0000000�00000004743�14547471226�0021567�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import pytest


@pytest.mark.sphinx("html", testroot="filter")
def test_filter(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text()
    assert "Tralalala" in output
    assert "ideetje" not in output
    assert "Jakkamakka" not in output
    output = (app.outdir / "or.html").read_text()
    assert "Tralalala" not in output
    assert "ideetje" in output
    assert "Jakkamakka" in output
    output = (app.outdir / "noteq.html").read_text()
    assert "Tralalala" in output
    assert "ideetje" in output
    assert "Jakkamakka" not in output
    output = (app.outdir / "lt.html").read_text()
    assert "Tralalala" in output
    assert "ideetje" not in output
    assert "Jakkamakka" not in output
    output = (app.outdir / "lte.html").read_text()
    assert "Tralalala" in output
    assert "ideetje" not in output
    assert "Jakkamakka" in output
    output = (app.outdir / "gt.html").read_text()
    assert "Tralalala" not in output
    assert "ideetje" in output
    assert "Jakkamakka" not in output
    output = (app.outdir / "gte.html").read_text()
    assert "Tralalala" not in output
    assert "ideetje" in output
    assert "Jakkamakka" in output
    output = (app.outdir / "key.html").read_text()
    assert "Tralalala" not in output
    assert "ideetje" in output
    assert "Jakkamakka" not in output
    output = (app.outdir / "false.html").read_text()
    assert "Tralalala" not in output
    assert "ideetje" not in output
    assert "Jakkamakka" not in output
    output = (app.outdir / "true.html").read_text()
    assert "Tralalala" in output
    assert "ideetje" in output
    assert "Jakkamakka" in output
    output = (app.outdir / "title.html").read_text()
    assert "Tralalala" not in output
    assert "ideetje" not in output
    assert "Jakkamakka" in output


@pytest.mark.sphinx("html", testroot="filter_fix_author_keyerror")
def test_filter_fix_author_keyerror(app) -> None:
    app.build()


@pytest.mark.sphinx("html", testroot="filter_option_clash")
def test_filter_option_clash(app, warning) -> None:
    app.build()
    warnings = warning.getvalue()
    assert ":filter: overrides :all:" in warnings
    assert ":filter: overrides :cited:" in warnings
    assert ":filter: overrides :notcited:" in warnings


@pytest.mark.sphinx("html", testroot="filter_syntax_error")
def test_filter_syntax_error(app, warning) -> None:
    app.build()
    assert warning.getvalue().count("syntax error in :filter: expression") == 9
�����������������������������sphinxcontrib-bibtex-2.6.2/test/test_footcite.py����������������������������������������������������0000664�0000000�0000000�00000006662�14547471226�0022120�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import re
from dataclasses import dataclass, field

import pytest

import sphinxcontrib.bibtex.plugin
from sphinxcontrib.bibtex.style.referencing import BracketStyle, PersonStyle
from sphinxcontrib.bibtex.style.referencing.foot import FootReferenceStyle


@pytest.mark.sphinx("text", testroot="footcite_roles")
def test_footcite_roles(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.txt").read_text(encoding="utf-8-sig")
    tests = [
        ("p", " [1] "),
        ("ps", " [1] "),
        ("t", " de Du *et al.*[1] "),
        ("ts", " de Du, Em, and Fa[1] "),
        ("ct", " De Du *et al.*[1] "),
        ("cts", " De Du, Em, and Fa[1] "),
        ("p", " [2][3] "),
        ("ps", " [2][3] "),
        ("t", " al Ap[2], Be and Ci[3] "),
        ("ts", " al Ap[2], Be and Ci[3] "),
        ("ct", " Al Ap[2], Be and Ci[3] "),
        ("cts", " Al Ap[2], Be and Ci[3] "),
        ("p", " [4][5][6] "),
        ("ps", " [4][5][6] "),
        ("t", " Ge[4], Hu[5], Ix[6] "),
        ("ts", " Ge[4], Hu[5], Ix[6] "),
        ("ct", " Ge[4], Hu[5], Ix[6] "),
        ("cts", " Ge[4], Hu[5], Ix[6] "),
    ]
    for role, text in tests:
        escaped_text = re.escape(text)
        pattern = f'":footcite:{role}:".*{escaped_text}'
        assert re.search(pattern, output) is not None


def my_bracket() -> BracketStyle:
    return BracketStyle(
        sep="; ",
        sep2="; ",
        last_sep="; ",
    )


def my_person() -> PersonStyle:
    return PersonStyle(
        style="last",
        abbreviate=False,
        sep=" & ",
        sep2=None,
        last_sep=None,
        other=" et al",
    )


@dataclass
class CustomReferenceStyle(FootReferenceStyle):
    bracket_textual: BracketStyle = field(default_factory=my_bracket)
    person: PersonStyle = field(default_factory=my_person)


sphinxcontrib.bibtex.plugin.register_plugin(
    "sphinxcontrib.bibtex.style.referencing",
    "xxx_foot_custom_xxx",
    CustomReferenceStyle,
)


@pytest.mark.sphinx(
    "text",
    testroot="footcite_roles",
    confoverrides={"bibtex_foot_reference_style": "xxx_foot_custom_xxx"},
)
def test_footcite_style_custom(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.txt").read_text(encoding="utf-8-sig")
    tests = [
        ("p", " [1] "),
        ("ps", " [1] "),
        ("t", " de Du et al[1] "),
        ("ts", " de Du & Em & Fa[1] "),
        ("ct", " De Du et al[1] "),
        ("cts", " De Du & Em & Fa[1] "),
        ("p", " [2][3] "),
        ("ps", " [2][3] "),
        ("t", " al Ap[2]; Be & Ci[3] "),
        ("ts", " al Ap[2]; Be & Ci[3] "),
        ("ct", " Al Ap[2]; Be & Ci[3] "),
        ("cts", " Al Ap[2]; Be & Ci[3] "),
        ("p", " [4][5][6] "),
        ("ps", " [4][5][6] "),
        ("t", " Ge[4]; Hu[5]; Ix[6] "),
        ("ts", " Ge[4]; Hu[5]; Ix[6] "),
        ("ct", " Ge[4]; Hu[5]; Ix[6] "),
        ("cts", " Ge[4]; Hu[5]; Ix[6] "),
    ]
    for role, text in tests:
        escaped_text = re.escape(text)
        pattern = f'":footcite:{role}:".*{escaped_text}'
        assert re.search(pattern, output) is not None


@pytest.mark.sphinx("text", testroot="footcite_roles_pre_post")
def test_footcite_pre_post(app, warning) -> None:
    app.build()
    bad_keys = ["{see}testthree", "testthree{p. 1}", "{see}testthree{p. 1}"]
    for bad_key in bad_keys:
        assert f'could not find bibtex key "{bad_key}"' in warning.getvalue()
������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_latex.py�������������������������������������������������������0000664�0000000�0000000�00000003721�14547471226�0021412�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������from test.common import latex_citation_refs, latex_citations

import pytest


@pytest.mark.sphinx("latex", testroot="latex_refs")
def test_latex_refs(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "test.tex").read_text(encoding="utf-8-sig")
    assert len(latex_citations().findall(output)) == 1
    assert len(latex_citation_refs().findall(output)) == 1
    match = latex_citations().search(output)
    match_ref = latex_citation_refs().search(output)
    assert match.group("label") == "Huy57"
    assert match.group("docname") == "index"
    assert "De ratiociniis in ludo aleæ." in match.group("text")
    assert match_ref.group("refid") == match.group("id_")
    assert match_ref.group("docname") == "index"


@pytest.mark.sphinx("latex", testroot="latex_multidoc")
def test_latex_multidoc(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "test.tex").read_text(encoding="utf-8-sig")
    assert len(latex_citations().findall(output)) == 1
    assert len(latex_citation_refs().findall(output)) == 1
    match = latex_citations().search(output)
    match_ref = latex_citation_refs().search(output)
    assert match.group("docname") == match_ref.group("docname") == "sources"
    assert match.group("id_") is not None
    assert match_ref.group("refid") == match.group("id_")


@pytest.mark.sphinx("latex", testroot="latex_multidoc_2")
def test_latex_multidoc_2(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "test.tex").read_text(encoding="utf-8-sig")
    assert len(latex_citations().findall(output)) == 1
    assert len(latex_citation_refs().findall(output)) == 1
    match = latex_citations().search(output)
    match_ref = latex_citation_refs().search(output)
    assert match.group("docname") == match_ref.group("docname") == "sources"
    assert match.group("id_") is not None
    assert match_ref.group("refid") == match.group("id_")
�����������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_list.py��������������������������������������������������������0000664�0000000�0000000�00000003723�14547471226�0021252�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import re
from test.common import html_citations

import pytest


@pytest.mark.sphinx("html", testroot="list_citation")
def test_list_citation(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text()
    assert html_citations(label="1", text=".*Akkerdju.*").search(output)
    assert html_citations(label="2", text=".*Bro.*").search(output)
    assert html_citations(label="3", text=".*Chap.*").search(output)
    assert html_citations(label="4", text=".*Dude.*").search(output)


@pytest.mark.sphinx("html", testroot="list_bullet")
def test_list_bullet(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text()
    assert re.search(
        "<ul"
        ".*<li.*Akkerdju.*</li>"
        ".*<li.*Bro.*</li>"
        ".*<li.*Chap.*</li>"
        ".*<li.*Dude.*</li>"
        ".*</ul>",
        output,
        re.DOTALL,
    )


@pytest.mark.sphinx("html", testroot="list_enumerated")
def test_list_enumerated(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text()
    assert re.search(
        '<ol .*start="1".*>'
        ".*<li.*Akkerdju.*</li>"
        ".*<li.*Bro.*</li>"
        ".*<li.*Chap.*</li>"
        ".*<li.*Dude.*</li>"
        ".*</ol>"
        '.*<ol .*start="5".*>'
        ".*<li.*Eminence.*</li>"
        ".*<li.*Frater.*</li>"
        ".*<li.*Giggles.*</li>"
        ".*<li.*Handy.*</li>"
        ".*</ol>"
        '.*<ol .*start="23".*>'
        ".*<li.*Iedereen.*</li>"
        ".*<li.*Joke.*</li>"
        ".*<li.*Klopgeest.*</li>"
        ".*<li.*Laterfanter.*</li>"
        ".*</ol>",
        output,
        re.DOTALL,
    )


@pytest.mark.sphinx("html", testroot="list_invalid")
def test_list_invalid(app, warning) -> None:
    app.build()
    assert re.search(
        "unknown bibliography list type 'thisisintentionallyinvalid'",
        warning.getvalue(),
    )
���������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_natbib.py������������������������������������������������������0000664�0000000�0000000�00000003204�14547471226�0021530�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""
    test_natbib
    ~~~~~~~~~~~

    Test the natbib extension, which serves as an example for comparison.
"""

import pytest


@pytest.mark.sphinx("html", testroot="natbib")
def test_natbib(app, warning) -> None:
    app.build()
    assert not warning.getvalue()


@pytest.mark.sphinx("latex", testroot="natbib")
def test_natbib_latex(app, warning) -> None:
    app.build()
    assert not warning.getvalue()


@pytest.mark.sphinx("html", testroot="natbib_keynotfound")
def test_natbib_keynotfound(app, warning) -> None:
    app.build()
    warning.seek(0)
    warnings = warning.readlines()
    assert len(warnings) == 1
    assert "WARNING: cite-key `XXX` not found in bibtex file" in warnings[0]


@pytest.mark.sphinx("html", testroot="natbib_norefs")
def test_natbib_norefs(app, warning) -> None:
    app.build()
    warning.seek(0)
    warnings = warning.readlines()
    assert len(warnings) == 1
    assert "WARNING: no `refs` directive found" in warnings[0]


def test_natbib_citation_transform_str_repr() -> None:
    from test.natbib import DEFAULT_CONF, CitationTransform

    from pybtex.database import Entry

    ref = Entry(type_="misc")
    ref.key = "somekey"
    node = CitationTransform(
        pre="",
        post="",
        typ="cite:p",
        global_keys={},
        config=DEFAULT_CONF.copy(),
        refs=[ref],
    )
    assert str(node) == "somekey"
    assert repr(node) == "<somekey>"


@pytest.mark.sphinx("text", testroot="natbib_conf")
def test_natbib_conf(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.txt").read_text()
    assert "{One, 2001/ Two, 2002}" in output
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_numpydoc.py����������������������������������������������������0000664�0000000�0000000�00000003506�14547471226�0022134�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������from test.common import (
    html_citation_refs_single,
    html_citations,
    html_footnote_refs,
    html_footnotes,
)

import pytest


@pytest.mark.numpydoc
@pytest.mark.sphinx(
    "html",
    testroot="autodoc",
    confoverrides={
        "extensions": ["sphinxcontrib.bibtex", "numpydoc"],
        "numpydoc_class_members_toctree": False,
    },
)
def test_numpydoc(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "doc_cite.html").read_text()
    labels = [
        "One",
        "Two",
        "Thr",
        "Fou",
        "Fiv",
        "Six",
        "Sev",
        "Eig",
        "Nin",
        "Ten",
        "Ele",
    ]
    titles = [
        "Een",
        "Twee",
        "Drie",
        "Vier",
        "Vijf",
        "Zes",
        "Zeven",
        "Acht",
        "Negen",
        "Tien",
        "Elf",
    ]
    for label, title in zip(labels, titles):
        assert len(html_citation_refs_single(label=label).findall(output)) == 1
        assert len(html_citations(label=label).findall(output)) == 1
        match_ref = html_citation_refs_single(label=label).search(output)
        match = html_citations(label=label).search(output)
        assert match_ref
        assert match
        assert match_ref.group("refid") == match.group("id_")
        assert title in match.group("text")
        assert match_ref.group("id_") == match.group("backref")
    output2 = (app.outdir / "doc_footcite.html").read_text()
    assert len(html_footnote_refs().findall(output2)) == 11
    for title in titles:
        text = ".*" + title + ".*"
        assert len(html_footnotes(text=text).findall(output2)) == 1
        match = html_footnotes(text=text).search(output2)
        assert match
        id_ = match.group("id_")
        assert len(html_footnote_refs(refid=id_).findall(output2)) == 1
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_parallel.py����������������������������������������������������0000664�0000000�0000000�00000002203�14547471226�0022063�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""Test for parallel build."""

import os

import pytest
from sphinx.util.parallel import parallel_available


@pytest.mark.skipif(
    not parallel_available, reason="sphinx parallel builds not available"
)
@pytest.mark.sphinx("html", testroot="parallel")
def test_parallel(make_app, app_params) -> None:
    args, kwargs = app_params
    app0 = make_app(*args, **kwargs)
    app0.parallel = 4
    app0.build()
    assert not app0._warning.getvalue()
    # update files to trigger merge of citations domain data
    docnames = {
        "{0}/doc{1:02d}".format(folder, i)
        for i in (1, 3, 5, 7, 11, 15, 19)
        for folder in ("regular", "foot")
    }
    for docname in docnames:
        rstname = app0.env.doc2path(docname)
        htmlname = app0.builder.get_outfilename(docname)
        mtime = (app0.builder.outdir / htmlname).stat().st_mtime
        os.utime(app0.srcdir / rstname, (mtime + 5, mtime + 5))
    updated = set(app0.builder.get_outdated_docs())
    assert updated == docnames
    app1 = make_app(*args, **kwargs)
    app1._warning.seek(0)
    app1._warning.truncate()
    app1.build()
    assert not app1._warning.getvalue()
���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_plugin.py������������������������������������������������������0000664�0000000�0000000�00000003250�14547471226�0021570�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import pytest

from sphinxcontrib.bibtex.plugin import find_plugin, register_plugin


def test_plugin_bad_group() -> None:
    with pytest.raises(ImportError, match="plugin group blablabla not found"):
        find_plugin("blablabla", "boo")
    with pytest.raises(ImportError, match="plugin group blablabla not found"):
        register_plugin("blablabla", "boo", type(None))


def test_plugin_register_not_forced() -> None:
    class Plugin:
        pass

    assert not register_plugin(
        "sphinxcontrib.bibtex.style.referencing", "label", Plugin
    )
    assert find_plugin("sphinxcontrib.bibtex.style.referencing", "label") is not Plugin


def test_plugin_register_forced() -> None:
    class PluginOld:
        pass

    class PluginNew:
        pass

    assert register_plugin(
        "sphinxcontrib.bibtex.style.referencing",
        "xxx_test_plugin_register_forced",
        PluginOld,
    )
    assert (
        find_plugin(
            "sphinxcontrib.bibtex.style.referencing", "xxx_test_plugin_register_forced"
        )
        is PluginOld
    )
    assert not register_plugin(
        "sphinxcontrib.bibtex.style.referencing",
        "xxx_test_plugin_register_forced",
        PluginNew,
    )
    assert (
        find_plugin(
            "sphinxcontrib.bibtex.style.referencing", "xxx_test_plugin_register_forced"
        )
        is PluginOld
    )
    assert register_plugin(
        "sphinxcontrib.bibtex.style.referencing",
        "xxx_test_plugin_register_forced",
        PluginNew,
        force=True,
    )
    assert (
        find_plugin(
            "sphinxcontrib.bibtex.style.referencing", "xxx_test_plugin_register_forced"
        )
        is PluginNew
    )
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_root_doc.py����������������������������������������������������0000664�0000000�0000000�00000000523�14547471226�0022102�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import pytest
import sphinx


@pytest.mark.skipif(
    sphinx.version_info < (4, 0),
    reason="root_doc only supported in sphinx 4.0 and higher",
)
@pytest.mark.sphinx("pseudoxml", testroot="root_doc")
def test_root_doc(app, warning):
    app.build()
    assert not warning.getvalue()
    assert (app.outdir / "root.pseudoxml").exists()
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_sphinx.py������������������������������������������������������0000664�0000000�0000000�00000000354�14547471226�0021605�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������"""
    test_sphinx
    ~~~~~~~~~~~

    General Sphinx test and check output.
"""

import pytest


@pytest.mark.sphinx("html", testroot="sphinx")
def test_sphinx(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_spurious_div.py������������������������������������������������0000664�0000000�0000000�00000001064�14547471226�0023026�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import pytest


@pytest.mark.sphinx("html", testroot="spurious_div")
def test_spurious_div(app, warning) -> None:
    app.build()
    assert not warning.getvalue()
    output = (app.outdir / "index.html").read_text()
    assert output.count("<div") == output.count("</div>")


@pytest.mark.sphinx("html", testroot="spurious_div_2")
def test_spurious_div_2(app) -> None:
    # note: build will generate warning, is expected, not checking
    app.build()
    output = (app.outdir / "index.html").read_text()
    assert output.count("<div") == output.count("</div>")
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_style.py�������������������������������������������������������0000664�0000000�0000000�00000010722�14547471226�0021434�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������from typing import TYPE_CHECKING, Any, Dict, Iterable, List

import pybtex.plugin
import pytest
from pybtex.database import Entry, Person
from pybtex.richtext import HRef
from pybtex.style.template import FieldIsMissing, Node, _format_list

# direct import of the plugin to ensure we are testing this specific class
from sphinxcontrib.bibtex.richtext import BaseReferenceText
from sphinxcontrib.bibtex.style.names.last import LastNameStyle
from sphinxcontrib.bibtex.style.referencing import BaseReferenceStyle, format_references
from sphinxcontrib.bibtex.style.referencing.basic_author_year import (
    BasicAuthorYearTextualReferenceStyle,
)
from sphinxcontrib.bibtex.style.referencing.basic_super import (
    BasicSuperParentheticalReferenceStyle,
    BasicSuperTextualReferenceStyle,
)
from sphinxcontrib.bibtex.style.template import entry_label, join, names, node

if TYPE_CHECKING:
    from pybtex.backends import BaseBackend
    from pybtex.richtext import BaseText
    from pybtex.style.formatting import BaseStyle


def test_style_names_last() -> None:
    name = Person(string=r"Charles Louis Xavier Joseph de la Vall{\'e}e Poussin")
    last = LastNameStyle().format
    assert last(name).format().render_as("latex") == "de~la Vall{é}e~Poussin"
    assert (
        last(name).format().render_as("html")
        == 'de la Vall<span class="bibtex-protected">é</span>e Poussin'
    )
    name2 = Person(first="First", last="Last", middle="Middle")
    assert last(name2).format().render_as("latex") == "Last"


def test_style_names() -> None:
    auth = Person("First Last")
    fields = dict(title="The Book", year="2000", publisher="Santa")
    entry = Entry(type_="book", fields=fields, persons=dict(author=[auth]))
    style = BasicAuthorYearTextualReferenceStyle()
    rich_name = style.person.names("author", full=True).format_data(
        dict(entry=entry, style=style)
    )
    assert rich_name.render_as("text") == "Last"


def test_style_names_no_author() -> None:
    entry = Entry(type_="book")
    with pytest.raises(FieldIsMissing):
        names("author").format_data(dict(entry=entry))


class SimpleReferenceText(BaseReferenceText[str]):
    """A simple reference text class storing the url as a string in *info*."""

    def render(self, backend):
        url = self.info[0]
        return HRef(url, *self.parts).render(backend)


@node
def simple_reference(children, data: Dict[str, Any]):
    """Pybtex node for inserting a docutils reference node to a citation.
    The children of the node
    comprise the content of the reference, and any referencing information
    is stored in the *reference_info* key of the *data*.
    The data must also contain a *style* key pointing to the corresponding
    :class:`~sphinxcontrib.bibtex.style.referencing.BaseReferenceStyle`.
    """
    parts = _format_list(children, data)
    info = data["reference_info"]
    return SimpleReferenceText(info, *parts)


class SimpleReferenceStyle(BaseReferenceStyle):
    def role_names(self) -> Iterable[str]:
        return ["p"]

    def outer(self, role_name: str, children: List["BaseText"]) -> "Node":
        return join["{", join(";")[children], "}"]

    def inner(self, role_name: str) -> "Node":
        return simple_reference[entry_label]


def test_simple_reference_style() -> None:
    cit_style: "BaseStyle" = pybtex.plugin.find_plugin(
        "pybtex.style.formatting", "unsrtalpha"
    )()
    ref_style = SimpleReferenceStyle()
    auth1 = Person("First Last")
    auth2 = Person("Ein Zwei")
    auth3 = Person("Primo Secundo")
    fields1 = dict(title="The Book", year="2000", publisher="Santa")
    entry1 = Entry(type_="book", fields=fields1, persons=dict(author=[auth1]))
    entry2 = Entry(type_="book", fields=fields1, persons=dict(author=[auth2]))
    entry3 = Entry(type_="book", fields=fields1, persons=dict(author=[auth3]))
    entries = [entry1, entry2, entry3]
    formatted_entries = list(cit_style.format_entries(entries))
    infos = ["#id1", "#id2", "#id3"]
    references = list(zip(entries, formatted_entries, infos))
    backend: "BaseBackend" = pybtex.plugin.find_plugin("pybtex.backends", "html")()
    assert "p" in ref_style.role_names()
    assert (
        format_references(ref_style, "p", references).render(backend)
        == '{<a href="#id1">Las00</a>;<a href="#id2">Zwe00</a>'
        ';<a href="#id3">Sec00</a>}'
    )


# need to instantiate these for 100% coverage
def test_super_coverage() -> None:
    BasicSuperParentheticalReferenceStyle()
    BasicSuperTextualReferenceStyle()
����������������������������������������������sphinxcontrib-bibtex-2.6.2/test/test_template.py����������������������������������������������������0000664�0000000�0000000�00000002616�14547471226�0022112�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������from sphinxcontrib.bibtex.style.template import join, join2, sentence


def test_join() -> None:
    assert str(join.format()) == ""
    assert str(join["a", "b", "c", "d", "e"].format()) == "abcde"
    join_sep = join(sep=", ", sep2=" and ", last_sep=", and ")
    assert str(join_sep["Tom", "Jerry"].format()) == "Tom and Jerry"
    assert (
        str(join_sep["Billy", "Willy", "Dilly"].format()) == "Billy, Willy, and Dilly"
    )
    join_other = join(other=" et al.")
    assert str(join_other["Billy", "Willy", "Dilly"].format()) == "Billy et al."


def test_join2() -> None:
    assert str(join2.format()) == ""
    assert str(join2["a", "b", "c", "d", "e"].format()) == "abcde"
    join_sep = join2(sep1=";", sep2=",")
    assert str(join_sep["Tom", "Jerry"].format()) == "Tom;Jerry"
    assert str(join_sep["Billy", "Willy", "Dilly"].format()) == "Billy;Willy,Dilly"


def test_sentence() -> None:
    assert str(sentence.format()) == ""
    assert (
        str(
            sentence(capitalize=True, sep=" ")[
                "mary", "had", "a", "little", "lamb"
            ].format()
        )
        == "Mary had a little lamb."
    )
    assert (
        str(sentence(capitalize=False, add_period=False)["uno", "dos", "tres"].format())
        == "uno, dos, tres"
    )
    assert (
        str(sentence(capfirst=True, other=" and more")["uno", "dos", "tres"].format())
        == "Uno and more."
    )
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������