diff --git a/README.md b/README.md index 80a2650..6d896ac 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # preview.nvim -**Universal document previewer for Neovim** +**Universal previewer for Neovim** An extensible framework for compiling and previewing _any_ documents (LaTeX, Typst, Markdown, etc.)—diagnostics included. @@ -81,3 +81,8 @@ vim.g.preview = { typst = { open = { 'sioyek', '--new-instance' } }, } ``` + +**Q: How do I set up SyncTeX (forward/inverse search)?** + +See `:help preview-synctex` for full recipes covering Zathura, Sioyek, and +Okular. diff --git a/doc/preview.txt b/doc/preview.txt index 383a8f5..3912a41 100644 --- a/doc/preview.txt +++ b/doc/preview.txt @@ -22,10 +22,12 @@ CONTENTS *preview-contents* 3. Install ............................................... |preview-install| 4. Configuration ........................................... |preview-config| 5. Presets ............................................... |preview-presets| + - Math rendering ....................................... |preview-math| 6. Commands ............................................. |preview-commands| 7. Lua API ................................................... |preview-api| 8. Events ............................................... |preview-events| 9. Health ............................................... |preview-health| + 10. SyncTeX ............................................. |preview-synctex| ============================================================================== REQUIREMENTS *preview-requirements* @@ -68,6 +70,10 @@ Provider fields: ~ receives a |preview.Context| and returns a string[]. + {extra_args} (string[]|function) Appended to {args} after evaluation. + Useful for adding flags to a preset + without replacing its defaults. + {cwd} (string|function) Working directory. If a function, receives a |preview.Context|. Default: git root or file directory. @@ -184,6 +190,33 @@ override individual fields by passing a table instead: >lua `mermaid` mmdc → SVG (Mermaid diagrams, `.mmd`) `quarto` quarto render → HTML (scientific publishing) +Math rendering (pandoc presets): ~ + *preview-math* + +The `markdown` and `github` presets use `--mathml` by default, which converts +TeX math to native MathML markup rendered by the browser. This is the only +math option compatible with `--embed-resources` (self-contained HTML). + +`--mathjax` and `--katex` insert `