2

I recently installed Latex-Suite using Vundle, and I use Latex to take notes. My notes are separate files for each lecture, but I have a master.tex file set up to compile each document together, and I use the subfile packaged to do this. Unfortunately, this package can lead to some unavoidable warnings:

Package auxhook Warning: Cannot patch \document, using \AtBeginDocument instead.

I believe this is a result of having multiple nested \begin{document} environments when the files are brought together. However, it does compile, and the document looks as it should. The problem is that Latex-Suite takes this warning and opens up the file /usr/local/texlive/2017/texmf-dist/fex/latex/oberdiek/auxhook.sty, which I assume is where this warning presents. When it does this, it closes the current .tex file which I'm trying to edit, which is extremely annoying. My question is, did I set something up incorrectly with the way Latex-Suite compiles my documents, or is there a way to get this to stop happening. As a side-note, I am trying to get my final result in .pdf form for all of my compiled documents. Below are the relevant lines from my .vimrc:

let g:Tex_DefaultTargetFormat='pdf'

let g:Tex_MultipleCompileFormats='pdf'

This happens when I use the compile command \lv in Latex-Suite.

Also, this is my first post, please let me know if I've left anything important out.

2
  • Aside: you can hit <C-^> to get back to the original (or you should be able to)
    – D. Ben Knoble
    Commented Sep 27, 2019 at 16:16
  • @D.BenKnoble Yes, this does work, I did not know this command, thanks! Commented Sep 28, 2019 at 19:52

1 Answer 1

1

I had the same problem, as far as I could find that is the result of 2 things:

  1. You are allowing vim-latex to jump to the first error atomatically. You can disable it with:
let g:Tex_GotoError=0
  1. You are probably on Windows, and the jumping to the package file is the result of a misunderstanding in the file paths. You can fix that by adding to your vimrc:
set shellslash

This, however, creates a problem within vim-latex and the command <Leader>ls, to jump to the current position in your pdf stops working. The <Leader>lv command works properly. So is up to you to decide if this is adequate for your workflow.

I hope this helps.

1
  • Thanks, the first bit worked! I'm on Mac so the second part didn't really apply, but thank you! Commented Sep 28, 2019 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.