quarto-dev / quarto-nvim

Quarto mode for Neovim
Other
313 stars 11 forks source link

Quarto Preview for PDF #128

Open weberam2 opened 1 month ago

weberam2 commented 1 month ago

Sorry if this is obvious.

I am using the quarto kickstarter.

I can get QuartoPreview to work with html: (my _quarto.yml)

project:
  type: manuscript
  render: 
    - "*.qmd"
    - "!pyvenv_csvo/"

execute:
  freeze: auto

format:
  html:
    embed-resources: true
    toc: true
    comments:
      hypothesis: true

  # docx: default
  # jats: default

  # nature-pdf:
  #   journal: "sn-nature"
  #   keep-tex: true

filters:
  - parse-latex

But it doesn't work when I try to render to pdf:

project:
  type: manuscript
  render: 
    - "*.qmd"
    - "!pyvenv_csvo/"

execute:
  freeze: auto

format:
  # html:
  #   embed-resources: true
  #   toc: true
  #   comments:
  #     hypothesis: true

  # docx: default
  # jats: default

  nature-pdf:
    journal: "sn-nature"
    keep-tex: true

filters:
  - parse-latex

I get this error:

image

I will say, this does render when I use Rstudio... so it's not a ...conversion problem.

Cheers,

Alex W.

jmbuhr commented 1 month ago

This plugin is just using the quarto-cli in a terminal buffer. Does it work if you run your example from the command line? Or can you provide a fully reproducible example? I can not reproduce this using the default quarto create project > manuscript

weberam2 commented 1 month ago

Oh I see!

So I can make a keybinding that would do:

!quarto render and !evince _manuscript/index.pdf or something like that

Thank you!

jmbuhr commented 1 month ago

Rather quarto preview (as this watches for changes), but you don't have to do that, that's what this plugin does. (See https://github.com/quarto-dev/quarto-nvim/blob/67e09027b5d8bd948907734fc6fb15028ffdcd28/lua/quarto/init.lua#L16-L26)

So if this doesn't work we should investigate why. Can you share the example in question?