sphinxcontrib-bibtex-0.3.6/0000755005105600024240000000000013162141126015632 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/sphinxcontrib/0000755005105600024240000000000013162141125020523 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/sphinxcontrib/__init__.py0000644005105600024240000000055512613713501022644 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ sphinxcontrib ~~~~~~~~~~~~~ This package is a namespace package that contains all extensions distributed in the ``sphinx-contrib`` distribution. :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ __import__('pkg_resources').declare_namespace(__name__) sphinxcontrib-bibtex-0.3.6/sphinxcontrib/bibtex/0000755005105600024240000000000013162141125022000 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/sphinxcontrib/bibtex/nodes.py0000644005105600024240000000052012613713500023461 0ustar dma0mtdma00000000000000""" New Doctree Nodes ~~~~~~~~~~~~~~~~~ .. autoclass:: bibliography """ from docutils import nodes class bibliography(nodes.General, nodes.Element): """Node for representing a bibliography. Replaced by a list of citations by :class:`~sphinxcontrib.bibtex.transforms.BibliographyTransform`. """ pass sphinxcontrib-bibtex-0.3.6/sphinxcontrib/bibtex/roles.py0000644005105600024240000000250112613713500023476 0ustar dma0mtdma00000000000000""" New Doctree Roles ~~~~~~~~~~~~~~~~~ .. autoclass:: CiteRole :show-inheritance: .. automethod:: result_nodes """ from pybtex.plugin import find_plugin import pybtex.database from sphinx.roles import XRefRole # for :cite: class CiteRole(XRefRole): """Class for processing the :rst:role:`cite` role.""" backend = find_plugin('pybtex.backends', 'docutils')() def result_nodes(self, document, env, node, is_ref): """Transform reference node into a citation reference, and note that the reference was cited. """ keys = node['reftarget'].split(',') # Note that at this point, usually, env.bibtex_cache.bibfiles # is still empty because the bibliography directive may not # have been processed yet, so we cannot get the actual entry. # Instead, we simply fake an entry with the desired key, and # fix the label at doctree-resolved time. This happens in # process_citation_references. refnodes = [ self.backend.citation_reference(_fake_entry(key), document) for key in keys] for key in keys: env.bibtex_cache.add_cited(key, env.docname) return refnodes, [] def _fake_entry(key): entry = pybtex.database.Entry(type_="") entry.key = key return entry sphinxcontrib-bibtex-0.3.6/sphinxcontrib/bibtex/__init__.py0000644005105600024240000001216212717571613024131 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ Sphinx Interface ~~~~~~~~~~~~~~~~ .. autofunction:: setup .. autofunction:: init_bibtex_cache .. autofunction:: purge_bibtex_cache .. autofunction:: process_citations .. autofunction:: process_citation_references .. autofunction:: check_duplicate_labels """ import docutils.nodes import docutils.parsers.rst from sphinxcontrib.bibtex.cache import Cache from sphinxcontrib.bibtex.nodes import bibliography from sphinxcontrib.bibtex.roles import CiteRole from sphinxcontrib.bibtex.directives import BibliographyDirective from sphinxcontrib.bibtex.transforms import BibliographyTransform import six def init_bibtex_cache(app): """Create ``app.env.bibtex_cache`` if it does not exist yet. :param app: The sphinx application. :type app: :class:`sphinx.application.Sphinx` """ if not hasattr(app.env, "bibtex_cache"): app.env.bibtex_cache = Cache() def purge_bibtex_cache(app, env, docname): """Remove all information related to *docname* from the cache. :param app: The sphinx application. :type app: :class:`sphinx.application.Sphinx` :param env: The sphinx build environment. :type env: :class:`sphinx.environment.BuildEnvironment` """ env.bibtex_cache.purge(docname) def process_citations(app, doctree, docname): """Replace labels of citation nodes by actual labels. :param app: The sphinx application. :type app: :class:`sphinx.application.Sphinx` :param doctree: The document tree. :type doctree: :class:`docutils.nodes.document` :param docname: The document name. :type docname: :class:`str` """ for node in doctree.traverse(docutils.nodes.citation): key = node[0].astext() try: label = app.env.bibtex_cache.get_label_from_key(key) except KeyError: app.warn("could not relabel citation [%s]" % key) else: node[0] = docutils.nodes.label('', label) def process_citation_references(app, doctree, docname): """Replace text of citation reference nodes by actual labels. :param app: The sphinx application. :type app: :class:`sphinx.application.Sphinx` :param doctree: The document tree. :type doctree: :class:`docutils.nodes.document` :param docname: The document name. :type docname: :class:`str` """ # sphinx has already turned citation_reference nodes # into reference nodes, so iterate over reference nodes for node in doctree.traverse(docutils.nodes.reference): # exclude sphinx [source] labels if isinstance(node[0], docutils.nodes.Element): if 'viewcode-link' in node[0]['classes']: continue text = node[0].astext() if text.startswith('[') and text.endswith(']'): key = text[1:-1] try: label = app.env.bibtex_cache.get_label_from_key(key) except KeyError: app.warn("could not relabel citation reference [%s]" % key) else: node[0] = docutils.nodes.Text('[' + label + ']') def check_duplicate_labels(app, env): """Check and warn about duplicate citation labels. :param app: The sphinx application. :type app: :class:`sphinx.application.Sphinx` :param env: The sphinx build environment. :type env: :class:`sphinx.environment.BuildEnvironment` """ label_to_key = {} for info in env.bibtex_cache.get_all_bibliography_caches(): for key, label in six.iteritems(info.labels): if label in label_to_key: app.warn( "duplicate label for keys %s and %s" % (key, label_to_key[label])) else: label_to_key[label] = key def setup(app): """Set up the bibtex extension: * register config values * register directives * register nodes * register roles * register transforms * connect events to functions :param app: The sphinx application. :type app: :class:`sphinx.application.Sphinx` """ app.add_config_value("bibtex_default_style", "alpha", "html") app.connect("builder-inited", init_bibtex_cache) app.connect("doctree-resolved", process_citations) app.connect("doctree-resolved", process_citation_references) app.connect("env-purge-doc", purge_bibtex_cache) app.connect("env-updated", check_duplicate_labels) # docutils keeps state around during testing, so to avoid spurious # warnings, we detect here whether the directives have already been # registered... very ugly hack but no better solution so far _directives = docutils.parsers.rst.directives._directives if "bibliography" not in _directives: app.add_directive("bibliography", BibliographyDirective) app.add_role("cite", CiteRole()) app.add_node(bibliography) app.add_transform(BibliographyTransform) else: assert _directives["bibliography"] is BibliographyDirective # Parallel read is not safe at the moment: in the current design, # the document that contains references must be read last for all # references to be resolved. return {'parallel_read_safe': False} sphinxcontrib-bibtex-0.3.6/sphinxcontrib/bibtex/cache.py0000644005105600024240000003202713053321665023431 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ Cached Information ~~~~~~~~~~~~~~~~~~ Classes and methods to maintain any information that is stored outside the doctree. .. autoclass:: Cache :members: .. autoclass:: BibfileCache :members: .. autoclass:: BibliographyCache :members: """ import six try: # pragma: no cover from collections import OrderedDict except ImportError: # pragma: no cover from ordereddict import OrderedDict import ast import collections import copy from oset import oset import re 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, six.string_types): raise ValueError( "expected a string on left side of %s" % node.op) if not isinstance(right, six.string_types): 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_ == 'True': return True elif id_ == 'False': return False elif id_ == 'author' or id_ == 'editor': if id_ in self.entry.persons: return u' and '.join( six.text_type(person) # XXX needs fix in pybtex? for person in self.entry.persons[id_]) else: return u'' else: return self.entry.fields.get(id_, "") def visit_Set(self, node): return frozenset(self.visit(elt) for elt in node.elts) def visit_Str(self, node): return node.s # NameConstant is Python 3.4 only so do not insist on coverage def visit_NameConstant(self, node): # pragma: no cover return node.value def generic_visit(self, node): _raise_invalid_node(node) class Cache: """Global bibtex extension information cache. Stored in ``app.env.bibtex_cache``, so must be picklable. """ bibfiles = None """A :class:`dict` mapping .bib file names (relative to the top source folder) to :class:`BibfileCache` instances. """ _bibliographies = None """Each bibliography directive is assigned an id of the form bibtex-bibliography-xxx. This :class:`dict` maps each docname to another :class:`dict` which maps each id to information about the bibliography directive, :class:`BibliographyCache`. We need to store this extra information separately because it cannot be stored in the :class:`~sphinxcontrib.bibtex.nodes.bibliography` nodes themselves. """ _cited = None """A :class:`dict` mapping each docname to a :class:`set` of citation keys. """ _enum_count = None """A :class:`dict` mapping each docname to an :class:`int` representing the current bibliography enumeration counter. """ def __init__(self): self.bibfiles = {} self._bibliographies = collections.defaultdict(dict) self._cited = collections.defaultdict(oset) self._enum_count = {} def purge(self, docname): """Remove all information related to *docname*. :param docname: The document name. :type docname: :class:`str` """ self._bibliographies.pop(docname, None) self._cited.pop(docname, None) self._enum_count.pop(docname, None) def inc_enum_count(self, docname): """Increment enumeration list counter for document *docname*.""" self._enum_count[docname] += 1 def set_enum_count(self, docname, value): """Set enumeration list counter for document *docname* to *value*.""" self._enum_count[docname] = value def get_enum_count(self, docname): """Get enumeration list counter for document *docname*.""" return self._enum_count[docname] def add_cited(self, key, docname): """Add the given *key* to the set of cited keys for *docname*. :param key: The citation key. :type key: :class:`str` :param docname: The document name. :type docname: :class:`str` """ self._cited[docname].add(key) def get_cited_docnames(self, key): """Return the *docnames* from which the given *key* is cited. :param key: The citation key. :type key: :class:`str` """ return frozenset([ docname for docname, keys in six.iteritems(self._cited) if key in keys]) def get_label_from_key(self, key): """Return label for the given key.""" for bibcache in self.get_all_bibliography_caches(): if key in bibcache.labels: return bibcache.labels[key] else: raise KeyError("%s not found" % key) def get_all_cited_keys(self): """Yield all citation keys, sorted first by document (alphabetical), then by citation order in the document. """ for docname in sorted(self._cited): for key in self._cited[docname]: yield key def set_bibliography_cache(self, docname, id_, bibcache): """Register *bibcache* (:class:`BibliographyCache`) with id *id_* for document *docname*. """ assert id_ not in self._bibliographies[docname] self._bibliographies[docname][id_] = bibcache def get_bibliography_cache(self, docname, id_): """Return :class:`BibliographyCache` with id *id_* in document *docname*. """ return self._bibliographies[docname][id_] def get_all_bibliography_caches(self): """Return all bibliography caches.""" for bibcaches in six.itervalues(self._bibliographies): for bibcache in six.itervalues(bibcaches): yield bibcache def _get_bibliography_entries(self, docname, id_, warn): """Return filtered bibliography entries, sorted by occurence in the bib file. """ # get the information of this bibliography node bibcache = self.get_bibliography_cache(docname=docname, id_=id_) # generate entries for bibfile in bibcache.bibfiles: data = self.bibfiles[bibfile].data for entry in six.itervalues(data.entries): # beware: the prefix is not stored in the data # to allow reusing the data for multiple bibliographies cited_docnames = self.get_cited_docnames( bibcache.keyprefix + entry.key) visitor = _FilterVisitor( entry=entry, docname=docname, cited_docnames=cited_docnames) try: success = visitor.visit(bibcache.filter_) except ValueError as err: warn("syntax error in :filter: expression; %s" % err) # recover by falling back to the default success = bool(cited_docnames) if success: # entries are modified in an unpickable way # when formatting, so fetch a deep copy # and return this copy with prefixed key # we do not deep copy entry.collection because that # consumes enormous amounts of memory entry.collection = None entry2 = copy.deepcopy(entry) entry2.key = bibcache.keyprefix + entry.key entry2.collection = data entry.collection = data yield entry2 def get_bibliography_entries(self, docname, id_, warn): """Return filtered bibliography entries, sorted by citation order.""" # get entries, ordered by bib file occurrence entries = OrderedDict( (entry.key, entry) for entry in self._get_bibliography_entries( docname=docname, id_=id_, warn=warn)) # order entries according to which were cited first # first, we add all keys that were cited # then, we add all remaining keys sorted_entries = [] for key in self.get_all_cited_keys(): try: entry = entries.pop(key) except KeyError: pass else: sorted_entries.append(entry) sorted_entries += six.itervalues(entries) return sorted_entries class BibfileCache(collections.namedtuple('BibfileCache', 'mtime data')): """Contains information about a parsed .bib file. .. attribute:: mtime A :class:`float` representing the modification time of the .bib file when it was last parsed. .. attribute:: data A :class:`pybtex.database.BibliographyData` containing the parsed .bib file. """ class BibliographyCache(collections.namedtuple( 'BibliographyCache', """bibfiles style encoding list_ enumtype start labels labelprefix filter_ curly_bracket_strip keyprefix """)): """Contains information about a bibliography directive. .. attribute:: bibfiles A :class:`list` of :class:`str`\\ s containing the .bib file names (relative to the top source folder) that contain the references. .. attribute:: style The bibtex style. .. attribute:: list_ The list type. .. attribute:: enumtype The sequence type (only used for enumerated lists). .. attribute:: start The first ordinal of the sequence (only used for enumerated lists). .. attribute:: labels Maps citation keys to their final labels. .. attribute:: labelprefix This bibliography's string prefix for pybtex generated labels. .. attribute:: keyprefix This bibliography's string prefix for citation keys. .. attribute:: filter_ An :class:`ast.AST` node, containing the parsed filter expression. """ sphinxcontrib-bibtex-0.3.6/sphinxcontrib/bibtex/transforms.py0000644005105600024240000001127112613713500024554 0ustar dma0mtdma00000000000000""" New Doctree Transforms ~~~~~~~~~~~~~~~~~~~~~~ .. autoclass:: BibliographyTransform :show-inheritance: .. autoattribute:: default_priority .. automethod:: apply .. autofunction:: node_text_transform .. autofunction:: transform_curly_bracket_strip .. autofunction:: transform_url_command """ import docutils.nodes import docutils.transforms from pybtex.plugin import find_plugin from sphinxcontrib.bibtex.nodes import bibliography def node_text_transform(node, transform): """Apply transformation to all Text nodes within node.""" for child in node.children: if isinstance(child, docutils.nodes.Text): node.replace(child, transform(child)) else: node_text_transform(child, transform) def transform_curly_bracket_strip(textnode): """Strip curly brackets from text.""" text = textnode.astext() if '{' in text or '}' in text: text = text.replace('{', '').replace('}', '') return docutils.nodes.Text(text) else: return textnode def transform_url_command(textnode): """Convert '\\\\url{...}' into a proper docutils hyperlink.""" text = textnode.astext() if '\\url' in text: text1, _, text = text.partition('\\url') text2, _, text3 = text.partition('}') text2 = text2.lstrip(' {') ref = docutils.nodes.reference(refuri=text2) ref += docutils.nodes.Text(text2) node = docutils.nodes.inline() node += transform_url_command(docutils.nodes.Text(text1)) node += ref node += transform_url_command(docutils.nodes.Text(text3)) return node else: return textnode class BibliographyTransform(docutils.transforms.Transform): """A docutils transform to generate citation entries for bibliography nodes. """ # transform must be applied before references are resolved default_priority = 10 """Priority of the transform. See http://docutils.sourceforge.net/docs/ref/transforms.html """ def apply(self): """Transform each :class:`~sphinxcontrib.bibtex.nodes.bibliography` node into a list of citations. """ env = self.document.settings.env docname = env.docname for bibnode in self.document.traverse(bibliography): id_ = bibnode['ids'][0] bibcache = env.bibtex_cache.get_bibliography_cache( docname=docname, id_=id_) entries = env.bibtex_cache.get_bibliography_entries( docname=docname, id_=id_, warn=env.app.warn) # locate and instantiate style and backend plugins style = find_plugin('pybtex.style.formatting', bibcache.style)() backend = find_plugin('pybtex.backends', 'docutils')() # create citation nodes for all references if bibcache.list_ == "enumerated": nodes = docutils.nodes.enumerated_list() nodes['enumtype'] = bibcache.enumtype if bibcache.start >= 1: nodes['start'] = bibcache.start env.bibtex_cache.set_enum_count( env.docname, bibcache.start) else: nodes['start'] = env.bibtex_cache.get_enum_count( env.docname) elif bibcache.list_ == "bullet": nodes = docutils.nodes.bullet_list() else: # "citation" nodes = docutils.nodes.paragraph() # remind: style.format_entries modifies entries in unpickable way for entry in style.format_entries(entries): if bibcache.list_ in ["enumerated", "bullet"]: citation = docutils.nodes.list_item() citation += backend.paragraph(entry) else: # "citation" citation = backend.citation(entry, self.document) # backend.citation(...) uses entry.key as citation label # we change it to entry.label later onwards # but we must note the entry.label now; # at this point, we also already prefix the label key = citation[0].astext() bibcache.labels[key] = bibcache.labelprefix + entry.label node_text_transform(citation, transform_url_command) if bibcache.curly_bracket_strip: node_text_transform( citation, transform_curly_bracket_strip) nodes += citation if bibcache.list_ == "enumerated": env.bibtex_cache.inc_enum_count(env.docname) bibnode.replace_self(nodes) sphinxcontrib-bibtex-0.3.6/sphinxcontrib/bibtex/directives.py0000644005105600024240000002025213153205031024511 0ustar dma0mtdma00000000000000""" New Doctree Directives ~~~~~~~~~~~~~~~~~~~~~~ .. autoclass:: BibliographyDirective .. automethod:: run .. automethod:: process_bibfile .. automethod:: update_bibfile_cache .. automethod:: parse_bibfile .. autofunction:: process_start_option """ import ast # parse(), used for filter import os.path # getmtime() from docutils.parsers.rst import Directive, directives from sphinx.util.console import bold, standout from pybtex.database.input import bibtex from pybtex.database import BibliographyData from sphinxcontrib.bibtex.cache import BibliographyCache, BibfileCache from sphinxcontrib.bibtex.nodes import bibliography # register the latex codec import latexcodec # noqa def process_start_option(value): """Process and validate the start option value of a :rst:dir:`bibliography` directive. If *value* is ``continue`` then this function returns -1, otherwise *value* is converted into a positive integer. """ if value == "continue": return -1 else: return directives.positive_int(value) class BibliographyDirective(Directive): """Class for processing the :rst:dir:`bibliography` directive. Parses the bibliography files, and produces a :class:`~sphinxcontrib.bibtex.nodes.bibliography` node. .. seealso:: Further processing of the resulting :class:`~sphinxcontrib.bibtex.nodes.bibliography` node is done by :class:`~sphinxcontrib.bibtex.transforms.BibliographyTransform`. """ required_arguments = 1 optional_arguments = 0 final_argument_whitespace = True has_content = False option_spec = { 'cited': directives.flag, 'notcited': directives.flag, 'all': directives.flag, 'filter': directives.unchanged, 'style': directives.unchanged, 'list': directives.unchanged, 'enumtype': directives.unchanged, 'start': process_start_option, 'encoding': directives.encoding, 'disable-curly-bracket-strip': directives.flag, 'labelprefix': directives.unchanged, 'keyprefix': directives.unchanged, } 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 = self.state.document.settings.env # create id and cache for this node # this id will be stored with the node # and is used to look up additional data in env.bibtex_cache # (implementation note: new_serialno only guarantees unique # ids within a single document, but we need the id to be # unique across all documents, so we also include the docname # in the id) id_ = 'bibtex-bibliography-%s-%s' % ( env.docname, env.new_serialno('bibtex')) if "filter" in self.options: if "all" in self.options: env.app.warn(standout(":filter: overrides :all:")) if "notcited" in self.options: env.app.warn(standout(":filter: overrides :notcited:")) if "cited" in self.options: env.app.warn(standout(":filter: overrides :cited:")) try: filter_ = ast.parse(self.options["filter"]) except SyntaxError: env.app.warn( standout("syntax error in :filter: expression") + " (" + self.options["filter"] + "); " "the option will be ignored" ) filter_ = ast.parse("cited") elif "all" in self.options: filter_ = ast.parse("True") elif "notcited" in self.options: filter_ = ast.parse("not cited") else: # the default filter: include only cited entries filter_ = ast.parse("cited") bibcache = BibliographyCache( list_=self.options.get("list", "citation"), 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_, encoding=self.options.get( 'encoding', 'latex+' + self.state.document.settings.input_encoding), curly_bracket_strip=( 'disable-curly-bracket-strip' not in self.options), labelprefix=self.options.get("labelprefix", ""), keyprefix=self.options.get("keyprefix", ""), labels={}, bibfiles=[], ) if (bibcache.list_ not in set(["bullet", "enumerated", "citation"])): env.app.warn( "unknown bibliography list type '{0}'.".format(bibcache.list_)) for bibfile in self.arguments[0].split(): # convert to normalized absolute path to ensure that the same file # only occurs once in the cache bibfile = os.path.normpath(env.relfn2path(bibfile.strip())[1]) self.process_bibfile(bibfile, bibcache.encoding) env.note_dependency(bibfile) bibcache.bibfiles.append(bibfile) env.bibtex_cache.set_bibliography_cache(env.docname, id_, bibcache) return [bibliography('', ids=[id_])] def parse_bibfile(self, bibfile, encoding): """Parse *bibfile*, and return parsed data. :param bibfile: The bib file name. :type bibfile: ``str`` :return: The parsed bibliography data. :rtype: :class:`pybtex.database.BibliographyData` """ app = self.state.document.settings.env.app parser = bibtex.Parser(encoding) app.info( bold("parsing bibtex file {0}... ".format(bibfile)), nonl=True) parser.parse_file(bibfile) app.info("parsed {0} entries" .format(len(parser.data.entries))) return parser.data def update_bibfile_cache(self, bibfile, mtime, encoding): """Parse *bibfile* (see :meth:`parse_bibfile`), and store the parsed data, along with modification time *mtime*, in the bibtex cache. :param bibfile: The bib file name. :type bibfile: ``str`` :param mtime: The bib file's modification time. :type mtime: ``float`` :return: The parsed bibliography data. :rtype: :class:`pybtex.database.BibliographyData` """ data = self.parse_bibfile(bibfile, encoding) env = self.state.document.settings.env env.bibtex_cache.bibfiles[bibfile] = BibfileCache( mtime=mtime, data=data) return data def process_bibfile(self, bibfile, encoding): """Check if ``env.bibtex_cache.bibfiles[bibfile]`` is still up to date. If not, parse the *bibfile* (see :meth:`update_bibfile_cache`), and store parsed data in the bibtex cache. :param bibfile: The bib file name. :type bibfile: ``str`` :return: The parsed bibliography data. :rtype: :class:`pybtex.database.BibliographyData` """ env = self.state.document.settings.env cache = env.bibtex_cache.bibfiles # get modification time of bibfile try: mtime = os.path.getmtime(bibfile) except OSError: env.app.warn( standout("could not open bibtex file {0}.".format(bibfile))) cache[bibfile] = BibfileCache( # dummy cache mtime=-float("inf"), data=BibliographyData()) return cache[bibfile].data # get cache and check if it is still up to date # if it is not up to date, parse the bibtex file # and store it in the cache env.app.info( bold("checking for {0} in bibtex cache... ".format(bibfile)), nonl=True) try: bibfile_cache = cache[bibfile] except KeyError: env.app.info("not found") self.update_bibfile_cache(bibfile, mtime, encoding) else: if mtime != bibfile_cache.mtime: env.app.info("out of date") self.update_bibfile_cache(bibfile, mtime, encoding) else: env.app.info('up to date') return cache[bibfile].data sphinxcontrib-bibtex-0.3.6/CHANGELOG.rst0000644005105600024240000001323113162141071017652 0ustar dma0mtdma000000000000000.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 numerical 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-0.3.6/README.rst0000644005105600024240000000333412717571613017341 0ustar dma0mtdma00000000000000sphinxcontrib-bibtex ==================== |travis| |coveralls| |downloads| |version| |license| A Sphinx extension for BibTeX style citations. This extension allows `BibTeX `_ citations to be inserted into documentation generated by `Sphinx `_, via a ``bibliography`` directive, and a ``cite`` role, which work similarly to LaTeX's ``thebibliography`` environment and ``\cite`` command. For formatting, the extension relies on `pybtex `_ written by Andrey Golovizin. The extension is inspired by Matthew Brett's `bibstuff.sphinxext.bibref `_. * Download: https://pypi.python.org/pypi/sphinxcontrib-bibtex/#downloads * Documentation: http://sphinxcontrib-bibtex.readthedocs.org/en/latest/ * Development: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/ .. |travis| image:: https://travis-ci.org/mcmtroffaes/sphinxcontrib-bibtex.png?branch=develop :target: https://travis-ci.org/mcmtroffaes/sphinxcontrib-bibtex :alt: travis-ci .. |coveralls| image:: https://coveralls.io/repos/mcmtroffaes/sphinxcontrib-bibtex/badge.png?branch=develop :target: https://coveralls.io/github/mcmtroffaes/sphinxcontrib-bibtex?branch=develop :alt: coveralls.io .. |downloads| image:: https://pypip.in/d/sphinxcontrib-bibtex/badge.png :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ :alt: downloads .. |version| image:: https://pypip.in/v/sphinxcontrib-bibtex/badge.png :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ :alt: latest version .. |license| image:: https://pypip.in/license/sphinxcontrib-bibtex/badge.png :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ :alt: license sphinxcontrib-bibtex-0.3.6/requirements.txt0000644005105600024240000000013212613713501021114 0ustar dma0mtdma00000000000000latexcodec>=0.3.0 pybtex>=0.17 pybtex-docutils>=0.2.0 six>=1.4.1 Sphinx>=1.0 oset>=0.1.3 sphinxcontrib-bibtex-0.3.6/setup.cfg0000644005105600024240000000024313162141126017452 0ustar dma0mtdma00000000000000[nosetests] with-coverage = 1 cover-package = sphinxcontrib.bibtex cover-branches = 1 cover-html = 1 [wheel] universal = 1 [egg_info] tag_build = tag_date = 0 sphinxcontrib-bibtex-0.3.6/MANIFEST.in0000644005105600024240000000047112613713442017400 0ustar dma0mtdma00000000000000include VERSION include README.rst include INSTALL.rst include CHANGELOG.rst include LICENSE.rst include requirements.txt recursive-include doc * recursive-include test * global-exclude *.pyc exclude .gitignore exclude .travis.yml exclude release_checklist.txt exclude tox.ini exclude shell.nix prune doc/_build sphinxcontrib-bibtex-0.3.6/setup.py0000644005105600024240000000346213153205031017345 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- import io from setuptools import setup, find_packages import sys def readfile(filename): with io.open(filename, encoding="utf-8") as stream: return stream.read().split("\n") readme = readfile("README.rst")[5:] # skip title and badges requires = readfile("requirements.txt") version = readfile("VERSION")[0].strip() if sys.version_info < (2, 7): requires.append('ordereddict>=1.1') 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:]), zip_safe=False, classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Documentation', 'Topic :: Utilities', ], platforms='any', packages=find_packages(), include_package_data=True, install_requires=requires, namespace_packages=['sphinxcontrib'], ) sphinxcontrib-bibtex-0.3.6/PKG-INFO0000644005105600024240000000610013162141126016724 0ustar dma0mtdma00000000000000Metadata-Version: 1.1 Name: sphinxcontrib-bibtex Version: 0.3.6 Summary: A Sphinx extension for BibTeX style citations. Home-page: https://github.com/mcmtroffaes/sphinxcontrib-bibtex Author: Matthias C. M. Troffaes Author-email: matthias.troffaes@gmail.com License: BSD Download-URL: https://pypi.python.org/pypi/sphinxcontrib-bibtex Description: This extension allows `BibTeX `_ citations to be inserted into documentation generated by `Sphinx `_, via a ``bibliography`` directive, and a ``cite`` role, which work similarly to LaTeX's ``thebibliography`` environment and ``\cite`` command. For formatting, the extension relies on `pybtex `_ written by Andrey Golovizin. The extension is inspired by Matthew Brett's `bibstuff.sphinxext.bibref `_. * Download: https://pypi.python.org/pypi/sphinxcontrib-bibtex/#downloads * Documentation: http://sphinxcontrib-bibtex.readthedocs.org/en/latest/ * Development: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/ .. |travis| image:: https://travis-ci.org/mcmtroffaes/sphinxcontrib-bibtex.png?branch=develop :target: https://travis-ci.org/mcmtroffaes/sphinxcontrib-bibtex :alt: travis-ci .. |coveralls| image:: https://coveralls.io/repos/mcmtroffaes/sphinxcontrib-bibtex/badge.png?branch=develop :target: https://coveralls.io/github/mcmtroffaes/sphinxcontrib-bibtex?branch=develop :alt: coveralls.io .. |downloads| image:: https://pypip.in/d/sphinxcontrib-bibtex/badge.png :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ :alt: downloads .. |version| image:: https://pypip.in/v/sphinxcontrib-bibtex/badge.png :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ :alt: latest version .. |license| image:: https://pypip.in/license/sphinxcontrib-bibtex/badge.png :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ :alt: license Platform: any Classifier: Development Status :: 4 - Beta Classifier: Environment :: Console Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Documentation Classifier: Topic :: Utilities sphinxcontrib-bibtex-0.3.6/sphinxcontrib_bibtex.egg-info/0000755005105600024240000000000013162141125023552 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/sphinxcontrib_bibtex.egg-info/dependency_links.txt0000644005105600024240000000000113162141125027620 0ustar dma0mtdma00000000000000 sphinxcontrib-bibtex-0.3.6/sphinxcontrib_bibtex.egg-info/requires.txt0000644005105600024240000000013113162141125026145 0ustar dma0mtdma00000000000000latexcodec>=0.3.0 pybtex>=0.17 pybtex-docutils>=0.2.0 six>=1.4.1 Sphinx>=1.0 oset>=0.1.3 sphinxcontrib-bibtex-0.3.6/sphinxcontrib_bibtex.egg-info/namespace_packages.txt0000644005105600024240000000001613162141125030102 0ustar dma0mtdma00000000000000sphinxcontrib sphinxcontrib-bibtex-0.3.6/sphinxcontrib_bibtex.egg-info/top_level.txt0000644005105600024240000000001613162141125026301 0ustar dma0mtdma00000000000000sphinxcontrib sphinxcontrib-bibtex-0.3.6/sphinxcontrib_bibtex.egg-info/SOURCES.txt0000644005105600024240000001127513162141125025444 0ustar dma0mtdma00000000000000CHANGELOG.rst INSTALL.rst LICENSE.rst MANIFEST.in README.rst VERSION requirements.txt setup.cfg setup.py doc/Makefile doc/api.rst doc/changes.rst doc/conf.py doc/index.rst doc/license.rst doc/make.bat doc/quickstart.rst doc/related.rst doc/usage.rst doc/api/cache.rst doc/api/directives.rst doc/api/interface.rst doc/api/nodes.rst doc/api/roles.rst doc/api/transforms.rst sphinxcontrib/__init__.py sphinxcontrib/bibtex/__init__.py sphinxcontrib/bibtex/cache.py sphinxcontrib/bibtex/directives.py sphinxcontrib/bibtex/nodes.py sphinxcontrib/bibtex/roles.py sphinxcontrib/bibtex/transforms.py sphinxcontrib_bibtex.egg-info/PKG-INFO sphinxcontrib_bibtex.egg-info/SOURCES.txt sphinxcontrib_bibtex.egg-info/dependency_links.txt sphinxcontrib_bibtex.egg-info/namespace_packages.txt sphinxcontrib_bibtex.egg-info/not-zip-safe sphinxcontrib_bibtex.egg-info/requires.txt sphinxcontrib_bibtex.egg-info/top_level.txt test/test_bibfile_out_of_date.py test/test_bibfilenotfound.py test/test_citationnotfound.py test/test_crossref.py test/test_custom_style.py test/test_filter.py test/test_filter_fix_author_keyerror.py test/test_filter_option_clash.py test/test_filter_syntax_error.py test/test_invalid_cite_option.py test/test_issue1.py test/test_issue14.py test/test_issue14_2.py test/test_issue15.py test/test_issue17.py test/test_issue2.py test/test_issue4.py test/test_issue61.py test/test_issue62.py test/test_issue77.py test/test_issue85.py test/test_issue87.py test/test_issue91.py test/test_latex_refs.py test/test_list_bullet.py test/test_list_citation.py test/test_list_enumerated.py test/test_list_invalid.py test/test_sphinx.py test/bibfile_out_of_date/conf.py test/bibfile_out_of_date/contents.rst test/bibfile_out_of_date/test_new.bib test/bibfile_out_of_date/test_old.bib test/bibfilenotfound/conf.py test/bibfilenotfound/contents.rst test/citationnotfound/conf.py test/citationnotfound/contents.rst test/citationnotfound/test.bib test/crossref/conf.py test/crossref/contents.rst test/crossref/test.bib test/custom_style/conf.py test/custom_style/contents.rst test/custom_style/test.bib test/filter/bitand.rst test/filter/bitor.rst test/filter/conf.py test/filter/contents.rst test/filter/false.rst test/filter/gt.rst test/filter/gte.rst test/filter/in.rst test/filter/key.rst test/filter/lt.rst test/filter/lte.rst test/filter/noteq.rst test/filter/notin.rst test/filter/or.rst test/filter/set.rst test/filter/test.bib test/filter/title.rst test/filter_fix_author_keyerror/conf.py test/filter_fix_author_keyerror/contents.rst test/filter_fix_author_keyerror/test.bib test/filter_option_clash/conf.py test/filter_option_clash/contents.rst test/filter_option_clash/test.bib test/filter_syntax_error/conf.py test/filter_syntax_error/contents.rst test/filter_syntax_error/test.bib test/invalid_cite_option/conf.py test/invalid_cite_option/contents.rst test/invalid_cite_option/test.bib test/issue1/conf.py test/issue1/master.rst test/issue1/refs.bib test/issue1/2012/07/24/hello_world_.rst test/issue14/conf.py test/issue14/contents.rst test/issue14/doc1.rst test/issue14/doc2.rst test/issue14/test1.bib test/issue14/test2.bib test/issue14_2/conf.py test/issue14_2/contents.rst test/issue14_2/doc1.rst test/issue14_2/doc2.rst test/issue14_2/test1.bib test/issue14_2/test2.bib test/issue15/conf.py test/issue15/contents.rst test/issue15/test.bib test/issue17/conf.py test/issue17/contents.rst test/issue17/somemodule.py test/issue2/adoc1.rst test/issue2/adoc2.rst test/issue2/conf.py test/issue2/contents.rst test/issue2/test.bib test/issue4/conf.py test/issue4/contents.rst test/issue4/test.bib test/issue61/conf.py test/issue61/contents.rst test/issue61/refs.bib test/issue62/conf.py test/issue62/contents.rst test/issue62/doc1.rst test/issue62/doc2.rst test/issue62/refs.bib test/issue62/summary.rst test/issue77/conf.py test/issue77/contents.rst test/issue77/test.bib test/issue85/conf.py test/issue85/contents.rst test/issue85/test.bib test/issue87/conf.py test/issue87/contents.rst test/issue87/doc0.rst test/issue87/doc1.rst test/issue87/test.bib test/issue91/conf.py test/issue91/contents.rst test/issue91/test.bib test/latex_refs/conf.py test/latex_refs/contents.rst test/latex_refs/test.bib test/list_bullet/conf.py test/list_bullet/contents.rst test/list_bullet/test.bib test/list_citation/conf.py test/list_citation/contents.rst test/list_citation/test.bib test/list_enumerated/conf.py test/list_enumerated/contents.rst test/list_enumerated/test.bib test/list_enumerated/test2.bib test/list_enumerated/test3.bib test/list_invalid/conf.py test/list_invalid/contents.rst test/list_invalid/test.bib test/sphinx/Makefile test/sphinx/conf.py test/sphinx/contents.rst test/sphinx/make.bat test/sphinx/test.bib test/sphinx/test2.bib test/sphinx/zbibliography.rst test/sphinx/subfolder/test.bibsphinxcontrib-bibtex-0.3.6/sphinxcontrib_bibtex.egg-info/PKG-INFO0000644005105600024240000000610013162141125024644 0ustar dma0mtdma00000000000000Metadata-Version: 1.1 Name: sphinxcontrib-bibtex Version: 0.3.6 Summary: A Sphinx extension for BibTeX style citations. Home-page: https://github.com/mcmtroffaes/sphinxcontrib-bibtex Author: Matthias C. M. Troffaes Author-email: matthias.troffaes@gmail.com License: BSD Download-URL: https://pypi.python.org/pypi/sphinxcontrib-bibtex Description: This extension allows `BibTeX `_ citations to be inserted into documentation generated by `Sphinx `_, via a ``bibliography`` directive, and a ``cite`` role, which work similarly to LaTeX's ``thebibliography`` environment and ``\cite`` command. For formatting, the extension relies on `pybtex `_ written by Andrey Golovizin. The extension is inspired by Matthew Brett's `bibstuff.sphinxext.bibref `_. * Download: https://pypi.python.org/pypi/sphinxcontrib-bibtex/#downloads * Documentation: http://sphinxcontrib-bibtex.readthedocs.org/en/latest/ * Development: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/ .. |travis| image:: https://travis-ci.org/mcmtroffaes/sphinxcontrib-bibtex.png?branch=develop :target: https://travis-ci.org/mcmtroffaes/sphinxcontrib-bibtex :alt: travis-ci .. |coveralls| image:: https://coveralls.io/repos/mcmtroffaes/sphinxcontrib-bibtex/badge.png?branch=develop :target: https://coveralls.io/github/mcmtroffaes/sphinxcontrib-bibtex?branch=develop :alt: coveralls.io .. |downloads| image:: https://pypip.in/d/sphinxcontrib-bibtex/badge.png :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ :alt: downloads .. |version| image:: https://pypip.in/v/sphinxcontrib-bibtex/badge.png :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ :alt: latest version .. |license| image:: https://pypip.in/license/sphinxcontrib-bibtex/badge.png :target: https://pypi.python.org/pypi/sphinxcontrib-bibtex/ :alt: license Platform: any Classifier: Development Status :: 4 - Beta Classifier: Environment :: Console Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Documentation Classifier: Topic :: Utilities sphinxcontrib-bibtex-0.3.6/sphinxcontrib_bibtex.egg-info/not-zip-safe0000644005105600024240000000000113162141112025774 0ustar dma0mtdma00000000000000 sphinxcontrib-bibtex-0.3.6/LICENSE.rst0000644005105600024240000000255412717571613017471 0ustar dma0mtdma00000000000000| sphinxcontrib-bibtex is a Sphinx extension for BibTeX style citations | Copyright (c) 2011-2015 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-0.3.6/VERSION0000644005105600024240000000000613053527516016710 0ustar dma0mtdma000000000000000.3.6 sphinxcontrib-bibtex-0.3.6/INSTALL.rst0000644005105600024240000000126712613713502017503 0ustar dma0mtdma00000000000000Install the module with ``pip install sphinxcontrib-bibtex``, or from source using ``python setup.py install``. Then add: .. code-block:: python extensions = ['sphinxcontrib.bibtex'] to your project's Sphinx configuration file ``conf.py``. Minimal Example --------------- In your project's documentation, you can then write for instance: .. code-block:: rest See :cite:`1987:nelson` for an introduction to non-standard analysis. .. bibliography:: refs.bib where refs.bib would contain an entry:: @Book{1987:nelson, author = {Edward Nelson}, title = {Radically Elementary Probability Theory}, publisher = {Princeton University Press}, year = {1987} } sphinxcontrib-bibtex-0.3.6/doc/0000755005105600024240000000000013162141125016376 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/doc/make.bat0000644005105600024240000001200412613713501020003 0ustar dma0mtdma00000000000000@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-0.3.6/doc/Makefile0000644005105600024240000001276312613713501020052 0ustar dma0mtdma00000000000000# 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-0.3.6/doc/api.rst0000644005105600024240000000023612613713501017705 0ustar dma0mtdma00000000000000Extension API ~~~~~~~~~~~~~ .. toctree:: :maxdepth: 2 api/interface api/roles api/nodes api/directives api/transforms api/cache sphinxcontrib-bibtex-0.3.6/doc/index.rst0000644005105600024240000000052712613713501020246 0ustar dma0mtdma00000000000000Welcome 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-0.3.6/doc/license.rst0000644005105600024240000000005612613713501020556 0ustar dma0mtdma00000000000000License ======= .. include:: ../LICENSE.rst sphinxcontrib-bibtex-0.3.6/doc/conf.py0000644005105600024240000001757513153205031017711 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- # # sphinxcontrib-bibtex documentation build configuration file, created by # sphinx-quickstart on Thu Jun 13 13:56:25 2013. # # This file is execfile()d with the current directory set to its containing # dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # -- General configuration ----------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.imgmath', 'sphinx.ext.viewcode'] # The master toctree document. master_doc = 'index' # General information about the project. project = u'sphinxcontrib-bibtex' copyright = u'2011-2015, Matthias C. M. Troffaes' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The full version, including alpha/beta/rc tags. with open("../VERSION", "rt") as version_file: release = version_file.read().strip() # The short X.Y version. version = '.'.join(release.split('.')[:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. # today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all # documents. # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). # add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. # show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'default' # uncommented for readthedocs # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". # html_title = None # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. # html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. # html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. # html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. # html_domain_indices = True # If false, no index is generated. # html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False # If true, links to the reST sources are added to the pages. # html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. # html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. # html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. # html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). # html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'sphinxcontrib-bibtexdoc' # -- Options for LaTeX output -------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # 'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ ('index', 'sphinxcontrib-bibtex.tex', u'sphinxcontrib-bibtex Documentation', u'Matthias C. M. Troffaes', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False # If true, show page references after internal links. # latex_show_pagerefs = False # If true, show URL addresses after external links. # latex_show_urls = False # Documents to append as an appendix to all manuals. # latex_appendices = [] # If false, no module index is generated. # latex_domain_indices = True # -- Options for manual page output -------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'sphinxcontrib-bibtex', u'sphinxcontrib-bibtex Documentation', [u'Matthias C. M. Troffaes'], 1) ] # If true, show URL addresses after external links. # man_show_urls = False # -- Options for Texinfo output ------------------------------------------ # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'sphinxcontrib-bibtex', u'sphinxcontrib-bibtex Documentation', u'Matthias C. M. Troffaes', 'sphinxcontrib-bibtex', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. # texinfo_appendices = [] # If false, no module index is generated. # texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. # texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. # texinfo_no_detailmenu = False # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { 'python': ('https://docs.python.org/3/', None), 'sphinx': ('http://sphinx-doc.org/', None), } sphinxcontrib-bibtex-0.3.6/doc/changes.rst0000644005105600024240000000007612613713501020546 0ustar dma0mtdma00000000000000:tocdepth: 1 Changes ======= .. include:: ../CHANGELOG.rst sphinxcontrib-bibtex-0.3.6/doc/usage.rst0000644005105600024240000003665412717571613020270 0ustar dma0mtdma00000000000000Usage ===== Roles and Directives -------------------- .. rst:role:: cite Create a citation to a bibliographic entry. For example: .. code-block:: rest See :cite:`1987:nelson` for an introduction to non-standard analysis. which would be equivalent to the following LaTeX code: .. code-block:: latex See \cite{1987:nelson} for an introduction to non-standard analysis. Multiple comma-separated keys can be specified at once: .. code-block:: rest See :cite:`1987:nelson,2001:schechter`. .. note:: Due to a docutils implementation detail, Sphinx's LaTeX backend will not actually generate ``\cite`` commands. Instead, all references, including citation references, are managed using ``\hyperref`` and ``\label`` commands. See https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/10 .. rst:directive:: .. bibliography:: refs.bib [...] Create bibliography for all cited references. The ``all`` flag forces all references to be included (equivalent to ``\nocite{*}`` in LaTeX). The ``notcited`` flag causes all references that were not cited to be included. The ``cited`` flag is recognized as well but is entirely optional. For example: .. code-block:: rest .. rubric:: References .. bibliography:: refs.bib :cited: which would be roughly equivalent to the following LaTeX code: .. code-block:: latex \begin{thebibliography}{1} \bibitem{1987:nelson} Edward~Nelson \newblock {\em Radically Elementary Probability Theory}. \newblock Princeton University Press, 1987. \end{thebibliography} Note that, unlike LaTeX, the :rst:dir:`bibliography` directive does not generate a default section title. .. warning:: Sphinx may not be able to create an entry for :rst:role:`cite` keys when your :rst:dir:`bibliography` directive resides in a different document; see :ref:`issue-unresolved-citations` for more information and workarounds. You can also pick a bibliography style, using the ``style`` option. The ``alpha`` style is the default. Other supported styles are ``plain``, ``unsrt``, and ``unsrtalpha``. .. code-block:: rest .. bibliography:: refs.bib :style: unsrt .. 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. You can also set the encoding of the bibliography files, using the ``encoding`` option. .. code-block:: rest .. bibliography:: refs.bib :encoding: latex+latin Note that, usually, you want to prepend your encoding with ``latex+``, in order to convert LaTeX control characters to unicode characters (for instance, to convert ``\'e`` into ``é``). The latex codec is invoked by default, for your convenience. Be sure to write ``\%`` when you intend to format a percent sign. .. 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:: refs.bib :disable-curly-bracket-strip: Advanced Features ----------------- 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:: refs1.bib :list: bullet :all: .. bibliography:: refs2.bib :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:: refs2.bib :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. 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:: refs.bib :cited: :labelprefix: A .. rubric:: Further reading .. bibliography:: refs.bib :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 doucments, with the bibliography entries showing in both of the documents. In one document you could have: .. code-block:: rest See :cite:`a-boole1854` .. bibliography:: refs.bib :labelprefix: A :keyprefix: a- whilst in the other document you could have: .. code-block:: rest See :cite:`b-boole1854` .. bibliography:: refs.bib :labelprefix: B :keyprefix: b- The bibliographies will then both generate an entry for ``boole1854``, with links and backlinks as expected. .. seealso:: :ref:`section-local-bibliographies` Filtering ~~~~~~~~~ .. versionadded:: 0.2.7 Whilst the ``cited``, ``all``, and ``notcited`` options 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:: refs.bib :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`, so it should be reasonably safe against malicious code. 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:: refs.bib :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:: refs.bib :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 ~~~~~~~~~~~~~~~~~~~~ Both the ``keyprefix`` and ``filter`` options can be used to achieve local bibliographies. The ``filter`` system for local bibliographies is the simplest one to use, but offers the least amount of flexibility. In particular, it 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:: refs.bib :filter: docname in docnames More generally, you can create bibliographies for citations that were cited from specific documents only: .. code-block:: rest .. bibliography:: refs.bib :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:: refs.bib :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. 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: http://docs.pybtex.org/api/plugins.html Simply add the following code to your ``conf.py``: .. code-block:: python from pybtex.style.formatting.unsrt import Style as UnsrtStyle from pybtex.style.template import toplevel # ... and anything else needed from pybtex.plugin import register_plugin class MyStyle(UnsrtStyle): def format_XXX(self, e): template = toplevel [ # etc. ] return template.format_data(e) register_plugin('pybtex.style.formatting', 'mystyle', MyStyle) Now ``mystyle`` will be available to you as a formatting style: .. code-block:: rest .. bibliography:: refs.bib :style: mystyle An minimal example is available here: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/tree/develop/test/custom_style 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 minimal example demonstrating how to create a custom label style is available here: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/tree/develop/test/issue77 Known Issues and Workarounds ---------------------------- Tinkerer ~~~~~~~~ To use the bibtex extension with `Tinkerer `_, be sure to specify the bibtex extension first in your ``conf.py`` file:: extensions = ['sphinxcontrib.bibtex', 'tinkerer.ext.blog', 'tinkerer.ext.disqus'] Encoding: Percent Signs ~~~~~~~~~~~~~~~~~~~~~~~ When using the LaTeX codec (which is by default), be sure to write ``\%`` for percent signs at all times (unless your file contains a genuine comment), otherwise the bibtex lexer will ignore the remainder of the line. If you don't want any LaTeX symbols to be reinterpreted as unicode, use the option ``:encoding: utf`` (without the ``latex+`` prefix). .. _issue-unresolved-citations: Unresolved Citations Across Documents ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you cite something that has its bibliography in another document, then, at the moment, the extension may, or may not, realise that it has to add this citation. There are a few ways to work around this problem: * Use the option ``:all:`` in the :rst:dir:`bibliography` directive (which will simply cause all entries to be included). * Ensure that the :rst:dir:`bibliography` directive is processed after all :rst:role:`cite`\ s. Sphinx appears to process files in an alphabetical manner. For instance, in case you have only one file containing a :rst:dir:`bibliography` directive, simply name that file :file:`zreferences.rst`. Hopefully, this limitation can be lifted in a future release. Duplicate Labels When Using ``:style: plain`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ With ``:style: plain``, labels are numerical, 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-numerical labelling, such as ``:style: alpha``. Citation Links Broken When Using LaTeX Backend ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a known bug in Sphinx's latex writer, which has been fixed upstream: https://bitbucket.org/birkenfeld/sphinx/pull-requests/171 https://bitbucket.org/birkenfeld/sphinx/pull-requests/173 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}{}} ''' } Mismatch Between Output of HTML 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 writer 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, you can tell Sphinx to generate a rubric title only for html: .. code-block:: rest .. only:: html .. rubric:: References .. bibliography:: refs.bib This code could be placed in your :file:`zreferences.rst`. The current aim is to fix Sphinx's LaTeX writer to match the html output more closely. The issue is tracked here: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/48 sphinxcontrib-bibtex-0.3.6/doc/related.rst0000644005105600024240000000213212613713501020551 0ustar dma0mtdma00000000000000Related 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 `bibstuff on google code `_ which is apparently no longer maintained. * wnielson's `sphinx-natbib `_. Similar to sphinxcontrib-bibtex but appears to be stalled in alpha stage. Interestingly, supports natbib-style citations. Apparently no longer maintained. * Jeff Terrace's Sphinx Thesis Resource `sphinxtr `_, a fork of Sphinx which includes a fork of sphinx-natbib. sphinxcontrib-bibtex-0.3.6/doc/api/0000755005105600024240000000000013162141125017147 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/doc/api/transforms.rst0000644005105600024240000000006012613713501022076 0ustar dma0mtdma00000000000000.. automodule:: sphinxcontrib.bibtex.transforms sphinxcontrib-bibtex-0.3.6/doc/api/interface.rst0000644005105600024240000000004512613713501021643 0ustar dma0mtdma00000000000000.. automodule:: sphinxcontrib.bibtex sphinxcontrib-bibtex-0.3.6/doc/api/roles.rst0000644005105600024240000000005312613713501021026 0ustar dma0mtdma00000000000000.. automodule:: sphinxcontrib.bibtex.roles sphinxcontrib-bibtex-0.3.6/doc/api/directives.rst0000644005105600024240000000006012613713501022041 0ustar dma0mtdma00000000000000.. automodule:: sphinxcontrib.bibtex.directives sphinxcontrib-bibtex-0.3.6/doc/api/cache.rst0000644005105600024240000000005312613713501020745 0ustar dma0mtdma00000000000000.. automodule:: sphinxcontrib.bibtex.cache sphinxcontrib-bibtex-0.3.6/doc/api/nodes.rst0000644005105600024240000000005312613713501021012 0ustar dma0mtdma00000000000000.. automodule:: sphinxcontrib.bibtex.nodes sphinxcontrib-bibtex-0.3.6/doc/quickstart.rst0000644005105600024240000000023112613713501021321 0ustar dma0mtdma00000000000000Getting Started =============== Overview -------- .. include:: ../README.rst :start-line: 5 Installation ------------ .. include:: ../INSTALL.rst sphinxcontrib-bibtex-0.3.6/test/0000755005105600024240000000000013162141125016610 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue87/0000755005105600024240000000000013162141126020120 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue87/contents.rst0000644005105600024240000000006113153206501022503 0ustar dma0mtdma00000000000000Contents ======== .. toctree:: doc0 doc1 sphinxcontrib-bibtex-0.3.6/test/issue87/conf.py0000644005105600024240000000010413153206501021411 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/issue87/doc0.rst0000644005105600024240000000020213153206501021470 0ustar dma0mtdma00000000000000doc0 ---- :cite:`tag0-2009:mandel` :cite:`tag0-2003:evensen` .. bibliography:: test.bib :labelprefix: A :keyprefix: tag0- sphinxcontrib-bibtex-0.3.6/test/issue87/doc1.rst0000644005105600024240000000015013153206501021473 0ustar dma0mtdma00000000000000doc1 ---- :cite:`tag1-2009:mandel` .. bibliography:: test.bib :labelprefix: B :keyprefix: tag1- sphinxcontrib-bibtex-0.3.6/test/issue87/test.bib0000644005105600024240000000132413153206501021554 0ustar dma0mtdma00000000000000@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-0.3.6/test/bibfile_out_of_date/0000755005105600024240000000000013162141125022554 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/bibfile_out_of_date/test_old.bib0000644005105600024240000000043313153206501025047 0ustar dma0mtdma00000000000000@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-0.3.6/test/bibfile_out_of_date/test_new.bib0000644005105600024240000000044213153206501025062 0ustar dma0mtdma00000000000000@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-0.3.6/test/bibfile_out_of_date/contents.rst0000644005105600024240000000015613153206501025145 0ustar dma0mtdma00000000000000:cite:`test1` :cite:`test2` :cite:`test3` :cite:`test4` .. bibliography:: test.bib :style: plain :all: sphinxcontrib-bibtex-0.3.6/test/bibfile_out_of_date/conf.py0000644005105600024240000000010413153206501024046 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/test_issue77.py0000644005105600024240000000104313153216033021526 0ustar dma0mtdma00000000000000""" test_issue77 ~~~~~~~~~~~~ Test label style. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('issue77').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_issue77(app, status, warning): app.builder.build_all() output = (app.outdir / "contents.html").read_text(encoding='utf-8') assert len(re.findall('\\[APAa\\]', output)) == 2 assert len(re.findall('\\[APAb\\]', output)) == 2 sphinxcontrib-bibtex-0.3.6/test/crossref/0000755005105600024240000000000013162141126020437 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/crossref/contents.rst0000644005105600024240000000006213153206501023023 0ustar dma0mtdma00000000000000:cite:`2001:zaffalon` .. bibliography:: test.bib sphinxcontrib-bibtex-0.3.6/test/crossref/conf.py0000644005105600024240000000010413153206501021730 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/crossref/test.bib0000644005105600024240000000133213153206501022072 0ustar dma0mtdma00000000000000@INCOLLECTION{2001:zaffalon, AUTHOR = {Zaffalon, Marco}, TITLE = {Statistical inference of the naive credal classifier}, PAGES = {384--393}, CROSSREF = {2001:ISIPTA} } % need booktitle for crossrefs @PROCEEDINGS{2001:ISIPTA, TITLE = {{ISIPTA} '01 -- Proceedings of the Second International Symposium on Imprecise Probabilities and Their Applications}, BOOKTITLE = {{ISIPTA} '01 -- Proceedings of the Second International Symposium on Imprecise Probabilities and Their Applications}, YEAR = {2001}, PUBLISHER = {Shaker Publishing}, EDITOR = {{de} Cooman, G. and Fine, T. L. and Seidenfeld, T.}, ADDRESS = {Maastricht} } sphinxcontrib-bibtex-0.3.6/test/test_issue17.py0000644005105600024240000000066613153206501021531 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_issue17 ~~~~~~~~~~~~ Test that sphinx [source] links do not generate a warning. """ from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('issue17').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_sphinx_source_no_warning(app, status, warning): app.builder.build_all() sphinxcontrib-bibtex-0.3.6/test/test_issue15.py0000644005105600024240000000113313153206501021515 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_issue15 ~~~~~~~~~~~~ Test order of bibliography entries when using an unsorted style. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('issue15').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_duplicate_label(app, status, warning): app.builder.build_all() output = (app.outdir / "contents.html").read_text() assert re.search( '.*Test 1.*.*.*Test 2.*', output, re.DOTALL) sphinxcontrib-bibtex-0.3.6/test/latex_refs/0000755005105600024240000000000013162141126020745 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/latex_refs/contents.rst0000644005105600024240000000010513153206501023327 0ustar dma0mtdma00000000000000Test ==== :cite:`1657:huygens` .. bibliography:: test.bib :all: sphinxcontrib-bibtex-0.3.6/test/latex_refs/conf.py0000644005105600024240000000024213153206501022241 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] latex_documents = [ ('contents', 'test.tex', u'Test', u'Mr. Test', 'manual'), ] sphinxcontrib-bibtex-0.3.6/test/latex_refs/test.bib0000644005105600024240000000064413153206501022405 0ustar dma0mtdma00000000000000@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-0.3.6/test/test_issue2.py0000644005105600024240000000116013153206501021431 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_issue2 ~~~~~~~~~~~ Test mixing of ``:cite:`` and ``[]_``. """ import nose.tools from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('issue2').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_mixing_citation_styles(app, status, warning): app.builder.build_all() nose.tools.assert_equal( app.env.bibtex_cache.get_cited_docnames(u"Test"), {u"adoc1"}) nose.tools.assert_equal( app.env.bibtex_cache.get_label_from_key(u"Test"), u"1") sphinxcontrib-bibtex-0.3.6/test/filter_fix_author_keyerror/0000755005105600024240000000000013162141126024250 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/filter_fix_author_keyerror/contents.rst0000644005105600024240000000011013153206501026626 0ustar dma0mtdma00000000000000.. bibliography:: test.bib :list: bullet :filter: author % "Test" sphinxcontrib-bibtex-0.3.6/test/filter_fix_author_keyerror/conf.py0000644005105600024240000000010413153206501025541 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/filter_fix_author_keyerror/test.bib0000644005105600024240000000010013153206501025673 0ustar dma0mtdma00000000000000@Misc{second, title = {Tralalala}, year = {2010} } sphinxcontrib-bibtex-0.3.6/test/test_list_invalid.py0000644005105600024240000000101513153206501022677 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_list_invalid ~~~~~~~~~~~~~~~~~ Test invalid ``:list:`` option. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('list_invalid').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir) def test_list_invalid(app, status, warning): app.builder.build_all() assert re.search( "unknown bibliography list type 'thisisintentionallyinvalid'", warning.getvalue()) sphinxcontrib-bibtex-0.3.6/test/list_bullet/0000755005105600024240000000000013162141126021133 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/list_bullet/contents.rst0000644005105600024240000000006513153206501023522 0ustar dma0mtdma00000000000000.. bibliography:: test.bib :list: bullet :all: sphinxcontrib-bibtex-0.3.6/test/list_bullet/conf.py0000644005105600024240000000010413153206501022424 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/list_bullet/test.bib0000644005105600024240000000043313153206501022567 0ustar dma0mtdma00000000000000@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 1}, } @Misc{test4, author = {Mr. Test Dude}, title = {Test 4}, } sphinxcontrib-bibtex-0.3.6/test/test_sphinx.py0000644005105600024240000000166313153206501021540 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_sphinx ~~~~~~~~~~~ General Sphinx test and check output. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('sphinx').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir) def test_sphinx(app, status, warning): app.builder.build_all() warnings = warning.getvalue() assert re.search(u'could not relabel citation \\[Test01\\]', warnings) assert re.search(u'could not relabel citation \\[Test02\\]', warnings) assert re.search(u'could not relabel citation \\[Wa04\\]', warnings) assert re.search( u'could not relabel citation reference \\[Test01\\]', warnings) assert re.search( u'could not relabel citation reference \\[Test02\\]', warnings) assert re.search( u'could not relabel citation reference \\[Wa04\\]', warnings) sphinxcontrib-bibtex-0.3.6/test/test_list_bullet.py0000644005105600024240000000134413153206501022545 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_list_bullet ~~~~~~~~~~~~~~~~ Test the ``:list: bullet`` option. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('list_bullet').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_list_bullet(app, status, warning): app.builder.build_all() output = (app.outdir / "contents.html").read_text() assert re.search( '
    ' '.*
  • .*Akkerdju.*
  • ' '.*
  • .*Bro.*
  • ' '.*
  • .*Chap.*
  • ' '.*
  • .*Dude.*
  • ' '.*
