Skip to content

Parsing log files error with TeX root #2214

@CrossR

Description

@CrossR

Description

Hey,

I'm hitting a bug where I get VimTeX: Something went wrong when parsing log files! when compiling in a file that sets the TeX root to a different file.

That is, I can still compile etc as normal, but warnings / errors aren't coming up. Whereas, if I compile in main.tex itself, then the warnings and errors appear as normal.

Steps to reproduce

This minimal repro works on my side, though it could be some weirdness with my setup...

minimal.vim

set nocompatible
let &runtimepath  = '~/.vim/bundle/vimtex,' . &runtimepath
let &runtimepath .= ',~/.vim/bundle/vimtex/after'
filetype plugin indent on
syntax enable

main.tex

\documentclass[12pt]{article}

\begin{document}

This is a sample text.
Lets include some broken bits:

\include{chapters/broke}

\end{document}

And then in a new folder, chapters/broke.tex

%! TEX root = ../main.tex

\section{Working}

More sample text

\section{Warning!}

\hspace{1000pt}

Then, running vim -u minimal.vim main.tex and :VimtexCompile should work as expected and complain about the overfull hbox.

Whereas, running cd chapters and vim -u minimal.vim broke.tex and :VimtexCompile should throw the error about not parsing the log files.

Expected behavior

The expected behaviour would be getting the same warnings and errors across each file, as I'm compiling the same project and getting the same errors.

Actual behavior

Errors only appear correctly when compiling in main.tex but are missing when compiling in any other file, despite the compile running as expected on main.tex.

Do you use a latexmkrc file?

No

VimtexInfo

System info
  OS: Mac OS X 10.14.6 (18G8012)
  Vim version: NVIM v0.5.1
  Has clientserver: true
  Servername: /var/folders/7m/x04x4r1j60sdtg7ly1yy4sk80000gn/T/nvimrVXr5A/0

VimTeX project: main
  base: main.tex
  root: /Users/rcross/git/test/small
  tex: /Users/rcross/git/test/small/main.tex
  main parser: texroot specifier
  document class: article
  source files:
    main.tex
    chapters/broke.tex
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
  viewer: General
  qf method: LaTeX logfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions