multifile project files not recognised as Latex

Bug #74986 reported by Nuno Nunes
4
Affects Status Importance Assigned to Milestone
vim-latexsuite (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: vim-latexsuite

Latex-suite isn't loaded when opening a typical multifile project file, say something that starts with \chapter{}. It is loaded if I add a first line with \documentclass{}, which of course is bad Latex. The workaround is simple but inconvenient: keep that first line so Latex-suite loads when file is open, and comment it out before compiling. Then the *.latexmain magic works.

Not sure if this is a real bug or a config issue, but it doesn't do what it should...

Revision history for this message
Helge Reikeras (helge-reikeras) wrote :

yes, this is a config issue. have a look at

http://vim-latex.sourceforge.net/documentation/latex-suite.html

under "9 Multiple file LaTeX projects" for how to do this.

Revision history for this message
William Grant (wgrant) wrote :

Rejecting. It's a config issue, and is not easy/possible to automate.

Changed in vim-latexsuite:
status: Unconfirmed → Rejected
Revision history for this message
Nuno Nunes (n-nunes) wrote : Re: [Bug 74986] Re: multifile project files not recognised as Latex

I had another go at trying to understand what was causing the problem.
As it turned out, it is nothing to do with latex-suite itself, but with
file type detection in vim. Using default settings (AFAIK), a file
beginning with a \documentclass command is detected as LaTeX, while one
beginning with a \chapter command is detected as plain TeX. This can be
fixed by adding this line to ~/.vimrc:

let g:tex_flavor = "latex"

It works as expected now. Apologies for originally reporting this as a
possible bug in latex-suite.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.