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

Parsing log files error with TeX root #2214

Closed
CrossR opened this issue Oct 21, 2021 · 3 comments
Closed

Parsing log files error with TeX root #2214

CrossR opened this issue Oct 21, 2021 · 3 comments
Labels

Comments

@CrossR
Copy link

CrossR commented Oct 21, 2021

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
@CrossR CrossR added the bug label Oct 21, 2021
lervag added a commit that referenced this issue Oct 21, 2021
@lervag
Copy link
Owner

lervag commented Oct 21, 2021

I believe this has been fixed and improved upon now, please test.

@lervag lervag closed this as completed Oct 21, 2021
@CrossR
Copy link
Author

CrossR commented Oct 21, 2021

That works perfectly for me now, thanks for the incredibly quick fix!

@lervag
Copy link
Owner

lervag commented Oct 22, 2021

Great; thanks for the good issue description. While trying to fix it I realized I could make an improvement as well. So now it should work and in some cases also give improved results. :)

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