youfoundjk_TeXcore/docs/features/search.md
JK ba4f64eeb4 Refactor documentation and enhance features for TeXcore plugin
- Updated PDF export documentation to clarify features and settings.
- Improved quick preview functionality with detailed technical architecture.
- Enhanced equation search and autocomplete sections for better user guidance.
- Streamlined snippets documentation for command usage and text transformations.
- Revamped TikZ diagrams section to include graphical editor details and usage instructions.
- Revised getting started guide for clearer step-by-step setup instructions.
- Added new navigation and configuration options in the documentation structure.
- Updated plugin manifest files with improved descriptions for clarity.
2026-06-06 11:50:35 +02:00

3 KiB

Equation Search & Autocomplete

TeXcore offers a robust, keyboard-driven interface to search, preview, and link equations inside your vault. This module consists of two main interfaces: an editor-integrated Autocomplete Popup and a dedicated Search Modal.


Editor Autocomplete Popup

Trigger autocompletion anywhere in your notes by typing your configured trigger string (default is \eqref). A dropdown menu instantly pops up at your cursor, displaying all equations matching your query along with their parsed line numbers and live math previews.

Action Key Result Description
/ Highlight suggestion Navigate the list of cached equations.
++enter++ Insert reference link Appends [[#^eq-id]] at cursor.
++ctrl+enter++ (1) Jump to definition Instantly shifts editor focus to the math block declaration.
++escape++ Close popup Discards current search query.
  1. Maps to ++cmd+enter++ on macOS environments. Instructions are displayed inline inside the popup if configured in settings.

!!! info "Automatic Identifier Generation" If you reference an equation that has no identifier tag, TeXcore automatically generates a unique ID (e.g. % id: eq-b5x3e2), appends it before the closing $$, and inserts the resolved link to ensure referencing consistency.


Vault Search Modal

Access the dedicated note-wide search dialog by triggering ++ctrl+p++ and running Search equations in active note. This modal provides an expanded viewport displaying equation previews on hover. It uses two search algorithms configurable in your Autocomplete Settings:

  • Fuzzy Search (Default): Matches partial strings and typos (e.g., query intgl matches \integral or \int) using Obsidian's internal prepareFuzzySearch utility.
  • Simple Search: Matches exact substrings (e.g., query int matches \int and point but not frac) using Obsidian's prepareSimpleSearch utility.

Navigation Target Configuration

When jumping to equation definitions via the autocomplete suggestion list, you can configure the editor target split layout in Settings Reference:

=== "Standard Navigation (Default)" Resolves the jump within your active tab view, replacing current focus.

=== "Split Tab Right" Splits the active pane vertically and focuses the equation on the right-hand panel.

=== "New Window / Split Down" Opens a detached editor window or horizontal split viewport to show equations side-by-side.


Performance Notes & Best Practices

  • Vault Performance: The search indexing index is scoped to the active note only. This prevents vault-wide scan lag, resulting in instant search evaluations even on low-end hardware.
  • Custom Triggers: You can change the trigger string in Autocomplete & Search Settings to #eq or @eq if you want to avoid overlaps with other LaTeX parser plugins.