Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim: Navigate through Latex-document structure

Tags:

vim

latex

Is there any vim-tool providing an efficient navigation through a Latex-document structure. It would be very useful to have something like a NERDTree panel representing the sections/subsection structure of the latex-document.

like image 278
freude Avatar asked Apr 03 '14 11:04

freude


4 Answers

Expanding mnosefishs answer (thanks by the way, it was you who made me discover VOoM):

VOoM seems indeed to be the best choice. It comes with latex support: Install it and type :Voom latex and it will show you a sidebar with a foldable structure outline allowing you to navigate in your tex file.

enter image description here

As mentioned by kamilk, tagbars (in my view decisive) problem is the fact that it groups parts to parts, sections to sections instead of nesting them. VOoM works with folds instead of tags, so it's better suited for a structure outline, use tabbar if you want an overview by syntax elements.

Quoting from tabbar man: Sort has been disabled for LaTeX so that the sections appear in their correct order. They unfortunately can't be shown nested with their correct scopes since as already mentioned the regular expression approach doesn't support that.

like image 120
mat Avatar answered Oct 24 '22 23:10

mat


tagbar plugin can show an outline of my latex file. (section, subsections etc.)

http://github.com/majutsushi/tagbar

right side is the tagbar window, I have enlarged it a little:

enter image description here

like image 37
Kent Avatar answered Oct 25 '22 00:10

Kent


You might try using the vim plugin VOoM, which might be able to hyperlink the sections.

From the Plugin Description:

VOoM (Vim Outliner of Markups) is a plugin for Vim that emulates a two-pane text outliner.

VOoM can currently handle >20 markup formats that have headlines and support an outline structure, including popular lightweight markup languages such as reST, Markdown, Pandoc, AsciiDoc, Org-mode, Wiki, LaTeX, etc. (Headlines are also called headings, headers, section headers, titles.)

like image 28
mnosefish Avatar answered Oct 24 '22 23:10

mnosefish


The vimtex plugin provides the command VimtexTocOpen which opens an outline. This might be more useful when browsing large LaTeX documents, because it scans the whole project, i.e. it also looks into includes or inputs and shows them correctly.

like image 32
red_trumpet Avatar answered Oct 25 '22 01:10

red_trumpet