lervag / vimtex

VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
MIT License
5.53k stars 391 forks source link

Compilation failed with Latexmk and Neovim #1520

Closed BachoSeven closed 5 years ago

BachoSeven commented 5 years ago

I'm using Vimtex(VimPlug, vim-auto-save) + Latexmk(TexLive) + Zathura, and experiencing issues with my latexmmk compiling, and probably something related to pdflatex, the output of \lo is:

Latexmk: This is Latexmk, John Collins, 18 June 2019, version: 4.65.
Rule 'pdflatex': The following rules & subrules became out-of-date:
      'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex  -file-line-error -synctex=1 -interaction=nonstopmode -recorder  "experiment.tex"'
------------
Latexmk: applying rule 'pdflatex'...
0 [0x7f13312ea680] INFO pdflatex null - starting with command line: pdflatex -file-line-error -synctex=1 -interaction=nonstopmode -recorder experiment.tex
It seems that this is a fresh TeX installation.
Please finish the setup before proceeding.
For more information, visit:
https://miktex.org/howto/install-miktex-unx
terminate called after throwing an instance of 'int'
Aborted (core dumped)
Latexmk: fls file doesn't appear to have been made.
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 134
      Refer to 'experiment.log' for details
----------------------
This message may duplicate earlier message.
Latexmk: Failure in processing file 'experiment.tex':
   (Pdf)LaTeX didn't generate the expected log file 'experiment.log'
----------------------
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.
Latexmk: Errors, so I did not complete making targets

The output of :VimtexInfo is :

System info
  OS: Ubuntu 18.04.3 LTS
  Vim version: NVIM v0.5.0-dev
  Has clientserver: true
  Servername: /tmp/nvim8E28m4/0

vimtex project: translation
  base: translation.tex
  root: /mnt/01D5707D40B081F0/Users/ascol/Documents/UNI/writing_Math/latex/experiments_latex
  tex: /mnt/01D5707D40B081F0/Users/ascol/Documents/UNI/writing_Math/latex/experiments_latex/translation.tex
  out: 
  log: 
  aux: /mnt/01D5707D40B081F0/Users/ascol/Documents/UNI/writing_Math/latex/experiments_latex/translation.aux
  fls: 
  source files:
    translation.tex
    ../preamble.tex
  compiler: latexmk
    backend: nvim
    output: /tmp/nvim8E28m4/2
    configuration: 
      continuous: 1
      callback: 1
      latexmk options:
        -verbose
        -file-line-error
        -synctex=1
        -interaction=nonstopmode
      latexmk engine: -pdf
  viewer: Zathura
    xwin id: 0
  qf: LaTeX logfile
    config: 
      fix_paths: 0
      packages: 
        default: 1
      default: 1
  document class: article
  packages:
    amsfonts
    amsmath
    amssymb
    amsthm
    babel
    bm
    booktabs
    cancel
    emptypage
    enumitem
    etoolbox
    float
    fontenc
    geometry
    graphicx
    inputenc
    mathrsfs
    mathtools
    mdframed
    multicol
    parskip
    siunitx
    stmaryrd
    subcaption
    systeme
    textcomp
    url
    xcolor
    xifthen

Minimal init.vim file:

Plug 'lervag/vimtex'
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
let g:vimtex_quickfix_latexlog = {'fix_paths':0}
let g:vimtex_quickfix_mode=0
let g:vimtex_compiler_progname = 'nvr'
set conceallevel=1
let g:tex_conceal='abdmg'

Minimal .tex:

\documentclass{article}
\begin{document}
hello world
\end{document}

Expected behaviour of \ll: To compile and show zathura file

Actual Behaviour: vimtex: compilation failed, and no pdf.

lervag commented 5 years ago

Does things work as expected if you use latexmk in a terminal? That is, what happens when you run the following command in a terminal?

latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode -pdf minimal.tex

This is the command that is started by vimtex (if you use the default settings). From you description, it seems to me that the problem is related to you LaTeX environment and not to vim or vimtex.

BachoSeven commented 5 years ago

You are right, it's latex; the minimal.tex returns error even if i compile with pdflatex directly. I will reinstall TexLive from scratch.

lervag commented 5 years ago

Great. I hope things work out!