[Vim-latex-cvs] vimfiles/doc latex-suite.xml,1.18,1.19 latex-suite.txt,1.41,1.42
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2003-09-12 10:25:25
|
Update of /cvsroot/vim-latex/vimfiles/doc In directory sc8-pr-cvs1:/tmp/cvs-serv13755 Modified Files: latex-suite.xml latex-suite.txt Log Message: - documentation about the new Tex_Env_name settings to customize environment expansions. Index: latex-suite.xml =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/doc/latex-suite.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** latex-suite.xml 3 Sep 2003 20:51:24 -0000 1.18 --- latex-suite.xml 12 Sep 2003 10:25:20 -0000 1.19 *************** *** 221,225 **** &latex; environments. <section id="insert-mode-environment-mappings"> ! <title>Insert-mode Mappings</title> <para> These mappings insert LaTeX "environments" such as: --- 221,225 ---- &latex; environments. <section id="insert-mode-environment-mappings"> ! <title id="insert-mode-environment-mappings.title">Insert-mode Mappings</title> <para> These mappings insert LaTeX "environments" such as: *************** *** 232,235 **** --- 232,239 ---- might also include common fields associated with it. </para> + <para> + See <link linkend="Tex_Env_name">this section</link> for details on + how to customize the way &ls; will expand various environments. + </para> <section id="ls-imap-f5"> <title>Method 1</title> *************** *** 998,1001 **** --- 1002,1006 ---- indented just as if you had typed it in normally. </para> + <anchor id="IMAP_PutTextWithMovement" /> <para> You can also set up a &ls; style mapping which calls a custom function *************** *** 3054,3057 **** --- 3059,3112 ---- key unmapped. </para> + </section> + <section id="Tex_Env_name"> + <title>Tex_Env_name</title> + <para> + If you wish to wish to expand certain environments differently from + the way &ls; does it, you can define custom expansions using global + variables of the form <literal>Tex_Env_{name}</literal> where + <literal>name</literal> corresponds to the environment. This + over-riding setting only works for Methods 1-3 described in the + section <link linkend="insert-mode-environment-mappings" + endterm="insert-mode-environment-mappings.title"></link>. + In the future, it will work with the fourth method too. + </para> + <para> + For example, if you press <literal><F5></literal> after typing + <literal>theorem</literal>, &ls; will by default expand it to + <programlisting>\begin{theorem} + \label{&ph;}&ph; + \end{theorem}&ph;</programlisting> + However, if you wish change this to + <programlisting>\begin{theorem} + &ph; + \end{theorem}&ph;</programlisting> + then define the following variable + <programlisting>let g:Tex_Env_theorem = "\\begin{theorem}\<CR>&ph;\<CR>\\end{theorem}"</programlisting> + </para> + <para> + Notice how special characters such as carriage return are specified + using the <literal>"\<key>"</literal> notation. Also use double + quotes if you wish to enter such special keys. Also backslashes have + to be doubled. + </para> + <para> + You could even use strings returned by functions as the expansion by + using the <link + linkend="IMAP_PutTextWithMovement">IMAP_PutTextWithMovement()</link> + function. + </para> + <para> + If the name of the environment contains special characters (for + example, the <literal>eqnarray*</literal> environment), then use the + following form: + <programlisting>let g:Tex_Env_{'eqnarray*'} = + \ "\\begin{eqnarray*}\<CR>&ph; &=& &ph;\<CR>\\end{eqnarray*}&ph;"</programlisting> + This will make pressing <literal><F5></literal> after + <literal>eqnarray*</literal> expand to + <programlisting>\begin{eqnarray*} + &ph; &=& &ph; + \end{eqnarray*}&ph;</programlisting> + </para> </section> </section> Index: latex-suite.txt =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/doc/latex-suite.txt,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** latex-suite.txt 3 Sep 2003 20:51:24 -0000 1.41 --- latex-suite.txt 12 Sep 2003 10:25:20 -0000 1.42 *************** *** 1,2852 **** ! Latex-Suite Reference ! *latex-suite.txt* ! Srinath Avadhanula <srinath AT fastmail DOT fm> ! Mikolaj Machowski <mikmach AT wp DOT pl> ! ! ! ! Abstract ! ======== ! Latex-Suite attempts to provide a comprehensive set of tools to view, edit and [...5721 lines suppressed...] ! ================================================================================ ! About this file ! ! This file was created automatically from its XML variant using db2vim. db2vim is ! a python script which understands a very limited subset of the Docbook XML 4.2 ! DTD and outputs a plain text file in vim help format. ! ! db2vim can be obtained via anonymous CVS from sourceforge.net. Use ! ! cvs -d:pserver:ano...@cv...:/cvsroot/vim-latex co db2vim ! ! Or you can visit the web-interface to sourceforge CVS at: ! http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vim-latex/db2vim/ ! ! The following modelines should nicely fold up this help manual. ! ! vim:ft=help:fdm=expr:nowrap ! vim:foldexpr=getline(v\:lnum-1)=~'-\\{80}'?'>2'\:getline(v\:lnum-1)=~'=\\{80}'?'>1'\:getline(v\:lnum)=~'=\\{80}'?'0'\:getline(v\:lnum)=~'-\\{80}'?'1'\:'=' ! vim:foldtext=substitute(v\:folddashes.substitute(getline(v\:foldstart),'\\s*\\*.*',"",""),'^--','\ \ \ \ \ \ ','') ! ================================================================================ |