', output, re.MULTILINE | re.DOTALL) sphinxcontrib-bibtex-0.3.6/test/test_latex_refs.py0000644005105600024240000000131213153216033022353 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_latex_refs ~~~~~~~~~~~~~~~ Check that LaTeX backend produces correct references. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('latex_refs').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True, buildername='latex') def test_latex_refs(app, status, warning): app.builder.build_all() output = (app.outdir / "test.tex").read_text(encoding='utf-8') assert re.search( '\\\\hyperref\[(\\\\detokenize{)?contents:huygens(})?\]', output) assert re.search( '\\\\label{(\\\\detokenize{)?contents:huygens(})?}}', output) sphinxcontrib-bibtex-0.3.6/test/bibfilenotfound/0000755005105600024240000000000013162141126021762 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/bibfilenotfound/contents.rst0000644005105600024240000000003613153206501024347 0ustar dma0mtdma00000000000000.. bibliography:: unknown.bib sphinxcontrib-bibtex-0.3.6/test/bibfilenotfound/conf.py0000644005105600024240000000010413153206501023253 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/filter_option_clash/0000755005105600024240000000000013162141126022640 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/filter_option_clash/contents.rst0000644005105600024240000000013513153206501025225 0ustar dma0mtdma00000000000000.. bibliography:: test.bib :all: :cited: :notcited: :filter: author % "Troffaes" sphinxcontrib-bibtex-0.3.6/test/filter_option_clash/conf.py0000644005105600024240000000010413153206501024131 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/filter_option_clash/test.bib0000644005105600024240000000000013153206501024262 0ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/test_list_enumerated.py0000644005105600024240000000227613153206501023414 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_list_enumerated ~~~~~~~~~~~~~~~~~~~~ Test the ``:list: enumerated`` option. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('list_enumerated').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_list_enumerated(app, status, warning): app.builder.build_all() output = (app.outdir / "contents.html").read_text() assert re.search( '
    ' '.*
  1. .*Akkerdju.*
  2. ' '.*
  3. .*Bro.*
  4. ' '.*
  5. .*Chap.*
  6. ' '.*
  7. .*Dude.*
  8. ' '.*
