summaryrefslogtreecommitdiff
path: root/src/vim-latex/doc
diff options
context:
space:
mode:
authorDavid Kaufmann <astra@fsinf.at>2011-11-14 02:04:57 +0100
committerDavid Kaufmann <astra@fsinf.at>2011-11-14 02:05:03 +0100
commitd14e32945633316b352efec22a1ab4ffd00cb618 (patch)
tree353b04d57ab9134d1f546440395d75754a69542f /src/vim-latex/doc
parenta76ddbccedbd9873342629d07fdb0cd8ba536cc0 (diff)
downloadconfig-d14e32945633316b352efec22a1ab4ffd00cb618.tar.gz
moved sources to src
Diffstat (limited to 'src/vim-latex/doc')
-rw-r--r--src/vim-latex/doc/Makefile62
-rw-r--r--src/vim-latex/doc/Makefile.in29
-rw-r--r--src/vim-latex/doc/README110
-rw-r--r--src/vim-latex/doc/README.new17
-rw-r--r--src/vim-latex/doc/catalog.xml12
-rwxr-xr-xsrc/vim-latex/doc/db2vim/db2vim761
-rw-r--r--src/vim-latex/doc/db2vim/domutils.py25
-rw-r--r--src/vim-latex/doc/db2vim/textutils.py224
-rw-r--r--src/vim-latex/doc/imaps.txt116
-rw-r--r--src/vim-latex/doc/latex-suite-chunk.xsl52
-rw-r--r--src/vim-latex/doc/latex-suite-common.xsl62
-rw-r--r--src/vim-latex/doc/latex-suite-quickstart.css182
-rw-r--r--src/vim-latex/doc/latex-suite-quickstart.txt448
-rw-r--r--src/vim-latex/doc/latex-suite-quickstart.xml471
-rw-r--r--src/vim-latex/doc/latex-suite.css182
-rw-r--r--src/vim-latex/doc/latex-suite.txt3460
-rw-r--r--src/vim-latex/doc/latex-suite.xml4665
-rw-r--r--src/vim-latex/doc/latex-suite.xsl22
-rw-r--r--src/vim-latex/doc/latexhelp.txt2430
19 files changed, 13330 insertions, 0 deletions
diff --git a/src/vim-latex/doc/Makefile b/src/vim-latex/doc/Makefile
new file mode 100644
index 0000000..7e05e67
--- /dev/null
+++ b/src/vim-latex/doc/Makefile
@@ -0,0 +1,62 @@
+projects = latex-suite latex-suite-quickstart
+htmlfiles = $(addsuffix .html, $(projects))
+txtfiles = $(addsuffix .txt, $(projects))
+cssfiles = $(addsuffix .css, $(projects))
+all = $(projects) $(htmlfiles) $(cssfiles) $(txtfiles)
+
+
+xsltproc=xsltproc
+db2vim=db2vim/db2vim
+
+# Use for debugging:
+#xsltproc=strace -e trace=file xsltproc --nonet --load-trace
+# export XML_DEBUG_CATALOG = 1
+
+# Specify local catalog to not use system installed dtd/xsl files
+# export XML_CATALOG_FILES=catalog.xml
+
+# User configuration of this Makefile goes into Makefile.local
+# E.g. to use a catalog file installed by the user.
+-include Makefile.local
+
+# Default Target is to create all documentation files
+all: $(all)
+
+# create multi page html (chunk xhtml)
+$(projects): %: %.xml latex-suite-chunk.xsl latex-suite-common.xsl
+ $(xsltproc) -o $@/ latex-suite-chunk.xsl $<
+
+# create single html files
+$(htmlfiles): %.html: %.xml latex-suite.xsl latex-suite-common.xsl
+ $(xsltproc) -o $@ latex-suite.xsl $<
+
+# create vim flat files
+latex-suite.txt: %.txt: %.xml
+ $(db2vim) --prefix=ls_ $< > $@
+
+latex-suite-quickstart.txt: %.txt: %.xml
+ $(db2vim) --prefix=lq_ $< > $@
+
+# validate xml
+validate:
+ for file in *.xml; do \
+ xmllint --valid --noout $$file; \
+ done
+
+clean:
+ rm -f $(htmlfiles)
+ rm -rf $(projects)
+
+# $(txtfiles) are currently in revision control, therefore they are not
+# removed in the clean target
+mr-proper: clean
+ rm -f $(txtfiles)
+
+upload: $(all)
+# vim-latex-web is configured in ~/.ssh/config
+#Host vim-latex-web
+# Hostname web.sourceforge.net
+# User SOURCEFORGE_USERNAME,vim-latex
+ rsync --perms --chmod g+w,o-w --delete -lrtvz $(all) vim-latex-web:/home/groups/v/vi/vim-latex/htdocs/documentation/
+
+# vim:nowrap
diff --git a/src/vim-latex/doc/Makefile.in b/src/vim-latex/doc/Makefile.in
new file mode 100644
index 0000000..6d5e614
--- /dev/null
+++ b/src/vim-latex/doc/Makefile.in
@@ -0,0 +1,29 @@
+# Manual files
+ls-flat:
+ java com.icl.saxon.StyleSheet latex-suite.xml latex-suite.xsl > latex-suite.html
+
+ls-chunk:
+ ( \
+ cd latex-suite && \
+ java com.icl.saxon.StyleSheet ../latex-suite.xml ../latex-suite-chunk.xsl \
+ )
+
+ls-txt:
+ db2vim --prefix=ls_ latex-suite.xml > latex-suite.txt
+
+# Quickstart files
+lsq-flat:
+ java com.icl.saxon.StyleSheet latex-suite-quickstart.xml latex-suite.xsl > latex-suite-quickstart.html
+
+lsq-chunk:
+ ( \
+ cd latex-suite-quickstart && \
+ java com.icl.saxon.StyleSheet ../latex-suite-quickstart.xml ../latex-suite-chunk.xsl \
+ )
+
+lsq-txt:
+ db2vim --prefix=lq_ latex-suite-quickstart.xml > latex-suite-quickstart.txt
+
+cvsci:
+ cvs ci latex-suite.xml latex-suite.txt
+# vim:nowrap
diff --git a/src/vim-latex/doc/README b/src/vim-latex/doc/README
new file mode 100644
index 0000000..7ba1d7c
--- /dev/null
+++ b/src/vim-latex/doc/README
@@ -0,0 +1,110 @@
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+This file is outdated, please look at README.new for updated information
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+====================================
+Generating Latex-Suite documentation
+====================================
+
+In order to generate the html files and vim-help files from the XML source,
+you will need to do follow the following steps. The steps are complex only
+for a windows machine. On most (modern) linux machines, the various
+utilities are already installed and all you need to do is some
+soft-linking.
+
+1. Download the Docbook XSL stylesheets from
+
+ http://sourceforge.net/project/showfiles.php?group_id=21935
+
+ I downloaded docbook-xsl-1.61.2.tar.gz. Unpack this archive under the
+ present directory. You should see something like::
+
+ ./docbook-xsl-1.XX.X/
+
+ Rename this to::
+
+ ./docbook-xsl
+
+ Alternatively, if you are on a modern unix system, the docbook-xsl
+ stylesheets should already be installed on your system. Soft-linking
+ will thus work more simply. On a typical Debian box, just do::
+
+ ln -s /usr/share/sgml/docbook/stylesheet/xsl/nwalsh docbook-xsl
+
+ The docbook-xsl stylesheets can be installed via the docbook-xsl
+ package on Debian. (Just use apt-get).
+
+2. Download the Docbook DTD from
+
+ http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip
+
+ Extract this into a subdirectory ``docbook-xml/`` under the present
+ directory. You should see something like::
+
+ ./docbook-xml/
+
+ with a file ``docbookx.dtd`` located there.
+
+ **CAUTION**:
+ The archive above does not create a top level directory but
+ unzips directly into the present directory. Therefore, make sure to
+ run the unzip by first creating ``./docbook-xml/``, copying the zip
+ file there and then unzipping.
+
+ Alternatively, if you are on a modern unix system, the docbook-xml DTD
+ will already be installed. Softlinking will thus work. On a typical
+ Debian box, you could do::
+
+ ln -s /usr/share/sgml/docbook/dtd/xml/4.2 docbook-xml
+
+ On debian, you need the docbook-xml package on Debian. (Just use
+ apt-get).
+
+3. Download saxon.jar from
+
+ http://vim-latex.sourceforge.net/documentation/saxon.jar
+
+ This is the bare .jar file without any of the other things which saxon
+ comes with. Add the ``saxon.jar`` file to your ``$CLASSPATH`` setting.
+
+ **NOTE:**
+ The ``$CLASSPATH`` setting should point to the ``saxon.jar`` file,
+ not the directory where it resides.
+
+ Again, on a unix system, you might not need to download this. For debian
+ systems, the saxon.jar file resides in::
+
+ /usr/share/java/saxon.jar
+
+ You can point your ``$CLASSPATH`` to that file.
+
+4. Download db2vim (created by me :)) via anonymous cvs::
+
+ mkdir -p ~/bin/db2vim
+ cvs -d :pserver:anonymous@cvs.vim-latex.sf.net:/cvsroot/vim-latex \
+ co -d ~/bin/db2vim db2vim
+
+ Add the ``~/bin/db2vim/`` directory thus created to your ``$PATH``
+ setting.
+
+5. Create a new directory ``latex-suite/`` under the present directory for
+ the chunked html files to reside in. You should see something like::
+
+ ./latex-suite/
+
+6. Copy ``Makefile.in`` to ``Makefile`` or ``makefile`` and perform any
+ necessary customizations. For example, if you are using Activestate
+ python under windows, you will need to change the ls-txt: target as::
+
+ python e:/srinath/testing/db2vim/db2vim latex-suite.xml > latex-suite.txt
+
+
+Thats it! You are ready. Now you can do::
+
+ make ls-chunk
+ make ls-flat
+ make ls-txt
+
+to create the 3 formats.
+
+Author: Srinath Avadhanula <srinath@fastmail.fm>
diff --git a/src/vim-latex/doc/README.new b/src/vim-latex/doc/README.new
new file mode 100644
index 0000000..678091c
--- /dev/null
+++ b/src/vim-latex/doc/README.new
@@ -0,0 +1,17 @@
+====================================
+Generating Latex-Suite documentation
+====================================
+
+You need:
+- xsltproc
+- Docbook XSL stylesheets (*)
+- Docbook DTD (*)
+
+(*) These files will be downloaded every time you create the documentation,
+unless you install or download them.
+
+On Fedora, you can run as root:
+
+yum install libxslt docbook-style-xsl docbook-dtds
+
+to install the required packages.
diff --git a/src/vim-latex/doc/catalog.xml b/src/vim-latex/doc/catalog.xml
new file mode 100644
index 0000000..cfc984c
--- /dev/null
+++ b/src/vim-latex/doc/catalog.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE catalog
+ PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
+ "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+ <rewriteSystem
+ systemIdStartString="http://docbook.sourceforge.net/release/xsl/current"
+ rewritePrefix="docbook-xsl/"/>
+ <rewriteURI
+ uriStartString="http://docbook.sourceforge.net/release/xsl/current/"
+ rewritePrefix="docbook-xsl/" />
+</catalog>
diff --git a/src/vim-latex/doc/db2vim/db2vim b/src/vim-latex/doc/db2vim/db2vim
new file mode 100755
index 0000000..d1e6902
--- /dev/null
+++ b/src/vim-latex/doc/db2vim/db2vim
@@ -0,0 +1,761 @@
+#!/usr/bin/python
+r"""
+db2vim [options] file.xml
+
+SHORT OPTIONS
+
+-d Prints some debugging information on stderr.
+
+-s If given, the db2vim operates in a 'stict' conversion mode, i.e, any
+ element which does not have a handler defined for them it be
+ completeley ignored including all its children. Otherwise, db2vim will
+ recurse into an unknown tag and process any of its children it
+ recognizes. Since db2vim always recognizes text nodes, not using this
+ option has the effect that all text will be printed out, even if
+ somewhat incorrectly.
+
+LONG OPTIONS
+
+--prefix=<prefix>
+ This is a string like "ls_" which will be prepended to the section
+ numbers. Default to 'ls_' if unsupplied.
+"""
+
+
+import xml.dom.minidom
+import getopt
+import string
+import re
+import sys
+
+# Okay. so I import *. Shoot me.
+from textutils import *
+from domutils import *
+
+# define a bunch of constants for formatting.
+TEXT_WIDTH = 80
+BLOCK_QUOTE = 4
+COL_SPACE = 2
+
+# a bunch of globals used in creating the Table of contents.
+#
+# TOC_HASH['section 1.1 label'] = 'ls_1_1'
+#
+# LEVEL_HASH['section 1.1 label'] = 1
+# (top level article has level 0)
+#
+# TITLE_HASH['section 1.1 label'] = 'Title of section 1.1'
+#
+# FILENAME = the name of the file being processed with the last extension
+# changed to .txt
+#
+# TOC_PREFIX = 'ls_' (the prefix used to create the section labels).
+TOC_HASH = {}
+LEVEL_HASH = {}
+TITLE_HASH = {}
+FILENAME = ''
+TOC_PREFIX = ''
+
+ANCHOR_HASH = {}
+URL_HASH = {}
+
+# STDERR for printing debugging info.
+DEBUG = 0
+STDERR = sys.stderr
+STRICT = 0
+NUM_ANCHORS = {0:1}
+
+################################################################################
+# Miscellaneous utility functions
+################################################################################
+# encodeTo52(num) {{{
+def encodeTo52(num):
+ ret = ''
+
+ if num < 26:
+ return unichr(ord('a') + num)
+ elif num < 52:
+ return unichr(ord('A') + num - 26)
+ else:
+ return encodeTo52(int(num/52)) + encodeTo52(num % 52)
+# }}}
+# makeTocHash(rootElement) {{{
+def makeTocHash(rootElement, width, prefix='', level=0):
+ retText = ""
+ sectionsTable = []
+ lastLabelUsed = 0
+
+ for section in rootElement.getChildrenByTagName('section'):
+ title = section.getChildrenByTagName('title')[0]
+ titleText = handleElement(title, width)
+ lastLabelUsed += 1
+ thisLabel = TOC_PREFIX + prefix + str(lastLabelUsed)
+
+ sectionid = section.getAttribute('id')
+ if not sectionid:
+ section.setAttribute('id', thisLabel)
+ sectionid = thisLabel
+
+ NUM_ANCHORS[0] += 1
+ ANCHOR_HASH[sectionid] = TOC_PREFIX + 'a_' + encodeTo52(NUM_ANCHORS[0] + 52)
+
+ TOC_HASH[sectionid] = thisLabel
+ LEVEL_HASH[sectionid] = level
+ TITLE_HASH[sectionid] = titleText
+
+ if section.getChildrenByTagName('section'):
+ childText = makeTocHash(section, width - 5,
+ prefix = prefix+str(lastLabelUsed) + '_',
+ level = level + 1)
+
+# }}}
+# makeAnchorHash(rootElement) {{{
+def makeAnchorHash(rootElement):
+ anchors = rootElement.getElementsByTagName('anchor') + rootElement.getElementsByTagName('note')
+ numAnchors = 0
+ for anchor in anchors:
+ if not anchor.getAttribute('id'):
+ continue
+
+ NUM_ANCHORS[0] += 1
+ if ANCHOR_HASH.has_key(anchor.getAttribute('id')) or TOC_HASH.has_key(anchor.getAttribute('id')):
+ print >> STDERR, "Warning: anchor [%s] multiply defined" % anchor.getAttribute('id')
+
+ ANCHOR_HASH[anchor.getAttribute('id')] = TOC_PREFIX + 'a_' + encodeTo52(NUM_ANCHORS[0] + 52)
+
+# }}}
+# makeURLHash(rootElement) {{{
+def makeURLHash(rootElement):
+ urls = rootElement.getElementsByTagName('ulink')
+ numURLs = 0
+ for url in urls:
+ if not url.getAttribute('url') or URL_HASH.has_key(url.getAttribute('url')):
+ continue
+ numURLs += 1
+ URL_HASH[url.getAttribute('url')] = TOC_PREFIX + 'u_' + str(numURLs)
+
+# }}}
+# makeTOC(node, width, prefix='', level=0, maxleve=1): {{{
+def makeTOC(node, width, maxlevel=1):
+ retText = ""
+ sectionsTable = []
+ lastLabelUsed = 0
+
+ for section in node.getChildrenByTagName('section'):
+
+ sectionid = section.getAttribute('id')
+ thisLabel = TOC_HASH.get(sectionid, '')
+ titleText = TITLE_HASH.get(sectionid, '')
+ level = LEVEL_HASH.get(sectionid, 10)
+
+ if level <= maxlevel:
+ retText += '|' + thisLabel + '| ' + titleText + '\n'
+
+ if level < maxlevel and section.getChildrenByTagName('section'):
+ childText = makeTOC(section, width-5)
+ retText += VertCatString(" ", 4, childText) + '\n'
+
+ retText = re.sub(r'\s+$', r'\n', retText)
+
+ return retText
+# }}}
+
+################################################################################
+# Generalized function for handling dom elements.
+################################################################################
+# IsInlineTag(self): {{{
+def IsInlineTag(self):
+ if self.nodeType == self.TEXT_NODE:
+ return 1
+ elif inlineTags.get(self.tagName, 0):
+ return 1
+ else:
+ return 0
+
+
+# }}}
+# getChildrenByTagName(self, name): {{{
+# Description: extension to the xml.dom.minidom.Element class.
+# returns all direct descendants of this Element.
+def getChildrenByTagName(self, name):
+ nodeList = []
+
+ child = self.firstChild
+ while not child is None:
+ if child.nodeType == child.ELEMENT_NODE and child.nodeName == name:
+ nodeList.append(child)
+
+ child = child.nextSibling
+
+ return nodeList
+
+xml.dom.minidom.Element.getChildrenByTagName = getChildrenByTagName
+
+
+# }}}
+# handleElement(rootElement, width=TEXT_WIDTH): {{{
+def handleElement(rootElement, width=TEXT_WIDTH):
+ """
+ handleElement(rootElement, width=TEXT_WIDTH):
+
+ Generalized function to handle an Element node in a DOM tree.
+ """
+
+ retText = ""
+ child = rootElement.firstChild
+ while not child is None:
+
+ printerr('node type = %d' % child.nodeType)
+ if child.nodeType == child.ELEMENT_NODE:
+ printerr('processing [%s]' % child.tagName)
+
+ isinline = IsInlineTag(child)
+
+ # if the child is an Element and if a handler exists, then call it.
+ if not isinline \
+ and child.nodeType == child.ELEMENT_NODE \
+ and handlerMaps.has_key(child.tagName):
+ # offset the child text by the current indentation value
+ printerr('making recursive call to known child.')
+ retText += handlerMaps[child.tagName](child, width)
+ child = child.nextSibling
+
+ elif not isinline \
+ and child.nodeType == child.PROCESSING_INSTRUCTION_NODE \
+ and child.target == 'vimhelp':
+
+ if handlerMaps.has_key(child.data):
+ retText += handlerMaps[child.data](child, width)
+
+ child = child.nextSibling
+
+ # if its a text node or an inline element node, collect consecutive
+ # text nodes into a single paragraph and indent it.
+ elif isinline:
+
+ text = ""
+ while not child is None and IsInlineTag(child):
+ if child.nodeType == child.TEXT_NODE:
+ text += child.data
+ elif child.nodeType == child.ELEMENT_NODE:
+ if handlerMaps.has_key(child.tagName):
+ text += handlerMaps[child.tagName](child, width)
+ else:
+ text += GetText(child.childNodes)
+ child = child.nextSibling
+
+ retText += IndentParagraphs(text, width)
+
+ # If we cannot understand _anything_ about the element, then just
+ # handle its children hoping we have something to gather from
+ # there.
+ elif not STRICT:
+ printerr('making recursive call for unkown child')
+ retText += handleElement(child, width)
+ child = child.nextSibling
+
+ else:
+ child = child.nextSibling
+
+ return retText
+
+# }}}
+
+################################################################################
+# Functions for handling various xml tags
+################################################################################
+# handleArticleInfo(articleinfo, width): {{{
+def handleArticleInfo(articleinfo, width):
+
+ makeTocHash(articleinfo.parentNode, width)
+ makeAnchorHash(articleinfo.parentNode)
+ makeURLHash(articleinfo.parentNode)
+
+ title = articleinfo.getChildrenByTagName('title')
+ if title is None:
+ print("Article should have a title!")
+ sys.exit(1)
+
+ name = GetText(title[0].childNodes)
+ authors = articleinfo.getChildrenByTagName('author')
+
+ authorText = ''
+ for author in authors:
+ firstname = ''
+ surname = ''
+ if author.getElementsByTagName('firstname'):
+ firstname = GetTextFromElementNode(author, 'firstname')[0]
+ if author.getChildrenByTagName('surname'):
+ surname = GetTextFromElementNode(author, 'surname')[0]
+ if author.getElementsByTagName('email'):
+ email = GetTextFromElementNode(author, 'email')[0]
+ authorText = authorText + firstname + ' ' + surname + ' <' + email + '>\n'
+
+
+ abstractText = ''
+ abstract = articleinfo.getChildrenByTagName('abstract')
+ if abstract is not None:
+ abstractText = '\n\n' + CenterText('Abstract\n========', width)
+ abstractText += handleElement(abstract[0], width) + '\n'
+
+
+ retText = CenterText(name + '\n*' + FILENAME + '*\n' + authorText, width)
+ retText += abstractText
+
+ toc = makeTOC(articleinfo.parentNode, width)
+
+ foldwarn = r'''
+================================================================================
+Viewing this file
+
+This file can be viewed with all the sections and subsections folded to ease
+navigation. By default, vim does not fold help documents. To create the folds,
+press za now. The folds are created via a foldexpr which can be seen in the
+last section of this file.
+
+See |usr_28.txt| for an introduction to folding and |fold-commands| for key
+sequences and commands to work with folds.
+'''
+
+ return retText + '\n' + RightJustify('*' + FILENAME + '-toc*', width) + '\n' + toc + foldwarn
+
+# }}}
+# handleOption(option, width): {{{
+def handleOption(option, width):
+ retText = ""
+ names = GetTextFromElementNode(option, "name")
+
+ for name in names:
+ retText += string.rjust("*"+name+"*", width) + "\n"
+
+ nameTexts = ""
+ maxNameLen = -1
+ for name in names:
+ maxNameLen = max(maxNameLen, len(name + " "))
+ nameTexts += name + " \n"
+
+ desc = option.getChildrenByTagName("desc")[0]
+ descText = handleElement(desc, width=width-maxNameLen)
+
+ retText += VertCatString(nameTexts + " ", None, descText)
+
+ return retText + "\n"
+
+# }}}
+# handleOptionDefault(default, width): {{{
+def handleOptionDefault(default, width):
+ type = string.join(GetTextFromElementNode(default, "type"), "\n")
+ extra = string.join(GetTextFromElementNode(default, "extra"), "\n")
+ return type + "\t(" + extra + ")"
+
+# }}}
+# handleTableRoot(root, width): {{{
+def handleTableRoot(root, width):
+ tgroup = root.getChildrenByTagName('tgroup')[0]
+ if tgroup is None:
+ return ''
+
+ rows = []
+ numHeadRows = 0
+ if tgroup.getChildrenByTagName('thead'):
+ thead = tgroup.getChildrenByTagName('thead')[0]
+ rows = thead.getChildrenByTagName('row')
+ numHeadRows = len(rows)
+
+ tbody = tgroup.getChildrenByTagName('tbody')[0]
+ rows += tbody.getChildrenByTagName('row')
+
+ widths, text = calculateColumnWidthsDoublePass(rows, width)
+
+ headText = text[0:numHeadRows]
+ bodyText = text[numHeadRows:]
+
+ headTable = FormatTable(headText, ROW_SPACE = 1, COL_SPACE =
+ COL_SPACE, justify = 0, widths = widths)
+ if headTable:
+ headTable = re.sub(r'\n|$', '\g<0>~', headTable)
+ bodyTable = FormatTable(bodyText, ROW_SPACE = 1, COL_SPACE =
+ COL_SPACE, justify = 0, widths = widths)
+
+ return headTable + '\n'+ re.sub(r'\n+$', '', bodyTable) + '\n\n'
+
+# calculateColumnWidths(rows, width): {{{
+def calculateColumnWidths(rows, alloc_widths):
+ widths = {}
+ text = []
+ for row in rows:
+ cols = row.getChildrenByTagName("entry")
+ if len(alloc_widths) == 1:
+ alloc_widths *= len(cols)
+
+ colwidths = []
+ rowtext = []
+ for col, width in zip(cols, alloc_widths):
+ coltext = handleElement(col, width)
+
+ rowtext.append(coltext)
+ # This is the 'width' of the current cell including the
+ # whitespace padding.
+ colwidths.append(max(map(len, coltext.split("\n"))) \
+ + COL_SPACE)
+
+ text.append(rowtext)
+
+ # update the widths of the columns by finding the maximum
+ # width of all cells in this column.
+ for i in range(len(colwidths)):
+ widths[i] = max(colwidths[i], widths.get(i, -1))
+
+ return widths, text
+
+# }}}
+# calculateColumnWidthsDoublePass(rows, width): {{{
+def calculateColumnWidthsDoublePass(rows, width):
+ maxwidths, text = calculateColumnWidths(rows, [width])
+ if reduce(lambda x, y: x+y, maxwidths.values()) <= width:
+ return maxwidths, text
+
+ # now find out how many columns exceed the maximum permitted width.
+ # nlarge: number of columns which are too wide.
+ # remainingWidth: width which these large columns can share.
+ nlarge = 0
+ remainingWidth = width
+ for colwidth in maxwidths.values():
+ if colwidth > width/len(maxwidths):
+ nlarge += 1
+ else:
+ remainingWidth += -colwidth
+
+ # newmaxwidth: width which each of the large columns is allowed.
+ newmaxwidth = remainingWidth/max(nlarge, 1)
+
+ newcolwidths = []
+ for colwidth in maxwidths.values():
+ newcolwidths += [min(colwidth, newmaxwidth)]
+
+ # make another run and this time ask each cell to restrict itself to
+ # newmaxwidth as calculated above.
+ newmaxwidth, newtext = calculateColumnWidths(rows, newcolwidths)
+
+ return newmaxwidth, newtext
+
+# }}}
+# }}}
+# handleCode(code, width): {{{
+def handleCode(code, width):
+ retText = GetText(code.childNodes)
+ return " &codebegin;\n" + VertCatString(" ", 4, retText) + "&codeend;"
+
+
+# }}}
+# handleList(list, width, marker=0): {{{
+def handleList(list, width, marker=0):
+ if list.tagName == 'simplelist':
+ child = 'member'
+ decoration = ''
+ elif list.tagName == 'orderedlist':
+ child = 'listitem'
+ else:
+ child = 'member'
+ decoration = '- '
+
+ retText = ""
+ items = list.getChildrenByTagName(child)
+ i = 1
+
+ for item in items:
+ if list.tagName == 'orderedlist':
+ decoration = str(i) + '. '
+ i = i + 1
+ itemText = handleElement(item, width - len(decoration))
+ itemText = VertCatString(decoration, None, itemText)
+
+ retText += '\n' + re.sub(r'\s+$', '', itemText) + "\n"
+
+ return retText
+
+# }}}
+# handleNote(note, width): {{{
+def handleNote(note, width):
+ title = None
+ if note.getChildrenByTagName('title'):
+ title = note.getChildrenByTagName('title')[0]
+ name = GetText(title.childNodes)
+ note.removeChild(title)
+
+ noteid = ''
+ if note.getAttribute('id'):
+ noteTagText = '*' + note.getAttribute('id') + '* '
+ noteTagText += '*' + ANCHOR_HASH[note.getAttribute('id')] + '*'
+ noteTagText = IndentParagraphs(noteTagText, width/2)
+ noteid = RightJustify(noteTagText, width) + '\n'
+
+ noteText = handleElement(note, width-len("NOTE: "))
+ if title is not None:
+ noteText = name + '\n' +('-' * len(name)) + '\n' + noteText
+
+ noteText = noteid + VertCatString("NOTE: ", None, noteText)
+
+ return noteText + "\n"
+
+# }}}
+# handleParagraph(paragraph, width): {{{
+def handleParagraph(paragraph, width):
+ partext = handleElement(paragraph, width)
+
+ partext = re.sub(r'\n+$', '', partext)
+ partext = re.sub(r'^\n+', '', partext)
+
+ return partext + "\n\n"
+
+# }}}
+# handleFormalParagraph(paragraph, width): {{{
+def handleFormalParagraph(formalparagraph, width):
+ title = None
+ if formalparagraph.getChildrenByTagName('title'):
+ title = formalparagraph.getChildrenByTagName('title')[0]
+ name = GetText(title.childNodes)
+ formalparagraph.removeChild(title)
+
+ partext = handleElement(formalparagraph, width)
+
+ partext = re.sub(r'\n+$', '', partext)
+ partext = re.sub(r'^\n+', '', partext)
+ if title is not None:
+ partext = name + '\n' + ('-' * len(name)) + '\n' + partext
+
+ return partext + "\n\n"
+
+# }}}
+# handleBlockQuote(block, width): {{{
+def handleBlockQuote(block, width):
+ text = handleElement(block, width - BLOCK_QUOTE)
+ text = VertCatString(" "*BLOCK_QUOTE, \
+ BLOCK_QUOTE, text)
+
+ return text + "\n"
+
+# }}}
+# handleLink(link, width): {{{
+def handleLink(link, width):
+ linkend = link.getAttribute('linkend')
+ if not ANCHOR_HASH.has_key(linkend):
+ print >> STDERR, "Warning: Link ID [%s] not found in TOC" % linkend
+ text = handleElement(link, width)
+ anchorpt = ANCHOR_HASH.get(linkend)
+ if not anchorpt:
+ anchorpt = ''
+
+ return text + ' [|' + anchorpt + '|]'
+
+# }}}
+# handleAnchor(anchor, width): {{{
+def handleAnchor(anchor, width):
+ anchorText = '*'+anchor.getAttribute('id')+'* '
+ anchorText += '*'+ANCHOR_HASH[anchor.getAttribute('id')]+'*'
+ return RightJustify(anchorText, width) \
+ + "\n"
+
+# }}}
+# handleSection(section, width): {{{
+def handleSection(section, width):
+ title = section.getChildrenByTagName('title')[0]
+ name = handleElement(title, width)
+
+ sectionid = section.getAttribute('id')
+ tagsformatted = ''
+ if TOC_HASH.has_key(sectionid):
+ tagsformatted = '*%s* ' % TOC_HASH[sectionid]
+
+ if ANCHOR_HASH.has_key(sectionid):
+ tagsformatted += '*%s* ' % ANCHOR_HASH[sectionid]
+
+ if sectionid and TOC_HASH.has_key(sectionid) and sectionid != TOC_HASH[sectionid]:
+ tagsformatted += '*%s*' % sectionid
+
+ # try to indent to a width of 20
+ tagsformatted = RightJustify(IndentParagraphs(tagsformatted, 30), 0)
+ tagswidth = TextWidth(tagsformatted)
+
+ # width(name) + nspaces + width(tags) = 80
+ if len(tagsformatted) > 2:
+ header = VertCatString(name, 80-tagswidth, tagsformatted)
+ else:
+ header = name
+
+ section.removeChild(title)
+ text = handleElement(section, width)
+
+ thislevel = LEVEL_HASH.get(sectionid, -1)
+ if thislevel == 0:
+ delim = '='
+ newlines = '\n\n'
+ elif thislevel == 1:
+ delim = '-'
+ newlines = '\n'
+ else:
+ delim = ''
+ newlines = '\n'
+
+ thisTOC = ''
+ if thislevel <= 1:
+ thisTOC = makeTOC(section, width, maxlevel=1)
+
+ return "\n" + (delim * TEXT_WIDTH) + \
+ "\n" + header + newlines + thisTOC + newlines + re.sub(r'\n+$', '', text) + "\n"
+
+# }}}
+# handleUlink(ulink, width) {{{
+def handleUlink(ulink, width):
+ url = ulink.getAttribute('url')
+ text = handleElement(ulink)
+ # URL_HASH is created at the very beginning
+ if url:
+ return text + ' |%s|' % URL_HASH[url]
+ else:
+ print >> STDERR, "Warning: url attribute empty for [%s]" % text
+ return text
+
+# }}}
+# handleIndexTerm(indexterm, width) {{{
+def handleIndexTerm(indexterm, width) :
+ return ''
+# }}}
+# handleEmphasis(emphasis, width) {{{
+def handleEmphasis(emphasis, width):
+ return '_' + GetText(emphasis.childNodes) + '_'
+# }}}
+
+################################################################################
+# A dictionary for mapping xml tags to functions.
+################################################################################
+# {{{
+handlerMaps = {
+ 'articleinfo': handleArticleInfo,
+ 'table': handleTableRoot,
+ 'informaltable': handleTableRoot,
+ 'code': handleCode,
+ 'programlisting': handleCode,
+ 'list': handleList,
+ 'simplelist': handleList,
+ 'orderedlist': handleList,
+ 'para': handleParagraph,
+ 'formalpara': handleFormalParagraph,
+ 'note': handleNote,
+ 'link': handleLink,
+ 'anchor': handleAnchor,
+ 'section': handleSection,
+ 'blockquote': handleBlockQuote,
+ 'ulink': handleUlink,
+ 'emphasis': handleEmphasis,
+ 'indexterm': handleIndexTerm
+}
+inlineTags = {'tag':1, 'literal':1, 'link':1,
+ 'ulink':1, 'citetitle':1, 'indexterm':1,
+ 'emphasis':1, 'filename':1 }
+# }}}
+
+# helper functions for usage() and printerr() {{{
+def usage():
+ print __doc__
+
+def printerr(statement):
+ if DEBUG:
+ print >> STDERR, statement
+
+# }}}
+# replaceComment(matchobj) {{{
+def replaceComment(matchobj):
+ initspace = matchobj.group(1)
+ firstsent = matchobj.group(2)
+ code = matchobj.group(3)
+
+ if len(initspace) > 0:
+ if initspace[0] == '<':
+ lastspace = initspace
+ else:
+ lastspace = '<' + initspace[:-1]
+ else:
+ lastspace = initspace
+
+ return '\n' + initspace + firstsent + ' >\n' + code + '\n' + lastspace
+
+# }}}
+# main function {{{
+if __name__ == "__main__":
+ option = {}
+ try:
+ opts, args = getopt.getopt(sys.argv[1:], 'ds', ['prefix=', 'help'])
+ for oa, ov in opts:
+ option[oa] = ov
+
+ except getopt.GetoptError:
+ print >> STDERR, "Usage error: db2vim --help for usage"
+ sys.exit(1)
+
+ if option.has_key('--help'):
+ usage();
+ sys.exit(0);
+
+ TOC_PREFIX = option.get('--prefix', 'ls_')
+ DEBUG = option.has_key('-d')
+
+ if len(args) != 1:
+ print >> STDERR, "Usage error: db2vim --help for usage"
+ sys.exit(1)
+
+ fileName = args[0]
+ FILENAME = re.sub(r'\.\w+$', r'.txt', fileName)
+
+ try:
+ fp = open(fileName)
+ except:
+ print "Error opening xml file"
+
+ dom = xml.dom.minidom.parse(fp)
+
+ modeline = r'''
+================================================================================
+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:anonymous@cvs.vim-latex.sf.net:/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*\\*.*',"",""),'^--','\ \ \ \ \ \ ','')
+================================================================================'''
+
+ STRICT = option.has_key('-s')
+
+ pattern = re.compile(r'\n([< ]*)([^\n]+)&codebegin;\n(.*?)&codeend;', re.DOTALL)
+
+ processedDoc = handleElement(dom.documentElement)
+ while re.search('&codebegin;', processedDoc):
+ processedDoc = re.sub(pattern, replaceComment, processedDoc)
+
+ urlsection = r"""
+================================================================================
+URLs used in this file
+
+"""
+ labels = zip(URL_HASH.values(), URL_HASH.keys())
+ labels.sort()
+ for label, url in labels:
+ urlsection += '*%s* : %s\n' % (label, url)
+
+ processedDoc = processedDoc + urlsection + modeline
+ print processedDoc.encode('iso-8859-1')
+
+# }}}
+# vim:et:sts=4:fdm=marker
diff --git a/src/vim-latex/doc/db2vim/domutils.py b/src/vim-latex/doc/db2vim/domutils.py
new file mode 100644
index 0000000..83351ff
--- /dev/null
+++ b/src/vim-latex/doc/db2vim/domutils.py
@@ -0,0 +1,25 @@
+def GetTextFromElementNode(element, childNamePattern):
+ children = element.getElementsByTagName(childNamePattern)
+ texts = []
+ for child in children:
+ texts.append(GetText(child.childNodes))
+
+ return texts
+
+def GetText(nodelist):
+ rc = ""
+ for node in nodelist:
+ if node.nodeType == node.TEXT_NODE:
+ rc = rc + node.data
+ return rc
+
+def GetTextFromElement(element):
+ text = ""
+ child = element.firstChild
+ while not child.nextSibling is None:
+ child = child.nextSibling
+ print child
+ if child.nodeType == child.TEXT_NODE:
+ text = text + child.data
+
+ return text
diff --git a/src/vim-latex/doc/db2vim/textutils.py b/src/vim-latex/doc/db2vim/textutils.py
new file mode 100644
index 0000000..4c97c52
--- /dev/null
+++ b/src/vim-latex/doc/db2vim/textutils.py
@@ -0,0 +1,224 @@
+#!/usr/bin/env python
+"""Contains functions to do word-wrapping on text paragraphs."""
+
+import string
+import re, random
+import operator
+
+# JustifyLine(line, width): {{{
+def JustifyLine(line, width):
+ """Stretch a line to width by filling in spaces at word gaps.
+
+ The gaps are picked randomly one-after-another, before it starts
+ over again.
+
+ Author: Christopher Arndt <chris.arndt@web.de
+ """
+ i = []
+ while 1:
+ # line not long enough already?
+ if len(' '.join(line)) < width:
+ if not i:
+ # index list is exhausted
+ # get list if indices excluding last word
+ i = range(max(1, len(line)-1))
+ # and shuffle it
+ random.shuffle(i)
+ # append space to a random word and remove its index
+ line[i.pop(0)] += ' '
+ else:
+ # line has reached specified width or wider
+ return ' '.join(line)
+
+
+# }}}
+# FillParagraphs(text, width=80, justify=0): {{{
+def FillParagraphs(text, width=80, justify=0):
+ """Split a text into paragraphs and wrap them to width linelength.
+
+ Optionally justify the paragraphs (i.e. stretch lines to fill width).
+
+ Inter-word space is reduced to one space character and paragraphs are
+ always separated by two newlines. Indention is currently also lost.
+
+ Author: Christopher Arndt <chris.arndt@web.de
+ """
+ # split taxt into paragraphs at occurences of two or more newlines
+ paragraphs = re.split(r'\n\n+', text)
+ for i in range(len(paragraphs)):
+ # split paragraphs into a list of words
+ words = paragraphs[i].strip().split()
+ line = []; new_par = []
+ while 1:
+ if words:
+ if len(' '.join(line + [words[0]])) > width and line:
+ # the line is already long enough -> add it to paragraph
+ if justify:
+ # stretch line to fill width
+ new_par.append(JustifyLine(line, width))
+ else:
+ new_par.append(' '.join(line))
+ line = []
+ else:
+ # append next word
+ line.append(words.pop(0))
+ else:
+ # last line in paragraph
+ new_par.append(' '.join(line))
+ line = []
+ break
+ # replace paragraph with formatted version
+ paragraphs[i] = '\n'.join(new_par)
+ # return paragraphs separated by two newlines
+ return '\n\n'.join(paragraphs)
+
+# }}}
+# IndentParagraphs(text, width=80, indent=0, justify=0): {{{
+def IndentParagraphs(text, width=80, indent=0, justify=0):
+ """Indent a paragraph, i.e:
+ . left (and optionally right) justify text to given width
+ . add an extra indent if desired.
+
+ This is nothing but a wrapper around FillParagraphs
+ """
+ retText = re.sub(r"^|\n", "\g<0>" + " "*indent, \
+ FillParagraphs(text, width, justify))
+ retText = re.sub(r"\n+$", '', retText)
+ return retText
+
+
+# }}}
+# OffsetText(text, indent): {{{
+def OffsetText(text, indent):
+ return re.sub("^|\n", "\g<0>" + " "*indent, text)
+
+
+# }}}
+# RightJustify(lines, width): {{{
+def RightJustify(lines, width):
+ if width == 0:
+ width = TextWidth(lines)
+ text = ""
+ for line in lines.split("\n"):
+ text += " "*(width - len(line)) + line + "\n"
+
+ text = re.sub('\n$', '', text)
+ return text
+
+# }}}
+# CenterText(lines, width): {{{
+def CenterText(lines, width):
+ text = ''
+ for line in lines.split("\n"):
+ text += " "*(width/2 - len(line)/2) + line + '\n'
+ return text
+
+# }}}
+# TextWidth(text): {{{
+def TextWidth(text):
+ """
+ TextWidth(text)
+
+ returns the 'width' of the text, i.e the length of the longest segment
+ in the text not containing new-lines.
+ """
+ return max(map(len, text.split('\n')))
+
+
+# }}}
+# FormatTable(tableText, ROW_SPACE=2, COL_SPACE = 3, \ {{{
+# COL_WIDTH=30, TABLE_WIDTH=80, justify=0):
+def FormatTable(tableText, ROW_SPACE=2, COL_SPACE = 3, \
+ COL_WIDTH=1000, justify=0, widths=None):
+ """
+ FormatTable(tableText [, ROW_SPACE=2, COL_SPACE = 3, COL_WIDTH=30, justify=0])
+ returns string
+
+ Given a 2 dimensional array of text as input, produces a plain text
+ formatted string which resembles the table output.
+
+ The optional arguments specify the inter row/column spacing and the
+ column width.
+ """
+
+ # first find out the max width of the columns
+ # maxwidths is a dictionary, but can be accessed exactly like an
+ # array because the keys are integers.
+
+ if widths is None:
+ widths = {}
+ for row in tableText:
+ cellwidths = map(TextWidth, row)
+ for i in range(len(cellwidths)):
+ # Using: dictionary.get(key, default)
+ widths[i] = max(cellwidths[i], widths.get(i, -1))
+
+ # Truncate each of the maximum lengths to the maximum allowed.
+ for i in range(0, len(widths)):
+ widths[i] = min(widths[i], COL_WIDTH)
+
+ if justify:
+ formattedTable = []
+
+ for row in tableText:
+ formattedTable.append(map(FillParagraphs, row, \
+ [COL_WIDTH]*len(row)))
+ else:
+ formattedTable = tableText
+
+ retTableText = ""
+ for row in formattedTable:
+ rowtext = row[0]
+ width = widths[0]
+ for i in range(1, len(row)):
+ rowtext = VertCatString(rowtext, width, " "*COL_SPACE)
+ rowtext = VertCatString(rowtext, width + COL_SPACE, row[i])
+
+ width = width + COL_SPACE + widths[i]
+
+ retTableText += string.join(rowtext, "")
+ retTableText += "\n"*ROW_SPACE
+
+ return re.sub(r"\n+$", "", retTableText)
+
+
+# }}}
+# VertCatString(string1, width1, string2): {{{
+def VertCatString(string1, width1, string2):
+ """
+ VertCatString(string1, width1=None, string2)
+ returns string
+
+ Concatenates string1 and string2 vertically. The lines are assumed to
+ be "\n" seperated.
+
+ width1 is the width of the string1 column (It is calculated if left out).
+ (Width refers to the maximum length of each line of a string)
+
+ NOTE: if width1 is specified < actual width, then bad things happen.
+ """
+ lines1 = string1.split("\n")
+ lines2 = string2.split("\n")
+
+ if width1 is None:
+ width1 = -1
+ for line in lines1:
+ width1 = max(width1, len(line))
+
+ retlines = []
+ for i in range(0, max(len(lines1), len(lines2))):
+ if i >= len(lines1):
+ lines1.append(" "*width1)
+
+ lines1[i] = lines1[i] + " "*(width1 - len(lines1[i]))
+
+ if i >= len(lines2):
+ lines2.append("")
+
+ retlines.append(lines1[i] + lines2[i])
+
+ return string.join(retlines, "\n")
+
+# }}}
+
+# vim:et:sts=4:fdm=marker
diff --git a/src/vim-latex/doc/imaps.txt b/src/vim-latex/doc/imaps.txt
new file mode 100644
index 0000000..087b3db
--- /dev/null
+++ b/src/vim-latex/doc/imaps.txt
@@ -0,0 +1,116 @@
+ IMAP -- A fluid replacement for :imap
+ *imaps.txt*
+ Srinath Avadhanula <srinath AT fastmail DOT fm>
+
+
+
+ Abstract
+ ========
+This plugin provides a function IMAP() which emulates vims |:imap| function. The
+motivation for providing this plugin is that |:imap| suffers from problems
+which get increasingly annoying with a large number of mappings.
+
+Consider an example. If you do >
+ imap lhs something
+
+
+then a mapping is set up. However, there will be the following problems:
+1. The 'ttimeout' option will generally limit how easily you can type the lhs.
+ if you type the left hand side too slowly, then the mapping will not be
+ activated.
+
+2. If you mistype one of the letters of the lhs, then the mapping is deactivated
+ as soon as you backspace to correct the mistake.
+
+3. The characters in lhs are shown on top of each other. This is fairly
+ distracting. This becomes a real annoyance when a lot of characters initiate
+ mappings.
+
+This script provides a function IMAP() which does not suffer from these
+problems.
+
+
+
+ *imaps.txt-toc*
+|im_1| Using IMAP
+
+================================================================================
+Viewing this file
+
+This file can be viewed with all the sections and subsections folded to ease
+navigation. By default, vim does not fold help documents. To create the folds,
+press za now. The folds are created via a foldexpr which can be seen in the
+last section of this file.
+
+See |usr_28.txt| for an introduction to folding and |fold-commands| for key
+sequences and commands to work with folds.
+
+================================================================================
+Using IMAP *im_1* *imaps-usage*
+
+
+
+Each call to IMAP is made using the syntax: >
+ call IMAP (lhs, rhs, ft [, phs, phe])
+
+
+This is equivalent to having <lhs> map to <rhs> for all files of type <ft>.
+
+Some characters in the <rhs> have special meaning which help in cursor placement
+as described in |imaps-placeholders|. The optional arguments define these
+special characters.
+
+Example One: >
+ call IMAP ("bit`", "\\begin{itemize}\<cr>\\item <++>\<cr>\\end{itemize}<++>", "tex")
+
+
+This effectively sets up the map for "bit`" whenever you edit a latex file. When
+you type in this sequence of letters, the following text is inserted: >
+ \begin{itemize}
+ \item *
+ \end{itemize}<++>
+
+where * shows the cursor position. The cursor position after inserting the text
+is decided by the position of the first "place-holder". Place holders are
+special characters which decide cursor placement and movement. In the example
+above, the place holder characters are <+ and +>. After you have typed in the
+item, press <C-j> and you will be taken to the next set of <++>'s. Therefore by
+placing the <++> characters appropriately, you can minimize the use of movement
+keys.
+
+Set g:Imap_UsePlaceHolders to 0 to disable placeholders altogether.
+
+Set g:Imap_PlaceHolderStart and g:Imap_PlaceHolderEnd to something else if you
+want different place holder characters. Also, b:Imap_PlaceHolderStart and
+b:Imap_PlaceHolderEnd override the values of g:Imap_PlaceHolderStart and
+g:Imap_PlaceHolderEnd respectively. This is useful for setting buffer specific
+place holders.
+
+Example Two: You can use the <C-r> command to insert dynamic elements such as
+dates. >
+ call IMAP ('date`', "\<c-r>=strftime('%b %d %Y')\<cr>", '')
+
+
+
+With this mapping, typing date` will insert the present date into the file.
+
+================================================================================
+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:anonymous@cvs.vim-latex.sf.net:/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*\\*.*',"",""),'^--','--\ \ \ \ ','')
+================================================================================
diff --git a/src/vim-latex/doc/latex-suite-chunk.xsl b/src/vim-latex/doc/latex-suite-chunk.xsl
new file mode 100644
index 0000000..f9500bf
--- /dev/null
+++ b/src/vim-latex/doc/latex-suite-chunk.xsl
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default">
+
+ <!-- $Id: latex-suite-chunk.xsl 1036 2008-05-31 16:10:30Z tmaas $ -->
+
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
+
+ <!-- import common customizations -->
+ <xsl:import href="latex-suite-common.xsl"/>
+
+ <!-- insert customization here -->
+
+ <xsl:param name="default.encoding" select="'ISO-8859-1'"/>
+
+ <xsl:param name="use.id.as.filename" select="'1'"/>
+ <xsl:param name="section.autolabel" select="1"/>
+ <xsl:param name="html.stylesheet" select="'../latex-suite.css'"/>
+
+ <!-- Chunk the first top-level section? -->
+ <xsl:param name="chunk.first.sections" select="1"/>
+ <!-- Depth to which sections should be chunked -->
+ <xsl:param name="chunk.section.depth" select="2"/>
+
+ <!-- How deep should recursive sections appear in the TOC? -->
+ <xsl:param name="toc.section.depth">2</xsl:param>
+ <!-- Control depth of TOC generation in sections -->
+ <xsl:param name="generate.section.toc.level" select="3"/>
+
+ <xsl:param name="chunker.output.method" select="'html'"/>
+
+ <xsl:param name="chunker.output.doctype-public"
+ select="'-//W3C//DTD HTML 4.01 Transitional//EN'"/>
+ <xsl:param name="chunker.output.doctype-system"
+ select="'http://www.w3.org/TR/html4/loose.dtd'"/>
+
+ <!-- this enables generation of TOC in appendix -->
+ <xsl:param name="generate.toc">
+appendix toc
+article/appendix toc
+article toc
+sect1 toc
+sect2 toc
+sect3 toc
+sect4 toc
+sect5 toc
+section toc
+ </xsl:param>
+
+</xsl:stylesheet>
diff --git a/src/vim-latex/doc/latex-suite-common.xsl b/src/vim-latex/doc/latex-suite-common.xsl
new file mode 100644
index 0000000..2f44272
--- /dev/null
+++ b/src/vim-latex/doc/latex-suite-common.xsl
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default">
+
+ <!-- Common customizations for all stylesheets -->
+
+ <!-- this omits the trailing '.' in numbered sections -->
+ <xsl:param name="autotoc.label.separator" select="' '"/>
+ <xsl:param name="local.l10n.xml" select="document('')"/>
+
+ <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+ <l:l10n language="en">
+ <l:context name="title-numbered">
+ <l:template name="section" text="%n %t"/>
+ </l:context>
+ </l:l10n>
+ </l:i18n>
+
+ <!-- override template for revhistory table -->
+ <xsl:template match="revhistory" mode="titlepage.mode">
+ <xsl:variable name="numcols">
+ <xsl:choose>
+ <xsl:when test="//authorinitials">3</xsl:when>
+ <xsl:otherwise>2</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <div xmlns="http://www.w3.org/1999/xhtml" class="{name(.)}">
+ <table border="2" cellspacing="4" width="100%" summary="Revision history">
+ <tr>
+ <th align="left" valign="top" colspan="{$numcols}">
+ <b>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'RevHistory'"/>
+ </xsl:call-template>
+ </b>
+ </th>
+ </tr>
+ <xsl:apply-templates mode="titlepage.mode">
+ <xsl:with-param name="numcols" select="$numcols"/>
+ </xsl:apply-templates>
+ </table>
+ </div>
+ </xsl:template>
+
+ <!--
+ <xsl:template name="user.header.content">
+ <div id="customheader">
+ <span class="logo">TeX Refs</span>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="user.footer.content">
+ <div id="customfooter">
+ Copyright &#169; 2002 P. Karp, M. Wiedmann
+ </div>
+ </xsl:template>
+ -->
+
+</xsl:stylesheet>
diff --git a/src/vim-latex/doc/latex-suite-quickstart.css b/src/vim-latex/doc/latex-suite-quickstart.css
new file mode 100644
index 0000000..52c746e
--- /dev/null
+++ b/src/vim-latex/doc/latex-suite-quickstart.css
@@ -0,0 +1,182 @@
+/*
+ * Authors: Srinath Avadhanula and Mikolaj Machowski
+ * This style file borrows some elements from main.css, the style file used
+ * in cream.sf.net
+ *
+ * */
+P {
+ font-size : 12pt ;
+ font-family : helvetica, arial, verdana, sans-serif ;
+ vertical-align : top;
+}
+DT {
+ font-size : 11pt ;
+ font-family : helvetica, arial, verdana, sans-serif ;
+ vertical-align : top;
+}
+LI {
+ font-size : 12pt ;
+ font-family : helvetica, arial, verdana, sans-serif ;
+ vertical-align : top;
+}
+
+DIV.header {
+ margin : 0.5cm ;
+ width : 800px ;
+ height : 100
+}
+.note {
+}
+
+TD {
+ font-size : 11pt ;
+ font-family : helvetica, arial, verdana, sans-serif ;
+ vertical-align : top;
+}
+TD.menu {
+ text-align : center ;
+ font-family : verdana, helvetica, sans-serif
+}
+TD.footright {
+ text-align : right ;
+ font-size : 10pt ;
+ font-family : verdana, helvetica, sans-serif
+}
+TD.leftpanel {
+ font-size: 14px ;
+ font-family: verdana, helvetica, sans-serif ;
+ vertical-align: top ;
+ width: 150px;
+ padding: 15px;
+ background-color: #88aaaa;
+}
+TD.mainpanel {
+ font-size : 12pt ;
+ font-family : helvetica, arial, verdana, sans-serif ;
+ vertical-align : top;
+ padding: 15px;
+}
+TD.footpanel {
+ font-size: 12px ;
+ font-family: verdana, helvetica, sans-serif ;
+ vertical-align: top ;
+ text-align: right;
+ padding: 5px;
+ background-color: #88aaaa;
+}
+.navigation {
+ vertical-align: top;
+ width: 150px;
+ padding: 15px;
+ background-color: #445555;
+ color: #fffcfc;
+}
+.navheader {
+ margin-top: -0.5em;
+ margin-bottom: 0.5em;
+ text-align: right;
+ color: #446644;
+ font-size: 14px;
+ font-weight: bold;
+}
+
+SPAN.menu {
+ text-align : center ;
+ font-size : 12pt ;
+ font-family : verdana, helvetica, sans-serif
+}
+
+DIV.merit {
+ margin : 0.5cm ;
+ width : 800px
+}
+
+TABLE.meritum {
+ margin : 0.5cm ;
+ border : 0
+}
+.foot {
+ margin : 0.5cm ;
+ width : 800px
+}
+.head {
+ margin : 0.5cm ;
+}
+
+CODE {
+ font-family: "Andale Mono", "Courier New", "Courier", monospace;
+ background-color: #eef0f3;
+ white-space: nowrap;
+}
+
+.singlesmall {
+ font-size: 14px;
+}
+
+.doublesmall {
+ font-size: 12px;
+}
+
+
+DIV.footer {
+ margin : 0.5cm ;
+ width : 800px
+}
+.qa {
+ margin : 0.5cm ;
+ font-size : 16px;
+ font-weight : bold;
+}
+.ans {
+ margin : 0.5cm ;
+ font-weight : normal;
+}
+
+H2.hline {
+ text-align : center ;
+ font-family : verdana, helvetica, sans-serif
+}
+
+A.extlinks {
+ font-size : 11pt ;
+ font-family : verdana, helvetica, sans-serif ;
+ font-weight : bold
+}
+
+TT {
+ font-family: courier,sans-serif;
+ font-size: 11pt;
+}
+PRE.programlisting {
+ font-family: courier,sans-serif;
+ font-size: 10pt;
+ background-color:#eef0f3;
+ border-color: #000000;
+ border-width: 1px;
+ border-style: solid;
+}
+SPAN.conflict {
+ font-size : small ;
+ font-family: courier,sans-serif;
+ color : #DD4444;
+}
+HR.navig {
+ color: #446644;
+ height: 1px;
+ margin-top: 1em;
+ border-top: 0px; /* Mozilla work-around to eliminate "groove" */
+}
+A.question {
+ color: #000000;
+ height: 1px;
+ margin-top: 1em;
+ border-top: 0px; /* Mozilla work-around to eliminate "groove" */
+}
+A.question:hover {
+ color: #000000;
+ background-color: #eef0f3;
+ height: 1px;
+ margin-top: 1em;
+ border-top: 0px; /* Mozilla work-around to eliminate "groove" */
+}
+
diff --git a/src/vim-latex/doc/latex-suite-quickstart.txt b/src/vim-latex/doc/latex-suite-quickstart.txt
new file mode 100644
index 0000000..a3ec8c0
--- /dev/null
+++ b/src/vim-latex/doc/latex-suite-quickstart.txt
@@ -0,0 +1,448 @@
+ A (very) quick introduction to Latex-Suite
+ *latex-suite-quickstart.txt*
+ Srinath Avadhanula <srinath AT fastmail DOT fm>
+
+
+
+ Abstract
+ ========
+Latex-Suite is a comprehensive set of scripts to aid in editing, compiling and
+viewing LaTeX documents. A thorough explanation of the full capabilities of
+Latex-Suite is described in the user manual. This guide on the other hand,
+provides a quick 30-45 minute running start to some of the more commonly used
+functionalities of Latex-Suite.
+
+ *latex-suite-quickstart.txt-toc*
+|lq_1| Using this tutorial
+|lq_2| Inserting a template
+|lq_3| Inserting a package
+|lq_4| Inserting an Environment
+|lq_5| A few keyboard shortcuts
+|lq_6| Folding in Latex-Suite
+|lq_7| Inserting a Reference
+|lq_8| Compiling a document
+ |lq_8_1| Debugging LaTeX source files
+|lq_9| Viewing DVI files
+ |lq_9_1| Performing forward searches
+ |lq_9_2| Performing inverse searches
+|lq_10| Conclusions
+
+================================================================================
+Viewing this file
+
+This file can be viewed with all the sections and subsections folded to ease
+navigation. By default, vim does not fold help documents. To create the folds,
+press za now. The folds are created via a foldexpr which can be seen in the
+last section of this file.
+
+See |usr_28.txt| for an introduction to folding and |fold-commands| for key
+sequences and commands to work with folds.
+
+================================================================================
+Using this tutorial *lq_1* *lq_a_bc*
+ *lsq-using-tutorial*
+
+
+
+This tutorial assumes that you have vim version 6.1+ installed on your machine.
+To check, open vim and type >
+ :ver
+You will see the version in the first line of the output. Get the latest vim
+version from http://vim.sf.net |lq_u_1|.
+
+Assuming you have Vim 6.1+ already up and running, follow the instructions here
+|lq_u_2| to set up Latex-Suite. Remember to make sure your 'grepprg' setting of
+Vim works.
+
+Good, now you are all set to start the tutorial. Since this tutorial aims to
+explain the newbie-friendly version of Latex-Suite, it needs some GUI
+functionality. Therefore, at least for this tutorial, open the gui version of
+vim. (On MS windows, this is the default). Open up this help file in either the
+same gvim session in a split window or in a different session and follow the
+(friendly) instructions.
+
+================================================================================
+Inserting a template *lq_2* *lq_a_bd*
+ *lsq-inserting-template*
+
+
+
+Start up gvim and begin editing a new file. >
+ e newfile.tex
+If the installation went well, you should see a new set of menus appear. Goto
+Tex-Suite > Templates. You will see a number of templates to choose from. For
+now, choose to insert a template for an article. You should get the following in
+the main vim window (after possibly a hit-enter prompt). >
+
+ 1 % File: sample.tex
+ 2 % Created: Sun Jun 22 04:00 PM 2003 P
+ 3 % Last Change: Sun Jun 22 04:00 PM 2003 P
+ 4 %
+ 5 \documentclass[a4paper]{article}
+ 6 \begin{document}
+ 7
+ 8 \end{document}
+ 9
+ 10 ~
+ 11 ~
+ 12 ~
+ 13 ~
+ -- INSERT -- 7,1 All
+
+
+
+The cursor is left on line 7 (just after the \begin{document} line) from where
+you can start typing straight away. Trying to lessen movement is a recurring
+theme in Latex-Suite.
+
+================================================================================
+Inserting a package *lq_3* *lq_a_be*
+ *lsq-lsq-inserting-package*
+
+
+
+Assume that we are writing a mathematical paper and we want to use the popular
+amsmath package. We will use some functionality which Latex-Suite provides
+specifically for including LaTeX packages, providing options etc. Navigate to
+before the \begin{document} line (The portion of the document before the
+\begin{document} is called the _preamble_ in LaTeX). On an empty line in the
+preamble, type the single word amsmath and then press <F5> in normal mode. The
+line will change to >
+ \usepackage[]{amsmath}<++>
+with the cursor positioned conveniently between the []'s. For now, do not worry
+about the trailing <++> at the end of this line. Assume we want to provide the
+sumlimits options to amsmath. You can either type in this option manually, or
+choose from a menu of package options which Latex-Suite automatically creates
+when you insert a package using <F5>. With the cursor still placed between the
+[], goto TeX-Suite > Packages > amsmath Options. Choose the sumlimits option.
+The package line should get converted to: >
+ \usepackage[sumlimits,]{amsmath}<++>
+
+
+with the cursor before ]. Press <C-j> in insert mode. You will see the cursor
+jump to the end of the package line and the trailing <++> will disappear. What
+just happened?! You had your first taste of _Placeholders_. Read more about them
+(later) here |lq_u_3|. In short, pressing <C-j> in insert mode takes you to the
+next <++> in the text.
+
+================================================================================
+Inserting an Environment *lq_4* *lq_a_bf*
+ *lsq-insert-environment*
+
+
+
+Now let us type in a simple formula in LaTeX. Move back to the body of the
+document (The portion of the document between \begin{document} and
+\end{document} is called the body). Type in a few simple sentences and then on
+an empty line, type the single word eqnarray. Escape to normal mode and press
+<F5>. (Remember: <F5> is very useful!) This time, the line will change to: >
+ \begin{eqnarray}
+ \label{}<++>
+ \end{eqnarray}<++>
+<with the cursor between the {}. Enter a label. We will use eqn:euler. After
+typing in eqn:euler, press <C-j>. This will take you outside the curly-braces.
+Another time you used a Placeholder!
+
+================================================================================
+A few keyboard shortcuts *lq_5* *lq_a_bg*
+ *lsq-keyboard-shortcuts*
+
+
+
+Now to type in the famous Euler formula. Our aim is to type >
+ e^{j\pi} + 1 &=& 0
+Instead of typing this blindly, let us use a few shortcuts to reduce movement.
+Start out by typing e^. Now instead of typing {, type another ^. You will see
+the e^^ change instantly to e^{}<++> with the cursor between {}'s. (The ^^
+changed to ^{}<++>.) Continue with the following sequence of letters: j`p. This
+will change instantly to j\pi. (The `p changed to \pi.) Having typed in all we
+need to type between the {}'s, press <C-j>. You will pop back out of the
+curly-braces. Continue typing the rest of the formula. You can use == as a
+shortcut for &=&. Latex-Suite provides a large number of such shortcuts which
+should making typing much more fun and fast if you get acquainted with them. A
+list is provided here |lq_u_4|. Definitely spend some time getting a feel for
+them. Most of them are pretty intuitive like `/ for \frac{}{}, `8 for \infty
+etc.
+
+In order to understand the next section better, it will be helpful to have one
+more \label. Lets use the handy <F5> key to insert another equation. This time
+something simple like the following will do: >
+ \begin{eqnarray}
+ \label{eqn:simple}
+ 1 + 1 = 2
+ \end{eqnarray}
+
+
+================================================================================
+Folding in Latex-Suite *lq_6* *lq_a_bh* *lsq-folding*
+
+
+
+Okay, we have typed enough. At this stage, hopefully, your file is looking
+something like this: >
+
+ 1 % File: sample.tex
+ 2 % Created: Sun Jun 22 04:00 PM 2003 P
+ 3 % Last Change: Mon Dec 15 07:00 PM 2003
+ 4 %
+ 5 \documentclass[a4paper]{article}
+ 6
+ 7 \usepackage[sumlimits,]{amsmath}
+ 8
+ 9 \begin{document}
+ 10 \begin{eqnarray}
+ 11 \label{eqn:euler}
+ 12 e^{j\pi} + 1 &=& 0
+ 13 \end{eqnarray}
+ 14 This is the famous euler equation. I
+ 15 will type another equation, just as
+ 16 true:
+ 17 \begin{eqnarray}
+ 18 \label{eqn:simple}
+ 19 1 + 1 &=& 2
+ 20 \end{eqnarray}
+ 21 This is my contribution to mathematics.
+ 22 \end{document}
+
+In normal mode, press \rf. This will fold up the entire file and you should see
+the file looking as below: >
+
+ 1 % File: sample.tex
+ 2 % Created: Sun Jun 22 04:00 PM 2003 P
+ 3 % Last Change: Mon Dec 15 07:00 PM 2003
+ 4 %
+ 5 +-- 4 lines: Preamble: \documentclass[a4paper]{article} -----
+ 9 \begin{document}
+ 10 +-- 4 lines: eqnarray (eqn:euler) \label{eqn:euler} -----------
+ 14 This is the famous euler equation. I
+ 15 will type another equation, just as
+ 16 true:
+ 10 +-- 4 lines: eqnarray (eqn:simple) \label{eqn:simple} ---------
+ 21 This is my contribution to mathematics.
+ 22 \end{document}
+
+What has happened is that Latex-Suite folded away blocks of LaTeX code into
+folded regions. You can open and close folds by using the command za in normal
+mode.
+
+================================================================================
+Inserting a Reference *lq_7* *lq_a_bi*
+ *lsq-inserting-reference*
+
+
+
+A necessary part of LaTeX editing is referencing equations, figures,
+bibliographic entries etc. This is done with the \ref and the \cite commands.
+Latex-Suite provides an easy way to do this. Somewhere in the body of the
+document, type in the following sentence >
+ This is a reference to (\ref{}).
+With the cursor between the {} press <F9> in insert mode. Your vim session will
+sprout two new windows and it should look like below: >
+
+ 9 \begin{document}
+ 10 +-- 4 lines: eqnarray (eqn:euler) : \label{eqn:euler}-----------------------
+ 14 This is the famous euler equation. I
+ 15 will type another equation, just as
+ 16 true:
+ 17 +-- 4 lines: eqnarray (eqn:simple) : \label{eqn:simple}---------------------
+ 21 This is my contribution to mathematics.
+ 22 This is a reference to (\ref{}<++>)<++>
+ 23 \end{document}
+ ~
+ ~
+ ~
+ test.tex [+] 22,29 Bot
+ test.tex|11| \label{eqn:euler}
+ test.tex|18| \label{eqn:simple}
+ ~
+ ~
+ ~
+ [Error List] 1,1 All
+ 7 \usepackage[sumlimits,]{amsmath}
+ 8
+ 9 \begin{document}
+ 10 \begin{eqnarray}
+ 11 \label{eqn:euler}
+ 12 e^{j\pi} + 1 &=& 0
+ 13 \end{eqnarray}
+ 14 This is the famous euler equation. I
+ 15 will type another equation, just as
+ 16 true:
+ test.tex [Preview][+] 11,2-5 46%
+
+
+
+The cursor will relocate to the middle window which shows all \labels found in
+all the .tex file in the current directory. You can scroll up and down in the
+middle window till you reach the reference you want to insert. Notice how when
+you scroll in the middle window, the bottom "Preview" window scrolls
+automatically to show you the location of the current selection. This helps you
+identify the reference with greater ease because often times, \labels are not
+descriptive enough or there might be too many of them. To insert the reference,
+just position the cursor on the relevant line in the middle window and press
+<enter>. The line which you were editing will change to: >
+ This is a reference to (\ref{eqn:euler})
+<and the bottom windows close automatically.
+
+The <F9> key also works for inserting \cite commands to reference bibliographic
+entries, inserting file names for the \inputgraphics command and just plain
+searching for words. Click here |lq_u_5| for more information.
+
+================================================================================
+Compiling a document *lq_8* *lq_a_bj*
+ *lsq-compiling*
+
+|lq_8_1| Debugging LaTeX source files
+
+
+Great! We have just created a small latex file. The next step is to make the
+latex compiler create a .dvi file from it. Compiling via latex-suite is simple.
+Goto normal mode and press \ll (replace \ with whatever mapleader setting you
+have). This will call the latex compiler. If all goes well, then the focus
+should return to the vim window.
+
+Nothing happend? Ouch! You might need to do some additional settings as
+described here. |lq_u_6|
+
+
+--------------------------------------------------------------------------------
+Debugging LaTeX source files *lq_8_1* *lq_a_bk*
+ *lsq-debugging*
+
+To illustrate the debugging procedure, let's create a few mistakes in the file.
+Insert the following ``mistakes'' in the file: >
+ This is a $\mistake$.
+ And this is $\another$
+Now press \ll again. This time you will notice that after compilation finishes,
+the cursor automatically lands on $\mistake$. In addition, 2 new windows will
+appear as shown here:
+
+The middle window is an _Error List_ window showing you the errors which the
+latex compiler found. Th bottom window is a _Log Preview_ window, which shows
+you the context of the error made by displaying the relevant portion of the .log
+file created during the latex compilation procedure. Jump to the _Error List_
+window and try scrolling around in it using either the j, k keys or the arrow
+keys. You will notice that the _Log Preview_ window scrolls automatically to
+retain the context of the error you are currently located on. If you press
+<enter> on any line, you will see the cursor jump to the location of the error.
+Latex-Suite tries to guess the column location as best as it can so you can
+continue typing straight away.
+Having got a taste for compiling, proceed by deleting the erroneous lines and
+re-compiling.
+
+The Latex-Suite compiler is capable of much more including selectively filtering
+out common errors which you might want to ignore for the moment, compiling parts
+of a document, setting levels of verbosity in the compiler output etc. See here
+|lq_u_7| for more.
+
+================================================================================
+Viewing DVI files *lq_9* *lq_a_bl*
+ *lsq-viewing-dvi*
+
+|lq_9_1| Performing forward searches
+|lq_9_2| Performing inverse searches
+
+
+Now that you have compiled your first latex source, its time to view it. Again,
+this should be pretty simple. Press \lv in normal mode. Depending on your
+platform, a DVI viewer program should open up and display the dvi file generated
+in compilation step previously.
+
+Nothing happend? Ouch! You might need to do some additional settings as
+described here. |lq_u_8|
+
+
+--------------------------------------------------------------------------------
+Performing forward searches *lq_9_1* *lq_a_bm*
+ *lsq-quick-forward-searching*
+
+If you are using a modern DVI viewer, then it is possible to do what is called
+forward and inverse searching. However, you will need to customize the standard
+Latex-Suite distribution in order to utilize this functionality. Type in the
+following on the command line: >
+ :let g:Tex_CompileRule_dvi = 'latex -src-specials -interaction=nonstopmode $*'
+ :TCTarget dvi
+
+
+Now recompile the latex file by pressing \ll. This time, instead of pressing \lv
+to view the file, press \ls from within the tex file. If the DVI viewer supports
+forward searching (most of them do), then the viewer will actually display the
+portion of the DVI file corresponding to the location where you were editing the
+tex file.
+
+NOTE: The reason Latex-Suite does not have this setting by default is that on
+ some systems this causes unpredictable results in the DVI output. If you
+ find the DVI output satisfactory, then you can insert the first of the 2
+ lines above into your $VIM/ftplugin/tex.vim file. $VIM is ~/vimfiles for
+ windows and ~/.vim for *nix machines.
+
+
+
+--------------------------------------------------------------------------------
+Performing inverse searches *lq_9_2* *lq_a_bn*
+ *lsq-quick-inverse-searching*
+
+Most DVI viewers also support inverse searching, whereby you can make the DVI
+viewer ask vim to display the tex source corresponding to the DVI file being
+shown. This is extremely helpful while proofreading large documents.
+
+Simply double-click anywhere in the viewer window. If the viewer supports it,
+then it will attempt to open an editor window at the location corresponding to
+where you double-clicked. On *nix platforms, Latex-Suite attempts to start the
+viewer program in such a way that it already knows to use vim to open the tex
+source. Thus you should see a vim window open up showing the tex file. However,
+if there is an error, or some other program is used, you will need to tell the
+viewer program to use gvim as the editor. On windows platforms, if you use the
+commonly available yap viewer (available as part of the miktex distribution),
+then this option can be set from View > Options > Inverse Search. In the Command
+line: window, write >
+ "C:\Program Files\vim\vim61\gvim" -c ":RemoteOpen +%l %f"
+(Customize the path according to where you have installed gvim). If you double
+click in the view pane now, you will see gvim start up and take you to the
+relevant portion of the tex file.
+
+================================================================================
+Conclusions *lq_10* *lq_a_bo*
+ *lsq-conclusions*
+
+
+
+Thats all folks! By now, you should know enough of the basic functions of
+latex-suite. Ofcourse, latex-suite is capable of much, much more such as
+compiling files multiple times to resolve changed labels, compiling
+dependencies, handling user packages and more. To get a feel for that, you will
+need to take a look at the Latex-Suite user manual. |lq_u_9|
+
+================================================================================
+URLs used in this file
+
+*lq_u_1* : http://vim.sf.net
+*lq_u_2* : http://vim-latex.sourceforge.net/index.php?subject=download&title=Download
+*lq_u_3* : http://vim-latex.sourceforge.net/documentation/latex-suite/latex-macros.html
+*lq_u_4* : http://vim-latex.sourceforge.net/documentation/latex-suite/auc-tex-mappings.html
+*lq_u_5* : http://vim-latex.sourceforge.net/documentation/latex-suite/latex-completion.html
+*lq_u_6* : http://vim-latex.sourceforge.net/index.php?subject=faq&title=FAQ#faq-2
+*lq_u_7* : http://vim-latex.sourceforge.net/documentation/latex-suite/latex-compiling.html
+*lq_u_8* : http://vim-latex.sourceforge.net/index.php?subject=faq&title=FAQ#faq-3
+*lq_u_9* : http://vim-latex.sourceforge.net/index.php?subject=manual&title=Manual#user-manual
+
+================================================================================
+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:anonymous@cvs.vim-latex.sf.net:/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*\\*.*',"",""),'^--','\ \ \ \ \ \ ','')
+================================================================================
diff --git a/src/vim-latex/doc/latex-suite-quickstart.xml b/src/vim-latex/doc/latex-suite-quickstart.xml
new file mode 100644
index 0000000..da3e995
--- /dev/null
+++ b/src/vim-latex/doc/latex-suite-quickstart.xml
@@ -0,0 +1,471 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "docbook-xml/docbookx.dtd"
+[<!ENTITY dummy "dummy">
+<!ENTITY date "$Date$">
+<!ENTITY ls "Latex-Suite">
+<!ENTITY latex "LaTeX">
+<!ENTITY vim "Vim">
+<!ENTITY ph "&lt;++&gt;">
+]>
+<article lang="en">
+ <articleinfo id="lsq-articleinfo">
+
+ <title id="lsq-articleinfo-title">A (very) quick introduction to Latex-Suite</title>
+
+ <author>
+ <firstname>Srinath</firstname>
+ <surname>Avadhanula</surname>
+ <affiliation>
+ <address><email>srinath AT fastmail DOT fm</email></address>
+ </affiliation>
+ </author>
+
+ <abstract>
+ &ls; is a comprehensive set of scripts to aid in editing, compiling and
+ viewing &latex; documents. A thorough explanation of the full
+ capabilities of &ls; is described in the user manual. This guide on the
+ other hand, provides a quick 30-45 minute running start to some of the
+ more commonly used functionalities of &ls;.
+ </abstract>
+
+ <date>&date;</date>
+
+ </articleinfo>
+ <section id="lsq-using-tutorial">
+ <title id="using-tutorial">Using this tutorial</title>
+ <para>
+ This tutorial assumes that you have vim version 6.1+ installed on your
+ machine. To check, open vim and type
+ <programlisting>:ver</programlisting>
+ You will see the version in the first line of the output. Get the latest
+ vim version from <ulink url="http://vim.sf.net">http://vim.sf.net</ulink>.
+ </para>
+ <para>
+ Assuming you have Vim 6.1+ already up and running, follow the
+ instructions <ulink
+ url="http://vim-latex.sourceforge.net/index.php?subject=download&amp;title=Download">here</ulink>
+ to set up Latex-Suite. Remember to make sure your
+ <literal>'grepprg'</literal> setting of &vim; works.
+ </para>
+ <para>
+ Good, now you are all set to start the tutorial. Since this tutorial
+ aims to explain the newbie-friendly version of &ls;, it needs some GUI
+ functionality. Therefore, at least for this tutorial, open the gui
+ version of vim. (On MS windows, this is the default). Open up this help
+ file in either the same gvim session in a split window or in a different
+ session and follow the (friendly) instructions.
+ </para>
+ </section>
+ <section id="lsq-inserting-template">
+ <title id="inserting-template-title">Inserting a template</title>
+ <para>
+ Start up gvim and begin editing a new file.
+ <programlisting>e newfile.tex</programlisting>
+ If the installation went well, you should see a new set of
+ menus appear. Goto <literal>Tex-Suite &gt; Templates</literal>. You will see
+ a number of templates to choose from. For now, choose to insert a
+ template for an article. You should get the following in the main
+ vim window (after possibly a hit-enter prompt).
+ <programlisting>
+ 1 % File: sample.tex
+ 2 % Created: Sun Jun 22 04:00 PM 2003 P
+ 3 % Last Change: Sun Jun 22 04:00 PM 2003 P
+ 4 %
+ 5 \documentclass[a4paper]{article}
+ 6 \begin{document}
+ 7
+ 8 \end{document}
+ 9
+ 10 ~
+ 11 ~
+ 12 ~
+ 13 ~
+-- INSERT -- 7,1 All
+</programlisting>
+ </para>
+ <imageobject>
+ <imagedata fileref="" format="png"></imagedata>
+ </imageobject>
+ <para>
+ The cursor is left on line 7 (just after the
+ <literal>\begin{document}</literal> line) from where you can start
+ typing straight away. Trying to lessen movement is a recurring theme in
+ Latex-Suite.
+ </para>
+ </section>
+ <section id="lsq-lsq-inserting-package">
+ <title>Inserting a package</title>
+ <para>
+ Assume that we are writing a mathematical paper and we want to use the
+ popular amsmath package. We will use some functionality which
+ Latex-Suite provides specifically for including LaTeX packages,
+ providing options etc. Navigate to before the
+ <literal>\begin{document}</literal> line (The portion of the document
+ before the <literal>\begin{document}</literal> is called the
+ <emphasis>preamble</emphasis> in LaTeX). On an empty line in the
+ preamble, type the single word <literal>amsmath</literal> and then press
+ <literal>&lt;F5&gt;</literal> in normal mode. The line will change to
+ <programlisting>\usepackage[]{amsmath}&ph;</programlisting>
+ with the cursor positioned conveniently between the
+ <literal>[]</literal>'s. For now, do not worry about the trailing
+ <literal>&ph;</literal> at the end of this line. Assume we want to
+ provide the <literal>sumlimits</literal> options to amsmath. You can
+ either type in this option manually, or choose from a menu of package
+ options which Latex-Suite automatically creates when you insert a
+ package using <literal>&lt;F5&gt;</literal>. With the cursor still
+ placed between the <literal>[]</literal>, goto <literal>TeX-Suite &gt;
+ Packages &gt; amsmath Options</literal>. Choose the
+ <literal>sumlimits</literal> option. The package line should get
+ converted to:
+ <programlisting>\usepackage[sumlimits,]{amsmath}&ph;</programlisting>
+ </para>
+ <para>
+ with the cursor before <literal>]</literal>. Press
+ <literal>&lt;C-j&gt;</literal> in insert mode. You will see the cursor
+ jump to the end of the package line and the trailing
+ <literal>&ph;</literal> will disappear. What just happened?! You had
+ your first taste of <emphasis>Placeholders</emphasis>. Read more about
+ them (later) <ulink
+ url="http://vim-latex.sourceforge.net/documentation/latex-suite/latex-macros.html">here</ulink>.
+ In short, pressing <literal>&lt;C-j&gt;</literal> in insert mode takes
+ you to the next <literal>&ph;</literal> in the text.
+ </para>
+ </section>
+ <section id="lsq-insert-environment">
+ <title>Inserting an Environment</title>
+ <para>
+ Now let us type in a simple formula in LaTeX. Move back to the body of
+ the document (The portion of the document between
+ <literal>\begin{document}</literal> and
+ <literal>\end{document}</literal> is called the body). Type in a few
+ simple sentences and then on an empty line, type the single word
+ <literal>eqnarray</literal>. Escape to normal mode and press
+ <literal>&lt;F5&gt;</literal>. (Remember:
+ <literal>&lt;F5&gt;</literal> is very useful!) This time, the line will
+ change to:
+ <programlisting>\begin{eqnarray}
+ \label{}&ph;
+\end{eqnarray}&ph;</programlisting>
+ with the cursor between the <literal>{}</literal>. Enter a label. We
+ will use <literal>eqn:euler</literal>. After typing in
+ <literal>eqn:euler</literal>, press <literal>&lt;C-j&gt;</literal>. This
+ will take you outside the curly-braces. Another time you used a
+ Placeholder!
+ </para>
+ </section>
+ <section id="lsq-keyboard-shortcuts">
+ <title>A few keyboard shortcuts</title>
+ <para>
+ Now to type in the famous Euler formula. Our aim is to type
+ <programlisting>e^{j\pi} + 1 &amp;=&amp; 0</programlisting> Instead
+ of typing this blindly, let us use a few shortcuts to reduce
+ movement. Start out by typing <literal>e^</literal>. Now instead of
+ typing <literal>{</literal>, type another <literal>^</literal>. You
+ will see the <literal>e^^</literal> change instantly to
+ <literal>e^{}&ph;</literal> with the cursor between
+ <literal>{}</literal>'s. (The <literal>^^</literal> changed to
+ <literal>^{}&ph;</literal>.) Continue with the following sequence of
+ letters: <literal>j`p</literal>. This will change instantly to
+ <literal>j\pi</literal>. (The <literal>`p</literal> changed to
+ <literal>\pi</literal>.) Having typed in all we need to type between
+ the <literal>{}</literal>'s, press <literal>&lt;C-j&gt;</literal>.
+ You will pop back out of the curly-braces. Continue typing the rest
+ of the formula. You can use <literal>==</literal> as a shortcut for
+ <literal>&amp;=&amp;</literal>. Latex-Suite provides a large number
+ of such shortcuts which should making typing much more fun and fast
+ if you get acquainted with them. A list is provided <ulink
+ url="http://vim-latex.sourceforge.net/documentation/latex-suite/auc-tex-mappings.html">here</ulink>. Definitely spend some time getting a feel for
+ them. Most of them are pretty intuitive like <literal>`/</literal>
+ for <literal>\frac{}{}</literal>, <literal>`8</literal> for
+ <literal>\infty</literal> etc.
+ </para>
+ <para>
+ In order to understand the next section better, it will be helpful
+ to have one more <literal>\label</literal>. Lets use the handy
+ <literal>&lt;F5&gt;</literal>
+ key to insert another equation. This time something simple like the
+ following will do:
+ <programlisting>\begin{eqnarray}
+ \label{eqn:simple}
+ 1 + 1 = 2
+\end{eqnarray}</programlisting>
+ </para>
+ </section>
+ <section id="lsq-folding">
+ <title>Folding in &ls;</title>
+ <para>
+ Okay, we have typed enough. At this stage, hopefully, your file is
+ looking something like this:
+<programlisting>
+ 1 % File: sample.tex
+ 2 % Created: Sun Jun 22 04:00 PM 2003 P
+ 3 % Last Change: Mon Dec 15 07:00 PM 2003
+ 4 %
+ 5 \documentclass[a4paper]{article}
+ 6
+ 7 \usepackage[sumlimits,]{amsmath}
+ 8
+ 9 \begin{document}
+ 10 \begin{eqnarray}
+ 11 \label{eqn:euler}
+ 12 e^{j\pi} + 1 &amp;=&amp; 0
+ 13 \end{eqnarray}
+ 14 This is the famous euler equation. I
+ 15 will type another equation, just as
+ 16 true:
+ 17 \begin{eqnarray}
+ 18 \label{eqn:simple}
+ 19 1 + 1 &amp;=&amp; 2
+ 20 \end{eqnarray}
+ 21 This is my contribution to mathematics.
+ 22 \end{document}
+</programlisting>
+ In normal mode, press <literal>\rf</literal>. This will fold up the
+ entire file and you should see the file looking as below:
+<programlisting>
+ 1 % File: sample.tex
+ 2 % Created: Sun Jun 22 04:00 PM 2003 P
+ 3 % Last Change: Mon Dec 15 07:00 PM 2003
+ 4 %
+ 5 +-- 4 lines: Preamble: \documentclass[a4paper]{article} -----
+ 9 \begin{document}
+ 10 +-- 4 lines: eqnarray (eqn:euler) \label{eqn:euler} -----------
+ 14 This is the famous euler equation. I
+ 15 will type another equation, just as
+ 16 true:
+ 10 +-- 4 lines: eqnarray (eqn:simple) \label{eqn:simple} ---------
+ 21 This is my contribution to mathematics.
+ 22 \end{document}
+</programlisting>
+ What has happened is that &ls; folded away blocks of &latex; code into
+ folded regions. You can open and close folds by using the command
+ <literal>za</literal> in normal mode.
+ </para>
+ </section>
+ <section id="lsq-inserting-reference">
+ <title>Inserting a Reference</title>
+ <para>
+ A necessary part of LaTeX editing is referencing equations, figures,
+ bibliographic entries etc. This is done with the
+ <literal>\ref</literal> and the <literal>\cite</literal> commands.
+ Latex-Suite provides an easy way to do this. Somewhere in the body of
+ the document, type in the following sentence
+ <programlisting>This is a reference to (\ref{}).</programlisting>
+ With the cursor between the <literal>{}</literal> press
+ <literal>&lt;F9&gt;</literal> in insert mode. Your vim session will
+ sprout two new windows and it should look like below:
+<programlisting>
+ 9 \begin{document}
+ 10 +-- 4 lines: eqnarray (eqn:euler) : \label{eqn:euler}-----------------------
+ 14 This is the famous euler equation. I
+ 15 will type another equation, just as
+ 16 true:
+ 17 +-- 4 lines: eqnarray (eqn:simple) : \label{eqn:simple}---------------------
+ 21 This is my contribution to mathematics.
+ 22 This is a reference to (\ref{}&lt;++&gt;)&lt;++&gt;
+ 23 \end{document}
+~
+~
+~
+test.tex [+] 22,29 Bot
+test.tex|11| \label{eqn:euler}
+test.tex|18| \label{eqn:simple}
+~
+~
+~
+[Error List] 1,1 All
+ 7 \usepackage[sumlimits,]{amsmath}
+ 8
+ 9 \begin{document}
+ 10 \begin{eqnarray}
+ 11 \label{eqn:euler}
+ 12 e^{j\pi} + 1 &amp;=&amp; 0
+ 13 \end{eqnarray}
+ 14 This is the famous euler equation. I
+ 15 will type another equation, just as
+ 16 true:
+test.tex [Preview][+] 11,2-5 46%
+</programlisting>
+ </para>
+ <imageobject>
+ <imagedata fileref="" format=""></imagedata>
+ </imageobject>
+ <para>
+ The cursor will relocate to the middle window which shows all
+ <literal>\label</literal>s found in all the <literal>.tex</literal> file
+ in the current directory.
+ You can scroll up and down in the middle window till you reach the
+ reference you want to insert. Notice how when you scroll in the
+ middle window, the bottom "Preview" window scrolls automatically to
+ show you the location of the current selection. This helps you
+ identify the reference with greater ease because often times,
+ <literal>\labels</literal> are not descriptive enough or there might be too
+ many of them. To insert the reference, just position the cursor on
+ the relevant line in the middle window and press
+ <literal>&lt;enter&gt;</literal>. The line which you were editing will change
+ to:
+ <programlisting>This is a reference to (\ref{eqn:euler})</programlisting>
+ and the bottom windows close automatically.
+ </para>
+ <para>
+ The <literal>&lt;F9&gt;</literal> key also works for inserting
+ <literal>\cite</literal> commands to reference bibliographic entries,
+ inserting file names for the <literal>\inputgraphics</literal> command
+ and just plain searching for words. Click <ulink
+ url="http://vim-latex.sourceforge.net/documentation/latex-suite/latex-completion.html">here</ulink>
+ for more information.
+ </para>
+ </section>
+ <section id="lsq-compiling">
+ <title>Compiling a document</title>
+ <para>
+ Great! We have just created a small latex file. The next step is to
+ make the latex compiler create a .dvi file from it. Compiling via
+ latex-suite is simple. Goto normal mode and press <literal>\ll</literal>
+ (replace <literal>\</literal> with whatever <literal>mapleader</literal> setting you
+ have). This will call the latex compiler. If all goes well, then
+ the focus should return to the vim window.
+ </para>
+ <para>
+ Nothing happend? Ouch! You might need to do some additional settings as
+ described <ulink
+ url="http://vim-latex.sourceforge.net/index.php?subject=faq&amp;title=FAQ#faq-2">here.</ulink>
+ </para>
+ <section id="lsq-debugging">
+ <title>Debugging LaTeX source files</title>
+ <para>
+ To illustrate the debugging procedure, let's create a few mistakes
+ in the file. Insert the following ``mistakes'' in the file:
+ <programlisting>This is a $\mistake$.
+And this is $\another$</programlisting>
+ Now press <literal>\ll</literal> again. This time you will notice that
+ after compilation finishes, the cursor automatically lands on
+ <literal>$\mistake$</literal>. In addition, 2 new windows will appear
+ as shown here:
+ </para>
+ <imageobject>
+ <imagedata fileref="" format=""></imagedata>
+ </imageobject>
+ <para>
+ The middle window is an <emphasis>Error List</emphasis> window
+ showing you the errors which the latex compiler found. Th bottom
+ window is a <emphasis>Log Preview</emphasis> window, which shows you
+ the context of the error made by displaying the relevant portion of
+ the <literal>.log</literal> file created during the latex
+ compilation procedure. Jump to the <emphasis>Error List</emphasis>
+ window and try scrolling around in it using either the <literal>j,
+ k</literal> keys or the arrow keys. You will notice that the
+ <emphasis>Log Preview</emphasis> window scrolls automatically to
+ retain the context of the error you are currently located on. If you
+ press <literal>&lt;enter&gt;</literal> on any line, you will see the
+ cursor jump to the location of the error. Latex-Suite tries to guess
+ the column location as best as it can so you can continue typing
+ straight away.
+ </para>
+ </section>
+ <para>
+ Having got a taste for compiling, proceed by deleting the erroneous
+ lines and re-compiling.
+ </para>
+ <para>
+ The Latex-Suite compiler is capable of much more including
+ selectively filtering out common errors which you might want to
+ ignore for the moment, compiling parts of a document, setting
+ levels of verbosity in the compiler output etc. See <ulink
+ url="http://vim-latex.sourceforge.net/documentation/latex-suite/latex-compiling.html">here</ulink>
+ for more.
+ </para>
+ </section>
+ <section id="lsq-viewing-dvi">
+ <title>Viewing DVI files</title>
+ <para>
+ Now that you have compiled your first latex source, its time to
+ view it. Again, this should be pretty simple. Press
+ <literal>\lv</literal> in normal mode. Depending on your platform, a DVI
+ viewer program should open up and display the dvi file generated in
+ compilation step previously.
+ </para>
+ <para>
+ Nothing happend? Ouch! You might need to do some additional settings as
+ described <ulink
+ url="http://vim-latex.sourceforge.net/index.php?subject=faq&amp;title=FAQ#faq-3">here.</ulink>
+ </para>
+ <section id="lsq-quick-forward-searching">
+ <title>Performing forward searches</title>
+ <para>
+ If you are using a modern DVI viewer, then it is possible to do what
+ is called forward and inverse searching. However, you will need to
+ customize the standard Latex-Suite distribution in order to utilize
+ this functionality. Type in the following on the command line:
+
+ <programlisting>:let g:Tex_CompileRule_dvi = 'latex -src-specials -interaction=nonstopmode $*'
+:TCTarget dvi</programlisting>
+
+ Now recompile the latex file by pressing <literal>\ll</literal>.
+ This time, instead of pressing <literal>\lv</literal> to view the
+ file, press <literal>\ls</literal> from within the tex file. If the
+ DVI viewer supports forward searching (most of them do), then the
+ viewer will actually display the portion of the DVI file
+ corresponding to the location where you were editing the tex file.
+ </para>
+ <note>
+ <para>
+ The reason Latex-Suite does not have this setting by default is
+ that on some systems this causes unpredictable results in the DVI
+ output. If you find the DVI output satisfactory, then you can
+ insert the first of the 2 lines above into your
+ <literal>$VIM/ftplugin/tex.vim</literal> file.
+ <literal>$VIM</literal> is <literal>~/vimfiles</literal> for
+ windows and <literal>~/.vim</literal> for *nix machines.
+ </para>
+ </note>
+ </section>
+ <section id="lsq-quick-inverse-searching">
+ <title>Performing inverse searches</title>
+ <para>
+ Most DVI viewers also support inverse searching, whereby you can
+ make the DVI viewer ask vim to display the tex source corresponding
+ to the DVI file being shown. This is extremely helpful while
+ proofreading large documents.
+ </para>
+
+ <para>
+ Simply double-click anywhere in the viewer window. If the viewer
+ supports it, then it will attempt to open an editor window at the
+ location corresponding to where you double-clicked. On *nix
+ platforms, Latex-Suite attempts to start the viewer program in such
+ a way that it already knows to use vim to open the tex source. Thus
+ you should see a vim window open up showing the tex file. However,
+ if there is an error, or some other program is used, you will need
+ to tell the viewer program to use gvim as the editor. On windows
+ platforms, if you use the commonly available <literal>yap</literal>
+ viewer (available as part of the miktex distribution), then this
+ option can be set from <literal>View &gt; Options &gt; Inverse
+ Search</literal>. In the <literal>Command line:</literal> window,
+ write
+ <programlisting>"C:\Program Files\vim\vim61\gvim" -c ":RemoteOpen +%l %f"</programlisting>
+ (Customize the path according to where you have installed gvim).
+ If you double click in the view pane now, you will see gvim start
+ up and take you to the relevant portion of the tex file.
+ </para>
+ </section>
+ </section>
+ <section id="lsq-conclusions">
+ <title>Conclusions</title>
+ <para>
+ Thats all folks! By now, you should know enough of the basic functions
+ of latex-suite. Ofcourse, latex-suite is capable of much, much more such
+ as compiling files multiple times to resolve changed labels, compiling
+ dependencies, handling user packages and more. To get a feel for that,
+ you will need to take a look at the <ulink
+ url="http://vim-latex.sourceforge.net/index.php?subject=manual&amp;title=Manual#user-manual">&ls;
+ user manual.</ulink>
+ </para>
+ </section>
+</article>
+
+<!--
+vim: et:sw=1:ts=1
+-->
diff --git a/src/vim-latex/doc/latex-suite.css b/src/vim-latex/doc/latex-suite.css
new file mode 100644
index 0000000..52c746e
--- /dev/null
+++ b/src/vim-latex/doc/latex-suite.css
@@ -0,0 +1,182 @@
+/*
+ * Authors: Srinath Avadhanula and Mikolaj Machowski
+ * This style file borrows some elements from main.css, the style file used
+ * in cream.sf.net
+ *
+ * */
+P {
+ font-size : 12pt ;
+ font-family : helvetica, arial, verdana, sans-serif ;
+ vertical-align : top;
+}
+DT {
+ font-size : 11pt ;
+ font-family : helvetica, arial, verdana, sans-serif ;
+ vertical-align : top;
+}
+LI {
+ font-size : 12pt ;
+ font-family : helvetica, arial, verdana, sans-serif ;
+ vertical-align : top;
+}
+
+DIV.header {
+ margin : 0.5cm ;
+ width : 800px ;
+ height : 100
+}
+.note {
+}
+
+TD {
+ font-size : 11pt ;
+ font-family : helvetica, arial, verdana, sans-serif ;
+ vertical-align : top;
+}
+TD.menu {
+ text-align : center ;
+ font-family : verdana, helvetica, sans-serif
+}
+TD.footright {
+ text-align : right ;
+ font-size : 10pt ;
+ font-family : verdana, helvetica, sans-serif
+}
+TD.leftpanel {
+ font-size: 14px ;
+ font-family: verdana, helvetica, sans-serif ;
+ vertical-align: top ;
+ width: 150px;
+ padding: 15px;
+ background-color: #88aaaa;
+}
+TD.mainpanel {
+ font-size : 12pt ;
+ font-family : helvetica, arial, verdana, sans-serif ;
+ vertical-align : top;
+ padding: 15px;
+}
+TD.footpanel {
+ font-size: 12px ;
+ font-family: verdana, helvetica, sans-serif ;
+ vertical-align: top ;
+ text-align: right;
+ padding: 5px;
+ background-color: #88aaaa;
+}
+.navigation {
+ vertical-align: top;
+ width: 150px;
+ padding: 15px;
+ background-color: #445555;
+ color: #fffcfc;
+}
+.navheader {
+ margin-top: -0.5em;
+ margin-bottom: 0.5em;
+ text-align: right;
+ color: #446644;
+ font-size: 14px;
+ font-weight: bold;
+}
+
+SPAN.menu {
+ text-align : center ;
+ font-size : 12pt ;
+ font-family : verdana, helvetica, sans-serif
+}
+
+DIV.merit {
+ margin : 0.5cm ;
+ width : 800px
+}
+
+TABLE.meritum {
+ margin : 0.5cm ;
+ border : 0
+}
+.foot {
+ margin : 0.5cm ;
+ width : 800px
+}
+.head {
+ margin : 0.5cm ;
+}
+
+CODE {
+ font-family: "Andale Mono", "Courier New", "Courier", monospace;
+ background-color: #eef0f3;
+ white-space: nowrap;
+}
+
+.singlesmall {
+ font-size: 14px;
+}
+
+.doublesmall {
+ font-size: 12px;
+}
+
+
+DIV.footer {
+ margin : 0.5cm ;
+ width : 800px
+}
+.qa {
+ margin : 0.5cm ;
+ font-size : 16px;
+ font-weight : bold;
+}
+.ans {
+ margin : 0.5cm ;
+ font-weight : normal;
+}
+
+H2.hline {
+ text-align : center ;
+ font-family : verdana, helvetica, sans-serif
+}
+
+A.extlinks {
+ font-size : 11pt ;
+ font-family : verdana, helvetica, sans-serif ;
+ font-weight : bold
+}
+
+TT {
+ font-family: courier,sans-serif;
+ font-size: 11pt;
+}
+PRE.programlisting {
+ font-family: courier,sans-serif;
+ font-size: 10pt;
+ background-color:#eef0f3;
+ border-color: #000000;
+ border-width: 1px;
+ border-style: solid;
+}
+SPAN.conflict {
+ font-size : small ;
+ font-family: courier,sans-serif;
+ color : #DD4444;
+}
+HR.navig {
+ color: #446644;
+ height: 1px;
+ margin-top: 1em;
+ border-top: 0px; /* Mozilla work-around to eliminate "groove" */
+}
+A.question {
+ color: #000000;
+ height: 1px;
+ margin-top: 1em;
+ border-top: 0px; /* Mozilla work-around to eliminate "groove" */
+}
+A.question:hover {
+ color: #000000;
+ background-color: #eef0f3;
+ height: 1px;
+ margin-top: 1em;
+ border-top: 0px; /* Mozilla work-around to eliminate "groove" */
+}
+
diff --git a/src/vim-latex/doc/latex-suite.txt b/src/vim-latex/doc/latex-suite.txt
new file mode 100644
index 0000000..b55e053
--- /dev/null
+++ b/src/vim-latex/doc/latex-suite.txt
@@ -0,0 +1,3460 @@
+ 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
+compile LaTeX documents in Vim. Together, they provide tools starting from
+macros to speed up editing LaTeX documents to functions for forward searching
+.dvi documents. Latex-Suite has been possible because of the contributions of
+many people. Please see latex-suite-credits [|ls_a_dU|] for a list of people who
+have helped.
+
+Latex-Suite is released under the Vim charityware license. For license and
+conditions of use look at |copyright|. Replace all occurrences of ``Vim'' with
+``Latex-Suite''. The current copyright holders of Latex-Suite are Srinath
+Avadhanula and Mikolaj Machowski.
+
+Homepage: http://vim-latex.sourceforge.net |ls_u_1|
+
+
+
+ *latex-suite.txt-toc*
+|ls_1| Installation and recommended Settings
+|ls_2| Inserting Templates
+|ls_3| Latex-Suite Macros
+ |ls_3_1| Environment Mappings
+ |ls_3_2| Command Mappings
+ |ls_3_3| Font Mappings
+ |ls_3_4| Section Mappings
+ |ls_3_5| Greek Letter Mappings
+ |ls_3_6| Auc-Tex Key Bindings
+ |ls_3_7| Diacritics
+ |ls_3_8| BibTeX Shortcuts
+ |ls_3_9| Smart Key Mappings
+ |ls_3_10| Alt Key Macros
+ |ls_3_11| Custom Macros
+ |ls_3_12| Making your own Macros via IMAP()
+|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 completion example
+ |ls_5_2| Latex-Suite \ref completion
+ |ls_5_3| Latex-Suite \cite completion
+ |ls_5_4| Latex-Suite filename completion
+ |ls_5_5| Custom command completion
+|ls_6| LaTeX Compiling
+ |ls_6_1| Setting Compilation rules
+ |ls_6_2| Handling dependencies in compilation
+ |ls_6_3| Compiling multiple times
+ |ls_6_4| Customizing the compiler output
+ |ls_6_5| Compiling parts of a file
+|ls_7| Latex Viewing and Searching
+ |ls_7_1| Setting Viewing rules
+ |ls_7_2| Forward Searching documents
+ |ls_7_3| Inverse Searching
+|ls_8| Latex Folding
+ |ls_8_1| Default Folding Scheme in Latex-Suite
+ |ls_8_2| Customizing what to fold
+ |ls_8_3| Editing the folding.vim file directly
+|ls_9| Multiple file LaTeX projects
+ |ls_9_1| Latex-Suite project settings
+ |ls_9_2| Specifying which file to compile
+|ls_10| Latex-Suite Commands and Maps
+ |ls_10_1| Latex-Suite Maps
+ |ls_10_2| Latex Suite Commands
+|ls_11| Customizing Latex-Suite
+ |ls_11_1| General Settings
+ |ls_11_2| Place-Holder Customization
+ |ls_11_3| Macro Customization
+ |ls_11_4| Smart Key Customization
+ |ls_11_5| Latex Completion Customization
+ |ls_11_6| Compiler Customization
+ |ls_11_7| Viewer Customization
+ |ls_11_8| Menu Customization
+ |ls_11_9| Folding Customization
+ |ls_11_10| Package Handling Customization
+|ls_12| Credits
+
+================================================================================
+Viewing this file
+
+This file can be viewed with all the sections and subsections folded to ease
+navigation. By default, vim does not fold help documents. To create the folds,
+press za now. The folds are created via a foldexpr which can be seen in the
+last section of this file.
+
+See |usr_28.txt| for an introduction to folding and |fold-commands| for key
+sequences and commands to work with folds.
+
+================================================================================
+Installation and recommended Settings *ls_1* *ls_a_bc*
+ *recommended-settings*
+
+
+
+If you are reading this, it most probably means that you have already installed
+Latex-Suite and the help files. If this is not the case, follow the detailed
+instructions on Latex-Suite's download page |ls_u_2|.
+
+Make sure that you create a few necessary settings in your ~/.vimrc. >
+
+ " REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
+ filetype plugin on
+
+ " IMPORTANT: win32 users will need to have 'shellslash' set so that latex
+ " can be called correctly.
+ set shellslash
+
+ " IMPORTANT: grep will sometimes skip displaying the file name if you
+ " search in a singe file. This will confuse Latex-Suite. Set your grep
+ " program to always generate a file-name.
+ set grepprg=grep\ -nH\ $*
+
+ " OPTIONAL: This enables automatic indentation as you type.
+ filetype indent on
+
+ " OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
+ " 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
+ " The following changes the default filetype back to 'tex':
+ let g:tex_flavor='latex'
+
+
+
+In addition, the following settings could go in your ~/.vim/ftplugin/tex.vim
+file: >
+ " this is mostly a matter of taste. but LaTeX looks good with just a bit
+ " of indentation.
+ set sw=2
+ " TIP: if you write your \label's as \label{fig:something}, then if you
+ " type in \ref{fig: and press <C-n> you will automatically cycle through
+ " all the figure labels. Very useful!
+ set iskeyword+=:
+
+
+
+================================================================================
+Inserting Templates *ls_2* *ls_a_bd*
+ *latex-suite-templates*
+
+
+
+This functionality is available via the TeX-Suite > Templates menu. This module
+provides a way to insert custom templates at the beginning of the current file.
+
+When Latex-Suite first starts up, it scans the
+$VIM/ftplugin/latex-suite/templates/ directory and creates menu items based on
+the files found there. When you select a template from this menu, the file will
+be read in above the first line of the current file.
+
+A template file can utilize placeholders for initializing the cursor position
+when the template is read in and subsequent movement. In addition, template
+files can contain dynamic elements such as the time of creation of a file etc,
+by using vim expressions.
+
+You can place your own templates in the $VIM/ftplugin/latex-suite/templates/
+directory in order for them to be available via the menu. Unless Latex-Suite
+releases a template with the same name, these files should not get over-written
+when you install a new release over an existing one.
+
+NOTE: Templates are also accessible for non-gui users with the command
+ |:TTemplate|. The argument should be name of the corresponding template
+ file. If the command is called without arguments (preferred usage), then a
+ list of available templates is displayed and the user is asked to choose
+ one of them.
+
+
+
+================================================================================
+Latex-Suite Macros *ls_3* *ls_a_be*
+ *latex-macros*
+
+|ls_3_1| Environment Mappings
+|ls_3_2| Command Mappings
+|ls_3_3| Font Mappings
+|ls_3_4| Section Mappings
+|ls_3_5| Greek Letter Mappings
+|ls_3_6| Auc-Tex Key Bindings
+|ls_3_7| Diacritics
+|ls_3_8| BibTeX Shortcuts
+|ls_3_9| Smart Key Mappings
+|ls_3_10| Alt Key Macros
+|ls_3_11| Custom Macros
+|ls_3_12| Making your own Macros via IMAP()
+
+
+Latex-Suite ships with a very comprehensive set of insert mode and |visual-mode|
+mappings and menu items to typeset most of the LaTeX elements.
+
+NOTE: These mappings are are not standard mappings in the sense that only the
+ last character is mapped. See plugin/imaps.vim for further documentation.
+ For example, in the case of the mapping EFI provided by Latex-Suite you
+ can press the characters 'E', 'F' and 'I' as slowly as you wish (unlike
+ the normal imap command where timeout issues are involved). The characters
+ are visible as you type them (unlike normal imaps) and you can use the
+ movement or backspace key to correct yourself unlike normal mappings.
+
+
+ *place-holder* *ls_a_dV*
+ *place-holders* *ls_a_eD*
+NOTE: Place Holders
+ -------------
+ Almost all macros provided in Latex-Suite implement Stephen Riem's
+ bracketing system and Gergely Kontra's JumpFunc() for handling
+ place-holders. This consists of using "place-holders" to mark off
+ locations where the next relevant editing has to be done. As an example,
+ when you type EFI in |insert-mode|, you will get the following: >
+ \begin{figure}[h]
+ \centerline{\psfig{figure=<+eps file+>}}
+ \caption{<+caption text+>}
+ \label{fig:<+label+>}
+ \end{figure}<++>
+< The text <+eps file+> will be selected and you will be left in
+ |select-mode| so that you can continue typing straight away. After having
+ typed in the file name, you can press <Ctrl-J> (while still in
+ insert-mode). This will take you directly to the next "place-holder". i.e,
+ <+caption text+> will be visually selected with Vim in select mode again
+ for typing in the caption. This saves on a lot of key presses.
+
+
+ *overriding-macros* *ls_a_eE*
+NOTE: Over-riding Latex-Suite Macros
+ ------------------------------
+ If you wish to change these macros from their default values, for example,
+ if you wish to change `w to expand to \omega instead of its default
+ expansion to \wedge, you should use the IMAP function as described in the
+ Using IMAP() [|ls_a_bG|] section.
+
+ An important thing to note is that if you wish to over-ride macros created
+ by Latex-Suite rather than merely create new macros, you should place the
+ IMAP() calls in a script which gets sourced after the files in
+ Latex-Suite. A good place typically is as a file-type plugin file in the
+ ~/.vim/after/ftplugin/ directory. (Use ~/vimfiles if you are using
+ WINDOWS). For example to over-ride `w to \omega instead of \wedge, place
+ the following line in (say) ~/.vim/after/ftplugin/tex_macros.vim: >
+ call IMAP('`w', '\omega', 'tex')
+<
+
+ NOTE: It is important to use a file-name which will get sourced on a
+ FileType event. Therefore you must use a file-name which conforms to
+ the standards as described in |ftplugin-name|.
+
+
+
+ *pausing-imaps* *ls_a_eF*
+NOTE: Pausing Macro expansion
+ -----------------------
+ If you wish to temporarily suspend the imaps functionality, then you can
+ set the Imap_FreezeImap to 1. If you set g:Imap_FreezeImap to 1, then it
+ will be a system-wide setting. Setting b:Imap_FreezeImap will affect only
+ the current buffer.
+
+
+The following sections describe the various editing macros provided by
+Latex-Suite.
+
+
+--------------------------------------------------------------------------------
+Environment Mappings *ls_3_1* *ls_a_bf*
+ *environment-mappings*
+
+Latex-Suite provides a rich set of mappings to insert, enclose and modify LaTeX
+environments, i.e, \begin{...} ... \end{...} pairs.
+
+Inserting Environments *ls_3_1_1* *ls_a_bg*
+ *inserting-environments*
+
+Latex-Suite provides the following ways to insert environments
+
+
+
+Method 1: Pressing <F5> *ls_3_1_1_1* *ls_a_bh*
+ *inserting-env-f5*
+
+If you press <F5> in the insert or normal 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. If
+you press <F5> on a line which already has a word, then that word is used
+instead of prompting.
+
+See Tex_Env_name [|ls_a_cZ|] for a description of how Latex-Suite uses the word
+to form the expansion and how to modify Latex-Suite's behavior.
+
+The list of environments which Latex-Suite prompts you with (when <F5> is
+pressed on an empty line) is formed from the Tex_PromptedEnvironments
+[|ls_a_di|] setting.
+
+In addition to this setting, Latex-Suite also lists environments found in custom
+packages as described in the section Package actions. [|ls_a_bL|]
+
+
+Method 2: Using <S-F1>-<S-F4> *ls_3_1_1_2* *ls_a_bi*
+ *inserting-env-shift-f1*
+
+The shifted function keys, <S-F1> to <S-F4> can be mapped to insert very
+commonly used environments. The environments mapped to each key can be
+customized via the g:Tex_HotKeyMappings [|ls_a_dj|] setting.
+
+
+Method 3: Using three letter sequences *ls_3_1_1_3* *ls_a_bj*
+ *inserting-env-threeletter*
+
+Environments can also be inserted by pressing a 3 capital letter sequence
+starting with an E. The sequence of 3 letters generally tries to follow the
+following rules:
+
+
+1. All environment mappings begin with E
+
+2. If the environment can be broken up into 2 distinct words, such as flushright
+ (flush + right), then the next 2 letters are the first letters of the 2
+ words. Example: >
+ flushleft (_f_lush + _l_eft) ---> EFL
+ flushright (_f_lush + _r_ight) ---> EFR
+ eqnarray (_e_qn + _a_rray) ---> EEA
+< If on the other hand, the environment name cannot be broken up into 2
+ distinct words, then the next 2 letters are the first 2 letters of the name
+ of the environment. Example: >
+ equation (_eq_uation) ---> EEQ
+<
+Unfortunately there are some environments that cannot be split in two words and
+first two letters in name are identical. In this case shortcut is created from
+E, first and last letter. Example: >
+ quote (_q_uot_e_) ---> EQE
+ quotation (_q_uotatio_n_) ---> EQN
+Of course, not every last one of the environments can follow this rule because
+of ambiguities. In case of doubt, pull down the Tex-Environments menu. The menu
+item should give the hint for the map.
+
+
+Enclosing in Environments *ls_3_1_2* *ls_a_bk*
+ *enclosing-environments*
+
+Latex-Suite provides visual-mode mappings which enclose visually selected
+portions of text in environments. There are two ways provided to do this.
+
+
+
+Method 1: Pressing <F5> *ls_3_1_2_1* *ls_a_bl*
+ *enclosing-env-f5*
+
+You can also select a portion of text visually and press <F5> while still in
+visual mode. This will prompt you with a list of environments. (This list can be
+customized via the g:Tex_PromptedEnvironments [|ls_a_di|] setting). You can
+either choose from this list or type in a new environment name. Once the
+selection is done, Latex-Suite encloses the visually selected portion in the
+chosen environment.
+
+
+Method 2: Using three letter mappings *ls_3_1_2_2* *ls_a_bm*
+ *enclosing-env-threeletter*
+
+You can also select text visually and press a sequence of three characters
+beginning with , (the single comma character) and the selected text will be
+enclosed in the chosen environment. The three letter sequence follows directly
+from the three letter sequence used to insert environments as described here
+[|ls_a_bj|]. The following example describes the rule used:
+
+If ECE inserts a \begin{center}...\end{center} environment, then to enclose a
+block of selected text in \begin{center}...\end{center}, simply select the text
+and press ,ce. The rule simply says that the leading E is converted to , and the
+next 2 letters are small case.
+Some of the visual mode mappings are sensitive to whether you choose line-wise
+or character-wise. For example, if you choose a word and press ,ce, then you get
+\centerline{word}, whereas if you press ,ce on a line-wise selection, you get: >
+ \begin{center}
+ line
+ \end{center}
+
+
+
+Changing Environments *ls_3_1_3* *ls_a_bn*
+ *changing-environments*
+
+Pressing <S-F5> in normal mode detects which environment the cursor is presently
+located in and prompts you to replace it with a new one. The innermost
+environment is detected. For example, in the following source: >
+ \begin{eqnarray}
+ \begin{array}{ccc}
+ 2 & 3 & 4
+ \end{array}
+ \end{eqnarray}
+if you are located in the middle "2 & 3 & 4" line, then pressing <S-F5> will
+prompt you to change the array environment, not the eqnarray environment. In
+addition, Latex-Suite will also try to change lines within the environment to be
+consistent with the new environment. For example, if the original environment
+was an eqnarray environment with a \label command, then changing it to an
+eqnarray* environment will delete the \label.
+
+Pressing <F5> in normal mode has the same effect as pressing <F5> in
+insert-mode, namely you will be prompted to choose an environment to insert.
+
+--------------------------------------------------------------------------------
+Command Mappings *ls_3_2* *ls_a_bo*
+ *latex-command-maps*
+
+Latex-Suite provides a rich set of mappings to insert, enclose and modify LaTeX
+commands.
+
+Inserting LaTeX commands *ls_3_2_1* *ls_a_bp*
+ *inserting-commands*
+
+ *ls-imap-f7* *ls_a_dW*
+ *ls-imap-s-f7* *ls_a_dX*
+Pressing <F7> in insert or normal mode while the cursor is touching a word will
+insert a command formed from the word touching the cursor.
+
+For certain common commands, Latex-Suite will expand them to include additional
+arguments as needed. For example, frac becomes \frac{<++>}{<++>}<++>. Otherwise,
+it will simply change the word under the cursor as follows >
+ word --> \word{<++>}<++>
+You can define custom expansions of commands using the Tex_Com_{name} setting as
+described in here [|ls_a_da|].
+
+If <F7> is pressed when the cursor is on white-space, then Latex-Suite will
+prompt you to choose a command and insert that instead.The list of commands is
+constructed from the g:Tex_PromptedCommands [|ls_a_dk|] setting and also from
+commands which Latex-Suite finds while scanning custom packages which
+Latex-Suite finds. See the Package actions [|ls_a_bL|] section for details on
+which files are scanned etc.
+
+
+Enclosing in a command *ls_3_2_2* *ls_a_bq*
+ *enclosing-commands*
+
+You can select a portion of text visually and press <F7> while still in visual
+mode. This will prompt you with a list of commands. (This list can be customized
+via the g:Tex_PromptedCommands [|ls_a_dk|] setting). You can either choose from
+this list or type in a new command name. Once the selection is done, Latex-Suite
+encloses the visually selected portion in the chosen command.
+
+
+Changing commands *ls_3_2_3* *ls_a_br*
+ *changing-commands*
+
+ *ls-vmap-f7* *ls_a_dY*
+In both insert and normal mode <S-F7> will find out if you are presently within
+an environment and then prompt you with a list of commands to change it to.
+
+--------------------------------------------------------------------------------
+Font Mappings *ls_3_3* *ls_a_bs* *font-maps*
+
+These mappings insert font descriptions such as: \textsf{<++>}<++> with the
+cursor left in place of the first placeholder [|ls_a_eD|] (the <++> characters).
+
+Mnemonic:
+1. first letter is always F (F for font)
+
+2. next 2 letters are the 2 letters describing the font.
+
+Example: Typing FEM in insert-mode expands to \emph{<++>}<++>.
+
+Just like environment mappings, you can visually select an area and press `sf to
+have it enclosed in: \textsf{word} or >
+ {\sffamily
+ line
+ }
+depending on character-wise or line-wise selection.
+
+--------------------------------------------------------------------------------
+Section Mappings *ls_3_4* *ls_a_bt*
+ *section-mappings*
+
+These maps insert LaTeX sections such as: >
+ \section{<++>}<++>
+etc. Just as in the case of environments and fonts, can be enclosed with a
+visual selection. The enclosing is not sensitive to character or line-wise
+selection.
+
+Mnemonic: (make your own!) >
+ SPA for part
+ SCH for chapter
+ SSE for section
+ SSS for subsection
+ SS2 for subsubsection
+ SPG for paragraph
+ SSP for subparagraph
+
+
+Example: SSE in insert mode inserts >
+ \section{<++>}<++>
+If you select a word or line and press ,se, then you get >
+ \section{section name}
+The menu item in Tex-Environments.Sections have a sub-menu called 'Advanced'.
+Choosing an item from this sub-menu asks a couple of questions (whether you want
+to include the section in the table of contents, whether there is a shorter name
+for the table of contents) and then creates a more intelligent template.
+
+--------------------------------------------------------------------------------
+Greek Letter Mappings *ls_3_5* *ls_a_bu*
+ *greek-letter-mappings*
+
+Lower case
+
+`a through `z expand to \alpha through \zeta.Upper case:
+
+ >
+ `D = \Delta
+ `F = \Phi
+ `G = \Gamma
+ `Q = \Theta
+ `L = \Lambda
+ `X = \Xi
+ `Y = \Psi
+ `S = \Sigma
+ `U = \Upsilon
+ `W = \Omega
+NOTE: LaTeX does not support upper case for all greek alphabets.
+
+
+Just like other Latex-Suite mappings, these mappings are not created using the
+standard imap command. Thus you can type slowly, correct using <BS> etc.
+
+--------------------------------------------------------------------------------
+Auc-Tex Key Bindings *ls_3_6* *ls_a_bv*
+ *auc-tex-mappings*
+
+These are simple 2 key expansions for some very commonly used LaTeX elements:
+
+ >
+ `^ Expands To \Hat{<++>}<++>
+ `_ expands to \bar{<++>}<++>
+ `6 expands to \partial
+ `8 expands to \infty
+ `/ expands to \frac{<++>}{<++>}<++>
+ `% expands to \frac{<++>}{<++>}<++>
+ `@ expands to \circ
+ `0 expands to ^\circ
+ `= expands to \equiv
+ `\ expands to \setminus
+ `. expands to \cdot
+ `* expands to \times
+ `& expands to \wedge
+ `- expands to \bigcap
+ `+ expands to \bigcup
+ `( expands to \subset
+ `) expands to \supset
+ `< expands to \le
+ `> expands to \ge
+ `, expands to \nonumber
+ `~ expands to \tilde{<++>}<++>
+ `; expands to \dot{<++>}<++>
+ `: expands to \ddot{<++>}<++>
+ `2 expands to \sqrt{<++>}<++>
+ `| expands to \Big|
+ `I expands to \int_{<++>}^{<++>}<++>
+(again, notice the convenient place-holders)
+
+In addition the visual mode macros are provided:
+
+ >
+ `( encloses selection in \left( and \right)
+ `[ encloses selection in \left[ and \right]
+ `{ encloses selection in \left\{ and \right\}
+ `$ encloses selection in $$ or \[ \] depending on characterwise or
+ linewise selection
+
+
+--------------------------------------------------------------------------------
+Diacritics *ls_3_7* *ls_a_bw*
+ *diacritic-mappings*
+
+These mappings speed up typing European languages which contain diacritic
+characters such as a-umlaut etc. >
+ +<l> expands to \v{<l>}
+ =<l> expands to \'{<l>}
+where <l> is an alphabet.
+
+ >
+ +} expands to \"{a}
+ +: expands to \^{o}
+Latex-Suite also ships with smart backspacing [|ls_a_dZ|] functionality which
+provides another convenience while editing languages with diacritics.
+
+NOTE: Diacritics are disabled by default in Latex-Suite because they can
+ sometimes be a little too intrusive. Moreover, most European users can
+ nowadays use font encodings which display diacritic characters directly
+ instead of having to rely on Latex-Suite's method of displaying
+ diacritics.
+
+ Set the g:Tex_Diacritics [|ls_a_df|] variable to enable diacritics.
+
+
+
+--------------------------------------------------------------------------------
+BibTeX Shortcuts *ls_3_8* *ls_a_bx*
+ *bibtex-bindings*
+
+Latex-Suite provides an easy way of entering bibliographic entries. Four
+insert-mode mappings: BBB, BBL, BBH and BBX are provided, all of which
+essentially act in the same manner. When you type any of these in insert-mode,
+you will get a prompt asking you to choose a entry type for the bibliographic
+entry.
+
+When you choose an entry type, a bibliographic entry template will be inserted.
+For example, if you choose the option 'book' via the map BBB, then the following
+template will be inserted: >
+ @BOOK{<+key+>,
+ author = {<++>},
+ editor = {<++>},
+ title = {<++>},
+ publisher = {<++>},
+ year = {<++>},
+ otherinfo = {<++>}
+ }<++>
+
+
+<+key+> will be highlighted in select-mode and you can type in the bib-key.
+After that you can use <Ctrl-J> to navigate to successive locations in the
+template and enter new values.
+
+BBB inserts a template with only the fields mandatorily required for a given
+entry type. BBL inserts a template with commonly used extra options. BBH inserts
+a template with more options which are not as commonly used. BBX inserts a
+template with all the fields which the entry type supports.
+
+NOTE: Mnemonic
+ --------
+ B for Bibliographic entry, L for Large entry, H for Huge entry, and X
+ stands for all eXtras.
+
+
+
+
+Customizing Bib-TeX fields *ls_3_8_1* *ls_a_by*
+ *adding-bib-options*
+
+If you wish the BBB command to insert a few additional fields in addition to the
+fields it creates, then you will need to define global variables of the form >
+ g:Bib_{type}_options
+in you $VIM/ftplugin/bib.vim file, where {type} is a string like 'article',
+'book' etc. This variable should contain one of the letters defined in the
+following table
+
+Character Field Type~
+w address
+a author
+b booktitle
+c chapter
+d edition
+e editor
+h howpublished
+i institution
+k isbn
+j journal
+m month
+z note
+n number
+o organization
+p pages
+q publisher
+r school
+s series
+t title
+u type
+v volume
+y year
+
+For example, by default, choosing 'article' via BBB inserts the following
+template by default >
+ @ARTICLE{<+key+>,
+ author = {<++>},
+ title = {<++>},
+ journal = {<++>},
+ year = {<++>},
+ otherinfo = {<++>}
+ }<++>
+However, if g:Bib_article_options is defined as 'mnp', then 'article' will
+insert the following template >
+ @ARTICLE{<+key+>,
+ author = {<++>},
+ title = {<++>},
+ journal = {<++>},
+ year = {<++>},
+ month = {<++>},
+ number = {<++>},
+ pages = {<++>},
+ otherinfo = {<++>}
+ }<++>
+
+
+If you have some other fields you wish to associate with an article which are
+not listed above, then you will have to use the Bib_{type}_extrafields option.
+This is a newline separated string of complete field names which will be
+included in the template. For example, if you define >
+ let g:Bib_article_extrafields = "crossref\nabstract"
+then the article template will include the lines >
+ crossref = {<++>},
+ abstract = {<++>},
+
+
+NOTE: You will need to define Bib_* settings in your
+ $VIMRUNTIME/ftplugin/bib.vim file.
+
+
+
+--------------------------------------------------------------------------------
+Smart Key Mappings *ls_3_9* *ls_a_bz*
+ *smart-keys*
+
+Latex-Suite ships with the following smart keys:
+
+Smart Backspace
+---------------
+ *smart-backspace* *ls_a_dZ*
+Pressing <BS> in insert mode checks to see whether we are just after something
+like \'{a} and if so, deletes all of it. i.e, diacritics are treated as single
+characters for backspacing.
+
+Smart Quotes
+------------
+Pressing " (English double quote) will insert `` or '' by making an intelligent
+guess about whether we intended to open or close a quote.
+
+Smart Space
+-----------
+Latex-Suite maps the <space> key in such a way that $ characters are not broken
+across lines. It does this by first setting tw=0 so that Vim will not
+automatically break lines and then maps the <space> key to insert newlines
+keeping $$'s on the same line.
+
+Smart Dots
+----------
+Pressing ... (3 dots) results in \ldots outside math mode and \cdots in math
+mode.
+
+--------------------------------------------------------------------------------
+Alt Key Macros *ls_3_10* *ls_a_bA*
+ *altkey-mappings*
+
+Latex-Suite utilizes a set of macros originally created by Carl Mueller in
+auctex.vim to make inserting all the \left ... \right stuff very easy and to
+also make some use of the heavily under-utilized <Alt> key.
+
+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.
+
+
+NOTE: Customizing the maps
+ --------------------
+ If for some reason, you wish to not map the <Alt> keys, (some European
+ users need to use the <Alt> key to enter diacritics), you can change these
+ maps to other keys as described in the section Customizing Alt-key maps
+ [|ls_a_cx|].
+
+
+
+
+<Alt-L> *ls_3_10_1* *ls_a_bB* *Alt-L*
+
+This is a polymorphic insert-mode mapping which expands to one of the following
+depending on the character just before the cursor location.
+
+Character before cursor Expansion~
+( \left( <++> \right)
+[ \left[ <++> \right]
+| \left| <++> \right|
+{ \left\{ <++> \right\}
+< \langle <++> \rangle
+q \lefteqn{<++>}<++>
+
+If the character before the cursor is none of the above, then it will simply
+insert a \label{<++>}<++>.
+
+
+<Alt-B> *ls_3_10_2* *ls_a_bC* *Alt-B*
+
+This insert-mode mapping encloses the previous character in \mathbf{}.
+
+
+<Alt-C> *ls_3_10_3* *ls_a_bD* *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-I> *ls_3_10_4* *ls_a_bE* *Alt-I*
+
+This mapping inserts an \item command at the current cursor location depending
+on which environment the cursor is enclosed in. The style of the \item command
+is dependent on the enclosing environment. By default, <Alt-I> has styles
+defined forthe following environments:
+
+Environment Style~
+itemize \item
+enumerate \item
+theindex \item
+thebibliography \item[<+biblabel+>]{<+bibkey+>} <++>
+description \item[<+label+>] <++>
+
+<Alt-I> is intelligent enough to account for nested environments. For example, >
+ \begin{itemize}
+ \item first item
+ \item second item
+ \begin{description}
+ \item[label1] first desc
+ \item[label2] second
+ % <Alt-I> will insert "\item[<+label+>] <++>" if
+ % used here
+ \end{description}
+ \item third item
+ % <Alt-I> will insert "\item " when if used here.
+ \end{itemize}
+ % <Alt-I> will insert nothing ("") if used here
+<
+
+The style used by <Alt-I> can be customized using the
+g:Tex_ItemStyle_environment [|ls_a_dl|] variable.
+
+--------------------------------------------------------------------------------
+Custom Macros *ls_3_11* *ls_a_bF*
+ *custom-macros-menu*
+
+This functionality available via the TeX-Suite.Macros menu, provides a way of
+inserting customized macros into the current file via the menu.
+
+When Latex-Suite starts up, it scans the $VIM/ftplugin/latex-suite/macros/
+directory and creates a menu from the files found there. Each file is considered
+as a single macro. You can place your own macros in this directory, using
+placeholders [|ls_a_eD|] if wanted.
+
+When you choose a macro from the menu, the corresponding file is read into the
+current buffer after the current cursor position. In non-gui mode, you can use
+the |TMacro| command instead of choosing from the menu. This command takes the
+macro file name as an argument. When called without arguments (preferred usage),
+then a list of available macro files is displayed and the user is prompted to
+choose one of them).
+
+There are some other tools provided in this menu, namely:
+
+
+{New} Creates a new (unnamed) buffer in the latex-suite/macros/ directory.
+ Use the command :TexMacroNew in non-gui mode.
+{Edit} Opens up the corresponding macro file for editing. Use |:TexMacroEdit|
+ in non-gui mode. When you try to edit {macro} not from local directory
+ Latex-Suite will copy it to your local directory with suffix "-local".
+ If local copy already exists Latex-Suite prompt for overwriting it.
+{Delete} Deletes the corresponding macro. Use the prefixed numbers for fast
+ navigation of menus. Use |:TexMacroDelete| in non-gui mode. When you
+ choose to delete {macro} which is not in your local directory
+ Latex-Suite will refuse to delete it.
+{Redraw} Rescans the macros/ directories and refreshes the macros list.
+
+--------------------------------------------------------------------------------
+Making your own Macros via IMAP() *ls_3_12* *ls_a_bG*
+ *ls-new-macros*
+
+If you find the need to create your own macros, then you can use the IMAP()
+function provided with Latex-Suite. See [|ls_a_bH|] for a short explanation of
+why you might prefer IMAP() over Vim's standard :imap command. An example best
+explains the usage: >
+ :call IMAP('NOM', '\nomenclature{<++>}<++>', 'tex')
+This will create a Latex-Suite-style mapping, where if you type NOM in insert
+mode, you will get \nomenclature{<++>}<++> with the cursor left in place of the
+first <++> characters. See [|ls_a_bI|] for a detailed explanation of the IMAP()
+command.
+
+For maps which are triggered for a given filetype, the IMAP() command above
+should be put in the filetype plugin script for that file. For example, for
+tex-specific mappings, the IMAP() calls should go in $VIM/ftplugin/tex.vim. For
+globally visible maps, you will need to use the following in either your
+~/.vimrc or a file in your $VIM/plugin directory. >
+ augroup MyIMAPs
+ au!
+ au VimEnter * call IMAP('Foo', 'foo', '')
+ augroup END
+
+
+
+
+Why use IMAP() *ls_3_12_1* *ls_a_bH*
+ *why-IMAP*
+
+Using IMAP instead of Vim's built-in :imap command has a couple of advantages:
+1. The 'ttimeout' option will generally limit how easily you can type the left
+ hand side for a normal :imap. if you type the left hand side too slowly, then
+ the mapping will not be activated.
+
+2. If you mistype one of the letters of the lhs, then the mapping is deactivated
+ as soon as you backspace to correct the mistake.
+
+3. The characters in lhs are shown on top of each other. This is fairly
+ distracting. This becomes a real annoyance when a lot of characters initiate
+ mappings.
+
+
+IMAP() syntax *ls_3_12_2* *ls_a_bI*
+ *ls-imaps-syntax*
+
+Formally, the syntax which is used for the IMAP function is: >
+ call IMAP (lhs, rhs, ft [, phs, phe])
+
+
+Argument Explanation~
+lhs This is the "left-hand-side" of the mapping. When you use IMAP, only
+ the last character of this word is actually mapped, although the
+ effect is that the whole word is mapped.
+
+ If you have two mappings which end in a common lhs, then the mapping
+ with the longer lhs is used. For example, if you do >
+ call IMAP('BarFoo', 'something', 'tex')
+ call IMAP('Foo', 'something else', 'tex')
+< Then typing BarFoo inserts "something", whereas Foo by itself inserts
+ "something else".
+
+ Also, the nature of IMAP() makes creating certain combination of
+ mappings impossible. For example if you have >
+ call IMAP('foo', 'something', 'tex')
+ call IMAP('foobar', 'something else', 'tex')
+< Then you will never be able to trigger "foobar" because typing "foo"
+ will immediately insert "something". This is the "cost" which you
+ incur over the normal :imap command for the convenience of no
+ 'timeout' problems, the ability to correct lhs etc.
+
+
+rhs The "right-hand-side" of the mapping. This is the expansion you will
+ get when you type lhs.
+
+ This string can also contain special characters such as <enter> etc.
+ To do this, you will need to specify the second argument in
+ double-quotes as follows: >
+ :call IMAP('EFE', "\\begin{figure}\<CR><++>\\end{figure}<++>", 'tex')
+< With this, typing EFE is equivalent to typing in the right-hand side
+ with all the special characters in insert-mode. This has the advantage
+ that if you have filetype indentation set up, then the right hand side
+ will also be indented just as if you had typed it in normally.
+
+ *IMAP_PutTextWithMovement* *ls_a_ea*
+ You can also set up a Latex-Suite style mapping which calls a custom
+ function as follows: >
+ :call IMAP('FOO', "\<C-r>=MyFoonction()\<CR>", 'tex')
+< where MyFoonction is a custom function you have written. If
+ MyFoonction also has to return a string containing <++> characters,
+ then you will need to use the function IMAP_PutTextWithMovement(). An
+ example best explains the usage:
+
+ >
+ call IMAP('FOO', "\<C-r>=AskVimFunc()\<CR>", 'vim')
+ " Askvimfunc: Asks For Function Name And Sets Up Template
+ " Description:
+ function! AskVimFunc()
+ let name = input('Name of the function : ')
+ if name == ''
+ let name = "<+Function Name+>"
+ end
+ let islocal = input('Is this function scriptlocal ? [y]/n : ', 'y')
+ if islocal == 'y'
+ let sidstr = '<SID>'
+ else
+ let sidstr = ''
+ endif
+ return IMAP_PutTextWithMovement(
+ \ "\" ".name.": <+short description+> \<cr>" .
+ \ "Description: <+long description+>\<cr>" .
+ \ "\<C-u>function! ".name."(<+arguments+>)<++>\<cr>" .
+ \ "<+function body+>\<cr>" .
+ \ "endfunction \" "
+ \ )
+ endfunction
+<
+
+
+ft The file type for which this mapping is active. When this string is
+ left empty, the mapping applies for all file-types. A filetype
+ specific mapping will always take precedence.
+
+
+phs, phe If you prefer to write the rhs with characters other than <+ and +> to
+ denote place-holders, you can use the last 2 arguments to specify
+ which characters in the rhs specify place-holders. By default, these
+ are <+ and +> respectively.
+
+ Note that the phs and phe arguments do not control what characters
+ will be displayed for the placeholders when the mapping is actually
+ triggered. What characters are used to display place-holders when you
+ trigger an IMAP are controlled by the Imap_PlaceHolderStart
+ [|ls_a_cV|] and Imap_PlaceHolderEnd [|ls_a_er|] settings.
+
+
+
+================================================================================
+Package Handling *ls_4* *ls_a_bJ*
+ *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* *ls_a_bK*
+ *inserting-packages*
+
+When you first invoke Latex-Suite, it scans the
+$VIM/ftplugin/latex-suite/packages directory for package script files and
+creates a menu from all the files found there. This menu is created under
+TeX-Suite > Packages > Supported. This menu contains a list of packages
+"supported" by Latex-Suite. When you choose one of the packages from this menu
+(for example the amsmath package), then a line of the form >
+ \usepackage[<++>]{amsmath}<++>
+will be inserted into the current file.
+
+The \usepackage line can also be inserted in an easy manner in the current file
+by pressing <F5> 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 <F5> in the preamble on a line
+containing a single word will construct a \usepackage line from that word.
+
+You can also use the TPackage [|ls_a_cD|] to insert the \usepackage line.
+
+Once you have inserted a \usepackage line, for supported packages, you can use
+the Options and Commands menus described in the next section [|ls_a_bL|].
+
+--------------------------------------------------------------------------------
+Actions taken for supported packages *ls_4_2* *ls_a_bL*
+ *package-actions*
+
+Latex-Suite takes the following actions for packages detected when a file is
+loaded, or a new \usepackage line is inserted using one of the methods described
+in the previous section [|ls_a_bK|].
+
+If you are using the GUI and you have g:Tex_Menus [|ls_a_dI|] set to 1,
+Latex-Suite will create the following sub-menus
+TeX-Suite > Packages > <package> Options
+
+TeX-Suite > Packages > <package> Commands
+
+where <package> is the package you just inserted (or was detected). 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
+ appropriate 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-menus, Latex-Suite will also scan the
+$VIM/ftplugin/latex-suite/dictionaries directory and if a dictionary file
+corresponding to the package file is found, then it will add the file to the
+'dict' setting in Vim so you can use the <C-X><C-K> command to complete words
+from that file.
+
+For example, the SIUnits package has a custom dictionary.
+
+ *latex-package-scanning* *ls_a_eb*
+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 [|ls_a_dT|]
+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_a_bh|] or <F7> [|ls_a_dW|] in insert mode.
+In addition, the TeX-Suite > Packages menu also contains the following submenus
+
+Update
+------
+This command is to be invoked with the cursor placed on the package name. If the
+corresponding package is found, then a sub-menu with the supported commands and
+options is created.
+
+Update All
+----------
+This function reads the preamble of the document for \usepackage lines and if
+Latex-Suite supports the detected packages, then sub-menus containing the
+package options and commands are created.
+
+
+--------------------------------------------------------------------------------
+Automatic Package detection *ls_4_3* *ls_a_bM*
+ *automatic-package-detection*
+
+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 [|ls_a_ct|] has been specified, then it will scan that file
+instead of the current file. See the section Custom Packages [|ls_a_bN|] 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. [|ls_a_bL|].
+
+
+
+Custom Packages *ls_4_3_1* *ls_a_bN*
+ *custom-packages*
+
+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
+\usepackage line. Latex-Suite tries to search such customs package for other
+\usepackage lines, so that supported packages included in this indirect manner
+can also be used to create sub-menus, extend the 'dict' 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 $TEXINPUTS environment variable.
+
+If you use the $TEXINPUTS variable in LaTeX, and you wish Latex-Suite to search
+these custom packages for \usepackage lines, then you need to initialize the
+g:Tex_TEXINPUTS [|ls_a_dT|] variable.
+
+The g:Tex_TEXINPUTS variable needs to be set in the same format which Vim uses
+for the 'path' setting. This format is explained in detail if you do >
+ :help file-searching
+from within Vim.
+
+Therefore the value of g:Tex_TEXINPUTS will most probably be different from
+$TEXINPUTS which your native LaTeX distribution uses.
+
+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 include that in
+ g:Tex_TEXINPUTS.
+
+
+
+--------------------------------------------------------------------------------
+Writing supporting for a package *ls_4_4* *ls_a_bO*
+ *supporting-packages*
+
+Supporting a package is easy and consists of writing a vim script with the same
+name as the package and placing it in the $VIM/ftplugin/latex-suite/packages
+directory. A package script should define two variables as described in the next
+two sections. In addition to these two variables, you can also define any
+functions, environment definitions etc. in this file.
+
+
+
+g:Tex_package_option_<package> *ls_4_4_1* *ls_a_bP*
+
+This setting is a string containing a comma separated list of options supported
+by this package.
+
+Example: >
+ g:Tex_package_option_mypack = 'opt1,opt2=,sbr:group1,opt3,opt4'
+The = suffix means that the option takes a value. Use sbr:group name to separate
+options into sub-menus. All successive options will be clubbed into the group1
+sub-menu till the next sbr: option is encountered.
+
+
+g:Tex_package_<package> *ls_4_4_2* *ls_a_bQ*
+
+ >
+
+ g:TeX_package_<package> = "pre:Command,pre:Command1"
+ More detailed example is in latex-suite/packages/exmpl file (slightly
+ outdated).
+ Here is short summary of prefixes which can be used in package files:
+ (x - place with cursor, <++> - |placeholder|)
+
+ {env:command} Environment: creates simple environment template
+ \begin{command}
+ x
+ \end{command}<++>
+ {eno:command} Environment with option:
+ \begin[x]{command}
+ <++>
+ \end{command}<++>
+ {ens:command[<<option>>]...} Environment special:
+ \begin[<<option>>]...{command}
+ <++>
+ \end{command}<++>
+ {bra:command} Brackets:
+ \command{x}<++>
+ {brd:command} Brackets double:
+ \command{x}{<++>}<++>
+ {brs:command[<<option>>]...} Brackets special (as environment special:
+ \command[<+x+>]{<++>}{<++>}<++>
+ {nor:command} Normal:
+ \command<Space
+ {noo:command} Normal with option:
+ \command[x]<++>
+ {nob:command} Normal with option and brackets:
+ \command[x]{<++>}<++>
+ {pla:command} Plain:
+ command<Space
+ {spe:command} Special:
+ command <-literal insertion of command
+ {sep:command} creates separator. Good for aesthetics and usability :)
+ {sbr:command} Breaks menu into submenus. <command> will be title of submenu.
+ Can be used also in package variable.
+
+ Command can be also given without prefix:. The result is
+ \command
+
+
+
+================================================================================
+Latex Completion *ls_5* *ls_a_bR*
+ *latex-completion*
+
+|ls_5_1| Latex-Suite completion example
+|ls_5_2| Latex-Suite \ref completion
+|ls_5_3| Latex-Suite \cite completion
+|ls_5_4| Latex-Suite filename completion
+|ls_5_5| Custom command completion
+
+
+Latex-Suite provides an easy way to insert references to labels and
+bibliographic entries and also provide filename arguments to commands such as
+\includegraphics. Although the completion capabilities are very diverse,
+Latex-Suite only uses a single key (<F9> by default) to do all of it. Pressing
+the <F9> key does different things based on where you are located. Latex-Suite
+tries to guess what you might be trying to complete at the location where you
+pressed <F9>. For example, pressing <F9> when you are within a \ref command will
+try to list the \label's in the present directory. Pressing it when you are in a
+\cite command will list bibliography keys. Latex-Suite also recognizes commands
+which need a file name argument and will put up an explorer window for you to
+choose a filename.
+
+ *ls-set-grepprg* *ls_a_eG*
+NOTE: Before you start with Latex-Suite's completion function...
+ ----------------------------------------------------------
+ All of Latex-Suite's completion capabilities depend on a external program
+ being available on your system which can search through a number of files
+ for a reg-exp pattern. On *nix systems, the pre-installed grep utility is
+ more than adequate. Most windows systems come with a utility findstr, but
+ that has proven to be very inadequate (for one, it does not have an option
+ to force the file name to be displayed when searching through a single
+ file). Your best bet is to install cygwin |ls_u_3|, but if you think
+ that's overkill, you can search for |ls_u_4| a windows implementation of
+ GNU grep. (Latex-Suite testing on windows has been done with cygwin's port
+ of GNU grep).
+
+ Once you have a grep program installed, you need to set the 'grepprg'
+ option for vim. Make sure you use a setting which forces the program to
+ display file names even when you are searching through a single file. For
+ GNU grep, the syntax is >
+ set grepprg=grep\ -nH\ $*
+<
+
+
+
+--------------------------------------------------------------------------------
+Latex-Suite completion example *ls_5_1* *ls_a_bS*
+ *ls-completion-usage*
+
+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. >
+
+ 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.
+
+--------------------------------------------------------------------------------
+Latex-Suite \ref completion *ls_5_2* *ls_a_bT*
+ *ls-completion-ref*
+
+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.
+
+NOTE: 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.
+
+
+NOTE: Requirements
+ ------------
+ This method of preseting the \labels depends on Vim being compiled with
+ python support. To check if you have this, see the output of the :ver
+ command. If you see something like +python, you are all set. Failing this,
+ you will need to have python somewhere in your $PATH.
+
+
+
+--------------------------------------------------------------------------------
+Latex-Suite \cite completion *ls_5_3* *ls_a_bU*
+ *latex-completion-cite*
+
+Latex-Suite provides an easy way to insert references to bibliographic entries.
+Pressing <F9> when the cursor is placed inside a partially completed \cite
+command will split open a new window (named __OUTLINE__) which contains a
+formatted and syntax highlighted list of all bibtex entries found. For example,
+pressing <F9> after typing \ref{ should present you with a window which looks
+something like this: >
+
+ Article [dickinson:science:99]
+ "Wing rotation and aerodynamic basis of insect flight"
+ M. H. Dickinson and F-O. Lehman and S. P. Sane
+ In Science, 1999
+
+ Article [ellington:84:part1]
+ "The Aerodynamics of Hovering Insect Flight. I. The Quasi-Steady Analysis"
+ Ellington, C P
+ In Philosophical Transactions of the Royal Society of London. Series B, Biological Sciences, 1984
+
+ Article [ellington:84:part2]
+ "The Aerodynamics of Hovering Insect Flight. II. Morphological Parameters"
+ Ellington, C P
+ In Philosophical Transactions of the Royal Society of London. Series B, Biological Sciences, 1984
+
+
+
+You can easily jump from one entry to another using the 'n' and 'p' keys (to go
+to the next / previous entry respectively).
+
+You can also filter out a subset of the bibtex entries by pressing 'f' while in
+this window. Doing this presents the following prompt: >
+
+ Field acronyms: (`:let g:Tex_EchoBibFields = 0` to avoid this message)
+ [t] title [a] author [b] booktitle
+ [j] journal [y] year [p] bibtype
+ (you can also enter the complete field name)
+ Enter filter criterion [field<space>value]:
+
+At the prompt, type >
+ a ellington
+Notice that the letter a is an acronym for author according to the prompt above.
+Therefore this filter only shows those bibtex entries whose author field
+contains the text ellington. You can keep narrowing your selection by repeatedly
+filtering the results. If you would like to remove all the filters and see all
+entries again, press 'a', which removes all the filters.
+
+You can also sort the bibtex entries based on a field. To do this, press 's'.
+This will present you with a prompt like in the case of the filter and you are
+asked to choose a field. In this case, you would type in a single character.
+This sorts the entries according to that field.
+
+NOTE: <F9> will also work in a similar way after any command which contains the
+ word cite in it. For example, pressing <F9> will also work with \citenum
+ etc.
+
+
+The following logic is applied to find out which bibliographic entries are
+included in the completion.
+
+
+1. Firstly, if the present file has a master-file [|ls_a_ct|] defined for it,
+ then Latex-Suite will perform the following steps on that file instead of on
+ the current file.
+
+2. First, the file is scanned for a \bibliography command. To explain better,
+ assume that a command >
+ \bibliography{file1,file2}
+< is found in the present file. For each bibliography file, say file1,
+ Latex-Suite first tries to see if a .bib file, file1.bib can be found. If so,
+ it will scan it for bib-keys of the form @BOOK{ etc., and add these searches
+ to the completion list. If a .bib file cannot be found, then it will try to
+ see if file1.bbl can be found. If so, Latex-Suite will search it for bib-keys
+ of the form \bibitem and add these to the completion list.
+
+ You can set the location where Latex-Suite will search for .bib and .bbl
+ files using the |Tex_BIBINPUTS| [|ls_a_dr|] variable.
+
+3. If a \bibliography command is not found, then Latex-Suite tries to scan the
+ present file for a \begin{thebibliography} environment. If found, Latex-Suite
+ searches the present file for bib-keys of the form \bibitem.
+
+4. Finally, it will try to see if this file includes other files via the \input
+ command. For each such file found, Latex-Suite will repeat the previous two
+ steps stopping at the first file which has either a \bibliography command or
+ a thebibliography environment.
+
+
+Caching the \cite completion results *ls_5_3_1* *ls_a_bV*
+ *cite-search-caching*
+
+ *TClearCiteHist* *ls_a_ec*
+Often times, the editing cycle proceeds by first laying out a comprehensive
+bibliography and then completing all the \cite commands in one session. In such
+situations, it is inefficient to scan the whole list of bibliography files for
+bib-keys each time. Latex-Suite provides a way to cache the results of the cite
+completion search using the Tex_RememberCiteSearch [|ls_a_du|] variable. If set,
+Latex-Suite will perform the search only the first time <F9> is used. Next time
+on, it will reuse the search results. If you wish to redo the search results,
+issue the command >
+ TClearCiteHist
+This will redo the completion list next time you use <F9>.
+
+--------------------------------------------------------------------------------
+Latex-Suite filename completion *ls_5_4* *ls_a_bW*
+ *ls-filename-completion*
+
+When you press <F9> at a location where Latex-Suite guesses a filename needs to
+be typed, then a new explorer window will open up with the list of files. You
+can use this window to change directories etc. Pressing <enter> on a filename in
+the explorer window will automatically close the explorer window, return to the
+location where you pressed <F9> from and insert the filename into that position.
+
+Latex-Suite also tries to guess what kinds of files you might not want to insert
+and hides those accordingly. For example, if you press <F9> when you are located
+at \includegraphics{, then Latex-Suite knows that you will not want to insert
+.tex files. Therefore, the explorer window will automatically hide these files.
+
+As of now, Latex-Suite recognizes the following commands for filename
+completion. Along with the commands, this table also lists the files which
+Latex-Suite will not show for completing each command.
+
+command hide pattern~
+\bibliography '^\.,\.[^b]..$'
+\include \includeonly '^\.,\.[^t]..$'
+\includegraphics \psfig '^\.,\.tex$,\.bib$,\.bbl$,\.zip$,\.gz$'
+\input ''
+
+--------------------------------------------------------------------------------
+Custom command completion *ls_5_5* *ls_a_bX*
+ *ls-completion-custom*
+
+Latex-Suite also recognizes certain commonly used LaTeX commands for the <F9>
+key. At the moment, the \bibliographystyle, \addtocontents and the
+\addcontentsline commands are recognized, although more will be added in the
+future. When you press the <F9> after such a command, Latex-Suite will prompt
+you with a list of arguments which make sense for the command.
+
+This functionality is available for commands for which a global variable of the
+form g:Tex_completion_{<command>} is defined where <command> is the command
+name. This variable is a comma separated list of values which this command
+takes. For example, the argument to the \bibliographystyle command is commonly
+one of abbr,alpha,plain,unsrt. Therefore, Latex-Suite defines >
+ let g:Tex_completion_bibliographystyle = 'abbr,alpha,plain,unsrt'
+You can define your own completion variables in a similar manner for commands
+which you might use.
+
+================================================================================
+LaTeX Compiling *ls_6* *ls_a_bY*
+ *latex-compiling*
+
+|ls_6_1| Setting Compilation rules
+|ls_6_2| Handling dependencies in compilation
+|ls_6_3| Compiling multiple times
+|ls_6_4| Customizing the compiler output
+|ls_6_5| Compiling parts of a file
+
+
+This functionality, available via the TeX-Suite menu, provides various tools to
+compile and debug LaTeX files from within Vim.
+
+If you are using commonly used LaTeX tools, then you should be all set as soon
+as you download and install Latex-Suite. In order to compile a LaTeX file,
+simply press \ll while editing the file. This runs latex on the current file and
+displays the errors in a |quickfix-window| below the file being edited. You can
+then scroll through the errors and press <enter> to be taken to the location of
+the corresponding error. Along with the errors being listed in the quickfix
+window, the corresponding log file is also opened in |preview| mode beneath the
+quickfix window. It is scrolled automatically to keep in sync with the error
+being viewed in the quickfix window. You will be automatically taken to the
+location of the first error/warning unless you set the g:Tex_GotoError
+[|ls_a_dD|] variable to 0.
+
+Latex-Suite also supports compiling LaTeX into formats other than DVI. By
+default, Latex-Suite supports PDF and PS formats. In order to choose a format
+other than DVI, use the TTarget command or the TeX-Suite > Target Format menu
+item. This will ask you to type in the name of the target format you want to
+compile to. If a rule has been defined for the format (as described in the next
+section [|ls_a_bZ|]), then Latex-Suite will switch to that format.
+
+Trying to choose a format for which no rule has been defined will result in
+Latex-Suite displaying a warning message without taking any action.
+
+If you are using a multiple file project and need to compile a master file while
+editing other files, then Latex-Suite provides a way to specify the file to be
+compiled as described in latex-master-file [|ls_a_ct|].
+
+
+--------------------------------------------------------------------------------
+Setting Compilation rules *ls_6_1* *ls_a_bZ*
+ *compiler-rules*
+
+In order to compile LaTeX files into various formats, Latex-Suite needs to know
+which external programs to call and in which way they need to be called. This
+information is provided to Latex-Suite via a number of "rules". For each format
+you want to compile to, you need to specify a rule. A rule is specified by
+defining a variable of the form: >
+ g:Tex_CompileRule_<format>
+where <format> is a string like "pdf", "dvi" etc.
+
+Example: By default, Latex-Suite uses the following rule for compiling LaTeX
+documents into DVI. >
+ g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*'
+
+
+Default values are also provided for ps and pdf formats. You might want to
+change these rules in texrc according to your local tex environment.
+
+NOTE: For win32 users user MikTeX, sometimes the latex compiler's output has a
+ bug where a single number is split across different lines. In this case,
+ put the included vim-latex file distributed with Latex-Suite.
+
+
+
+--------------------------------------------------------------------------------
+Handling dependencies in compilation *ls_6_2* *ls_a_ca*
+ *compiler-dependency*
+
+Latex-Suite also handles compiling dependencies automatically via certain rules
+which specify the "dependency chain" for each target format. For example, if in
+your case, you use >
+ .tex -> .dvi -> .ps -> .pdf
+to generate pdf files from dvi files, then you will need to specify the
+following setting in your Latex-Suite configuration (see customizing Latex-Suite
+[|ls_a_cP|] for where these settings should go): >
+
+ let g:Tex_FormatDependency_pdf = 'dvi,ps,pdf'
+
+This is a comma separated string of formats specifying the order in which the
+formats to be compiled into should be chosen. With this setting, if you set the
+target format to pdf, then the next time you compile via the \ll shortcut,
+Latex-Suite will first generate a dvi file, then use that to generate the ps
+file and finally create the pdf file from that.
+
+NOTE: If any of the intermediate formats is listed in the
+ g:Tex_MultipleCompileFormats setting as described in the section Compiling
+ multiple times [|ls_a_cb|], then Latex-Suite might make multiple calls to
+ the compiler to generate the output file of that format.
+
+
+Along with the g:Tex_FormatDependency_{format} setting, you should ofcourse
+specify the rule for compiling to each of the formats as described in the
+previous section [|ls_a_bZ|]. For example, with the setting above, you could
+use: >
+
+ let g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*'
+ let g:Tex_CompileRule_ps = 'dvips -Ppdf -o $*.ps $*.dvi'
+ let g:Tex_CompileRule_pdf = 'ps2pdf $*.ps'
+
+
+NOTE: By default, Latex-Suite does not specify any compiler dependencies. Each
+ target format for which a rule has been derived will be compiled
+ independently.
+
+
+
+--------------------------------------------------------------------------------
+Compiling multiple times *ls_6_3* *ls_a_cb*
+ *compiling-multiple*
+
+Most LaTeX compilers need to be re-run several times in several commonly
+occurring situations in order to get a final camera ready copy. For example,
+when \label's change, when new \cite commands are added etc. If the target
+format you are compiling to requires multiple compilations, then you will need
+to include the format in the g:Tex_MultipleCompileFormats setting. This is a
+comma separated string of formats which need multiple compilations to be
+generated correctly.
+
+By default, this setting contains just the dvi format. If you use the pdflatex
+compiler to generate pdf files, then you might want to also include pdf into the
+above setting.
+
+For every format included in the g:Tex_MultipleCompileFormats setting described
+above, Latex-Suite will use the following logic to generate the file. Note that
+although the following description uses latex to refer to the compiler, it could
+be some other compiler such as pdflatex for generating pdf output.
+
+1. If there was a .idx file, then remember its contents.
+
+2. Run latex.
+
+3. If the .idx file changed due to the latex compiler, then run makeindex to
+ redo the .ind file and then remember to rerun latex.
+
+4. If the .aux file generated by the latex compiler contains a \bibdata line,
+ then it means that we are using a .bib file. Therefore, run bibtex.
+
+ NOTE: This means that we will always run bibtex whenever we use the
+ \bibliography command whether or not we actually need to. At this time,
+ Latex-Suite does not parse the .aux file before and after the latex
+ compiler to see if we are required to rerun bibtex.
+
+5. If the .bbl file changes because of this, then remember to rerun latex again.
+
+6. Also, we check to see if the LaTeX compiler gives certain standard warnings
+ which notify that we need to compile once again. In this case also, remember
+ to rerun LaTeX.
+
+7. If we found we had to rerun latex, then we repeat the steps above but not
+ running makeindex or bibtex again.
+
+The LaTeX file is compiled atmost 5 times using this logic. These steps will
+ensure that on most platforms/environments, you will get a clean output with all
+the cross-references, citations etc correctly labelled and ordered.
+
+--------------------------------------------------------------------------------
+Customizing the compiler output *ls_6_4* *ls_a_cc*
+ *compiler-output-customization*
+
+Most LaTeX compilers produce a very large amount of output during compilation,
+most of which is not relevant to debugging type-setting errors. The compiler
+plugin provided with Latex-Suite (which is an enhanced version of the standard
+compiler plugin maintained by Artem Chuprina), provides a way to filter the
+compiler output so that the actual errors/warnings can be presented much more
+concisely.
+
+The compiler plugin is set up by default to function in a "non-verbose",
+"ignore-common-warnings" mode, which means that irrelevant lines from the
+compiler output will be ignored and some very common warnings are also ignored.
+Latex-Suite does this via the global variable g:Tex_IgnoredWarnings [|ls_a_dA|].
+This is a list of patterns, which can be used to filter out (or ignore) some or
+the warnings and errors reported by the compiler. See the link above for its
+default value.
+
+Latex-Suite uses the g:Tex_IgnoreLevel [|ls_a_dB|] setting to set a default
+ignore level. For example, for the default value of 4, Latex-Suite ignores
+warnings and errors matching the first 4 patterns in g:Tex_IgnoredWarnings.
+
+In addition to setting a default value of the ignore level, Latex-Suite provides
+the ability to set the level dynamically, using the TCLevel command. For
+example, if you issue the command: >
+ TCLevel 3
+from within Vim, then the next time you compile the document, Latex-Suite will
+ignore warnings and errors which match the first three patterns in
+g:Tex_IgnoredWarnings.
+
+When TCLevel is called with the unquoted string strict as follows: >
+ TClevel strict
+then Latex-Suite switches to a "verbose", "no-lines-ignored" mode which is
+useful when you want to make final checks of your document and want to be
+careful not to let things slip by.
+
+See the explanation of the settings g:Tex_IgnoredWarnings [|ls_a_dA|] and
+g:Tex_IgnoreLevel [|ls_a_dB|] to find out how to customize the filtering done by
+Latex-Suite
+
+--------------------------------------------------------------------------------
+Compiling parts of a file *ls_6_5* *ls_a_cd*
+ *part-compiling*
+
+Latex-Suite also provides a way to compile a fragment of a document. This can be
+very useful while debugging a complex equation or one chapter in a book, etc.
+
+To do this, visually select a portion of the text and press \ll while in visual
+mode. The visually selected portion will be saved to a temporary file with the
+preamble from the current document prepended. Latex-Suite will then switch focus
+to this temporary file and compile it. Continue to debug this file as required
+and then replace the portion of the original file with this one.
+
+Pressing \lv while viewing the temporary file will view the output file
+generated from the temporary file, not the original file
+
+Two commands |TPartComp| and |TPartView| are provided to be able to get this
+functionality via the command line.
+
+From release 1.6 onwards of Latex-Suite, the temporary file created for part
+compilation will reside in the same directory as the file from which the
+fragment is being created. This ensures that any relative path-names defined in
+the fragment will still work. Latex-Suite will attempt to clean the temporary
+file(s) created when Vim exits.
+
+================================================================================
+Latex Viewing and Searching *ls_7* *ls_a_ce*
+ *latex-viewing*
+
+|ls_7_1| Setting Viewing rules
+|ls_7_2| Forward Searching documents
+|ls_7_3| Inverse Searching
+
+
+
+--------------------------------------------------------------------------------
+Setting Viewing rules *ls_7_1* *ls_a_cf*
+ *latex-viewing-rules*
+
+In order to view the output files created by compiling the source files, you
+need to specify which external program Latex-Suite should call. You can specify
+the external program using one of two settings Tex_ViewRule_format [|ls_a_dF|]
+or Tex_ViewRuleComplete_format [|ls_a_dG|]. By default, Latex-Suite has default
+settings for viewing various common output formats via the Tex_ViewRule_format
+settings, so that if you are using commonly used programs, you should be all set
+to view compiled files from within Vim by simply pressing \lv.
+
+NOTE: The viewing function also takes the *.latexmain [|ls_a_ct|] file into
+ account to decide which file to show.
+
+
+If pressing \lv does not work, then it most probably has to do with incorrect
+settings of the g:Tex_ViewRule_<format> [|ls_a_dF|] where <format> is the format
+you are attempting to view. See the link above for how to set this according to
+your system.
+
+NOTE: On Windows and OS/X, you can leave the view rule empty to open the
+ document with the default viewer on your system. On Linux/UNIX systems,
+ you can use the xdg-open command to open the document with the default
+ viewer.
+
+
+In addition to viewing the files, Latex-Suite also supports forward and inverse
+searching for certain common tools for viewing documents. See the next few
+sections for details on forward and inverse searching, including an overview of
+viewers.
+
+--------------------------------------------------------------------------------
+Forward Searching documents *ls_7_2* *ls_a_cg*
+ *forward-searching*
+
+Forward searching refers to making a viewer display a given document at a given
+location from within Vim. At present, these viewers are known to support forward
+searching, but viewers that are not listed here may work, too:Viewer OS Supported documents Comment~
+Skim |ls_u_5| Apple / OS X Tiger PDF Supports also
+ inverse searching
+PDFView |ls_u_6| Apple / OS X PDF No longer in
+ development,
+ supports also
+ inverse searching
+TeXniscope |ls_u_7| Apple PDF, DVI
+YAP |ls_u_8| Windows DVI, PS ships with MikTex
+Sumatra PDF |ls_u_9| Windows PDF
+kdvi |ls_u_10| Linux/UNIX DVI
+okular |ls_u_11| Linux/UNIX DVI, PDF, PS and Included in KDE 4
+ many more
+xdvi |ls_u_12| Linux/UNIX DVI
+xdvik |ls_u_13| Linux/UNIX DVI
+
+Pressing \ls from within Vim should make the viewer display the portion of the
+document where your cursor is placed.NOTE: OS/X users need to set the g:Tex_TreatMacViewerAsUNIX flag to 1 and
+ provide a UNIX-like viewrule, that expects as arguments the document, the
+ linenumber and the sourcefile in this order.
+
+
+
+ *enabling-searching* *ls_a_ed*
+NOTE: Enabling Forward and Inverse Searching
+ --------------------------------------
+ Most DVI viewers need "source-special" information in order to do forward
+ (and inverse) searching. This information is embedded in the dvi file if
+ the LaTeX source is compiled with the --src-specials option. By default,
+ Latex-Suite does not supply this argument to the compiler. See the section
+ on to find out how this option can be set.
+
+ For pdf viewers you need to use the pdfsync |ls_u_14| package in your
+ LaTeX document.
+
+
+
+--------------------------------------------------------------------------------
+Inverse Searching *ls_7_3* *ls_a_ch*
+ *inverse-searching*
+
+Inverse searching refers to the viewer telling Vim to display the LaTeX source
+file at a given location when you double-click in the viewer window.
+
+You will need to enable searching [|ls_a_ed|] in order to use this
+functionality.
+
+You will also need to specify certain settings to the DVI viewer conveying the
+syntax which it needs to use to tell Vim how to display the source file. In YAP,
+you can set this option in View > Options > Inverse Search. The Command Line
+field needs to be set as follows: >
+ "C:\Program Files\vim\vim61\gvim" -c ":RemoteOpen +%l %f"
+The command :RemoteOpen is supplied when you install Latex-Suite.
+
+On *nix machines, Latex-Suite attempts to call the DVI viewer in such a way that
+it already knows how to communicate with Vim. If this does not seem to be
+working, you can use the RemoteOpen command described above.
+
+================================================================================
+Latex Folding *ls_8* *ls_a_ci*
+ *latex-folding*
+
+|ls_8_1| Default Folding Scheme in Latex-Suite
+|ls_8_2| Customizing what to fold
+|ls_8_3| Editing the folding.vim file directly
+
+
+Latex-Suite ships with the plugin SyntaxFolds.vim which is a plugin for creating
+"fake" syntax folds on the fly. The fold method is actually manual but the
+folding is based on LaTeX syntax. This offers a speed increase over regular
+syntax folding. Ofcourse it has the disadvantage that the folds are not dynamic,
+i.e newly created syntax items are not automatically folded up. (This is a
+compromise between speed and convenience).
+
+When you open up a LaTeX file, all the portions will be automatically folded up.
+However, no new folds will be created until you press <F6> or \rf. (rf stands
+for "refresh folds").
+
+The fold-text is set to the first line of the folded text unless the fold is a
+table, figure etc. (an environment). In this case, if a \caption and/or a label
+is found in the folded region, then those are used to make a more meaningful
+fold-text, otherwise the second line of the environment is displayed along with
+the name of the environment. In other words, the following >
+ \begin{figure}[h]
+ \centerline{\psfig{figure=slidercrank.eps,height=6cm}}
+ \caption{The Slider Crank Mechanism.}
+ \label{fig:slidercrank}
+ \end{figure}
+ % a LaTeX comment.
+ \begin{eqnarray}
+ \sin(\pi) = 0
+ \end{eqnarray}
+
+
+will be shown as: >
+ +--- 5 lines: figure (fig:slidercrank) : The Slider Crank Mechanism. -----
+ % a LaTeX comment.
+ +--- 3 lines: eqnarray () : \sin(\pi) = 0 --------------------------------
+
+
+
+--------------------------------------------------------------------------------
+Default Folding Scheme in Latex-Suite *ls_8_1* *ls_a_cj*
+ *default-folding*
+
+By default Latex-Suite creates folds in the following manner:
+
+ >
+ \chapter
+ \section
+ %%fakesection
+ \subsection
+ \subsubsection
+ \item
+ \equation
+ \eqnarray
+ \figure
+ \table
+ \footnote
+The indentation shows the "nestedness" of the folding scheme. See the next
+section [|ls_a_ck|] to see how you can change this scheme.
+
+--------------------------------------------------------------------------------
+Customizing what to fold *ls_8_2* *ls_a_ck*
+ *customizing-what-to-fold*
+
+From version 1.6 onwards, the folding in Latex-Suite can be controlled to a
+large extent via a number of global variables.
+
+
+
+Tex_FoldedSections *ls_8_2_1* *ls_a_cl*
+ *Tex_FoldedSections*
+
+This entry defines which sections will be folded. This setting is a comma
+separated list of section names. The default value is: >
+ part,chapter,section,%%fakesection,
+ subsection,subsubsection,paragraph
+Each of the entries in the list will fold up a section of the corresponding
+name. The %%fakesection section is provided as a means for the user to group
+lines into "fake" sections. A %%fakesection is assumed to start on a line which
+begins with the string %%fakesection and continue till the start of the next
+\section, \subsection or any other section.
+
+See also advanced fold settings [|ls_a_cp|].
+
+
+Tex_FoldedEnvironments *ls_8_2_2* *ls_a_cm*
+ *Tex_FoldedEnvironments*
+
+This entry defines which environments will be folded. It is a comma separated
+string of words each of which defines a single environment. The default setting
+is >
+ verbatim,comment,eq,gather,
+ align,figure,table,thebibliography,
+ keywords,abstract,titlepage
+The words need not be standard Latex environments. You can add any word you
+like. Also, each word will fold up all environments whose name begins with that
+word. For example, in the setting above, the word "eq" folds up the
+\begin{equation}, \begin{eqnarray}, \begin{eqnarray*} environments. To avoid
+this, you can replace the word "eq" with "eq}".
+
+See also advanced fold settings [|ls_a_cp|].
+
+
+Tex_FoldedCommands *ls_8_2_3* *ls_a_cn*
+ *Tex_FoldedCommands*
+
+This entry defines which commands will be folded. It is a comma separated string
+of words each of which defines a single command. The default setting is empty,
+i.e no commands are folded. The words need not be standard Latex commands. You
+can use whatever words you like. Each word will fold all commands whose name
+begins with that word as in the case of the Tex_FoldedEnvironments [|ls_a_cm|]
+variable.
+
+NOTE: It is very difficult to fold commands reliably because it is very
+ difficult to create a regexp which will match a line containing unmatched
+ parentheses (or curly brackets), but will not match a line containing
+ matched parentheses.
+
+ Just to make things safer, only lines which start a command but do not
+ contain additional curly braces after the command has started are folded.
+ In other words, if you wanted to fold the the command "mycommand", then
+ the lines >
+ \mycommand{This is a line
+ and some more text on the next line
+ }
+< will be folded, but the lines >
+ \mycommand{This is a \textbf{line}
+ and some more text
+ }
+< will not be folded. This is a bug which is very difficult to fix.
+
+
+See also advanced fold settings [|ls_a_cp|].
+
+
+Tex_FoldedMisc *ls_8_2_4* *ls_a_co*
+ *Tex_FoldedMisc*
+
+This entry defines fold syntax for certain items which do not naturally fit into
+the section, environment of command lists. It is a comma separated list of
+words. The default value is: >
+ item,preamble,<<<
+NOTE: Unlike the other Tex_FoldedXXXX variables, the words in this setting are
+ limited to take values from the following list:
+
+ Value Meaning~
+ comments Folds up contiguous blocks of comments
+ item Folds up the \items within list environments
+ preamble Folds up the preamble of a document. (The part between the
+ \documentclass command and the \begin{document} environment)
+ <<< Folds defined manually by the user using the <<< and >>> strings
+ as fold-markers.
+
+ Any other words in the Tex_FoldedMisc setting are silently ignored.
+
+
+
+See also advanced fold settings [|ls_a_cp|].
+
+
+Advanced Fold setting details *ls_8_2_5* *ls_a_cp*
+ *fold-setting-advanced*
+
+The order of the words in the Tex_FoldedXXXX variables is _important_. The order
+defines the order in which the folds are nested. For example, the value
+"subsection,section" for the Tex_FoldedSections variable will not fold any
+subsections at all. This is because the folds are created in the _reverse_ order
+in which they occur in the Tex_FoldedSections setting and also, once a fold is
+created, the interior of the fold is not examined for creating additional folds.
+In the above case, this means that a \section is folded first and then its
+interior is not examined further. The correct value should have been
+"section,subsection"
+
+ *fold-setting-adding* *ls_a_ee*
+Each of the fold setting variables Tex_FoldedSections, Tex_FoldedEnvironments
+etc., as explained previously is a comma separated string of variables. However,
+to make it easier to _add_ to the default settings without having to repeat the
+whole default setting again, Latex-Suite uses the following logic in forming the
+complete setting string from the Tex_FoldedXXXX variables. If the variable
+starts with a comma, then Tex_FoldedXXXX is added to the end of the default
+string rather than replacing it. Similarly, if it ends with a comma, then it
+will be prepended to the beginning of the default setting rather than replacing
+it.
+
+For example, if Tex_FoldedEnvironments is set to the string "myenv", then only
+an environment of the form \begin{myenv} will be folded. However, if the
+Tex_FoldedEnvironments setting is ",myenv", then the \begin{myenv} environment
+will be folded after all other environments in the default setting have been
+folded. On the other hand if Tex_FoldedEnvironments is of the form "myenv,", the
+\begin{myenv} environment will be folded before the rest of the environments in
+the default setting.
+
+--------------------------------------------------------------------------------
+Editing the folding.vim file directly *ls_8_3* *ls_a_cq*
+ *editing-folding*
+
+If you are using version 1.5 of Latex-Suite or older, you will need to directly
+edit the $VIM/ftplugin/latex-suite/folding.vim file if you wish to modify the
+folding scheme. You will need to modify the function MakeTexFolds() defined in
+that file to modify the fold syntax. MakeTexFolds makes a number of calls to
+AddSyntaxFoldItem. Each such call defines a new "fold item". The order in which
+these calls are made defines how the folds are nested. For example, if you
+desire an figure environment to be nested within a section, then you should
+define the fold for the figure first. The syntax of AddSyntaxFoldItem is as
+follows: >
+ AddSyntaxFoldItem(startpat, endpat, startoff, endoff [, startskip, endskip])
+If the last two arguments are omitted, then they are assumed to default to the
+empty strings ''. The explanation for each argument is as follows:
+
+Argument Explanation~
+startpat a line matching this pattern defines the beginning of a fold.
+endpat a line matching this pattern defines the end of a fold.
+startoff this is the offset from the starting line at which folding will
+ actually start
+endoff like startoff, but gives the offset of the actual fold end from the
+ line satisfying endpat. startoff and endoff are necessary when the
+ folding region does not have a specific end pattern corresponding to
+ a start pattern. for example in LaTeX, \section{Section Name} defines
+ the beginning of a section, but there is no command which
+ specifically ends a section. Thus a \section is assumed to end 1 line
+ _before_ another section starts.
+startskip A Pattern Which Defines The Beginning Of A "Skipped" Region.
+
+ For example, suppose we define a \itemize fold as follows: >
+ = '^\s*\\item',
+ = '^\s*\\item\|^\s*\\end{\(enumerate\|itemize\|description\)}',
+ = 0,
+ = -1
+<
+
+ This defines a fold which starts with a line beginning with an \item
+ and ending one line before a line beginning with an \item or
+ \end{enumerate} etc.
+
+ Then, as long as \item's are not nested things are fine. However,
+ once items begin to nest, the fold started by one \item can end
+ because of an \item in an \itemize environment within this \item.
+ i.e, the following can happen: >
+ \begin{itemize}
+ \item Some text <------- fold will start here
+ This item will contain a nested item
+ \begin{itemize} <----- fold will end here because next line contains \item...
+ \item Hello
+ \end{itemize} <----- ... instead of here.
+ \item Next item of the parent itemize
+ \end{itemize}
+<
+
+ Therefore, in order to completely define a folding item which allows
+ nesting, we need to also define a "skip" pattern. startskip and end
+ skip do that. Leave '' when there is no nesting.
+endskip the pattern which defines the end of the "skip" pattern for nested
+ folds.
+
+NOTE: Example 1
+ ---------
+ A syntax fold region for the latex section is defined with the following
+ arguments to AddSyntaxFoldItem: >
+ startpat = "\\section{"
+ endpat = "\\section{"
+ startoff = 0
+ endoff = -1
+ startskip = ''
+ endskip = ''
+< Note that the start and end patterns are thus the same and endoff has a
+ negative value to capture the effect of a section ending one line before
+ the next starts.
+
+
+NOTE: Example 2
+ ---------
+ A syntax fold region for the \itemize environment is: >
+ startpat = '^\s*\\item',
+ endpat = '^\s*\\item\|^\s*\\end{\(enumerate\|itemize\|description\)}',
+ startoff = 0,
+ endoff = -1,
+ startskip = '^\s*\\begin{\(enumerate\|itemize\|description\)}',
+ endskip = '^\s*\\end{\(enumerate\|itemize\|description\)}'
+< Note the use of startskip and endskip to allow nesting.
+
+
+
+================================================================================
+Multiple file LaTeX projects *ls_9* *ls_a_cr*
+ *latex-project*
+
+|ls_9_1| Latex-Suite project settings
+|ls_9_2| Specifying which file to compile
+
+
+ *latex-project-example* *ls_a_ef*
+Many LaTeX projects contain multiple source files which are \included from a
+master file. A typical example of this situation is a directory layout such as
+the following
+
+ >
+ thesis/
+ main.tex
+ abstract.tex
+ intro/
+ intro.tex
+ figures/
+ fig1.eps
+ fig2.eps
+ chapter1/
+ chap1.tex
+ figures/
+ fig1.eps
+ conclusion/
+ conclusion.tex
+ figures/
+
+
+In the above case, main.tex will typically look like
+
+ >
+ % file: main.tex
+ \documentclass{report}
+ \begin{document}
+
+ \input{abstract.tex}
+ \input{intro/intro.tex}
+ \input{chapter1/chap1.tex}
+ \input{conclusion/conclusion.tex}
+
+ \end{document}
+
+
+ *latex-master-file-specification* *ls_a_eg*
+In such situations, you will need to convey to Latex-Suite that main.tex is the
+main file which \inputs the other files. This is done by creating an empty file
+called main.tex.latexmain in the same directory in which main.tex resides. This
+file is called the _master file_ in this manual. See Tex_MainFileExpression
+[|ls_a_eh|] for an alternative way of specifying the master file.
+
+NOTE: Here main.tex.latexmain is (obviously) a different file from main.tex
+ itself. main.tex need not be renamed. This ofcourse restricts each
+ directory to have a single master file.
+
+
+Each time Latex-Suite opens a new LaTeX file, it will try to see if it is part
+of a multiple file project by searching upwards (to the root of the file-system)
+from the current file's directory to see if it finds a file of the form
+*.latexmain. If such a file is found, then it is considered that the current
+file is part of a larger project. The name of the LaTeX master file is inferred
+directly from the first part of the *.latexmain file as described in the example
+above.
+
+
+--------------------------------------------------------------------------------
+Latex-Suite project settings *ls_9_1* *ls_a_cs*
+ *latex-project-settings*
+
+If a master file [|ls_a_ct|] is found, then Latex-Suite :sources the file. Thus
+this file needs to contain valid Vim commands. This file is typically used to
+store project specific settings.
+
+Some typical per-project settings which are best put in the master file are
+Tex_ProjectSourceFiles [|ls_a_dt|]
+
+--------------------------------------------------------------------------------
+Specifying which file to compile *ls_9_2* *ls_a_ct*
+ *latex-master-file*
+
+In the example described previously [|ls_a_ef|], if you are editing
+intro/intro.tex and press \ll, then you still want Latex-Suite to compile
+main.tex, because intro/intro.tex is merely a fragment which is \input'ed into
+main.tex. If the master file is already specified using the *.latexmain
+convention described previously [|ls_a_ef|], then Latex-Suite will automatically
+compile the master file when you are editing any of its \input'ed fragments.
+Thus pressing \ll while editing intro/intro.tex will compile main.tex.
+
+ *Tex_MainFileExpression* *ls_a_eh*
+If you wish to use some different logic to specify the main file name, you can
+specify a custom expression via the Tex_MainFileExpression variable. This is a
+string containing a valid vim expression. In addition, you can use a variable
+modifier which is in the format used for |filename-modifiers|, for example,
+':p:h'. You should utilize this variable to modify the filename of the main
+file. >
+ let g:Tex_MainFileExpression = 'MainFile(modifier)'
+ function! MainFile(fmod)
+ if glob('*.latexmain') != ''
+ return fnamemodify(glob('*.latexmain'), a:fmod)
+ else
+ return ''
+ endif
+ endif
+
+
+================================================================================
+Latex-Suite Commands and Maps *ls_10* *ls_a_cu*
+ *latex-suite-commands-maps*
+
+|ls_10_1| Latex-Suite Maps
+|ls_10_2| Latex Suite Commands
+
+
+This section describes the maps and commands used in Latex-Suite. It also
+describes a way to change the map sequences according to your preference.
+
+
+--------------------------------------------------------------------------------
+Latex-Suite Maps *ls_10_1* *ls_a_cv*
+ *latex-suite-maps*
+
+ *remapping-latex-suite-keys* *ls_a_ei*
+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 [|ls_a_cw|] 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_10_1_1* *ls_a_cw*
+ *customize-imap-maps*
+
+These mappings are utilized for jumping between placeholders as described here
+[|ls_a_eD|]. See the parent section [|ls_a_cv|] to find out how to use this
+information to change the default maps.
+
+ *Plug_IMAP_JumpForward* *ls_a_ej*
+ *Plug_IMAP_JumpBack* *ls_a_ek*
+ *Plug_IMAP_DeleteAndJumpForward* *ls_a_el*
+ *Plug_IMAP_DeleteAndJumBack* *ls_a_em*
+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
+[|ls_a_eD|].
+
+<Plug>IMAP_JumpBack takes you to the previous place-holder [|ls_a_eD|].
+
+<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 [|ls_a_cW|] and g:Imap_StickyPlaceHolders
+[|ls_a_cX|]
+
+<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 [|ls_a_cW|] and g:Imap_StickyPlaceHolders
+[|ls_a_cX|]
+
+
+Alt-Key mappings *ls_10_1_2* *ls_a_cx*
+ *customize-alt-key-maps*
+
+These mappings are are described in the section Alt key macros [|ls_a_bA|]. See
+the parent section [|ls_a_ei|] to see how to use the following information to
+remap keys.
+
+ *Plug_Tex_MathBF* *ls_a_en*
+ *Plug_Tex_MathCal* *ls_a_eo*
+ *Plug_Tex_LeftRight* *ls_a_ep*
+ *Plug_Tex_InsertItemOnThisLine* *ls_a_eq*
+Plug Mapping Default Key~
+<Plug>Tex_MathBF <Alt-B>
+<Plug>Tex_MathCal <Alt-C>
+<Plug>Tex_LeftRight <Alt-L>
+<Plug>Tex_InsertItemOnThisLine <Alt-I>
+
+--------------------------------------------------------------------------------
+Latex Suite Commands *ls_10_2* *ls_a_cy*
+ *latex-suite-commands*
+
+
+
+:TMacro [{macro}] *ls_10_2_1* *ls_a_cz* *TMacro*
+
+When used without any arguments lists all available macros defined in runtime
+ftplugin/latex-suite/macros/ directories and prompts you to choose one of them.
+With one argument |:read| this macro under cursor position. With more than one
+argument it will not work :) In Vim >= 6.2 works completion of names of macros
+(see 'wildmenu', 'wildmode' for more about command-line completion).
+
+
+:TMacroEdit [{macro}] *ls_10_2_2* *ls_a_cA*
+ *TMacroEdit*
+
+Splits window for editing {macro}. When used without any arguments lists all
+available macros defined in runtime ftplugin/latex-suite/macros/ directories and
+prompt you to choose one of them. When you try to edit {macro} not from local
+directory Latex-Suite will copy it to your local directory with suffix "-local".
+If local copy already exists Latex-Suite prompt for overwriting it. In Vim >=
+6.2 works completion of names of macros (see 'wildmenu', 'wildmode' for more
+about command-line completion).
+
+
+:TMacroNew *ls_10_2_3* *ls_a_cB*
+ *TMacroNew*
+
+Splits window to write new macro. Directory in new buffer is locally changed to
+Latex-Suite/macros/.
+
+
+:TMacroDelete [{macro}] *ls_10_2_4* *ls_a_cC*
+ *TMacroDelete*
+
+Delets {macro} from your local ftplugin/latex-suite/macros/ directory. When used
+without any arguments lists all available macros defined in Latex-Suite/macros/
+directory and prompt you to choose one of them. When you choose to delete
+{macro} which is not in your local directory Latex-Suite will refuse to delete
+it. In Vim >= 6.2 works completion of names of macros (see 'wildmenu',
+'wildmode' for more about command-line completion)
+
+
+:TPackage [{package, ...}] *ls_10_2_5* *ls_a_cD*
+ *TPackage*
+
+When used without any arguments lists name of the packages for which support is
+available. If you are using Vim GUI and have Tex_Menus set to 1, then it will
+list all files found in the $VIM/ftplugin/latex-suite/packages directory.
+Otherwise, Latex-Suite will list files found in the
+$VIM/ftplugin/latex-suite/dictionaries directory. Choosing a file from the list
+will insert a >
+ \usepackage[<++>]{<packname>}
+line into the buffer at the current cursor location. For Vim 6.2 and above, you
+can use command-line completion to choose a package file. You can also call
+TPackage with one or more package names separated with spaces in which case,
+Latex-Suite will insert \usepackage lines for each of them in turn.
+
+After inserting the \usepackage line(s), Latex-Suite will support it (them) in
+various ways as described in the section Actions taken for supported packages
+[|ls_a_bL|].
+
+
+:TPackageUpdate *ls_10_2_6* *ls_a_cE*
+ *TPackageUpdate*
+
+This command `reads' name of package under cursor and turns on possible support.
+
+
+:TPackageUpdateAll *ls_10_2_7* *ls_a_cF*
+ *TPackageUpdateAll*
+
+After issuing this command latexSuite scans the file in looking for not declared
+packages, removing not needed entries from Packages menu and turning off not
+necessary packages' dictionaries.
+
+
+:TTemplate [{template}] *ls_10_2_8* *ls_a_cG*
+ *TTemplate*
+
+When used without any arguments lists all available templates from
+latex-suite/templates/ directory and prompts to choose one of them. With one
+argument :0|read| {template} file. With more than one argument it will not work
+:) In Vim >= 6.2 works completion of names of macros (see 'wildmenu', 'wildmode'
+for more about command-line completion)
+
+
+:TSection [{argument}] *ls_10_2_9* *ls_a_cH*
+ *TSection*
+
+Used without any arguments inserts last section type (|latex-sectioning|).
+Accepts arguments: n> inserts section name in <n> logical level. Levels are:
+0 part
+1 chapter
+2 section
+3 subsection
+4 subsubsection
+5 paragraph
+6 subparagraph
+
+
++<n> inserts section name <n> logical levels above the last used comand
+-<n> inserts section name <n> logical levels below the last used comand
++ inserts section name one logical level below the last used command (equal
+ to +1).
+++ inserts section name two logical levels below the last used command (equal
+ to +2).
+- inserts section name one logical level over the last used command (equal
+ to -1).
+-- inserts section name two logical levels over the last used command (equal
+ to -2).
+
+
+
+Command accepts also latexSuite mappings (|latex-macros|) without preceding S
+and in lowercase: >
+ :TSection pa
+will result in \part{}. It is possible to use full names of sections: :TSection
+part
+
+
+:TSectionAdvanced *ls_10_2_10* *ls_a_cI*
+ *TSectionAdvanced*
+
+Accepts the same arguments as |TSection| but leads to a couple of questions
+(whether you want to include the section in the table of contents, whether there
+is a shorter name for the table of contents) and then creates a more intelligent
+template.
+
+
+:TLook *ls_10_2_11* *ls_a_cJ* *TLook*
+
+Accepts one argument. Will look through .tex files in directory of edited file
+for argument. It can be regexp. You don't have to enclose argument in "". <cr>
+takes you to location. Other keys work as described in |latex-viewer|. Note:
+TLook uses :grep command and is using 'grepprg'. Its regular expressions can be
+different from those of Vim.
+
+
+:TLookBib *ls_10_2_12* *ls_a_cK*
+ *TLookBib*
+
+Accepts one argument. Will look through .bib files in directory of edited file
+for argument. It can be regexp. You don't have to enclose argument in "". <cr>
+takes you to location. Other keys work as described in |latex-viewer|.
+
+NOTE: TLookBib uses :grep command and is using 'grepprg'. Its regular
+ expressions can be different from those of Vim.
+
+
+
+
+:TLookAll *ls_10_2_13* *ls_a_cL*
+ *TLookAll*
+
+Accepts one argument. Will look through all files in directory of edited file
+for argument. It can be regexp. You don't have to enclose argument in "". <cr>
+takes you to location. Other keys work as described in |latex-viewer|. Note:
+TLook uses :grep command and is using 'grepprg'. Its regular expressions can be
+different from those of Vim.
+
+
+:TPartComp *ls_10_2_14* *ls_a_cM*
+ *TPartComp*
+
+No argument allowed but accepts range in all formats. Define fragment of
+interest with :'a,'b, :/a/,/b/, :'<,'> or :20,30. All other rules of compilation
+apply.
+
+
+:TPartView *ls_10_2_15* *ls_a_cN*
+ *TPartView*
+
+Show last compiled fragment. All rules of viewing apply but |latex-searching|.
+
+
+:Tshortcuts [{arg}] *ls_10_2_16* *ls_a_cO*
+ *Tshortcuts*
+
+Show shortcuts in terminal (not using menu). Without {arg} you will see simple
+menu prompting for one of them. Possible arguments:
+g General shortcuts
+e Environment shortcuts
+f Font shortcuts
+s Section shortcuts
+m Math shortcuts
+a All shortcuts
+
+================================================================================
+Customizing Latex-Suite *ls_11* *ls_a_cP*
+ *customizing-latex-suite*
+
+|ls_11_1| General Settings
+|ls_11_2| Place-Holder Customization
+|ls_11_3| Macro Customization
+|ls_11_4| Smart Key Customization
+|ls_11_5| Latex Completion Customization
+|ls_11_6| Compiler Customization
+|ls_11_7| Viewer Customization
+|ls_11_8| Menu Customization
+|ls_11_9| Folding Customization
+|ls_11_10| Package Handling Customization
+
+
+Customizing Latex-Suite is done by defining certain global variables in
+$VIM/ftplugin/tex.vim, where $VIM corresponds to ~/.vim for *nix machines and
+~/vimfiles for windows machines. This file is not part of the Latex-Suite
+distribution. You will need to create this file yourself (or modify it if it
+exists) if you need to change any default settings. Since this file is not
+included as part of the Latex-Suite distribution, it will not be over-written in
+subsequent updates.
+
+The default settings in Latex-Suite are defined in
+$VIM/ftplugin/latex-suite/texrc. Please take a look at this file if you find
+this documentation incomplete or confusing. That file is also well documented.
+
+This chapter describes the various settings which effect Latex-Suite and their
+default values. The settings are broken up into sections according to the
+behavior which they influence.
+
+
+--------------------------------------------------------------------------------
+General Settings *ls_11_1* *ls_a_cQ*
+ *ls-general-purpose-settings*
+
+
+
+Tex_Debug *ls_11_1_1* *ls_a_cR*
+ *Tex_Debug*
+
+Type boolean
+Default Value 0
+
+If set to 1, then Latex-Suite will create certain global debug statements which
+can be printed by doing >
+ :call Tex_PrintDebug()
+
+
+
+Tex_UsePython *ls_11_1_2* *ls_a_cS*
+ *Tex_UsePython*
+
+Type boolean
+Default Value 1
+
+If Latex-Suite detects that your vim is python enabled (using has('python')),
+then it tries to use python in certain places to speed things up. If this
+misbehaves, you can set this to zero, in which case, Latex-Suite will use
+vimscript to accomplish the same.
+
+--------------------------------------------------------------------------------
+Place-Holder Customization *ls_11_2* *ls_a_cT*
+ *customizing-place-holders*
+
+Latex-Suite uses place-holders [|ls_a_eD|] to minimize using the movement keys
+while typing. The following settings affect how place-holders are used.
+
+NOTE: These setting need to be set in your ~/.vimrc, not $VIM/ftplugin/tex.vim
+ because these settings affect the behavior of imaps.vim, which is a global
+ plugin, not a file-type plugin.
+
+
+
+
+g:Imap_UsePlaceHolders *ls_11_2_1* *ls_a_cU*
+ *Imap_UsePlaceHolders*
+
+
+Type Boolean
+Default Value 1
+
+Setting this to zero completely disables using place-holders.
+
+
+g:Imap_PlaceHolderStart & g:Imap_PlaceHolderEnd *ls_11_2_2* *ls_a_cV*
+ *Imap_PlaceHolderStart*
+
+ *Imap_PlaceHolderEnd* *ls_a_er*
+Setting Type Value~
+Imap_PlaceHolderStart String '<+'
+Imap_PlaceHolderEnd String '+>'
+
+These settings affect the strings displayed at the beginning and end of the
+place-holder string. Set these strings to a value different than a commonly
+occurring sequence of characters.
+
+NOTE: TIP
+ ---
+ If you use the latin1 encoding and do not type in french, then you can set
+ these strings to the \xab and \xbb characters (the french quotation
+ marks).
+
+
+
+
+g:Imap_DeleteEmptyPlaceHolders *ls_11_2_3* *ls_a_cW*
+ *Imap_DeleteEmptyPlaceHolders*
+
+
+Type Boolean
+Default Value 1
+
+When set to one, non-descriptive or empty place-holders are deleted on pressing
+<Ctrl-J>.
+
+
+g:Imap_StickyPlaceHolders *ls_11_2_4* *ls_a_cX*
+ *Imap_StickyPlaceHolders*
+
+
+Type Boolean
+Default Value 1
+
+When set to 1, in visual mode, <Ctrl-J> takes you to the next placeholder
+without deleting the current placeholder.
+
+--------------------------------------------------------------------------------
+Macro Customization *ls_11_3* *ls_a_cY*
+ *customizing-macros*
+
+
+
+Tex_Env_name *ls_11_3_1* *ls_a_cZ*
+ *Tex_Env_name*
+
+If you wish to wish to expand certain environments differently from the way
+Latex-Suite does it, you can define custom expansions using global variables of
+the form Tex_Env_{name} where name corresponds to the environment.
+
+For example, if you press <F5> after typing theorem, Latex-Suite will by default
+expand it to >
+ \begin{theorem}
+ \label{<++>}<++>
+ \end{theorem}<++>
+However, if you wish change this to >
+ \begin{theorem}
+ <++>
+ \end{theorem}<++>
+then define the following variable >
+ let g:Tex_Env_theorem = "\\begin{theorem}\<CR><++>\<CR>\\end{theorem}"
+<
+
+If the expansion uses special keys such as carriage return etc, then use
+double-quotes and use the "\<key>" notation for special keys. Backslashes have
+to be doubled.
+
+You could even use strings returned by functions as the expansion by using the
+IMAP_PutTextWithMovement() [|ls_a_ea|] function.
+
+If the name of the environment contains special characters (for example, the
+eqnarray* environment), then use the following form: >
+ let g:Tex_Env_{'eqnarray*'} =
+ \ "\\begin{eqnarray*}\<CR><++> &=& <++>\<CR>\\end{eqnarray*}<++>"
+This will make pressing <F5> after eqnarray* expand to >
+ \begin{eqnarray*}
+ <++> &=& <++>
+ \end{eqnarray*}<++>
+
+
+
+Tex_Com_name *ls_11_3_2* *ls_a_da*
+ *Tex_Com_name*
+
+If you wish to define new expansions for fast command insertion as described
+here [|ls_a_bo|], or redefine expansions from the default values in Latex-Suite,
+you will need to define variables of the form g:Tex_Com_{name} where name is a
+command name. For example, with the setting >
+ let g:Tex_Com_frac = "\\frac{<++>}{<++>}<++>"
+pressing <F7> after typing frac will change it to \frac{<++>}{<++>}<++>
+
+See Tex_Env_name [|ls_a_cZ|] for additional details on how to create this
+setting in various special circumstances.
+
+
+Enabling / disabling macros *ls_11_3_3* *ls_a_db*
+ *macro-enabling*
+
+The following variables disable various parts of the macro functionality of
+Latex-Suite. See the links to the relevant sections to see what functionality
+setting each of the variables to zero will take away.
+
+ *Tex_EnvironmentMaps* *ls_a_es*
+ *Tex_EnvironmentMenus* *ls_a_et*
+ *Tex_FontMaps* *ls_a_eu*
+ *Tex_FontMenus* *ls_a_ev*
+ *Tex_SectionMaps* *ls_a_ew*
+ *Tex_SectionMenus* *ls_a_ex*
+Setting Link to relevant section Default Value~
+g:Tex_EnvironmentMaps Environment Mappings [|ls_a_bf|] 1
+g:Tex_EnvironmentMenus 1
+g:Tex_FontMaps Font Mappings [|ls_a_bs|] 1
+g:Tex_FontMenus 1
+g:Tex_SectionMaps Section Mappings [|ls_a_bt|] 1
+g:Tex_SectionMenus 1
+
+
+g:Tex_UseMenuWizard *ls_11_3_4* *ls_a_dc*
+ *Tex_UseMenuWizard*
+
+
+Type Boolean
+Default Value 0
+
+If this variable is set to 1, then when an environment is chosen from the menu
+then for selected environments, Latex-Suite asks a series of questions on the
+command line and inserts a template with the corresponding fields already filled
+in. Setting this to zero will insert a template with place-holders [|ls_a_eD|]
+marking off the places where fields need to be filled.
+
+
+g:Imap_FreezeImap *ls_11_3_5* *ls_a_dd*
+ *Imap_FreezeImap*
+
+Type boolean
+Default Value 0
+
+This option when set to 1, temporarily freezes Latex-Suite's macro expansion. It
+might be useful when you are using some other keymap which is causing excessive
+macro expansion. Use a buffer-local variable of the same name if you wish to
+affect just the present buffer.
+
+
+g:Tex_CatchVisMapErrors *ls_11_3_6* *ls_a_de*
+ *Tex_CatchVisMapErrors*
+
+
+Type Boolean
+Default Value 1
+
+With so many visual maps, its helpful to have a way of catching typing errors
+made in visual mode. What this does is to prompt you to correct your visual mode
+mapping if you start out with and then type some illegal keys. It basically maps
+just the g:Tex_Leader character to a function.
+
+
+g:Tex_Diacritics *ls_11_3_7* *ls_a_df*
+ *Tex_Diacritics*
+
+
+Type Boolean
+Default Value 0
+
+Whether or not you want to use diacritics [|ls_a_bw|].
+
+
+g:Tex_Leader *ls_11_3_8* *ls_a_dg*
+ *Tex_Leader*
+
+
+Type String
+Default Value '`'
+
+The mappings in Latex-Suite are by default prefixed with the back-tick
+character. For example, `/ inserts \frac{<++>}{<++>}<++> etc. You can change the
+prefix with the following setting. ',', '/', '`' are preferred values. '' or '\'
+will lead to a _lot_ of trouble.
+
+g:Tex_Leader is also used for visual mode mappings for fonts.
+
+
+g:Tex_Leader2 *ls_11_3_9* *ls_a_dh*
+ *Tex_Leader2*
+
+
+Type String
+Default Value ','
+
+In order to avoid clashes between the large number of visual mode macros
+provided, the visual mode macros for environments [|ls_a_bm|] and sections start
+with a character different from g:Tex_Leader.
+
+
+g:Tex_PromptedEnvironments *ls_11_3_10* *ls_a_di*
+ *Tex_PromptedEnvironments*
+
+
+Type String
+Default Value 'eqnarray*,eqnarray,equation,equation*,\[,$$,align,align*'
+
+This string represents a comma separated list of fields corresponding to
+environments. Pressing <F5> in insert-mode in the body of the document asks you
+to choose from one of these environments to insert.
+
+Leaving this string empty will leave the <F5> key unmapped
+
+
+g:Tex_HotKeyMappings *ls_11_3_11* *ls_a_dj*
+ *Tex_HotKeyMappings*
+
+
+Type String
+Default Value 'eqnarray*,eqnarray,bmatrix'
+
+This string represents a comma separated list of environments which are mapped
+to <Shift-F-1> through <Shift-F-4>. For example, pressing <Shift-F-2> with this
+setting inserts the eqnarray environment.
+
+Leaving this string empty will leave <Shift-F-1> through <Shift-F-4> unmapped.
+
+NOTE: Only the first four fields of this list are used. The rest are silently
+ ignored.
+
+
+
+
+g:Tex_PromptedCommands *ls_11_3_12* *ls_a_dk*
+ *Tex_PromptedCommands*
+
+
+Type String
+Default Value 'footnote,cite,pageref,label'
+
+This string represents a comma separated list of LaTeX commands which
+Latex-Suite uses for the <F7> and <S-F7> maps as described here [|ls_a_bo|].
+
+Leaving this string empty will leave the <F7> key unmapped.
+
+
+Tex_ItemStyle_environment *ls_11_3_13* *ls_a_dl*
+ *Tex_ItemStyle_environment*
+
+This setting affects the style which Latex-Suite uses to insert an \item when
+<Alt-I> is pressed as described here [|ls_a_bE|]. By default Latex-Suite defines
+styles for the following environments:
+
+Environment Style~
+itemize \item
+enumerate \item
+theindex \item
+thebibliography \item[<+biblabel+>]{<+bibkey+>} <++>
+description \item[<+label+>] <++>
+
+Each style is defined by a variable of the form g:Tex_ItemStyle_{envname} where
+envname is the name of the environment for which the style is defined. For
+example, by default >
+ g:Tex_ItemStyle_description = '\item[<+label+>] <++>'
+Redefining the style for a particular environment or defining a style for an
+entirely new environment is simply a matter of setting the value of a variable
+of the corresponding name.
+
+--------------------------------------------------------------------------------
+Smart Key Customization *ls_11_4* *ls_a_dm*
+ *customizing-smart-keys*
+
+These settings affect the smart key functionality as described here [|ls_a_bz|].
+
+
+
+g:Tex_SmartKeyBS *ls_11_4_1* *ls_a_dn*
+ *Tex_SmartKeyBS*
+
+
+Type Boolean
+Default Value 1
+
+Whether or not <Backspace> deletes diacritics.
+
+
+g:Tex_SmartKeyQuote *ls_11_4_2* *ls_a_do*
+ *Tex_SmartKeyQuote*
+
+
+Type Boolean
+Default Value 1
+
+Whether or not the smart quotes [|ls_a_bz|] functionality is available.
+
+If enabled, the quote characters can be customized by setting the following
+variables:
+
+Setting Value~
+g:Tex_SmartQuoteOpen "``"
+g:Tex_SmartQuoteClose "''"
+
+Non-English users will want to change these settings to their locale. These
+global variables will be ignored if there are buffer-local variables (with the
+same name), which may be set in the language specific package files, such as
+$VIM/ftplugin/latex-suite/packages/german.
+
+--------------------------------------------------------------------------------
+Latex Completion Customization *ls_11_5* *ls_a_dp*
+ *customizing-latex-completion*
+
+The following settings affect the completion [|ls_a_bR|] functionality in
+Latex-Suite.
+
+
+
+Window size settings *ls_11_5_1* *ls_a_dq*
+ *completion-window-preferences*
+
+These three settings affect the aesthetics of the completion functionality.
+
+ *Tex_ViewerCwindowHeight* *ls_a_ey*
+ *Tex_ViewerPreviewHeight* *ls_a_ez*
+ *Tex_ExplorerHeight* *ls_a_eA*
+ *Tex_ImageDir* *ls_a_eB*
+Setting Explanation Default Value~
+g:Tex_ViewerCwindowHeight The height of the cwindow which 5
+ displays the list of \labels
+ etc.
+g:Tex_ViewerPreviewHeight The height of the preview window 10
+ which shows the context of a
+ \label etc.
+g:Tex_ExplorerHeight The height of the explorer 10
+ window which lists the files
+ from which to choose an image
+ file.
+g:Tex_ImageDir The directory to scan for images ''
+
+
+g:Tex_BIBINPUTS *ls_11_5_2* *ls_a_dr*
+ *Tex_BIBINPUTS*
+
+
+Type string
+Default Value ''
+
+This string describes the directories which are scanned while trying to search
+for .bib and .bbl files. See the cite completion section [|ls_a_bU|] for more
+details.
+
+This string should be set in the syntax accepted by Vim's native 'path' setting.
+Do not include the present directory '.'. While searching for bibliography
+files, the present directory will be prepended to this variable.
+
+
+Tex_UseSimpleLabelSearch *ls_11_5_3* *ls_a_ds*
+ *Tex_UseSimpleLabelSearch*
+
+When set to 1, Latex-Suite searches for \labels in all .tex files in the
+directory containing the file being edited when <F9> is pressed. See \ref
+completion [|ls_a_bT|] for details.
+
+
+g:Tex_ProjectSourceFiles *ls_11_5_4* *ls_a_dt*
+ *Tex_ProjectSourceFiles*
+
+
+Type String
+Default Value ''
+
+This setting is meant to be initialized on a per-project basis using the
+Latex-Suite master file [|ls_a_ct|] as described in Latex-Suite Project
+[|ls_a_cr|] section. It is a list of source files which are used in the project.
+If defined, then instead of using the logic described in
+Tex_UseSimpleLabelSearch [|ls_a_ds|] to search for files in which to search for
+\labels, we simply search for \labels in this list. This significantly reduces
+the time it takes to generate the list of possible completions for large
+projects.
+
+The list is specified as a whitespace separated list of filenames relative to
+the location of the main file.
+
+
+g:Tex_RememberCiteSearch *ls_11_5_5* *ls_a_du*
+ *Tex_RememberCiteSearch*
+
+
+Type Boolean
+Default Value 0
+
+When this variable is non-zero, then Latex-Suite will try to remember results
+from the \cite completion as described in this section [|ls_a_bV|].
+
+--------------------------------------------------------------------------------
+Compiler Customization *ls_11_6* *ls_a_dv*
+ *customizing-compiling*
+
+The following settings affect Latex-Suite's compilation functionality
+
+
+
+g:Tex_DefaultTargetFormat *ls_11_6_1* *ls_a_dw*
+ *Tex_DefaultTargetFormat*
+
+
+Type String
+Default Value dvi for windows/*nix and pdf for mac
+
+Use this setting to choose the default target format. For example, setting this
+to pdf makes Latex-Suite compile a pdf file when you press \ll and fire up the
+pdf viewer on pressing \lv. Make sure that a rules for compiling and viewing
+have been defined for this target format as described here [|ls_a_dx|] and here
+[|ls_a_dF|].
+
+
+g:Tex_CompileRule_<format> *ls_11_6_2* *ls_a_dx*
+ *Tex_CompileRule_format*
+
+Here <format> refers to the target format for which this rule is defined.
+Latex-Suite supports compiling into dvi, ps and pdf by default. All these rules
+are strings defined by default as follows:
+
+
+g:Tex_CompileRule_dvi 'latex -interaction=nonstopmode $*'
+g:Tex_CompileRule_ps 'ps2pdf $*'
+g:Tex_CompileRule_pdf 'pdflatex -interaction=nonstopmode $*'
+
+If you desire forward and inverse searching via Latex-Suite, you will need to
+change g:Tex_CompileRule_dvi to include -src-specials. However, this has been
+known to cause problems with the output file. Therefore, use this with care.
+
+
+g:Tex_FormatDependency_<format> *ls_11_6_3* *ls_a_dy*
+
+Type string
+Default Value ''
+
+By default, there are no format dependencies defined. Each definition is of the
+form above where <format> is a string such as 'dvi' etc.
+
+The value of each string is a comma separated string such as 'dvi,ps'. See the
+Compiler dependency [|ls_a_ca|] section to see how to use/specify this setting
+
+
+g:Tex_MultipleCompileFormats *ls_11_6_4* *ls_a_dz*
+ *Tex_MultipleCompileFormats*
+
+Type string
+Default Value 'dvi'
+
+This is a comma separated string of formats for which the compiler needs to be
+called multiple times in order to get cross-references, citations etc right. See
+the Compiling multiple times [|ls_a_cb|] section for details.
+
+
+g:Tex_IgnoredWarnings *ls_11_6_5* *ls_a_dA*
+ *Tex_IgnoredWarnings*
+
+
+Type String
+Default Value a new-line separated list of patterns as described below
+
+The default value of this setting is >
+ \"Underfull\n".
+ \"Overfull\n".
+ \"specifier changed to\n".
+ \"You have requested\n".
+ \"Missing number, treated as zero.\n".
+ \"There were undefined references\n"
+ \"Citation %.%# undefined"
+This setting defines a set of patterns which will be filtered out when
+displaying the output from the latex compiler. This is to aid in filtering out
+very common warnings/errors.
+
+NOTE: Remember to check the value of g:Tex_IgnoreLevel [|ls_a_dB|] when you
+ change this setting. For example, if you append a new pattern which you
+ would like to ignore by default, increase the value of g:Tex_IgnoreLevel.
+
+
+
+
+g:Tex_IgnoreLevel *ls_11_6_6* *ls_a_dB*
+ *Tex_IgnoreLevel*
+
+
+Type Integer
+Default Value 7
+
+This setting defines a "filter level" or an "ignore level". A value of 7 for
+instance means that any warning/error matching with any of the first 7 fields of
+g:Tex_IgnoredWarnings [|ls_a_dA|] will be ignored. Setting this value to zero
+will mean that no error/warning is ignored. However, even with a value of zero,
+Latex-Suite will filter out most of the text which a LaTeX compiler typically
+produces. Use >
+ TCLevel strict
+from within Vim in order to see all the lines from the compiler's output.
+
+
+g:Tex_UseMakefile *ls_11_6_7* *ls_a_dC*
+ *Tex_UseMakefile*
+
+Type boolean
+Default Value 1
+
+When set to 1, then if a makefile or Makefile is present in the current
+directory, then Latex-Suite sets the makeprg option to just "make <target>",
+where <target> is the target format chosen using the TCTarget or TTarget
+commands.
+
+When set to 0, then Latex-Suite will set the makeprg setting to whatever is
+defined by the g:Tex_CompileRule_target [|ls_a_dx|] setting.
+
+
+g:Tex_GotoError *ls_11_6_8* *ls_a_dD*
+ *Tex_GotoError*
+
+
+Type boolean
+Default Value 1
+
+If set to 1, then pressing \ll will take you to the location of the first
+warning/error, otherwise you will remain in the original location but the
+errors/warnings will be listed in the preview window.
+
+--------------------------------------------------------------------------------
+Viewer Customization *ls_11_7* *ls_a_dE*
+ *customizing-viewing*
+
+The following settings affect how Latex-Suite will display compiled files.
+
+
+
+g:Tex_ViewRule_<format> *ls_11_7_1* *ls_a_dF*
+ *Tex_ViewRule_format*
+
+Here <format> refers to a format such as dvi, ps, etc. This variable defines the
+program which will be called to display a file of that format.
+
+By default, Latex-Suite defines viewer programs for viewing DVI, PS and PDF
+formats as follows:
+
+ Windows Unix~
+g:Tex_ViewRule_dvi 'yap -1' 'xdvi'
+g:Tex_ViewRule_ps 'gsview32' 'ghostview'
+g:Tex_ViewRule_pdf 'AcroRd32' 'xpdf'
+
+For Macintosh systems, these strings are left empty by default. This lets the
+system pick the program for each format. If you define these variables for Mac,
+the system choice will be over-ridden.
+
+Latex-Suite appends file.format to the above settings while calling the external
+programs. For example, with >
+ let g:Tex_ViewRule_dvi = 'yap -1'
+yap is called as >
+ !start yap -1 file.dvi
+from within Vim. (The initial start is used on Windows platforms is to make yap
+start as a separate process.) If you find the way Latex-Suite constructs the
+command line too restrictive, you can use the Tex_ViewRuleComplete_format
+[|ls_a_dG|] setting for more complete control on how the command line is
+constructed while calling the external program for viewing.
+
+NOTE: For windows, you will need to set the $PATH variable to include the paths
+ to yap, AcroRd32, gsview32 and any other programs. See your system
+ documentation for how to do this.
+
+
+NOTE: Default Viewing Format
+ ----------------------
+ To change the default format for viewing files, set the
+ g:Tex_DefaultTargetFormat [|ls_a_dw|] variable.
+
+
+
+
+Tex_ViewRuleComplete_<format> *ls_11_7_2* *ls_a_dG*
+ *Tex_ViewRuleComplete_format*
+
+Here <format> refers to the extension of a output format such as dvi, html etc.
+
+Tex_ViewRuleComplete_format takes precedence over Tex_ViewRule_format if both
+are specified. By default, Latex-Suite does not define values for
+Tex_ViewRuleComplete_format for any format. Unlike in the case of
+Tex_ViewRule_format, Latex-Suite does not modify Tex_ViewRuleComplete_format at
+all in constructing the command line. The only modification is to substitute
+'$*' everywhere in the string with the name of the file being viewed (without
+the extension).
+
+NOTE: IMPORTANT
+ ---------
+ Make sure you make the process go into the background otherwise vim will
+ wait for the viewer to terminate before letting you edit the file again.
+
+ To make a process go into the background on a *nix platform, use a
+ trailing & in the setting. On Windows, use start at the beginning of the
+ setting. Example: Suppose you have a latex->html converter which converts
+ a file say foo.tex to a file foo/index.html. Then you would use: >
+ " On *nix platform
+ let g:Tex_ViewRuleComplete_html = 'MozillaFirebird $*/index.html &'
+ " On windows platform
+ let g:Tex_ViewRuleComplete_html = 'start MozillaFirebird $*/index.html'
+<
+
+
+
+--------------------------------------------------------------------------------
+Menu Customization *ls_11_8* *ls_a_dH*
+ *customizing-menus*
+
+In addition to using the variables defined in this section to affect the
+menu-layout permanently (i.e, the layout Latex-Suite will start with), you can
+also use the TeX-Suite > Configure Menu menu to dynamically configure the menu
+layout after Latex-Suite has started.
+
+
+
+g:Tex_Menus *ls_11_8_1* *ls_a_dI*
+ *Tex_Menus*
+
+
+Type Boolean
+Default Value 1
+
+If set to 0, Latex-Suite will suppress showing all menus. Useful if you mostly
+work in terminals.
+
+
+g:Tex_MainMenuLocation *ls_11_8_2* *ls_a_dJ*
+ *Tex_MainMenuLocation*
+
+
+Type number
+Default Value 80
+
+This setting decides the location of the first top-level Latex-Suite menu. You
+can for example shift all the menus created by Latex-Suite to the very end by
+setting this value to a large number like 990.
+
+
+g:Tex_MathMenus *ls_11_8_3* *ls_a_dK*
+ *Tex_MathMenus*
+
+
+Type Boolean
+Default Value 1
+
+The Tex-Math menu consists of hundreds of mathematical symbols used in LaTeX.
+This menu comprises about 75% of the menus.
+
+
+g:Tex_NestElementMenus *ls_11_8_4* *ls_a_dL*
+ *Tex_NestElementMenus*
+
+
+Type Boolean
+Default Value 1
+
+This setting controls the "compactness" of the menus. If set to 1, then the
+Font, Counter and Dimensioning menus are collected together in a single menu
+called Tex-Elements, otherwise, they will each get a separate menu.
+
+
+g:Tex_PackagesMenu *ls_11_8_5* *ls_a_dM*
+ *Tex_PackagesMenu*
+
+
+Type Boolean
+Default Value 1
+
+Setting this to zero will stop Latex-Suite from automatically creating the
+TeX-Suite > Packages > Supported menu at startup. You can still create the menu
+after startup by going to TeX-Suite > Configure Menu.
+
+
+g:Tex_NestPackagesMenu *ls_11_8_6* *ls_a_dN*
+ *Tex_NestPackagesMenu*
+
+
+Type String
+Default Value 'TeX-'
+
+This string is the prefix added to all the menus created by Latex-Suite. If you
+define this variable with a dot ('.') as the last character, then all the menus
+created by Latex-Suite will be nested under a single master menu. For example,
+set this to '&LaTeX-Suite.' to nest all menus under a menu called &LaTeX-Suite.
+
+
+g:Tex_UseUtfMenus *ls_11_8_7* *ls_a_dO*
+ *Tex_UseUtfMenus*
+
+
+Type Boolean
+Default Value 0
+
+This setting controls whether Latex-Suite uses utf-8 symbols to display some of
+the mathematical symbols in the TeX-Math menu. It is necessary for your
+system/GUI to support utf-8. Setting this to 1 has the side-effect of setting
+the 'encoding' option of Vim to 'utf-8'.
+
+--------------------------------------------------------------------------------
+Folding Customization *ls_11_9* *ls_a_dP*
+ *customizing-folding*
+
+The following settings control the folding [|ls_a_ci|] functionality of
+Latex-Suite.
+
+
+
+g:Tex_Folding *ls_11_9_1* *ls_a_dQ*
+ *Tex_Folding*
+
+
+Type Boolean
+Default Value 1
+
+Setting this to zero completely disables Latex-Suite's folding functionality.
+However, the TexFoldTextFunction() is still available in case you want to use
+another folding scheme but still want to continue using the fold text function.
+
+
+g:Tex_AutoFolding *ls_11_9_2* *ls_a_dR*
+ *Tex_AutoFolding*
+
+
+Type Boolean
+Default Value 1
+
+This setting controls whether Latex-Suite automatically creates manual folds for
+a file when it is opened. You can still use the \rf mapping to refresh/create
+folds even when this variable is set to zero.
+
+--------------------------------------------------------------------------------
+Package Handling Customization *ls_11_10* *ls_a_dS*
+ *customizing-packages*
+
+These settings affect the custom packages [|ls_a_bN|] functionality in
+Latex-Suite
+
+
+
+g:Tex_TEXINPUTS *ls_11_10_1* *ls_a_dT*
+ *Tex_TEXINPUTS*
+
+
+Type string
+Default Value ''
+
+This setting describes the directories scanned by Latex-Suite while searching
+for custom user packages as described in the custom packages [|ls_a_bN|]
+section. Do not include the present directory in this setting. The present
+directory is always scanned for custom packages.
+
+This string should be set in the syntax accepted by Vim's native 'path' setting.
+
+================================================================================
+Credits *ls_12* *ls_a_dU*
+ *latex-suite-credits*
+
+
+
+And finally, the credits:
+
+
+Artur R. Czechowski maintains the BSD package of Latex-Suite. Lots of valuable
+ feedback.
+Lubomir Host provided the diacritics and also helped in development.
+Alexander Wagner valuable suggestions during development.
+Luc Hermitte his variation of Stephen Riehm's bracketing system is used
+ in Latex-Suite.
+Gergely Kontra the clever little JumpFunc() in imaps.vim is due to him.
+ The implementation of the templates also borrows from
+ mu-template.vim by him.
+Dimitri Antoniou author of ltags and also provided the nice tip about
+ forward / reverse search on DVI documents.
+Stephen Riehm the extremely helpful bracketing system is from him.
+Alan Schmitt provided macros/folding elements. Continued feedback,
+ bug-reports/fixes.
+Hari Krishna Dara for ExecMap(), the clever little function which makes
+ typing visual mode mappings so much easier and error-free.
+Alan G Isac for the comprehensive BibT() function for entering bibtex
+ entries.
+Gontran Baerts for libList.vim
+Peter Heslin useful discussion and also a lot of bug fixes. the
+ %%fakesection in folding.vim.
+Zhang Lin-bo lots of very useful additions to folding. The code for
+ customizing the folding scheme is due to him.
+
+A large number of functions in Latex-Suite come from various other people. Some
+of those people might have been missed here. Each function should however have
+the author's name/e-mail above it. Thats the more authoritative place to check
+out who has done what.
+
+ *latex-suite-maintainer* *ls_a_eC*
+The current maintainer(s) of Latex-Suite is(are)
+
+
+Srinath Avadhanula <srinath@fastmail.fm>
+
+Mikolaj Machowski <mikmach@wp.pl>
+
+Benji Fisher <benji@member.AMS.org>
+
+================================================================================
+URLs used in this file
+
+*ls_u_1* : http://vim-latex.sourceforge.net
+*ls_u_10* : http://developer.kde.org/~kdvi/
+*ls_u_11* : http://okular.kde.org/
+*ls_u_12* : http://math.berkeley.edu/~vojta/xdvi.html
+*ls_u_13* : http://xdvi.sourceforge.net/
+*ls_u_14* : http://itexmac.sourceforge.net/pdfsync.html
+*ls_u_2* : http://vim-latex.sourceforge.net/index.php?subject=download
+*ls_u_3* : http://www.cygwin.com
+*ls_u_4* : http://www.google.com/search?q=windows%20gnu%20grep
+*ls_u_5* : http://skim-app.sourceforge.net/
+*ls_u_6* : http://pdfview.sourceforge.net/
+*ls_u_7* : http://www2.ing.unipi.it/~d9615/homepage/texniscope.html
+*ls_u_8* : http://www.miktex.org/
+*ls_u_9* : http://blog.kowalczyk.info/software/sumatrapdf/
+
+================================================================================
+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:anonymous@cvs.vim-latex.sf.net:/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*\\*.*',"",""),'^--','\ \ \ \ \ \ ','')
+================================================================================
diff --git a/src/vim-latex/doc/latex-suite.xml b/src/vim-latex/doc/latex-suite.xml
new file mode 100644
index 0000000..e2c7d08
--- /dev/null
+++ b/src/vim-latex/doc/latex-suite.xml
@@ -0,0 +1,4665 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "docbook-xml/docbookx.dtd"
+[<!ENTITY dummy "dummy">
+ <!ENTITY date "$Date$">
+ <!ENTITY ls "Latex-Suite">
+ <!ENTITY latex "LaTeX">
+ <!ENTITY vim "Vim">
+ <!ENTITY ph "&lt;++&gt;">
+]>
+<article lang="en">
+ <articleinfo id="articleinfo">
+
+ <title id="articleinfo-title">&ls; Reference</title>
+
+ <author>
+ <firstname>Srinath</firstname>
+ <surname>Avadhanula</surname>
+ <affiliation>
+ <address><email>srinath AT fastmail DOT fm</email></address>
+ </affiliation>
+ </author>
+ <author>
+ <firstname>Mikolaj</firstname>
+ <surname>Machowski</surname>
+ <affiliation>
+ <address><email>mikmach AT wp DOT pl</email></address>
+ </affiliation>
+ </author>
+
+ <date>&date;</date>
+ <abstract>
+ <para>
+ &ls; attempts to provide a comprehensive set of tools to
+ view, edit and compile LaTeX documents in Vim. Together, they
+ provide tools starting from macros to speed up editing LaTeX
+ documents to functions for forward searching .dvi documents.
+ &ls; has been possible because of the contributions of many
+ people. Please see <link
+ linkend="latex-suite-credits">latex-suite-credits</link> for a list of
+ people who have helped.
+ </para>
+ <para>
+ &ls; is released under the Vim charityware license. For
+ license and conditions of use look at |copyright|. Replace all
+ occurrences of ``Vim'' with ``Latex-Suite''. The current copyright
+ holders of &ls; are Srinath Avadhanula and Mikolaj Machowski.
+ </para>
+ <para>
+ Homepage: <ulink url="http://vim-latex.sourceforge.net">http://vim-latex.sourceforge.net</ulink>
+ </para>
+ </abstract>
+ </articleinfo>
+ <section id="recommended-settings">
+ <title>Installation and recommended Settings</title>
+ <para>
+ If you are reading this, it most probably means that you have already
+ installed &ls; and the help files. If this is not the case, follow the
+ detailed instructions on <ulink
+ url="http://vim-latex.sourceforge.net/index.php?subject=download">&ls;'s
+ download page</ulink>.
+ </para>
+ <para>
+ Make sure that you create a few necessary settings in your
+ <literal>~/.vimrc.</literal>
+ <programlisting>
+" REQUIRED. This makes vim invoke &ls; when you open a tex file.
+filetype plugin on
+
+" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
+" can be called correctly.
+set shellslash
+
+" IMPORTANT: grep will sometimes skip displaying the file name if you
+" search in a singe file. This will confuse &ls;. Set your grep
+" program to always generate a file-name.
+set grepprg=grep\ -nH\ $*
+
+" OPTIONAL: This enables automatic indentation as you type.
+filetype indent on
+
+" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
+" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
+" The following changes the default filetype back to 'tex':
+let g:tex_flavor='latex'
+</programlisting>
+ </para>
+ <para>
+ In addition, the following settings could go in your ~/.vim/ftplugin/tex.vim
+ file:
+ <programlisting>" this is mostly a matter of taste. but LaTeX looks good with just a bit
+" of indentation.
+set sw=2
+" TIP: if you write your \label's as \label{fig:something}, then if you
+" type in \ref{fig: and press &lt;C-n&gt; you will automatically cycle through
+" all the figure labels. Very useful!
+set iskeyword+=:
+</programlisting>
+ </para>
+ </section>
+ <section id="latex-suite-templates">
+ <title>Inserting Templates</title>
+ <para>
+ This functionality is available via the <literal>TeX-Suite &gt;
+ Templates</literal> menu.
+ This module provides a way to insert custom templates at the beginning of the
+ current file.
+ </para>
+ <para>
+ When &ls; first starts up, it scans the
+ <literal>$VIM/ftplugin/latex-suite/templates/</literal>
+ directory and creates menu items based on the files found there. When
+ you select a template from this menu, the file will be read in above
+ the first line of the current file.
+ </para>
+ <para>
+ A template file can utilize placeholders for initializing the cursor
+ position when the template is read in and subsequent movement. In
+ addition, template files can contain dynamic elements such as the
+ time of creation of a file etc, by using vim expressions.
+ </para>
+ <para>
+ You can place your own templates in the
+ <literal>$VIM/ftplugin/latex-suite/templates/</literal> directory in
+ order for them to be available via the menu. Unless &ls; releases a
+ template with the same name, these files should not get over-written
+ when you install a new release over an existing one.
+ </para>
+ <note>
+ <para>
+ Templates are also accessible for non-gui users with the command
+ |<literal>:TTemplate</literal>|. The argument should be name of
+ the corresponding template file. If the command is called
+ without arguments (preferred usage), then a list of available
+ templates is displayed and the user is asked to choose one of
+ them.
+ </para>
+ </note>
+ </section>
+ <section id="latex-macros">
+ <title>&ls; Macros</title>
+ <para>
+ &ls; ships with a very comprehensive set of insert mode and
+ |visual-mode| mappings and menu items to typeset most of the LaTeX
+ elements.
+ </para>
+ <note>
+ <para>
+ These mappings are are not standard mappings in the sense that
+ only the last character is mapped. See plugin/imaps.vim for
+ further documentation. For example, in the case of the mapping
+ <literal>EFI</literal> provided by &ls; you can press the characters
+ '<literal>E</literal>', '<literal>F</literal>' and '<literal>I</literal>'
+ as slowly as you wish (unlike the normal <literal>imap</literal> command
+ where <literal>timeout</literal> issues are involved). The characters are
+ visible as you type them (unlike normal <literal>imap</literal>s) and you
+ can use the movement or backspace key to correct yourself unlike normal
+ mappings.
+ </para>
+ </note>
+ <anchor id="place-holder" />
+ <note id="place-holders">
+ <title>Place Holders</title>
+ <para>
+ Almost all macros provided in &ls; implement Stephen Riem's bracketing
+ system and Gergely Kontra's <literal>JumpFunc()</literal> for handling
+ place-holders. This consists of using "place-holders" to mark off
+ locations where the next relevant editing has to be done. As an example,
+ when you type <literal>EFI</literal> in |insert-mode|, you will get the
+ following:
+ <programlisting>\begin{figure}[h]
+ \centerline{\psfig{figure=&lt;+eps file+&gt;}}
+ \caption{&lt;+caption text+&gt;}
+ \label{fig:&lt;+label+&gt;}
+\end{figure}&lt;++&gt;</programlisting>
+ The text <literal>&lt;+eps file+&gt;</literal> will be selected and
+ you will be left in |select-mode| so that you can continue typing
+ straight away. After having typed in the file name, you can press
+ <literal>&lt;Ctrl-J&gt;</literal> (while still in insert-mode). This will
+ take you directly to the next "place-holder". i.e, <literal>&lt;+caption
+ text+&gt;</literal> will be visually selected with Vim in select mode
+ again for typing in the caption. This saves on a lot of key presses.
+ </para>
+ </note>
+ <note id="overriding-macros">
+ <title>Over-riding &ls; Macros</title>
+ <para>
+ If you wish to change these macros from their default values, for
+ example, if you wish to change <literal>`w</literal> to expand to
+ <literal>\omega</literal> instead of its default expansion to
+ <literal>\wedge</literal>, you should use the <literal>IMAP</literal>
+ function as described in the <link linkend="ls-new-macros">Using
+ IMAP()</link> section.
+ </para>
+ <para>
+ An important thing to note is that if you wish to over-ride macros
+ created by &ls; rather than merely create new macros, you should place
+ the <literal>IMAP()</literal> calls in a script which gets sourced
+ after the files in &ls;. A good place typically is as a file-type
+ plugin file in the
+ <literal>~/.vim/after/ftplugin/</literal> directory. (Use
+ <literal>~/vimfiles</literal> if you are using
+ <literal>WINDOWS</literal>). For example to over-ride
+ <literal>`w</literal> to <literal>\omega</literal> instead of
+ <literal>\wedge</literal>, place the following line in (say)
+ <literal>~/.vim/after/ftplugin/tex_macros.vim</literal>:
+ <programlisting>call IMAP('`w', '\omega', 'tex')</programlisting>
+ </para>
+ <note>
+ <para>
+ It is important to use a file-name which will get sourced on a
+ <literal>FileType</literal> event. Therefore you must use a file-name
+ which conforms to the standards as described in
+ <literal>|ftplugin-name|</literal>.
+ </para>
+ </note>
+ </note>
+ <note id="pausing-imaps">
+ <title>Pausing Macro expansion</title>
+ <para>
+ If you wish to temporarily suspend the imaps functionality, then you
+ can set the <literal>Imap_FreezeImap</literal> to 1. If you set
+ <literal>g:Imap_FreezeImap</literal> to 1, then it will be a
+ system-wide setting. Setting <literal>b:Imap_FreezeImap</literal> will
+ affect only the current buffer.
+ </para>
+ </note>
+ <para>
+ The following sections describe the various editing macros provided
+ by &ls;.
+ </para>
+ <section id="environment-mappings">
+ <title>Environment Mappings</title>
+ &ls; provides a rich set of mappings to insert, enclose and modify
+ &latex; environments, i.e, <literal>\begin{...} ... \end{...}</literal>
+ pairs.
+ <section id="inserting-environments">
+ <title>Inserting Environments</title>
+ <para>
+ &ls; provides the following ways to insert environments
+ </para>
+ <section id="inserting-env-f5">
+ <title>Method 1: Pressing <literal>&lt;F5&gt;</literal></title>
+ <para>
+ If you press <literal>&lt;F5&gt;</literal> in the insert or normal
+ mode while on an empty line, &ls; 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. If you press
+ <literal>&lt;F5&gt;</literal> on a line which already has a word,
+ then that word is used instead of prompting.
+ </para>
+ <para>
+ See <link linkend="Tex_Env_name">Tex_Env_name</link> for a
+ description of how &ls; uses the word to form the expansion and how
+ to modify &ls;'s behavior.
+ </para>
+ <para>
+ The list of environments which &ls; prompts you with (when
+ <literal>&lt;F5&gt;</literal> is pressed on an empty line) is formed
+ from the <link
+ linkend="Tex_PromptedEnvironments">Tex_PromptedEnvironments</link>
+ setting.
+ </para>
+ <para>
+ In addition to this setting, &ls; also lists environments found in
+ custom packages as described in the section <link
+ linkend="package-actions">Package actions.</link>
+ </para>
+ </section>
+ <section id="inserting-env-shift-f1">
+ <title>Method 2: Using <literal>&lt;S-F1&gt;</literal>-<literal>&lt;S-F4&gt;</literal></title>
+ <para>
+ The shifted function keys, <literal>&lt;S-F1&gt;</literal> to
+ <literal>&lt;S-F4&gt;</literal> can be mapped to insert very commonly
+ used environments. The environments mapped to each key can be
+ customized via the <link
+ linkend="Tex_HotKeyMappings">g:Tex_HotKeyMappings</link> setting.
+ </para>
+ </section>
+ <section id="inserting-env-threeletter">
+ <title>Method 3: Using three letter sequences</title>
+ <para>
+ Environments can also be inserted by pressing a 3 capital letter
+ sequence starting with an <literal>E</literal>. The sequence of 3
+ letters generally tries to follow the following rules:
+ </para>
+ <orderedlist>
+ <listitem>
+ All environment mappings begin with <literal>E</literal>
+ </listitem>
+ <listitem>
+ If the environment can be broken up into 2 distinct words,
+ such as flushright (flush + right), then the next 2 letters
+ are the first letters of the 2 words. Example:
+ <programlisting>flushleft (_f_lush + _l_eft) ---&gt; EFL
+flushright (_f_lush + _r_ight) ---&gt; EFR
+eqnarray (_e_qn + _a_rray) ---&gt; EEA</programlisting>
+ If on the other hand, the environment name cannot be broken
+ up into 2 distinct words, then the next 2 letters are the
+ first 2 letters of the name of the environment.
+ Example:
+ <programlisting>equation (_eq_uation) ---&gt; EEQ</programlisting>
+ </listitem>
+ </orderedlist>
+ <para>
+ Unfortunately there are some environments that cannot be
+ split in two words and first two letters in name are
+ identical. In this case shortcut is created from E, first and
+ last letter. Example:
+ <programlisting>quote (_q_uot_e_) ---&gt; EQE
+quotation (_q_uotatio_n_) ---&gt; EQN</programlisting>
+ Of course, not every last one of the environments can follow
+ this rule because of ambiguities. In case of doubt, pull down
+ the Tex-Environments menu. The menu item should give the hint
+ for the map.
+ </para>
+ </section>
+ </section>
+ <section id="enclosing-environments">
+ <title>Enclosing in Environments</title>
+ <para>
+ &ls; provides visual-mode mappings which enclose visually
+ selected portions of text in environments. There are two ways provided
+ to do this.
+ </para>
+ <section id="enclosing-env-f5">
+ <title>Method 1: Pressing <literal>&lt;F5&gt;</literal></title>
+ <para>
+ You can also select a portion of text visually and press
+ <literal>&lt;F5&gt;</literal> while still in visual mode. This will
+ prompt you with a list of environments. (This list can be customized
+ via the <link
+ linkend="Tex_PromptedEnvironments">g:Tex_PromptedEnvironments</link>
+ setting). You can either choose from this list or type in a new
+ environment name. Once the selection is done, &ls; encloses the
+ visually selected portion in the chosen environment.
+ </para>
+ </section>
+ <section id="enclosing-env-threeletter">
+ <title>Method 2: Using three letter mappings</title>
+ <para>
+ You can also select text visually and press a sequence of three
+ characters beginning with <literal>,</literal> (the single comma
+ character) and the selected text will be enclosed in the chosen
+ environment. The three letter sequence follows directly from the
+ three letter sequence used to insert environments as described <link
+ linkend="inserting-env-threeletter">here</link>. The following
+ example describes the rule used:
+ </para>
+ <para>
+ If <literal>ECE</literal> inserts a
+ <literal>\begin{center}...\end{center}</literal> environment, then to
+ enclose a block of selected text in
+ <literal>\begin{center}...\end{center}</literal>, simply select the
+ text and press <literal>,ce</literal>. The rule simply says that the
+ leading <literal>E</literal> is converted to <literal>,</literal> and
+ the next 2 letters are small case.
+ </para>
+ </section>
+ <para>
+ Some of the visual mode mappings are sensitive to whether you
+ choose line-wise or character-wise. For example, if you choose a
+ word and press <literal>,ce</literal>, then you get
+ <literal>\centerline{word}</literal>, whereas if you press
+ <literal>,ce</literal> on a line-wise selection, you get:
+ <programlisting>\begin{center}
+ line
+\end{center}</programlisting>
+ </para>
+ </section>
+ <section id="changing-environments">
+ <title>Changing Environments</title>
+ <para>
+ Pressing <literal>&lt;S-F5&gt;</literal> in normal mode detects which
+ environment the cursor is presently located in and prompts you to
+ replace it with a new one. The innermost environment is detected. For
+ example, in the following source:
+ <programlisting>\begin{eqnarray}
+ \begin{array}{ccc}
+ 2 &amp; 3 &amp; 4
+ \end{array}
+\end{eqnarray}</programlisting>
+ if you are located in the middle "2 &amp; 3 &amp; 4" line, then pressing
+ <literal>&lt;S-F5&gt;</literal> will prompt you to change the array
+ environment, not the eqnarray environment. In addition, &ls; will also
+ try to change lines within the environment to be consistent with the
+ new environment. For example, if the original environment was an
+ <literal>eqnarray</literal> environment with a
+ <literal>\label</literal> command, then changing it to an
+ <literal>eqnarray*</literal> environment will delete the
+ <literal>\label</literal>.
+ </para>
+ <para>
+ Pressing <literal>&lt;F5&gt;</literal> in normal mode has the same
+ effect as pressing <literal>&lt;F5&gt;</literal> in insert-mode,
+ namely you will be prompted to choose an environment to insert.
+ </para>
+ </section>
+ </section>
+ <section id="latex-command-maps">
+ <title>Command Mappings</title>
+ &ls; provides a rich set of mappings to insert, enclose and modify
+ &latex; commands.
+ <section id="inserting-commands">
+ <title>Inserting &latex; commands</title>
+ <anchor id="ls-imap-f7" />
+ <anchor id="ls-imap-s-f7" />
+ <para>
+ Pressing <literal>&lt;F7&gt;</literal> in insert or normal mode while
+ the cursor is touching a word will insert a command formed from the
+ word touching the cursor.
+ </para>
+ <para>
+ For certain common commands, &ls; will expand them to include
+ additional arguments as needed. For example, <literal>frac</literal>
+ becomes <literal>\frac{&ph;}{&ph;}&ph;</literal>. Otherwise, it will
+ simply change the word under the cursor as follows
+ <programlisting>word --> \word{&ph;}&ph;</programlisting>
+ You can define custom expansions
+ of commands using the <literal>Tex_Com_{name}</literal> setting as
+ described in <link linkend="Tex_Com_name">here</link>.
+ </para>
+ <para>
+ If <literal>&lt;F7&gt;</literal> is pressed when the cursor is on
+ white-space, then &ls; will prompt you to choose a command and insert
+ that instead.The list of commands is constructed from the <link
+ linkend="Tex_PromptedCommands"><literal>g:Tex_PromptedCommands</literal></link>
+ setting and also from commands which &ls; finds while scanning custom
+ packages which &ls; finds. See the <link
+ linkend="package-actions">Package actions</link> section for details
+ on which files are scanned etc.
+ </para>
+ </section>
+ <section id="enclosing-commands">
+ <title>Enclosing in a command</title>
+ <para>
+ You can select a portion of text visually and press
+ <literal>&lt;F7&gt;</literal> while still in visual mode. This will
+ prompt you with a list of commands. (This list can be customized
+ via the <link
+ linkend="Tex_PromptedCommands">g:Tex_PromptedCommands</link>
+ setting). You can either choose from this list or type in a new
+ command name. Once the selection is done, &ls; encloses the
+ visually selected portion in the chosen command.
+ </para>
+ </section>
+ <section id="changing-commands">
+ <title>Changing commands</title>
+ <anchor id="ls-vmap-f7" />
+ <para>
+ In both insert and normal mode <literal>&lt;S-F7&gt;</literal> will
+ find out if you are presently within an environment and then prompt you
+ with a list of commands to change it to.
+ </para>
+ </section>
+ </section>
+ <section id="font-maps">
+ <title>Font Mappings</title>
+ <para>
+ These mappings insert font descriptions such as:
+ <literal>\textsf{&ph;}&ph;</literal>
+ with the cursor left in place of the first <link
+ linkend="place-holders">placeholder</link> (the &ph; characters).
+ </para>
+ <para>
+ Mnemonic:
+ <orderedlist>
+ <listitem>first letter is always F (F for font)</listitem>
+ <listitem>next 2 letters are the 2 letters describing the font.</listitem>
+ </orderedlist>
+ </para>
+ <para>
+ Example: Typing <literal>FEM</literal> in insert-mode expands to
+ <literal>\emph{&ph;}&ph;</literal>.
+ </para>
+ <para>
+ Just like environment mappings, you can visually select an area and press
+ <literal>`sf</literal> to have it enclosed in:
+ <literal>\textsf{word}</literal>
+ or
+ <programlisting>{\sffamily
+line
+}</programlisting>
+ depending on character-wise or line-wise selection.
+ </para>
+ </section>
+ <section id="section-mappings">
+ <title>Section Mappings</title>
+ <para>
+ These maps insert &latex; sections such as:
+ <programlisting>\section{&ph;}&ph;</programlisting>
+ etc. Just as in the case of environments and fonts, can be enclosed with a
+ visual selection. The enclosing is not sensitive to character or line-wise
+ selection.
+ </para>
+ <para>
+ Mnemonic: (make your own!)
+ <programlisting>SPA for part
+SCH for chapter
+SSE for section
+SSS for subsection
+SS2 for subsubsection
+SPG for paragraph
+SSP for subparagraph</programlisting>
+ </para>
+ <para>
+ Example:
+ SSE in insert mode inserts
+ <programlisting>\section{&lt;++&gt;}&lt;++&gt;</programlisting>
+ If you select a word or line and press <literal>,se</literal>, then you
+ get
+ <programlisting>\section{section name}</programlisting>
+ The menu item in Tex-Environments.Sections have a sub-menu called
+ 'Advanced'. Choosing an item from this sub-menu asks a couple of questions
+ (whether you want to include the section in the table of contents, whether
+ there is a shorter name for the table of contents) and then creates a more
+ intelligent template.
+ </para>
+ </section>
+ <section id="greek-letter-mappings">
+ <title>Greek Letter Mappings</title>
+ <para>
+ Lower case
+ </para>
+ <literal>`a</literal> through <literal>`z</literal> expand to
+ <literal>\alpha</literal> through <literal>\zeta</literal>.
+ <para>
+ Upper case:
+ </para>
+ <programlisting>`D = \Delta
+`F = \Phi
+`G = \Gamma
+`Q = \Theta
+`L = \Lambda
+`X = \Xi
+`Y = \Psi
+`S = \Sigma
+`U = \Upsilon
+`W = \Omega</programlisting>
+ <note><para>LaTeX does not support upper case for all greek alphabets.</para></note>
+ <para>Just like other &ls; mappings, these mappings are not created using
+ the standard <literal>imap</literal> command. Thus you can type slowly,
+ correct using <literal>&lt;BS&gt;</literal> etc.</para>
+ </section>
+ <section id="auc-tex-mappings">
+ <title>Auc-Tex Key Bindings</title>
+ <para>
+ These are simple 2 key expansions for some very commonly used LaTeX
+ elements:
+ </para>
+ <programlisting>`^ Expands To \Hat{&ph;}&ph;
+`_ expands to \bar{&ph;}&ph;
+`6 expands to \partial
+`8 expands to \infty
+`/ expands to \frac{&ph;}{&ph;}&ph;
+`% expands to \frac{&ph;}{&ph;}&ph;
+`@ expands to \circ
+`0 expands to ^\circ
+`= expands to \equiv
+`\ expands to \setminus
+`. expands to \cdot
+`* expands to \times
+`&amp; expands to \wedge
+`- expands to \bigcap
+`+ expands to \bigcup
+`( expands to \subset
+`) expands to \supset
+`&lt; expands to \le
+`&gt; expands to \ge
+`, expands to \nonumber
+`~ expands to \tilde{&ph;}&ph;
+`; expands to \dot{&ph;}&ph;
+`: expands to \ddot{&ph;}&ph;
+`2 expands to \sqrt{&ph;}&ph;
+`| expands to \Big|
+`I expands to \int_{&ph;}^{&ph;}&ph;</programlisting>
+ <para>
+ (again, notice the convenient place-holders)
+ </para>
+ <para>
+ In addition the visual mode macros are provided:
+ </para>
+ <programlisting>`( encloses selection in \left( and \right)
+`[ encloses selection in \left[ and \right]
+`{ encloses selection in \left\{ and \right\}
+`$ encloses selection in $$ or \[ \] depending on characterwise or
+ linewise selection</programlisting>
+ </section>
+ <section id="diacritic-mappings">
+ <title>Diacritics</title>
+ <para>
+ These mappings speed up typing European languages which contain diacritic
+ characters such as a-umlaut etc.
+ <programlisting>+&lt;l&gt; expands to \v{&lt;l&gt;}
+=&lt;l&gt; expands to \'{&lt;l&gt;}</programlisting>
+ where <literal>&lt;l&gt;</literal> is an alphabet.
+ </para>
+ <programlisting>+} expands to \"{a}
++: expands to \^{o}</programlisting>
+ <para>
+ &ls; also ships with <link linkend="smart-backspace">smart
+ backspacing</link> functionality which provides another convenience while
+ editing languages with diacritics.
+ </para>
+ <note>
+ <para>Diacritics are disabled by default in &ls; because they can
+ sometimes be a little too intrusive. Moreover, most European users can
+ nowadays use font encodings which display diacritic characters directly
+ instead of having to rely on &ls;'s method of displaying diacritics.</para>
+ <para>Set the <link linkend="Tex_Diacritics">g:Tex_Diacritics</link>
+ variable to enable diacritics.</para>
+ </note>
+ </section>
+ <section id="bibtex-bindings">
+ <title>BibTeX Shortcuts</title>
+ <para>
+ &ls; provides an easy way of entering bibliographic entries. Four
+ insert-mode mappings: <literal>BBB</literal>, <literal>BBL</literal>,
+ <literal>BBH</literal> and <literal>BBX</literal> are provided, all of
+ which essentially act in the same manner. When you type any of these in
+ insert-mode, you will get a prompt asking you to choose a entry type
+ for the bibliographic entry.
+ </para>
+ <para>
+ When you choose an entry type, a bibliographic entry template will be
+ inserted. For example, if you choose the option
+ <literal>'book'</literal> via the map <literal>BBB</literal>, then
+ the following template will be inserted:
+ <programlisting>@BOOK{&lt;+key+&gt;,
+ author = {&ph;},
+ editor = {&ph;},
+ title = {&ph;},
+ publisher = {&ph;},
+ year = {&ph;},
+ otherinfo = {&ph;}
+}&ph;</programlisting>
+ </para>
+ <para>
+ <literal>&lt;+key+&gt;</literal> will be highlighted in select-mode and
+ you can type in the bib-key. After that you can use
+ <literal>&lt;Ctrl-J&gt;</literal> to navigate to successive locations
+ in the template and enter new values.
+ </para>
+ <para>
+ <literal>BBB</literal> inserts a template with only the fields
+ mandatorily required for a given entry type. <literal>BBL</literal>
+ inserts a template with commonly used extra options.
+ <literal>BBH</literal> inserts a template with more options which are
+ not as commonly used. <literal>BBX</literal> inserts a template with
+ all the fields which the entry type supports.
+ </para>
+ <note>
+ <title>Mnemonic</title>
+ <para>
+ <literal>B</literal> for Bibliographic entry, <literal>L</literal>
+ for Large entry, <literal>H</literal> for Huge entry, and
+ <literal>X</literal> stands for all eXtras.
+ </para>
+ </note>
+ <section id="adding-bib-options">
+ <title>Customizing Bib-TeX fields</title>
+ <para>
+ If you wish the <literal>BBB</literal> command to insert a few
+ additional fields in addition to the fields it creates, then you will
+ need to define global variables of the form
+ <programlisting>g:Bib_{type}_options</programlisting>
+ in you <literal>$VIM/ftplugin/bib.vim</literal> file, where
+ <literal>{type}</literal> is a string like
+ <literal>'article'</literal>, <literal>'book'</literal> etc. This
+ variable should contain one of the letters defined in the following
+ table
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Character</entry>
+ <entry>Field Type</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row><entry>w</entry><entry>address</entry></row>
+ <row><entry>a</entry><entry>author</entry></row>
+ <row><entry>b</entry><entry>booktitle</entry></row>
+ <row><entry>c</entry><entry>chapter</entry></row>
+ <row><entry>d</entry><entry>edition</entry></row>
+ <row><entry>e</entry><entry>editor</entry></row>
+ <row><entry>h</entry><entry>howpublished</entry></row>
+ <row><entry>i</entry><entry>institution</entry></row>
+ <row><entry>k</entry><entry>isbn</entry></row>
+ <row><entry>j</entry><entry>journal</entry></row>
+ <row><entry>m</entry><entry>month</entry></row>
+ <row><entry>z</entry><entry>note</entry></row>
+ <row><entry>n</entry><entry>number</entry></row>
+ <row><entry>o</entry><entry>organization</entry></row>
+ <row><entry>p</entry><entry>pages</entry></row>
+ <row><entry>q</entry><entry>publisher</entry></row>
+ <row><entry>r</entry><entry>school</entry></row>
+ <row><entry>s</entry><entry>series</entry></row>
+ <row><entry>t</entry><entry>title</entry></row>
+ <row><entry>u</entry><entry>type</entry></row>
+ <row><entry>v</entry><entry>volume</entry></row>
+ <row><entry>y</entry><entry>year</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ For example, by default, choosing <literal>'article'</literal> via
+ <literal>BBB</literal> inserts the following template by default
+ <programlisting>@ARTICLE{&lt;+key+&gt;,
+ author = {&ph;},
+ title = {&ph;},
+ journal = {&ph;},
+ year = {&ph;},
+ otherinfo = {&ph;}
+}&ph;</programlisting>
+ However, if <literal>g:Bib_article_options</literal> is defined as
+ <literal>'mnp'</literal>, then <literal>'article'</literal> will
+ insert the following template
+ <programlisting>@ARTICLE{&lt;+key+&gt;,
+ author = {&ph;},
+ title = {&ph;},
+ journal = {&ph;},
+ year = {&ph;},
+ month = {&ph;},
+ number = {&ph;},
+ pages = {&ph;},
+ otherinfo = {&ph;}
+}&ph;</programlisting>
+ </para>
+ <para>
+ If you have some other fields you wish to associate with an article
+ which are not listed above, then you will have to use the
+ <literal>Bib_{type}_extrafields</literal> option. This is a newline
+ separated string of complete field names which will be included in the
+ template. For example, if you define
+ <programlisting>let g:Bib_article_extrafields = "crossref\nabstract"</programlisting>
+ then the article template will include the lines
+ <programlisting>crossref = {&ph;},
+abstract = {&ph;},</programlisting>
+ </para>
+ <note>
+ <para>
+ You will need to define <literal>Bib_*</literal> settings in your
+ <literal>$VIMRUNTIME/ftplugin/bib.vim</literal> file.
+ </para>
+ </note>
+ </section>
+ </section>
+ <section id="smart-keys">
+ <title>Smart Key Mappings</title>
+ <para>
+ &ls; ships with the following smart keys:
+ </para>
+ <formalpara>
+ <anchor id="smart-backspace" />
+ <title>Smart Backspace</title>
+ Pressing <literal>&lt;BS&gt;</literal> in insert mode checks to see
+ whether we are just after something like <literal>\'{a}</literal> and
+ if so, deletes all of it. i.e, diacritics are treated as single
+ characters for backspacing.
+ </formalpara>
+ <formalpara>
+ <title>Smart Quotes</title>
+ Pressing <literal>"</literal> (English double quote) will insert
+ <literal>``</literal> or <literal>''</literal> by making an
+ intelligent guess about whether we intended to open or close a quote.
+ </formalpara>
+ <formalpara>
+ <title>Smart Space</title>
+ &ls; maps the <literal>&lt;space&gt;</literal> key in such a
+ way that $ characters are not broken across lines. It does this by
+ first setting <literal>tw=0</literal> so that Vim will not
+ automatically break lines and then maps the
+ <literal>&lt;space&gt;</literal> key to insert newlines keeping
+ <literal>$$</literal>'s on the same line.
+ </formalpara>
+ <formalpara>
+ <title>Smart Dots</title>
+ Pressing <literal>...</literal> (3 dots) results in
+ <literal>\ldots</literal> outside math mode and
+ <literal>\cdots</literal> in math mode.
+ </formalpara>
+ </section>
+ <section id="altkey-mappings">
+ <title>Alt Key Macros</title>
+ <para>
+ &ls; utilizes a set of macros originally created by Carl Mueller in
+ auctex.vim to make inserting all the <literal>\left ... \right</literal>
+ stuff very easy and to also make some use of the heavily under-utilized
+ <literal>&lt;Alt&gt;</literal> key.
+ </para>
+ <note>
+ <para>
+ By default, typing <literal>Alt-&lt;key&gt;</literal> in &vim; takes
+ focus to the menu bar if a menu with the hotkey
+ <literal>&lt;key&gt;</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.
+ </para>
+ </note>
+ <note>
+ <title>Customizing the maps</title>
+ <para>
+ If for some reason, you wish to not map the
+ <literal>&lt;Alt&gt;</literal> keys, (some European users need to use
+ the <literal>&lt;Alt&gt;</literal> key to enter diacritics), you can
+ change these maps to other keys as described in the section <link
+ linkend="customize-alt-key-maps">Customizing Alt-key maps</link>.
+ </para>
+ </note>
+ <section id="Alt-L">
+ <title><literal>&lt;Alt-L&gt;</literal></title>
+ <para>
+ This is a polymorphic insert-mode mapping which expands to one of the
+ following depending on the character just before the cursor location.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <colspec colwidth="0.5in" align="cener" />
+ <colspec colwidth="0.5in" />
+ <thead>
+ <row>
+ <entry>Character before cursor</entry>
+ <entry>Expansion</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row><entry>(</entry> <entry><literal>\left( &ph; \right)</literal></entry></row>
+ <row><entry>[</entry> <entry><literal>\left[ &ph; \right]</literal></entry></row>
+ <row><entry>|</entry> <entry><literal>\left| &ph; \right|</literal></entry></row>
+ <row><entry>{</entry> <entry><literal>\left\{ &ph; \right\}</literal></entry></row>
+ <row><entry>&lt;</entry> <entry><literal>\langle &ph; \rangle</literal></entry></row>
+ <row><entry>q</entry> <entry><literal>\lefteqn{&ph;}&ph;</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ If the character before the cursor is none of the above, then it will
+ simply insert a <literal>\label{&ph;}&ph;</literal>.
+ </para>
+ </section>
+ <section id="Alt-B">
+ <title><literal>&lt;Alt-B&gt;</literal></title>
+ <para>
+ This insert-mode mapping encloses the previous character in
+ <literal>\mathbf{}</literal>.
+ </para>
+ </section>
+ <section id="Alt-C">
+ <title><literal>&lt;Alt-C&gt;</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-I">
+ <title><literal>&lt;Alt-I&gt;</literal></title>
+ <para>
+ This mapping inserts an <literal>\item</literal> command at the
+ current cursor location depending on which environment the cursor is
+ enclosed in. The style of the <literal>\item</literal> command is
+ dependent on the enclosing environment. By default,
+ <literal>&lt;Alt-I&gt;</literal> has styles defined forthe following
+ environments:
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Environment</entry>
+ <entry>Style</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row><entry>itemize</entry><entry>\item </entry></row>
+ <row><entry>enumerate</entry><entry>\item </entry></row>
+ <row><entry>theindex</entry><entry>\item </entry></row>
+ <row><entry>thebibliography</entry><entry>\item[&lt;+biblabel+&gt;]{&lt;+bibkey+&gt;} &lt;++&gt;</entry></row>
+ <row><entry>description</entry><entry>\item[&lt;+label+&gt;] &lt;++&gt;</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ <literal>&lt;Alt-I&gt;</literal> is intelligent enough to
+ account for nested environments. For example,
+ <programlisting>\begin{itemize}
+ \item first item
+ \item second item
+ \begin{description}
+ \item[label1] first desc
+ \item[label2] second
+ % &lt;Alt-I&gt; will insert "\item[&lt;+label+&gt;] &lt;++&gt;" if
+ % used here
+ \end{description}
+ \item third item
+ % &lt;Alt-I&gt; will insert "\item " when if used here.
+\end{itemize}
+% &lt;Alt-I&gt; will insert nothing ("") if used here</programlisting>
+ </para>
+ <para>
+ The style used by <literal>&lt;Alt-I&gt;</literal> can be customized
+ using the <link
+ linkend="Tex_ItemStyle_environment"><literal>g:Tex_ItemStyle_environment</literal></link>
+ variable.
+ </para>
+ </section>
+ </section>
+ <section id="custom-macros-menu">
+ <title>Custom Macros</title>
+ <para>
+ This functionality available via the TeX-Suite.Macros menu, provides
+ a way of inserting customized macros into the current file via the
+ menu.
+ </para>
+ <para>
+ When &ls; starts up, it scans the
+ <literal>$VIM/ftplugin/latex-suite/macros/</literal> directory and
+ creates a menu from the files found there. Each file is considered as
+ a single macro. You can place your own macros in this directory,
+ using <link linkend="place-holders">placeholders</link> if wanted.
+ </para>
+ <para>
+ When you choose a macro from the menu, the corresponding file is read
+ into the current buffer after the current cursor position. In non-gui
+ mode, you can use the |TMacro| command instead of choosing from the
+ menu. This command takes the macro file name as an argument. When
+ called without arguments (preferred usage), then a list of available
+ macro files is displayed and the user is prompted to choose one of
+ them).
+ </para>
+ <para>
+ There are some other tools provided in this menu, namely:
+ </para>
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <colspec colwidth="0.5in" />
+ <colspec colwidth="0.5in" />
+ <tbody>
+ <row><entry>{New}</entry>
+ <entry>
+ Creates a new (unnamed) buffer in the
+ latex-suite/macros/ directory. Use the command
+ :TexMacroNew in non-gui mode.
+ </entry>
+ </row>
+ <row>
+ <entry>{Edit}</entry>
+ <entry>
+ Opens up the corresponding macro file for editing. Use
+ |:TexMacroEdit| in non-gui mode. When you try to edit {macro}
+ not from local directory &ls; will copy it to your local
+ directory with suffix "-local". If local copy already exists
+ &ls; prompt for overwriting it.
+ </entry>
+ </row>
+ <row>
+ <entry>{Delete}</entry>
+ <entry>
+ Deletes the corresponding macro. Use the prefixed numbers for
+ fast navigation of menus. Use |:TexMacroDelete| in non-gui mode.
+ When you choose to delete {macro} which is not in your local
+ directory &ls; will refuse to delete it.
+ </entry>
+ </row>
+ <row>
+ <entry>{Redraw}</entry>
+ <entry>
+ Rescans the macros/ directories and refreshes the macros list.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ <section id="ls-new-macros">
+ <title>Making your own Macros via <literal>IMAP()</literal></title>
+ <para>
+ If you find the need to create your own macros, then you can use the
+ <literal>IMAP()</literal> function provided with &ls;. See <link
+ linkend="why-IMAP" endterm="why-IMAP.title"></link> for a short
+ explanation of why you might prefer <literal>IMAP()</literal> over
+ &vim;'s standard <literal>:imap</literal> command. An example best
+ explains the usage:
+ <programlisting>:call IMAP('NOM', '\nomenclature{&ph;}&ph;', 'tex')</programlisting>
+ This will create a &ls;-style mapping, where if you type
+ <literal>NOM</literal> in insert mode, you will get
+ <literal>\nomenclature{&ph;}&ph;</literal> with the cursor left in
+ place of the first <literal>&ph;</literal> characters. See <link
+ linkend="ls-imaps-syntax" endterm="ls-imaps-syntax.title"></link> for
+ a detailed explanation of the <literal>IMAP()</literal> command.
+ </para>
+ <para>
+ For maps which are triggered for a given filetype, the
+ <literal>IMAP()</literal> command above should be put in the filetype
+ plugin script for that file. For example, for tex-specific mappings,
+ the <literal>IMAP()</literal> calls should go in
+ <literal>$VIM/ftplugin/tex.vim</literal>. For globally visible maps,
+ you will need to use the following in either your
+ <literal>~/.vimrc</literal> or a file in your
+ <literal>$VIM/plugin</literal> directory.
+ <programlisting>augroup MyIMAPs
+ au!
+ au VimEnter * call IMAP('Foo', 'foo', '')
+augroup END</programlisting>
+ </para>
+ <section id="why-IMAP">
+ <title id="why-IMAP.title">Why use <literal>IMAP()</literal></title>
+ <para>
+ Using <literal>IMAP</literal> instead of &vim;'s built-in
+ <literal>:imap</literal> command has a couple of advantages:
+ <orderedlist>
+ <listitem>
+ The 'ttimeout' option will generally limit how easily you can type
+ the left hand side for a normal <literal>:imap</literal>. if you type
+ the left hand side too slowly, then the mapping will not be
+ activated.
+ </listitem>
+ <listitem>
+ If you mistype one of the letters of the lhs, then the mapping is
+ deactivated as soon as you backspace to correct the mistake.
+ </listitem>
+ <listitem>
+ The characters in lhs are shown on top of each other. This is fairly
+ distracting. This becomes a real annoyance when a lot of characters
+ initiate mappings.
+ </listitem>
+ </orderedlist>
+ </para>
+ </section>
+ <section id="ls-imaps-syntax">
+ <title id="ls-imaps-syntax.title">IMAP() syntax</title>
+ <para>
+ Formally, the syntax which is used for the <literal>IMAP</literal>
+ function is:
+ <programlisting>call IMAP (lhs, rhs, ft [, phs, phe])</programlisting>
+ </para>
+ <para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Argument</entry>
+ <entry>Explanation</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>lhs</entry>
+ <entry>
+ <para>
+ This is the "left-hand-side" of the mapping. When you use
+ <literal>IMAP</literal>, only the last character of this word is
+ actually mapped, although the effect is that the whole word is
+ mapped.
+ </para>
+ <para>
+ If you have two mappings which end in a common
+ <literal>lhs</literal>, then the mapping with the longer
+ <literal>lhs</literal> is used. For example, if you do
+ <programlisting>call IMAP('BarFoo', 'something', 'tex')
+call IMAP('Foo', 'something else', 'tex')</programlisting>
+ Then typing <literal>BarFoo</literal> inserts
+ <literal>"something"</literal>, whereas <literal>Foo</literal> by
+ itself inserts <literal>"something else"</literal>.
+ </para>
+ <para>
+ Also, the nature of <literal>IMAP()</literal> makes creating
+ certain combination of mappings impossible. For example if you
+ have
+ <programlisting>call IMAP('foo', 'something', 'tex')
+call IMAP('foobar', 'something else', 'tex')</programlisting>
+ Then you will never be able to trigger <literal>"foobar"</literal>
+ because typing <literal>"foo"</literal> will immediately insert
+ <literal>"something"</literal>. This is the "cost" which you incur
+ over the normal <literal>:imap</literal> command for the
+ convenience of no 'timeout' problems, the ability to correct
+ <literal>lhs</literal> etc.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>rhs</entry>
+ <entry>
+ <para>
+ The "right-hand-side" of the mapping. This is the expansion you
+ will get when you type <literal>lhs</literal>.
+ </para>
+ <para>
+ This string can also contain special characters such as
+ <literal>&lt;enter&gt;</literal> etc. To do this, you will need
+ to specify the second argument in double-quotes as follows:
+ <programlisting>:call IMAP('EFE', "\\begin{figure}\&lt;CR&gt;&ph;\\end{figure}&ph;", 'tex')</programlisting>
+ With this, typing <literal>EFE</literal> is equivalent to typing
+ in the right-hand side with all the special characters in
+ insert-mode. This has the advantage that if you have filetype
+ indentation set up, then the right hand side will also be
+ 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
+ as follows:
+ <programlisting>:call IMAP('FOO', "\&lt;C-r&gt;=MyFoonction()\&lt;CR&gt;", 'tex')</programlisting>
+ where <literal>MyFoonction</literal> is a custom function you have
+ written. If <literal>MyFoonction</literal> also has to return a string
+ containing <literal>&ph;</literal> characters, then you will need to
+ use the function <literal>IMAP_PutTextWithMovement()</literal>. An
+ example best explains the usage:
+ </para>
+ <programlisting>call IMAP('FOO', "\&lt;C-r&gt;=AskVimFunc()\&lt;CR&gt;", 'vim')
+" Askvimfunc: Asks For Function Name And Sets Up Template
+" Description:
+function! AskVimFunc()
+ let name = input('Name of the function : ')
+ if name == ''
+ let name = "&lt;+Function Name+&gt;"
+ end
+ let islocal = input('Is this function scriptlocal ? [y]/n : ', 'y')
+ if islocal == 'y'
+ let sidstr = '&lt;SID&gt;'
+ else
+ let sidstr = ''
+ endif
+ return IMAP_PutTextWithMovement(
+ \ "\" ".name.": &lt;+short description+&gt; \&lt;cr&gt;" .
+ \ "Description: &lt;+long description+&gt;\&lt;cr&gt;" .
+ \ "\&lt;C-u&gt;function! ".name."(&lt;+arguments+&gt;)&ph;\&lt;cr&gt;" .
+ \ "&lt;+function body+&gt;\&lt;cr&gt;" .
+ \ "endfunction \" "
+ \ )
+endfunction</programlisting>
+ <para>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>ft</entry>
+ <entry>
+ <para>
+ The file type for which this mapping is active. When this string
+ is left empty, the mapping applies for all file-types. A filetype
+ specific mapping will always take precedence.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>phs, phe</entry>
+ <entry>
+ <para>
+ If you prefer to write the <literal>rhs</literal> with characters
+ other than <literal>&lt;+</literal> and <literal>+&gt;</literal>
+ to denote place-holders, you can use the last 2 arguments to
+ specify which characters in the <literal>rhs</literal> specify
+ place-holders. By default, these are <literal>&lt;+</literal> and
+ <literal>+&gt;</literal> respectively.
+ </para>
+ <para>
+ Note that the <literal>phs</literal> and <literal>phe</literal>
+ arguments do not control what characters will be displayed for
+ the placeholders when the mapping is actually triggered. What
+ characters are used to display place-holders when you trigger an
+ <literal>IMAP</literal> are controlled by the <link
+ linkend="Imap_PlaceHolderStart"><literal>Imap_PlaceHolderStart</literal></link>
+ and <link
+ linkend="Imap_PlaceHolderEnd"><literal>Imap_PlaceHolderEnd</literal></link>
+ settings.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </section>
+ </section>
+ </section>
+ <section id="latex-packages">
+ <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>&lt;F5&gt;</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>&lt;F5&gt;</literal> in the preamble on a line containing a
+ single word will construct a <literal>\usepackage</literal> line from
+ that word.
+ </para>
+ <para>
+ You can also use the <link
+ linkend="TPackage"><literal>TPackage</literal></link> to insert the
+ <literal>\usepackage</literal> line.
+ </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>
+ &ls; takes the following actions for packages detected when a file is
+ loaded, or a new <literal>\usepackage</literal> line is inserted using
+ one of the methods described in the <link
+ linkend="inserting-packages">previous section</link>.
+ </para>
+ <para>
+ If you are using the GUI and you have <link
+ linkend="Tex_Menus">g:Tex_Menus</link> set to 1, &ls; will create the
+ following sub-menus
+ <simplelist>
+ <member><literal>TeX-Suite > Packages > &lt;package&gt; Options</literal></member>
+ <member><literal>TeX-Suite > Packages > &lt;package&gt; Commands</literal></member>
+ </simplelist>
+ </para>
+ <para>
+ where <literal>&lt;package&gt;</literal> is the package you just
+ inserted (or was detected). 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
+ appropriate 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-menus, &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>&lt;C-X&gt;&lt;C-K&gt;</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>
+ 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="inserting-env-f5"><literal>&lt;F5&gt;</literal></link> or <link
+ linkend="ls-imap-f7"><literal>&lt;F7&gt;</literal></link> in insert
+ mode.
+ </para>
+ </section>
+ <para>
+ In addition, the <literal>TeX-Suite > Packages</literal> menu also
+ contains the following submenus
+ </para>
+ <formalpara>
+ <title>Update</title>
+ This command is to be invoked with the cursor placed on the package
+ name. If the corresponding package is found, then a sub-menu with the
+ supported commands and options is created.
+ </formalpara>
+ <formalpara>
+ <title>Update All</title>
+ This function reads the preamble of the document for
+ <literal>\usepackage</literal> lines and if &ls; supports the detected
+ packages, then sub-menus containing the package options and commands
+ 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 include 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
+ the same name as the package and placing it in the
+ <literal>$VIM/ftplugin/latex-suite/packages</literal> directory. A
+ package script should define two variables as described in the next two
+ sections. In addition to these two variables, you can also define any
+ functions, environment definitions etc. in this file.
+ </para>
+ <section>
+ <title><literal>g:Tex_package_option_&lt;package&gt;</literal></title>
+ <para>
+ This setting is a string containing a comma separated list of options
+ supported by this package.
+ </para>
+ <para>
+ Example:
+ <programlisting>g:Tex_package_option_mypack = 'opt1,opt2=,sbr:group1,opt3,opt4'</programlisting>
+ The <literal>=</literal> suffix means that the option takes a value.
+ Use <literal>sbr:group name</literal> to separate options into
+ sub-menus. All successive options will be clubbed into the
+ <literal>group1</literal> sub-menu till the next
+ <literal>sbr:</literal> option is encountered.
+ </para>
+ </section>
+ <section>
+ <title><literal>g:Tex_package_&lt;package&gt;</literal></title>
+ <programlisting>
+ g:TeX_package_&lt;package&gt; = "pre:Command,pre:Command1"
+More detailed example is in latex-suite/packages/exmpl file (slightly
+outdated).
+Here is short summary of prefixes which can be used in package files:
+(x - place with cursor, &ph; - |placeholder|)
+
+{env:command} Environment: creates simple environment template
+ \begin{command}
+ x
+ \end{command}&ph;
+{eno:command} Environment with option:
+ \begin[x]{command}
+ &ph;
+ \end{command}&ph;
+{ens:command[&lt;&lt;option&gt;&gt;]...} Environment special:
+ \begin[&lt;&lt;option&gt;&gt;]...{command}
+ &ph;
+ \end{command}&ph;
+{bra:command} Brackets:
+ \command{x}&ph;
+{brd:command} Brackets double:
+ \command{x}{&ph;}&ph;
+{brs:command[&lt;&lt;option&gt;&gt;]...} Brackets special (as environment special:
+ \command[&lt;+x+&gt;]{&ph;}{&ph;}&ph;
+{nor:command} Normal:
+ \command&lt;Space
+{noo:command} Normal with option:
+ \command[x]&ph;
+{nob:command} Normal with option and brackets:
+ \command[x]{&ph;}&ph;
+{pla:command} Plain:
+ command&lt;Space
+{spe:command} Special:
+ command &lt;-literal insertion of command
+{sep:command} creates separator. Good for aesthetics and usability :)
+{sbr:command} Breaks menu into submenus. &lt;command&gt; will be title of submenu.
+ Can be used also in package variable.
+
+Command can be also given without prefix:. The result is
+ \command
+ </programlisting>
+ </section>
+ </section>
+ </section>
+ <section id="latex-completion">
+ <title>Latex Completion</title>
+ <para>
+ &ls; provides an easy way to insert references to labels and
+ bibliographic entries and also provide filename arguments to commands
+ such as <literal>\includegraphics</literal>. Although the completion
+ capabilities are very diverse, &ls; only uses a single key
+ (<literal>&lt;F9&gt;</literal> by default) to do all of it. Pressing the
+ <literal>&lt;F9&gt;</literal> key does different things based on where
+ you are located. &ls; tries to guess what you might be trying to
+ complete at the location where you pressed
+ <literal>&lt;F9&gt;</literal>. For example, pressing
+ <literal>&lt;F9&gt;</literal> when you are within a
+ <literal>\ref</literal> command will try to list the
+ <literal>\label</literal>'s in the present directory. Pressing it when
+ you are in a <literal>\cite</literal> command will list bibliography
+ keys. &ls; also recognizes commands which need a file name argument and
+ will put up an explorer window for you to choose a filename.
+ </para>
+ <note id="ls-set-grepprg">
+ <title>Before you start with &ls;'s completion function...</title>
+ <para>
+ All of &ls;'s completion capabilities depend on a external program
+ being available on your system which can search through a number of
+ files for a reg-exp pattern. On *nix systems, the pre-installed
+ <literal>grep</literal> utility is more than adequate. Most windows
+ systems come with a utility <literal>findstr</literal>, but that has
+ proven to be very inadequate (for one, it does not have an option to
+ force the file name to be displayed when searching through a single
+ file). Your best bet is to install <ulink
+ url="http://www.cygwin.com">cygwin</ulink>, but if you think that's
+ overkill, you can <ulink
+ url="http://www.google.com/search?q=windows%20gnu%20grep">search
+ for</ulink> a windows implementation of GNU grep. (&ls; testing on
+ windows has been done with cygwin's port of GNU grep).
+ </para>
+ <para>
+ Once you have a <literal>grep</literal> program installed, you need to
+ set the <literal>'grepprg'</literal> option for vim. Make sure you use a
+ setting which forces the program to display file names even when you are
+ searching through a single file. For GNU grep, the syntax is
+ <programlisting>set grepprg=grep\ -nH\ $*</programlisting>
+ </para>
+ </note>
+ <section id="ls-completion-usage">
+ <title id="ls-completion-usage.title">&ls; completion example</title>
+ <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>&lt;F9&gt;</literal>.
+ This will bring up two new windows beneath the main window you were working
+ in as shown in the figure below.
+ <programlisting>
+ 8 These are a couple of equations:
+ 9 +-- 4 lines: eqnarray (eqn:euler) : e^{j\pi} + 1 &amp;=&amp; 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 &amp;=&amp; 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>
+ <para>
+ The first window (shown as <literal>[Error&nbsp;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&nbsp;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&nbsp;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&nbsp;List]</literal> window and press
+ <literal>&lt;enter&gt;</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&nbsp;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>&lt;F9&gt;</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>&lt;F9&gt;</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>
+ </section>
+ <section id="ls-completion-ref">
+ <title>&ls; \ref completion</title>
+ <para>
+ Pressing <literal>&lt;F9&gt;</literal> when you are within a partially
+ completed <literal>\ref</literal> command will split open a window
+ (named <literal>__OUTLINE__</literal>) which contains a nicely
+ formatted list of all the <literal>\label</literal>s found in the
+ present project. The <literal>\label</literal>s are heirarchically
+ arranged according to which <literal>\section</literal>,
+ <literal>\subsection</literal> etc of the overall document structure
+ they are present in. For example, when you first press
+ <literal>&lt;F9&gt;</literal> after typing <literal>\ref{</literal>,
+ you should see something like:
+ <programlisting>
++-- 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-------------
+ </programlisting>
+ 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:
+ <programlisting>
++-- 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) &amp;=&amp; T_z(\theta_2)
+ </programlisting>
+ The <literal>&lt;Tab&gt;</literal> 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 <literal>&lt;Enter&gt;</literal>. This closes the
+ <literal>__OUTLINE__</literal> window, returns to the window in which
+ you pressed <literal>&lt;F9&gt;</literal> and inserts the reference
+ at the current cursor position.
+ </para>
+ <note>
+ <title>Filtering labels by prefix</title>
+ <para>
+ You can press <literal>&lt;F9&gt;</literal> after typing part of the
+ <literal>\label</literal>. In this case, &ls; only presents
+ <literal>\label</literal>s 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
+ <literal>eqn:</literal>, figures to begin with <literal>fig:</literal>
+ etc. For example, with this scheme, pressing
+ <literal>&lt;F9&gt;</literal> after typing
+ <literal>\ref{eqn:</literal> will only list equations.
+ </para>
+ </note>
+ <note>
+ <para>
+ &ls; works the same way if you press <literal>&lt;F9&gt;</literal>
+ after any command which contains the letters <literal>ref</literal>.
+ Thus you can complete <literal>\eqref</literal> in exactly the same
+ manner.
+ </para>
+ </note>
+ <note>
+ <title>Requirements</title>
+ <para>
+ This method of preseting the <literal>\label</literal>s depends on Vim
+ being compiled with python support. To check if you have this, see the
+ output of the <literal>:ver</literal> command. If you see something
+ like <literal>+python</literal>, you are all set. Failing this, you
+ will need to have <literal>python</literal> somewhere in your
+ <literal>$PATH</literal>.
+ </para>
+ </note>
+ </section>
+ <section id="latex-completion-cite">
+ <title>&ls; <literal>\cite</literal> completion</title>
+ <para>
+ &ls; provides an easy way to insert references to bibliographic
+ entries. Pressing <literal>&lt;F9&gt;</literal> when the cursor is
+ placed inside a partially completed <literal>\cite</literal> command
+ will split open a new window (named <literal>__OUTLINE__</literal>)
+ which contains a formatted and syntax highlighted list of all bibtex
+ entries found. For example, pressing <literal>&lt;F9&gt;</literal>
+ after typing <literal>\ref{</literal> should present you with a window
+ which looks something like this:
+ <programlisting>
+Article [dickinson:science:99]
+ "Wing rotation and aerodynamic basis of insect flight"
+ M. H. Dickinson and F-O. Lehman and S. P. Sane
+ In Science, 1999
+
+Article [ellington:84:part1]
+ "The Aerodynamics of Hovering Insect Flight. I. The Quasi-Steady Analysis"
+ Ellington, C P
+ In Philosophical Transactions of the Royal Society of London. Series B, Biological Sciences, 1984
+
+Article [ellington:84:part2]
+ "The Aerodynamics of Hovering Insect Flight. II. Morphological Parameters"
+ Ellington, C P
+ In Philosophical Transactions of the Royal Society of London. Series B, Biological Sciences, 1984
+ </programlisting>
+ </para>
+ <para>
+ You can easily jump from one entry to another using the
+ <literal>'n'</literal> and <literal>'p'</literal> keys (to go to the
+ next / previous entry respectively).
+ </para>
+ <para>
+ You can also filter out a subset of the bibtex entries by pressing
+ <literal>'f'</literal> while in this window. Doing this presents the
+ following prompt:
+ <programlisting>
+Field acronyms: (`:let g:Tex_EchoBibFields = 0` to avoid this message)
+ [t] title [a] author [b] booktitle
+ [j] journal [y] year [p] bibtype
+ (you can also enter the complete field name)
+Enter filter criterion [field&lt;space&gt;value]:
+ </programlisting>
+ At the prompt, type
+ <programlisting>a ellington</programlisting>
+ Notice that the letter a is an acronym for <literal>author</literal>
+ according to the prompt above. Therefore this filter only shows those
+ bibtex entries whose author field contains the text
+ <literal>ellington</literal>. You can keep narrowing your selection by
+ repeatedly filtering the results. If you would like to remove all the
+ filters and see all entries again, press 'a', which removes
+ all the filters.
+ </para>
+ <para>
+ You can also sort the bibtex entries based on a field. To do this,
+ press 's'. This will present you with a prompt like in the case of the
+ filter and you are asked to choose a field. In this case, you would
+ type in a single character. This sorts the entries according to that
+ field.
+ </para>
+ <note>
+ <para>
+ <literal>&lt;F9&gt;</literal> will also work in a similar way after any
+ command which contains the word <literal>cite</literal> in it. For
+ example, pressing <literal>&lt;F9&gt;</literal> will also work with
+ <literal>\citenum</literal> etc.
+ </para>
+ </note>
+ <para>
+ The following logic is applied to find out which bibliographic entries
+ are included in the completion.
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Firstly, if the present file has a <link
+ linkend="latex-master-file">master-file</link> defined for it, then &ls;
+ will perform the following steps on that file instead of on the
+ current file.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ First, the file is scanned for a <literal>\bibliography</literal>
+ command. To explain better, assume that a command
+ <programlisting>\bibliography{file1,file2}</programlisting> is found
+ in the present file. For each bibliography file, say
+ <literal>file1</literal>, &ls; first tries to see if a
+ <literal>.bib</literal> file, <literal>file1.bib</literal> can be
+ found. If so, it will scan it for bib-keys of the form
+ <literal>@BOOK{</literal> etc., and add these searches to the
+ completion list. If a <literal>.bib</literal> file cannot be found,
+ then it will try to see if <literal>file1.bbl</literal> can be found.
+ If so, &ls; will search it for bib-keys of the form
+ <literal>\bibitem</literal> and add these to the completion list.
+ </para>
+ <para>
+ You can set the location where &ls; will search for
+ <literal>.bib</literal> and <literal>.bbl</literal> files using the
+ <link
+ linkend="Tex_BIBINPUTS"><literal>|Tex_BIBINPUTS|</literal></link>
+ variable.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ If a <literal>\bibliography</literal> command is not found, then &ls;
+ tries to scan the present file for a
+ <literal>\begin{thebibliography}</literal> environment. If found,
+ &ls; searches the present file for bib-keys of the form
+ <literal>\bibitem</literal>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Finally, it will try to see if this file includes other files
+ via the <literal>\input</literal> command. For each such file found,
+ &ls; will repeat the previous two steps stopping at the first file
+ which has either a <literal>\bibliography</literal> command or a
+ <literal>thebibliography</literal> environment.
+ </para>
+ </listitem>
+ </orderedlist>
+ <section id="cite-search-caching">
+ <title>Caching the <literal>\cite</literal> completion results</title>
+ <anchor id="TClearCiteHist"></anchor>
+ <para>
+ Often times, the editing cycle proceeds by first laying out a
+ comprehensive bibliography and then completing all the
+ <literal>\cite</literal> commands in one session. In such situations,
+ it is inefficient to scan the whole list of bibliography files for
+ bib-keys each time. &ls; provides a way to cache the results of the
+ cite completion search using the <link
+ linkend="Tex_RememberCiteSearch"><literal>Tex_RememberCiteSearch</literal></link>
+ variable. If set, &ls; will perform the search only the first time
+ <literal>&lt;F9&gt;</literal> is used. Next time on, it will reuse the
+ search results. If you wish to redo the search results, issue the
+ command
+ <programlisting>TClearCiteHist</programlisting>
+ This will redo the completion list next time you use
+ <literal>&lt;F9&gt;</literal>.
+ </para>
+ </section>
+ </section>
+ <section id="ls-filename-completion">
+ <title>&ls; filename completion</title>
+ <para>
+ When you press <literal>&lt;F9&gt;</literal> at a location where &ls;
+ guesses a filename needs to be typed, then a new explorer window will
+ open up with the list of files. You can use this window to change
+ directories etc. Pressing <literal>&lt;enter&gt;</literal> on a filename
+ in the explorer window will automatically close the explorer window,
+ return to the location where you pressed <literal>&lt;F9&gt;</literal>
+ from and insert the filename into that position.
+ </para>
+ <para>
+ &ls; also tries to guess what kinds of files you might not want to
+ insert and hides those accordingly. For example, if you press
+ <literal>&lt;F9&gt;</literal> when you are located at
+ <literal>\includegraphics{</literal>, then &ls; knows that you will not
+ want to insert <literal>.tex</literal> files. Therefore, the explorer
+ window will automatically hide these files.
+ </para>
+ <para>
+ As of now, &ls; recognizes the following commands for filename
+ completion. Along with the commands, this table also lists the
+ files which &ls; will not show for completing each command.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>command</entry>
+ <entry>hide pattern</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>\bibliography</literal></entry>
+ <entry><literal>'^\.,\.[^b]..$'</literal></entry>
+ </row>
+ <row>
+ <entry><literal>\include</literal> <literal>\includeonly</literal></entry>
+ <entry><literal>'^\.,\.[^t]..$'</literal></entry>
+ </row>
+ <row>
+ <entry><literal>\includegraphics</literal> <literal>\psfig</literal></entry>
+ <entry><literal>'^\.,\.tex$,\.bib$,\.bbl$,\.zip$,\.gz$'</literal></entry>
+ </row>
+ <row>
+ <entry><literal>\input</literal></entry>
+ <entry><literal>''</literal></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ <section id="ls-completion-custom">
+ <title>Custom command completion</title>
+ <para>
+ &ls; also recognizes certain commonly used &latex; commands for the
+ <literal>&lt;F9&gt;</literal> key. At the moment, the
+ <literal>\bibliographystyle</literal>, <literal>\addtocontents</literal>
+ and the <literal>\addcontentsline</literal> commands are recognized,
+ although more will be added in the future. When you press the
+ <literal>&lt;F9&gt;</literal> after such a command, &ls; will prompt
+ you with a list of arguments which make sense for the command.
+ </para>
+ <para>
+ This functionality is available for commands for which a global
+ variable of the form
+ <literal>g:Tex_completion_{&lt;command&gt;}</literal> is defined where
+ <literal>&lt;command&gt;</literal> is the command name. This variable
+ is a comma separated list of values which this command takes. For
+ example, the argument to the <literal>\bibliographystyle</literal>
+ command is commonly one of <literal>abbr,alpha,plain,unsrt</literal>.
+ Therefore, &ls; defines
+ <programlisting>let g:Tex_completion_bibliographystyle = 'abbr,alpha,plain,unsrt'</programlisting>
+ You can define your own completion variables in a similar manner for
+ commands which you might use.
+ </para>
+ </section>
+ </section>
+ <section id="latex-compiling">
+ <title>&latex; Compiling</title>
+ <para>
+ This functionality, available via the TeX-Suite menu, provides various tools
+ to compile and debug &latex; files from within &vim;.
+ </para>
+ <para>
+ If you are using commonly used LaTeX tools, then you should be all set
+ as soon as you download and install &ls;. In order to compile a
+ LaTeX file, simply press <literal>\ll</literal> while editing the file.
+ This runs latex on the current file and displays the errors in a
+ |quickfix-window| below the file being edited. You can then scroll
+ through the errors and press <literal>&lt;enter&gt;</literal> to be
+ taken to the location of the corresponding error. Along with the errors
+ being listed in the quickfix window, the corresponding log file is also
+ opened in |preview| mode beneath the quickfix window. It is scrolled
+ automatically to keep in sync with the error being viewed in the
+ quickfix window. You will be automatically taken to the location of the
+ first error/warning unless you set the <link
+ linkend="Tex_GotoError">g:Tex_GotoError</link> variable to 0.
+ </para>
+ <para>
+ &ls; also supports compiling &latex; into formats other than DVI. By
+ default, &ls; supports PDF and PS formats. In order to choose a format
+ other than DVI, use the <literal>TTarget</literal> command or the
+ <literal>TeX-Suite > Target Format</literal> menu item. This will ask you
+ to type in the name of the target format you want to compile to. If a rule
+ has been defined for the format (as described in the next
+ <link linkend="compiler-rules">section</link>), then &ls; will switch to
+ that format.
+ </para>
+ <para>Trying to choose a format for which no rule has been defined will
+ result in &ls; displaying a warning message without taking any action.
+ </para>
+ <para>
+ If you are using a multiple file project and need to compile a master
+ file while editing other files, then &ls; provides a way to specify the
+ file to be compiled as described in <link
+ linkend="latex-master-file">latex-master-file</link>.
+ </para>
+ <section id="compiler-rules">
+ <title>Setting Compilation rules</title>
+ <para>
+ In order to compile &latex; files into various formats, &ls; needs to know
+ which external programs to call and in which way they need to be called.
+ This information is provided to &ls; via a number of "rules". For each
+ format you want to compile to, you need to specify a rule. A rule is
+ specified by defining a variable of the form:
+ <programlisting>g:Tex_CompileRule_&lt;format&gt;</programlisting>
+ where <literal>&lt;format&gt;</literal> is a string like
+ <literal>"pdf"</literal>, <literal>"dvi"</literal> etc.
+ </para>
+ <para>
+ Example: By default, &ls; uses the following rule for compiling &latex;
+ documents into DVI.
+ <programlisting>g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*'</programlisting>
+ </para>
+ <para>
+ Default values are also provided for ps and pdf formats. You might want to
+ change these rules in texrc according to your local tex environment.
+ </para>
+ <note>
+ <para>
+ For win32 users user MikTeX, sometimes the latex compiler's output has a
+ bug where a single number is split across different lines. In this case,
+ put the included <literal>vim-latex</literal> file distributed with &ls;.
+ </para>
+ </note>
+ </section>
+ <section id="compiler-dependency">
+ <title>Handling dependencies in compilation</title>
+ <para>
+ &ls; also handles compiling dependencies automatically via certain
+ rules which specify the "dependency chain" for each target format.
+ For example, if in your case, you use
+ <programlisting>.tex -&gt; .dvi -&gt; .ps -&gt; .pdf</programlisting>
+ to generate <literal>pdf</literal> files from <literal>dvi</literal>
+ files, then you will need to specify the following setting in your
+ &ls; configuration (see <link
+ linkend="customizing-latex-suite">customizing &ls;</link> for where
+ these settings should go):
+ <programlisting>
+let g:Tex_FormatDependency_pdf = 'dvi,ps,pdf'
+</programlisting>
+ This is a comma separated string of formats specifying the order in
+ which the formats to be compiled into should be chosen. With this
+ setting, if you set the target format to <literal>pdf</literal>, then
+ the next time you compile via the <literal>\ll</literal> shortcut, &ls;
+ will first generate a <literal>dvi</literal> file, then use that to
+ generate the <literal>ps</literal> file and finally create the
+ <literal>pdf</literal> file from that.
+ </para>
+ <note>
+ <para>
+ If any of the intermediate formats is listed in the
+ <literal>g:Tex_MultipleCompileFormats</literal> setting as described
+ in the section <link linkend="compiling-multiple">Compiling multiple
+ times</link>, then &ls; might make multiple calls to the compiler to
+ generate the output file of that format.
+ </para>
+ </note>
+ <para>
+ Along with the <literal>g:Tex_FormatDependency_{format}</literal>
+ setting, you should ofcourse specify the rule for compiling to each of
+ the formats as described in the <link linkend="compiler-rules">previous
+ section</link>. For example, with the setting above, you could use:
+ <programlisting>
+let g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*'
+let g:Tex_CompileRule_ps = 'dvips -Ppdf -o $*.ps $*.dvi'
+let g:Tex_CompileRule_pdf = 'ps2pdf $*.ps'</programlisting>
+ </para>
+ <note>
+ <para>
+ By default, &ls; does not specify any compiler dependencies. Each
+ target format for which a rule has been derived will be compiled
+ independently.
+ </para>
+ </note>
+ </section>
+ <section id="compiling-multiple">
+ <title>Compiling multiple times</title>
+ <para>
+ Most &latex; compilers need to be re-run several times in several
+ commonly occurring situations in order to get a final camera ready copy.
+ For example, when <literal>\label</literal>'s change, when new
+ <literal>\cite</literal> commands are added etc. If the target format
+ you are compiling to requires multiple compilations, then you will
+ need to include the format in the
+ <literal>g:Tex_MultipleCompileFormats</literal> setting. This is a
+ comma separated string of formats which need multiple compilations to
+ be generated correctly.
+ </para>
+ <para>
+ By default, this setting contains just the <literal>dvi</literal>
+ format. If you use the <literal>pdflatex</literal> compiler to generate
+ <literal>pdf</literal> files, then you might want to also include
+ <literal>pdf</literal> into the above setting.
+ </para>
+ <para>
+ For every format included in the
+ <literal>g:Tex_MultipleCompileFormats</literal> setting described
+ above, &ls; will use the following logic to generate the file. Note
+ that although the following description uses <literal>latex</literal>
+ to refer to the compiler, it could be some other compiler such as
+ <literal>pdflatex</literal> for generating <literal>pdf</literal>
+ output.
+ </para>
+ <para>
+ <orderedlist>
+ <listitem>If there was a <literal>.idx</literal> file, then remember
+ its contents.</listitem>
+ <listitem>Run <literal>latex</literal>.</listitem>
+ <listitem>If the <literal>.idx</literal> file changed due to the latex
+ compiler, then run <literal>makeindex</literal> to redo the
+ <literal>.ind</literal> file and then remember to rerun latex.
+ </listitem>
+ <listitem>
+ <para>
+ If the <literal>.aux</literal> file generated by the latex
+ compiler contains a <literal>\bibdata</literal> line, then it
+ means that we are using a <literal>.bib</literal> file. Therefore,
+ run <literal>bibtex</literal>.
+ </para>
+ <note>
+ <para>
+ This means that we will always run <literal>bibtex</literal>
+ whenever we use the <literal>\bibliography</literal> command
+ whether or not we actually need to. At this time, &ls; does not
+ parse the <literal>.aux</literal> file before and after the latex
+ compiler to see if we are required to rerun
+ <literal>bibtex</literal>.
+ </para>
+ </note>
+ </listitem>
+ <listitem>
+ If the <literal>.bbl</literal> file changes because of this, then
+ remember to rerun latex again.
+ </listitem>
+ <listitem>Also, we check to see if the &latex; compiler gives certain
+ standard warnings which notify that we need to compile once again. In
+ this case also, remember to rerun &latex;.</listitem>
+ <listitem>If we found we had to rerun latex, then we repeat
+ the steps above but not running <literal>makeindex</literal> or
+ <literal>bibtex</literal> again.</listitem>
+ </orderedlist>
+ </para>
+ <para>
+ The &latex; file is compiled atmost 5 times using this logic. These
+ steps will ensure that on most platforms/environments, you will get a
+ clean output with all the cross-references, citations etc correctly
+ labelled and ordered.
+ </para>
+ </section>
+ <section id="compiler-output-customization">
+ <title>Customizing the compiler output</title>
+ <para>
+ Most &latex; compilers produce a very large amount of output during
+ compilation, most of which is not relevant to debugging type-setting
+ errors. The compiler plugin provided with &ls; (which is an enhanced
+ version of the standard compiler plugin maintained by Artem Chuprina),
+ provides a way to filter the compiler output so that the actual
+ errors/warnings can be presented much more concisely.
+ </para>
+ <para>
+ The compiler plugin is set up by default to function in a "non-verbose",
+ "ignore-common-warnings" mode, which means that irrelevant lines from the
+ compiler output will be ignored and some very common warnings are also
+ ignored.
+ &ls; does this via the global variable <link
+ linkend="Tex_IgnoredWarnings"><literal>g:Tex_IgnoredWarnings</literal></link>.
+ This is a list of patterns, which can be used to filter out (or ignore)
+ some or the warnings and errors reported by the compiler. See the link
+ above for its default value.
+ </para>
+ <para>
+ &ls; uses the <link
+ linkend="Tex_IgnoreLevel"><literal>g:Tex_IgnoreLevel</literal></link>
+ setting to set a default ignore level. For example, for the default
+ value of 4, &ls; ignores warnings and errors matching the first 4
+ patterns in <literal>g:Tex_IgnoredWarnings</literal>.
+ </para>
+ <para>
+ In addition to setting a default value of the ignore level, &ls;
+ provides the ability to set the level dynamically, using the
+ <literal>TCLevel</literal> command. For example, if you issue the
+ command:
+ <programlisting>TCLevel 3</programlisting>
+ from within &vim;, then the next time you compile the document, &ls; will
+ ignore warnings and errors which match the first three patterns in
+ <literal>g:Tex_IgnoredWarnings</literal>.
+ </para>
+ <para>
+ When TCLevel is called with the unquoted string strict as follows:
+ <programlisting>TClevel strict</programlisting>
+ then &ls; switches to a "verbose", "no-lines-ignored" mode which is useful
+ when you want to make final checks of your document and want to be careful
+ not to let things slip by.
+ </para>
+ <para>
+ See the explanation of the settings <link
+ linkend="Tex_IgnoredWarnings">g:Tex_IgnoredWarnings</link> and <link
+ linkend="Tex_IgnoreLevel">g:Tex_IgnoreLevel</link> to find out how to
+ customize the filtering done by &ls;
+ </para>
+
+ </section>
+ <section id="part-compiling">
+ <title>Compiling parts of a file</title>
+ <para>
+ &ls; also provides a way to compile a fragment of a document. This can be
+ very useful while debugging a complex equation or one chapter in a book,
+ etc.
+ </para>
+ <para>
+ To do this, visually select a portion of the text and press
+ <literal>\ll</literal> while in visual mode. The visually selected portion
+ will be saved to a temporary file with the preamble from the current
+ document prepended. &ls; will then switch focus to this temporary file and
+ compile it. Continue to debug this file as required and then replace the
+ portion of the original file with this one.
+ </para>
+ <para>
+ Pressing <literal>\lv</literal> while viewing the temporary file will
+ view the output file generated from the temporary file, not the original
+ file
+ </para>
+ <para>
+ Two commands |TPartComp| and |TPartView| are provided to be able to get
+ this functionality via the command line.
+ </para>
+ <para>
+ From release 1.6 onwards of &ls;, the temporary file created
+ for part compilation will reside in the same directory as the file from
+ which the fragment is being created. This ensures that any relative
+ path-names defined in the fragment will still work. &ls; will
+ attempt to clean the temporary file(s) created when Vim exits.
+ </para>
+ </section>
+ </section>
+ <section id="latex-viewing">
+ <title>Latex Viewing and Searching</title>
+ <section id="latex-viewing-rules">
+ <title>Setting Viewing rules</title>
+ <para>
+ In order to view the output files created by compiling the source
+ files, you need to specify which external program &ls; should call. You
+ can specify the external program using one of two settings
+ <link linkend="Tex_ViewRule_format">Tex_ViewRule_format</link> or <link
+ linkend="Tex_ViewRuleComplete_format">Tex_ViewRuleComplete_format</link>.
+ By default, &ls; has default settings for viewing various common output
+ formats via the <literal>Tex_ViewRule_format</literal> settings, so
+ that if you are using commonly used programs, you should be all set to
+ view compiled files from within &vim; by simply pressing
+ <literal>\lv</literal>.
+ </para>
+ <note>
+ <para>
+ The viewing function also takes the <link
+ linkend="latex-master-file"><literal>*.latexmain</literal></link> file
+ into account to decide which file to show.
+ </para>
+ </note>
+ <para>
+ If pressing <literal>\lv</literal> does not work, then it most probably
+ has to do with incorrect settings of the <link
+ linkend="Tex_ViewRule_format"><literal>g:Tex_ViewRule_&lt;format&gt;</literal></link>
+ where <literal>&lt;format&gt;</literal> is the format you are
+ attempting to view. See the link above for how to set this according to
+ your system.
+ </para>
+ <note>
+ <para>
+ On Windows and OS/X, you can leave the view rule empty to open the document
+ with the default viewer on your system. On Linux/UNIX systems, you can use
+ the <literal>xdg-open</literal> command to open the document with the default
+ viewer.
+ </para>
+ </note>
+ <para>
+ In addition to viewing the files, &ls; also supports forward and inverse
+ searching for certain common tools for viewing documents.
+ See the next few sections for details on forward and inverse searching,
+ including an overview of viewers.
+ </para>
+ </section>
+ <section id="forward-searching">
+ <title>Forward Searching documents</title>
+ <para>
+ Forward searching refers to making a viewer display a given document at
+ a given location from within &vim;. At present, these viewers are known to support
+ forward searching, but viewers that are not listed here may work, too:
+ <informaltable frame="all">
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Viewer</entry>
+ <entry>OS</entry>
+ <entry>Supported documents</entry>
+ <entry>Comment</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><ulink url="http://skim-app.sourceforge.net/">Skim</ulink></entry>
+ <entry>Apple / OS X Tiger</entry>
+ <entry>PDF</entry>
+ <entry>Supports also inverse searching</entry>
+ </row>
+ <row>
+ <entry><ulink url="http://pdfview.sourceforge.net/">PDFView</ulink></entry>
+ <entry>Apple / OS X</entry>
+ <entry>PDF</entry>
+ <entry>No longer in development, supports also inverse searching</entry>
+ </row>
+ <row>
+ <entry><ulink url="http://www2.ing.unipi.it/~d9615/homepage/texniscope.html">TeXniscope</ulink></entry>
+ <entry>Apple</entry>
+ <entry>PDF, DVI</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><ulink url="http://www.miktex.org/">YAP</ulink></entry>
+ <entry>Windows</entry>
+ <entry>DVI, PS</entry>
+ <entry>ships with MikTex</entry>
+ </row>
+ <row>
+ <entry><ulink url="http://blog.kowalczyk.info/software/sumatrapdf/">Sumatra PDF</ulink></entry>
+ <entry>Windows</entry>
+ <entry>PDF</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><ulink url="http://developer.kde.org/~kdvi/">kdvi</ulink></entry>
+ <entry>Linux/UNIX</entry>
+ <entry>DVI</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><ulink url="http://okular.kde.org/">okular</ulink></entry>
+ <entry>Linux/UNIX</entry>
+ <entry>DVI, PDF, PS and many more</entry>
+ <entry>Included in KDE 4</entry>
+ </row>
+ <row>
+ <entry><ulink url="http://math.berkeley.edu/~vojta/xdvi.html">xdvi</ulink></entry>
+ <entry>Linux/UNIX</entry>
+ <entry>DVI</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry><ulink url="http://xdvi.sourceforge.net/">xdvik</ulink></entry>
+ <entry>Linux/UNIX</entry>
+ <entry>DVI</entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ Pressing <literal>\ls</literal> from within &vim;
+ should make the viewer display the portion of the document where your
+ cursor is placed.
+ <note>
+ <para>
+ OS/X users need to set the <literal>g:Tex_TreatMacViewerAsUNIX</literal> flag
+ to <literal>1</literal> and provide a UNIX-like viewrule, that expects as
+ arguments the document, the linenumber and the sourcefile in this order.
+ </para>
+ </note>
+ </para>
+ <anchor id="enabling-searching" />
+ <note>
+ <title>Enabling Forward and Inverse Searching</title>
+ <para>
+ Most DVI viewers need "source-special" information in order to do
+ forward (and inverse) searching. This information is embedded in the
+ <literal>dvi</literal> file if the &latex; source is compiled with the
+ <literal>--src-specials</literal> option. By default, &ls; does not
+ supply this argument to the compiler. See the section on
+ <literal><link
+ linkend="Tex_CompileRule_format">g:Tex_CompileRule_dvi</link></literal>
+ to find out how this option can be set.
+
+ For pdf viewers you need to use the <ulink url="http://itexmac.sourceforge.net/pdfsync.html">pdfsync</ulink>
+ package in your LaTeX document.
+ </para>
+ </note>
+ </section>
+ <section id="inverse-searching">
+ <title>Inverse Searching</title>
+ <para>
+ Inverse searching refers to the viewer telling &vim; to display the
+ &latex; source file at a given location when you double-click in the
+ viewer window.
+ </para>
+ <para>
+ You will need to <link linkend="enabling-searching">enable
+ searching</link> in order to use this functionality.
+ </para>
+ <para>
+ You will also need to specify certain settings to the DVI viewer
+ conveying the syntax which it needs to use to tell &vim; how to display
+ the source file. In <literal>YAP</literal>, you can set this option in
+ <literal>View > Options > Inverse Search</literal>. The
+ <literal>Command Line</literal> field needs to be set as follows:
+ <programlisting>"C:\Program Files\vim\vim61\gvim" -c ":RemoteOpen +%l %f"</programlisting>
+ The command <literal>:RemoteOpen</literal> is supplied when you install
+ &ls;.
+ </para>
+ <para>
+ On *nix machines, &ls; attempts to call the DVI viewer in such a way
+ that it already knows how to communicate with &vim;. If this does not
+ seem to be working, you can use the <literal>RemoteOpen</literal>
+ command described above.
+ </para>
+ </section>
+ </section>
+ <section id="latex-folding">
+ <title>Latex Folding</title>
+ <para>
+ &ls; ships with the plugin SyntaxFolds.vim which is a plugin for
+ creating "fake" syntax folds on the fly. The fold method is actually manual
+ but the folding is based on &latex; syntax. This offers a speed increase over
+ regular syntax folding. Ofcourse it has the disadvantage that the folds are
+ not dynamic, i.e newly created syntax items are not automatically folded up.
+ (This is a compromise between speed and convenience).
+ </para>
+ <para>
+ When you open up a LaTeX file, all the portions will be automatically folded
+ up. However, no new folds will be created until you press
+ <literal>&lt;F6&gt;</literal> or <literal>\rf</literal>. (rf
+ stands for "refresh folds").
+ </para>
+ <para>
+ The fold-text is set to the first line of the folded text unless the fold is a
+ table, figure etc. (an environment). In this case, if a \caption and/or a
+ label is found in the folded region, then those are used to make a more
+ meaningful fold-text, otherwise the second line of the environment is displayed
+ along with the name of the environment. In other words, the following
+ <programlisting>\begin{figure}[h]
+ \centerline{\psfig{figure=slidercrank.eps,height=6cm}}
+ \caption{The Slider Crank Mechanism.}
+ \label{fig:slidercrank}
+\end{figure}
+% a LaTeX comment.
+\begin{eqnarray}
+ \sin(\pi) = 0
+\end{eqnarray}</programlisting>
+ </para>
+ <para>
+ will be shown as:
+ <programlisting>+--- 5 lines: figure (fig:slidercrank) : The Slider Crank Mechanism. -----
+% a LaTeX comment.
++--- 3 lines: eqnarray () : \sin(\pi) = 0 --------------------------------</programlisting>
+ </para>
+ <section id="default-folding">
+ <title>Default Folding Scheme in &ls;</title>
+ <para>
+ By default &ls; creates folds in the following manner:
+ </para>
+ <programlisting>\chapter
+\section
+%%fakesection
+ \subsection
+ \subsubsection
+ \item
+ \equation
+ \eqnarray
+ \figure
+ \table
+ \footnote</programlisting>
+ <para>
+ The indentation shows the "nestedness" of the folding scheme.
+ See the <link linkend="customizing-what-to-fold">next section</link> to
+ see how you can change this scheme.
+ </para>
+ </section>
+ <section id="customizing-what-to-fold">
+ <title>Customizing what to fold</title>
+ <para>
+ From version 1.6 onwards, the folding in &ls; can be controlled
+ to a large extent via a number of global variables.
+ </para>
+ <section id="Tex_FoldedSections">
+ <title>Tex_FoldedSections</title>
+ <para>
+ This entry defines which sections will be folded. This
+ setting is a comma separated list of section names.
+ The default value is:
+ <programlisting>part,chapter,section,%%fakesection,
+subsection,subsubsection,paragraph</programlisting>
+ Each of the entries in the list will fold up a section of the
+ corresponding name. The <literal>%%fakesection</literal> section is
+ provided as a means for the user to group lines into "fake" sections.
+ A <literal>%%fakesection</literal> is assumed to start on a line which
+ begins with the string <literal>%%fakesection</literal> and continue
+ till the start of the next <literal>\section</literal>,
+ <literal>\subsection</literal> or any other section.
+ </para>
+ <para>
+ See also <link linkend="fold-setting-advanced">advanced fold
+ settings</link>.
+ </para>
+ </section>
+ <section id="Tex_FoldedEnvironments">
+ <title>Tex_FoldedEnvironments</title>
+ <para>
+ This entry defines which environments will be folded. It is a
+ comma separated string of words each of which defines a single
+ environment. The default setting is
+ <programlisting>verbatim,comment,eq,gather,
+align,figure,table,thebibliography,
+keywords,abstract,titlepage</programlisting>
+ The words need not be standard Latex environments. You can
+ add any word you like. Also, each word will fold up all
+ environments whose name begins with that word. For example, in
+ the setting above, the word <literal>"eq"</literal> folds up the
+ <literal>\begin{equation}</literal>,
+ <literal>\begin{eqnarray}</literal>,
+ <literal>\begin{eqnarray*}</literal> environments. To avoid
+ this, you can replace the word <literal>"eq"</literal> with
+ <literal>"eq}"</literal>.
+ </para>
+ <para>
+ See also <link linkend="fold-setting-advanced">advanced fold
+ settings</link>.
+ </para>
+ </section>
+ <section id="Tex_FoldedCommands">
+ <title>Tex_FoldedCommands</title>
+ <para>
+ This entry defines which commands will be folded. It is a comma
+ separated string of words each of which defines a single command.
+ The default setting is empty, i.e no commands are folded.
+ The words need not be standard Latex commands. You can use whatever
+ words you like. Each word will fold all commands whose name begins
+ with that word as in the case of the <link
+ linkend="Tex_FoldedEnvironments">Tex_FoldedEnvironments</link>
+ variable.
+ </para>
+ <note>
+ <para>
+ It is very difficult to fold commands reliably because it is very
+ difficult to create a regexp which will match a line containing
+ unmatched parentheses (or curly brackets), but will not match a line
+ containing matched parentheses.
+ </para>
+ <para>
+ Just to make things safer, only lines which start a command but do
+ not contain additional curly braces after the command has started are
+ folded. In other words, if you wanted to fold the the command
+ <literal>"mycommand"</literal>, then the lines
+ <programlisting>\mycommand{This is a line
+and some more text on the next line
+}</programlisting>
+ will be folded, but the lines
+ <programlisting>\mycommand{This is a \textbf{line}
+and some more text
+}</programlisting>
+ will not be folded. This is a bug which is very difficult to fix.
+ </para>
+ </note>
+ <para>
+ See also <link linkend="fold-setting-advanced">advanced fold
+ settings</link>.
+ </para>
+ </section>
+ <section id="Tex_FoldedMisc">
+ <title>Tex_FoldedMisc</title>
+ <para>
+ This entry defines fold syntax for certain items which do not
+ naturally fit into the section, environment of command lists. It is a
+ comma separated list of words. The default value is:
+ <programlisting>item,preamble,&lt;&lt;&lt;</programlisting>
+ <note>
+ <para>
+ Unlike the other Tex_FoldedXXXX variables, the words in this setting
+ are limited to take values from the following list:
+ </para>
+ <para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Value</entry>
+ <entry>Meaning</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>comments</entry>
+ <entry>Folds up contiguous blocks of comments</entry>
+ </row>
+ <row>
+ <entry>item</entry>
+ <entry>Folds up the <literal>\item</literal>s within list
+ environments</entry>
+ </row>
+ <row>
+ <entry>preamble</entry>
+ <entry>Folds up the preamble of a document. (The part between
+ the <literal>\documentclass</literal> command and the
+ <literal>\begin{document}</literal> environment)</entry>
+ </row>
+ <row>
+ <entry><literal>&lt;&lt;&lt;</literal></entry>
+ <entry>Folds defined manually by the user using the
+ <literal>&lt;&lt;&lt;</literal> and
+ <literal>&gt;&gt;&gt;</literal> strings as fold-markers.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ Any other words in the <literal>Tex_FoldedMisc</literal> setting
+ are silently ignored.
+ </para>
+ </note>
+ </para>
+ <para>
+ See also <link linkend="fold-setting-advanced">advanced fold
+ settings</link>.
+ </para>
+ </section>
+ <section id="fold-setting-advanced">
+ <title>Advanced Fold setting details</title>
+ <para>
+ The order of the words in the <literal>Tex_FoldedXXXX</literal>
+ variables is <emphasis>important</emphasis>. The order defines the
+ order in which the folds are nested. For example, the value
+ <literal>"subsection,section"</literal> for the
+ <literal>Tex_FoldedSections</literal> variable will not fold any
+ subsections at all. This is because the folds are created in the
+ <emphasis>reverse</emphasis> order in which they occur in the
+ <literal>Tex_FoldedSections</literal> setting and also, once a fold is
+ created, the interior of the fold is not examined for creating
+ additional folds. In the above case, this means that a
+ <literal>\section</literal> is folded first and then its interior is
+ not examined further. The correct value should have been
+ <literal>"section,subsection"</literal>
+ </para>
+ <anchor id="fold-setting-adding" />
+ <para>
+ Each of the fold setting variables
+ <literal>Tex_FoldedSections</literal>,
+ <literal>Tex_FoldedEnvironments</literal> etc., as explained previously
+ is a comma separated string of variables. However, to make it easier
+ to <emphasis>add</emphasis> to the default settings without having to
+ repeat the whole default setting again, &ls; uses the following logic
+ in forming the complete setting string from the
+ <literal>Tex_FoldedXXXX</literal> variables. If the variable starts with
+ a comma, then <literal>Tex_FoldedXXXX</literal> is added to the end of
+ the default string rather than replacing it. Similarly, if it ends
+ with a comma, then it will be prepended to the beginning of the
+ default setting rather than replacing it.
+ </para>
+ <para>
+ For example, if <literal>Tex_FoldedEnvironments</literal> is set to the
+ string <literal>"myenv"</literal>, then only an environment of the
+ form <literal>\begin{myenv}</literal> will be folded. However, if the
+ <literal>Tex_FoldedEnvironments</literal> setting is
+ <literal>",myenv"</literal>, then the <literal>\begin{myenv}</literal>
+ environment will be folded after all other environments in the default
+ setting have been folded. On the other hand if
+ <literal>Tex_FoldedEnvironments</literal> is of the form
+ <literal>"myenv,"</literal>, the <literal>\begin{myenv}</literal>
+ environment will be folded before the rest of the environments in the
+ default setting.
+ </para>
+ </section>
+ </section>
+ <section id="editing-folding">
+ <title>Editing the folding.vim file directly</title>
+ <para>
+ If you are using version 1.5 of &ls; or older, you will need to
+ directly edit the
+ <literal>$VIM/ftplugin/latex-suite/folding.vim</literal> file if you
+ wish to modify the folding scheme. You will need to modify the
+ function <literal>MakeTexFolds()</literal> defined in that file to
+ modify the fold syntax. <literal>MakeTexFolds</literal> makes a number
+ of calls to <literal>AddSyntaxFoldItem</literal>. Each such call
+ defines a new "fold item". The order in which these calls are made
+ defines how the folds are nested. For example, if you desire an
+ <literal>figure</literal> environment to be nested within a
+ <literal>section</literal>, then you should define the fold for the
+ <literal>figure</literal> first. The syntax of
+ <literal>AddSyntaxFoldItem</literal> is as follows:
+ <programlisting>AddSyntaxFoldItem(startpat, endpat, startoff, endoff [, startskip, endskip])</programlisting>
+ If the last two arguments are omitted, then they are assumed to default
+ to the empty strings <literal>''</literal>.
+ The explanation for each argument is as follows:
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Argument</entry>
+ <entry>Explanation</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>startpat</literal></entry>
+ <entry>a line matching this pattern defines
+ the beginning of a fold.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal>endpat</literal>
+ </entry>
+ <entry>
+ a line matching this pattern defines the end of a fold.
+ </entry>
+ </row>
+ <row>
+ <entry><literal>startoff</literal></entry>
+ <entry>
+ this is the offset from the starting line at which folding will
+ actually start
+ </entry>
+ </row>
+ <row>
+ <entry><literal>endoff</literal></entry>
+ <entry>
+ like <literal>startoff</literal>, but gives the offset of the
+ actual fold end from the line satisfying <literal>endpat</literal>.
+ <literal>startoff</literal> and <literal>endoff</literal> are
+ necessary when the folding region does not have a specific end
+ pattern corresponding to a start pattern. for example in &latex;,
+ <literal>\section{Section Name}</literal> defines the beginning of
+ a section, but there is no command which specifically ends a
+ section. Thus a <literal>\section</literal> is assumed to end 1
+ line <emphasis>before</emphasis> another section starts.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal>startskip</literal>
+ </entry>
+ <entry>
+ A Pattern Which Defines The Beginning Of A "Skipped" Region.
+
+ For example, suppose we define a \itemize fold as follows:
+ <programlisting><literal>startpat</literal> = '^\s*\\item',
+<literal>endpat</literal> = '^\s*\\item\|^\s*\\end{\(enumerate\|itemize\|description\)}',
+<literal>startoff</literal> = 0,
+<literal>endoff</literal> = -1</programlisting>
+
+ This defines a fold which starts with a line beginning with an
+ <literal>\item</literal> and ending one line before a line beginning with an
+ <literal>\item</literal> or <literal>\end{enumerate}</literal> etc.
+
+ Then, as long as <literal>\item</literal>'s are not nested things are fine.
+ However, once items begin to nest, the fold started by one
+ <literal>\item</literal> can end because of an
+ <literal>\item</literal> in an <literal>\itemize</literal>
+ environment within this <literal>\item</literal>. i.e, the following can happen:
+
+ <programlisting>\begin{itemize}
+\item Some text &lt;------- fold will start here
+This item will contain a nested item
+\begin{itemize} &lt;----- fold will end here because next line contains \item...
+\item Hello
+\end{itemize} &lt;----- ... instead of here.
+\item Next item of the parent itemize
+\end{itemize}</programlisting>
+
+ Therefore, in order to completely define a folding item which
+ allows nesting, we need to also define a "skip" pattern.
+ <literal>startskip</literal> and end skip do that.
+ Leave '' when there is no nesting.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal>endskip</literal>
+ </entry>
+ <entry>
+ the pattern which defines the end of the "skip" pattern for
+ nested folds.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <note>
+ <title>Example 1</title>
+ <para>
+ A syntax fold region for the latex section is defined with the
+ following arguments to <literal>AddSyntaxFoldItem</literal>:
+ <programlisting>startpat = "\\section{"
+endpat = "\\section{"
+startoff = 0
+endoff = -1
+startskip = ''
+endskip = ''</programlisting>
+ Note that the start and end patterns are thus the same and
+ <literal>endoff</literal> has a negative value to capture the effect
+ of a section ending one line before the next starts.
+ </para>
+ </note>
+ <note>
+ <title>Example 2</title>
+ <para>
+ A syntax fold region for the \itemize environment is:
+ <programlisting>startpat = '^\s*\\item',
+endpat = '^\s*\\item\|^\s*\\end{\(enumerate\|itemize\|description\)}',
+startoff = 0,
+endoff = -1,
+startskip = '^\s*\\begin{\(enumerate\|itemize\|description\)}',
+endskip = '^\s*\\end{\(enumerate\|itemize\|description\)}'</programlisting>
+ Note the use of <literal>startskip</literal> and
+ <literal>endskip</literal> to allow nesting.
+ </para>
+ </note>
+ </section>
+ </section>
+ <section id="latex-project">
+ <title>Multiple file &latex; projects</title>
+ <anchor id="latex-project-example" />
+ <para>
+ Many &latex; projects contain multiple source files which are
+ <literal>\include</literal>d from a master file. A typical example of
+ this situation is a directory layout such as the following
+ </para>
+ <para>
+ <programlisting>thesis/
+ main.tex
+ abstract.tex
+ intro/
+ intro.tex
+ figures/
+ fig1.eps
+ fig2.eps
+ chapter1/
+ chap1.tex
+ figures/
+ fig1.eps
+ conclusion/
+ conclusion.tex
+ figures/</programlisting>
+ </para>
+ <para>
+ In the above case, <literal>main.tex</literal> will typically look like
+ </para>
+ <para>
+ <programlisting>% file: main.tex
+\documentclass{report}
+\begin{document}
+
+\input{abstract.tex}
+\input{intro/intro.tex}
+\input{chapter1/chap1.tex}
+\input{conclusion/conclusion.tex}
+
+\end{document}</programlisting>
+ </para>
+ <para>
+ <anchor id="latex-master-file-specification" /> In such situations, you will
+ need to convey to &ls; that <literal>main.tex</literal> is the main file
+ which <literal>\input</literal>s the other files. This is done by creating
+ an empty file called <literal>main.tex.latexmain</literal> in the same
+ directory in which <literal>main.tex</literal> resides. This file is called
+ the <emphasis>master file</emphasis> in this manual. See <link
+ linkend="Tex_MainFileExpression">Tex_MainFileExpression</link> for an
+ alternative way of specifying the master file.
+ </para>
+ <note>
+ <para>
+ Here <literal>main.tex.latexmain</literal> is (obviously) a different
+ file from <literal>main.tex</literal> itself.
+ <literal>main.tex</literal> need not be renamed. This ofcourse
+ restricts each directory to have a single master file.
+ </para>
+ </note>
+ <para>
+ Each time &ls; opens a new &latex; file, it will try to see if it is
+ part of a multiple file project by searching upwards (to the root of
+ the file-system) from the current file's directory to see if it finds a
+ file of the form <literal>*.latexmain</literal>. If such a file is
+ found, then it is considered that the current file is part of a larger
+ project. The name of the &latex; master file is inferred directly from
+ the first part of the <literal>*.latexmain</literal> file as described
+ in the example above.
+ </para>
+ <section id="latex-project-settings">
+ <title>&ls; project settings</title>
+ <para>
+ If a <link linkend="latex-master-file">master file</link> is found,
+ then &ls; <literal>:source</literal>s the file. Thus this file needs to
+ contain valid &vim; commands. This file is typically used to store
+ project specific settings.
+ </para>
+ <para>
+ Some typical per-project settings which are best put in the master file
+ are
+ <simplelist>
+ <member><link
+ linkend="Tex_ProjectSourceFiles">Tex_ProjectSourceFiles</link></member>
+ </simplelist>
+ </para>
+ </section>
+ <section id="latex-master-file">
+ <title>Specifying which file to compile</title>
+ <para>
+ In the example described <link
+ linkend="latex-project-example">previously</link>, if you are editing
+ <literal>intro/intro.tex</literal> and press <literal>\ll</literal>,
+ then you still want &ls; to compile <literal>main.tex</literal>,
+ because <literal>intro/intro.tex</literal> is merely a fragment which
+ is <literal>\input</literal>'ed into <literal>main.tex</literal>. If
+ the master file is already specified using the
+ <literal>*.latexmain</literal> convention described <link
+ linkend="latex-project-example">previously</link>, then &ls; will automatically
+ compile the master file when you are editing any of its
+ <literal>\input</literal>'ed fragments. Thus pressing
+ <literal>\ll</literal> while editing <literal>intro/intro.tex</literal>
+ will compile <literal>main.tex</literal>.
+ </para>
+ <anchor id="Tex_MainFileExpression" />
+ <para>
+ If you wish to use some different logic to specify the main file name,
+ you can specify a custom expression via the
+ <literal>Tex_MainFileExpression</literal> variable. This is a string
+ containing a valid vim expression. In addition, you can use a variable
+ <literal>modifier</literal> which is in the format used for
+ <literal>|filename-modifiers|</literal>, for example,
+ <literal>':p:h'</literal>. You should utilize this variable to modify
+ the filename of the main file.
+ <programlisting>let g:Tex_MainFileExpression = 'MainFile(modifier)'
+function! MainFile(fmod)
+ if glob('*.latexmain') != ''
+ return fnamemodify(glob('*.latexmain'), a:fmod)
+ else
+ return ''
+ endif
+endif</programlisting>
+ </para>
+ </section>
+ </section>
+ <section id="latex-suite-commands-maps">
+ <title>&ls; Commands and Maps</title>
+ <para>
+ This section describes the maps and commands used in &ls;. It also
+ describes a way to change the map sequences according to your
+ preference.
+ </para>
+ <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>&lt;C-j&gt;</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>&lt;Plug&gt;</literal> mapping
+ <literal>&lt;C-j&gt;</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>&lt;C-j&gt;</literal> key is derived
+ from <literal>&lt;Plug&gt;IMAP_JumpForward</literal>. Therefore to
+ remap the <literal>&lt;C-j&gt;</literal> key to say
+ <literal>&lt;C-space&gt;</literal>, you will need to put a
+ statement like the following in your <literal>~/.vimrc</literal>.
+ <programlisting>imap &lt;C-space&gt; &lt;Plug&gt;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. The reason for this is
+ that the <literal>&lt;C-j&gt;</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 utilized 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>&lt;Plug&gt;IMAP_JumpForward</literal></entry>
+ <entry><literal>&lt;C-j&gt;</literal></entry>
+ </row>
+ <row>
+ <entry><literal>&lt;Plug&gt;IMAP_JumpBack</literal></entry>
+ <entry>(none)</entry>
+ </row>
+ <row>
+ <entry><literal>&lt;Plug&gt;IMAP_DeleteAndJumpForward</literal></entry>
+ <entry>(none)</entry>
+ </row>
+ <row>
+ <entry><literal>&lt;Plug&gt;IMAP_DeleteAndJumpBack</literal></entry>
+ <entry>(none)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ <literal>&lt;Plug&gt;IMAP_JumpForward</literal> takes you to the
+ location of the next <link
+ linkend="place-holders">place-holder</link>.
+ </para>
+ <para>
+ <literal>&lt;Plug&gt;IMAP_JumpBack</literal> takes you to the previous
+ <link linkend="place-holders">place-holder</link>.
+ </para>
+ <para>
+ <literal>&lt;Plug&gt;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>&lt;Plug&gt;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
+ linkend="Imap_StickyPlaceHolders"><literal>g:Imap_StickyPlaceHolders</literal></link>
+ </para>
+ </section>
+ <section id="customize-alt-key-maps">
+ <title>Alt-Key mappings</title>
+ <para>
+ These mappings are are described in the section <link
+ linkend="altkey-mappings">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" />
+ <anchor id="Plug_Tex_InsertItemOnThisLine" />
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Plug Mapping</entry>
+ <entry>Default Key</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>&lt;Plug&gt;Tex_MathBF</literal></entry>
+ <entry><literal>&lt;Alt-B&gt;</literal></entry>
+ </row>
+ <row>
+ <entry><literal>&lt;Plug&gt;Tex_MathCal</literal></entry>
+ <entry><literal>&lt;Alt-C&gt;</literal></entry>
+ </row>
+ <row>
+ <entry><literal>&lt;Plug&gt;Tex_LeftRight</literal></entry>
+ <entry><literal>&lt;Alt-L&gt;</literal></entry>
+ </row>
+ <row>
+ <entry><literal>&lt;Plug&gt;Tex_InsertItemOnThisLine</literal></entry>
+ <entry><literal>&lt;Alt-I&gt;</literal></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ </section>
+ <section id="latex-suite-commands">
+ <title>Latex Suite Commands</title>
+ <section id="TMacro">
+ <title>:TMacro [{macro}]</title>
+ <para>
+ When used without any arguments lists all available macros defined
+ in runtime ftplugin/latex-suite/macros/ directories and prompts you
+ to choose one of them. With one argument |:read| this macro under
+ cursor position. With more than one argument it will not work :) In
+ Vim >= 6.2 works completion of names of macros (see 'wildmenu',
+ 'wildmode' for more about command-line completion).
+ </para>
+ </section>
+ <section id="TMacroEdit">
+ <title>:TMacroEdit [{macro}]</title>
+ <para>
+ Splits window for editing {macro}. When used without any arguments
+ lists all available macros defined in runtime
+ ftplugin/latex-suite/macros/ directories and prompt you to choose
+ one of them. When you try to edit {macro} not from local directory
+ &ls; will copy it to your local directory with suffix
+ "-local". If local copy already exists &ls; prompt for
+ overwriting it. In Vim >= 6.2 works completion of names of macros
+ (see 'wildmenu', 'wildmode' for more about command-line completion).
+ </para>
+ </section>
+ <section id="TMacroNew">
+ <title>:TMacroNew</title>
+ <para>
+ Splits window to write new macro. Directory in new buffer is
+ locally changed to &ls;/macros/.
+ </para>
+ </section>
+ <section id="TMacroDelete">
+ <title>:TMacroDelete [{macro}]</title>
+ <para>
+ Delets {macro} from your local ftplugin/latex-suite/macros/
+ directory. When used without any arguments lists all available
+ macros defined in &ls;/macros/ directory and prompt you to
+ choose one of them. When you choose to delete {macro} which is not
+ in your local directory &ls; will refuse to delete it. In
+ Vim >= 6.2 works completion of names of macros (see 'wildmenu',
+ 'wildmode' for more about command-line completion)
+ </para>
+ </section>
+ <section id="TPackage">
+ <title>:TPackage [{package, ...}]</title>
+ <para>
+ When used without any arguments lists name of the packages for
+ which support is available. If you are using &vim; GUI and have
+ <literal>Tex_Menus</literal> set to 1, then it will list all files
+ found in the <literal>$VIM/ftplugin/latex-suite/packages</literal>
+ directory. Otherwise, &ls; will list files found in the
+ <literal>$VIM/ftplugin/latex-suite/dictionaries</literal> directory.
+ Choosing a file from the list will insert a
+ <programlisting>\usepackage[&ph;]{&lt;packname&gt;}</programlisting> line into the
+ buffer at the current cursor location. For &vim; 6.2 and above, you
+ can use command-line completion to choose a package file. You can also
+ call <literal>TPackage</literal> with one or more package names
+ separated with spaces in which case, &ls; will insert
+ <literal>\usepackage</literal> lines for each of them in turn.
+ </para>
+ <para>
+ After inserting the <literal>\usepackage</literal> line(s), &ls; will
+ support it (them) in various ways as described in the section <link
+ linkend="package-actions">Actions taken for supported
+ packages</link>.
+ </para>
+ </section>
+ <section id="TPackageUpdate">
+ <title>:TPackageUpdate</title>
+ <para>
+ This command `reads' name of package under cursor and turns on
+ possible support.
+ </para>
+ </section>
+ <section id="TPackageUpdateAll">
+ <title>:TPackageUpdateAll</title>
+ <para>
+ After issuing this command latexSuite scans the file in
+ looking for not declared packages, removing not needed entries
+ from Packages menu and turning off not necessary packages'
+ dictionaries.
+ </para>
+ </section>
+ <section id="TTemplate">
+ <title>:TTemplate [{template}]</title>
+ <para>
+ When used without any arguments lists all available templates
+ from latex-suite/templates/ directory and prompts to choose
+ one of them.
+ With one argument :0|read| {template} file.
+ With more than one argument it will not work :)
+ In Vim >= 6.2 works completion of names of macros (see 'wildmenu',
+ 'wildmode' for more about command-line completion)
+ </para>
+ </section>
+ <section id="TSection">
+ <title>:TSection [{argument}]</title>
+ <para>
+ Used without any arguments inserts last section type
+ (|latex-sectioning|).
+ Accepts arguments:
+ n&gt; inserts section name in &lt;n&gt; logical level.
+ Levels are:
+ <informaltable>
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>0</entry><entry>part</entry></row>
+ <row><entry>1</entry><entry>chapter</entry></row>
+ <row><entry>2</entry><entry>section</entry></row>
+ <row><entry>3</entry><entry>subsection</entry></row>
+ <row><entry>4</entry><entry>subsubsection</entry></row>
+ <row><entry>5</entry><entry>paragraph</entry></row>
+ <row><entry>6</entry><entry>subparagraph</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <informaltable>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+ +&lt;n&gt;
+ </entry>
+ <entry>
+ inserts section name &lt;n&gt; logical levels above the last
+ used comand
+ </entry>
+ </row><row>
+ <entry>
+ -&lt;n&gt;
+ </entry>
+ <entry>
+ inserts section name &lt;n&gt; logical levels below the last
+ used comand
+ </entry>
+ </row><row>
+ <entry>
+ +
+ </entry>
+ <entry>
+ inserts section name one logical level below the last
+ used command (equal to +1).
+ </entry>
+ </row><row>
+ <entry>
+ ++
+ </entry>
+ <entry>
+ inserts section name two logical levels below the last
+ used command (equal to +2).
+ </entry>
+ </row><row>
+ <entry>
+ -
+ </entry>
+ <entry>
+ inserts section name one logical level over the last
+ used command (equal to -1).
+ </entry>
+ </row><row>
+ <entry>
+ --
+ </entry>
+ <entry>
+ inserts section name two logical levels over the last
+ used command (equal to -2).
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ Command accepts also latexSuite mappings (|latex-macros|)
+ without preceding S and in lowercase:
+ <programlisting>:TSection pa</programlisting>
+ will result in <literal>\part{}</literal>. It is possible to use full names of
+ sections: <literal>:TSection part</literal>
+ </para>
+ </section>
+ <section id="TSectionAdvanced">
+ <title>:TSectionAdvanced</title>
+ <para>
+ Accepts the same arguments as |TSection| but leads to a couple
+ of questions (whether you want to include the section in the
+ table of contents, whether there is a shorter name for the
+ table of contents) and then creates a more intelligent
+ template.
+ </para>
+ </section>
+ <section id="TLook">
+ <title>:TLook</title>
+ <para>
+ Accepts one argument. Will look through .tex files in
+ directory of edited file for argument. It can be regexp. You
+ don't have to enclose argument in "". &lt;cr&gt; takes you to
+ location. Other keys work as described in |latex-viewer|.
+ Note: TLook uses :grep command and is using 'grepprg'. Its
+ regular expressions can be different from those of Vim.
+ </para>
+ </section>
+ <section id="TLookBib">
+ <title>:TLookBib</title>
+ <para>
+ Accepts one argument. Will look through .bib files in
+ directory of edited file for argument. It can be regexp. You
+ don't have to enclose argument in "". &lt;cr&gt; takes you to
+ location. Other keys work as described in |latex-viewer|.
+ </para>
+ <note>
+ <para>
+ TLookBib uses :grep command and is using 'grepprg'. Its
+ regular expressions can be different from those of Vim.
+ </para>
+ </note>
+ </section>
+ <section id="TLookAll">
+ <title>:TLookAll</title>
+ <para>
+ Accepts one argument. Will look through all files in directory
+ of edited file for argument. It can be regexp. You don't have
+ to enclose argument in "". &lt;cr&gt; takes you to location. Other
+ keys work as described in |latex-viewer|.
+ Note: TLook uses :grep command and is using 'grepprg'. Its
+ regular expressions can be different from those of Vim.
+ </para>
+ </section>
+ <section id="TPartComp">
+ <title>:TPartComp</title>
+ <para>
+ No argument allowed but accepts range in all formats. Define
+ fragment of interest with :'a,'b, :/a/,/b/, :'&lt;,'&gt; or :20,30.
+ All other rules of compilation apply.
+ </para>
+ </section>
+ <section id="TPartView">
+ <title>:TPartView</title>
+ <para>
+ Show last compiled fragment. All rules of viewing apply but
+ |latex-searching|.
+ </para>
+ </section>
+ <section id="Tshortcuts">
+ <title>:Tshortcuts [{arg}]</title>
+ <para>
+ Show shortcuts in terminal (not using menu). Without {arg}
+ you will see simple menu prompting for one of them. Possible
+ arguments:
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>g</entry><entry>General shortcuts</entry></row>
+ <row><entry>e</entry><entry>Environment shortcuts</entry></row>
+ <row><entry>f</entry><entry>Font shortcuts</entry></row>
+ <row><entry>s</entry><entry>Section shortcuts</entry></row>
+ <row><entry>m</entry><entry>Math shortcuts</entry></row>
+ <row><entry>a</entry><entry>All shortcuts</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </section>
+ </section>
+ </section>
+ <section id="customizing-latex-suite">
+ <title>Customizing &ls;</title>
+ <para>
+ Customizing &ls; is done by defining certain global variables in
+ <literal>$VIM/ftplugin/tex.vim</literal>, where
+ <literal>$VIM</literal> corresponds to <literal>~/.vim</literal> for *nix
+ machines and <literal>~/vimfiles</literal> for windows machines. This file
+ is not part of the &ls; distribution. You will need to create this file
+ yourself (or modify it if it exists) if
+ you need to change any default settings. Since this file is not
+ included as part of the &ls; distribution, it will not be over-written in
+ subsequent updates.
+ </para>
+ <para>
+ The default settings in &ls; are defined in
+ <literal>$VIM/ftplugin/latex-suite/texrc</literal>. Please take a look at
+ this file if you find this documentation incomplete or confusing. That file
+ is also well documented.
+ </para>
+ <para>
+ This chapter describes the various settings which effect &ls; and their
+ default values. The settings are broken up into sections according to the
+ behavior which they influence.
+ </para>
+ <section id="ls-general-purpose-settings">
+ <title>General Settings</title>
+ <section id="Tex_Debug">
+ <title>Tex_Debug</title>
+ <para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>0</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ If set to 1, then &ls; will create certain global debug
+ statements which can be printed by doing
+ <programlisting>:call Tex_PrintDebug()</programlisting>
+ </para>
+ </para>
+ </section>
+ <section id="Tex_UsePython">
+ <title>Tex_UsePython</title>
+ <para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ If &ls; detects that your vim is python enabled (using
+ <literal>has('python')</literal>), then it tries to use python in
+ certain places to speed things up. If this misbehaves, you can set
+ this to zero, in which case, &ls; will use vimscript to accomplish
+ the same.
+ </para>
+ </para>
+ </section>
+ </section>
+ <section id="customizing-place-holders">
+ <title>Place-Holder Customization</title>
+ <para>
+ &ls; uses <link linkend="place-holders">place-holders</link> to minimize
+ using the movement keys while typing. The following settings affect how
+ place-holders are used.
+ </para>
+ <note>
+ <para>
+ These setting need to be set in your <literal>~/.vimrc</literal>, not
+ <literal>$VIM/ftplugin/tex.vim</literal> because these settings affect
+ the behavior of <literal>imaps.vim</literal>, which is a global plugin,
+ not a file-type plugin.
+ </para>
+ </note>
+ <section id="Imap_UsePlaceHolders">
+ <title>g:Imap_UsePlaceHolders</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Setting this to zero completely disables using place-holders.
+ </para>
+ </section>
+ <section id="Imap_PlaceHolderStart">
+ <anchor id="Imap_PlaceHolderEnd"></anchor>
+ <title>g:Imap_PlaceHolderStart &amp; g:Imap_PlaceHolderEnd</title>
+ <informaltable frame="all">
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Setting</entry>
+ <entry>Type</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>Imap_PlaceHolderStart</literal></entry>
+ <entry>String</entry>
+ <entry><literal>'&lt;+'</literal></entry>
+ </row>
+ <row>
+ <entry><literal>Imap_PlaceHolderEnd</literal></entry>
+ <entry>String</entry>
+ <entry><literal>'+&gt;'</literal></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ These settings affect the strings displayed at the beginning and end of
+ the place-holder string. Set these strings to a value different than a
+ commonly occurring sequence of characters.
+ </para>
+ <note>
+ <title>TIP</title>
+ <para>
+ If you use the <literal>latin1</literal> encoding and do not type in
+ french, then you can set these strings to the <literal>\xab</literal>
+ and <literal>\xbb</literal> characters (the french quotation marks).
+ </para>
+ </note>
+ </section>
+ <section id="Imap_DeleteEmptyPlaceHolders">
+ <title>g:Imap_DeleteEmptyPlaceHolders</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ When set to one, non-descriptive or empty place-holders are deleted on
+ pressing <literal>&lt;Ctrl-J&gt;</literal>.
+ </para>
+ </section>
+ <section id="Imap_StickyPlaceHolders">
+ <title>g:Imap_StickyPlaceHolders</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ When set to 1, in visual mode, <literal>&lt;Ctrl-J&gt;</literal> takes
+ you to the next placeholder without deleting the current placeholder.
+ </para>
+ </section>
+ </section>
+ <section id="customizing-macros">
+ <title>Macro Customization</title>
+ <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.
+ </para>
+ <para>
+ For example, if you press <literal>&lt;F5&gt;</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}\&lt;CR&gt;&ph;\&lt;CR&gt;\\end{theorem}"</programlisting>
+ </para>
+ <para>
+ If the expansion uses special keys such as carriage return etc, then
+ use double-quotes and use the <literal>"\&lt;key&gt;"</literal>
+ notation for special keys. 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*}\&lt;CR&gt;&ph; &amp;=&amp; &ph;\&lt;CR&gt;\\end{eqnarray*}&ph;"</programlisting>
+ This will make pressing <literal>&lt;F5&gt;</literal> after
+ <literal>eqnarray*</literal> expand to
+ <programlisting>\begin{eqnarray*}
+ &ph; &amp;=&amp; &ph;
+\end{eqnarray*}&ph;</programlisting>
+ </para>
+ </section>
+ <section id="Tex_Com_name">
+ <title>Tex_Com_name</title>
+ <para>
+ If you wish to define new expansions for fast command insertion as
+ described <link linkend="latex-command-maps">here</link>, or redefine
+ expansions from the default values in &ls;, you will need to define
+ variables of the form <literal>g:Tex_Com_{name}</literal> where
+ <literal>name</literal> is a command name. For example, with the
+ setting
+ <programlisting>let g:Tex_Com_frac = "\\frac{&ph;}{&ph;}&ph;"</programlisting>
+ pressing <literal>&lt;F7&gt;</literal> after typing
+ <literal>frac</literal> will change it to <literal>\frac{&ph;}{&ph;}&ph;</literal>
+ </para>
+ <para>
+ See <link linkend="Tex_Env_name">Tex_Env_name</link> for additional
+ details on how to create this setting in various special
+ circumstances.
+ </para>
+ </section>
+ <section id="macro-enabling">
+ <title>Enabling / disabling macros</title>
+ <para>
+ The following variables disable various parts of the macro functionality
+ of &ls;. See the links to the relevant sections to see what functionality
+ setting each of the variables to zero will take away.
+ </para>
+ <anchor id="Tex_EnvironmentMaps" />
+ <anchor id="Tex_EnvironmentMenus" />
+ <anchor id="Tex_FontMaps" />
+ <anchor id="Tex_FontMenus" />
+ <anchor id="Tex_SectionMaps" />
+ <anchor id="Tex_SectionMenus" />
+ <informaltable frame="all">
+ <tgroup cols="3">
+ <thead>
+ <row><entry>Setting</entry><entry>Link to relevant section</entry><entry>Default Value</entry></row>
+ </thead>
+ <tbody>
+ <row><entry><literal>g:Tex_EnvironmentMaps
+ </literal></entry><entry><link linkend="environment-mappings">Environment Mappings</link></entry><entry>1</entry></row>
+ <row><entry><literal>g:Tex_EnvironmentMenus</literal></entry><entry></entry><entry>1</entry></row>
+ <row><entry><literal>g:Tex_FontMaps </literal></entry><entry><link linkend="font-maps">Font Mappings</link></entry><entry>1</entry></row>
+ <row><entry><literal>g:Tex_FontMenus </literal></entry><entry></entry><entry>1</entry></row>
+ <row><entry><literal>g:Tex_SectionMaps </literal></entry><entry><link linkend="section-mappings">Section Mappings</link></entry><entry>1</entry></row>
+ <row><entry><literal>g:Tex_SectionMenus </literal></entry><entry></entry><entry>1</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ <section id="Tex_UseMenuWizard">
+ <title>g:Tex_UseMenuWizard</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>0</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ If this variable is set to 1, then when an environment is chosen from the
+ menu then for selected environments, &ls; asks a series of
+ questions on the command line and inserts a template with the
+ corresponding fields already filled in. Setting this to zero will insert
+ a template with <link linkend="place-holders">place-holders</link>
+ marking off the places where fields need to be filled.
+ </para>
+ </section>
+ <section id="Imap_FreezeImap">
+ <title>g:Imap_FreezeImap</title>
+ <para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>0</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This option when set to 1, temporarily freezes &ls;'s macro
+ expansion. It might be useful when you are using some other keymap
+ which is causing excessive macro expansion. Use a buffer-local
+ variable of the same name if you wish to affect just the present
+ buffer.
+ </para>
+ </para>
+ </section>
+ <section id="Tex_CatchVisMapErrors">
+ <title>g:Tex_CatchVisMapErrors</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ With so many visual maps, its helpful to have a way of catching typing
+ errors made in visual mode. What this does is to prompt you to correct
+ your visual mode mapping if you start out with <literal><link
+ linkend="Tex_Leader">g:Tex_Leader</link></literal> and then type some
+ illegal keys. It basically maps just the <literal>g:Tex_Leader</literal>
+ character to a function.
+ </para>
+ </section>
+ <section id="Tex_Diacritics">
+ <title>g:Tex_Diacritics</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry> <entry><literal>0</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Whether or not you want to use <link
+ linkend="diacritic-mappings">diacritics</link>.
+ </para>
+ </section>
+ <section id="Tex_Leader">
+ <title>g:Tex_Leader</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>String</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>'`'</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ The mappings in &ls; are by default prefixed with the back-tick
+ character. For example, <literal>`/</literal> inserts
+ <literal>\frac{&ph;}{&ph;}&ph;</literal> etc. You can change the
+ prefix with the following setting.
+ <literal>','</literal>, <literal>'/'</literal>,
+ <literal>'`'</literal> are preferred values. <literal>''</literal> or
+ <literal>'\'</literal> will lead to a <emphasis>lot</emphasis> of
+ trouble.
+ </para>
+ <para>
+ g:Tex_Leader is also used for visual mode mappings for fonts.
+ </para>
+ </section>
+ <section id="Tex_Leader2">
+ <title>g:Tex_Leader2</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>String</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>','</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ In order to avoid clashes between the large number of visual mode macros
+ provided, the <link linkend="enclosing-env-threeletter">visual mode
+ macros for environments</link> and sections start with a character
+ different from <literal>g:Tex_Leader</literal>.
+ </para>
+ </section>
+ <section id="Tex_PromptedEnvironments">
+ <title>g:Tex_PromptedEnvironments</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>String</entry></row>
+ <row><entry>Default Value</entry> <entry><literal>'eqnarray*,eqnarray,equation,equation*,\[,$$,align,align*'</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This string represents a comma separated list of fields corresponding to
+ environments. Pressing <literal>&lt;F5&gt;</literal> in insert-mode in
+ the body of the document asks you to choose from one of these
+ environments to insert.
+ </para>
+ <para>
+ Leaving this string empty will leave the <literal>&lt;F5&gt;</literal>
+ key unmapped
+ </para>
+ </section>
+ <section id="Tex_HotKeyMappings">
+ <title>g:Tex_HotKeyMappings</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>String</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>'eqnarray*,eqnarray,bmatrix'</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This string represents a comma separated list of environments which are
+ mapped to <literal>&lt;Shift-F-1&gt;</literal> through
+ <literal>&lt;Shift-F-4&gt;</literal>. For example, pressing
+ <literal>&lt;Shift-F-2&gt;</literal> with this setting inserts the
+ <literal>eqnarray</literal> environment.
+ </para>
+ <para>
+ Leaving this string empty will leave <literal>&lt;Shift-F-1&gt;</literal> through
+ <literal>&lt;Shift-F-4&gt;</literal> unmapped.
+ </para>
+ <note>
+ <para>
+ Only the first four fields of this list are used. The rest are silently
+ ignored.
+ </para>
+ </note>
+ </section>
+ <section id="Tex_PromptedCommands">
+ <title>g:Tex_PromptedCommands</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>String</entry></row>
+ <row><entry>Default Value</entry>
+ <entry>
+ <literal>'footnote,cite,pageref,label'</literal>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This string represents a comma separated list of &latex; commands
+ which &ls; uses for the <literal>&lt;F7&gt;</literal> and
+ <literal>&lt;S-F7&gt;</literal> maps as described <link
+ linkend="latex-command-maps">here</link>.
+ </para>
+ <para>
+ Leaving this string empty will leave the <literal>&lt;F7&gt;</literal>
+ key unmapped.
+ </para>
+ </section>
+ <section id="Tex_ItemStyle_environment">
+ <title>Tex_ItemStyle_environment</title>
+ <para>
+ This setting affects the style which &ls; uses to insert an
+ <literal>\item</literal> when <literal>&lt;Alt-I&gt;</literal> is
+ pressed as described <link linkend="Alt-I">here</link>. By default
+ &ls; defines styles for the following environments:
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Environment</entry>
+ <entry>Style</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row><entry>itemize</entry><entry>\item </entry></row>
+ <row><entry>enumerate</entry><entry>\item </entry></row>
+ <row><entry>theindex</entry><entry>\item </entry></row>
+ <row><entry>thebibliography</entry><entry>\item[&lt;+biblabel+&gt;]{&lt;+bibkey+&gt;} &lt;++&gt;</entry></row>
+ <row><entry>description</entry><entry>\item[&lt;+label+&gt;] &lt;++&gt;</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Each style is defined by a variable of the form
+ <literal>g:Tex_ItemStyle_{envname}</literal> where
+ <literal>envname</literal> is the name of the environment for which
+ the style is defined. For example, by default
+ <programlisting>g:Tex_ItemStyle_description = '\item[&lt;+label+&gt;] &lt;++&gt;'</programlisting>
+ Redefining the style for a particular environment or defining a style
+ for an entirely new environment is simply a matter of setting the
+ value of a variable of the corresponding name.
+ </para>
+ </section>
+ </section>
+ <section id="customizing-smart-keys">
+ <title>Smart Key Customization</title>
+ <para>
+ These settings affect the smart key functionality as described <link
+ linkend="smart-keys">here</link>.
+ </para>
+ <section id="Tex_SmartKeyBS">
+ <title>g:Tex_SmartKeyBS</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Whether or not <literal>&lt;Backspace&gt;</literal> deletes diacritics.
+ </para>
+ </section>
+ <section id="Tex_SmartKeyQuote">
+ <title>g:Tex_SmartKeyQuote</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Whether or not the <link linkend="smart-keys">smart quotes</link>
+ functionality is available.
+ </para>
+ <para>
+ If enabled, the quote characters can be customized by setting the
+ following variables:
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Setting</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>g:Tex_SmartQuoteOpen</literal></entry>
+ <entry><literal>"``"</literal></entry>
+ </row>
+ <row>
+ <entry><literal>g:Tex_SmartQuoteClose</literal></entry>
+ <entry><literal>"''"</literal></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Non-English users will want to change these settings to their locale.
+ These global variables will be ignored if there are buffer-local
+ variables (with the same name), which may be set in the language specific
+ package files, such as
+ <literal>$VIM/ftplugin/latex-suite/packages/german</literal>.
+ </para>
+ </section>
+ </section>
+ <section id="customizing-latex-completion">
+ <title>Latex Completion Customization</title>
+ <para>
+ The following settings affect the <link linkend="latex-completion">
+ completion</link> functionality in &ls;.
+ </para>
+ <section id="completion-window-preferences">
+ <title>Window size settings</title>
+ <para>
+ These three settings affect the aesthetics of the completion
+ functionality.
+ </para>
+ <anchor id="Tex_ViewerCwindowHeight" />
+ <anchor id="Tex_ViewerPreviewHeight" />
+ <anchor id="Tex_ExplorerHeight" />
+ <anchor id="Tex_ImageDir" />
+ <informaltable frame="all">
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Setting</entry>
+ <entry>Explanation</entry>
+ <entry>Default Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>g:Tex_ViewerCwindowHeight</literal></entry>
+ <entry>The height of the <literal>cwindow</literal> which displays the
+ list of <literal>\label</literal>s etc.</entry>
+ <entry>5</entry>
+ </row>
+ <row>
+ <entry><literal>g:Tex_ViewerPreviewHeight</literal></entry>
+ <entry>The height of the preview window which shows the context of a
+ <literal>\label</literal> etc.</entry>
+ <entry>10 </entry>
+ </row>
+ <row>
+ <entry><literal>g:Tex_ExplorerHeight</literal></entry>
+ <entry>The height of the explorer window which lists the files from
+ which to choose an image file.</entry>
+ <entry>10</entry>
+ </row>
+ <row>
+ <entry><literal>g:Tex_ImageDir</literal></entry>
+ <entry>The directory to scan for images</entry>
+ <entry>''</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </section>
+ <section id="Tex_BIBINPUTS">
+ <title>g:Tex_BIBINPUTS</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>string</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>''</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This string describes the directories which are scanned while trying
+ to search for <literal>.bib</literal> and <literal>.bbl</literal>
+ files. See the <link linkend="latex-completion-cite">cite completion
+ section</link> for more details.
+ </para>
+ <para>
+ This string should be set in the syntax accepted by &vim;'s native
+ <literal>'path'</literal> setting. Do not include the present
+ directory <literal>'.'</literal>. While searching for
+ <literal>bibliography</literal> files, the present directory will be
+ prepended to this variable.
+ </para>
+ </section>
+ <section id="Tex_UseSimpleLabelSearch">
+ <title>Tex_UseSimpleLabelSearch</title>
+ <para>
+ When set to 1, &ls; searches for <literal>\label</literal>s in all
+ <literal>.tex</literal> files in the directory containing the file
+ being edited when &lt;F9&gt; is pressed. See <link
+ linkend="ls-completion-ref">\ref completion</link> for details.
+ </para>
+ </section>
+ <section id="Tex_ProjectSourceFiles">
+ <title>g:Tex_ProjectSourceFiles</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>String</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>''</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This setting is meant to be initialized on a per-project basis using
+ the <link linkend="latex-master-file">&ls; master file</link> as
+ described in <link linkend="latex-project">&ls; Project</link>
+ section. It is a list of source files which are used in the project.
+ If defined, then instead of using the logic described in
+ <link
+ linkend="Tex_UseSimpleLabelSearch">Tex_UseSimpleLabelSearch</link> to
+ search for files in which to search for <literal>\label</literal>s, we
+ simply search for <literal>\label</literal>s in this list. This
+ significantly reduces the time it takes to generate the list of
+ possible completions for large projects.
+ </para>
+ <para>
+ The list is specified as a whitespace separated list of filenames
+ relative to the location of the main file.
+ </para>
+ </section>
+ <section id="Tex_RememberCiteSearch">
+ <title>g:Tex_RememberCiteSearch</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>0</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ When this variable is non-zero, then &ls; will try to remember results
+ from the <literal>\cite</literal> completion as described in <link
+ linkend="cite-search-caching">this section</link>.
+ </para>
+ </section>
+ </section>
+ <section id="customizing-compiling">
+ <title>Compiler Customization</title>
+ <para>
+ The following settings affect &ls;'s compilation functionality
+ </para>
+ <section id="Tex_DefaultTargetFormat">
+ <title>g:Tex_DefaultTargetFormat</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>String</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>dvi</literal> for windows/*nix and
+ <literal>pdf</literal> for mac</entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Use this setting to choose the default target format. For example,
+ setting this to <literal>pdf</literal> makes &ls; compile a pdf file
+ when you press <literal>\ll</literal> and fire up the
+ <literal>pdf</literal> viewer on pressing <literal>\lv</literal>. Make
+ sure that a rules for compiling and viewing have been defined for this
+ target format as described <link
+ linkend="Tex_CompileRule_format">here</link> and <link
+ linkend="Tex_ViewRule_format">here</link>.
+ </para>
+ </section>
+ <section id="Tex_CompileRule_format">
+ <title>g:Tex_CompileRule_&lt;format&gt;</title>
+ <para>
+ Here <literal>&lt;format&gt;</literal> refers to the target format for
+ which this rule is defined. &ls; supports compiling into
+ <literal>dvi</literal>, <literal>ps</literal> and <literal>pdf</literal>
+ by default. All these rules are strings defined by default as follows:
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry><literal>g:Tex_CompileRule_dvi</literal></entry>
+ <entry><literal>'latex -interaction=nonstopmode $*'</literal></entry>
+ </row>
+ <row>
+ <entry><literal>g:Tex_CompileRule_ps</literal></entry>
+ <entry><literal>'ps2pdf $*'</literal></entry>
+ </row>
+ <row>
+ <entry><literal>g:Tex_CompileRule_pdf</literal></entry>
+ <entry><literal>'pdflatex -interaction=nonstopmode $*'</literal></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ If you desire forward and inverse searching via &ls;, you will need to
+ change <literal>g:Tex_CompileRule_dvi</literal> to include
+ <literal>-src-specials</literal>. However, this has been known to cause
+ problems with the output file. Therefore, use this with care.
+ </para>
+ </section>
+ <section fd="Tex_FormatDependency_format">
+ <title>g:Tex_FormatDependency_&lt;format&gt;</title>
+ <para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>string</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>''</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ By default, there are no format dependencies defined. Each definition
+ is of the form above where <literal>&lt;format&gt;</literal> is a
+ string such as <literal>'dvi'</literal> etc.
+ </para>
+ <para>
+ The value of each string is a comma separated string such as 'dvi,ps'.
+ See the <link linkend="compiler-dependency">Compiler dependency</link>
+ section to see how to use/specify this setting
+ </para>
+ </section>
+ <section id="Tex_MultipleCompileFormats">
+ <title>g:Tex_MultipleCompileFormats</title>
+ <para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>string</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>'dvi'</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ <para>
+ This is a comma separated string of formats for which the compiler
+ needs to be called multiple times in order to get cross-references,
+ citations etc right. See the <link
+ linkend="compiling-multiple">Compiling multiple times</link> section
+ for details.
+ </para>
+ </section>
+ <section id="Tex_IgnoredWarnings">
+ <title>g:Tex_IgnoredWarnings</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>String</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>a new-line separated list of patterns as described
+ below</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ The default value of this setting is
+ <programlisting>\"Underfull\n".
+\"Overfull\n".
+\"specifier changed to\n".
+\"You have requested\n".
+\"Missing number, treated as zero.\n".
+\"There were undefined references\n"
+\"Citation %.%# undefined"</programlisting>
+ This setting defines a set of patterns which will be filtered out when
+ displaying the output from the latex compiler. This is to aid in
+ filtering out very common warnings/errors.
+ </para>
+ <note>
+ <para>
+ Remember to check the value of <link
+ linkend="Tex_IgnoreLevel"><literal>g:Tex_IgnoreLevel</literal></link>
+ when you change this setting. For example, if you append a new pattern
+ which you would like to ignore by default, increase the value of
+ <literal>g:Tex_IgnoreLevel</literal>.
+ </para>
+ </note>
+ </section>
+ <section id="Tex_IgnoreLevel">
+ <title>g:Tex_IgnoreLevel</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Integer</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>7</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This setting defines a "filter level" or an "ignore level". A value of 7
+ for instance means that any warning/error matching with any of the first
+ 7 fields of <link
+ linkend="Tex_IgnoredWarnings"><literal>g:Tex_IgnoredWarnings</literal></link>
+ will be ignored. Setting this value to zero will mean that no
+ error/warning is ignored. However, even with a value of zero, &ls; will
+ filter out most of the text which a &latex; compiler typically produces.
+ Use
+ <programlisting>TCLevel strict</programlisting>
+ from within &vim; in order to see all the lines from the compiler's
+ output.
+ </para>
+ </section>
+ <section id="Tex_UseMakefile">
+ <title>g:Tex_UseMakefile</title>
+ <para>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ When set to 1, then if a <literal>makefile</literal> or
+ <literal>Makefile</literal> is present in the current directory, then
+ &ls; sets the <literal>makeprg</literal> option to just
+ <literal>"make &lt;target&gt;"</literal>, where
+ <literal>&lt;target&gt;</literal> is the target format chosen using
+ the <literal>TCTarget</literal> or <literal>TTarget</literal>
+ commands.
+ </para>
+ <para>
+ When set to 0, then &ls; will set the <literal>makeprg</literal>
+ setting to whatever is defined by the <link
+ linkend="Tex_CompileRule_format">g:Tex_CompileRule_target</link>
+ setting.
+ </para>
+ </para>
+ </section>
+ <section id="Tex_GotoError">
+ <title>g:Tex_GotoError</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ If set to 1, then pressing <literal>\ll</literal> will take you to
+ the location of the first warning/error, otherwise you will remain in
+ the original location but the errors/warnings will be listed in the
+ preview window.
+ </para>
+ </section>
+ </section>
+ <section id="customizing-viewing">
+ <title>Viewer Customization</title>
+ <para>
+ The following settings affect how &ls; will display compiled files.
+ </para>
+ <section id="Tex_ViewRule_format">
+ <title>g:Tex_ViewRule_&lt;format&gt;</title>
+ <para>
+ Here <literal>&lt;format&gt;</literal> refers to a format such as
+ <literal>dvi</literal>, <literal>ps</literal>, etc. This variable defines
+ the program which will be called to display a file of that format.
+ </para>
+ <para>
+ By default, &ls; defines viewer programs for viewing DVI, PS and PDF
+ formats as follows:
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry></entry>
+ <entry>Windows</entry>
+ <entry>Unix</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>g:Tex_ViewRule_dvi</literal></entry>
+ <entry><literal>'yap -1'</literal></entry>
+ <entry><literal>'xdvi'</literal></entry>
+ </row>
+ <row>
+ <entry><literal>g:Tex_ViewRule_ps</literal></entry>
+ <entry><literal>'gsview32'</literal></entry>
+ <entry><literal>'ghostview'</literal></entry>
+ </row>
+ <row>
+ <entry><literal>g:Tex_ViewRule_pdf</literal></entry>
+ <entry><literal>'AcroRd32'</literal></entry>
+ <entry><literal>'xpdf'</literal></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ For Macintosh systems, these strings are left empty by default. This lets
+ the system pick the program for each format. If you define these variables
+ for Mac, the system choice will be over-ridden.
+ </para>
+ <para>
+ &ls; appends <literal>file.format</literal> to the above settings
+ while calling the external programs. For example, with
+ <programlisting>let g:Tex_ViewRule_dvi = 'yap -1'</programlisting>
+ <literal>yap</literal> is called as
+ <programlisting>!start yap -1 file.dvi</programlisting> from within
+ &vim;. (The initial <literal>start</literal> is used on
+ <literal>Windows</literal> platforms is to make <literal>yap</literal>
+ start as a separate process.) If you find the way &ls; constructs the
+ command line too restrictive, you can use the <link
+ linkend="Tex_ViewRuleComplete_format"><literal>Tex_ViewRuleComplete_format</literal></link>
+ setting for more complete control on how the command line is
+ constructed while calling the external program for viewing.
+ </para>
+ <note>
+ <para>
+ For windows, you will need to set the <literal>$PATH</literal> variable
+ to include the paths to <literal>yap</literal>,
+ <literal>AcroRd32</literal>, <literal>gsview32</literal> and any other
+ programs. See your system documentation for how to do this.
+ </para>
+ </note>
+ <note>
+ <title>Default Viewing Format</title>
+ <para>
+ To change the default format for viewing files, set the <link
+ linkend="Tex_DefaultTargetFormat">g:Tex_DefaultTargetFormat</link>
+ variable.
+ </para>
+ </note>
+ </section>
+ <section id="Tex_ViewRuleComplete_format">
+ <title>Tex_ViewRuleComplete_&lt;format&gt;</title>
+ <para>
+ Here <literal>&lt;format&gt;</literal> refers to the extension of a
+ output format such as <literal>dvi</literal>, <literal>html</literal>
+ etc.
+ </para>
+ <para>
+ <literal>Tex_ViewRuleComplete_format</literal> takes precedence over
+ <literal>Tex_ViewRule_format</literal> if both are specified. By
+ default, &ls; does not define values for
+ <literal>Tex_ViewRuleComplete_format</literal> for any
+ <literal>format</literal>. Unlike in the case of
+ <literal>Tex_ViewRule_format</literal>, &ls; does not modify
+ <literal>Tex_ViewRuleComplete_format</literal> at all in constructing
+ the command line. The only modification is to substitute
+ <literal>'$*'</literal> everywhere in the string with the name of the
+ file being viewed (without the extension).
+ </para>
+ <note>
+ <title>IMPORTANT</title>
+ <para>
+ Make sure you make the process go into the background otherwise vim
+ will wait for the viewer to terminate before letting you edit the file
+ again.
+ </para>
+ <para>
+ To make a process go into the background on a <literal>*nix</literal>
+ platform, use a trailing <literal>&amp;</literal> in the setting. On
+ <literal>Windows</literal>, use <literal>start</literal> at the
+ beginning of the setting. Example: Suppose you have a latex->html
+ converter which converts a file say foo.tex to a file foo/index.html.
+ Then you would use:
+ <programlisting>" On *nix platform
+let g:Tex_ViewRuleComplete_html = 'MozillaFirebird $*/index.html &amp;'
+" On windows platform
+let g:Tex_ViewRuleComplete_html = 'start MozillaFirebird $*/index.html'</programlisting>
+ </para>
+ </note>
+ </section>
+ </section>
+ <section id="customizing-menus">
+ <title>Menu Customization</title>
+ <para>
+ In addition to using the variables defined in this section to affect
+ the menu-layout permanently (i.e, the layout &ls; will start with), you
+ can also use the <literal>TeX-Suite > Configure Menu</literal> menu to
+ dynamically configure the menu layout after &ls; has started.
+ </para>
+ <section id="Tex_Menus">
+ <title>g:Tex_Menus</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ If set to 0, &ls; will suppress showing all menus. Useful if you mostly
+ work in terminals.
+ </para>
+ </section>
+ <section id="Tex_MainMenuLocation">
+ <title><literal>g:Tex_MainMenuLocation</literal></title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>number</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>80</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This setting decides the location of the first top-level &ls;
+ menu. You can for example shift all the menus created by &ls;
+ to the very end by setting this value to a large number like 990.
+ </para>
+ </section>
+ <section id="Tex_MathMenus">
+ <title>g:Tex_MathMenus</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ The <literal>Tex-Math</literal> menu consists of hundreds of mathematical
+ symbols used in &latex;. This menu comprises about 75% of the menus.
+ </para>
+ </section>
+ <section id="Tex_NestElementMenus">
+ <title>g:Tex_NestElementMenus</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This setting controls the "compactness" of the menus. If set to 1, then the
+ Font, Counter and Dimensioning menus are collected together in a single
+ menu called <literal>Tex-Elements</literal>, otherwise, they will each get
+ a separate menu.
+ </para>
+ </section>
+ <section id="Tex_PackagesMenu">
+ <title>g:Tex_PackagesMenu</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Setting this to zero will stop &ls; from automatically creating the
+ <literal>TeX-Suite > Packages > Supported</literal> menu at startup. You
+ can still create the menu after startup by going to
+ <literal>TeX-Suite > Configure Menu</literal>.
+ </para>
+ </section>
+ <section id="Tex_NestPackagesMenu">
+ <title>g:Tex_NestPackagesMenu</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>String</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>'TeX-'</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This string is the prefix added to all the menus created by &ls;. If you
+ define this variable with a dot (<literal>'.'</literal>) as the last
+ character, then all the menus created by &ls; will be nested under a
+ single master menu. For example, set this to
+ <literal>'&amp;LaTeX-Suite.'</literal> to nest all menus under a menu
+ called <literal>&amp;LaTeX-Suite</literal>.
+ </para>
+ </section>
+ <section id="Tex_UseUtfMenus">
+ <title>g:Tex_UseUtfMenus</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>0</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This setting controls whether &ls; uses utf-8 symbols to display some of
+ the mathematical symbols in the <literal>TeX-Math</literal> menu. It is
+ necessary for your system/GUI to support utf-8. Setting this to 1 has the
+ side-effect of setting the <literal>'encoding'</literal> option of &vim;
+ to 'utf-8'.
+ </para>
+ </section>
+ </section>
+ <section id="customizing-folding">
+ <title>Folding Customization</title>
+ <para>
+ The following settings control the <link
+ linkend="latex-folding">folding</link> functionality of &ls;.
+ </para>
+ <section id="Tex_Folding">
+ <title>g:Tex_Folding</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Setting this to zero completely disables &ls;'s folding functionality.
+ However, the <literal>TexFoldTextFunction()</literal> is still available
+ in case you want to use another folding scheme but still want to continue
+ using the fold text function.
+ </para>
+ </section>
+ <section id="Tex_AutoFolding">
+ <title>g:Tex_AutoFolding</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>Boolean</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>1</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This setting controls whether &ls; automatically creates manual folds for
+ a file when it is opened. You can still use the <literal>\rf</literal>
+ mapping to refresh/create folds even when this variable is set to zero.
+ </para>
+ </section>
+ </section>
+ <section id="customizing-packages">
+ <title>Package Handling Customization</title>
+ <para>
+ These settings affect the <link linkend="custom-packages">custom
+ packages</link> functionality in &ls;
+ </para>
+ <section id="Tex_TEXINPUTS">
+ <title>g:Tex_TEXINPUTS</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row><entry>Type</entry><entry>string</entry></row>
+ <row><entry>Default Value</entry>
+ <entry><literal>''</literal></entry></row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ This setting describes the directories scanned by &ls; while searching
+ for custom user packages as described in the <link
+ linkend="custom-packages">custom packages</link> section. Do not
+ include the present directory in this setting. The present directory
+ is always scanned for custom packages.
+ </para>
+ <para>
+ This string should be set in the syntax accepted by &vim;'s native
+ <literal>'path'</literal> setting.
+ </para>
+ </section>
+ </section>
+ </section>
+ <section id="latex-suite-credits">
+ <title>Credits</title>
+ <para>
+ And finally, the credits:
+ </para>
+ <informaltable frame="none">
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>Artur R. Czechowski</entry>
+ <entry>maintains the BSD package of &ls;. Lots of valuable
+ feedback.</entry>
+ </row>
+ <row>
+ <entry>
+ Lubomir Host
+ </entry>
+ <entry>
+ provided the diacritics and also helped in development.
+
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Alexander Wagner
+ </entry>
+ <entry>
+ valuable suggestions during development.
+
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Luc Hermitte
+ </entry>
+ <entry>
+ his variation of Stephen Riehm's bracketing system is used
+ in &ls;.
+
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Gergely Kontra
+ </entry>
+ <entry>
+ the clever little JumpFunc() in imaps.vim is due to him.
+ The implementation of the templates also borrows from
+ mu-template.vim by him.
+
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Dimitri Antoniou
+ </entry>
+ <entry>
+ author of ltags and also provided the nice tip about
+ forward / reverse search on DVI documents.
+
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Stephen Riehm
+ </entry>
+ <entry>
+ the extremely helpful bracketing system is from him.
+
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Alan Schmitt
+ </entry>
+ <entry>
+ provided macros/folding elements. Continued feedback,
+ bug-reports/fixes.
+
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Hari Krishna Dara
+ </entry>
+ <entry>
+ for ExecMap(), the clever little function which makes
+ typing visual mode mappings so much easier and error-free.
+
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Alan G Isac
+ </entry>
+ <entry>
+ for the comprehensive BibT() function for entering bibtex
+ entries.
+
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Gontran Baerts
+ </entry>
+ <entry>
+ for libList.vim
+
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Peter Heslin
+ </entry>
+ <entry>
+ useful discussion and also a lot of bug fixes.
+ the %%fakesection in folding.vim.
+
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Zhang Lin-bo
+ </entry>
+ <entry>
+ lots of very useful additions to folding. The code for customizing
+ the folding scheme is due to him.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ A large number of functions in &ls; come from various other people.
+ Some of those people might have been missed here. Each function should however
+ have the author's name/e-mail above it. Thats the more authoritative place to
+ check out who has done what.
+ </para>
+ <anchor id="latex-suite-maintainer"></anchor>
+ <para>
+ The current maintainer(s) of &ls; is(are)
+ </para>
+ <simplelist>
+ <member>Srinath Avadhanula &lt;srinath@fastmail.fm&gt;</member>
+ <member>Mikolaj Machowski &lt;mikmach@wp.pl&gt;</member>
+ <member>Benji Fisher &lt;benji@member.AMS.org&gt;</member>
+ </simplelist>
+ </section>
+</article>
+
+<!--
+vim: et:sw=1:sts=4
+-->
diff --git a/src/vim-latex/doc/latex-suite.xsl b/src/vim-latex/doc/latex-suite.xsl
new file mode 100644
index 0000000..ca6a51a
--- /dev/null
+++ b/src/vim-latex/doc/latex-suite.xsl
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default">
+
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
+
+ <!-- import common customizations -->
+ <xsl:import href="latex-suite-common.xsl"/>
+
+ <xsl:output method="html"
+ encoding="ISO-8859-1"
+ indent="no"/>
+
+ <!-- insert customization here -->
+
+ <xsl:param name="section.autolabel" select="1"/>
+ <xsl:param name="html.stylesheet" select="'latex-suite.css'"/>
+
+
+</xsl:stylesheet>
diff --git a/src/vim-latex/doc/latexhelp.txt b/src/vim-latex/doc/latexhelp.txt
new file mode 100644
index 0000000..2782424
--- /dev/null
+++ b/src/vim-latex/doc/latexhelp.txt
@@ -0,0 +1,2430 @@
+*latexhelp.txt* For Vim version 6.0. Last change: 2001 Dec 20
+
+
+ LATEX HELP 1.6
+ translated (with minor changes) for vim
+ by Mikolaj Machowski
+
+This file documents LaTeX2e, a document preparation system. LaTeX2e is a
+macro package for TeX.
+
+ This is edition 1.6 of the LaTeX2e documentation, and is for the Texinfo
+that is distributed as part of Version 19 of GNU Emacs. It uses version
+2.134 or later of the texinfo.tex input file.
+
+ This is translated from LATEX.HLP v1.0a in the VMS Help Library. The
+pre-translation version was written by George D. Greenwade of Sam Houston
+State University.
+
+ The LaTeX 2.09 version was written by Stephen Gilmore <stg@dcs.ed.ac.uk>.
+
+ The LaTeX2e version was adapted from this by Torsten Martinsen
+<bullestock@dk-online.dk>.
+
+ Version for vim of this manual was written by Mikolaj Machowski
+<mikmach@wp.pl>
+
+ Copyright 1988,1994 Free Software Foundation, Inc. Copyright 1994-1996
+Torsten Martinsen. Copyright for `translation' for vim Mikolaj Machowski 2001.
+
+ Permission is granted to make and distribute verbatim copies of this manual
+provided the copyright notice and this permission notice are preserved on
+all copies.
+
+ Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the entire
+resulting derived work is distributed under the terms of a permission
+notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions,
+except that the sections entitled "Distribution" and "General Public
+License" may be included in a translation approved by the author instead of
+in the original English.
+
+==============================================================================
+*LaTeX* *latex*
+
+The LaTeX command typesets a file of text using the TeX program and the LaTeX
+Macro package for TeX. To be more specific, it processes an input file
+containing the text of a document with interspersed commands that describe how
+the text should be formatted.
+
+1. Commands |latex-commands|
+2. Counters |latex-counters|
+3. Cross References |latex-references|
+4. Definitions |latex-definitions|
+5. Document Classes |latex-classes|
+6. Layout |latex-layout|
+7. Environments |latex-environments|
+8. Footnotes |latex-footnotes|
+9. Lengths |latex-lengths|
+10. Letters |latex-letters|
+11. Line & Page Breaking |latex-breaking|
+12. Making Paragraphs |latex-paragraphs|
+13. Margin Notes |latex-margin-notes|
+14. Math Formulae |latex-math|
+15. Modes |latex-modes|
+16. Page Styles |latex-page-styles|
+17. Sectioning |latex-sectioning|
+18. Spaces & Boxes |latex-spaces-boxes|
+19. Special Characters |latex-special-char|
+20. Splitting the Input |latex-inputting|
+21. Starting & Ending |latex-start-end|
+22. Table of Contents |latex-toc|
+23. Terminal Input/Output |latex-terminal|
+24. Typefaces |latex-typefaces|
+25. Parameters |latex-parameters|
+
+==============================================================================
+1. Commands *latex-commands*
+
+A LaTeX command begins with the command name, which consists of a \ followed
+by either
+ (a) a string of letters or
+ (b) a single non-letter.
+
+Arguments contained in square brackets, [], are optional while arguments
+contained in braces, {}, are required.
+
+NOTE: LaTeX is case sensitive. Enter all commands in lower case unless
+explicitly directed to do otherwise.
+
+==============================================================================
+2. Counters *latex-counters*
+
+|\addtocounter| Add a quantity to a counter
+|\alph| Print value of a counter using letters
+|\arabic| Print value of a counter using numerals
+|\fnsymbol| Print value of a counter using symbols
+|\newcounter| Define a new counter
+|\refstepcounter| Add to counter, resetting subsidiary counters
+|\roman| Print value of a counter using roman numerals
+|\setcounter| Set the value of a counter
+|\stepcounter| Add to counter, resetting subsidiary counters
+|\usecounter| Use a specified counter in a list environment
+|\value| Use the value of a counter in an expression
+
+Everything LaTeX numbers for you has a counter associated with it. The name of
+the counter is the same as the name of the environment or command that
+produces the number, except with no |\\|. (|lc-enumi| - |lc-enumiv| are used
+for the nested |\enumerate| environment.) Below is a list of the counters
+used in LaTeX's standard document classes to control numbering.
+
+ |part| |paragraph| |figure| |enumi| |itemi|
+ |chapter| |subparagraph| |table| |enumii| |itemii|
+ |section| |page| |footnote| |enumiii| |itemiii|
+ |subsection| |equation| |mpfootnote| |enumiv| |itemiv|
+ |subsubsection|
+
+
+\addtocounter{counter}{value} *\addtocounter*
+ Increments the {counter} by the amount specified by the
+ {value} argument. The {value} argument can be negative.
+
+\alph{counter} *\alph* *\Alph*
+\Alph{counter}
+ This command causes the value of the counter to be printed in
+ alphabetic characters. |\alph| command uses lower case
+ alphabetic alphabetic characters, i.e., a, b, c... while the
+ |\Alph| command uses upper case alphabetic characters, i.e.,
+ A, B, C....
+
+\arabic{counter} *\arabic*
+ Causes the value of the {counter} to be printed in Arabic
+ numbers, i.e., 3.
+
+\fnsymbol{counter} *\fnsymbol*
+ Causes the value of the {counter} to be printed in a specific
+ sequence of nine symbols that can be used for numbering
+ footnotes.
+ Note: counter must have a value between 1 and 9 inclusive.
+
+\newcounter{foo}[counter] *\newcounter*
+ Defines a new counter named {foo}. The counter is initialized
+ to zero. The optional argument [counter] causes the counter
+ {foo} to be reset whenever the counter named in the optional
+ argument is incremented.
+
+\refstepcounter{counter} *\refstepcounter*
+ Command works like |\stepcounter|, except it also defines the
+ current |\ref| value to be the result of \thecounter.
+
+\roman{counter} *\roman* *\Roman*
+\Roman{counter}
+ Causes the value of the {counter} to be printed in Roman
+ numerals. The |\roman| command uses lower case Roman numerals,
+ i.e., i, ii, iii..., while the |\Roman| command uses upper case
+ Roman numerals, i.e., I, II, III....
+
+\stepcounter{counter} *\stepcounter*
+ Adds one to the {counter} and resets all subsidiary counters.
+
+\setcounter{counter}{value} *\setcounter*
+ Sets the value of the {counter} to that specified by the
+ {value} argument.
+
+\usecounter{counter} *\usecounter*
+ Command is used in the second argument of the |list|
+ environment to allow the {counter} specified to be used to
+ number the list items.
+
+\value{counter} *\value*
+ Produces the value of the {counter} named in the mandatory
+ argument. It can be used where LaTeX expects an integer or
+ number, such as the second argument of a |\setcounter| or
+ |\addtocounter| command, or in: >
+ \hspace{\value{foo}\parindent}
+< It is useful for doing arithmetic with counters.
+
+==============================================================================
+3. Cross References *latex-references*
+
+One reason for numbering things like figures and equations is to refer the
+reader to them, as in "See Figure 3 for more details."
+
+|\label| Assign a symbolic name to a piece of text
+|\pageref| Refer to a page number
+|\ref| Refer to a section, figure or similar
+
+
+\label{key} *\label*
+ Command appearing in ordinary text assigns to the {key} the
+ number of the current sectional unit; one appearing inside a
+ numbered environment assigns that number to the {key}.
+
+ A {key} can consist of any sequence of letters, digits, or
+ punctuation characters. Upper and lowercase letters are
+ different.
+
+ To avoid accidentally creating two labels with the same name,
+ it is common to use labels consisting of a prefix and a suffix
+ separated by a colon. The prefixes conventionally used are
+ * 'cha' for chapters
+ * 'sec' for lower-level sectioning commands
+ * 'fig' for figures
+ * 'tab' for tables
+ * 'eq' for equations
+ Thus, a label for a figure would look like: >
+ \label{fig:bandersnatch}
+
+\pageref{key} *\pageref*
+ Command produces the page number of the place in the text
+ where the corresponding |\label| command appears. ie. where
+ \label{key} appears.
+
+\ref{key} *\ref*
+ Command produces the number of the sectional unit, equation
+ number, ... of the corresponding |\label| command.
+
+==============================================================================
+4. Definitions *latex-definitions*
+
+|\newcommand| Define a new command
+|\newenvironment| Define a new environment
+|\newtheorem| Define a new theorem-like environment
+|\newfont| Define a new font name
+
+
+\newcommand{cmd}[args]{definition} *\newcommand* *\renewcommand*
+\newcommand{cmd}[args][default]{definition}
+\renewcommand{cmd}[args]{definition}
+\renewcommand{cmd}[args][default]{definition}
+
+These commands define (or redefine) a command.
+
+{cmd} A command name beginning with a |\\|. For |\newcommand| it must
+ not be already defined and must not begin with |\end|; for
+ |\renewcommand| it must already be defined.
+
+{args} An integer from 1 to 9 denoting the number of arguments of the
+ command being defined. The default is for the command to have
+ no arguments.
+
+{default} If this optional parameter is present, it means that the
+ command's first argument is optional. The default value of the
+ optional argument is default.
+
+{definition} The text to be substituted for every occurrence of {cmd}; a
+ parameter of the form #n in {cmd} is replaced by the text of
+ the nth argument when this substitution takes place.
+
+ *\newenvironment* *\renewenvironment*
+\newenvironment{nam}[args]{begdef}{enddef}
+\newenvironment{nam}[args][default]{begdef}{enddef}
+\renewenvironment{nam}[args]{begdef}{enddef}
+
+These commands define or redefine an environment.
+
+{nam} The name of the environment. For |\newenvironment| there must
+ be no currently defined environment by that name, and the
+ command \nam must be undefined. For |\renewenvironment| the
+ environment must already be defined.
+
+{args} An integer from 1 to 9 denoting the number of arguments of
+ the newly-defined environment. The default is no arguments.
+
+{default} If this is specified, the first argument is optional, and
+ default gives the default value for that argument.
+
+{begdef} The text substituted for every occurrence of \begin{nam}; a
+ parameter of the form #n in {cmd} is replaced by the text of
+ the nth argument when this substitution takes place.
+
+{enddef} The text substituted for every occurrence of \end{nam}. It
+ may not contain any argument parameters.
+
+
+\newtheorem{envname}{caption}[within] *\newtheorem*
+\newtheorem{envname}[numberedlike]{caption}
+
+This command defines a theorem-like environment.
+
+{envname} The name of the environment to be defined. A string of
+ letters. It must not be the name of an existing environment or
+ counter.
+
+{caption} The text printed at the beginning of the environment, right
+ before the number. This may simply say "Theorem", for example.
+
+{within} The name of an already defined counter, usually of a sectional
+ unit. Provides a means of resetting the new theorem counter
+ within the sectional unit.
+
+{numberedlike} The name of an already defined theorem-like environment.
+
+The |\newtheorem| command may have at most one optional argument.
+
+
+\newfont{cmd}{fontname} *\newfont*
+ Defines the command name {cmd}, which must not be currently
+ defined, to be a declaration that selects the font named
+ {fontname} to be the current font.
+
+==============================================================================
+5. Document Classes *latex-classes*
+
+
+\documentclass[options]{class} *\documentclass*
+
+Valid LaTeX document classes include:
+ *article *article-class*
+ *report *report-class*
+ *letter *letter-class*
+ *book *book-class*
+ *slides *slides-class*
+
+All the standard classes (except slides) accept the following options for
+selecting the typeface size (10 pt is default):
+
+10pt, 11pt, 12pt
+
+All classes accept these options for selecting the paper size (default is
+letter):
+
+a4paper, a5paper, b5paper, letterpaper, legalpaper, executivepaper
+
+Miscellaneous options:
+
+landscape *landscape*
+ Selects landscape format. Default is portrait.
+
+titlepage, notitlepage *notitlepage*
+ Selects if there should be a separate title page.
+
+leqno *leqno* *rqno*
+ Equation number on left side of equations. Default is
+ right side.
+
+fleqn *fleqn*
+ Displayed formulas flush left. Default is centred.
+
+openbib *openbib*
+ Use "open" bibliography format.
+
+draft, final *draft* *final*
+ Mark/do not mark overfull boxes with a rule. Default is
+ final.
+
+These options are not available with the slides class:
+
+oneside, twoside *oneside* *twoside*
+ Selects one- or twosided layout. Default is oneside,
+ except for the book class.
+
+openright, openany *openright* *openany*
+ Determines if a chapter should start on a right-hand page.
+ Default is openright for book.
+
+onecolumn, twocolumn *onecolumn* *twocolumn*
+ One or two columns. Defaults to one column.
+
+The slides class offers the option clock for printing the time at the bottom
+of each |\note|.
+
+If you specify more than one option, they must be separated by a comma.
+
+\usepackage[options]{pkg} *\usepackage*
+ Additional packages are loaded by this. If you
+ specify more than one package, they must be separated by a
+ comma.
+
+Any options given in the |\documentclass| command that are unknown by the
+selected document class are passed on to the packages loaded with |\usepackage|.
+
+==============================================================================
+6. Layout *latex-layout*
+
+Miscellaneous commands for controlling the general layout of the page.
+
+|\flushbottom| Make all text pages the same height.
+|\onecolumn| Use one-column layout.
+|\raggedbottom| Allow text pages of differing height.
+|\twocolumn| Use two-column layout.
+
+\flushbottom *\flushbottom*
+ Makes all text pages the same height, adding extra vertical
+ space when necessary to fill out the page. This is the
+ standard if twocolumn mode is selected.
+
+\onecolumn *\onecolumn*
+ Starts a new page and produces single-column output.
+
+\raggedbottom *\raggedbottom*
+ Makes all pages the height of the text on that page. No extra
+ vertical space is added.
+
+\twocolumn[text] *\twocolumn*
+ Starts a new page and produces two-column output. If the
+ optional [text] argument is present, it is typeset in
+ one-column mode.
+
+==============================================================================
+7. Environments *latex-environments*
+
+ *\begin* *\end*
+LaTeX provides a number of different paragraph-making environments. Each
+environment begins and ends in the same manner: >
+
+ \begin{environment-name}
+ .
+ .
+ .
+ \end{environment-name}
+<
+a. |array| Math arrays
+b. |center| Centred lines
+c. |description| Labelled lists
+d. |enumerate| Numbered lists
+e. |eqnarray| Sequences of aligned equations
+f. |equation| Displayed equation
+g. |figure| Floating figures
+h. |flushleft| Flushed left lines
+i. |flushright| Flushed right lines
+j. |itemize| Bulleted lists
+k. |letter| Letters
+l. |list| Generic list environment
+m. |minipage| Miniature page
+n. |picture| Picture with text, arrows, lines and circles
+o. |quotation| Indented environment with paragraph indentation
+p. |quote-l| Indented environment with no paragraph indentation
+q. |tabbing| Align text arbitrarily
+r. |table| Floating tables
+s. |tabular| Align text in columns
+t. |thebibliography| Bibliography or reference list
+u. |theorem| Theorems, lemmas, etc
+v. |titlepage| For hand crafted title pages
+x. |verbatim| Simulating typed input
+y. |verse| For poetry and other things
+
+==============================================================================
+ a. array *array*
+>
+ \begin{array}{col1col2...coln}
+ column 1 entry & column 2 entry ... & column n entry \\
+ .
+ .
+ .
+ \end{array}
+
+Math arrays are produced with the |array| environment. It has a single mandatory
+argument describing the number of columns and the alignment within them. Each
+column, coln, is specified by a single letter that tells how items in that row
+should be formatted.
+ * c -- for centred
+ * l -- for flush left
+ * r -- for flush right
+Column entries must be separated by an |&|. Column entries may include other
+LaTeX commands. Each row of the array must be terminated with the string |\\|.
+
+Note that the |array| environment can only be used in |math-mode|, so normally
+it is used inside an |equation| environment.
+
+==============================================================================
+b. center *center*
+>
+ \begin{center}
+ Text on line 1 \\
+ Text on line 2 \\
+ .
+ .
+ .
+ \end{center}
+
+The |\center| environment allows you to create a paragraph consisting of lines
+that are centred within the left and right margins on the current page. Each
+line must be terminated with the string |\\|.
+
+\centering *\centering*
+ This declaration corresponds to the |center| environment. This
+ declaration can be used inside an environment such as
+ |quote-l| or in a |\parbox|. The text of a |figure| or |table|
+ can be centred on the page by putting a |\centering| command
+ at the beginning of the |figure| or |table| environment.
+ Unlike the |center| environment, the |\centering| command does
+ not start a new paragraph; it simply changes how LaTeX formats
+ paragraph units. To affect a paragraph unit's format, the
+ scope of the declaration must contain the blank line or |\end|
+ command (of an environment like |quote-l|) that ends the
+ paragraph unit.
+
+==============================================================================
+c. description *description*
+>
+ \begin{description}
+ \item [label] First item
+ \item [label] Second item
+ .
+ .
+ .
+ \end{description}
+
+The |description| environment is used to make labelled lists. The label is
+bold face and flushed right.
+
+==============================================================================
+d. enumerate *enumerate*
+>
+ \begin{enumerate}
+ \item First item
+ \item Second item
+ .
+ .
+ .
+ \end{enumerate}
+
+The |enumerate| environment produces a numbered list. Enumerations can be
+nested within one another, up to four levels deep. They can also be nested
+within other paragraph-making environments.
+
+\item Each item of an enumerated list begins with an |\item|
+ command. There must be at least one |\item| command
+ within the environment.
+
+The |enumerate| environment uses the |\enumi| through |\enumiv| counters (see
+section |latex-counters|). The type of numbering can be changed by redefining
+\theenumi etc.
+
+==============================================================================
+e. eqnarray *eqnarray*
+>
+ \begin{eqnarray}
+ math formula 1 \\
+ math formula 2 \\
+ .
+ .
+ .
+ \end{eqnarray}
+
+The |eqnarray| environment is used to display a sequence of equations or
+inequalities. It is very much like a three-column |array| environment, with
+consecutive rows separated by |\\| and consecutive items within a row separated
+by an |&|.
+
+\nonumber *\nonumber*
+ An equation number is placed on every line unless that
+ line has a |\nonumber| command.
+
+\lefteqn *\lefteqn*
+ The command |\lefteqn| is used for splitting long
+ formulas across lines. It typesets its argument in
+ display style flush left in a box of zero width.
+
+==============================================================================
+f. equation *equation*
+>
+ \begin{equation}
+ math formula
+ \end{equation}
+
+The |equation| environment centres your equation on the page and places the
+equation number in the right margin.
+
+==============================================================================
+g. figure *figure*
+>
+ \begin{figure}[placement]
+ body of the figure
+ \caption{figure title}
+ \end{figure}
+
+Figures are objects that are not part of the normal text, and are usually
+"floated" to a convenient place, like the top of a page. Figures will not be
+split between two pages.
+
+The optional argument [placement] determines where LaTeX will try to place
+your figure. There are four places where LaTeX can possibly put a float:
+
+h (Here) at the position in the text where the figure
+ environment appears.
+t (Top) at the top of a text page.
+b (Bottom) at the bottom of a text page.
+p (Page of floats) on a separate float page, which is a page containing
+ no text, only floats.
+
+The standard |report-class| and |article-class| use the default placement
+[tbp].
+
+The body of the |figure| is made up of whatever text, LaTeX commands, etc. you
+wish.
+
+The \caption command allows you to title your figure.
+
+==============================================================================
+h. flushleft *flushleft*
+>
+ \begin{flushleft}
+ Text on line 1 \\
+ Text on line 2 \\
+ .
+ .
+ .
+ \end{flushleft}
+
+The |flushleft| environment allows you to create a paragraph consisting of
+lines that are flushed left, to the left-hand margin. Each line must be
+terminated with the string |\\|.
+
+\raggedright *\raggedright*
+ This declaration corresponds to the |flushleft| environment.
+ This declaration can be used inside an environment such as
+ |quote-l| or in a |\parbox|. Unlike the |flushleft|
+ environment, the |\raggedright| command does not start a new
+ paragraph; it simply changes how LaTeX formats paragraph
+ units. To affect a paragraph unit's format, the scope of the
+ declaration must contain the blank line or |\end| command (of
+ an environment like |quote-l|) that ends the paragraph unit.
+
+==============================================================================
+i. flushright *flushright*
+>
+ \begin{flushright}
+ Text on line 1 \\
+ Text on line 2 \\
+ .
+ .
+ .
+ \end{flushright}
+
+The |flushright| environment allows you to create a paragraph consisting of
+lines that are flushed right, to the right-hand margin. Each line must be
+terminated with the string |\\|.
+
+\raggedleft *\raggedleft*
+ This declaration corresponds to the |flushright| environment.
+ This declaration can be used inside an environment such as
+ |quote-l| or in a |\parbox|. Unlike the |flushright|
+ environment, the |\raggedleft| command does not start a new
+ paragraph; it simply changes how LaTeX formats paragraph
+ units. To affect a paragraph unit's format, the scope of the
+ declaration must contain the blank line or |\end| command (of
+ an environment like |quote-l|) that ends the paragraph unit.
+
+==============================================================================
+j. itemize *itemize*
+>
+ \begin{itemize}
+ \item First item
+ \item Second item
+ .
+ .
+ .
+ \end{itemize}
+
+The |itemize| environment produces a "bulleted" list. Itemizations can be
+nested within one another, up to four levels deep. They can also be nested
+within other paragraph-making environments.
+
+\item *\item*
+ Each item of an itemized list begins with an |\item| command.
+ There must be at least one |\item| command within the
+ environment.
+
+The itemize environment uses the |\itemi| through |\itemiv| counters (see
+section |latex-counters|). The type of numbering can be changed by redefining
+\theitemi etc.
+
+==============================================================================
+k. letter *\letter*
+
+This environment is used for creating letters. See section |latex-letters|.
+
+==============================================================================
+l. list *list*
+
+The |list| environment is a generic environment which is used for defining many
+of the more specific environments. It is seldom used in documents, but often
+in macros.
+>
+ \begin{list}{label}{spacing}
+ \item First item
+ \item Second item
+ .
+ .
+ .
+ \end{list}
+
+'label' The {label} argument specifies how items should be labelled.
+ This argument is a piece of text that is inserted in a box to
+ form the {label}. This argument can and usually does contain
+ other LaTeX commands.
+
+'spacing' The {spacing} argument contains commands to change the spacing
+ parameters for the |list|. This argument will most often be
+ null, i.e., {}. This will select all default spacing which
+ should suffice for most cases.
+
+==============================================================================
+m. minipage *minipage*
+>
+ \begin{minipage}[position]{width}
+ text
+ \end{minipage}
+
+The |minipage| environment is similar to a |\parbox| command. It takes the
+same optional [position] argument and mandatory {width} argument. You may use
+other paragraph-making environments inside a |minipage|. Footnotes in a
+minipage environment are handled in a way that is particularly useful for
+putting footnotes in figures or tables. A |\footnote| or |\footnotetext|
+command puts the footnote at the bottom of the minipage instead of at the
+bottom of the page, and it uses the |\mpfootnote| counter instead of the
+ordinary footnote counter. See sections |latex-counters| and
+|latex-footnotes|.
+
+NOTE: Don't put one |minipage| inside another if you are using footnotes; they
+may wind up at the bottom of the wrong minipage.
+
+==============================================================================
+n. picture *picture*
+>
+ size position
+ \begin{picture}(width,height)(x offset,y offset)
+ .
+ .
+ picture commands
+ .
+ .
+ \end{picture}
+
+The |picture| environment allows you to create just about any kind of picture
+you want containing text, lines, arrows and circles. You tell LaTeX where to
+put things in the picture by specifying their coordinates. A coordinate is a
+number that may have a decimal point and a minus sign -- a number like 5, 2.3
+or -3.1416. A coordinate specifies a length in multiples of the unit length
+|\unitlength|, so if |\unitlength| has been set to 1cm, then the coordinate
+2.54 specifies a length of 2.54 centimetres. You can change the value of
+|\unitlength| anywhere you want, using the |\setlength| command, but strange
+things will happen if you try changing it inside the |picture| environment.
+
+A position is a pair of coordinates, such as (2.4,-5), specifying the point
+with x-coordinate 2.4 and y-coordinate -5. Coordinates are specified in the
+usual way with respect to an origin, which is normally at the lower-left
+corner of the |picture|.
+Note that when a position appears as an argument, it is not enclosed in
+braces; the parentheses serve to delimit the argument.
+
+The |picture| environment has one mandatory argument, which is a position. It
+specifies the size of the picture. The environment produces a rectangular box
+with width and height determined by this argument's x- and y-coordinates.
+
+The |picture| environment also has an optional position argument, following
+the size argument, that can change the origin. (Unlike ordinary optional
+arguments, this argument is not contained in square brackets.) The optional
+argument gives the coordinates of the point at the lower-left corner of the
+picture (thereby determining the origin). For example, if |\unitlength| has
+been set to 1mm, the command: >
+ \begin{picture}(100,200)(10,20)
+>
+produces a picture of width 100 millimetres and height 200 millimetres, whose
+lower-left corner is the point (10,20) and whose upper-right corner is
+therefore the point (110,220). When you first draw a picture, you will omit
+the optional argument, leaving the origin at the lower-left corner. If you
+then want to modify your picture by shifting everything, you just add the
+appropriate optional argument.
+
+The environment's mandatory argument determines the nominal size of the
+picture. This need bear no relation to how large the picture really is; LaTeX
+will happily allow you to put things outside the picture, or even off the
+page. The picture's nominal size is used by LaTeX in determining how much room
+to leave for it.
+
+Everything that appears in a picture is drawn by the |\put| command. The
+command: >
+ \put (11.3,-.3){...}
+
+puts the object specified by ... in the picture, with its
+reference point at coordinates (11.3,-.3). The reference points for various
+objects will be described below.
+
+The |\put| creates an LR box (|lrbox|). You can put anything in the text
+argument of the |\put| that you'd put into the argument of an |\mbox| and
+related commands. When you do this, the reference point will be the lower left
+corner of the box.
+
+Picture commands:
+|\circle| Draw a circle
+|\dashbox| Draw a dashed box
+|\frame| Draw a frame around an object
+|\framebox(picture)| Draw a box with a frame around it
+|\line| Draw a straight line
+|\linethickness| Set the line thickness
+|\makebox(picture)| Draw a box of the specified size
+|\multiput| Draw multiple instances of an object
+|\oval| Draw an ellipse
+|\put| Place an object at a specified place
+|\shortstack| Make a pile of objects
+|\vector| Draw a line with an arrow
+
+\circle[*]{diameter} *\circle*
+ Command produces a circle with a {diameter} as close to the
+ specified one as possible. If the *-form of the command is
+ used, LaTeX draws a solid circle.
+ Note: only circles up to 40 pt can be drawn.
+
+
+\dashbox{dashlength}(width,height){...} *\dashbox*
+ Draws a box with a dashed line. The |\dashbox| has an extra
+ argument which specifies the width of each dash. A dashed box
+ looks best when the width and height are multiples of the
+ {dashlength}.
+
+\frame{...} *\frame*
+ Puts a rectangular frame around the object specified in the
+ argument. The reference point is the bottom left corner of the
+ frame. No extra space is put between the frame and the object.
+
+\framebox(width,height)[position]{...} *\picture-framebox*
+ The |\framebox| command is exactly the same as the
+ |picture-makebox| command, except that it puts a frame around
+ the outside of the box that it creates. The |\framebox|
+ command produces a rule of thickness |\fboxrule|, and leaves a
+ space |\fboxsep| between the rule and the contents of the box.
+
+\line(x slope,y slope){length} *\line*
+ Draws a line of the specified length and slope.
+ Note: LaTeX can only draw lines with slope = x/y, where x and
+ y have integer values from -6 through 6.
+
+\linethickness{dimension} *\linethickness*
+ Declares the thickness of horizontal and vertical lines in a
+ |picture| environment to be dimension, which must be a
+ positive length. It does not affect the thickness of slanted
+ lines (|\line|) and circles (|circle|), or the quarter circles
+ drawn by |\oval| to form the corners of an oval.
+
+\makebox(width,height)[position]{...} *picture-makebox*
+ The makebox command for the |picture| environment is similar
+ to the normal |\makebox| command except that you must specify
+ a width and height in multiples of |\unitlength|.
+ The optional argument, [position], specifies the quadrant that
+ your text appears in. You may select up to two of the
+ following:
+ t - Moves the item to the top of the rectangle
+ b - Moves the item to the bottom
+ l - Moves the item to the left
+ r - Moves the item to the right
+
+ *\multiput*
+\multiput(x coord,y coord)(delta x,delta y){no of copies}{object}
+ This command can be used when you are putting the same
+ object in a regular pattern across a picture.
+
+\oval(width,height)[portion] *\oval*
+ Produces a rectangle with rounded corners. The optional
+ argument, [portion], allows you to select part of the oval.
+ t - top portion
+ b - bottom portion
+ r - right portion
+ l - left portion
+ Note: the "corners" of the oval are made with quarter circles
+ with a maximum radius of 20 pt, so large "ovals" will look
+ more like boxes with rounded corners.
+
+\put(x coord,y coord){ ... } *\put*
+ Places the item specified by the mandatory argument at the
+ given coordinates.
+
+\shortstack[position]{... \\ ... \\ ...} *\shortstack*
+ The |\shortstack| command produces a stack of objects.
+ The valid positions are:
+ r - right of the stack
+ l - left of the stack
+ c - centre of the stack (default)
+
+\vector(x slope,y slope){length} *\vector*
+ Draws a line with an arrow of the specified length and slope.
+ The x and y values must lie between -4 and +4, inclusive.
+
+==============================================================================
+o. quotation *quotation*
+ >
+ \begin{quotation}
+ text
+ \end{quotation}
+
+The margins of the |quotation| environment are indented on the left and the
+right. The text is justified at both margins and there is paragraph
+indentation. Leaving a blank line between text produces a new paragraph.
+
+==============================================================================
+p. quote *quote-l*
+>
+ \begin{quote}
+ text
+ \end{quote}
+
+The margins of the |quote-l| environment are indented on the left and the right.
+The text is justified at both margins. Leaving a blank line between text
+produces a new paragraph.
+
+==============================================================================
+q. tabbing *tabbing*
+>
+ \begin{tabbing}
+ text \= more text \= still more text \= last text \\
+ second row \> \> more \\
+ .
+ .
+ .
+ \end{tabbing}
+
+The |tabbing| environment provides a way to align text in columns. It works by
+setting tab stops and tabbing to them much the way you do with an ordinary
+typewriter.
+
+It is best suited for cases where the width of each column is constant and
+known in advance.
+
+This environment can be broken across pages, unlike the |tabular| environment.
+The following commands can be used inside a tabbing environment:
+
+ *tab=*
+\= Sets a tab stop at the current position.
+
+ *tab>*
+\> Advances to the next tab stop.
+
+ *tab<*
+\< This command allows you to put something to the left of the
+ local margin without changing the margin. Can only be used at
+ the start of the line.
+
+ *tab+*
+\+ Moves the left margin of the next and all the following
+ commands one tab stop to the right.
+
+ *tab-*
+\- Moves the left margin of the next and all the following
+ commands one tab stop to the left.
+
+ *tab'*
+\' Moves everything that you have typed so far in the current
+ column, i.e. everything from the most recent \> (|tab>|), \<
+ (|tab<|), \' (|tab'|), |\\|, or |\kill| command, to the right
+ of the previous column, flush against the current column's tab
+ stop.
+
+ *tab`*
+\` Allows you to put text flush right against any tab stop,
+ including tab stop 0. However, it can't move text to the right
+ of the last column because there's no tab stop there. The \`
+ (|tab`|) command moves all the text that follows it, up to the
+ |\\| or \end{tabbing} command that ends the line, to the right
+ margin of the tabbing environment. There must be no \>
+ (|tab>|) or \' (|tab'|) command between the \` (|tab`|) and
+ the command that ends the line.
+
+ *\kill*
+\kill Sets tab stops without producing text. Works just like |\\|
+ except that it throws away the current line instead of
+ producing output for it. The effect of any \= (|tab=|), \+
+ (|tab+|) or \- (|tab-|) commands in that line remain in
+ effect.
+
+ *\pushtabs*
+\pushtabs Saves all current tab stop positions. Useful for temporarily
+ changing tab stop positions in the middle of a tabbing
+ environment. Also restores the tab stop positions saved by the
+ last |\pushtabs|.
+
+ *taba*
+\a In a tabbing environment, the commands \= (|tab=|), \'
+ (|tab'|) and \` (|tab`|) do not produce accents as normal.
+ Instead, the commands \a=, \a' and \a` are used.
+
+This example typesets a Pascal function in a traditional format:
+>
+ \begin{tabbing}
+ function \= fact(n : integer) : integer;\\
+ \> begin \= \+ \\
+ \> if \= n $>$ 1 then \+ \\
+ fact := n * fact(n-1) \- \\
+ else \+ \\
+ fact := 1; \-\- \\
+ end;\\
+ \end{tabbing}
+
+==============================================================================
+r. table *\table*
+>
+ \begin{table}[placement]
+ body of the table
+ \caption{table title}
+ \end{table}
+
+Tables are objects that are not part of the normal text, and are usually
+"floated" to a convenient place, like the top of a page. Tables will not be
+split between two pages.
+
+The optional argument [placement] determines where LaTeX will try to place
+your table. There are four places where LaTeX can possibly put a float:
+
+ h (Here) at the position in the text where the table
+ environment appears.
+ t (Top) at the top of a text page.
+ b (Bottom) at the bottom of a text page.
+ p (Page of floats) on a separate float page, which is a page
+ containing no text, only floats.
+
+The standard |report-class| and |article-class| use the default placement [tbp].
+
+The body of the table is made up of whatever text, LaTeX commands, etc., you
+wish.
+
+The \caption command allows you to title your table.
+
+==============================================================================
+s. tabular *tabular*
+>
+ \begin{tabular}[pos]{cols}
+ column 1 entry & column 2 entry ... & column n entry \\
+ .
+ .
+ .
+ \end{tabular}
+
+or
+>
+ \begin{tabular*}{width}[pos]{cols}
+ column 1 entry & column 2 entry ... & column n entry \\
+ .
+ .
+ .
+ \end{tabular*}
+
+These environments produce a box consisting of a sequence of rows of items,
+aligned vertically in columns. The mandatory and optional arguments consist
+of:
+
+{width} Specifies the width of the tabular* environment. There must be
+ rubber space between columns that can stretch to fill out the
+ specified width.
+
+[pos] Specifies the vertical position; default is alignment on the
+ centre of the environment.
+ t - align on top row
+ b - align on bottom row
+
+{cols} Specifies the column formatting. It consists of a sequence of
+ the following specifiers, corresponding to the sequence of
+ columns and intercolumn material.
+ l - A column of left-aligned items.
+
+ r - A column of right-aligned items.
+
+ c - A column of centred items.
+
+ | - A vertical line the full height and depth of the
+ environment.
+
+ @{text} - This inserts text in every row. An @-expression
+ suppresses the intercolumn space normally inserted
+ between columns; any desired space between the
+ inserted text and the adjacent items must be included
+ in text. An \extracolsep{wd} command in an
+ @-expression causes an extra space of width {wd} to
+ appear to the left of all subsequent columns, until
+ countermanded by another |\extracolsep| command. Unlike
+ ordinary intercolumn space, this extra space is not
+ suppressed by an @-expression. An |\extracolsep|
+ command can be used only in an @-expression in the
+ cols argument.
+
+ p{wd} - Produces a column with each item typeset in a |\parbox|
+ of width {wd}, as if it were the argument of a
+ \parbox[t]{wd} command. However, a |\\| may not appear
+ in the item, except in the following situations:
+ 1. inside an environment like |minipage|, |array|, or
+ |tabular|.
+ 2. inside an explicit |\parbox|.
+ 3. in the scope of a |\centering|, |\raggedright|, or
+ |\raggedleft| declaration. The latter declarations must
+ appear inside braces or an environment when used in a
+ p-column element.
+
+ {num}{cols} - Equivalent to num copies of cols, where num is any positive
+ integer and cols is any list of column-specifiers,
+ which may contain another -expression.
+
+These commands can be used inside a tabular environment:
+
+|\cline| Draw a horizontal line spanning some columns.
+|\hline| Draw a * horizontal line spanning all columns.
+|\multicolumn| Make an item spanning * several columns.
+|\vline| Draw a vertical line.
+
+
+\cline{i-j} *\cline*
+ The |\cline| command draws horizontal lines across the columns
+ specified, beginning in column i and ending in column j,
+ which are identified in the mandatory argument.
+
+\hline *\hline*
+ The |\hline| command will draw a horizontal line the width of
+ the table. It's most commonly used to draw a line at the top,
+ bottom, and between the rows of the table.
+
+\multicolumn{cols}{pos}{text} *\multicolumn*
+ The |\multicolumn| is used to make an entry that spans several
+ columns. The first mandatory argument, {cols}, specifies the
+ number of columns to span. The second mandatory argument,
+ {pos}, specifies the formatting of the entry:
+ c - centered
+ l - flushleft
+ r - flushright.
+ The third mandatory argument, {text}, specifies what text is
+ to make up the entry.
+
+\vline *\vline*
+ The |\vline| command will draw a vertical line extending the
+ full height and depth of its row. An |\hfill| command can be
+ used to move the line to the edge of the column. It can also
+ be used in an @-expression.
+
+==============================================================================
+t. thebibliography *\thebibliography*
+>
+ \begin{thebibliography}{widestlabel}
+ \bibitem[label]{cite_key}
+ .
+ .
+ .
+ \end{thebibliography}
+
+The |\thebibliography| environment produces a bibliography or reference list.
+
+In the |article-class|, this reference list is labelled "References"; in the
+|report-class|, it is labelled "Bibliography".
+
+{widestlabel} Text that, when printed, is approximately as wide as the
+ widest item label produces by the |\bibitem| commands.
+
+|\bibitem| Specify a bibliography item.
+|\cite| Refer to a bibliography item.
+|\nocite| Include an item in the bibliography.
+|BibTeX| Automatic generation of bibliographies.
+
+\bibitem *\bibitem*
+\bibitem[label]{citekey}
+ The |\bibitem| command generates an entry labelled by [label].
+ If the [label] argument is missing, a number is generated as
+ the label, using the |\enumi| counter. The {citekey} is any
+ sequence of letters, numbers, and punctuation symbols not
+ containing a comma. This command writes an entry on the `.aux'
+ file containing {citekey} and the item's label. When this
+ `.aux' file is read by the \begin{document} command, the
+ item's label is associated with {citekey}, causing the
+ reference to {citekey} by a |\cite| command to produce the
+ associated label.
+
+\cite *\cite*
+\cite[text]{keylist}
+ The {keylist} argument is a list of citation keys. This
+ command generates an in-text citation to the references
+ associated with the keys in {keylist} by entries on the `.aux'
+ file read by the \begin{document} command.
+ The optional text argument will appear after the
+ citation, i.e.: >
+ \cite[p.2]{knuth}
+< might produce `[Knuth, p. 2]'.
+
+\nocite *\nocite*
+\nocite{keylist}
+ The |\nocite| command produces no text, but writes
+ {keylist}, which is a list of one or more citation
+ keys, on the `.aux' file.
+
+BibTeX *BibTeX* *bibtex*
+ *\bibliographystyle*
+If you use the BibTeX program by Oren Patashnik (highly recommended if you
+need a bibliography of more than a couple of titles) to maintain your
+bibliography, you don't use the |thebibliography| environment. Instead, you
+include the lines:
+>
+ \bibliographystyle{style}
+ \bibliography{bibfile}
+
+where {style} refers to a file style.bst, which defines how your citations
+will look. The standard styles distributed with BibTeX are:
+
+{alpha} Sorted alphabetically. Labels are formed from name of author and year
+ of publication.
+{plain} Sorted alphabetically. Labels are numeric.
+{unsrt} Like plain, but entries are in order of citation.
+{abbrv} Like plain, but more compact labels.
+
+In addition, numerous other BibTeX style files exist tailored to the demands
+of various publications.
+
+ *\bibliography*
+The argument to |\bibliography| refers to the file bibfile.bib, which should
+contain your database in BibTeX format. Only the entries referred to via
+|\cite| and |\nocite| will be listed in the bibliography.
+
+==============================================================================
+u. theorem *theorem*
+>
+ \begin{theorem}
+ theorem text
+ \end{theorem}
+
+The |theorem| environment produces "Theorem x" in boldface followed by your
+theorem text.
+
+==============================================================================
+v. titlepage *titlepage*
+>
+ \begin{titlepage}
+ text
+ \end{titlepage}
+
+The |titlepage| environment creates a title page, i.e. a page with no printed
+page number or heading. It also causes the following page to be numbered page
+one. Formatting the title page is left to you. The |\today| command comes in
+handy for title pages.
+
+Note that you can use the |\maketitle| to produce a standard title page.
+
+==============================================================================
+x. verbatim *verbatim*
+>
+ \begin{verbatim}
+ text
+ \end{verbatim}
+
+The |verbatim| environment is a paragraph-making environment that gets LaTeX
+to print exactly what you type in. It turns LaTeX into a typewriter with
+carriage returns and blanks having the same effect that they would on a
+typewriter.
+
+\verb *\verb*
+\verb char literal_text char
+\verb*char literal_text char
+ Typesets literal_text exactly as typed, including
+ special characters and spaces, using a typewriter |\tt|
+ type style. There may be no space between |\verb| or
+ |\verb|* and char (space is shown here only for
+ clarity). The *-form differs only in that spaces are
+ printed as `\verb*| |\'.
+
+==============================================================================
+y. verse *verse*
+>
+ \begin{verse}
+ text
+ \end{verse}
+
+The |verse| environment is designed for poetry, though you may find other uses
+for it.
+
+The margins are indented on the left and the right. Separate the lines of each
+stanza with |\\|, and use one or more blank lines to separate the stanzas.
+
+==============================================================================
+8. Footnotes *latex-footnotes*
+
+Footnotes can be produced in one of two ways. They can be produced with one
+command, the |\footnote| command. They can also be produced with two commands,
+the |\footnotemark| and the |\footnotetext| commands. See the specific command for
+information on why you would use one over the other.
+
+|\footnote| Insert a footnote
+|\footnotemark| Insert footnote mark only
+|\footnotetext| Insert footnote text only
+
+\footnote[number]{text} *\footnote*
+ Command places the numbered footnote text at the bottom of the
+ current page. The optional argument, number, is used to change
+ the default footnote number. This command can only be used in
+ outer paragraph mode; i.e., you cannot use it in sectioning
+ commands like |\chapter|, in |\figure|, |\table| or in a
+ |\tabular| environment.
+
+\footnotemark *\footnotemark*
+ Command puts the footnote number in the text. This command can
+ be used in inner paragraph mode. The text of the footnote is
+ supplied by the |\footnotetext| command.
+ This command can be used to produce several consecutive
+ footnote markers referring to the same footnote by using
+>
+ \footnotemark[\value{footnote}]
+<
+ after the first |\footnote| command.
+
+\footnotetext[number]{text} *\footnotetext*
+ Command produces the text to be placed at the bottom of the
+ page. This command can come anywhere after the |\footnotemark|
+ command. The |\footnotetext| command must appear in outer
+ paragraph mode. The optional argument, number, is used to
+ change the default footnote number.
+
+==============================================================================
+9. Lengths *latex-lengths*
+
+A length is a measure of distance. Many LaTeX commands take a length as an
+argument.
+
+|\newlength| Define a new length.
+|\setlength| Set the value of a length.
+|\addtolength| Add a quantity to a length.
+|\settodepth| Set a length to the depth of something.
+|\settoheight| Set a length to the height of something.
+|\settowidth| Set a length to the width of something.
+|pre-lengths| Lengths that are, like, predefined.
+
+\newlength{\gnat} *\newlength*
+ The |\newlength| command defines the mandatory argument, \gnat,
+ as a length command with a value of 0in. An error occurs if a
+ \gnat command already exists.
+
+\setlength{\gnat}{length} *\setlength*
+ The |\setlength| command is used to set the value of a \gnat
+ command. The {length} argument can be expressed in any terms
+ of length LaTeX understands, i.e., inches (in), millimetres
+ (mm), points (pt), etc.
+
+\addtolength{\gnat}{length} *\addtolength*
+ The |\addtolength| command increments a \gnat by the amount
+ specified in the {length} argument. It can be a negative
+ amount.
+
+\settodepth{\gnat}{text} *\settodepth*
+ The |\settodepth| command sets the value of a \gnat command
+ equal to the depth of the {text} argument.
+
+\settoheight{\gnat}{text} *\settoheight*
+ The |\settoheight| command sets the value of a \gnat command
+ equal to the height of the {text} argument.
+
+\settowidth{\gnat}{text} *\settowidth*
+ The |\settowidth| command sets the value of a \gnat command
+ equal to the width of the {text} argument.
+
+Predefined lengths *pre-lengths*
+
+\width *\width*
+\height *\height*
+\depth *\depth*
+\totalheight *\totalheight*
+ These length parameters can be used in the arguments of the
+ box-making commands See section Spaces & Boxes. They specify
+ the natural width etc. of the text in the box.
+ \totalheight equals \height + \depth.
+ To make a box with the text stretched to double the natural
+ size, e.g., say: >
+ \makebox[2\width]{Get a stretcher}
+
+==============================================================================
+10. Letters *latex-letters*
+
+You can use LaTeX to typeset letters, both personal and business. The letter
+document class is designed to make a number of letters at once, although you
+can make just one if you so desire.
+
+Your `.tex' source file has the same minimum commands as the other document
+classes, i.e., you must have the following commands as a minimum: >
+ \documentclass{letter}
+ \begin{document}
+ ...
+ letters
+ ...
+ \end{document}
+
+Each letter is a letter environment, whose argument is the name and address of
+the recipient. For example, you might have: >
+ \begin{letter}
+ {Mr. Joe Smith\\
+ 2345 Princess St. \\
+ Edinburgh, EH1 1AA}
+ ...
+ \end{letter}
+
+The letter itself begins with the |\opening| command. The text of the letter
+follows. It is typed as ordinary LaTeX input. Commands that make no sense in
+a letter, like |\chapter|, do not work. The letter closes with a |\closing|
+command.
+
+After the closing, you can have additional material. The |\cc| command produces
+the usual "cc: ...". There's also a similar |\encl| command for a list of
+enclosures. With both these commands, use|\\| to separate the items.
+
+These commands are used with the letter class:
+|\address| Your return address.
+|\cc| Cc list. closing Saying goodbye.
+|\encl| List of enclosed material.
+|\location| Your organisation's address.
+|\makelabels| Making address labels.
+|\name| Your name, for the return address.
+|\opening| Saying hello.
+|\ps| Adding a postscript.
+|\signature| Your signature.
+|\startbreaks| Allow page breaks.
+|\stopbreaks| Disallow page breaks.
+|\telephone| Your phone number.
+
+\address{Return address} *\address*
+ The return address, as it should appear on the letter and the
+ envelope. Separate lines of the address should be separated
+ by |\\| commands. If you do not make an |\address| declaration,
+ then the letter will be formatted for copying onto your
+ organisation's standard letterhead. (See section Overview of
+ LaTeX and Local Guide, for details on your local
+ implementation). If you give an |\address| declaration, then
+ the letter will be formatted as a personal letter.
+
+\cc{Kate Schechter\\Rob McKenna} *\cc*
+ Generate a list of other persons the letter was sent to. Each
+ name is printed on a separate line.
+
+\closing{text} *\closing*
+ The letter closes with a |\closing| command, i.e., >
+ \closing{Best Regards,} \encl{CV\\Certificates}
+< Generate a list of enclosed material.
+
+\location{address} *\location*
+ This modifies your organisation's standard address. This only
+ appears if the firstpage pagestyle is selected.
+
+\makelabels{number} *\makelabels*
+ If you issue this command in the preamble, LaTeX will create a
+ sheet of address labels. This sheet will be output before the
+ letters.
+
+\name{June Davenport} *\name*
+ Your name, used for printing on the envelope together with the
+ return address.
+
+\opening{text} *\opening*
+ The letter begins with the |\opening| command. The mandatory
+ argument, text, is whatever text you wish to start your
+ letter, i.e., >
+ \opening{Dear Joe,}
+
+\ps *\ps*
+ Use this command before a postscript.
+
+\signature{Harvey Swick} *\signature*
+ Your name, as it should appear at the end of the letter
+ underneath the space for your signature. Items that should go
+ on separate lines should be separated by |\\| commands.
+
+\startbreaks *\startbreaks*
+ Used after a |\stopbreaks| command to allow page breaks again.
+
+\stopbreaks *\stopbreaks*
+ Inhibit page breaks until a |\startbreaks| command occurs.
+
+\telephone{number} *\telephone*
+ This is your telephone number. This only appears if the
+ firstpage pagestyle is selected.
+
+==============================================================================
+11. Line & Page Breaking *latex-breaking*
+
+The first thing LaTeX does when processing ordinary text is to translate your
+input file into a string of glyphs and spaces. To produce a printed document,
+this string must be broken into lines, and these lines must be broken into
+pages. In some environments, you do the line breaking yourself with the |\\|
+command, but LaTeX usually does it for you.
+
+|\\| Start a new line
+|hyph-| Insert explicit hyphenation
+|\cleardoublepage| Start a new right-hand page
+|\clearpage| Start a new page
+|\enlargethispage| Enlarge the current page a bit
+|\fussy| Be fussy about line breaking
+|\hyphenation| Tell LaTeX how to hyphenate a word
+|\linebreak| Break the line
+|\newline| Break the line prematurely
+|\newpage| Start a new page
+|\nolinebreak| Don't break the current line
+|\nopagebreak| Don't make a page break here
+|\pagebreak| Please make a page break here
+|\sloppy| Be sloppy about line breaking
+
+\\[*][extraspace] *\\* *\\\\*
+ The |\\| command tells LaTeX to start a new line. It has an
+ optional argument, [extraspace], that specifies how much extra
+ vertical space is to be inserted before the next line. This
+ can be a negative amount.
+ The \\* command is the same as the ordinary |\\| command
+ except that it tells LaTeX not to start a new page after the
+ line.
+
+\- *hyph-*
+ The \- command tells LaTeX that it may hyphenate the word at
+ that point. LaTeX is very good at hyphenating, and it will
+ usually find all correct hyphenation points. The \- command is
+ used for the exceptional cases.
+ Note: when you insert \- commands in a word, the word will
+ only be hyphenated at those points and not at any of the
+ hyphenation points that LaTeX might otherwise have chosen.
+
+\cleardoublepage *\cleardoublepage*
+ The |\cleardoublepage| command ends the current page and causes
+ all figures and tables that have so far appeared in the input
+ to be printed. In a two-sided printing style (|twoside|), it
+ also makes the next page a right-hand (odd-numbered) page,
+ producing a blank page if necessary.
+
+\clearpage *\clearpage*
+ The |\clearpage| command ends the current page and causes all
+ figures and tables that have so far appeared in the input to
+ be printed.
+
+\enlargethispage{size} *\enlargethispage*
+\enlargethispage*{size}
+ Enlarge the textheight for the current page by the
+ specified amount; e.g.: >
+
+ \enlargethispage{\baselineskip}
+<
+ will allow one additional line. The starred form
+ tries to squeeze the material together on the page as
+ much as possible. This is normally used together with
+ an explicit |\pagebreak|.
+
+\fussy *\fussy*
+ This declaration (which is the default) makes TeX more fussy
+ about line breaking. This can avoids too much space between
+ words, but may produce overfull boxes. This command cancels
+ the effect of a previous |\sloppy| command.
+
+\hyphenation{words} *\hyphenation*
+ The |\hyphenation| command declares allowed hyphenation points,
+ where words is a list of words, separated by spaces, in which
+ each hyphenation point is indicated by a - character.
+
+\linebreak[number] *\linebreak*
+ The |\linebreak| command tells LaTeX to break the current line
+ at the point of the command. With the optional argument,
+ number, you can convert the |\linebreak| command from a demand
+ to a request. The [number] must be a number from 0 to 4. The
+ higher the number, the more insistent the request is. The
+ |\linebreak| command causes LaTeX to stretch the line so it
+ extends to the right margin.
+
+\newline *\newline*
+ The |\newline| command breaks the line right where it is. It
+ can only be used in paragraph mode.
+
+\newpage *\newpage*
+ The |\newpage| command ends the current page.
+
+\nolinebreak[number] *\nolinebreak*
+ The |\nolinebreak| command prevents LaTeX from breaking the
+ current line at the point of the command. With the optional
+ argument, [number], you can convert the |\nolinebreak| command
+ from a demand to a request. The [number] must be a number from 0
+ to 4. The higher the number, the more insistent the request
+ is.
+
+\nopagebreak[number] *\nopagebreak*
+ The |\nopagebreak| command prevents LaTeX from breaking the
+ current page at the point of the command. With the optional
+ argument, [number], you can convert the |\nopagebreak| command
+ from a demand to a request. The [number] must be a number from
+ 0 to 4. The higher the number, the more insistent the request
+ is.
+
+\pagebreak[number] *\pagebreak*
+ The |\pagebreak| command tells LaTeX to break the current page
+ at the point of the command. With the optional argument,
+ [number], you can convert the |\pagebreak| command from a
+ demand to a request. The [number] must be a number from 0 to
+ 4. The higher the number, the more insistent the request is.
+
+\sloppy *\sloppy*
+ This declaration makes TeX less fussy about line breaking.
+ This can prevent overfull boxes, but may leave too much space
+ between words.
+ Lasts until a |\fussy| command is issued.
+
+==============================================================================
+12. Making Paragraphs *latex-paragraphs*
+
+A paragraph is ended by one or more completely blank lines -- lines not
+containing even a |\%|. A blank line should not appear where a new paragraph
+cannot be started, such as in math mode or in the argument of a sectioning
+command.
+
+|\indent| Indent this paragraph.
+|\noindent| Do not indent this paragraph.
+|\par| Another way of writing a blank line.
+
+\indent *\indent*
+ This produces a horizontal space whose width equals the width
+ of the paragraph indentation. It is used to add paragraph
+ indentation where it would otherwise be suppressed.
+
+\noindent *\noindent*
+ When used at the beginning of the paragraph, it suppresses the
+ paragraph indentation. It has no effect when used in the
+ middle of a paragraph.
+
+\par *\par*
+ Equivalent to a blank line; often used to make command or
+ environment definitions easier to read.
+
+==============================================================================
+13. Margin Notes *latex-margin-notes*
+
+\marginpar[left]{right} *\marginpar*
+ This command creates a note in the margin. The first line will
+ be at the same height as the line in the text where the
+ |\marginpar| occurs.
+
+ When you only specify the mandatory argument {right}, the text
+ will be placed:
+ * in the right margin for one-sided layout
+ * in the outside margin for two-sided layout (|twoside|)
+ * in the nearest margin for two-column layout (|twocolumn|)
+
+\reversemarginpar *\reversemarginpar*
+ By issuing the command |\reversemarginpar|, you can force the
+ marginal notes to go into the opposite (inside) margin.
+
+When you specify both arguments, left is used for the left margin, and right
+is used for the right margin.
+
+The first word will normally not be hyphenated; you can enable hyphenation by
+prefixing the first word with a \hspace{0pt} command (|hspace|).
+
+==============================================================================
+14. Math Formulae *latex-math*
+ *displaymath*
+There are three environments (|latex-environments|) that put LaTeX in math
+mode:
+|math| For Formulae that appear right in the text.
+|displaymath| For Formulae that appear on their own line.
+|equation| The same as the displaymath environment except that it adds an
+ equation number in the right margin.
+
+The |math| environment can be used in both paragraph and LR mode, but the
+|displaymath| and |equation| environments can be used only in paragraph mode. The
+|math| and |displaymath| environments are used so often that they have the
+following short forms:
+ \(...\) instead of \begin{math}...\end{math}
+ \[...\] instead of \begin{displaymath}...\end{displaymath}
+
+In fact, the math environment is so common that it has an even shorter form:
+ $ ... $ instead of \(...\)
+
+|sub-sup| Also known as exponent or index.
+|math-symbols| Various mathematical squiggles.
+|math-spacing| Thick, medium, thin and negative spaces.
+|math-misc| Stuff that doesn't fit anywhere else.
+
+==========
+Subscripts & Superscripts *sub-sup*
+ *subscripts* *superscripts*
+
+To get an expression exp to appear as a subscript, you just type _{exp}. To
+get exp to appear as a superscript, you type ^{exp}. LaTeX handles
+superscripted superscripts and all of that stuff in the natural way. It even
+does the right thing when something has both a subscript and a superscript.
+
+==========
+Math Symbols *math-symbols*
+
+LaTeX provides almost any mathematical symbol you're likely to need. The
+commands for generating them can be used only in math mode. For example, if
+you include >
+ $\pi$
+in your source, you will get the symbol in your output.
+
+==========
+Spacing in Math Mode *math-spacing*
+
+In a math environment, LaTeX ignores the spaces you type and puts in the
+spacing that it thinks is best. LaTeX formats mathematics the way it's done in
+mathematics texts. If you want different spacing, LaTeX provides the following
+four commands for use in math mode:
+ \; - a thick space *math;*
+ \: - a medium space *math:*
+ \, - a thin space *math,*
+ \! - a negative thin space *matn!*
+
+==========
+Math Miscellany *math-misc*
+
+\cdots *\cdots*
+ Produces a horizontal ellipsis where the dots are raised to
+ the centre of the line.
+\ddots *\ddots*
+ Produces a diagonal ellipsis.
+\frac{num}{den} *\frac*
+ Produces the fraction num divided by den.
+\ldots *\ldots*
+ Produces an ellipsis. This command works in any mode, not just
+ math mode.
+\overbrace{text} *\overbrace*
+ Generates a brace over text.
+\overline{text} *\overline*
+ Causes the argument text to be overlined.
+\sqrt[root]{arg} *\sqrt*
+ Produces the square root of its argument. The optional
+ argument, [root], determines what root to produce, i.e., the
+ cube root of x+y would be typed as: >
+ $\sqrt[3]{x+y}$.
+\underbrace{text} *\underbrace*
+ Generates text with a brace underneath.
+\underline{text} *\underline*
+ Causes the argument text to be underlined. This command can
+ also be used in paragraph and LR mode.
+\vdots *\vdots*
+ Produces a vertical ellipsis.
+
+==============================================================================
+15. Modes *latex-modes*
+
+When LaTeX is processing your input text, it is always in one of three modes:
+ Paragraph mode *paragraph-mode*
+ Math mode *math-mode*
+ Left-to-right mode, called LR mode for short. *lr-mode*
+
+LaTeX changes mode only when it goes up or down a staircase to a different
+level, though not all level changes produce mode changes. Mode changes occur
+only when entering or leaving an environment, or when LaTeX is processing the
+argument of certain text-producing commands.
+
+|paragraph-mode| is the most common; it's the one LaTeX is in when processing
+ordinary text. In that mode, LaTeX breaks your text into lines and breaks the
+lines into pages. LaTeX is in |math-mode| when it's generating a mathematical
+formula. In |lr-mode|, as in |paragraph-mode|, LaTeX considers the output that
+it produces to be a string of words with spaces between them. However, unlike
+|paragraph-mode|, LaTeX keeps going from left to right; it never starts a new
+line in |lr-mode|. Even if you put a hundred words into an |\mbox|, LaTeX would
+keep typesetting them from left to right inside a single box, and then
+complain because the resulting box was too wide to fit on the line.
+
+LaTeX is in |lr-mode| when it starts making a box with an |\mbox| command. You
+can get it to enter a different mode inside the box - for example, you can
+make it enter |math-mode| to put a formula in the box. There are also several
+text-producing commands and environments for making a box that put LaTeX in
+|paragraph-mode|. The box make by one of these commands or environments will be
+called a |\parbox|. When LaTeX is in |paragraph-mode| while making a box, it is
+said to be in "inner paragraph mode". Its normal |paragraph-mode|, which it
+starts out in, is called "outer paragraph mode".
+
+==============================================================================
+16. Page Styles *latex-page-styles*
+
+The |\documentclass| command determines the size and position of the page's head
+and foot. The page style determines what goes in them.
+
+|\maketitle| Generate a title page.
+|\pagenumbering| Set the style used for page numbers.
+|\pagestyle| Change the headings/footings style.
+|\thispagestyle| Change the headings/footings style for this page.
+
+\maketitle *\maketitle*
+ The |\maketitle| command generates a title on a separate title
+ page - except in the |\article| class, where the title normally
+ goes at the top of the first page. Information used to
+ produce the title is obtained from the following declarations:
+
+ |\author| Who wrote this stuff?
+ |\date| The date the document was created.
+ |\thanks| A special form of footnote.
+ |\title| How to set the document title.
+
+ \author{names} *\author* *\and*
+ The |\author| command declares the author(s), where
+ names is a list of authors separated by \and commands.
+ Use |\\| to separate lines within a single author's
+ entry -- for example, to give the author's institution
+ or address.
+
+ \date{text} *\date*
+ The |\date| command declares text to be the document's
+ date. With no |\date| command, the current date is
+ used.
+
+ \thanks{text} *\thanks*
+ The |\thanks| command produces a |\footnote| to the
+ title.
+
+ \title{text} *\title*
+ The |\title| command declares text to be the title. Use
+ |\\| to tell LaTeX where to start a new line in a long
+ title.
+
+\pagenumbering{numstyle} *\pagenumbering*
+ Specifies the style of page numbers. Possible values of
+ 'numstyle' are:
+ arabic - Arabic numerals *arabic*
+ roman - Lowercase Roman numerals *roman*
+ Roman - Uppercase Roman numerals *Roman*
+ alph - Lowercase letters *alph*
+ Alph - Uppercase letters *Alph*
+
+\pagestyle{option} *\pagestyle*
+ *plain* *empty* *headings*
+ The |\pagestyle| command changes the style from the current
+ page on throughout the remainder of your document.
+ The valid options are:
+ plain - Just a plain page number.
+ empty - Produces empty heads and feet no page numbers.
+ headings - Puts running headings on each page. The document
+ style specifies what goes in the headings.
+ myheadings - You specify what is to go in the heading with the
+ |\markboth| or the |\markright| commands.
+
+ |\markboth| Set left and right headings.
+ |\markright| Set right heading only.
+
+ \markboth{left head}{right head} *\markboth*
+ The |\markboth| command is used in conjunction with the
+ page style myheadings for setting both the left and
+ the right heading.
+ Note that a "left-hand heading" is generated by the
+ last |\markboth| command before the end of the page,
+ while a "right-hand heading" is generated by the first
+ |\markboth| or |\markright| that comes on the page if
+ there is one, otherwise by the last one before the
+ page.
+
+
+ \markright{right head} *\markright*
+ The |\markright| command is used in conjunction with
+ the page style |\myheadings| for setting the right
+ heading, leaving the left heading unchanged.
+ Note that a "left-hand heading" is generated by the
+ last |\markboth| command before the end of the page,
+ while a "right-hand heading" is generated by the first
+ |\markboth| or |\markright| that comes on the page if
+ there is one, otherwise by the last one before the
+ page.
+
+\thispagestyle{option} *\thispagestyle*
+ The |\thispagestyle| command works in the same manner as the
+ |\pagestyle| command except that it changes the style for the
+ current page only.
+
+==============================================================================
+17. Sectioning *latex-sectioning*
+
+Sectioning commands provide the means to structure your text into units.
+|\part|
+|\chapter| (report and book class only)
+|\section|
+|\subsection|
+|\subsubsection|
+|\paragraph|
+|\subparagraph|
+
+All sectioning commands take the same general form, i.e.,
+
+ *\part*
+ *\chapter* (report and book class only)
+ *\section* *\subsection* *\subsubsection*
+ *\paragraph* *\subparagraph*
+\chapter[optional]{title}
+ In addition to providing the heading in the text, the
+ mandatory argument of the sectioning command can appear in two
+ other places:
+ 1. The table of contents
+ 2. The running head at the top of the page. You may not want
+ the same thing to appear in these other two places as
+ appears in the text heading. To handle this situation, the
+ sectioning commands have an optional argument that provides
+ the text for these other two purposes.
+
+All sectioning commands have *\-forms that print a title, but do not include a
+number and do not make an entry in the table of contents.
+
+\appendix *\appendix*
+ The |\appendix| command changes the way sectional units are
+ numbered. The |\appendix| command generates no text and does
+ not affect the numbering of parts. The normal use of this
+ command is something like: >
+ \chapter{The First Chapter}
+ ...
+ \appendix \chapter{The First Appendix}
+
+
+==============================================================================
+18. Spaces & Boxes *latex-spaces-boxes*
+
+All the predefined length parameters See section Predefined lengths can be
+used in the arguments of the box-making commands.
+
+ Horizontal space:
+
+|\dotfill| Stretchable horizontal dots.
+|\hfill| Stretchable horizontal space.
+|\hrulefill| Stretchable horizontal rule.
+|\hspace| Fixed horizontal space.
+
+ Vertical space:
+
+|\addvspace| Fixed vertical space.
+|\bigskip| Fixed vertical space.
+|\medskip| Fixed vertical space.
+|\smallskip| Fixed vertical space.
+|\vfill| Stretchable vertical space.
+|\vspace| Fixed vertical space.
+
+ Boxes:
+
+|\fbox| Framebox.
+|\framebox| Framebox, adjustable position.
+|\lrbox| An environment like |\sbox|.
+|\makebox| Box, adjustable position.
+|\mbox| Box.
+|\newsavebox| Declare a name for saving a box.
+|\parbox| Box with text in paragraph mode.
+|\raisebox| Raise or lower text.
+|\rule| Lines and squares.
+|\savebox| Like |\makebox|, but save the text for later use.
+|\sbox| Like |\mbox|, but save the text for later use.
+|\usebox| Print saved text.
+
+Horizontal space: *latex-hor-space*
+
+LaTeX removes horizontal space that comes at the end of a line. If you don't
+want LaTeX to remove this space, include the optional * argument. Then the
+space is never removed.
+
+\dotfill *\dotfill*
+ The |\dotfill| command produces a "rubber length" that produces
+ dots instead of just spaces.
+
+\hfill *\hfill*
+ The |\hfill| fill command produces a "rubber length" which can
+ stretch or shrink horizontally. It will be filled with spaces.
+
+\hrulefill *\hrulefill*
+ The |\hrulefill| fill command produces a "rubber length" which
+ can stretch or shrink horizontally. It will be filled with a
+ horizontal rule.
+
+\hspace[*]{length} *\hspace*
+ The |\hspace| command adds horizontal space. The length of the
+ space can be expressed in any terms that LaTeX understands,
+ i.e., points, inches, etc. You can add negative as well as
+ positive space with an |\hspace| command. Adding negative space
+ is like backspacing.
+
+
+Vertical space: *latex-ver-space*
+
+LaTeX removes vertical space that comes at the end of a page. If you don't
+want LaTeX to remove this space, include the optional * argument. Then the
+space is never removed.
+
+\addvspace{length} *\addvspace*
+ The |\addvspace| command normally adds a vertical space of
+ height length. However, if vertical space has already been
+ added to the same point in the output by a previous
+ |\addvspace| command, then this command will not add more space
+ than needed to make the natural length of the total vertical
+ space equal to length.
+
+\bigskip *\bigskip*
+ The |\bigskip| command is equivalent to \vspace{bigskipamount}
+ where bigskipamount is determined by the document class.
+
+\medskip *\medskip*
+ The |\medskip| command is equivalent to \vspace{medskipamount}
+ where medskipamount is determined by the document class.
+
+\smallskip *\smallskip*
+ The |\smallskip| command is equivalent to
+ \vspace{smallskipamount} where smallskipamount is determined
+ by the document class.
+
+\vfill *\vfill*
+ The |\vfill| fill command produces a rubber length which can
+ stretch or shrink vertically.
+
+\vspace[*]{length} *\vspace*
+ The |\vspace| command adds vertical space. The length of the
+ space can be expressed in any terms that LaTeX understands,
+ i.e., points, inches, etc. You can add negative as well as
+ positive space with an |\vspace| command.
+
+
+Boxes: *latex-boxes*
+
+\fbox{text} *\fbox*
+ The |\fbox| command is exactly the same as the |\mbox| command,
+ except that it puts a frame around the outside of the box that
+ it creates.
+
+\framebox[width][position]{text} *\framebox*
+ The |\framebox| command is exactly the same as the |\makebox|
+ command, except that it puts a frame around the outside of the
+ box that it creates.
+ The |\framebox| command produces a rule of thickness
+ |\fboxrule|, and leaves a space |\fboxsep| between the rule and
+ the contents of the box.
+
+lrbox *\lrbox*
+\begin{lrbox}{cmd} text \end{lrbox}
+ This is the environment form of |\sbox|.
+ The text inside the environment is saved in the box cmd, which
+ must have been declared with |\newsavebox|.
+
+\makebox[width][position]{text} *\makebox*
+ The |\makebox| command creates a box just wide enough to
+ contain the text specified. The width of the box is specified
+ by the optional [width] argument. The position of the text
+ within the box is determined by the optional [position]
+ argument.
+ c -- centred (default)
+ l -- flushleft
+ r -- flushright
+ s -- stretch from left to right margin. The text must
+ contain stretchable space for this to work.
+ See section |\picture-makebox|.
+
+\mbox{text} *\mbox*
+ The |\mbox| command creates a box just wide enough to hold the
+ text created by its argument.
+ Use this command to prevent text from being split across
+ lines.
+
+\newsavebox{cmd} *\newsavebox*
+ Declares {cmd}, which must be a command name that is not
+ already defined, to be a bin for saving boxes.
+
+
+\parbox[position][height][innerpos]{width}{text} *\parbox*
+ A parbox is a box whose contents are created in
+ |\paragraph-mode|. The |\parbox| has two
+
+ Mandatory arguments:
+'width' specifies the width of the parbox
+'text' the text that goes inside the parbox.
+
+ Optional arguments:
+'position' LaTeX will position a parbox so its centre lines up with the
+ centre of the text line. The optional position argument allows
+ you to line up either the top or bottom line in the parbox
+ (default is top).
+
+'height' If the height argument is not given, the box will have the
+ natural height of the text.
+
+'innerpos' The inner-pos argument controls the placement of the text
+ inside the box. If it is not specified, position is used.
+ t -- text is placed at the top of the box
+ c -- text is centred in the box
+ b -- text is placed at the bottom of the box
+ s -- stretch vertically. The text must contain
+ vertically stretchable space for this to work.
+
+ A |\parbox| command is used for a parbox containing a small
+ piece of text, with nothing fancy inside. In particular, you
+ shouldn't use any of the paragraph-making environments inside
+ a |\parbox| argument. For larger pieces of text, including ones
+ containing a paragraph-making environment, you should use a
+ |\minipage| environment.
+
+\raisebox{distance}[extendabove][extendbelow]{text} *\raisebox*
+ The |\raisebox| command is used to raise or lower text. The
+ first mandatory argument specifies how high the text is to be
+ raised (or lowered if it is a negative amount). The text
+ itself is processed in LR mode.
+ Sometimes it's useful to make LaTeX think something has a
+ different size than it really does - or a different size than
+ LaTeX would normally think it has. The |\raisebox| command
+ lets you tell LaTeX how tall it is.
+ The first optional argument, extend-above, makes LaTeX think
+ that the text extends above the line by the amount specified.
+ The second optional argument, extend-below, makes LaTeX think
+ that the text extends below the line by the amount specified.
+
+\rule[raiseheight]{width}{thickness} *\rule*
+ The |\rule| command is used to produce horizontal lines. The
+ arguments are defined as follows:
+'raiseheight' specifies how high to raise the rule (optional)
+'width' specifies the length of the rule (mandatory)
+'thickness' specifies the thickness of the rule (mandatory)
+
+\savebox{cmd}[width][pos]{text} *\savebox*
+ This command typeset text in a box just as for |\makebox|.
+ However, instead of printing the resulting box, it saves it in
+ bin cmd, which must have been declared with |\newsavebox|.
+
+\sbox{text} *\sbox*
+ This commands typeset text in a box just as for |\mbox|.
+ However, instead of printing the resulting box, it saves it in
+ bin cmd, which must have been declared with |\newsavebox|.
+
+\usebox{cmd} *\usebox*
+ Prints the box most recently saved in bin cmd by a |\savebox|
+ command.
+
+==============================================================================
+19. Special Characters *latex-special*
+
+The following characters play a special role in LaTeX and are called "special
+printing characters", or simply "special characters". >
+ # $ % & ~ _ ^ \ { }
+Whenever you put one of these special characters into your file, you are doing
+something special. If you simply want the character to be printed just as any
+other letter, include a \ in front of the character. For example, \$ will
+produce $ in your output.
+
+One exception to this rule is the \ itself because |\\| has its own special
+meaning. A \ is produced by typing $\backslash$ in your file.
+
+Also, \~ means `place a tilde accent over the following letter', so you will
+probably want to use |\verb| instead.
+ *\symbol*
+In addition, you can access any character of a font once you know its number
+by using the |\symbol| command. For example, the character used for displaying
+spaces in the |\verb|* command has the code decimal 32, so it can be typed as
+\symbol{32}.
+
+You can also specify octal numbers with ' or hexadecimal numbers with ", so
+the previous example could also be written as \symbol{'40} or \symbol{"20}.
+
+==============================================================================
+20. Splitting the Input *latex-inputting*
+
+A large document requires a lot of input. Rather than putting the whole input
+in a single large file, it's more efficient to split it into several smaller
+ones. Regardless of how many separate files you use, there is one that is the
+root file; it is the one whose name you type when you run LaTeX.
+
+|\include| Conditionally include a file
+|\includeonly| Determine which files are included
+|\input| Unconditionally include a file
+
+\include{file} *\include*
+ The \include command is used in conjunction with the
+ |\includeonly| command for selective inclusion of
+ files. The file argument is the first name of a file,
+ denoting `file.tex' . If file is one the file names in
+ the file list of the |\includeonly| command or if there
+ is no |\includeonly| command, the \include command is
+ equivalent to: >
+ \clearpage \input{file} \clearpage
+<
+ except that if the file `file.tex' does not exist,
+ then a warning message rather than an error is
+ produced. If the file is not in the file list, the
+ \include command is equivalent to |\clearpage|.
+
+ The |\include| command may not appear in the preamble or in a
+ file read by another |\include| command.
+
+\includeonly{filelist} *\includeonly*
+ The |\includeonly| command controls which files will be read in
+ by an |\include| command. {filelist} should be a
+ comma-separated list of filenames. Each filename must match
+ exactly a filename specified in a |\include| command. This
+ command can only appear in the preamble.
+
+\input{file} *\input*
+ The |\input| command causes the indicated file to be read and
+ processed, exactly as if its contents had been inserted in the
+ current file at that point. The file name may be a complete
+ file name with extension or just a first name, in which case
+ the file `file.tex' is used.
+==============================================================================
+21. Starting & Ending *latex-start-end*
+
+Your input file must contain the following commands as a minimum:
+\documentclass{class} |\documentclass|
+\begin{document} |\begin|
+... your text goes here ...
+\end{document} |\end|
+
+where the class selected is one of the valid classes for LaTeX.
+See |\classes|for details of the various document classes.
+
+You may include other LaTeX commands between the |\documentclass| and the
+\begin{document} commands (i.e., in the `preamble').
+==============================================================================
+22. Table of Contents *latex-toc*
+
+ *\tableofcontents*
+A table of contents is produced with the |\tableofcontents| command. You put
+the command right where you want the table of contents to go; LaTeX does the
+rest for you. It produces a heading, but it does not automatically start a new
+page. If you want a new page after the table of contents, include a |\newpage|
+command after the |\tableofcontents| command.
+
+ *\listoffigures* *\listoftables*
+There are similar commands |\listoffigures| and |\listoftables| for producing a
+list of figures and a list of tables, respectively. Everything works exactly
+the same as for the table of contents.
+
+ *\nofiles*
+NOTE: If you want any of these items to be generated, you cannot have the
+\nofiles command in your document.
+
+|\addcontentsline| Add an entry to table of contents etc.
+|\addtocontents| Add text directly to table of contents file etc.
+
+\addcontentsline{file}{secunit}{entry} *\addcontentsline*
+ The |\addcontentsline| command adds an entry to the specified
+ list or table where:
+{file} is the extension of the file on which information is to be
+ written:
+ toc (table of contents),
+ lof (list of figures),
+ lot (list of tables).
+{secunit} controls the formatting of the entry. It should be one of the
+ following, depending upon the value of the file argument:
+ toc -- the name of the sectional unit, such as part or
+ subsection.
+ lof -- figure
+ lot -- table
+{entry} is the text of the entry.
+
+\addtocontents{file}{text} *\addtocontents*
+ The |\addtocontents| command adds text (or formatting commands)
+ directly to the file that generates the table of contents or
+ list of figures or tables.
+{file} is the extension of the file on which information is to be written:
+ toc (table of contents),
+ lof (list of figures),
+ lot (list of tables).
+{text} is the information to be written.
+
+==============================================================================
+23. Terminal Input/Output *latex-terminal*
+
+|\typein| Read text from the terminal.
+|\typeout| Write text to the terminal.
+
+\typein[cmd]{msg} *\typein*
+ Prints {msg} on the terminal and causes LaTeX to stop and wait
+ for you to type a line of input, ending with return. If the
+ [cmd] argument is missing, the typed input is processed as if
+ it had been included in the input file in place of the
+ |\typein| command. If the [cmd] argument is present, it must be
+ a command name. This command name is then defined or redefined
+ to be the typed input.
+
+\typeout{msg} *\typeout*
+ Prints {msg} on the terminal and in the `.log' file. Commands
+ in {msg} that are defined with |\newcommand| or |\renewcommand|
+ are replaced by their definitions before being printed.
+
+ *\space*
+LaTeX's usual rules for treating multiple spaces as a single space and
+ignoring spaces after a command name apply to {msg}. A |\space| command in {msg}
+causes a single space to be printed. A ^^J in {msg} prints a newline.
+
+==============================================================================
+24. Typefaces *latex-typefaces*
+
+The typeface is specified by giving the "size" and "style". A typeface is also
+called a "font".
+|font-styles| Select roman, italics etc.
+|font-size| Select point size.
+|font-lowlevelcommands| Commands for wizards.
+
+Styles *font-styles*
+
+The following type style commands are supported by LaTeX.
+
+These commands are used like: >
+ \textit{italics text}.
+The corresponding command in parenthesis is the "declaration form", which
+takes no arguments. The scope of the declaration form lasts until the next
+type style command or the end of the current group.
+
+The declaration forms are cumulative; i.e., you can say: >
+ \sffamily\bfseries
+to get sans serif boldface.
+
+You can also use the environment form of the declaration forms; e.g.: >
+ \begin{ttfamily}...\end{ttfamily}.
+<
+\textrm (\rmfamily) *\textrm* *\rmfamily*
+ Roman
+
+\textit (\itshape) *\textit* *\itshape* *\emph*
+ Emphasis (toggles between |\textit| and |\textrm|).
+
+\textmd (\mdseries) *\textmd* *\mdseries*
+ Medium weight (default). The opposite of boldface.
+
+\textbf (\bfseries) *\textbf* *\bfseries*
+ Boldface.
+
+\textup (\upshape) *\textup* *\upshape*
+ Upright (default). The opposite of slanted.
+
+\textsl (\slshape) *\textsl* *\slshape*
+ Slanted.
+
+\textsf (\sffamily) *\textsf* *\sffamily*
+ Sans serif.
+
+\textsc (\scshape) *\textsc* *\scshape*
+ Small caps.
+
+\texttt (\ttfamily) *\texttt* *\ttfamily*
+ Typewriter.
+
+\textnormal (\normalfont) *\textnormal* *\normalfont*
+ Main document font.
+
+\mathrm *\mathrm*
+ Roman, for use in math mode.
+
+\mathbf *\mathbf*
+ Boldface, for use in math mode.
+
+\mathsf *\mathsf*
+ Sans serif, for use in math mode.
+
+\mathtt *\mathtt*
+ Typewriter, for use in math mode.
+
+\mathit *\mathit*
+ Italics, for use in math mode, e.g. variable names with
+ several letters.
+
+\mathnormal *\mathnormal*
+ For use in math mode, e.g. inside another type style
+ declaration.
+
+\mathcal *\mathcal*
+ `Calligraphic' letters, for use in math mode.
+
+ *\mathversion*
+In addition, the command \mathversion{bold} can be used for switching to bold
+letters and symbols in formulas. \mathversion{normal} restores the default.
+
+==========
+Sizes *font-size*
+
+The following standard type size commands are supported by LaTeX.
+
+The commands as listed here are "declaration forms". The scope of the
+declaration form lasts until the next type style command or the end of the
+current group.
+
+You can also use the environment form of these commands; e.g. >
+ \begin{tiny}...\end{tiny}
+
+\tiny *\tiny*
+\scriptsize *\scriptsize*
+\footnotesize *\footnotesize*
+\small *\small*
+\normalsize(default) *\normalsize*
+\large *\large*
+\Large *\Large*
+\LARGE *\LARGE*
+\huge *\huge*
+\Huge *\Huge*
+
+==========
+Low-level font commands *font-lowlevelcommands*
+
+These commands are primarily intended for writers of macros and packages. The
+commands listed here are only a subset of the available ones. For full
+details, you should consult Chapter 7 of The LaTeX Companion.
+
+\fontencoding{enc} *\fontencoding*
+ Select font encoding. Valid encodings include OT1 and T1.
+
+\fontfamily{family} *\fontfamily*
+ Select font family. Valid families include:
+ cmr for Computer Modern Roman
+ cmss for Computer Modern Sans Serif
+ cmtt for Computer Modern Typewriter
+ and numerous others.
+
+\fontseries{series} *\fontseries*
+ Select font series. Valid series include:
+ m Medium (normal)
+ b Bold
+ c Condensed
+ bc Bold condensed
+ bx Bold extended
+ and various other combinations.
+
+\fontshape{shape} *\fontshape*
+ Select font shape. Valid shapes are:
+ n Upright (normal)
+ it Italic
+ sl Slanted (oblique)
+ sc Small caps
+ ui Upright italics
+ ol Outline
+ The two last shapes are not available for most font families.
+
+\fontsize{size}{skip} *\fontsize*
+ Set font size. The first parameter is the font size to switch
+ to; the second is the \baselineskip to use. The unit of both
+ parameters defaults to pt. A rule of thumb is that the
+ baselineskip should be 1.2 times the font size.
+
+\selectfont *\selectfont*
+ The changes made by calling the four font commands described
+ above do not come into effect until |\selectfont| is called.
+
+\usefont{enc}{family}{series}{shape} *\usefont*
+ Equivalent to calling |\fontencoding|, |\fontfamily|,
+ |\fontseries| and |\fontshape| with the given parameters,
+ followed by |\selectfont|.
+
+==============================================================================
+25. Parameters *latex-parameters*
+
+The input file specification indicates the file to be formatted; TeX uses
+`.tex' as a default file extension. If you omit the input file entirely, TeX
+accepts input from the terminal. You specify command options by supplying a
+string as a parameter to the command; e.g. >
+
+ latex "\scrollmode\input foo.tex"
+
+will process `foo.tex' without pausing after every error.
+
+Output files are always created in the current directory. When you fail to
+specify an input file name, TeX bases the output names on the file
+specification associated with the logical name TEX_OUTPUT, typically
+texput.log.
+
+ vim:tw=78:ts=8:ft=help:norl: