### 5.2 Latex-Suite \ref completion

Pressing <F9> when you are within a partially completed \ref command will split open a window (named __OUTLINE__) which contains a nicely formatted list of all the \labels found in the present project. The \labels are heirarchically arranged according to which \section, \subsection etc of the overall document structure they are present in. For example, when you first press <F9> after typing \ref{, you should see something like:

+-- 54 lines: 2. Kinematics--------------------------------
+-- 98 lines: 3. Aerodynamics of the MFI thorax------------
+-- 40 lines: 4. Jump Resonance in Fourbar Mechanisms------
+-- 28 lines: 5. Design and Fabrication Issues-------------


Each chapter is |fold|ed away so that you can quickly jump to the correct section/subsection in which the relevant equation is defined. This makes inserting references significantly faster for large projects with hundreds of equations. You can then open some of the folds to see for example:

+-- 54 lines: 2. Kinematics--------------------------------
3. Aerodynamics of the MFI thorax
3.1. Aerodynamic modeling of the MFI wing forces
3.1.1. Geometric Specification
eqn:wingnormal-pos
\nhat =  T_z(\theta_2) T_y(\theta_y)T_x(\theta_x)\nhat_0,
eqn:T-1
T_1(\theta_2) &=& T_z(\theta_2)


The <Tab> key is mapped in this window to toggle folds so that you can quickly open/close folds in order to navigate the heirarchy faster. Once you are positioned on a label, press <Enter>. This closes the __OUTLINE__ window, returns to the window in which you pressed <F9> and inserts the reference at the current cursor position.

### Filtering labels by prefix

You can press <F9> after typing part of the \label. In this case, Latex-Suite only presents \labels which begin with the already filled characters. You can use this to choose between equations, figures, tables etc. if you consistently label equations to begin with eqn:, figures to begin with fig: etc. For example, with this scheme, pressing <F9> after typing \ref{eqn: will only list equations.

### Note

Latex-Suite works the same way if you press <F9> after any command which contains the letters ref. Thus you can complete \eqref in exactly the same manner.

### Requirements

This method of preseting the \labels depends on Vim being compiled with python[3] support. To check if you have this, see the output of the :ver command. If you see something like +python or +python3, you are all set. Failing this, you will need to have python somewhere in your \$PATH.