Equation Citator v1.3.7 Documentation
    Preparing search index...

    Hierarchy

    Index

    Constructors

    Properties

    currentCitationPrefix: string = ''
    currentCitationType: CitationType | null = null
    inCodeBlockState: boolean = false
    lastCodeBlockStateUpdateTime: number = 0
    plugin: default
    suggestionComponents: TargetElComponent[] = []

    Methods

    • Parameters

      • el: HTMLElement
      • container: HTMLElement
      • delayTime: number
      • renderCallback: (previewEl: HTMLElement) => void

      Returns void

    • Parameters

      • lastTag: string
      • itemTag: string
      • footnoteIndex: string | null

      Returns string | null

    • get math environment info from line and cursor position, including last dollar index, equation content, equation start and end position, and line content

      Parameters

      • editor: Editor
      • cursor: EditorPosition

      Returns MathEnvironmentInfo | null

    • Generate suggestion items based on this context. Can be async, but preferably sync. When generating async suggestions, you should pass the context along.

      Parameters

      • context: EditorSuggestContext

      Returns Promise<CitationItem[]>

      0.12.17

    • Based on the editor line and cursor position, determine if this EditorSuggest should be triggered at this moment. Typically, you would run a regular expression on the current line text before the cursor. Return null to indicate that this editor suggest is not supposed to be triggered.

      Please be mindful of performance when implementing this function, as it will be triggered very often (on each keypress). Keep it simple, and return null as early as possible if you determine that it is not the right time.

      Parameters

      • cursor: EditorPosition
      • editor: Editor
      • file: TFile | null

      Returns EditorSuggestTriggerInfo | null

      1.1.13

    • Parses citation information from the provided equation content string, extracting details about the citation label and tags at the current cursor position.

      Here we use cursorCh and eqStart parameter is just for the convenience of calling, it can also be reduced to 1 parameter.

      Parameters

      • eqContent: string

        The equation content string to parse for citation information.

      • cursorCh: number

        The character index of the cursor of the current line.

      • eqStart: number

        The starting character index of the equation of the current line.

      Returns CitationParseResult

      An object containing the validity of the citation, citation index, full and current labels, arrays of full and current tags, citation type, and citation prefix.

    • refresh in code block state when cursor line change

      Parameters

      • editor: Editor
      • cursor: EditorPosition

      Returns void

    • Test if the trigger should be triggered in the current environment.

      Parameters

      • line: string
      • cursor: EditorPosition

      Returns boolean