' '.*
    ' '.*
  1. .*Eminence.*
  2. ' '.*
  3. .*Frater.*
  4. ' '.*
  5. .*Giggles.*
  6. ' '.*
  7. .*Handy.*
  8. ' '.*
' '.*
    ' '.*
  1. .*Iedereen.*
  2. ' '.*
  3. .*Joke.*
  4. ' '.*
  5. .*Klopgeest.*
  6. ' '.*
  7. .*Laterfanter.*
  8. ' '.*
', output, re.MULTILINE | re.DOTALL) sphinxcontrib-bibtex-0.3.6/test/issue4/0000755005105600024240000000000013162141126020025 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue4/contents.rst0000644005105600024240000000011213153206501022405 0ustar dma0mtdma00000000000000:cite:`Test` .. bibliography:: test.bib :all: :encoding: latex+utf sphinxcontrib-bibtex-0.3.6/test/issue4/conf.py0000644005105600024240000000010413153206501021316 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/issue4/test.bib0000644005105600024240000000010313153206501021453 0ustar dma0mtdma00000000000000@Misc{Test, author = {Mr. T\'est☺}, title = {Test}, } sphinxcontrib-bibtex-0.3.6/test/sphinx/0000755005105600024240000000000013162141126020122 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/sphinx/make.bat0000644005105600024240000001070513153206501021531 0ustar dma0mtdma00000000000000@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 ^` 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. 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-0.3.6/test/sphinx/Makefile0000644005105600024240000001107213153206501021562 0ustar dma0mtdma00000000000000# 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 ' 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 " 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-0.3.6/test/sphinx/subfolder/0000755005105600024240000000000013162141126022107 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/sphinx/subfolder/test.bib0000644005105600024240000000064213153206501023545 0ustar dma0mtdma00000000000000@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-0.3.6/test/sphinx/contents.rst0000644005105600024240000000116013153206501022506 0ustar dma0mtdma00000000000000.. 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. Contents: .. toctree:: :maxdepth: 2 zbibliography Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` sphinxcontrib-bibtex-0.3.6/test/sphinx/zbibliography.rst0000644005105600024240000000245313153206501023524 0ustar dma0mtdma00000000000000Testing 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-0.3.6/test/sphinx/conf.py0000644005105600024240000000010413153206501021413 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/sphinx/test2.bib0000644005105600024240000000210113153206501021632 0ustar dma0mtdma00000000000000@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-0.3.6/test/sphinx/test.bib0000644005105600024240000002104713153206501021562 0ustar dma0mtdma00000000000000@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 = {} } %@Proceedings{2010:coolen:oberguggenberger:troffaes::jrr, % title = {Proceedings of the Institution of Mechanical Engineers, Part O: Journal of Risk and Reliability}, % year = {2010}, % OPTkey = {}, % OPTbooktitle = {}, % editor = {Frank P. A. Coolen and Michael Oberguggenberger and Matthias C. M. Troffaes}, % volume = {224}, % number = {4}, % OPTseries = {}, % OPTaddress = {}, % OPTmonth = {}, % OPTorganization = {}, % OPTpublisher = {}, % note = {Special Issue on Uncertainty in Engineering and Risk Reliability}, % 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-0.3.6/test/issue17/0000755005105600024240000000000013162141126020111 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue17/contents.rst0000644005105600024240000000005013153206501022472 0ustar dma0mtdma00000000000000.. automodule:: somemodule :members: sphinxcontrib-bibtex-0.3.6/test/issue17/conf.py0000644005105600024240000000042313153206501021406 0ustar dma0mtdma00000000000000import sys import os # viewcode extension specifically needed for this test extensions = [ 'sphinxcontrib.bibtex', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc'] # make sure we find the module sys.path.insert(0, os.path.abspath('.')) exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/issue17/somemodule.py0000644005105600024240000000011313153206501022626 0ustar dma0mtdma00000000000000"""Some module.""" def somefunction(): """Some function.""" pass sphinxcontrib-bibtex-0.3.6/test/test_issue4.py0000644005105600024240000000100513153216033021432 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_issue4 ~~~~~~~~~~~ Test the ``:encoding:`` option. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('issue4').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_encoding(app, status, warning): app.builder.build_all() output = (app.outdir / "contents.html").read_text(encoding='utf-8') assert re.search(u"Tést☺", output) sphinxcontrib-bibtex-0.3.6/test/issue85/0000755005105600024240000000000013162141126020116 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue85/contents.rst0000644005105600024240000000011513153206501022501 0ustar dma0mtdma00000000000000:cite:`_software_2015` :cite:`2009:mandel` .. bibliography:: test.bib sphinxcontrib-bibtex-0.3.6/test/issue85/conf.py0000644005105600024240000000010413153206501021407 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/issue85/test.bib0000644005105600024240000000071713153206501021557 0ustar dma0mtdma00000000000000@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} } sphinxcontrib-bibtex-0.3.6/test/custom_style/0000755005105600024240000000000013162141126021343 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/custom_style/contents.rst0000644005105600024240000000011113153206501023722 0ustar dma0mtdma00000000000000.. bibliography:: test.bib :style: nowebref :all: :list: bullet sphinxcontrib-bibtex-0.3.6/test/custom_style/conf.py0000644005105600024240000000070413153206501022642 0ustar dma0mtdma00000000000000from pybtex.style.formatting.unsrt import Style as UnsrtStyle from pybtex.style.template import words from pybtex.plugin import register_plugin extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] class NoWebRefStyle(UnsrtStyle): def format_web_refs(self, e): # the following is just one simple way to return an empty node return words[''] register_plugin('pybtex.style.formatting', 'nowebref', NoWebRefStyle) sphinxcontrib-bibtex-0.3.6/test/custom_style/test.bib0000644005105600024240000000132413153206501022777 0ustar dma0mtdma00000000000000@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-0.3.6/test/test_issue62.py0000644005105600024240000000500013153216033021515 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_issue62 ~~~~~~~~~~~~ Test local bibliographies. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('issue62').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) def extract_references(code): return frozenset(re.findall( '.*\\[A1\\].*', output) output = (app.outdir / "doc2.html").read_text(encoding='utf-8') assert re.search('.*\\[B1\\].*', output) sphinxcontrib-bibtex-0.3.6/test/list_enumerated/0000755005105600024240000000000013162141126021775 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/list_enumerated/contents.rst0000644005105600024240000000032213153206501024360 0ustar dma0mtdma00000000000000.. bibliography:: test.bib :list: enumerated :all: .. bibliography:: test2.bib :list: enumerated :start: continue :all: .. bibliography:: test3.bib :list: enumerated :start: 23 :all: sphinxcontrib-bibtex-0.3.6/test/list_enumerated/conf.py0000644005105600024240000000010413153206501023266 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/list_enumerated/test2.bib0000644005105600024240000000044213153206501023513 0ustar dma0mtdma00000000000000@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-0.3.6/test/list_enumerated/test3.bib0000644005105600024240000000045613153206501023521 0ustar dma0mtdma00000000000000@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-0.3.6/test/list_enumerated/test.bib0000644005105600024240000000043313153206501023431 0ustar dma0mtdma00000000000000@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 1}, } @Misc{test4, author = {Mr. Test Dude}, title = {Test 4}, } sphinxcontrib-bibtex-0.3.6/test/test_invalid_cite_option.py0000644005105600024240000000104413153206501024242 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_invalid_cite_option ~~~~~~~~~~~~~~~~~~~~~~~~ Test behaviour when invalid cite option is given. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('invalid_cite_option').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir) def test_invalid_cite_option(app, status, warning): app.builder.build_all() assert re.search( 'unknown option: "thisisintentionallyinvalid"', warning.getvalue()) sphinxcontrib-bibtex-0.3.6/test/test_bibfilenotfound.py0000644005105600024240000000077213153206501023400 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_bibfilenotfound ~~~~~~~~~~~~~~~~~~~~ Bib file not found check. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('bibfilenotfound').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir) def test_bibfilenotfound(app, status, warning): app.builder.build_all() assert re.search( 'could not open bibtex file .*unknown[.]bib', warning.getvalue()) sphinxcontrib-bibtex-0.3.6/test/invalid_cite_option/0000755005105600024240000000000013162141126022633 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/invalid_cite_option/contents.rst0000644005105600024240000000007313153206501025221 0ustar dma0mtdma00000000000000.. bibliography:: test.bib :thisisintentionallyinvalid: sphinxcontrib-bibtex-0.3.6/test/invalid_cite_option/conf.py0000644005105600024240000000010413153206501024124 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/invalid_cite_option/test.bib0000644005105600024240000000000013153206501024255 0ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue14/0000755005105600024240000000000013162141126020106 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue14/test1.bib0000644005105600024240000000007613153206501021626 0ustar dma0mtdma00000000000000@Misc{Test, author = {Mr. Test}, title = {Test}, } sphinxcontrib-bibtex-0.3.6/test/issue14/contents.rst0000644005105600024240000000006113153206501022471 0ustar dma0mtdma00000000000000Contents ======== .. toctree:: doc1 doc2 sphinxcontrib-bibtex-0.3.6/test/issue14/conf.py0000644005105600024240000000010413153206501021377 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/issue14/doc1.rst0000644005105600024240000000010113153206501021455 0ustar dma0mtdma00000000000000Doc1 ==== .. bibliography:: test1.bib :style: plain :all: sphinxcontrib-bibtex-0.3.6/test/issue14/doc2.rst0000644005105600024240000000010113153206501021456 0ustar dma0mtdma00000000000000Doc2 ==== .. bibliography:: test2.bib :style: plain :all: sphinxcontrib-bibtex-0.3.6/test/issue14/test2.bib0000644005105600024240000000011513153206501021621 0ustar dma0mtdma00000000000000@Misc{Test2, author = {Mr. Other Test}, title = {Another Test}, } sphinxcontrib-bibtex-0.3.6/test/issue91/0000755005105600024240000000000013162141126020113 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue91/contents.rst0000644005105600024240000000006013153206501022475 0ustar dma0mtdma00000000000000:cite:`2009:mandel` .. bibliography:: test.bib sphinxcontrib-bibtex-0.3.6/test/issue91/conf.py0000644005105600024240000000014313153206501021407 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] bibtex_default_style = 'plain' sphinxcontrib-bibtex-0.3.6/test/issue91/test.bib0000644005105600024240000000042713153206501021552 0ustar dma0mtdma00000000000000@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-0.3.6/test/test_list_citation.py0000644005105600024240000000162513153206501023072 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_list_citation ~~~~~~~~~~~~~~~~~~ Test the ``:list: citation`` option. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('list_citation').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_list_citation(app, status, warning): app.builder.build_all() output = (app.outdir / "contents.html").read_text() assert re.search( '

' '.*.*\\[1\\].*.*Akkerdju.*' '.*.*\\[2\\].*.*Bro.*' '.*.*\\[3\\].*.*Chap.*' '.*.*\\[4\\].*.*Dude.*' '.*

', output, re.MULTILINE | re.DOTALL) sphinxcontrib-bibtex-0.3.6/test/issue77/0000755005105600024240000000000013162141126020117 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue77/contents.rst0000644005105600024240000000013113153206501022500 0ustar dma0mtdma00000000000000:cite:`2009:mandel` :cite:`2003:evensen` .. bibliography:: test.bib :style: apastyle sphinxcontrib-bibtex-0.3.6/test/issue77/conf.py0000644005105600024240000000102013153206501021406 0ustar dma0mtdma00000000000000from pybtex.style.formatting.unsrt import Style as UnsrtStyle from pybtex.style.labels.alpha import LabelStyle as AlphaLabelStyle from pybtex.plugin import register_plugin extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] 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-0.3.6/test/issue77/test.bib0000644005105600024240000000132413153206501021553 0ustar dma0mtdma00000000000000@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-0.3.6/test/test_issue85.py0000644005105600024240000000060013153206501021522 0ustar dma0mtdma00000000000000""" test_issue77 ~~~~~~~~~~~~ Test for reference with no author and no key. """ from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('issue85').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_issue77(app, status, warning): app.builder.build_all() sphinxcontrib-bibtex-0.3.6/test/issue2/0000755005105600024240000000000013162141126020023 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue2/adoc1.rst0000644005105600024240000000003013153206501021534 0ustar dma0mtdma00000000000000Doc1 ==== :cite:`Test` sphinxcontrib-bibtex-0.3.6/test/issue2/adoc2.rst0000644005105600024240000000002313153206501021537 0ustar dma0mtdma00000000000000Doc2 ==== [Test]_ sphinxcontrib-bibtex-0.3.6/test/issue2/contents.rst0000644005105600024240000000014013153206501022404 0ustar dma0mtdma00000000000000Contents ======== .. toctree:: adoc1 adoc2 .. bibliography:: test.bib :style: plain sphinxcontrib-bibtex-0.3.6/test/issue2/conf.py0000644005105600024240000000010413153206501021314 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/issue2/test.bib0000644005105600024240000000007613153206501021462 0ustar dma0mtdma00000000000000@Misc{Test, author = {Mr. Test}, title = {Test}, } sphinxcontrib-bibtex-0.3.6/test/test_issue91.py0000644005105600024240000000133613153206501021526 0ustar dma0mtdma00000000000000""" test_issue91 ~~~~~~~~~~~~ Test bibtex_default_style config value. """ import os.path import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('issue91').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_issue91(app, status, warning): app.builder.build_all() # default style is plain; check output with open(os.path.join(app.outdir, "contents.html")) as stream: output = stream.read() # ensure Man09 is cited with plain style and not with alpha style assert len(re.findall('\\[1\\]', output)) == 2 assert len(re.findall('\\[Man09\\]', output)) == 0 sphinxcontrib-bibtex-0.3.6/test/test_bibfile_out_of_date.py0000644005105600024240000000336313153206501024172 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_bibfile_out_of_date ~~~~~~~~~~~~~~~~~~~~~~~~ Test that updates to the bibfile generate the correct result when Sphinx is run again. """ import shutil import re import time from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('bibfile_out_of_date').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) (srcdir / 'test.bib').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_bibfile_out_of_date(app, status, warning): shutil.copyfile((srcdir / 'test_old.bib'), (srcdir / 'test.bib')) app.builder.build_all() output = (app.outdir / "contents.html").read_text() assert re.search( '

' '.*.*\\[1\\].*.*Akkerdju.*' '.*.*\\[2\\].*.*Bro.*' '.*.*\\[3\\].*.*Chap.*' '.*.*\\[4\\].*.*Dude.*' '.*

', output, re.MULTILINE | re.DOTALL) # wait to ensure different timestamp time.sleep(0.1) shutil.copyfile((srcdir / 'test_new.bib'), (srcdir / 'test.bib')) app.builder.build_all() output = (app.outdir / "contents.html").read_text() assert re.search( '

' '.*.*\\[1\\].*.*Eminence.*' '.*.*\\[2\\].*.*Frater.*' '.*.*\\[3\\].*.*Giggles.*' '.*.*\\[4\\].*.*Handy.*' '.*

', output, re.MULTILINE | re.DOTALL) sphinxcontrib-bibtex-0.3.6/test/test_issue1.py0000644005105600024240000000121713153206501021433 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_issue1 ~~~~~~~~~~~ Test Tinkerer and check output. """ import nose.tools from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('issue1').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_tinker(app, status, warning): app.builder.build_all() nose.tools.assert_equal( app.env.bibtex_cache.get_cited_docnames(u"2011:BabikerIPv6"), {u"2012/07/24/hello_world_"}) nose.tools.assert_equal( app.env.bibtex_cache.get_label_from_key(u"2011:BabikerIPv6"), u"BNC11") sphinxcontrib-bibtex-0.3.6/test/filter_syntax_error/0000755005105600024240000000000013162141126022715 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/filter_syntax_error/contents.rst0000644005105600024240000000073713153206501025312 0ustar dma0mtdma00000000000000.. bibliography:: test.bib :filter: $ .. bibliography:: test.bib :filter: yield author .. bibliography:: test.bib :filter: author is title .. bibliography:: test.bib :filter: False % title .. bibliography:: test.bib :filter: title % False .. bibliography:: test.bib :filter: ~title .. bibliography:: test.bib :filter: "2000" <= year <= "2005" .. bibliography:: test.bib :filter: author + title .. bibliography:: test.bib :filter: author; title sphinxcontrib-bibtex-0.3.6/test/filter_syntax_error/conf.py0000644005105600024240000000010413153206501024206 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/filter_syntax_error/test.bib0000644005105600024240000000011113153206501024342 0ustar dma0mtdma00000000000000@misc{test, author = {Mr. Tee}, title = {Baracuda}, year = {1553} }sphinxcontrib-bibtex-0.3.6/test/citationnotfound/0000755005105600024240000000000013162141126022200 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/citationnotfound/contents.rst0000644005105600024240000000005613153206501024567 0ustar dma0mtdma00000000000000:cite:`nosuchkey` .. bibliography:: test.bib sphinxcontrib-bibtex-0.3.6/test/citationnotfound/conf.py0000644005105600024240000000010413153206502023472 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/citationnotfound/test.bib0000644005105600024240000000000013153206502023623 0ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/filter/0000755005105600024240000000000013162141126020076 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/filter/key.rst0000644005105600024240000000012013153206502021411 0ustar dma0mtdma00000000000000Key --- .. bibliography:: test.bib :list: bullet :filter: key == "third" sphinxcontrib-bibtex-0.3.6/test/filter/lte.rst0000644005105600024240000000012013153206502021405 0ustar dma0mtdma00000000000000Lte --- .. bibliography:: test.bib :list: bullet :filter: year <= "2011" sphinxcontrib-bibtex-0.3.6/test/filter/gte.rst0000644005105600024240000000012013153206502021400 0ustar dma0mtdma00000000000000Gte --- .. bibliography:: test.bib :list: bullet :filter: year >= "2011" sphinxcontrib-bibtex-0.3.6/test/filter/set.rst0000644005105600024240000000013613153206502021423 0ustar dma0mtdma00000000000000Set --- .. bibliography:: test.bib :list: bullet :filter: {"doc1", "doc2"} <= docnames sphinxcontrib-bibtex-0.3.6/test/filter/bitor.rst0000644005105600024240000000013513153206502021746 0ustar dma0mtdma00000000000000Set --- .. bibliography:: test.bib :list: bullet :filter: {"doc1", "doc2"} | docnames sphinxcontrib-bibtex-0.3.6/test/filter/or.rst0000644005105600024240000000014513153206502021250 0ustar dma0mtdma00000000000000Or -- .. bibliography:: test.bib :list: bullet :filter: author % "First" or type == "article" sphinxcontrib-bibtex-0.3.6/test/filter/contents.rst0000644005105600024240000000032713153206502022467 0ustar dma0mtdma00000000000000.. bibliography:: test.bib :list: bullet :filter: author % "Second" and type == "misc" .. toctree:: or noteq lt lte gt gte key false title in notin set bitand bitor sphinxcontrib-bibtex-0.3.6/test/filter/gt.rst0000644005105600024240000000011513153206502021237 0ustar dma0mtdma00000000000000Gt -- .. bibliography:: test.bib :list: bullet :filter: year > "2011" sphinxcontrib-bibtex-0.3.6/test/filter/lt.rst0000644005105600024240000000011513153206502021244 0ustar dma0mtdma00000000000000Lt -- .. bibliography:: test.bib :list: bullet :filter: year < "2011" sphinxcontrib-bibtex-0.3.6/test/filter/conf.py0000644005105600024240000000010413153206502021370 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/filter/title.rst0000644005105600024240000000013713153206502021752 0ustar dma0mtdma00000000000000Title ----- .. bibliography:: test.bib :list: bullet :filter: title and title % "jakka" sphinxcontrib-bibtex-0.3.6/test/filter/false.rst0000644005105600024240000000011313153206502021715 0ustar dma0mtdma00000000000000False ----- .. bibliography:: test.bib :list: bullet :filter: False sphinxcontrib-bibtex-0.3.6/test/filter/in.rst0000644005105600024240000000012113153206502021230 0ustar dma0mtdma00000000000000In -- .. bibliography:: test.bib :list: bullet :filter: "bla" in docnames sphinxcontrib-bibtex-0.3.6/test/filter/notin.rst0000644005105600024240000000013513153206502021756 0ustar dma0mtdma00000000000000Not In ------ .. bibliography:: test.bib :list: bullet :filter: "bla" not in docnames sphinxcontrib-bibtex-0.3.6/test/filter/bitand.rst0000644005105600024240000000013513153206502022070 0ustar dma0mtdma00000000000000Set --- .. bibliography:: test.bib :list: bullet :filter: {"doc1", "doc2"} & docnames sphinxcontrib-bibtex-0.3.6/test/filter/noteq.rst0000644005105600024240000000012413153206502021753 0ustar dma0mtdma00000000000000NotEq ----- .. bibliography:: test.bib :list: bullet :filter: year != "2011" sphinxcontrib-bibtex-0.3.6/test/filter/test.bib0000644005105600024240000000051413153206502021533 0ustar dma0mtdma00000000000000@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-0.3.6/test/list_citation/0000755005105600024240000000000013162141126021456 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/list_citation/contents.rst0000644005105600024240000000020113153206502024036 0ustar dma0mtdma00000000000000:cite:`test1` :cite:`test2` :cite:`test3` :cite:`test4` .. bibliography:: test.bib :style: plain :list: citation :all: sphinxcontrib-bibtex-0.3.6/test/list_citation/conf.py0000644005105600024240000000010413153206502022750 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/list_citation/test.bib0000644005105600024240000000043313153206502023113 0ustar dma0mtdma00000000000000@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 1}, } @Misc{test4, author = {Mr. Test Dude}, title = {Test 4}, } sphinxcontrib-bibtex-0.3.6/test/issue1/0000755005105600024240000000000013162141126020022 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue1/refs.bib0000644005105600024240000000051313153206502021436 0ustar dma0mtdma00000000000000@InProceedings{2011:BabikerIPv6, author = {H. Babiker and I. Nikolova and K. Chittimaneni}, title = {Deploying IPv6 in the Google Enterprise Network. Lessons learned.}, booktitle = {USENIX LISA 2011}, year = 2011, note = {\url{http://static.usenix.org/events/lisa11/tech/full_papers/Babiker.pdf}} } sphinxcontrib-bibtex-0.3.6/test/issue1/master.rst0000644005105600024240000000011313153206502022042 0ustar dma0mtdma00000000000000Sitemap ======= .. toctree:: :maxdepth: 1 2012/07/24/hello_world_ sphinxcontrib-bibtex-0.3.6/test/issue1/conf.py0000644005105600024240000000140313153206502021317 0ustar dma0mtdma00000000000000import tinkerer import tinkerer.paths project = 'My blog' tagline = 'Add intelligent tagline here' author = 'Mr Test' website = 'http://127.0.0.1/blog/html/' html_theme = "modern5" posts_per_page = 2 extensions = [ 'sphinxcontrib.bibtex', 'tinkerer.ext.blog', 'tinkerer.ext.disqus'] html_static_path = [tinkerer.paths.static] html_theme_path = [tinkerer.paths.themes] exclude_patterns = ["drafts/*"] # ************************************************************** # Do not modify below lines as the values are required by # Tinkerer to play nice with Sphinx # ************************************************************** master_doc = tinkerer.master_doc html_title = project html_use_index = False html_show_sourcelink = False html_add_permalinks = "" sphinxcontrib-bibtex-0.3.6/test/issue1/2012/0000755005105600024240000000000013162141125020405 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue1/2012/07/0000755005105600024240000000000013162141125020633 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue1/2012/07/24/0000755005105600024240000000000013162141126021061 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue1/2012/07/24/hello_world_.rst0000644005105600024240000000024013153206502024260 0ustar dma0mtdma00000000000000Hello World! ============ :cite:`2011:BabikerIPv6` .. bibliography:: ../../../refs.bib .. author:: default .. categories:: none .. tags:: none .. comments:: sphinxcontrib-bibtex-0.3.6/test/test_custom_style.py0000644005105600024240000000117513153216033022760 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_custom_style ~~~~~~~~~~~~~~~~~ Test a custom style. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('custom_style').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_custom_style(app, status, warning): app.builder.build_all() output = (app.outdir / "contents.html").read_text(encoding='utf-8') # the custom style suppresses web links assert not re.search('http://arxiv.org', output) assert not re.search('http://dx.doi.org', output) sphinxcontrib-bibtex-0.3.6/test/test_filter_option_clash.py0000644005105600024240000000124213153206502024250 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_filter_option_clash ~~~~~~~~~~~~~~~~~~~~~~~~ Test filter option clash with all, cited, and notcited. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('filter_option_clash').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir) def test_filter_option_clash(app, status, warning): app.builder.build_all() warnings = warning.getvalue() assert re.search(':filter: overrides :all:', warnings) assert re.search(':filter: overrides :cited:', warnings) assert re.search(':filter: overrides :notcited:', warnings) sphinxcontrib-bibtex-0.3.6/test/test_crossref.py0000644005105600024240000000142713153216033022054 0ustar dma0mtdma00000000000000""" test_crossref ~~~~~~~~~~~~~ Test that cross references work. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('crossref').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_crossref(app, status, warning): app.builder.build_all() # default style is plain; check output output = (app.outdir / "contents.html").read_text(encoding='utf-8') # ensure Zaf is cited assert len(re.findall('\\[Zaf\\]', output)) == 2 # ensure proceedings only mentioned for Zaf assert len(re.findall( 'Proceedings of the Second International Symposium ' 'on Imprecise Probabilities and Their Applications', output)) == 1 sphinxcontrib-bibtex-0.3.6/test/test_filter_fix_author_keyerror.py0000644005105600024240000000074113153206502025663 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_filter_fix_author_keyerror ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test for a bug in the filter option. """ from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath( 'filter_fix_author_keyerror').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_filter_fix_author_keyerror(app, status, warning): app.builder.build_all() sphinxcontrib-bibtex-0.3.6/test/issue61/0000755005105600024240000000000013162141126020110 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue61/refs.bib0000644005105600024240000000021713153206502021525 0ustar dma0mtdma00000000000000@Misc{testone, author = {Mr. TestOne}, title = {TestOne}, } @Misc{testtwo, author = {Mr. TestTwo}, title = {TestTwo}, } sphinxcontrib-bibtex-0.3.6/test/issue61/contents.rst0000644005105600024240000000010713153206502022475 0ustar dma0mtdma00000000000000Contents ======== :cite:`testone,testtwo` .. bibliography:: refs.bib sphinxcontrib-bibtex-0.3.6/test/issue61/conf.py0000644005105600024240000000010413153206502021402 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/issue62/0000755005105600024240000000000013162141126020111 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue62/refs.bib0000644005105600024240000000745513153206502021541 0ustar dma0mtdma00000000000000@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-0.3.6/test/issue62/summary.rst0000644005105600024240000000176113153206502022345 0ustar dma0mtdma00000000000000Summary ####### Постановка задачи ***************** :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:: refs.bib :labelprefix: C :filter: docname in docnames and key != "fuhrmans_molecular_2012" sphinxcontrib-bibtex-0.3.6/test/issue62/contents.rst0000644005105600024240000000007513153206502022502 0ustar dma0mtdma00000000000000Contents ======== .. toctree:: doc1 doc2 summary sphinxcontrib-bibtex-0.3.6/test/issue62/conf.py0000644005105600024240000000010413153206502021403 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/issue62/doc1.rst0000644005105600024240000000341213153206502021471 0ustar dma0mtdma000000000000002014-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:: refs.bib :labelprefix: A :filter: docname in docnames sphinxcontrib-bibtex-0.3.6/test/issue62/doc2.rst0000644005105600024240000000235613153206502021500 0ustar dma0mtdma000000000000002014-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:: refs.bib :labelprefix: B :filter: docname in docnames sphinxcontrib-bibtex-0.3.6/test/test_filter.py0000644005105600024240000000452113153216033021511 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_filter ~~~~~~~~~~~ Test filter option. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('filter').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_filter(app, status, warning): app.builder.build_all() output = (app.outdir / "contents.html").read_text(encoding='utf-8') assert re.search('Tralalala', output) assert not re.search('ideetje', output) assert not re.search('Jakkamakka', output) output = (app.outdir / "or.html").read_text(encoding='utf-8') assert not re.search('Tralalala', output) assert re.search('ideetje', output) assert re.search('Jakkamakka', output) output = (app.outdir / "noteq.html").read_text(encoding='utf-8') assert re.search('Tralalala', output) assert re.search('ideetje', output) assert not re.search('Jakkamakka', output) output = (app.outdir / "lt.html").read_text(encoding='utf-8') assert re.search('Tralalala', output) assert not re.search('ideetje', output) assert not re.search('Jakkamakka', output) output = (app.outdir / "lte.html").read_text(encoding='utf-8') assert re.search('Tralalala', output) assert not re.search('ideetje', output) assert re.search('Jakkamakka', output) output = (app.outdir / "gt.html").read_text(encoding='utf-8') assert not re.search('Tralalala', output) assert re.search('ideetje', output) assert not re.search('Jakkamakka', output) output = (app.outdir / "gte.html").read_text(encoding='utf-8') assert not re.search('Tralalala', output) assert re.search('ideetje', output) assert re.search('Jakkamakka', output) output = (app.outdir / "key.html").read_text(encoding='utf-8') assert not re.search('Tralalala', output) assert re.search('ideetje', output) assert not re.search('Jakkamakka', output) output = (app.outdir / "false.html").read_text(encoding='utf-8') assert not re.search('Tralalala', output) assert not re.search('ideetje', output) assert not re.search('Jakkamakka', output) output = (app.outdir / "title.html").read_text(encoding='utf-8') assert not re.search('Tralalala', output) assert not re.search('ideetje', output) assert re.search('Jakkamakka', output) sphinxcontrib-bibtex-0.3.6/test/issue15/0000755005105600024240000000000013162141126020107 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue15/contents.rst0000644005105600024240000000011213153206502022470 0ustar dma0mtdma00000000000000:cite:`first` :cite:`second` .. bibliography:: test.bib :style: unsrt sphinxcontrib-bibtex-0.3.6/test/issue15/conf.py0000644005105600024240000000010413153206502021401 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/issue15/test.bib0000644005105600024240000000020413153206502021540 0ustar dma0mtdma00000000000000@Misc{second, author = {B. Second}, title = {Test 2}, } @Misc{first, author = {A. First}, title = {Test 1}, } sphinxcontrib-bibtex-0.3.6/test/list_invalid/0000755005105600024240000000000013162141126021272 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/list_invalid/contents.rst0000644005105600024240000000010013153206502023650 0ustar dma0mtdma00000000000000.. bibliography:: test.bib :list: thisisintentionallyinvalid sphinxcontrib-bibtex-0.3.6/test/list_invalid/conf.py0000644005105600024240000000010413153206502022564 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/list_invalid/test.bib0000644005105600024240000000000013153206502022715 0ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/test_issue14.py0000644005105600024240000000140213153216033021514 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_issue14 ~~~~~~~~~~~~ Test duplicate label issue. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('issue14').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir) def test_duplicate_label(app, status, warning): app.builder.build_all() assert re.search( 'duplicate label for keys (Test and Test2)|(Test2 and Test)', warning.getvalue()) output = (app.outdir / "doc1.html").read_text(encoding='utf-8') assert re.search('\\[1\\]', output) output = (app.outdir / "doc2.html").read_text(encoding='utf-8') assert re.search('\\[1\\]', output) sphinxcontrib-bibtex-0.3.6/test/test_issue61.py0000644005105600024240000000117513153216033021525 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_issue61 ~~~~~~~~~~~~ Test multiple keys in a single cite. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('issue61').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_multiple_keys(app, status, warning): app.builder.build_all() output = (app.outdir / "contents.html").read_text(encoding='utf-8') assert re.search('class="reference internal" href="#testone"', output) assert re.search('class="reference internal" href="#testtwo"', output) sphinxcontrib-bibtex-0.3.6/test/test_issue87.py0000644005105600024240000000202713153216033021532 0ustar dma0mtdma00000000000000""" test_issue87 ~~~~~~~~~~~~ Test bibliography tags. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('issue87').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir, warningiserror=True) def test_issue87(app, status, warning): app.builder.build_all() output = (app.outdir / "doc0.html").read_text(encoding='utf-8') assert re.search( 'class="reference internal" href="#tag0-2009-mandel"', output) assert re.search( 'class="reference internal" href="#tag0-2003-evensen"', output) assert re.search('AMan09', output) assert re.search('AEve03', output) output = (app.outdir / "doc1.html").read_text(encoding='utf-8') assert re.search( 'class="reference internal" href="#tag1-2009-mandel"', output) assert not re.search( 'class="reference internal" href="#tag1-2003-evensen"', output) assert re.search('BMan09', output) assert not re.search('BEve03', output) sphinxcontrib-bibtex-0.3.6/test/test_citationnotfound.py0000644005105600024240000000075013153206502023613 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_citationnotfound ~~~~~~~~~~~~~~~~~~~~~ Citation not found check. """ import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('citationnotfound').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir) def test_citationnotfound(app, status, warning): app.builder.build_all() assert re.search('citation not found: nosuchkey', warning.getvalue()) sphinxcontrib-bibtex-0.3.6/test/issue14_2/0000755005105600024240000000000013162141126020327 5ustar dma0mtdma00000000000000sphinxcontrib-bibtex-0.3.6/test/issue14_2/test1.bib0000644005105600024240000000007613153206502022050 0ustar dma0mtdma00000000000000@Misc{Test, author = {Mr. Test}, title = {Test}, } sphinxcontrib-bibtex-0.3.6/test/issue14_2/contents.rst0000644005105600024240000000006113153206502022713 0ustar dma0mtdma00000000000000Contents ======== .. toctree:: doc1 doc2 sphinxcontrib-bibtex-0.3.6/test/issue14_2/conf.py0000644005105600024240000000010413153206502021621 0ustar dma0mtdma00000000000000extensions = ['sphinxcontrib.bibtex'] exclude_patterns = ['_build'] sphinxcontrib-bibtex-0.3.6/test/issue14_2/doc1.rst0000644005105600024240000000014213153206502021704 0ustar dma0mtdma00000000000000Doc1 ==== :cite:`Test` .. bibliography:: test1.bib :all: :style: plain :labelprefix: A sphinxcontrib-bibtex-0.3.6/test/issue14_2/doc2.rst0000644005105600024240000000014313153206502021706 0ustar dma0mtdma00000000000000Doc2 ==== :cite:`Test2` .. bibliography:: test2.bib :all: :style: plain :labelprefix: B sphinxcontrib-bibtex-0.3.6/test/issue14_2/test2.bib0000644005105600024240000000011513153206502022043 0ustar dma0mtdma00000000000000@Misc{Test2, author = {Mr. Other Test}, title = {Another Test}, } sphinxcontrib-bibtex-0.3.6/test/test_filter_syntax_error.py0000644005105600024240000000111513153206502024324 0ustar dma0mtdma00000000000000# -*- coding: utf-8 -*- """ test_filter_syntax_error ~~~~~~~~~~~~~~~~~~~~~~~~ Test response on syntax errors in filter. """ import nose.tools import re from sphinx_testing.util import path, with_app srcdir = path(__file__).dirname().joinpath('filter_syntax_error').abspath() def teardown_module(): (srcdir / '_build').rmtree(True) @with_app(srcdir=srcdir) def test_filter_syntax_error(app, status, warning): app.builder.build_all() nose.tools.assert_equal( len(re.findall( 'syntax error in :filter: expression', warning.getvalue())), 9)