Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdf outfile should be updated to match the argument to compile command #2866

Closed
BertrandSim opened this issue Jan 10, 2024 · 3 comments
Closed
Labels

Comments

@BertrandSim
Copy link
Contributor

BertrandSim commented Jan 10, 2024

Description

The addition of arguments to :VimtexCompile allowed a different filename for the pdf output. However, this filename was not passed to the viewer.

In particular, tracing the source code leads me to the function
vimtex#view#compiler_callback() in autoload/vimtex/view.vim.
(I also tried looking at autoload/vimtex/view/_template.vim, and its function s:viewer_out(). But could not understand the rest of the code well enough to submit a PR)

.latexmkrc

$emulate_aux = 1;
$out_dir = "";
$aux_dir = ".auxfiles";

Steps to reproduce

  1. nvim minimal.tex
  2. :VimtexCompileSS to produce minimal.pdf
  3. :q
  4. nvim minimal.tex
  5. :VimtexCompileSS -jobname=anotherminimal
  6. minimal.pdf is opened

Expected behavior

anotherminimal.pdf should be opened

Actual behavior

Either minimal.pdf is opened, or if steps 1-3 were omitted, no pdf is shown.

Do you use a latexmkrc file?

Yes

VimtexInfo

System info:
  OS: Linux Mint 21
  Vim version: NVIM v0.8.1
  Has clientserver: true
  Servername: /run/user/1000/nvim.97711.0

VimTeX project: minimal
  base: minimal.tex
  root: /home/bertrand-sim/tex_temp
  tex: /home/bertrand-sim/tex_temp/minimal.tex
  main parser: current file verified
  document class: minimal
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    aux_dir: .auxfiles
    callback: 1
    continuous: 0
    executable: latexmk
    job: 
      jobid: 5
      output: /tmp/nvim.bertrand-sim/52nKG9/0
      cmd: max_print_line=2000 latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode -jobname=anotherminimal -pdf -emulate-aux-dir -auxdir=.auxfiles 'minimal.tex'
  viewer: Zathura
    xwin id: 92274691
    cmd_start: zathura  -x "/home/bertrand-sim/software/nvim-0.8.1/bin/nvim --headless -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 1:1:'/home/bertrand-sim/tex_temp/minimal.tex' 'minimal.pdf'&
  qf method: LaTeX logfile
lervag added a commit that referenced this issue Jan 14, 2024
@lervag
Copy link
Owner

lervag commented Jan 14, 2024

I believe I've added support for this now; please test and let me know if it does not work as expected.

@lervag lervag closed this as completed Jan 14, 2024
@BertrandSim
Copy link
Contributor Author

It works as expected, thanks again!

@lervag
Copy link
Owner

lervag commented Jan 18, 2024

Great, glad to hear it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants