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

    Common class processing logic for equation files.

    Services class need plugin instance to access settings and cache data, and provide common functions for equation files.

    Index

    Constructors

    Properties

    plugin: default

    Methods

    • Parameters

      • filePath: string
      • lineStart: number
      • lineEnd: number
      • tag: string

      Returns boolean

    • Adds a tag to the equation at the cached line range after confirming the current editor still contains the same equation text. Returns a failure reason instead of silently returning false so callers can warn about stale panel data when refresh has been stopped.

      Parameters

      • filePath: string
      • lineStart: number
      • lineEnd: number
      • tag: string
      • OptionalexpectedContent: string

      Returns AddEquationTagResult

    • Retrieves equations by their tags from a specified source file. Used in rename tags

      This method processes both local and cross-file equation references based on plugin settings. For cross-file references, it resolves the actual file path using footnotes. It filters out invalid equations and fills in the equation content for valid ones.

      Parameters

      • eqNumbersAll: string[]

        An array of equation tags to retrieve

      • sourcePath: string

        The path of the source file where the equations are referenced

      Returns Promise<RenderedEquation[]>

      A promise that resolves to an array of RenderedEquation objects containing equation details

      • Uses footnote information to resolve cross-file references when enabled in settings
      • Filters out equations with invalid source paths
      • Populates equation content by matching tags with cached equation data
      • Returns an empty array if no valid equations are found
    • Gets the MarkdownView for a file by its path

      Parameters

      • filePath: string

        The path of the file

      Returns MarkdownView | null

      The MarkdownView if found, null otherwise

    • Parameters

      • equationLines: string[]
      • expectedContent: string

      Returns boolean

    • Parameters

      • sourcePath: string
      • crossFile: string
      • footnotes: FootNote[] | undefined

      Returns { filename: null; path: null } | { filename: string | null; path: string }