diff --git a/README.md b/README.md index 7012cfe..80a2650 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # preview.nvim -**Universal previewer for Neovim** +**Universal document previewer for Neovim** An extensible framework for compiling and previewing _any_ documents (LaTeX, Typst, Markdown, etc.)—diagnostics included. @@ -81,24 +81,3 @@ vim.g.preview = { typst = { open = { 'sioyek', '--new-instance' } }, } ``` - -**Q: Markdown compilation drops `.html` files in my working directory. How do I -send output to `/tmp` instead?** - -Override the `output` field. The `args` function references `ctx.output`, so the -compiled file lands wherever `output` points: - -```lua -vim.g.preview = { - github = { - output = function(ctx) - return '/tmp/' .. vim.fn.fnamemodify(ctx.file, ':t:r') .. '.html' - end, - }, -} -``` - -**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 be1d82b..383a8f5 100644 --- a/doc/preview.txt +++ b/doc/preview.txt @@ -22,13 +22,10 @@ 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. FAQ ..................................................... |preview-faq| - 11. SyncTeX ............................................. |preview-synctex| ============================================================================== REQUIREMENTS *preview-requirements* @@ -71,10 +68,6 @@ 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,49 +177,13 @@ override individual fields by passing a table instead: >lua `latex` latexmk -pdf → PDF (with clean support) `pdflatex` pdflatex → PDF (single pass, no latexmk) `tectonic` tectonic → PDF (Rust-based LaTeX engine) - `markdown` pandoc → HTML (standalone, KaTeX math) - `github` pandoc → HTML (GitHub-styled, `-f gfm`, KaTeX math) + `markdown` pandoc → HTML (standalone, embedded) + `github` pandoc → HTML (GitHub-styled, `-f gfm` input) `asciidoctor` asciidoctor → HTML (AsciiDoc with SSE reload) `plantuml` plantuml → SVG (UML diagrams, `.puml`) `mermaid` mmdc → SVG (Mermaid diagrams, `.mmd`) `quarto` quarto render → HTML (scientific publishing) -Math rendering (pandoc presets): ~ - *preview-math* - -The `markdown` and `github` presets use `--katex` by default, which inserts a -`