[Vim-latex-cvs] vimfiles/doc latex-suite.txt,1.26,1.27 latex-suite.xml,1.3,1.4
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2003-06-20 06:02:42
|
Update of /cvsroot/vim-latex/vimfiles/doc In directory sc8-pr-cvs1:/tmp/cvs-serv29752 Modified Files: latex-suite.txt latex-suite.xml Log Message: A bit more explanation about how to change the maps from default settings. Index: latex-suite.txt =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/doc/latex-suite.txt,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** latex-suite.txt 18 Jun 2003 18:54:30 -0000 1.26 --- latex-suite.txt 20 Jun 2003 06:02:39 -0000 1.27 *************** *** 39,44 **** |ls_3_11| Custom Macros |ls_4| Package Handling ! |ls_4_1| Custom Packages ! |ls_4_2| Supporting a package |ls_5| Latex Completion |ls_5_1| Latex-Suite \cite completion --- 39,46 ---- |ls_3_11| Custom Macros |ls_4| Package Handling ! |ls_4_1| Inserting package commands ! |ls_4_2| Actions taken for supported packages ! |ls_4_3| Automatic Package detection ! |ls_4_4| Writing supporting for a package |ls_5| Latex Completion |ls_5_1| Latex-Suite \cite completion *************** *** 201,210 **** ! Method 1 *ls_3_1_1* If you press <F5> in the insert mode while on an empty line, latex-suite prompts you with a list of environments you might want to insert. You can either choose ! one from the list or type in a new environment name. This list can be ! customized. See the 'Macros' section of the |texrc| file for details. --- 203,217 ---- ! Method 1 *ls_3_1_1* ! *ls-imap-f5* If you press <F5> in the insert mode while on an empty line, latex-suite prompts you with a list of environments you might want to insert. You can either choose ! one from the list or type in a new environment name. This list can be customized ! via the g:Tex_PromptedEnvironments [|Tex_PromptedEnvironments|] setting. ! ! In addition to the Tex_PromptedEnvironments variable, Latex-Suite also lists ! envionments found in custom packages as described in the section Package ! actions. [|package-actions|] *************** *** 219,223 **** The shifted function keys, <S-F1> to <S-F4>can also be optionally mapped to some common environments which you insert most often. The environments mapped to each ! key can also be customized. See the |texrc| file for details. --- 226,231 ---- The shifted function keys, <S-F1> to <S-F4>can also be optionally mapped to some common environments which you insert most often. The environments mapped to each ! key can also be customized via the g:Tex_HotKeyMappings [|Tex_HotKeyMappings|] ! setting. *************** *** 552,558 **** Alt Key Macros *ls_3_10* *bracketing-macros* ! |ls_3_10_1| <Alt-M> ! |ls_3_10_2| <Alt-C> ! |ls_3_10_3| <Alt-L> Latex-Suite utilizes a set of macros originally created by Carl Mueller in --- 560,566 ---- Alt Key Macros *ls_3_10* *bracketing-macros* ! |ls_3_10_1| <Alt-L> ! |ls_3_10_2| <Alt-M> ! |ls_3_10_3| <Alt-C> Latex-Suite utilizes a set of macros originally created by Carl Mueller in *************** *** 562,583 **** ! <Alt-M> *ls_3_10_1* *Alt-M* ! ! This insert-mode mapping encloses the previous character in \mathbf{}. ! ! ! <Alt-C> *ls_3_10_2* *Alt-C* ! ! In insert mode, this key is polymorphic as follows: ! ! ! 1. If the previous character is a letter or number, then capitalize it and ! enclose it in \mathcal{}. ! ! 2. otherwise insert \cite{}. ! In visual mode, it will simply enclose the selection in \mathcal{} ! ! ! <Alt-L> *ls_3_10_3* *Alt-L* This is a polymorphic insert-mode mapping which expands to one of the following --- 570,574 ---- ! <Alt-L> *ls_3_10_1* *Alt-L* This is a polymorphic insert-mode mapping which expands to one of the following *************** *** 594,601 **** If the character before the cursor is none of the above, then it will simply insert a \label{<++>}<++>. NOTE: By default, typing Alt-<key> in Vim takes focus to the menu bar if a menu with the hotkey <key> exists. If in your case, there are conflicts due to this behavior, you will need to set > ! set nowinaltkeys < in your $VIM/ftplugin/tex.vim in order to use these maps. --- 585,609 ---- If the character before the cursor is none of the above, then it will simply insert a \label{<++>}<++>. + + + <Alt-M> *ls_3_10_2* *Alt-M* + + This insert-mode mapping encloses the previous character in \mathbf{}. + + + <Alt-C> *ls_3_10_3* *Alt-C* + + In insert mode, this key is polymorphic as follows: + + + 1. If the previous character is a letter or number, then capitalize it and + enclose it in \mathcal{}. + + 2. otherwise insert \cite{}. + In visual mode, it will simply enclose the selection in \mathcal{} NOTE: By default, typing Alt-<key> in Vim takes focus to the menu bar if a menu with the hotkey <key> exists. If in your case, there are conflicts due to this behavior, you will need to set > ! set winaltkeys=no < in your $VIM/ftplugin/tex.vim in order to use these maps. *************** *** 604,609 **** -------------------- You can also customize the keys which trigger this functionality by ! remapping certain <Plug> mappings as described in ! |customizing-latex-suite-mappings|. --- 612,617 ---- -------------------- You can also customize the keys which trigger this functionality by ! remapping certain <Plug> mappings as described in Customizing Alt-key maps ! [|customize-alt-key-maps|]. *************** *** 643,651 **** *latex-packages* ! |ls_4_1| Custom Packages ! |ls_4_2| Supporting a package ! This functionality is avaiable via the Tex-Packages menu. When you first invoke Latex-Suite, it scans the --- 651,668 ---- *latex-packages* ! |ls_4_1| Inserting package commands ! |ls_4_2| Actions taken for supported packages ! |ls_4_3| Automatic Package detection ! |ls_4_4| Writing supporting for a package ! Latex-Suite has a lot of functionality written to ease working with packages. ! Packages here refers to files which you include into the LaTeX document using ! the \usepackage command. ! ! ! -------------------------------------------------------------------------------- ! Inserting package commands *ls_4_1* ! *inserting-packages* When you first invoke Latex-Suite, it scans the *************** *** 665,670 **** containing a single word will construct a \usepackage line from that word. ! Once a \usepackage line has been constructed in one of the above methods, if ! possible, the following sub-menus will be created --- 682,695 ---- containing a single word will construct a \usepackage line from that word. ! Once you have inserted a \usepackage line, for supported packages, you can use ! the Options and Commands menus described in the next section ! [|package-actions|]. ! ! -------------------------------------------------------------------------------- ! Actions taken for supported packages *ls_4_2* ! *package-actions* ! ! Once a \usepackage line has been constructed using one of the methods described ! in the previous section, if possible, the following sub-menus will be created *************** *** 672,677 **** TeX-Suite > Packages > <package> Commands ! where <package> is the package you just inserted. In addition to creating these sub-meuns, Latex-Suite will also scan the $VIM/ftplugin/latex-suite/dictionaries directory and if a dictionary file --- 697,710 ---- TeX-Suite > Packages > <package> Commands ! where <package> is the package you just inserted. You can use these menus to ! insert commands, environments and options which Latex-Suite recognizes as ! belonging to this package. + NOTE: While inserting an option, you need to position yourself in the + appropritate place in the document, most commonly inside the square braces + in the \usepackage[]{packname} command. Latex-Suite will not navigate to + that location. + + In addition to creating these sub-meuns, Latex-Suite will also scan the $VIM/ftplugin/latex-suite/dictionaries directory and if a dictionary file *************** *** 682,694 **** For example, the SIUnits package has a custom dictionary. *latex-package-scanning* - Whenever Latex-Suite begins editing a new LaTeX file, it scans it for - \usepackage{name} lines, and if a supported package is found, then it will - create sub-menus and add to the 'dict' setting as described above. - - If a master-file [|latex-master-file|] has been specified, then it will scan - that file instead of the current file. See the section Custom Packages - [|custom-packages|] to see which files Latex-Suite will scan in more detail. - In addition, the TeX-Suite > Packages menu also contains the following submenus --- 715,725 ---- For example, the SIUnits package has a custom dictionary. + If a package detected at startup is found by Latex-Suite in the current + directory or in a location specified by the g:Tex_TEXINPUTS [|Tex_TEXINPUTS|] + variable, Latex-Suite will scan the package for \newenvironment and newcommand + lines and also append any commands and environments found to the list of + commands and environments which you are prompted with when you press <F5> + [|ls-imap-f5|] or <F7> [|ls-imap-f7|] in insert mode. *latex-package-scanning* In addition, the TeX-Suite > Packages menu also contains the following submenus *************** *** 707,711 **** -------------------------------------------------------------------------------- ! Custom Packages *ls_4_1* *custom-packages* --- 738,759 ---- -------------------------------------------------------------------------------- ! Automatic Package detection *ls_4_3* ! *automatic-package-detection* ! |ls_4_3_1| Custom Packages ! ! Whenever Latex-Suite begins editing a new LaTeX file, it scans it for ! \usepackage{name} lines, and if a supported package is found, then it will ! create sub-menus and add to the 'dict' setting as described above. ! ! If a master-file [|latex-master-file|] has been specified, then it will scan ! that file instead of the current file. See the section Custom Packages ! [|custom-packages|] to see which files Latex-Suite will scan in more detail. ! ! For all the packages detected in this manner, Latex-Suite will take certain ! actions as described in the section package support. [|package-actions|]. ! ! ! ! Custom Packages *ls_4_3_1* *custom-packages* *************** *** 732,737 **** Example: > ! let g:Tex_TEXINPUTS = '~/texmf/mypackages/**;./**' ! Note that directories are delimited by ';'. NOTE: The present directory '.' is always searched. You need not incude that in --- 780,786 ---- Example: > ! let g:Tex_TEXINPUTS = '~/texmf/mypackages/**,./**' ! The ** indicates that all directories below the directory ~/texmf/mypackages and ! ./ are to be scanned for custom packages. NOTE: The present directory '.' is always searched. You need not incude that in *************** *** 741,748 **** -------------------------------------------------------------------------------- ! Supporting a package *ls_4_2* *supporting-packages* ! |ls_4_2_1| g:Tex_package_option_<package> ! |ls_4_2_2| g:Tex_package_<package> Supporting a package is easy and consists of writing a vim script with the same --- 790,797 ---- -------------------------------------------------------------------------------- ! Writing supporting for a package *ls_4_4* *supporting-packages* ! |ls_4_4_1| g:Tex_package_option_<package> ! |ls_4_4_2| g:Tex_package_<package> Supporting a package is easy and consists of writing a vim script with the same *************** *** 753,757 **** ! g:Tex_package_option_<package> *ls_4_2_1* This setting is a string containing a comma seperated list of options supported --- 802,806 ---- ! g:Tex_package_option_<package> *ls_4_4_1* This setting is a string containing a comma seperated list of options supported *************** *** 765,769 **** ! g:Tex_package_<package> *ls_4_2_2* > --- 814,818 ---- ! g:Tex_package_<package> *ls_4_4_2* > *************** *** 820,871 **** This module provides an easy way to insert references to labels and ! bibliographic entries. Suppose you want to refer to an equation which is ! labelled as "eqn:eq-1" using the \label{eqn:eq-1} command. Somewhere in the ! text, you write "\ref{" with the cursor after the {. Now if you press <F9>, ! Latex-suite will try to search through all the .tex files in the present ! directory for lines beginning with "\label{". It will provide you with a list of ! all such matches in two small windows. > ! +========================================================+ ! | I want to insert a reference to equation 1. Therefore | ! | I will write \ref{ | ! | | ! | | ! | | ! | | ! | | ! +--------------------------------------------------------+ ! +file1.tex + ! +========================================================+ ! |file1.tex|100| \label{eqn:eq-1} | ! |file1.tex|110| \label{eqn:eq-2} | ! |file2.tex|178| \label{tab:table1} | ! +--------------------------------------------------------+ ! +[Error List] + ! +========================================================+ ! |\begin{equation} | ! | e^{j*pi} + 1 = 0 \label{eqn:eq-1} | ! |\end{equation} | ! |And there was some text after this. I dont remember | ! +--------------------------------------------------------+ ! +file1.tex [Preview] + ! +========================================================+ ! The first window (shown as "[Error List]" above) is a |cwindow| containing a ! list of matches and you will be left in it. The window beneath it is a ! |preview-window| showing the context of the match. When you move up and down in ! the "[Error List]" window, the preview window will be scrolled to keep in sync ! with the label. Pressing the "J" and "K" keys in the "[Error List]" window ! scrolls the preview window enabling you to see more context if you desire. After ! positioning yourself on a label which you want to insert, press CR>. This will ! automatically close all the new windows, take you back to the file being edited ! and insert the chosen label in place. Pressing "q" in the "[Error List]" window ! closes all windows without inserting anything. ! As can be seen above, the matches include everything which begins with \label. ! If you have the habit of prefixing all equation labels with "eqn:" or something ! similar, then you can restrict the matches to only equations by first typing ! "\ref{eqn:" and then pressing <F9>. This only brings up matches starting with ! "\label{eqn:" thus allowing you to skip table and figure labels. The same mechanism also works with citations by pressing <F9> after typing --- 869,944 ---- This module provides an easy way to insert references to labels and ! bibliographic entries. ! ! Consider the situation where you are editing a file with two equations labelled ! eqn:euler and eqn:einstein. Now you want to insert a reference to one of these ! equations. To do this, you type the \ref{eqn:} command and with the cursor ! placed after eqn:, press <F9>. This will bring up two new windows beneath the ! main window you were working in as shown in the figure below. > ! ! 7 ! 8 These are a couple of equations: ! 9 +-- 4 lines: eqnarray (eqn:euler) : e^{j\pi} + 1 &=& 0--------------- ! 13 +-- 4 lines: equation (eqn:einstein) : E = m c^2--------------------- ! 17 ! 18 These are a couple of figures: ! 19 +-- 7 lines: figure (fig:monkeys) : Monkeys can Type------------------- ! 26 +-- 7 lines: figure (fig:shakespeare) : Shakespeare could not type----- ! 33 ! 34 This is a reference to \ref{eqn:}<++> ! 35 ! 36 ! 37 \end{document} ! 38 ! ~ ! ~ ! ~ ! ~ ! ~ ! ~ ! ~ ! newfile.tex 34,32 Bot ! newfile.tex|11| \label{eqn:euler} ! newfile.tex|15| \label{eqn:einstein} ! ~ ! ~ ! ~ ! [Error List] 1,1 All ! 7 ! 8 These are a couple of equations: ! 9 \begin{eqnarray} ! 10 e^{j\pi} + 1 &=& 0 ! 11 \label{eqn:euler} ! 12 \end{eqnarray} ! 13 \begin{equation} ! 14 E = m c^2 ! 15 \label{eqn:einstein} ! 16 \end{equation} ! newfile.tex [Preview] 11,3 21% ! ! The first window (shown as [ErrorList] above) is a |cwindow| containing a list ! of possible matches for the reference. The cursor will be located in the first ! line of this window. The bottom window is a preview-window showing the context ! of the \label. Moving around in the [ErrorList] window automatically scrolls the ! preview window so as to always keep showing the context of the \label being ! viewed in the [ErrorList] window. You can also press J and K in the [ErrorList] ! window to scroll the preview window up and down. ! To insert one of the labels, simply position the cursor in the correct line in ! the [ErrorList] window and press <enter>. This will immediately close the two ! newly opened windows, get back to the correct location in the original file ! being edited and insert the label into the \ref command. ! ! If you notice carefully in the example above, the [ErrorList] window only showed ! the matches for the equations and did not list any of the figure labels. This is ! because we pressed <F9> after \ref{eqn: instead of simply after \ref{. This ! caused Latex-Suite to search only for those labels which started with the string ! eqn:. If you had pressed <F9> after a \ref{, you would have been shown matches ! from all labels, not just those starting with eqn:. ! ! Thus prefixing all your labels with eqn:, fig:, tab: etc. depending on what you ! are labelling will lead to an easier time completing references. The same mechanism also works with citations by pressing <F9> after typing *************** *** 1387,1423 **** Latex-Suite Maps *ls_9_1* *latex-suite-maps* ! |ls_9_1_1| <Plug>IMAP_JumpForward ! |ls_9_1_2| <Plug>IMAP_JumpBack ! |ls_9_1_3| <Plug>IMAP_DeleteAndJumpForward ! Normal usage of Latex-Suite will typically involve using a fairly large number ! of mappings. It should be noted that many of the mappings can be changed to a ! different set of characters according to your particular needs. - <Plug>IMAP_JumpForward *ls_9_1_1* - *Plug_IMAPJumpForward* ! Default Key assigned : <Ctrl-J> - This map takes you to the location of the next place-holder [|place-holders|]. ! <Plug>IMAP_JumpBack *ls_9_1_2* ! *Plug_IMAPJumpBack* ! Default Key assigned : NONE ! This map takes you to the previous place-holder [|place-holders|]. ! <Plug>IMAP_DeleteAndJumpForward *ls_9_1_3* ! *Plug_IMAP_DeleteAndJumpForward* ! Default Key assigned : NONE ! This map deletes the presently selected place-holder irrespective of whether the ! present placeholder is empty or not and ignoring the value of place-holder ! settings like g:Imap_DeleteEmptyPlaceHolders [|Imap_DeleteEmptyPlaceHolders|] ! and g:Imap_StickyPlaceHolders [|Imap_StickyPlaceHolders|] -------------------------------------------------------------------------------- --- 1460,1540 ---- Latex-Suite Maps *ls_9_1* *latex-suite-maps* ! |ls_9_1_1| IMAP mappings ! |ls_9_1_2| Alt-Key mappings ! *remapping-latex-suite-keys* ! Most of the mappings used in Latex-Suite can be mapped to a different key ! combination to suit your particular needs. An example best explains the ! procedure for doing this. Suppose you want to remap the <C-j> key which ! Latex-Suite (actually imaps.vim) uses to jump to the next placeholder. To do ! this, you first need to find out which <Plug> mapping <C-j> is derived from. You ! will need to look at the relevant section of this manual to do this. For ! example, the section IMAP mappings [|customize-imap-maps|] has the information ! that the <C-j> key is derived from <Plug>IMAP_JumpForward. Therefore to remap ! the <C-j> key to say <C-space>, you will need to put a statement like the ! following in your ~/.vimrc. > ! imap <C-space> <Plug>IMAP_JumpForward ! NOTE: To change the IMAP mappings which affect jumping between placeholders, the ! map statement above has to be placed in your ~/.vimrc. For other mappings ! you can place the map statement in your $VIM/ftplugin/tex.vim file. ! ! The reason for this is that the <C-j> maps are created in ! plugin/imaps.vim, which is sourced as soon as Vim starts before sourcing ! any ftplugin files. ! ! + IMAP mappings *ls_9_1_1* + *customize-imap-maps* ! These mappings are utlilized for jumping between placeholders as described here ! [|place-holders|]. See the parent section [|latex-suite-maps|] to find out how ! to use this information to change the default maps. ! *Plug_IMAP_JumpForward* ! *Plug_IMAP_JumpBack* ! *Plug_IMAP_DeleteAndJumpForward* ! *Plug_IMAP_DeleteAndJumBack* ! Plug map Default Key~ ! <Plug>IMAP_JumpForward <C-j> ! <Plug>IMAP_JumpBack (none) ! <Plug>IMAP_DeleteAndJumpForward (none) ! <Plug>IMAP_DeleteAndJumpBack (none) ! <Plug>IMAP_JumpForward takes you to the location of the next place-holder ! [|place-holders|]. + <Plug>IMAP_JumpBack takes you to the previous place-holder [|place-holders|]. ! <Plug>IMAP_DeleteAndJumpForward deletes the presently selected place-holder and ! jumps to the next place-holder irrespective of whether the present placeholder ! is empty or not and ignoring the value of place-holder settings like ! g:Imap_DeleteEmptyPlaceHolders [|Imap_DeleteEmptyPlaceHolders|] and ! g:Imap_StickyPlaceHolders [|Imap_StickyPlaceHolders|] ! <Plug>IMAP_DeleteAndJumpBack deletes the presently selected place-holder and ! jumps to the previous place-holder irrespective of whether the present ! placeholder is empty or not and ignoring the value of place-holder settings like ! g:Imap_DeleteEmptyPlaceHolders [|Imap_DeleteEmptyPlaceHolders|] and ! g:Imap_StickyPlaceHolders [|Imap_StickyPlaceHolders|] ! ! Alt-Key mappings *ls_9_1_2* ! *customize-alt-key-maps* ! ! These mappings are are described in the section Alt key macros ! [|bracketing-macros|]. See the parent section [|remapping-latex-suite-keys|] to ! see how to use the following information to remap keys. ! ! *Plug_Tex_MathBF* ! *Plug_Tex_MathCal* ! *Plug_Tex_LeftRight* ! Plug Mapping Default Key~ ! <Plug>Tex_MathBF <Alt-B> ! <Plug>Tex_MathCal <Alt-C> ! <Plug>Tex_LeftRight <Alt-L> -------------------------------------------------------------------------------- Index: latex-suite.xml =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/doc/latex-suite.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** latex-suite.xml 18 Jun 2003 18:54:30 -0000 1.3 --- latex-suite.xml 20 Jun 2003 06:02:39 -0000 1.4 *************** *** 176,180 **** might also include common fields associated with it. </para> ! <section> <title>Method 1</title> <para> --- 176,180 ---- might also include common fields associated with it. </para> ! <section id="ls-imap-f5"> <title>Method 1</title> <para> *************** *** 183,188 **** with a list of environments you might want to insert. You can either choose one from the list or type in a new environment ! name. This list can be customized. See the 'Macros' section ! of the |texrc| file for details. </para> </section> --- 183,195 ---- with a list of environments you might want to insert. You can either choose one from the list or type in a new environment ! name. This list can be customized via the <link ! linkend="Tex_PromptedEnvironments"><literal>g:Tex_PromptedEnvironments</literal></link> ! setting. ! </para> ! <para> ! In addition to the <literal>Tex_PromptedEnvironments</literal> ! variable, &ls; also lists envionments found in custom packages as ! described in the section <link linkend="package-actions">Package ! actions.</link> </para> </section> *************** *** 201,206 **** <literal><S-F4></literal>can also be optionally mapped to some common environments which you insert most often. The ! environments mapped to each key can also be customized. See ! the |texrc| file for details. </para> </section> --- 208,213 ---- <literal><S-F4></literal>can also be optionally mapped to some common environments which you insert most often. The ! environments mapped to each key can also be customized via the <link ! linkend="Tex_HotKeyMappings">g:Tex_HotKeyMappings</link> setting. </para> </section> *************** *** 593,622 **** stuff very easy. The following maps are provided: </para> - <section id="Alt-M"> - <title><literal><Alt-M></literal></title> - <para> - This insert-mode mapping encloses the previous character in - <literal>\mathbf{}</literal>. - </para> - </section> - <section id="Alt-C"> - <title><literal><Alt-C></literal></title> - <para> - In insert mode, this key is polymorphic as follows: - </para> - <orderedlist> - <listitem> - If the previous character is a letter or number, then capitalize it and - enclose it in <literal>\mathcal{}</literal>. - </listitem> - <listitem> - otherwise insert <literal>\cite{}</literal>. - </listitem> - </orderedlist> - <para> - In visual mode, it will simply enclose the selection in - <literal>\mathcal{}</literal> - </para> - </section> <section id="Alt-L"> <title><literal><Alt-L></literal></title> --- 600,603 ---- *************** *** 650,653 **** --- 631,660 ---- </para> </section> + <section id="Alt-M"> + <title><literal><Alt-M></literal></title> + <para> + This insert-mode mapping encloses the previous character in + <literal>\mathbf{}</literal>. + </para> + </section> + <section id="Alt-C"> + <title><literal><Alt-C></literal></title> + <para> + In insert mode, this key is polymorphic as follows: + </para> + <orderedlist> + <listitem> + If the previous character is a letter or number, then capitalize it and + enclose it in <literal>\mathcal{}</literal>. + </listitem> + <listitem> + otherwise insert <literal>\cite{}</literal>. + </listitem> + </orderedlist> + <para> + In visual mode, it will simply enclose the selection in + <literal>\mathcal{}</literal> + </para> + </section> <note> <para> *************** *** 656,660 **** <literal><key></literal> exists. If in your case, there are conflicts due to this behavior, you will need to set ! <programlisting>set nowinaltkeys</programlisting> in your <literal>$VIM/ftplugin/tex.vim</literal> in order to use these maps. --- 663,667 ---- <literal><key></literal> exists. If in your case, there are conflicts due to this behavior, you will need to set ! <programlisting>set winaltkeys=no</programlisting> in your <literal>$VIM/ftplugin/tex.vim</literal> in order to use these maps. *************** *** 663,669 **** <note> <title>Customizing the maps</title> ! <para>You can also customize the keys which trigger this functionality by ! remapping certain <literal><Plug></literal> mappings as described ! in |customizing-latex-suite-mappings|.</para> </note> </section> --- 670,678 ---- <note> <title>Customizing the maps</title> ! <para>You can also customize the keys which trigger this functionality ! by remapping certain <literal><Plug></literal> mappings as ! described in <link linkend="customize-alt-key-maps">Customizing ! Alt-key maps</link>. ! </para> </note> </section> *************** *** 736,769 **** <title>Package Handling</title> <para> ! This functionality is avaiable via the Tex-Packages menu. ! </para> ! <para> ! When you first invoke &ls;, it scans the ! <literal>$VIM/ftplugin/latex-suite/packages</literal> directory for ! package script files and creates a menu from all the files found there. ! This menu is created under <literal>TeX-Suite > Packages > ! Supported</literal>. This menu contains a list of packages "supported" ! by &ls;. When you choose one of the packages from this menu (for example ! the <literal>amsmath</literal> package), then a line of ! the form ! <programlisting>\usepackage[&ph;]{amsmath}&ph;</programlisting> ! will be inserted into the current file. ! </para> ! <para> ! The <literal>\usepackage</literal> line can also be inserted in an easy ! manner in the current file by pressing <literal><F5></literal> ! while in the preamble of the current document. This will set up a prompt ! from the supported packages and ask you to choose from one of them. If ! you do not find the package you want to insert in the list, you can type ! in a package-name and it will use that. Pressing ! <literal><F5></literal> in the preamble on a line containing a ! single word will construct a <literal>\usepackage</literal> line from ! that word. ! </para> ! <para> ! Once a <literal>\usepackage</literal> line has been constructed in one ! of the above methods, if possible, the following sub-menus will be ! created </para> <simplelist> <member><literal>TeX-Suite > Packages > <package> Options</literal></member> --- 745,790 ---- <title>Package Handling</title> <para> ! &ls; has a lot of functionality written to ease working with packages. ! Packages here refers to files which you include into the &latex; ! document using the <literal>\usepackage</literal> command. </para> + <section id="inserting-packages"> + <title>Inserting package commands</title> + <para> + When you first invoke &ls;, it scans the + <literal>$VIM/ftplugin/latex-suite/packages</literal> directory for + package script files and creates a menu from all the files found there. + This menu is created under <literal>TeX-Suite > Packages > + Supported</literal>. This menu contains a list of packages "supported" + by &ls;. When you choose one of the packages from this menu (for example + the <literal>amsmath</literal> package), then a line of + the form + <programlisting>\usepackage[&ph;]{amsmath}&ph;</programlisting> + will be inserted into the current file. + </para> + <para> + The <literal>\usepackage</literal> line can also be inserted in an easy + manner in the current file by pressing <literal><F5></literal> + while in the preamble of the current document. This will set up a prompt + from the supported packages and ask you to choose from one of them. If + you do not find the package you want to insert in the list, you can type + in a package-name and it will use that. Pressing + <literal><F5></literal> in the preamble on a line containing a + single word will construct a <literal>\usepackage</literal> line from + that word. + </para> + <para> + Once you have inserted a <literal>\usepackage</literal> line, for + supported packages, you can use the Options and Commands menus + described in the <link linkend="package-actions">next section</link>. + </para> + </section> + <section id="package-actions"> + <title>Actions taken for supported packages</title> + <para> + Once a <literal>\usepackage</literal> line has been constructed using + one of the methods described in the previous section, if possible, the + following sub-menus will be created + </para> <simplelist> <member><literal>TeX-Suite > Packages > <package> Options</literal></member> *************** *** 772,803 **** <para> where <literal><package></literal> is the package you just ! inserted. </para> ! <para> ! In addition to creating these sub-meuns, &ls; will also scan the ! <literal>$VIM/ftplugin/latex-suite/dictionaries</literal> directory and ! if a dictionary file corresponding to the package file is found, then ! it will add the file to the <literal>'dict'</literal> setting in &vim; ! so you can use the <literal><C-X><C-K></literal> command to ! complete words from that file. ! </para> ! <para> ! For example, the <literal>SIUnits</literal> package has a custom ! dictionary. ! </para> <anchor id="latex-package-scanning" /> <para> - Whenever &ls; begins editing a new &latex; file, it scans it for - <literal>\usepackage{name}</literal> lines, and if a supported package - is found, then it will create sub-menus and add to the - <literal>'dict'</literal> setting as described above. - </para> - <para> - If a <link linkend="latex-master-file">master-file</link> has been specified, - then it will scan that file instead of the current file. See the section - <link linkend="custom-packages">Custom Packages</link> - to see which files &ls; will scan in more detail. - </para> - <para> In addition, the <literal>TeX-Suite > Packages</literal> menu also contains the following submenus --- 793,834 ---- <para> where <literal><package></literal> is the package you just ! inserted. You can use these menus to insert commands, environments and ! options which &ls; recognizes as belonging to this package. </para> ! <note> ! <para> ! While inserting an option, you need to position yourself in the ! appropritate place in the document, most commonly inside the square ! braces in the <literal>\usepackage[]{packname}</literal> command. &ls; ! will not navigate to that location. ! </para> ! </note> ! <para> ! In addition to creating these sub-meuns, &ls; will also scan the ! <literal>$VIM/ftplugin/latex-suite/dictionaries</literal> directory and ! if a dictionary file corresponding to the package file is found, then ! it will add the file to the <literal>'dict'</literal> setting in &vim; ! so you can use the <literal><C-X><C-K></literal> command to ! complete words from that file. ! </para> ! <para> ! For example, the <literal>SIUnits</literal> package has a custom ! dictionary. ! </para> ! <para> ! If a package detected at startup is found by &ls; in the current ! directory or in a location specified by the <link ! linkend="Tex_TEXINPUTS">g:Tex_TEXINPUTS</link> variable, &ls; will ! scan the package for <literal>\newenvironment</literal> and ! <literal>newcommand</literal> lines and also append any commands and ! environments found to the list of commands and environments which you ! are prompted with when you press <link ! linkend="ls-imap-f5"><literal><F5></literal></link> or <link ! linkend="ls-imap-f7"><literal><F7></literal></link> in insert ! mode. ! </para> ! </section> <anchor id="latex-package-scanning" /> <para> In addition, the <literal>TeX-Suite > Packages</literal> menu also contains the following submenus *************** *** 816,866 **** are created. </formalpara> ! <section id="custom-packages"> ! <title>Custom Packages</title> ! <para> ! Often times, the preamble can become too long, and some people prefer ! to put most of their personalization in a custom package and include ! that using a <literal>\usepackage</literal> line. &ls; tries to search ! such customs package for other <literal>\usepackage</literal> lines, so ! that supported packages included in this indirect manner can also be ! used to create sub-menus, extend the <literal>'dict'</literal> setting ! etc. The most obvious place to place such custom packages is in the ! same directory as the edited file. In addition, &latex; also supports ! placing custom packages in places pointed to by the ! <literal>$TEXINPUTS</literal> environment variable. ! </para> ! <para> ! If you use the <literal>$TEXINPUTS</literal> variable in &latex;, and ! you wish &ls; to search these custom packages for ! <literal>\usepackage</literal> lines, then you need to initialize the ! <link linkend="Tex_TEXINPUTS"><literal>g:Tex_TEXINPUTS</literal></link> ! variable. ! </para> <para> ! The <literal>g:Tex_TEXINPUTS</literal> variable needs to be set in the ! same format which &vim; uses for the <literal>'path'</literal> setting. ! This format is explained in detail if you do ! <programlisting>:help file-searching</programlisting> ! from within &vim;. </para> <para> ! Therefore the value of <literal>g:Tex_TEXINPUTS</literal> will most ! probably be different from <literal>$TEXINPUTS</literal> which your ! native &latex; distribution uses. </para> <para> ! Example: ! <programlisting>let g:Tex_TEXINPUTS = '~/texmf/mypackages/**;./**'</programlisting> ! Note that directories are delimited by <literal>';'</literal>. </para> ! <note> <para> ! The present directory <literal>'.'</literal> is always searched. You ! need not incude that in <literal>g:Tex_TEXINPUTS</literal>. </para> ! </note> </section> <section id="supporting-packages"> ! <title>Supporting a package</title> <para> Supporting a package is easy and consists of writing a vim script with --- 847,919 ---- are created. </formalpara> ! <section id="automatic-package-detection"> ! <title>Automatic Package detection</title> <para> ! Whenever &ls; begins editing a new &latex; file, it scans it for ! <literal>\usepackage{name}</literal> lines, and if a supported package ! is found, then it will create sub-menus and add to the ! <literal>'dict'</literal> setting as described above. </para> <para> ! If a <link linkend="latex-master-file">master-file</link> has been specified, ! then it will scan that file instead of the current file. See the section ! <link linkend="custom-packages">Custom Packages</link> ! to see which files &ls; will scan in more detail. </para> <para> ! For all the packages detected in this manner, &ls; will take certain ! actions as described in the section <link ! linkend="package-actions">package support.</link>. </para> ! <section id="custom-packages"> ! <title>Custom Packages</title> <para> ! Often times, the preamble can become too long, and some people prefer ! to put most of their personalization in a custom package and include ! that using a <literal>\usepackage</literal> line. &ls; tries to search ! such customs package for other <literal>\usepackage</literal> lines, so ! that supported packages included in this indirect manner can also be ! used to create sub-menus, extend the <literal>'dict'</literal> setting ! etc. The most obvious place to place such custom packages is in the ! same directory as the edited file. In addition, &latex; also supports ! placing custom packages in places pointed to by the ! <literal>$TEXINPUTS</literal> environment variable. </para> ! <para> ! If you use the <literal>$TEXINPUTS</literal> variable in &latex;, and ! you wish &ls; to search these custom packages for ! <literal>\usepackage</literal> lines, then you need to initialize the ! <link linkend="Tex_TEXINPUTS"><literal>g:Tex_TEXINPUTS</literal></link> ! variable. ! </para> ! <para> ! The <literal>g:Tex_TEXINPUTS</literal> variable needs to be set in the ! same format which &vim; uses for the <literal>'path'</literal> setting. ! This format is explained in detail if you do ! <programlisting>:help file-searching</programlisting> ! from within &vim;. ! </para> ! <para> ! Therefore the value of <literal>g:Tex_TEXINPUTS</literal> will most ! probably be different from <literal>$TEXINPUTS</literal> which your ! native &latex; distribution uses. ! </para> ! <para> ! Example: ! <programlisting>let g:Tex_TEXINPUTS = '~/texmf/mypackages/**,./**'</programlisting> ! The <literal>**</literal> indicates that all directories below the ! directory <literal>~/texmf/mypackages</literal> and ! <literal>./</literal> are to be scanned for custom packages. ! </para> ! <note> ! <para> ! The present directory <literal>'.'</literal> is always searched. You ! need not incude that in <literal>g:Tex_TEXINPUTS</literal>. ! </para> ! </note> ! </section> </section> <section id="supporting-packages"> ! <title>Writing supporting for a package</title> <para> Supporting a package is easy and consists of writing a vim script with *************** *** 888,892 **** <section> <title><literal>g:Tex_package_<package></literal></title> ! <programlisting> g:TeX_package_<package> = "pre:Command,pre:Command1" More detailed example is in latex-suite/packages/exmpl file (slightly --- 941,945 ---- <section> <title><literal>g:Tex_package_<package></literal></title> ! <programlisting> g:TeX_package_<package> = "pre:Command,pre:Command1" More detailed example is in latex-suite/packages/exmpl file (slightly *************** *** 937,989 **** <para> This module provides an easy way to insert references to labels and ! bibliographic entries. Suppose you want to refer to an equation which is ! labelled as "eqn:eq-1" using the \label{eqn:eq-1} command. Somewhere in the ! text, you write "\ref{" with the cursor after the {. Now if you press <F9>, ! Latex-suite will try to search through all the .tex files in the present ! directory for lines beginning with "\label{". It will provide you with a list ! of all such matches in two small windows. </para> - <programlisting>+========================================================+ - | I want to insert a reference to equation 1. Therefore | - | I will write \ref{ | - | | - | | - | | - | | - | | - +--------------------------------------------------------+ - +file1.tex + - +========================================================+ - |file1.tex|100| \label{eqn:eq-1} | - |file1.tex|110| \label{eqn:eq-2} | - |file2.tex|178| \label{tab:table1} | - +--------------------------------------------------------+ - +[Error List] + - +========================================================+ - |\begin{equation} | - | e^{j*pi} + 1 = 0 \label{eqn:eq-1} | - |\end{equation} | - |And there was some text after this. I dont remember | - +--------------------------------------------------------+ - +file1.tex [Preview] + - +========================================================+</programlisting> <para> ! The first window (shown as "[Error List]" above) is a |cwindow| containing a ! list of matches and you will be left in it. The window beneath it is a ! |preview-window| showing the context of the match. When you move up and down ! in the "[Error List]" window, the preview window will be scrolled to keep in ! sync with the label. Pressing the "J" and "K" keys in the "[Error List]" ! window scrolls the preview window enabling you to see more context if you ! desire. After positioning yourself on a label which you want to insert, press ! CR>. This will automatically close all the new windows, take you back to the ! file being edited and insert the chosen label in place. Pressing "q" in the ! "[Error List]" window closes all windows without inserting anything. </para> <para> ! As can be seen above, the matches include everything which begins with \label. ! If you have the habit of prefixing all equation labels with "eqn:" or ! something similar, then you can restrict the matches to only equations by ! first typing "\ref{eqn:" and then pressing <F9>. This only brings up matches ! starting with "\label{eqn:" thus allowing you to skip table and figure labels. </para> <para> --- 990,1082 ---- <para> This module provides an easy way to insert references to labels and ! bibliographic entries. </para> <para> ! Consider the situation where you are editing a file with two equations ! labelled <literal>eqn:euler</literal> and <literal>eqn:einstein</literal>. ! Now you want to insert a reference to one of these equations. To do this, ! you type the <literal>\ref{eqn:}</literal> command and with the cursor ! placed after <literal>eqn:</literal>, press <literal><F9></literal>. ! This will bring up two new windows beneath the main window you were working ! in as shown in the figure below. </para> + <programlisting> + 7 + 8 These are a couple of equations: + 9 +-- 4 lines: eqnarray (eqn:euler) : e^{j\pi} + 1 &=& 0--------------- + 13 +-- 4 lines: equation (eqn:einstein) : E = m c^2--------------------- + 17 + 18 These are a couple of figures: + 19 +-- 7 lines: figure (fig:monkeys) : Monkeys can Type------------------- + 26 +-- 7 lines: figure (fig:shakespeare) : Shakespeare could not type----- + 33 + 34 This is a reference to \ref{eqn:}&ph; + 35 + 36 + 37 \end{document} + 38 + ~ + ~ + ~ + ~ + ~ + ~ + ~ + newfile.tex 34,32 Bot + newfile.tex|11| \label{eqn:euler} + newfile.tex|15| \label{eqn:einstein} + ~ + ~ + ~ + [Error List] 1,1 All + 7 + 8 These are a couple of equations: + 9 \begin{eqnarray} + 10 e^{j\pi} + 1 &=& 0 + 11 \label{eqn:euler} + 12 \end{eqnarray} + 13 \begin{equation} + 14 E = m c^2 + 15 \label{eqn:einstein} + 16 \end{equation} + newfile.tex [Preview] 11,3 21% + </programlisting> <para> ! The first window (shown as <literal>[Error List]</literal> above) is a ! <literal>|cwindow|</literal> containing a list of possible matches for the ! reference. The cursor will be located in the first line of this window. The ! bottom window is a <literal>preview-window</literal> showing the context of ! the <literal>\label</literal>. Moving around in the ! <literal>[Error List]</literal> window automatically scrolls the ! preview window so as to always keep showing the context of the ! <literal>\label</literal> being viewed in the ! <literal>[Error List]</literal> window. You can also press ! <literal>J</literal> and <literal>K</literal> in the ! <literal>[ErrorList]</literal> window to scroll the preview window up and ! down. ! </para> ! <para> ! To insert one of the labels, simply position the cursor in the correct line ! in the <literal>[Error List]</literal> window and press ! <literal><enter></literal>. This will immediately close the two newly ! opened windows, get back to the correct location in the original file being ! edited and insert the label into the <literal>\ref</literal> command. ! </para> ! <para> ! If you notice carefully in the example above, the ! <literal>[Error List]</literal> window only showed the matches for the ! equations and did not list any of the figure labels. This is because we ! pressed <literal><F9></literal> after <literal>\ref{eqn:</literal> ! instead of simply after <literal>\ref{</literal>. This caused &ls; to ! search only for those labels which started with the string ! <literal>eqn:</literal>. If you had pressed ! <literal><F9></literal> after a <literal>\ref{</literal>, you would ! have been shown matches from <emphasis>all</emphasis> labels, not just ! those starting with <literal>eqn:</literal>. ! </para> ! <para> ! Thus prefixing all your labels with <literal>eqn:</literal>, ! <literal>fig:</literal>, <literal>tab:</literal> etc. depending on what you ! are labelling will lead to an easier time completing references. </para> <para> *************** *** 1627,1662 **** <section id="latex-suite-maps"> <title>&ls; Maps</title> ! Normal usage of &ls; will typically involve using a fairly large number ! of mappings. It should be noted that many of the mappings can be changed ! to a different set of characters according to your particular needs. ! <section id="Plug_IMAPJumpForward"> ! <title><Plug>IMAP_JumpForward</title> <para> ! Default Key assigned : <literal><Ctrl-J></literal> </para> <para> ! This map takes you to the location of the next <link ! linkend="place-holders">place-holder</link>. </para> ! </section> ! <section id="Plug_IMAPJumpBack"> ! <title><Plug>IMAP_JumpBack</title> <para> ! Default Key assigned : NONE </para> <para> ! This map takes you to the previous <link linkend="place-holders">place-holder</link>. </para> - </section> - <section id="Plug_IMAP_DeleteAndJumpForward"> - <title><Plug>IMAP_DeleteAndJumpForward</title> <para> ! Default Key assigned : NONE </para> <para> ! This map deletes the presently selected place-holder irrespective of ! whether the present placeholder is empty or not and ignoring the value ! of place-holder settings like <link linkend="Imap_DeleteEmptyPlaceHolders"><literal>g:Imap_DeleteEmptyPlaceHolders</literal></link> and <link --- 1720,1818 ---- <section id="latex-suite-maps"> <title>&ls; Maps</title> ! <anchor id="remapping-latex-suite-keys" /> ! <para> ! Most of the mappings used in &ls; can be mapped to a different key ! combination to suit your particular needs. An example best explains the ! procedure for doing this. Suppose you want to remap the ! <literal><C-j></literal> key which &ls; (actually imaps.vim) uses ! to jump to the next placeholder. To do this, you first need to find out ! which <literal><Plug></literal> mapping ! <literal><C-j></literal> is derived from. You will need to look ! at the relevant section of this manual to do this. For example, the ! section <link linkend="customize-imap-maps">IMAP mappings</link> has ! the information that the <literal><C-j></literal> key is derived ! from <literal><Plug>IMAP_JumpForward</literal>. Therefore to ! remap the <literal><C-j></literal> key to say ! <literal><C-space></literal>, you will need to put a ! statement like the following in your <literal>~/.vimrc</literal>. ! <programlisting>imap <C-space> <Plug>IMAP_JumpForward</programlisting> ! </para> ! <note> <para> ! To change the <literal>IMAP</literal> mappings which affect jumping ! between placeholders, the <literal>map</literal> statement above has ! to be placed in your <literal>~/.vimrc</literal>. For other mappings ! you can place the <literal>map</literal> statement in your ! <literal>$VIM/ftplugin/tex.vim</literal> file. </para> <para> ! The reason for this is that the <literal><C-j></literal> maps ! are created in <literal>plugin/imaps.vim</literal>, which is sourced ! as soon as &vim; starts before sourcing any ftplugin files. </para> ! </note> ! <section id="customize-imap-maps"> ! <title>IMAP mappings</title> <para> ! These mappings are utlilized for jumping between placeholders as ! described <link linkend="place-holders">here</link>. See the <link ! linkend="latex-suite-maps">parent section</link> to find out how to ! use this information to change the default maps. </para> + <anchor id="Plug_IMAP_JumpForward" /> + <anchor id="Plug_IMAP_JumpBack" /> + <anchor id="Plug_IMAP_DeleteAndJumpForward" /> + <anchor id="Plug_IMAP_DeleteAndJumBack" /> + <informaltable frame="all"> + <tgroup cols="2"> + <thead> + <row> + <entry>Plug map</entry> + <entry>Default Key</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal><Plug>IMAP_JumpForward</literal></entry> + <entry><literal><C-j></literal></entry> + </row> + <row> + <entry><literal><Plug>IMAP_JumpBack</literal></entry> + <entry>(none)</entry> + </row> + <row> + <entry><literal><Plug>IMAP_DeleteAndJumpForward</literal></entry> + <entry>(none)</entry> + </row> + <row> + <entry><literal><Plug>IMAP_DeleteAndJumpBack</literal></entry> + <entry>(none)</entry> + </row> + </tbody> + </tgroup> + </informaltable> <para> ! <literal><Plug>IMAP_JumpForward</literal> takes you to the ! location of the next <link linkend="place-holders">place-holder</link>. </para> <para> ! <literal><Plug>IMAP_JumpBack</literal> takes you to the previous ! <link linkend="place-holders">place-holder</link>. </para> <para> ! <literal><Plug>IMAP_DeleteAndJumpForward</literal> deletes the ! presently selected place-holder and jumps to the next place-holder ! irrespective of whether the present placeholder is empty or not and ! ignoring the value of place-holder settings like <link ! linkend="Imap_DeleteEmptyPlaceHolders"><literal>g:Imap_DeleteEmptyPlaceHolders</literal></link> ! and <link ! linkend="Imap_StickyPlaceHolders"><literal>g:Imap_StickyPlaceHolders</literal></link> ! </para> ! <para> ! <literal><Plug>IMAP_DeleteAndJumpBack</literal> deletes the ! presently selected place-holder and jumps to the previous place-holder ! irrespective of whether the present placeholder is empty or not and ! ignoring the value of place-holder settings like <link linkend="Imap_DeleteEmptyPlaceHolders"><literal>g:Imap_DeleteEmptyPlaceHolders</literal></link> and <link *************** *** 1664,1667 **** --- 1820,1859 ---- </para> </section> + <section id="customize-alt-key-maps"> + <title>Alt-Key mappings</title> + <para> + These mappings are are described in the section <link + linkend="bracketing-macros">Alt key macros</link>. See <link + linkend="remapping-latex-suite-keys">the parent section</link> to see + how to use the following information to remap keys. + </para> + <anchor id="Plug_Tex_MathBF" /> + <anchor id="Plug_Tex_MathCal" /> + <anchor id="Plug_Tex_LeftRight" /> + <informaltable frame="all"> + <tgroup cols="2"> + <thead> + <row> + <entry>Plug Mapping</entry> + <entry>Default Key</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal><Plug>Tex_MathBF</literal></entry> + <entry><literal><Alt-B></literal></entry> + </row> + <row> + <entry><literal><Plug>Tex_MathCal</literal></entry> + <entry><literal><Alt-C></literal></entry> + </row> + <row> + <entry><literal><Plug>Tex_LeftRight</literal></entry> + <entry><literal><Alt-L></literal></entry> + </row> + </tbody> + </tgroup>... [truncated message content] |