Source code for pyexlatex.models.references.citations

from pyexlatex.models.item import SimpleItem
from pyexlatex.models.package import Package


[docs]class Cite(SimpleItem): """ Basic citation command, creates a reference to a document included in the bibliography. """ name = 'cite'
[docs] def __init__(self, item_accessor: str): super().__init__(self.name, item_accessor)
[docs]class NatBibCiteBase(Cite):
[docs] def __init__(self, item_accessor): self.init_data() self.data.packages.append(Package('natbib', eq_on_modifier=False)) super().__init__(item_accessor)
[docs]class CiteT(NatBibCiteBase): """ In text citation command, creates an in text (without parentheses) reference to a document included in the bibliography. """ name = 'citet'
[docs]class CiteP(NatBibCiteBase): """ Paragraph citation command, creates a paragraph (with parentheses) reference to a document included in the bibliography. """ name = 'citep'