├── .gitignore ├── Makefile ├── Makefile.in ├── README.md ├── compiler └── tex.vim ├── doc ├── Makefile ├── Makefile.in ├── README ├── README.new ├── catalog.xml ├── db2vim │ ├── db2vim │ ├── domutils.py │ └── textutils.py ├── imaps.txt ├── latex-suite-chunk.xsl ├── latex-suite-common.xsl ├── latex-suite-quickstart.css ├── latex-suite-quickstart.txt ├── latex-suite-quickstart.xml ├── latex-suite.css ├── latex-suite.txt ├── latex-suite.xml ├── latex-suite.xsl └── latexhelp.txt ├── ftplugin ├── bib_latexSuite.vim ├── latex-suite │ ├── bibtex.vim │ ├── bibtools.py │ ├── brackets.vim │ ├── compiler.vim │ ├── custommacros.vim │ ├── diacritics.vim │ ├── dictionaries │ │ ├── SIunits │ │ └── dictionary │ ├── elementmacros.vim │ ├── envmacros.vim │ ├── folding.vim │ ├── macros │ │ └── example │ ├── main.vim │ ├── mathmacros-utf.vim │ ├── mathmacros.vim │ ├── multicompile.vim │ ├── outline.py │ ├── packages.vim │ ├── packages │ │ ├── SIunits │ │ ├── accents │ │ ├── acromake │ │ ├── afterpage │ │ ├── alltt │ │ ├── amsmath │ │ ├── amsthm │ │ ├── amsxtra │ │ ├── arabic │ │ ├── array │ │ ├── babel │ │ ├── bar │ │ ├── biblatex │ │ ├── bm │ │ ├── bophook │ │ ├── boxedminipage │ │ ├── caption2 │ │ ├── cases │ │ ├── ccaption │ │ ├── changebar │ │ ├── chapterbib │ │ ├── cite │ │ ├── color │ │ ├── comma │ │ ├── csquotes │ │ ├── deleq │ │ ├── drftcite │ │ ├── dropping │ │ ├── enumerate │ │ ├── eqlist │ │ ├── eqparbox │ │ ├── everyshi │ │ ├── exmpl │ │ ├── fixme │ │ ├── flafter │ │ ├── float │ │ ├── floatflt │ │ ├── fn2end │ │ ├── footmisc │ │ ├── geometry │ │ ├── german │ │ ├── graphicx │ │ ├── graphpap │ │ ├── harpoon │ │ ├── hhline │ │ ├── histogram │ │ ├── hyperref │ │ ├── ifthen │ │ ├── inputenc │ │ ├── letterspace │ │ ├── lineno │ │ ├── longtable │ │ ├── lscape │ │ ├── manyfoot │ │ ├── moreverb │ │ ├── multibox │ │ ├── multicol │ │ ├── newalg │ │ ├── ngerman │ │ ├── numprint │ │ ├── oldstyle │ │ ├── outliner │ │ ├── overcite │ │ ├── pagenote │ │ ├── parallel │ │ ├── plain │ │ ├── plates │ │ ├── polski │ │ ├── psgo │ │ ├── schedule │ │ ├── textfit │ │ ├── times │ │ ├── tipa │ │ ├── ulem │ │ ├── url │ │ ├── verbatim │ │ └── version │ ├── projecttemplate.vim │ ├── pytools.py │ ├── smartspace.vim │ ├── templates.vim │ ├── templates │ │ ├── IEEEtran.tex │ │ ├── article.tex │ │ ├── report.tex │ │ └── report_two_column.tex │ ├── texmenuconf.vim │ ├── texproject.vim │ ├── texrc │ ├── texviewer.vim │ ├── version.vim │ └── wizardfuncs.vim └── tex_latexSuite.vim ├── indent └── tex.vim ├── latextags ├── ltags └── plugin ├── SyntaxFolds.vim ├── filebrowser.vim ├── imaps.vim ├── libList.vim └── remoteOpen.vim /.gitignore: -------------------------------------------------------------------------------- 1 | ## To see if new rules exclude any existing files, run 2 | ## 3 | ## git ls-files -i --exclude-standard 4 | ## 5 | ## after modifying this file. 6 | 7 | ## Generated by the build process 8 | 9 | ## Editor backup and swap files 10 | *~ 11 | .\#* 12 | \#**\# 13 | .*.sw[op] 14 | .sw[op] 15 | 16 | ## Generated by Mac filesystem 17 | .DS_Store 18 | 19 | ## For rejects 20 | *.orig 21 | *.rej 22 | *.ancestor 23 | *.current 24 | *.patched 25 | 26 | ## Generated by StGit 27 | patches-* 28 | .stgit-*.txt 29 | 30 | ## Documentation building 31 | doc/db2vim/domutils.pyc 32 | doc/db2vim/textutils.pyc 33 | doc/latex-suite/ 34 | doc/latex-suite.html 35 | doc/latex-suite-quickstart/ 36 | doc/latex-suite-quickstart.html 37 | 38 | ## Pathogen (to make it easier to use vim-latex-git) 39 | doc/tags 40 | *.pyc 41 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PREFIX=/usr/local 2 | VIMDIR=$(PREFIX)/share/vim 3 | BINDIR=$(PREFIX)/bin 4 | 5 | VERSION=1.8.23 6 | DATE=$(shell date +%Y%m%d) 7 | COMMIT_COUNT=$(shell git log --oneline | wc -l) 8 | ABBREV_HASH=$(shell git log --oneline | head -n 1 | cut -d\ -f 1) 9 | 10 | SNAPSHOTNAME=vim-latex-$(VERSION)-$(DATE).$(COMMIT_COUNT)-git$(ABBREV_HASH) 11 | 12 | snapshot: 13 | git archive --prefix '$(SNAPSHOTNAME)/' HEAD | gzip > '$(SNAPSHOTNAME).tar.gz' 14 | 15 | install: 16 | install -d '$(DESTDIR)$(VIMDIR)/doc' 17 | install -m 0644 doc/*.txt '$(DESTDIR)$(VIMDIR)/doc' 18 | 19 | install -d '$(DESTDIR)$(VIMDIR)' 20 | cp -R compiler ftplugin indent plugin '$(DESTDIR)$(VIMDIR)' 21 | chmod 0755 '$(DESTDIR)$(VIMDIR)/ftplugin/latex-suite/outline.py' 22 | 23 | install -d '$(DESTDIR)$(BINDIR)' 24 | install latextags ltags '$(DESTDIR)$(BINDIR)' 25 | 26 | upload: snapshot 27 | scp '$(SNAPSHOTNAME).tar.gz' frs.sourceforge.net:/home/frs/project/v/vi/vim-latex/snapshots 28 | 29 | .PHONY: install upload 30 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | CVSUSER = srinathava 2 | SSHCMD = ssh1 3 | DIR1 = $(PWD) 4 | 5 | .PHONY: latexs clean release updoc uphtdocs ltt changelog install stallin sync 6 | 7 | # The main target. This creates a latex suite archive (zip and tar.gz 8 | # format) ensuring that all the files in the archive are in unix format so 9 | # unix people can use it too... 10 | latexs: 11 | # plugins: 12 | zip -q latexSuite.zip plugin/imaps.vim 13 | zip -q latexSuite.zip plugin/SyntaxFolds.vim 14 | zip -q latexSuite.zip plugin/libList.vim 15 | zip -q latexSuite.zip plugin/remoteOpen.vim 16 | zip -q latexSuite.zip plugin/filebrowser.vim 17 | # ftplugins 18 | zip -q latexSuite.zip ftplugin/tex_latexSuite.vim 19 | zip -q latexSuite.zip ftplugin/bib_latexSuite.vim 20 | zip -q latexSuite.zip ftplugin/tex/*.vim 21 | # files in the latex-suite directory 22 | zip -q -R latexSuite.zip `find ftplugin/latex-suite -name '*'` 23 | # documentation 24 | zip -q latexSuite.zip doc/latex*.txt 25 | zip -q latexSuite.zip doc/imaps*.txt 26 | # indentation 27 | zip -q latexSuite.zip indent/tex.vim 28 | # compiler 29 | zip -q latexSuite.zip compiler/tex.vim 30 | # external tools 31 | zip -q latexSuite.zip ltags 32 | 33 | # Now to make a tar.gz file from the .zip file. 34 | rm -rf $(TMP)/latexSuite0793 35 | mkdir -p $(TMP)/latexSuite0793 36 | cp latexSuite.zip $(TMP)/latexSuite0793/ 37 | ( \ 38 | cd $(TMP)/latexSuite0793/ ; \ 39 | unzip -q -o latexSuite.zip ; \ 40 | \rm latexSuite.zip ; \ 41 | tar czf latexSuite.tar.gz * ; \ 42 | \mv latexSuite.tar.gz $(DIR1)/ ; \ 43 | ) 44 | mv latexSuite.zip latexSuite`date +%Y%m%d`.zip ; \ 45 | mv latexSuite.tar.gz latexSuite`date +%Y%m%d`.tar.gz ; \ 46 | 47 | # target for removing archive files. 48 | clean: 49 | rm -f latexSuite200* 50 | 51 | # make a local install directory. 52 | ltt: 53 | rm -rf /tmp/ltt/vimfiles/ftplugin 54 | cp -f latexSuite.zip /tmp/ltt/vimfiles/ 55 | cd /tmp/ltt/vimfiles; unzip latexSuite.zip 56 | 57 | # This target is related to a script I have on my sf.net account. That 58 | # script looks like: 59 | # 60 | # #!/bin/bash 61 | # cd ~/testing/vimfiles; \ 62 | # cvs -q update; \ 63 | # make clean; \ 64 | # make; \ 65 | # cp latexsuite.* ~/htdocs/download/ 66 | # 67 | # Doing a release via sf.net has a couple of advantages: 68 | # - I do not have to bother with CRLF pain anymore because the copy on 69 | # sf.net will always have unix style EOLs. 70 | # - The process is much faster because I only need to communicate a command 71 | # from my computer to sf.net. The rest is done locally on the sf.net 72 | # server. 73 | release: 74 | $(SSHCMD) $(CVSUSER)@vim-latex.sf.net /home/groups/v/vi/vim-latex/bin/upload 75 | 76 | updoc: 77 | $(SSHCMD) $(CVSUSER)@vim-latex.sf.net /home/groups/v/vi/vim-latex/bin/updoc 78 | 79 | # This is another target akin to the release: target. This target updates 80 | # the htdocs directory of the latex-suite project to the latest CVS 81 | # version. 82 | # This is again related to the uphtdocs script on my sf.net account which 83 | # looks like: 84 | # #!/bin/sh 85 | # 86 | # # update the htdocs directory 87 | # cd /home/groups/v/vi/vim-latex/htdocs; cvs -q update 88 | # # update the packages directory 89 | # cd /home/groups/v/vi/vim-latex/htdocs/packages; cvs -q update 90 | uphtdocs: 91 | $(SSHCMD) $(CVSUSER)@vim-latex.sf.net /home/groups/v/vi/vim-latex/bin/uphtdocs 92 | 93 | # Automatically generate the Changelog file using the cvs2cl utility 94 | # 95 | # Arguments: 96 | # -S add a seperating line between filename and log 97 | # --no-wrap Do not attempt to format the Changelog comments 98 | # -f file to write the Changelog to. 99 | changelog: 100 | cvs2cl -S --no-wrap -f ftplugin/latex-suite/ChangeLog 101 | 102 | # rsync is like cp (copy) on steroids. Here are some useful options: 103 | # -C auto ignore like CVS 104 | # -r recurse into directories 105 | # -t preserve times 106 | # -u update (do not overwrite newer files) 107 | # -W whole files, no incremental checks (default for local usage) 108 | # --existing only update files that already exist 109 | # --exclude exclude files matching the pattern 110 | # -n dry run (for testing) 111 | 112 | # Usage: after "cvs update", do 113 | # make install [VIMFILES=path/to/vimfiles] 114 | # Before "cvs commit", do 115 | # make stallin [VIMFILES=path/to/vimfiles] 116 | # If you have made changes in both directories, and want to keep the most 117 | # recent versions, do 118 | # make sync [VIMFILES=path/to/vimfiles] 119 | # Note: defining VIMFILES when you invoke make overrides the value below. 120 | # Warning: install and stallin do not check modification times! 121 | 122 | VIMFILES=${HOME}/.vim 123 | EXCLUDE="--exclude='*~' --exclude='*.swp' --exclude='makefile'" 124 | 125 | install: 126 | rsync -CrtW ${EXCLUDE} . ${VIMFILES} 127 | 128 | # stallin = reverse install 129 | # If you can think of a better name for this target, be my guest! 130 | stallin: 131 | rsync -CrtW --existing ${VIMFILES}/ . 132 | 133 | sync: install stallin 134 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | See https://github.com/vim-latex/vim-latex. 2 | -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | projects = latex-suite latex-suite-quickstart 2 | htmlfiles = $(addsuffix .html, $(projects)) 3 | txtfiles = $(addsuffix .txt, $(projects)) 4 | cssfiles = $(addsuffix .css, $(projects)) 5 | all = $(projects) $(htmlfiles) $(cssfiles) $(txtfiles) 6 | 7 | 8 | xsltproc=xsltproc 9 | db2vim=db2vim/db2vim 10 | 11 | # Use for debugging: 12 | #xsltproc=strace -e trace=file xsltproc --nonet --load-trace 13 | # export XML_DEBUG_CATALOG = 1 14 | 15 | # Specify local catalog to not use system installed dtd/xsl files 16 | # export XML_CATALOG_FILES=catalog.xml 17 | 18 | # User configuration of this Makefile goes into Makefile.local 19 | # E.g. to use a catalog file installed by the user. 20 | -include Makefile.local 21 | 22 | # Default Target is to create all documentation files 23 | all: $(all) 24 | 25 | # create multi page html (chunk xhtml) 26 | $(projects): %: %.xml latex-suite-chunk.xsl latex-suite-common.xsl 27 | $(xsltproc) -o $@/ latex-suite-chunk.xsl $< 28 | 29 | # create single html files 30 | $(htmlfiles): %.html: %.xml latex-suite.xsl latex-suite-common.xsl 31 | $(xsltproc) -o $@ latex-suite.xsl $< 32 | 33 | # create vim flat files 34 | latex-suite.txt: %.txt: %.xml 35 | $(db2vim) --prefix=ls_ $< > $@ 36 | 37 | latex-suite-quickstart.txt: %.txt: %.xml 38 | $(db2vim) --prefix=lq_ $< > $@ 39 | 40 | # validate xml 41 | validate: 42 | for file in *.xml; do \ 43 | xmllint --valid --noout $$file; \ 44 | done 45 | 46 | clean: 47 | rm -f $(htmlfiles) 48 | rm -rf $(projects) 49 | 50 | # $(txtfiles) are currently in revision control, therefore they are not 51 | # removed in the clean target 52 | mr-proper: clean 53 | rm -f $(txtfiles) 54 | 55 | upload: $(all) 56 | # vim-latex-web is configured in ~/.ssh/config 57 | #Host vim-latex-web 58 | # Hostname web.sourceforge.net 59 | # User SOURCEFORGE_USERNAME,vim-latex 60 | rsync --perms --chmod g+w,o-w --delete -lrtvz $(all) vim-latex-web:/home/groups/v/vi/vim-latex/htdocs/documentation/ 61 | 62 | # vim:nowrap 63 | -------------------------------------------------------------------------------- /doc/Makefile.in: -------------------------------------------------------------------------------- 1 | # Manual files 2 | ls-flat: 3 | java com.icl.saxon.StyleSheet latex-suite.xml latex-suite.xsl > latex-suite.html 4 | 5 | ls-chunk: 6 | ( \ 7 | cd latex-suite && \ 8 | java com.icl.saxon.StyleSheet ../latex-suite.xml ../latex-suite-chunk.xsl \ 9 | ) 10 | 11 | ls-txt: 12 | db2vim --prefix=ls_ latex-suite.xml > latex-suite.txt 13 | 14 | # Quickstart files 15 | lsq-flat: 16 | java com.icl.saxon.StyleSheet latex-suite-quickstart.xml latex-suite.xsl > latex-suite-quickstart.html 17 | 18 | lsq-chunk: 19 | ( \ 20 | cd latex-suite-quickstart && \ 21 | java com.icl.saxon.StyleSheet ../latex-suite-quickstart.xml ../latex-suite-chunk.xsl \ 22 | ) 23 | 24 | lsq-txt: 25 | db2vim --prefix=lq_ latex-suite-quickstart.xml > latex-suite-quickstart.txt 26 | 27 | cvsci: 28 | cvs ci latex-suite.xml latex-suite.txt 29 | # vim:nowrap 30 | -------------------------------------------------------------------------------- /doc/README: -------------------------------------------------------------------------------- 1 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2 | This file is outdated, please look at README.new for updated information 3 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4 | 5 | ==================================== 6 | Generating Latex-Suite documentation 7 | ==================================== 8 | 9 | In order to generate the html files and vim-help files from the XML source, 10 | you will need to do follow the following steps. The steps are complex only 11 | for a windows machine. On most (modern) linux machines, the various 12 | utilities are already installed and all you need to do is some 13 | soft-linking. 14 | 15 | 1. Download the Docbook XSL stylesheets from 16 | 17 | http://sourceforge.net/project/showfiles.php?group_id=21935 18 | 19 | I downloaded docbook-xsl-1.61.2.tar.gz. Unpack this archive under the 20 | present directory. You should see something like:: 21 | 22 | ./docbook-xsl-1.XX.X/ 23 | 24 | Rename this to:: 25 | 26 | ./docbook-xsl 27 | 28 | Alternatively, if you are on a modern unix system, the docbook-xsl 29 | stylesheets should already be installed on your system. Soft-linking 30 | will thus work more simply. On a typical Debian box, just do:: 31 | 32 | ln -s /usr/share/sgml/docbook/stylesheet/xsl/nwalsh docbook-xsl 33 | 34 | The docbook-xsl stylesheets can be installed via the docbook-xsl 35 | package on Debian. (Just use apt-get). 36 | 37 | 2. Download the Docbook DTD from 38 | 39 | http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip 40 | 41 | Extract this into a subdirectory ``docbook-xml/`` under the present 42 | directory. You should see something like:: 43 | 44 | ./docbook-xml/ 45 | 46 | with a file ``docbookx.dtd`` located there. 47 | 48 | **CAUTION**: 49 | The archive above does not create a top level directory but 50 | unzips directly into the present directory. Therefore, make sure to 51 | run the unzip by first creating ``./docbook-xml/``, copying the zip 52 | file there and then unzipping. 53 | 54 | Alternatively, if you are on a modern unix system, the docbook-xml DTD 55 | will already be installed. Softlinking will thus work. On a typical 56 | Debian box, you could do:: 57 | 58 | ln -s /usr/share/sgml/docbook/dtd/xml/4.2 docbook-xml 59 | 60 | On debian, you need the docbook-xml package on Debian. (Just use 61 | apt-get). 62 | 63 | 3. Download saxon.jar from 64 | 65 | http://vim-latex.sourceforge.net/documentation/saxon.jar 66 | 67 | This is the bare .jar file without any of the other things which saxon 68 | comes with. Add the ``saxon.jar`` file to your ``$CLASSPATH`` setting. 69 | 70 | **NOTE:** 71 | The ``$CLASSPATH`` setting should point to the ``saxon.jar`` file, 72 | not the directory where it resides. 73 | 74 | Again, on a unix system, you might not need to download this. For debian 75 | systems, the saxon.jar file resides in:: 76 | 77 | /usr/share/java/saxon.jar 78 | 79 | You can point your ``$CLASSPATH`` to that file. 80 | 81 | 4. Download db2vim (created by me :)) via anonymous cvs:: 82 | 83 | mkdir -p ~/bin/db2vim 84 | cvs -d :pserver:anonymous@cvs.vim-latex.sf.net:/cvsroot/vim-latex \ 85 | co -d ~/bin/db2vim db2vim 86 | 87 | Add the ``~/bin/db2vim/`` directory thus created to your ``$PATH`` 88 | setting. 89 | 90 | 5. Create a new directory ``latex-suite/`` under the present directory for 91 | the chunked html files to reside in. You should see something like:: 92 | 93 | ./latex-suite/ 94 | 95 | 6. Copy ``Makefile.in`` to ``Makefile`` or ``makefile`` and perform any 96 | necessary customizations. For example, if you are using Activestate 97 | python under windows, you will need to change the ls-txt: target as:: 98 | 99 | python e:/srinath/testing/db2vim/db2vim latex-suite.xml > latex-suite.txt 100 | 101 | 102 | Thats it! You are ready. Now you can do:: 103 | 104 | make ls-chunk 105 | make ls-flat 106 | make ls-txt 107 | 108 | to create the 3 formats. 109 | 110 | Author: Srinath Avadhanula 111 | -------------------------------------------------------------------------------- /doc/README.new: -------------------------------------------------------------------------------- 1 | ==================================== 2 | Generating Latex-Suite documentation 3 | ==================================== 4 | 5 | You need: 6 | - xsltproc 7 | - Docbook XSL stylesheets (*) 8 | - Docbook DTD (*) 9 | 10 | (*) These files will be downloaded every time you create the documentation, 11 | unless you install or download them. 12 | 13 | On Fedora, you can run as root: 14 | 15 | yum install libxslt docbook-style-xsl docbook-dtds 16 | 17 | to install the required packages. 18 | -------------------------------------------------------------------------------- /doc/catalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /doc/db2vim/domutils.py: -------------------------------------------------------------------------------- 1 | def GetTextFromElementNode(element, childNamePattern): 2 | children = element.getElementsByTagName(childNamePattern) 3 | texts = [] 4 | for child in children: 5 | texts.append(GetText(child.childNodes)) 6 | 7 | return texts 8 | 9 | def GetText(nodelist): 10 | rc = "" 11 | for node in nodelist: 12 | if node.nodeType == node.TEXT_NODE: 13 | rc = rc + node.data 14 | return rc 15 | 16 | def GetTextFromElement(element): 17 | text = "" 18 | child = element.firstChild 19 | while not child.nextSibling is None: 20 | child = child.nextSibling 21 | print child 22 | if child.nodeType == child.TEXT_NODE: 23 | text = text + child.data 24 | 25 | return text 26 | -------------------------------------------------------------------------------- /doc/db2vim/textutils.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Contains functions to do word-wrapping on text paragraphs.""" 3 | 4 | import string 5 | import re, random 6 | import operator 7 | 8 | # JustifyLine(line, width): {{{ 9 | def JustifyLine(line, width): 10 | """Stretch a line to width by filling in spaces at word gaps. 11 | 12 | The gaps are picked randomly one-after-another, before it starts 13 | over again. 14 | 15 | Author: Christopher Arndt width and line: 55 | # the line is already long enough -> add it to paragraph 56 | if justify: 57 | # stretch line to fill width 58 | new_par.append(JustifyLine(line, width)) 59 | else: 60 | new_par.append(' '.join(line)) 61 | line = [] 62 | else: 63 | # append next word 64 | line.append(words.pop(0)) 65 | else: 66 | # last line in paragraph 67 | new_par.append(' '.join(line)) 68 | line = [] 69 | break 70 | # replace paragraph with formatted version 71 | paragraphs[i] = '\n'.join(new_par) 72 | # return paragraphs separated by two newlines 73 | return '\n\n'.join(paragraphs) 74 | 75 | # }}} 76 | # IndentParagraphs(text, width=80, indent=0, justify=0): {{{ 77 | def IndentParagraphs(text, width=80, indent=0, justify=0): 78 | """Indent a paragraph, i.e: 79 | . left (and optionally right) justify text to given width 80 | . add an extra indent if desired. 81 | 82 | This is nothing but a wrapper around FillParagraphs 83 | """ 84 | retText = re.sub(r"^|\n", "\g<0>" + " "*indent, \ 85 | FillParagraphs(text, width, justify)) 86 | retText = re.sub(r"\n+$", '', retText) 87 | return retText 88 | 89 | 90 | # }}} 91 | # OffsetText(text, indent): {{{ 92 | def OffsetText(text, indent): 93 | return re.sub("^|\n", "\g<0>" + " "*indent, text) 94 | 95 | 96 | # }}} 97 | # RightJustify(lines, width): {{{ 98 | def RightJustify(lines, width): 99 | if width == 0: 100 | width = TextWidth(lines) 101 | text = "" 102 | for line in lines.split("\n"): 103 | text += " "*(width - len(line)) + line + "\n" 104 | 105 | text = re.sub('\n$', '', text) 106 | return text 107 | 108 | # }}} 109 | # CenterText(lines, width): {{{ 110 | def CenterText(lines, width): 111 | text = '' 112 | for line in lines.split("\n"): 113 | text += " "*(width/2 - len(line)/2) + line + '\n' 114 | return text 115 | 116 | # }}} 117 | # TextWidth(text): {{{ 118 | def TextWidth(text): 119 | """ 120 | TextWidth(text) 121 | 122 | returns the 'width' of the text, i.e the length of the longest segment 123 | in the text not containing new-lines. 124 | """ 125 | return max(map(len, text.split('\n'))) 126 | 127 | 128 | # }}} 129 | # FormatTable(tableText, ROW_SPACE=2, COL_SPACE = 3, \ {{{ 130 | # COL_WIDTH=30, TABLE_WIDTH=80, justify=0): 131 | def FormatTable(tableText, ROW_SPACE=2, COL_SPACE = 3, \ 132 | COL_WIDTH=1000, justify=0, widths=None): 133 | """ 134 | FormatTable(tableText [, ROW_SPACE=2, COL_SPACE = 3, COL_WIDTH=30, justify=0]) 135 | returns string 136 | 137 | Given a 2 dimensional array of text as input, produces a plain text 138 | formatted string which resembles the table output. 139 | 140 | The optional arguments specify the inter row/column spacing and the 141 | column width. 142 | """ 143 | 144 | # first find out the max width of the columns 145 | # maxwidths is a dictionary, but can be accessed exactly like an 146 | # array because the keys are integers. 147 | 148 | if widths is None: 149 | widths = {} 150 | for row in tableText: 151 | cellwidths = map(TextWidth, row) 152 | for i in range(len(cellwidths)): 153 | # Using: dictionary.get(key, default) 154 | widths[i] = max(cellwidths[i], widths.get(i, -1)) 155 | 156 | # Truncate each of the maximum lengths to the maximum allowed. 157 | for i in range(0, len(widths)): 158 | widths[i] = min(widths[i], COL_WIDTH) 159 | 160 | if justify: 161 | formattedTable = [] 162 | 163 | for row in tableText: 164 | formattedTable.append(map(FillParagraphs, row, \ 165 | [COL_WIDTH]*len(row))) 166 | else: 167 | formattedTable = tableText 168 | 169 | retTableText = "" 170 | for row in formattedTable: 171 | rowtext = row[0] 172 | width = widths[0] 173 | for i in range(1, len(row)): 174 | rowtext = VertCatString(rowtext, width, " "*COL_SPACE) 175 | rowtext = VertCatString(rowtext, width + COL_SPACE, row[i]) 176 | 177 | width = width + COL_SPACE + widths[i] 178 | 179 | retTableText += string.join(rowtext, "") 180 | retTableText += "\n"*ROW_SPACE 181 | 182 | return re.sub(r"\n+$", "", retTableText) 183 | 184 | 185 | # }}} 186 | # VertCatString(string1, width1, string2): {{{ 187 | def VertCatString(string1, width1, string2): 188 | """ 189 | VertCatString(string1, width1=None, string2) 190 | returns string 191 | 192 | Concatenates string1 and string2 vertically. The lines are assumed to 193 | be "\n" seperated. 194 | 195 | width1 is the width of the string1 column (It is calculated if left out). 196 | (Width refers to the maximum length of each line of a string) 197 | 198 | NOTE: if width1 is specified < actual width, then bad things happen. 199 | """ 200 | lines1 = string1.split("\n") 201 | lines2 = string2.split("\n") 202 | 203 | if width1 is None: 204 | width1 = -1 205 | for line in lines1: 206 | width1 = max(width1, len(line)) 207 | 208 | retlines = [] 209 | for i in range(0, max(len(lines1), len(lines2))): 210 | if i >= len(lines1): 211 | lines1.append(" "*width1) 212 | 213 | lines1[i] = lines1[i] + " "*(width1 - len(lines1[i])) 214 | 215 | if i >= len(lines2): 216 | lines2.append("") 217 | 218 | retlines.append(lines1[i] + lines2[i]) 219 | 220 | return string.join(retlines, "\n") 221 | 222 | # }}} 223 | 224 | # vim:et:sts=4:fdm=marker 225 | -------------------------------------------------------------------------------- /doc/imaps.txt: -------------------------------------------------------------------------------- 1 | IMAP -- A fluid replacement for :imap 2 | *imaps.txt* 3 | Srinath Avadhanula 4 | 5 | 6 | 7 | Abstract 8 | ======== 9 | This plugin provides a function IMAP() which emulates vims |:imap| function. The 10 | motivation for providing this plugin is that |:imap| suffers from problems 11 | which get increasingly annoying with a large number of mappings. 12 | 13 | Consider an example. If you do > 14 | imap lhs something 15 | 16 | 17 | then a mapping is set up. However, there will be the following problems: 18 | 1. The 'ttimeout' option will generally limit how easily you can type the lhs. 19 | if you type the left hand side too slowly, then the mapping will not be 20 | activated. 21 | 22 | 2. If you mistype one of the letters of the lhs, then the mapping is deactivated 23 | as soon as you backspace to correct the mistake. 24 | 25 | 3. The characters in lhs are shown on top of each other. This is fairly 26 | distracting. This becomes a real annoyance when a lot of characters initiate 27 | mappings. 28 | 29 | This script provides a function IMAP() which does not suffer from these 30 | problems. 31 | 32 | 33 | 34 | *imaps.txt-toc* 35 | |im_1| Using IMAP 36 | 37 | ================================================================================ 38 | Viewing this file 39 | 40 | This file can be viewed with all the sections and subsections folded to ease 41 | navigation. By default, vim does not fold help documents. To create the folds, 42 | press za now. The folds are created via a foldexpr which can be seen in the 43 | last section of this file. 44 | 45 | See |usr_28.txt| for an introduction to folding and |fold-commands| for key 46 | sequences and commands to work with folds. 47 | 48 | ================================================================================ 49 | Using IMAP *im_1* *imaps-usage* 50 | 51 | 52 | 53 | Each call to IMAP is made using the syntax: > 54 | call IMAP (lhs, rhs, ft [, phs, phe]) 55 | 56 | 57 | This is equivalent to having map to for all files of type . 58 | 59 | Some characters in the have special meaning which help in cursor placement 60 | as described in |imaps-placeholders|. The optional arguments define these 61 | special characters. 62 | 63 | Example One: > 64 | call IMAP ("bit`", "\\begin{itemize}\\\item <++>\\\end{itemize}<++>", "tex") 65 | 66 | 67 | This effectively sets up the map for "bit`" whenever you edit a latex file. When 68 | you type in this sequence of letters, the following text is inserted: > 69 | \begin{itemize} 70 | \item * 71 | \end{itemize}<++> 72 | 73 | where * shows the cursor position. The cursor position after inserting the text 74 | is decided by the position of the first "place-holder". Place holders are 75 | special characters which decide cursor placement and movement. In the example 76 | above, the place holder characters are <+ and +>. After you have typed in the 77 | item, press and you will be taken to the next set of <++>'s. Therefore by 78 | placing the <++> characters appropriately, you can minimize the use of movement 79 | keys. 80 | 81 | Set g:Imap_UsePlaceHolders to 0 to disable placeholders altogether. 82 | 83 | Set g:Imap_PlaceHolderStart and g:Imap_PlaceHolderEnd to something else if you 84 | want different place holder characters. Also, b:Imap_PlaceHolderStart and 85 | b:Imap_PlaceHolderEnd override the values of g:Imap_PlaceHolderStart and 86 | g:Imap_PlaceHolderEnd respectively. This is useful for setting buffer specific 87 | place holders. 88 | 89 | Example Two: You can use the command to insert dynamic elements such as 90 | dates. > 91 | call IMAP ('date`', "\=strftime('%b %d %Y')\", '') 92 | 93 | 94 | 95 | With this mapping, typing date` will insert the present date into the file. 96 | 97 | ================================================================================ 98 | About this file 99 | 100 | This file was created automatically from its XML variant using db2vim. db2vim is 101 | a python script which understands a very limited subset of the Docbook XML 4.2 102 | DTD and outputs a plain text file in vim help format. 103 | 104 | db2vim can be obtained via anonymous CVS from sourceforge.net. Use 105 | 106 | cvs -d:pserver:anonymous@cvs.vim-latex.sf.net:/cvsroot/vim-latex co db2vim 107 | 108 | Or you can visit the web-interface to sourceforge CVS at: 109 | http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vim-latex/db2vim/ 110 | 111 | The following modelines should nicely fold up this help manual. 112 | 113 | vim:ft=help:fdm=expr:nowrap 114 | vim:foldexpr=getline(v\:lnum-1)=~'-\\{80}'?'>2'\:getline(v\:lnum-1)=~'=\\{80}'?'>1'\:getline(v\:lnum)=~'=\\{80}'?'0'\:getline(v\:lnum)=~'-\\{80}'?'1'\:'=' 115 | vim:foldtext=substitute(v\:folddashes.substitute(getline(v\:foldstart),'\\s*\\*.*',"",""),'^--','--\ \ \ \ ','') 116 | ================================================================================ 117 | -------------------------------------------------------------------------------- /doc/latex-suite-chunk.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 2 29 | 30 | 31 | 32 | 33 | 34 | 36 | 38 | 39 | 40 | 41 | appendix toc 42 | article/appendix toc 43 | article toc 44 | sect1 toc 45 | sect2 toc 46 | sect3 toc 47 | sect4 toc 48 | sect5 toc 49 | section toc 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /doc/latex-suite-common.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 3 26 | 2 27 | 28 | 29 | 30 |
31 | 32 | 33 | 40 | 41 | 42 | 43 | 44 |
34 | 35 | 36 | 37 | 38 | 39 |
45 |
46 |
47 | 48 | 61 | 62 |
63 | -------------------------------------------------------------------------------- /doc/latex-suite-quickstart.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Authors: Srinath Avadhanula and Mikolaj Machowski 3 | * This style file borrows some elements from main.css, the style file used 4 | * in cream.sf.net 5 | * 6 | * */ 7 | P { 8 | font-size : 12pt ; 9 | font-family : helvetica, arial, verdana, sans-serif ; 10 | vertical-align : top; 11 | } 12 | DT { 13 | font-size : 11pt ; 14 | font-family : helvetica, arial, verdana, sans-serif ; 15 | vertical-align : top; 16 | } 17 | LI { 18 | font-size : 12pt ; 19 | font-family : helvetica, arial, verdana, sans-serif ; 20 | vertical-align : top; 21 | } 22 | 23 | DIV.header { 24 | margin : 0.5cm ; 25 | width : 800px ; 26 | height : 100 27 | } 28 | .note { 29 | } 30 | 31 | TD { 32 | font-size : 11pt ; 33 | font-family : helvetica, arial, verdana, sans-serif ; 34 | vertical-align : top; 35 | } 36 | TD.menu { 37 | text-align : center ; 38 | font-family : verdana, helvetica, sans-serif 39 | } 40 | TD.footright { 41 | text-align : right ; 42 | font-size : 10pt ; 43 | font-family : verdana, helvetica, sans-serif 44 | } 45 | TD.leftpanel { 46 | font-size: 14px ; 47 | font-family: verdana, helvetica, sans-serif ; 48 | vertical-align: top ; 49 | width: 150px; 50 | padding: 15px; 51 | background-color: #88aaaa; 52 | } 53 | TD.mainpanel { 54 | font-size : 12pt ; 55 | font-family : helvetica, arial, verdana, sans-serif ; 56 | vertical-align : top; 57 | padding: 15px; 58 | } 59 | TD.footpanel { 60 | font-size: 12px ; 61 | font-family: verdana, helvetica, sans-serif ; 62 | vertical-align: top ; 63 | text-align: right; 64 | padding: 5px; 65 | background-color: #88aaaa; 66 | } 67 | .navigation { 68 | vertical-align: top; 69 | width: 150px; 70 | padding: 15px; 71 | background-color: #445555; 72 | color: #fffcfc; 73 | } 74 | .navheader { 75 | margin-top: -0.5em; 76 | margin-bottom: 0.5em; 77 | text-align: right; 78 | color: #446644; 79 | font-size: 14px; 80 | font-weight: bold; 81 | } 82 | 83 | SPAN.menu { 84 | text-align : center ; 85 | font-size : 12pt ; 86 | font-family : verdana, helvetica, sans-serif 87 | } 88 | 89 | DIV.merit { 90 | margin : 0.5cm ; 91 | width : 800px 92 | } 93 | 94 | TABLE.meritum { 95 | margin : 0.5cm ; 96 | border : 0 97 | } 98 | .foot { 99 | margin : 0.5cm ; 100 | width : 800px 101 | } 102 | .head { 103 | margin : 0.5cm ; 104 | } 105 | 106 | CODE { 107 | font-family: "Andale Mono", "Courier New", "Courier", monospace; 108 | background-color: #eef0f3; 109 | white-space: nowrap; 110 | } 111 | 112 | .singlesmall { 113 | font-size: 14px; 114 | } 115 | 116 | .doublesmall { 117 | font-size: 12px; 118 | } 119 | 120 | 121 | DIV.footer { 122 | margin : 0.5cm ; 123 | width : 800px 124 | } 125 | .qa { 126 | margin : 0.5cm ; 127 | font-size : 16px; 128 | font-weight : bold; 129 | } 130 | .ans { 131 | margin : 0.5cm ; 132 | font-weight : normal; 133 | } 134 | 135 | H2.hline { 136 | text-align : center ; 137 | font-family : verdana, helvetica, sans-serif 138 | } 139 | 140 | A.extlinks { 141 | font-size : 11pt ; 142 | font-family : verdana, helvetica, sans-serif ; 143 | font-weight : bold 144 | } 145 | 146 | TT { 147 | font-family: courier,sans-serif; 148 | font-size: 11pt; 149 | } 150 | PRE.programlisting { 151 | font-family: courier,sans-serif; 152 | font-size: 10pt; 153 | background-color:#eef0f3; 154 | border-color: #000000; 155 | border-width: 1px; 156 | border-style: solid; 157 | } 158 | SPAN.conflict { 159 | font-size : small ; 160 | font-family: courier,sans-serif; 161 | color : #DD4444; 162 | } 163 | HR.navig { 164 | color: #446644; 165 | height: 1px; 166 | margin-top: 1em; 167 | border-top: 0px; /* Mozilla work-around to eliminate "groove" */ 168 | } 169 | A.question { 170 | color: #000000; 171 | height: 1px; 172 | margin-top: 1em; 173 | border-top: 0px; /* Mozilla work-around to eliminate "groove" */ 174 | } 175 | A.question:hover { 176 | color: #000000; 177 | background-color: #eef0f3; 178 | height: 1px; 179 | margin-top: 1em; 180 | border-top: 0px; /* Mozilla work-around to eliminate "groove" */ 181 | } 182 | 183 | -------------------------------------------------------------------------------- /doc/latex-suite.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Authors: Srinath Avadhanula and Mikolaj Machowski 3 | * This style file borrows some elements from main.css, the style file used 4 | * in cream.sf.net 5 | * 6 | * */ 7 | P { 8 | font-size : 12pt ; 9 | font-family : helvetica, arial, verdana, sans-serif ; 10 | vertical-align : top; 11 | } 12 | DT { 13 | font-size : 11pt ; 14 | font-family : helvetica, arial, verdana, sans-serif ; 15 | vertical-align : top; 16 | } 17 | LI { 18 | font-size : 12pt ; 19 | font-family : helvetica, arial, verdana, sans-serif ; 20 | vertical-align : top; 21 | } 22 | 23 | DIV.header { 24 | margin : 0.5cm ; 25 | width : 800px ; 26 | height : 100 27 | } 28 | .note { 29 | } 30 | 31 | TD { 32 | font-size : 11pt ; 33 | font-family : helvetica, arial, verdana, sans-serif ; 34 | vertical-align : top; 35 | } 36 | TD.menu { 37 | text-align : center ; 38 | font-family : verdana, helvetica, sans-serif 39 | } 40 | TD.footright { 41 | text-align : right ; 42 | font-size : 10pt ; 43 | font-family : verdana, helvetica, sans-serif 44 | } 45 | TD.leftpanel { 46 | font-size: 14px ; 47 | font-family: verdana, helvetica, sans-serif ; 48 | vertical-align: top ; 49 | width: 150px; 50 | padding: 15px; 51 | background-color: #88aaaa; 52 | } 53 | TD.mainpanel { 54 | font-size : 12pt ; 55 | font-family : helvetica, arial, verdana, sans-serif ; 56 | vertical-align : top; 57 | padding: 15px; 58 | } 59 | TD.footpanel { 60 | font-size: 12px ; 61 | font-family: verdana, helvetica, sans-serif ; 62 | vertical-align: top ; 63 | text-align: right; 64 | padding: 5px; 65 | background-color: #88aaaa; 66 | } 67 | .navigation { 68 | vertical-align: top; 69 | width: 150px; 70 | padding: 15px; 71 | background-color: #445555; 72 | color: #fffcfc; 73 | } 74 | .navheader { 75 | margin-top: -0.5em; 76 | margin-bottom: 0.5em; 77 | text-align: right; 78 | color: #446644; 79 | font-size: 14px; 80 | font-weight: bold; 81 | } 82 | 83 | SPAN.menu { 84 | text-align : center ; 85 | font-size : 12pt ; 86 | font-family : verdana, helvetica, sans-serif 87 | } 88 | 89 | DIV.merit { 90 | margin : 0.5cm ; 91 | width : 800px 92 | } 93 | 94 | TABLE.meritum { 95 | margin : 0.5cm ; 96 | border : 0 97 | } 98 | .foot { 99 | margin : 0.5cm ; 100 | width : 800px 101 | } 102 | .head { 103 | margin : 0.5cm ; 104 | } 105 | 106 | CODE { 107 | font-family: "Andale Mono", "Courier New", "Courier", monospace; 108 | background-color: #eef0f3; 109 | white-space: nowrap; 110 | } 111 | 112 | .singlesmall { 113 | font-size: 14px; 114 | } 115 | 116 | .doublesmall { 117 | font-size: 12px; 118 | } 119 | 120 | 121 | DIV.footer { 122 | margin : 0.5cm ; 123 | width : 800px 124 | } 125 | .qa { 126 | margin : 0.5cm ; 127 | font-size : 16px; 128 | font-weight : bold; 129 | } 130 | .ans { 131 | margin : 0.5cm ; 132 | font-weight : normal; 133 | } 134 | 135 | H2.hline { 136 | text-align : center ; 137 | font-family : verdana, helvetica, sans-serif 138 | } 139 | 140 | A.extlinks { 141 | font-size : 11pt ; 142 | font-family : verdana, helvetica, sans-serif ; 143 | font-weight : bold 144 | } 145 | 146 | TT { 147 | font-family: courier,sans-serif; 148 | font-size: 11pt; 149 | } 150 | PRE.programlisting { 151 | font-family: courier,sans-serif; 152 | font-size: 10pt; 153 | background-color:#eef0f3; 154 | border-color: #000000; 155 | border-width: 1px; 156 | border-style: solid; 157 | } 158 | SPAN.conflict { 159 | font-size : small ; 160 | font-family: courier,sans-serif; 161 | color : #DD4444; 162 | } 163 | HR.navig { 164 | color: #446644; 165 | height: 1px; 166 | margin-top: 1em; 167 | border-top: 0px; /* Mozilla work-around to eliminate "groove" */ 168 | } 169 | A.question { 170 | color: #000000; 171 | height: 1px; 172 | margin-top: 1em; 173 | border-top: 0px; /* Mozilla work-around to eliminate "groove" */ 174 | } 175 | A.question:hover { 176 | color: #000000; 177 | background-color: #eef0f3; 178 | height: 1px; 179 | margin-top: 1em; 180 | border-top: 0px; /* Mozilla work-around to eliminate "groove" */ 181 | } 182 | 183 | -------------------------------------------------------------------------------- /doc/latex-suite.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ftplugin/bib_latexSuite.vim: -------------------------------------------------------------------------------- 1 | " File: bib_latexSuite.vim 2 | " Author: Srinath Avadhanula 3 | " License: Vim Charityware License 4 | " Description: 5 | " This file sources the bibtex.vim file distributed as part of latex-suite. 6 | " That file sets up 3 maps BBB, BAS, and BBA which are easy wasy to type in 7 | " bibliographic entries. 8 | " 9 | 10 | " source main.vim because we need a few functions from it. 11 | runtime ftplugin/latex-suite/main.vim 12 | " Disable smart-quotes because we need to enter real quotes in bib files. 13 | runtime ftplugin/latex-suite/bibtex.vim 14 | 15 | " vim:fdm=marker:ff=unix:noet:ts=4:sw=4:nowrap 16 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/bibtex.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " File: bibtex.vim 3 | " Function: BibT 4 | " Author: Alan G Isaac 5 | " modified by Srinath Avadhanula for latex-suite. 6 | " License: Vim Charityware license. 7 | "============================================================================= 8 | 9 | " Fields: 10 | " Define what field type each letter denotes {{{ 11 | " 12 | let s:w_standsfor = 'address' 13 | let s:a_standsfor = 'author' 14 | let s:b_standsfor = 'booktitle' 15 | let s:c_standsfor = 'chapter' 16 | let s:d_standsfor = 'edition' 17 | let s:e_standsfor = 'editor' 18 | let s:h_standsfor = 'howpublished' 19 | let s:i_standsfor = 'institution' 20 | let s:k_standsfor = 'isbn' 21 | let s:j_standsfor = 'journal' 22 | let s:m_standsfor = 'month' 23 | let s:n_standsfor = 'number' 24 | let s:o_standsfor = 'organization' 25 | let s:p_standsfor = 'pages' 26 | let s:q_standsfor = 'publisher' 27 | let s:r_standsfor = 'school' 28 | let s:s_standsfor = 'series' 29 | let s:t_standsfor = 'title' 30 | let s:u_standsfor = 'type' 31 | let s:v_standsfor = 'volume' 32 | let s:y_standsfor = 'year' 33 | let s:z_standsfor = 'note' 34 | 35 | " }}} 36 | " Define the fields required for the various entry types {{{ 37 | " 38 | " s:{type}_required defines the required fields 39 | " s:{type}_optional1 defines common optional fields 40 | " s:{type}_optional2 defines uncommmon optional fields 41 | " s:{type}_retval defines the first line of the formatted bib entry. 42 | " 43 | let s:key='<+key+>' 44 | 45 | let s:{'article'}_required="atjy" 46 | let s:{'article'}_optional1="vnpm" 47 | let s:{'article'}_optional2="z" " z is note 48 | let s:{'article'}_retval = '@ARTICLE{' . s:key . ','."\n" 49 | 50 | let s:{'book'}_required="aetqy" " requires author *or* editor 51 | let s:{'book'}_optional1="wd" 52 | let s:{'book'}_optional2="vnsmz" " w is address, d is edition 53 | let s:{'book'}_extras="k" " isbn 54 | let s:{'book'}_retval = '@BOOK{' . s:key . ','."\n" 55 | 56 | let s:{'booklet'}_required="t" 57 | let s:{'booklet'}_optional1="ahy" 58 | let s:{'booklet'}_optional2="wmz" " w is address 59 | let s:{'booklet'}_retval = '@BOOKLET{' . s:key . ','."\n" 60 | 61 | let s:{'inbook'}_required="aetcpqy" 62 | let s:{'inbook'}_optional1="w" " w is address 63 | let s:{'inbook'}_optional2="vnsudmz" " d is edition 64 | let s:{'inbook'}_extras="k" " isbn 65 | let s:{'inbook'}_retval = '@INBOOK{' . s:key . ','."\n" 66 | 67 | let s:{'incollection'}_required="atbqy" " b is booktitle 68 | let s:{'incollection'}_optional1="cpw" " w is address, c is chapter 69 | let s:{'incollection'}_optional2="evnsudmz" " d is edition 70 | let s:{'incollection'}_extras="k" " isbn 71 | let s:{'incollection'}_retval = '@INCOLLECTION{' . s:key . ','."\n" 72 | 73 | let s:{'inproceedings'}_required="atby" " b is booktitle 74 | let s:{'inproceedings'}_optional1="epwoq" " w is address, q is publisher 75 | let s:{'inproceedings'}_optional2="vnsmz" 76 | let s:{'inproceedings'}_extras="k" " isbn 77 | let s:{'inproceedings'}_retval = '@INPROCEEDINGS{' . s:key . ','."\n" 78 | 79 | let s:{'conference'}_required="atby" " b is booktitle 80 | let s:{'conference'}_optional1="epwoq" " w is address, q is publisher 81 | let s:{'conference'}_optional2="vnsmz" 82 | let s:{'conference'}_extras="k" " isbn 83 | let s:{'conference'}_retval = '@CONFERENCE{' . s:key . ','."\n" 84 | 85 | let s:{'manual'}_required="t" 86 | let s:{'manual'}_optional1="ow" 87 | let s:{'manual'}_optional2="admyz" " w is address 88 | let s:{'manual'}_retval = '@MANUAL{' . s:key . ','."\n" 89 | 90 | let s:{'msthesis'}_required="atry" " r is school 91 | let s:{'msthesis'}_optional1="w" " w is address 92 | let s:{'msthesis'}_optional2="umz" " u is type, w is address 93 | let s:{'msthesis'}_retval = '@MASTERSTHESIS{' . s:key . ','."\n" 94 | 95 | let s:{'misc'}_required="" 96 | let s:{'misc'}_optional1="ath" 97 | let s:{'misc'}_optional2="myz" 98 | let s:{'misc'}_retval = '@MISC{' . s:key . ','."\n" 99 | 100 | let s:{'phdthesis'}_required="atry" " r is school 101 | let s:{'phdthesis'}_optional1="w" " w is address 102 | let s:{'phdthesis'}_optional2="umz" " u is type 103 | let s:{'phdthesis'}_retval = '@PHDTHESIS{' . s:key . ','."\n" 104 | 105 | let s:{'proceedings'}_required="ty" 106 | let s:{'proceedings'}_optional1="ewo" " w is address 107 | let s:{'proceedings'}_optional2="vnsmqz" " q is publisher 108 | let s:{'proceedings'}_retval = '@PROCEEDINGS{' . s:key . ','."\n" 109 | 110 | let s:{'techreport'}_required="atiy" 111 | let s:{'techreport'}_optional1="unw" " u is type, w is address 112 | let s:{'techreport'}_optional2="mz" 113 | let s:{'techreport'}_retval = '@TECHREPORT{' . s:key . ','."\n" 114 | 115 | let s:{'unpublished'}_required="atz" 116 | let s:{'unpublished'}_optional1="y" 117 | let s:{'unpublished'}_optional2="m" 118 | let s:{'unpublished'}_retval = '@UNPUBLISHED{' . s:key . ','."\n" 119 | 120 | " }}} 121 | 122 | if exists('s:done') 123 | finish 124 | endif 125 | let s:done = 1 126 | 127 | call IMAP ('BBB', "\=BibT('', '', 0)\", 'bib') 128 | call IMAP ('BBL', "\=BibT('', 'o', 0)\", 'bib') 129 | call IMAP ('BBH', "\=BibT('', 'O', 0)\", 'bib') 130 | call IMAP ('BBX', "\=BibT('', 'Ox', 0)\", 'bib') 131 | 132 | " BibT: function to generate a formatted bibtex entry {{{ 133 | " three sample usages: 134 | " :call BibT() will request type choice 135 | " :call BibT("article") preferred, provides most common fields 136 | " :call BibT("article","ox") more optional fields (o) and extras (x) 137 | " 138 | " Input Arguments: 139 | " type: is one of the types listed above. (this should be a complete name, not 140 | " the acronym). 141 | " options: a string containing 0 or more of the letters 'oOx' 142 | " where 143 | " o: include a bib entry with first set of options 144 | " O: include a bib entry with extended options 145 | " x: incude bib entry with extra options 146 | " prompt: whether the fields are asked to be filled on the command prompt or 147 | " whether place-holders are used. when prompt == 1, then comman line 148 | " questions are used. 149 | " 150 | " Returns: 151 | " a string containing a formatted bib entry 152 | function BibT(type, options, prompt) 153 | if a:type != '' 154 | let choosetype = a:type 155 | else 156 | let types = 157 | \ 'article'."\n". 158 | \ 'booklet'."\n". 159 | \ 'book'."\n". 160 | \ 'conference'."\n". 161 | \ 'inbook'."\n". 162 | \ 'incollection'."\n". 163 | \ 'inproceedings'."\n". 164 | \ 'manual'."\n". 165 | \ 'msthesis'."\n". 166 | \ 'misc'."\n". 167 | \ 'phdthesis'."\n". 168 | \ 'proceedings'."\n". 169 | \ 'techreport'."\n". 170 | \ 'unpublished' 171 | let choosetype = Tex_ChooseFromPrompt( 172 | \ "Choose the type of bibliographic entry: \n" . 173 | \ Tex_CreatePrompt(types, 3, "\n") . 174 | \ "\nEnter number or filename :", 175 | \ types, "\n") 176 | if choosetype == '' 177 | let choosetype = 'article' 178 | endif 179 | if types !~ '^\|\n'.choosetype.'$\|\n' 180 | echomsg 'Please choose only one of the given types' 181 | return 182 | endif 183 | endif 184 | if a:options != '' 185 | let options = a:options 186 | else 187 | let options = "" 188 | endif 189 | 190 | let fields = '' 191 | let extras="" 192 | let retval = "" 193 | 194 | " define fields 195 | let fields = s:{choosetype}_required 196 | if options =~ 'o' && exists('s:'.choosetype.'_optional1') 197 | let fields = fields . s:{choosetype}_optional1 198 | endif 199 | if options =~ "O" && exists('s:'.choosetype.'_optional2') 200 | if options !~ 'o'&& exists('s:'.choosetype.'_optional1') 201 | let fields = fields . s:{choosetype}_optional1 202 | endif 203 | let fields = fields . s:{choosetype}_optional2 204 | endif 205 | if options =~ "x" && exists('s:'.choosetype.'_extras') 206 | let fields = fields . extras 207 | endif 208 | if exists('g:Bib_'.choosetype.'_options') 209 | let fields = fields . g:Bib_{choosetype}_options 210 | endif 211 | 212 | let retval = s:{choosetype}_retval 213 | 214 | let i = 0 215 | while i < strlen(fields) 216 | let field = strpart(fields, i, 1) 217 | 218 | if exists('s:'.field.'_standsfor') 219 | let field_name = s:{field}_standsfor 220 | let retval = retval.field_name." = {<++>},\n" 221 | endif 222 | 223 | let i = i + 1 224 | endwhile 225 | 226 | " If the user wants even more fine-tuning... 227 | if Tex_GetVarValue('Bib_'.choosetype.'_extrafields') != '' 228 | 229 | let extrafields = Tex_GetVarValue('Bib_'.choosetype.'_extrafields') 230 | 231 | let i = 1 232 | while 1 233 | let field_name = Tex_Strntok(extrafields, "\n", i) 234 | if field_name == '' 235 | break 236 | endif 237 | 238 | let retval = retval.field_name." = {<++>},\n" 239 | 240 | let i = i + 1 241 | endwhile 242 | 243 | endif 244 | 245 | let retval = retval.'otherinfo = {<++>}'."\n" 246 | let retval = retval."}<++>"."\n" 247 | 248 | return IMAP_PutTextWithMovement(retval) 249 | endfunction 250 | 251 | " }}} 252 | function! s:Input(prompt, ask) " {{{ 253 | if a:ask == 1 254 | let retval = input(a:prompt) 255 | if retval == '' 256 | return "<++>" 257 | endif 258 | else 259 | return "<++>" 260 | endif 261 | endfunction 262 | 263 | " }}} 264 | 265 | " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 266 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/bibtools.py: -------------------------------------------------------------------------------- 1 | # Author: Srinath Avadhanula 2 | # This file is distributed as part of the vim-latex project 3 | # http://vim-latex.sf.net 4 | 5 | import re 6 | 7 | class Bibliography(dict): 8 | def __init__(self, txt, macros={}): 9 | """ 10 | txt: 11 | a string which represents the entire bibtex entry. A typical 12 | entry is of the form: 13 | @ARTICLE{ellington:84:part3, 14 | author = {Ellington, C P}, 15 | title = {The Aerodynamics of Hovering Insect Flight. III. Kinematics}, 16 | journal = {Philosophical Transactions of the Royal Society of London. Series B, Biological Sciences}, 17 | year = {1984}, 18 | volume = {305}, 19 | pages = {41-78}, 20 | number = {1122}, 21 | owner = {Srinath}, 22 | pdf = {C:\srinath\research\papers\Ellington-3-Kinematics.pdf}, 23 | timestamp = {2006.01.02}, 24 | } 25 | """ 26 | 27 | if macros: 28 | for k, v in macros.iteritems(): 29 | txt = txt.replace(k, '{'+v+'}') 30 | 31 | m = re.match(r'\s*@(\w+){\s*((\S+),)?(.*)}\s*', txt, re.MULTILINE | re.DOTALL) 32 | if not m: 33 | return None 34 | 35 | self['bibtype'] = m.group(1).capitalize() 36 | self['key'] = m.group(3) 37 | self['body'] = m.group(4) 38 | 39 | body = self['body'] 40 | self['bodytext'] = '' 41 | while 1: 42 | m = re.search(r'(\S+?)\s*=\s*(.)', body) 43 | if not m: 44 | break 45 | 46 | field = m.group(1) 47 | 48 | body = body[(m.start(2)+1):] 49 | if m.group(2) == '{': 50 | # search for the next closing brace. This is not simply a 51 | # matter of searching for the next closing brace since 52 | # braces can be nested. The following code basically goes 53 | # to the next } which has not already been closed by a 54 | # following {. 55 | mniter = re.finditer(r'{|}', body) 56 | 57 | count = 1 58 | while 1: 59 | try: 60 | mn = mniter.next() 61 | except StopIteration: 62 | return None 63 | 64 | if mn.group(0) == '{': 65 | count += 1 66 | else: 67 | count -= 1 68 | 69 | if count == 0: 70 | value = body[:(mn.start(0))] 71 | break 72 | 73 | elif m.group(2) == '"': 74 | # search for the next unquoted double-quote. To be more 75 | # precise, a double quote which is preceded by an even 76 | # number of double quotes. 77 | mn = re.search(r'(?!\\)(\\\\)*"', body) 78 | if not mn: 79 | return None 80 | 81 | value = body[:(mn.start(0))] 82 | 83 | else: 84 | # $ always matches. So we do not need to do any 85 | # error-checking. 86 | mn = re.search(r',|$', body) 87 | value = m.group(2) + body[:(mn.start(0))].rstrip() 88 | 89 | self[field.lower()] = re.sub(r'\s+', ' ', value) 90 | body = body[(mn.start(0)+1):] 91 | 92 | self['bodytext'] += (' %s: %s\n' % (field, value)) 93 | if self['bibtype'].lower() == 'string': 94 | self['macro'] = {field: value} 95 | 96 | self['bodytext'] = self['bodytext'].rstrip() 97 | 98 | 99 | def __getitem__(self, key): 100 | try: 101 | return dict.__getitem__(self, key) 102 | except KeyError: 103 | return '' 104 | 105 | def __str__(self): 106 | if self['bibtype'].lower() == 'string': 107 | return 'String: %(macro)s' % self 108 | 109 | elif self['bibtype'].lower() == 'article': 110 | return ('Article [%(key)s]\n' + 111 | 'TI "%(title)s"\n' + 112 | 'AU %(author)s\n' + 113 | 'IN In %(journal)s, %(year)s') % self 114 | 115 | elif self['bibtype'].lower() == 'conference': 116 | return ('Conference [%(key)s]\n' + 117 | 'TI "%(title)s"\n' + 118 | 'AU %(author)s\n' + 119 | 'IN In %(booktitle)s, %(year)s') % self 120 | 121 | elif self['bibtype'].lower() == 'mastersthesis': 122 | return ('Masters [%(key)s]\n' + 123 | 'TI "%(title)s"\n' + 124 | 'AU %(author)s\n' + 125 | 'IN In %(school)s, %(year)s') % self 126 | 127 | elif self['bibtype'].lower() == 'phdthesis': 128 | return ('PhD [%(key)s]\n' + 129 | 'TI "%(title)s"\n' + 130 | 'AU %(author)s\n' + 131 | 'IN In %(school)s, %(year)s') % self 132 | 133 | elif self['bibtype'].lower() == 'book': 134 | return ('Book [%(key)s]\n' + 135 | 'TI "%(title)s"\n' + 136 | 'AU %(author)s\n' + 137 | 'IN %(publisher)s, %(year)s') % self 138 | 139 | else: 140 | s = '%(bibtype)s [%(key)s]\n' % self 141 | if self['title']: 142 | s += 'TI "%(title)s"\n' % self 143 | if self['author']: 144 | s += 'AU %(author)s\n' % self 145 | for k, v in self.iteritems(): 146 | if k not in ['title', 'author', 'bibtype', 'key', 'id', 'file', 'body', 'bodytext']: 147 | s += 'MI %s: %s\n' % (k, v) 148 | 149 | return s.rstrip() 150 | 151 | def satisfies(self, filters): 152 | for field, regexp in filters: 153 | if not re.search(regexp, self[field], re.I): 154 | return False 155 | 156 | return True 157 | 158 | class BibFile: 159 | 160 | def __init__(self, filelist=''): 161 | self.bibentries = [] 162 | self.filters = [] 163 | self.macros = {} 164 | self.sortfields = [] 165 | if filelist: 166 | for f in filelist.splitlines(): 167 | self.addfile(f) 168 | 169 | def addfile(self, file): 170 | fields = open(file).read().split('@') 171 | for f in fields: 172 | if not (f and re.match('string', f, re.I)): 173 | continue 174 | 175 | b = Bibliography('@' + f) 176 | self.macros.update(b['macro']) 177 | 178 | for f in fields: 179 | if not f or re.match('string', f, re.I): 180 | continue 181 | 182 | b = Bibliography('@' + f, self.macros) 183 | if b: 184 | b['file'] = file 185 | b['id'] = len(self.bibentries) 186 | self.bibentries += [b] 187 | 188 | 189 | def addfilter(self, filterspec): 190 | self.filters += [filterspec.split()] 191 | 192 | def rmfilters(self): 193 | self.filters = [] 194 | 195 | def __str__(self): 196 | s = '' 197 | for b in self.bibentries: 198 | if b['key'] and b.satisfies(self.filters): 199 | s += '%s\n\n' % b 200 | return s 201 | 202 | def addsortfield(self, field): 203 | self.sortfields += [field] 204 | 205 | def rmsortfields(self): 206 | self.sortfields = [] 207 | 208 | def sort(self): 209 | def cmpfun(b1, b2): 210 | for f in self.sortfields: 211 | c = cmp(b1[f], b2[f]) 212 | if c: 213 | return c 214 | return 0 215 | self.bibentries.sort(cmp=cmpfun) 216 | 217 | if __name__ == "__main__": 218 | import sys 219 | 220 | bf = BibFile(sys.argv[1]) 221 | print bf 222 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/brackets.vim: -------------------------------------------------------------------------------- 1 | " ============================================================================== 2 | " History: This was originally part of auctex.vim by Carl Mueller. 3 | " Srinath Avadhanula incorporated it into latex-suite with 4 | " significant modifications. 5 | " Parts of this file may be copyrighted by others as noted. 6 | " Description: 7 | " This ftplugin provides the following maps: 8 | " . encloses the previous character in \mathbf{} 9 | " . is polymorphic as follows: 10 | " Insert mode: 11 | " 1. If the previous character is a letter or number, then capitalize it and 12 | " enclose it in \mathcal{} 13 | " 2. otherwise insert \cite{} 14 | " Visual Mode: 15 | " 1. Enclose selection in \mathcal{} 16 | " . is also polymorphic as follows: 17 | " If the character before typing is one of '([{| \left(\right 20 | " similarly for [, | 21 | " { \left\{\right\} 22 | " 2. < \langle\rangle 23 | " 3. q \lefteqn{} 24 | " otherwise insert \label{} 25 | " . inserts \item commands at the current cursor location depending on 26 | " the surrounding environment. For example, inside itemize, it will 27 | " insert a simple \item, but within a description, it will insert 28 | " \item[<+label+>] etc. 29 | " 30 | " These functions make it extremeley easy to do all the \left \right stuff in 31 | " latex. 32 | " ============================================================================== 33 | 34 | " Avoid reinclusion. 35 | if exists('b:did_brackets') 36 | finish 37 | endif 38 | let b:did_brackets = 1 39 | 40 | " define the funtions only once. 41 | if exists('*Tex_MathBF') 42 | finish 43 | endif 44 | 45 | " Tex_MathBF: encloses te previous letter/number in \mathbf{} {{{ 46 | " Description: 47 | function! Tex_MathBF() 48 | return "\\\mathbf{\}" 49 | endfunction " }}} 50 | " Tex_MathCal: enclose the previous letter/number in \mathcal {{{ 51 | " Description: 52 | " if the last character is not a letter/number, then insert \cite{} 53 | function! Tex_MathCal() 54 | let line = getline(line(".")) 55 | let char = line[col(".")-2] 56 | 57 | if char =~ '[a-zA-Z0-9]' 58 | return "\".'\mathcal{'.toupper(char).'}' 59 | else 60 | return IMAP_PutTextWithMovement('\cite{<++>}<++>') 61 | endif 62 | endfunction 63 | " }}} 64 | " Tex_LeftRight: maps in insert mode. {{{ 65 | " Description: 66 | " This is a polymorphic function, which maps the behaviour of in the 67 | " following way: 68 | " If the character before typing is one of '([{| \left(<++>\right<++> 71 | " similarly for [, | 72 | " { \left\{<++>\right\}<++> 73 | " 2. < \langle<++>\rangle<++> 74 | " 3. q \lefteqn{<++>}<++> 75 | " otherwise insert \label{<++>}<++> 76 | function! Tex_LeftRight() 77 | let line = getline(line(".")) 78 | let char = line[col(".")-2] 79 | let previous = line[col(".")-3] 80 | 81 | let matchedbrackets = '()[]{}||' 82 | if char =~ '(\|\[\|{\||' 83 | let add = '' 84 | if char =~ '{' 85 | let add = "\\" 86 | endif 87 | let rhs = matchstr(matchedbrackets, char.'\zs.\ze') 88 | return "\".IMAP_PutTextWithMovement('\left'.add.char.'<++>\right'.add.rhs.'<++>') 89 | elseif char == '<' 90 | return "\".IMAP_PutTextWithMovement('\langle <++>\rangle<++>') 91 | elseif char == 'q' 92 | return "\".IMAP_PutTextWithMovement('\lefteqn{<++>}<++>') 93 | else 94 | return IMAP_PutTextWithMovement('\label{<++>}<++>') 95 | endif 96 | endfunction " }}} 97 | " Tex_PutLeftRight: maps in normal mode {{{ 98 | " Description: 99 | " Put \left...\right in front of the matched brackets. 100 | function! Tex_PutLeftRight() 101 | let previous = getline(line("."))[col(".") - 2] 102 | let char = getline(line("."))[col(".") - 1] 103 | if previous == '\' 104 | if char == '{' 105 | exe "normal ileft\\\l%iright\\\l%" 106 | elseif char == '}' 107 | exe "normal iright\\\l%ileft\\\l%" 108 | endif 109 | elseif char =~ '\[\|(' 110 | exe "normal i\\left\l%i\\right\l%" 111 | elseif char =~ '\]\|)' 112 | exe "normal i\\right\l%i\\left\l%" 113 | endif 114 | endfunction " }}} 115 | 116 | " Provide 'd mapping for easy user customization. {{{ 117 | inoremap Tex_MathBF =Tex_MathBF() 118 | inoremap Tex_MathCal =Tex_MathCal() 119 | inoremap Tex_LeftRight =Tex_LeftRight() 120 | vnoremap Tex_MathBF `>a}` 121 | vnoremap Tex_MathCal `>a}` 122 | nnoremap Tex_LeftRight :call Tex_PutLeftRight() 123 | 124 | " }}} 125 | " Tex_SetBracketingMaps: create mappings for the current buffer {{{ 126 | function! Tex_SetBracketingMaps() 127 | 128 | call Tex_MakeMap('', 'Tex_MathBF', 'i', ' ') 129 | call Tex_MakeMap('', 'Tex_MathCal', 'i', ' ') 130 | call Tex_MakeMap('', 'Tex_LeftRight', 'i', ' ') 131 | call Tex_MakeMap('', 'Tex_MathBF', 'v', ' ') 132 | call Tex_MakeMap('', 'Tex_MathCal', 'v', ' ') 133 | call Tex_MakeMap('', 'Tex_LeftRight', 'n', ' ') 134 | 135 | endfunction 136 | " }}} 137 | 138 | augroup LatexSuite 139 | au LatexSuite User LatexSuiteFileType 140 | \ call Tex_Debug('brackets.vim: Catching LatexSuiteFileType event', 'brak') | 141 | \ call Tex_SetBracketingMaps() 142 | augroup END 143 | 144 | " vim:fdm=marker 145 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/custommacros.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " File: custommacros.vim 3 | " Author: Mikolaj Machowski 4 | " Version: 1.0 5 | " Created: Tue Apr 23 05:00 PM 2002 PST 6 | " 7 | " Description: functions for processing custom macros in the 8 | " latex-suite/macros directory 9 | "============================================================================= 10 | 11 | let s:path = expand(':p:h') 12 | 13 | " Set path to macros dir dependent on OS {{{ 14 | if has("unix") || has("macunix") 15 | let s:macrodirpath = $HOME."/.vim/ftplugin/latex-suite/macros/" 16 | elseif has("win32") 17 | if exists("$HOME") 18 | let s:macrodirpath = $HOME."/vimfiles/ftplugin/latex-suite/macros/" 19 | else 20 | let s:macrodirpath = $VIM."/vimfiles/ftplugin/latex-suite/macros/" 21 | endif 22 | endif 23 | 24 | " }}} 25 | " SetCustomMacrosMenu: sets up the menu for Macros {{{ 26 | function! SetCustomMacrosMenu() 27 | let flist = Tex_FindInRtp('', 'macros') 28 | exe 'amenu '.g:Tex_MacrosMenuLocation.'&New :call NewMacro("FFFromMMMenu")' 29 | exe 'amenu '.g:Tex_MacrosMenuLocation.'&Redraw :call RedrawMacro()' 30 | 31 | let i = 1 32 | while 1 33 | let fname = Tex_Strntok(flist, ',', i) 34 | if fname == '' 35 | break 36 | endif 37 | exe "amenu ".g:Tex_MacrosMenuLocation."&Delete.&".i.":".fname." :call DeleteMacro('".fname."')" 38 | exe "amenu ".g:Tex_MacrosMenuLocation."&Edit.&".i.":".fname." :call EditMacro('".fname."')" 39 | exe "imenu ".g:Tex_MacrosMenuLocation."&".i.":".fname." =ReadMacro('".fname."')" 40 | exe "nmenu ".g:Tex_MacrosMenuLocation."&".i.":".fname." i=ReadMacro('".fname."')" 41 | let i = i + 1 42 | endwhile 43 | endfunction 44 | 45 | if g:Tex_Menus 46 | call SetCustomMacrosMenu() 47 | endif 48 | 49 | " }}} 50 | " NewMacro: opens new file in macros directory {{{ 51 | function! NewMacro(...) 52 | " Allow for calling :TMacroNew without argument or from menu and prompt 53 | " for name. 54 | if a:0 > 0 55 | let newmacroname = a:1 56 | else 57 | let newmacroname = input("Name of new macro: ") 58 | if newmacroname == '' 59 | return 60 | endif 61 | endif 62 | 63 | if newmacroname == "FFFromMMMenu" 64 | " Check if NewMacro was called from menu and prompt for insert macro 65 | " name 66 | let newmacroname = input("Name of new macro: ") 67 | if newmacroname == '' 68 | return 69 | endif 70 | elseif Tex_FindInRtp(newmacroname, 'macros') != '' 71 | " If macro with this name already exists, prompt for another name. 72 | exe "echomsg 'Macro ".newmacroname." already exists. Try another name.'" 73 | let newmacroname = input("Name of new macro: ") 74 | if newmacroname == '' 75 | return 76 | endif 77 | endif 78 | exec 'split '.Tex_EscapeSpaces(s:macrodirpath.newmacroname) 79 | setlocal filetype=tex 80 | endfunction 81 | 82 | " }}} 83 | " RedrawMacro: refreshes macro menu {{{ 84 | function! RedrawMacro() 85 | aunmenu TeX-Suite.Macros 86 | call SetCustomMacrosMenu() 87 | endfunction 88 | 89 | " }}} 90 | " ChooseMacro: choose a macro file {{{ 91 | " " Description: 92 | function! s:ChooseMacro(ask) 93 | let filelist = Tex_FindInRtp('', 'macros') 94 | let filename = Tex_ChooseFromPrompt( 95 | \ a:ask."\n" . 96 | \ Tex_CreatePrompt(filelist, 2, ',') . 97 | \ "\nEnter number or filename :", 98 | \ filelist, ',') 99 | endfunction 100 | 101 | " }}} 102 | " DeleteMacro: deletes macro file {{{ 103 | function! DeleteMacro(...) 104 | if a:0 > 0 105 | let filename = a:1 106 | else 107 | let filename = s:ChooseMacro('Choose a macro file for deletion :') 108 | endif 109 | 110 | if !filereadable(s:macrodirpath.filename) 111 | " When file is not in local directory decline to remove it. 112 | call confirm('This file is not in your local directory: '.filename."\n". 113 | \ 'It will not be deleted.' , '&OK', 1) 114 | 115 | else 116 | let ch = confirm('Really delete '.filename.' ?', "&Yes\n&No", 2) 117 | if ch == 1 118 | call delete(s:macrodirpath.filename) 119 | endif 120 | call RedrawMacro() 121 | endif 122 | endfunction 123 | 124 | " }}} 125 | " EditMacro: edits macro file {{{ 126 | function! EditMacro(...) 127 | if a:0 > 0 128 | let filename = a:1 129 | else 130 | let filename = s:ChooseMacro('Choose a macro file for insertion:') 131 | endif 132 | 133 | if filereadable(s:macrodirpath.filename) 134 | " If file exists in local directory open it. 135 | exec 'split '.Tex_EscapeSpaces(s:macrodirpath.filename) 136 | else 137 | " But if file doesn't exist in local dir it probably is in user 138 | " restricted area. Instead opening try to copy it to local dir. 139 | " Pity VimL doesn't have mkdir() function :) 140 | let ch = confirm("You are trying to edit file which is probably read-only.\n". 141 | \ "It will be copied to your local LaTeX-Suite macros directory\n". 142 | \ "and you will be operating on local copy with suffix -local.\n". 143 | \ "It will succeed only if ftplugin/latex-suite/macros dir exists.\n". 144 | \ "Do you agree?", "&Yes\n&No", 1) 145 | if ch == 1 146 | " But there is possibility we already created local modification. 147 | " Check it and offer opening this file. 148 | if filereadable(s:macrodirpath.filename.'-local') 149 | let ch = confirm('Local version of '.filename." already exists.\n". 150 | \ 'Do you want to open it or overwrite with original version?', 151 | \ "&Open\nOver&write\n&Cancel", 1) 152 | if ch == 1 153 | exec 'split '.Tex_EscapeSpaces(s:macrodirpath.filename.'-local') 154 | elseif ch == 2 155 | new 156 | exe '0read '.Tex_FindInRtp(filename, 'macros') 157 | " This is possible macro was edited before, wipe it out. 158 | if bufexists(s:macrodirpath.filename.'-local') 159 | exe 'bwipe '.s:macrodirpath.filename.'-local' 160 | endif 161 | exe 'write! '.s:macrodirpath.filename.'-local' 162 | else 163 | return 164 | endif 165 | else 166 | " If file doesn't exist, open new file, read in system macro and 167 | " save it in local macro dir with suffix -local 168 | new 169 | exe '0read '.Tex_FindInRtp(filename, 'macros') 170 | exe 'write '.s:macrodirpath.filename.'-local' 171 | endif 172 | endif 173 | 174 | endif 175 | setlocal filetype=tex 176 | endfunction 177 | 178 | " }}} 179 | " ReadMacro: reads in a macro from a macro file. {{{ 180 | " allowing for placement via placeholders. 181 | function! ReadMacro(...) 182 | 183 | if a:0 > 0 184 | let filename = a:1 185 | else 186 | let filelist = Tex_FindInRtp('', 'macros') 187 | let filename = 188 | \ Tex_ChooseFromPrompt("Choose a macro file:\n" . 189 | \ Tex_CreatePrompt(filelist, 2, ',') . 190 | \ "\nEnter number or name of file :", 191 | \ filelist, ',') 192 | endif 193 | 194 | let fname = Tex_FindInRtp(filename, 'macros', ':p') 195 | 196 | let markerString = '<---- Latex Suite End Macro ---->' 197 | let _a = @a 198 | silent! call append(line('.'), markerString) 199 | silent! exec "read ".fname 200 | silent! exec "normal! V/^".markerString."$/-1\\"ax" 201 | " This is kind of tricky: At this stage, we are one line after the one we 202 | " started from with the marker text on it. We need to 203 | " 1. remove the marker and the line. 204 | " 2. get focus to the previous line. 205 | " 3. not remove anything from the previous line. 206 | silent! exec "normal! $v0k$\"_x" 207 | 208 | call Tex_CleanSearchHistory() 209 | 210 | let @a = substitute(@a, '['."\n\r\t ".']*$', '', '') 211 | let textWithMovement = IMAP_PutTextWithMovement(@a) 212 | let @a = _a 213 | 214 | return textWithMovement 215 | 216 | endfunction 217 | 218 | " }}} 219 | " commands for macros {{{ 220 | com! -nargs=? TMacroNew :call NewMacro() 221 | 222 | " This macros had to have 2 versions: 223 | if v:version >= 602 224 | com! -complete=custom,Tex_CompleteMacroName -nargs=? TMacro 225 | \ :let s:retVal = ReadMacro() normal! i=s:retVal 226 | com! -complete=custom,Tex_CompleteMacroName -nargs=? TMacroEdit 227 | \ :call EditMacro() 228 | com! -complete=custom,Tex_CompleteMacroName -nargs=? TMacroDelete 229 | \ :call DeleteMacro() 230 | 231 | " Tex_CompleteMacroName: for completing names in TMacro... commands {{{ 232 | " Description: get list of macro names with Tex_FindInRtp(), remove full path 233 | " and return list of names separated with newlines. 234 | " 235 | function! Tex_CompleteMacroName(A,P,L) 236 | " Get name of macros from all runtimepath directories 237 | let macronames = Tex_FindInRtp('', 'macros') 238 | " Separate names with \n not , 239 | let macronames = substitute(macronames,',','\n','g') 240 | return macronames 241 | endfunction 242 | 243 | " }}} 244 | 245 | else 246 | com! -nargs=? TMacro 247 | \ :let s:retVal = ReadMacro() normal! i=s:retVal 248 | com! -nargs=? TMacroEdit :call EditMacro() 249 | com! -nargs=? TMacroDelete :call DeleteMacro() 250 | 251 | endif 252 | 253 | " }}} 254 | 255 | " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 256 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/diacritics.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " File: diacritics.vim 3 | " Author: Lubomir Host 4 | " Created: Tue Apr 23 07:00 PM 2002 PST 5 | " 6 | " Description: shortcuts for all diacritics. 7 | "============================================================================= 8 | 9 | if !g:Tex_Diacritics 10 | finish 11 | endif 12 | 13 | " \'{a} {{{ 14 | call IMAP ('=a', "\\\'{a}", 'tex') 15 | call IMAP ('=b', "\\'{b}", 'tex') 16 | call IMAP ('=c', "\\'{c}", 'tex') 17 | call IMAP ('=d', "\\'{d}", 'tex') 18 | call IMAP ('=e', "\\'{e}", 'tex') 19 | call IMAP ('=f', "\\'{f}", 'tex') 20 | call IMAP ('=g', "\\'{g}", 'tex') 21 | call IMAP ('=h', "\\'{h}", 'tex') 22 | call IMAP ('=i', "\\'{\i}", 'tex') 23 | call IMAP ('=j', "\\'{j}", 'tex') 24 | call IMAP ('=k', "\\'{k}", 'tex') 25 | call IMAP ('=l', "\\'{l}", 'tex') 26 | call IMAP ('=m', "\\'{m}", 'tex') 27 | call IMAP ('=n', "\\'{n}", 'tex') 28 | call IMAP ('=o', "\\'{o}", 'tex') 29 | call IMAP ('=p', "\\'{p}", 'tex') 30 | call IMAP ('=q', "\\'{q}", 'tex') 31 | call IMAP ('=r', "\\'{r}", 'tex') 32 | call IMAP ('=s', "\\'{s}", 'tex') 33 | call IMAP ('=t', "\\'{t}", 'tex') 34 | call IMAP ('=u', "\\'{u}", 'tex') 35 | call IMAP ('=v', "\\'{v}", 'tex') 36 | call IMAP ('=w', "\\'{w}", 'tex') 37 | call IMAP ('=x', "\\'{x}", 'tex') 38 | call IMAP ('=y', "\\'{y}", 'tex') 39 | call IMAP ('=z', "\\'{z}", 'tex') 40 | call IMAP ('=A', "\\'{A}", 'tex') 41 | call IMAP ('=B', "\\'{B}", 'tex') 42 | call IMAP ('=C', "\\'{C}", 'tex') 43 | call IMAP ('=D', "\\'{D}", 'tex') 44 | call IMAP ('=E', "\\'{E}", 'tex') 45 | call IMAP ('=F', "\\'{F}", 'tex') 46 | call IMAP ('=G', "\\'{G}", 'tex') 47 | call IMAP ('=H', "\\'{H}", 'tex') 48 | call IMAP ('=I', "\\'{\I}", 'tex') 49 | call IMAP ('=J', "\\'{J}", 'tex') 50 | call IMAP ('=K', "\\'{K}", 'tex') 51 | call IMAP ('=L', "\\'{L}", 'tex') 52 | call IMAP ('=M', "\\'{M}", 'tex') 53 | call IMAP ('=N', "\\'{N}", 'tex') 54 | call IMAP ('=O', "\\'{O}", 'tex') 55 | call IMAP ('=P', "\\'{P}", 'tex') 56 | call IMAP ('=Q', "\\'{Q}", 'tex') 57 | call IMAP ('=R', "\\'{R}", 'tex') 58 | call IMAP ('=S', "\\'{S}", 'tex') 59 | call IMAP ('=T', "\\'{T}", 'tex') 60 | call IMAP ('=U', "\\'{U}", 'tex') 61 | call IMAP ('=V', "\\'{V}", 'tex') 62 | call IMAP ('=W', "\\'{W}", 'tex') 63 | call IMAP ('=X', "\\'{X}", 'tex') 64 | call IMAP ('=Y', "\\'{Y}", 'tex') 65 | call IMAP ('=Z', "\\'{Z}", 'tex') 66 | " }}} 67 | " \v{a} {{{ 68 | call IMAP ('+a', "\\v{a}", 'tex') 69 | call IMAP ('+b', "\\v{b}", 'tex') 70 | call IMAP ('+c', "\\v{c}", 'tex') 71 | call IMAP ('+d', "\\v{d}", 'tex') 72 | call IMAP ('+e', "\\v{e}", 'tex') 73 | call IMAP ('+f', "\\v{f}", 'tex') 74 | call IMAP ('+g', "\\v{g}", 'tex') 75 | call IMAP ('+h', "\\v{h}", 'tex') 76 | call IMAP ('+i', "\\v{\i}", 'tex') 77 | call IMAP ('+j', "\\v{j}", 'tex') 78 | call IMAP ('+k', "\\v{k}", 'tex') 79 | call IMAP ('+l', "\\q l", 'tex') 80 | call IMAP ('+m', "\\v{m}", 'tex') 81 | call IMAP ('+n', "\\v{n}", 'tex') 82 | call IMAP ('+o', "\\v{o}", 'tex') 83 | call IMAP ('+p', "\\v{p}", 'tex') 84 | call IMAP ('+q', "\\v{q}", 'tex') 85 | call IMAP ('+r', "\\v{r}", 'tex') 86 | call IMAP ('+s', "\\v{s}", 'tex') 87 | call IMAP ('+t', "\\q t", 'tex') 88 | call IMAP ('+u', "\\v{u}", 'tex') 89 | call IMAP ('+v', "\\v{v}", 'tex') 90 | call IMAP ('+w', "\\v{w}", 'tex') 91 | call IMAP ('+x', "\\v{x}", 'tex') 92 | call IMAP ('+y', "\\v{y}", 'tex') 93 | call IMAP ('+z', "\\v{z}", 'tex') 94 | call IMAP ('+A', "\\v{A}", 'tex') 95 | call IMAP ('+B', "\\v{B}", 'tex') 96 | call IMAP ('+C', "\\v{C}", 'tex') 97 | call IMAP ('+D', "\\v{D}", 'tex') 98 | call IMAP ('+E', "\\v{E}", 'tex') 99 | call IMAP ('+F', "\\v{F}", 'tex') 100 | call IMAP ('+G', "\\v{G}", 'tex') 101 | call IMAP ('+H', "\\v{H}", 'tex') 102 | call IMAP ('+I', "\\v{\I}", 'tex') 103 | call IMAP ('+J', "\\v{J}", 'tex') 104 | call IMAP ('+K', "\\v{K}", 'tex') 105 | call IMAP ('+L', "\\v{L}", 'tex') 106 | call IMAP ('+M', "\\v{M}", 'tex') 107 | call IMAP ('+N', "\\v{N}", 'tex') 108 | call IMAP ('+O', "\\v{O}", 'tex') 109 | call IMAP ('+P', "\\v{P}", 'tex') 110 | call IMAP ('+Q', "\\v{Q}", 'tex') 111 | call IMAP ('+R', "\\v{R}", 'tex') 112 | call IMAP ('+S', "\\v{S}", 'tex') 113 | call IMAP ('+T', "\\v{T}", 'tex') 114 | call IMAP ('+U', "\\v{U}", 'tex') 115 | call IMAP ('+V', "\\v{V}", 'tex') 116 | call IMAP ('+W', "\\v{W}", 'tex') 117 | call IMAP ('+X', "\\v{X}", 'tex') 118 | call IMAP ('+Y', "\\v{Y}", 'tex') 119 | call IMAP ('+Z', "\\v{Z}", 'tex') 120 | " }}} 121 | call IMAP ('+}', "\\\"{a}", 'tex') 122 | call IMAP ('+:', "\\^{o}", 'tex') 123 | 124 | " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 125 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/dictionaries/SIunits: -------------------------------------------------------------------------------- 1 | addprefix 2 | addunit 3 | ampere 4 | amperemetresecond 5 | amperepermetre 6 | amperepermetrenp 7 | amperepersquaremetre 8 | amperepersquaremetrenp 9 | angstrom 10 | arad 11 | arcminute 12 | arcsecond 13 | are 14 | atomicmass 15 | atto 16 | attod 17 | barn 18 | bbar 19 | becquerel 20 | becquerelbase 21 | bel 22 | candela 23 | candelapersquaremetre 24 | candelapersquaremetrenp 25 | celsius 26 | Celsius 27 | celsiusbase 28 | centi 29 | centid 30 | coulomb 31 | coulombbase 32 | coulombpercubicmetre 33 | coulombpercubicmetrenp 34 | coulombperkilogram 35 | coulombperkilogramnp 36 | coulombpermol 37 | coulombpermolnp 38 | coulombpersquaremetre 39 | coulombpersquaremetrenp 40 | cubed 41 | cubic 42 | cubicmetre 43 | cubicmetreperkilogram 44 | cubicmetrepersecond 45 | curie 46 | dday 47 | deca 48 | decad 49 | deci 50 | decid 51 | degree 52 | degreecelsius 53 | deka 54 | dekad 55 | derbecquerel 56 | dercelsius 57 | dercoulomb 58 | derfarad 59 | dergray 60 | derhenry 61 | derhertz 62 | derjoule 63 | derkatal 64 | derlumen 65 | derlux 66 | dernewton 67 | derohm 68 | derpascal 69 | derradian 70 | dersiemens 71 | dersievert 72 | dersteradian 73 | dertesla 74 | dervolt 75 | derwatt 76 | derweber 77 | electronvolt 78 | exa 79 | exad 80 | farad 81 | faradbase 82 | faradpermetre 83 | faradpermetrenp 84 | femto 85 | femtod 86 | fourth 87 | gal 88 | giga 89 | gigad 90 | gram 91 | graybase 92 | graypersecond 93 | graypersecondnp 94 | hectare 95 | hecto 96 | hectod 97 | henry 98 | henrybase 99 | henrypermetre 100 | henrypermetrenp 101 | hertz 102 | hertzbase 103 | hour 104 | joule 105 | joulebase 106 | joulepercubicmetre 107 | joulepercubicmetrenp 108 | jouleperkelvin 109 | jouleperkelvinnp 110 | jouleperkilogram 111 | jouleperkilogramkelvin 112 | jouleperkilogramkelvinnp 113 | jouleperkilogramnp 114 | joulepermole 115 | joulepermolekelvin 116 | joulepermolekelvinnp 117 | joulepermolenp 118 | joulepersquaremetre 119 | joulepersquaremetrenp 120 | joulepertesla 121 | jouleperteslanp 122 | katal 123 | katalbase 124 | katalpercubicmetre 125 | katalpercubicmetrenp 126 | kelvin 127 | kilo 128 | kilod 129 | kilogram 130 | kilogrammetrepersecond 131 | kilogrammetrepersecondnp 132 | kilogrammetrepersquaresecond 133 | kilogrammetrepersquaresecondnp 134 | kilogrampercubicmetre 135 | kilogrampercubicmetrecoulomb 136 | kilogrampercubicmetrecoulombnp 137 | kilogrampercubicmetrenp 138 | kilogramperkilomole 139 | kilogramperkilomolenp 140 | kilogrampermetre 141 | kilogrampermetrenp 142 | kilogrampersecond 143 | kilogrampersecondcubicmetre 144 | kilogrampersecondcubicmetrenp 145 | kilogrampersecondnp 146 | kilogrampersquaremetre 147 | kilogrampersquaremetrenp 148 | kilogrampersquaremetresecond 149 | kilogrampersquaremetresecondnp 150 | kilogramsquaremetre 151 | kilogramsquaremetrenp 152 | kilogramsquaremetrepersecond 153 | kilogramsquaremetrepersecondnp 154 | kilowatthour 155 | liter 156 | litre 157 | lumen 158 | lumenbase 159 | lux 160 | luxbase 161 | mega 162 | megad 163 | meter 164 | metre 165 | metrepersecond 166 | metrepersecondnp 167 | metrepersquaresecond 168 | metrepersquaresecondnp 169 | micro 170 | microd 171 | milli 172 | millid 173 | minute 174 | mole 175 | molepercubicmetre 176 | molepercubicmetrenp 177 | nano 178 | nanod 179 | neper 180 | newton 181 | newtonbase 182 | newtonmetre 183 | newtonpercubicmetre 184 | newtonpercubicmetrenp 185 | newtonperkilogram 186 | newtonperkilogramnp 187 | newtonpermetre 188 | newtonpermetrenp 189 | newtonpersquaremetre 190 | newtonpersquaremetrenp 191 | NoAMS 192 | no@qsk 193 | ohm 194 | ohmbase 195 | ohmmetre 196 | one 197 | paminute 198 | pascal 199 | pascalbase 200 | pascalsecond 201 | pasecond 202 | per 203 | period@active 204 | persquaremetresecond 205 | persquaremetresecondnp 206 | peta 207 | petad 208 | pico 209 | picod 210 | power 211 | @qsk 212 | quantityskip 213 | rad 214 | radian 215 | radianbase 216 | radianpersecond 217 | radianpersecondnp 218 | radianpersquaresecond 219 | radianpersquaresecondnp 220 | reciprocal 221 | rem 222 | roentgen 223 | rp 224 | rpcubed 225 | rpcubic 226 | rpcubicmetreperkilogram 227 | rpcubicmetrepersecond 228 | rperminute 229 | rpersecond 230 | rpfourth 231 | rpsquare 232 | rpsquared 233 | rpsquaremetreperkilogram 234 | second 235 | siemens 236 | siemensbase 237 | sievert 238 | sievertbase 239 | square 240 | squared 241 | squaremetre 242 | squaremetrepercubicmetre 243 | squaremetrepercubicmetrenp 244 | squaremetrepercubicsecond 245 | squaremetrepercubicsecondnp 246 | squaremetreperkilogram 247 | squaremetrepernewtonsecond 248 | squaremetrepernewtonsecondnp 249 | squaremetrepersecond 250 | squaremetrepersecondnp 251 | squaremetrepersquaresecond 252 | squaremetrepersquaresecondnp 253 | steradian 254 | steradianbase 255 | tera 256 | terad 257 | tesla 258 | teslabase 259 | ton 260 | tonne 261 | unit 262 | unitskip 263 | usk 264 | volt 265 | voltbase 266 | voltpermetre 267 | voltpermetrenp 268 | watt 269 | wattbase 270 | wattpercubicmetre 271 | wattpercubicmetrenp 272 | wattperkilogram 273 | wattperkilogramnp 274 | wattpermetrekelvin 275 | wattpermetrekelvinnp 276 | wattpersquaremetre 277 | wattpersquaremetrenp 278 | wattpersquaremetresteradian 279 | wattpersquaremetresteradiannp 280 | weber 281 | weberbase 282 | yocto 283 | yoctod 284 | yotta 285 | yottad 286 | zepto 287 | zeptod 288 | zetta 289 | zettad 290 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/macros/example: -------------------------------------------------------------------------------- 1 | % my long complicated macro. This is an example of how to set up a 2 | % tex-macro for latex-suite. simply type in the lines as you would in 3 | % latex. Place holders are allowed. 4 | % NOTE: if you have filetype indentation turned on, then do not do 5 | % formatting here. the indentation will follow automatically... 6 | \begin{mycomplicatedenvironment} 7 | \mycommand1{<++>} 8 | \mycommand2{<+hint2+>} 9 | \mycommand3{<++>} 10 | \mycommand4{<++>} 11 | \end{mycomplicatedenvironment}<++> 12 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/mathmacros.vim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcf/vim-latex/a939dbb881e53c595092d925a275ea63962b3890/ftplugin/latex-suite/mathmacros.vim -------------------------------------------------------------------------------- /ftplugin/latex-suite/multicompile.vim: -------------------------------------------------------------------------------- 1 | " ============================================================================ 2 | " File: multicompile.vim 3 | " Author: Srinath Avadhanula 4 | " Created: Sat Jul 05 03:00 PM 2003 5 | " Description: compile a .tex file multiple times to get cross references 6 | " right. 7 | " License: Vim Charityware License 8 | " Part of vim-latexSuite: http://vim-latex.sourceforge.net 9 | " ============================================================================ 10 | 11 | " The contents of this file have been moved to compiler.vim, the file which 12 | " contains all functions relevant to compiling and viewing. 13 | " This file is kept empty on purpose so that it will over-write previous 14 | " versions of multicompile.vim, therby preventing conflicts. 15 | 16 | " vim:fdm=marker:nowrap:noet:ff=unix:ts=4:sw=4 17 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/outline.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # Part of Latex-Suite 4 | # 5 | # Copyright: Srinath Avadhanula 6 | # Description: 7 | # This file implements a simple outline creation for latex documents. 8 | 9 | import re 10 | import os 11 | import sys 12 | import StringIO 13 | 14 | # getFileContents {{{ 15 | def getFileContents(fname): 16 | if type(fname) is not str: 17 | fname = fname.group(3) 18 | 19 | # If neither the file or file.tex exists, then we just give up. 20 | if not os.path.isfile(fname): 21 | if os.path.isfile(fname + '.tex'): 22 | fname += '.tex' 23 | else: 24 | return '' 25 | 26 | try: 27 | # This longish thing is to make sure that all files are converted into 28 | # \n seperated lines. 29 | contents = '\n'.join(open(fname).read().splitlines()) 30 | except IOError: 31 | return '' 32 | 33 | # TODO what are all the ways in which a tex file can include another? 34 | pat = re.compile(r'^\\(@?)(include|input){(.*?)}', re.M) 35 | contents = re.sub(pat, getFileContents, contents) 36 | 37 | return ('%%==== FILENAME: %s' % fname) + '\n' + contents 38 | 39 | # }}} 40 | # stripComments {{{ 41 | def stripComments(contents): 42 | # remove all comments except those of the form 43 | # %%==== FILENAME: 44 | # BUG: This comment right after a new paragraph is not recognized: foo\\%comment 45 | uncomm = [re.sub('(?%s\n' % (filename, line) 60 | 61 | return retval 62 | # }}} 63 | # getSectionLabels_Root {{{ 64 | def getSectionLabels_Root(lineinfo, section_prefix, label_prefix): 65 | prev_txt = '' 66 | inside_env = 0 67 | prev_env = '' 68 | outstr = StringIO.StringIO('') 69 | pres_depth = len(section_prefix) 70 | 71 | #print '+getSectionLabels_Root: lineinfo = [%s]' % lineinfo 72 | for line in lineinfo.splitlines(): 73 | if not line: 74 | continue 75 | 76 | # throw away leading white-space 77 | m = re.search('<(.*?)>(.*)', line) 78 | 79 | fname = m.group(1) 80 | line = m.group(2).lstrip() 81 | 82 | # we found a label! 83 | m = re.search(r'\\label{(%s.*?)}' % label_prefix, line) 84 | if m: 85 | # add the current line (except the \label command) to the text 86 | # which will be displayed below this label 87 | prev_txt += re.search(r'(^.*?)\\label{', line).group(1) 88 | 89 | # for the figure environment however, just display the caption. 90 | # instead of everything since the \begin command. 91 | if prev_env == 'figure': 92 | cm = re.search(r'\caption(\[.*?\]\s*)?{(.*?)}', prev_txt) 93 | if cm: 94 | prev_txt = cm.group(2) 95 | 96 | # print a nice formatted text entry like so 97 | # 98 | # > eqn:label 99 | # : e^{i\pi} + 1 = 0 100 | # 101 | # Use the current "section depth" for the leading indentation. 102 | print >>outstr, '>%s%s\t\t<%s>' % (' '*(2*pres_depth+2), 103 | m.group(1), fname) 104 | print >>outstr, ':%s%s' % (' '*(2*pres_depth+4), prev_txt) 105 | prev_txt = '' 106 | 107 | # If we just encoutered the start or end of an environment or a 108 | # label, then do not remember this line. 109 | # NOTE: This assumes that there is no equation text on the same 110 | # line as the \begin or \end command. The text on the same line as 111 | # the \label was already handled. 112 | if re.search(r'\\begin{(equation|eqnarray|align|figure)', line): 113 | prev_txt = '' 114 | prev_env = re.search(r'\\begin{(.*?)}', line).group(1) 115 | inside_env = 1 116 | 117 | elif re.search(r'\\label', line): 118 | prev_txt = '' 119 | 120 | elif re.search(r'\\end{(equation|eqnarray|align|figure)', line): 121 | inside_env = 0 122 | prev_env = '' 123 | 124 | else: 125 | # If we are inside an environment, then the text displayed with 126 | # the label is the complete text within the environment, 127 | # otherwise its just the previous line. 128 | if inside_env: 129 | prev_txt += line 130 | else: 131 | prev_txt = line 132 | 133 | return outstr.getvalue() 134 | 135 | # }}} 136 | # getSectionLabels {{{ 137 | def getSectionLabels(lineinfo, 138 | sectypes=['chapter', 'section', 'subsection', 'subsubsection'], 139 | section_prefix='', label_prefix=''): 140 | 141 | if not sectypes: 142 | return getSectionLabels_Root(lineinfo, section_prefix, label_prefix) 143 | 144 | ##print 'sectypes[0] = %s, section_prefix = [%s], lineinfo = [%s]' % ( 145 | ## sectypes[0], section_prefix, lineinfo) 146 | 147 | sections = re.split(r'(<.*?>\\%s{.*})' % sectypes[0], lineinfo) 148 | 149 | # there will 1+2n sections, the first containing the "preamble" and the 150 | # others containing the child sections as paris of [section_name, 151 | # section_text] 152 | 153 | rettext = getSectionLabels(sections[0], sectypes[1:], section_prefix, label_prefix) 154 | 155 | for i in range(1,len(sections),2): 156 | sec_num = (i+1)/2 157 | section_name = re.search(r'\\%s{(.*?)}' % sectypes[0], sections[i]).group(1) 158 | section_label_text = getSectionLabels(sections[i] + sections[i+1], sectypes[1:], 159 | section_prefix+('%d.' % sec_num), label_prefix) 160 | 161 | if section_label_text: 162 | sec_heading = 2*' '*len(section_prefix) + section_prefix 163 | sec_heading += '%d. %s' % (sec_num, section_name) 164 | sec_heading += '<<<%d\n' % (len(section_prefix)/2+1) 165 | 166 | rettext += sec_heading + section_label_text 167 | 168 | return rettext 169 | 170 | # }}} 171 | 172 | # main {{{ 173 | def main(fname, label_prefix): 174 | [head, tail] = os.path.split(fname) 175 | if head: 176 | os.chdir(head) 177 | 178 | contents = getFileContents(fname) 179 | nonempty = stripComments(contents) 180 | lineinfo = addFileNameAndNumber(nonempty) 181 | 182 | return getSectionLabels(lineinfo, label_prefix=label_prefix) 183 | # }}} 184 | 185 | if __name__ == "__main__": 186 | if len(sys.argv) > 2: 187 | prefix = sys.argv[2] 188 | else: 189 | prefix = '' 190 | 191 | print main(sys.argv[1], prefix) 192 | 193 | 194 | # vim: fdm=marker 195 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/SIunits: -------------------------------------------------------------------------------- 1 | if exists("SIunits_package_file") 2 | finish 3 | endif 4 | let SIunits_package_file = 1 5 | 6 | let g:TeX_package_SIunits = 7 | \'nor:addprefix,'. 8 | \'nor:addunit,'. 9 | \'nor:ampere,'. 10 | \'nor:amperemetresecond,'. 11 | \'nor:amperepermetre,'. 12 | \'nor:amperepermetrenp,'. 13 | \'nor:amperepersquaremetre,'. 14 | \'nor:amperepersquaremetrenp,'. 15 | \'nor:angstrom,'. 16 | \'nor:arad,'. 17 | \'nor:arcminute,'. 18 | \'nor:arcsecond,'. 19 | \'nor:are,'. 20 | \'nor:atomicmass,'. 21 | \'nor:atto,'. 22 | \'nor:attod,'. 23 | \'nor:barn,'. 24 | \'nor:bbar,'. 25 | \'nor:becquerel,'. 26 | \'nor:becquerelbase,'. 27 | \'nor:bel,'. 28 | \'nor:candela,'. 29 | \'nor:candelapersquaremetre,'. 30 | \'nor:candelapersquaremetrenp,'. 31 | \'nor:celsius,'. 32 | \'nor:Celsius,'. 33 | \'nor:celsiusbase,'. 34 | \'nor:centi,'. 35 | \'nor:centid,'. 36 | \'nor:coulomb,'. 37 | \'nor:coulombbase,'. 38 | \'nor:coulombpercubicmetre,'. 39 | \'nor:coulombpercubicmetrenp,'. 40 | \'nor:coulombperkilogram,'. 41 | \'nor:coulombperkilogramnp,'. 42 | \'nor:coulombpermol,'. 43 | \'nor:coulombpermolnp,'. 44 | \'nor:coulombpersquaremetre,'. 45 | \'nor:coulombpersquaremetrenp,'. 46 | \'nor:cubed,'. 47 | \'nor:cubic,'. 48 | \'nor:cubicmetre,'. 49 | \'nor:cubicmetreperkilogram,'. 50 | \'nor:cubicmetrepersecond,'. 51 | \'nor:curie,'. 52 | \'nor:dday,'. 53 | \'nor:deca,'. 54 | \'nor:decad,'. 55 | \'nor:deci,'. 56 | \'nor:decid,'. 57 | \'nor:degree,'. 58 | \'nor:degreecelsius,'. 59 | \'nor:deka,'. 60 | \'nor:dekad,'. 61 | \'nor:derbecquerel,'. 62 | \'nor:dercelsius,'. 63 | \'nor:dercoulomb,'. 64 | \'nor:derfarad,'. 65 | \'nor:dergray,'. 66 | \'nor:derhenry,'. 67 | \'nor:derhertz,'. 68 | \'nor:derjoule,'. 69 | \'nor:derkatal,'. 70 | \'nor:derlumen,'. 71 | \'nor:derlux,'. 72 | \'nor:dernewton,'. 73 | \'nor:derohm,'. 74 | \'nor:derpascal,'. 75 | \'nor:derradian,'. 76 | \'nor:dersiemens,'. 77 | \'nor:dersievert,'. 78 | \'nor:dersteradian,'. 79 | \'nor:dertesla,'. 80 | \'nor:dervolt,'. 81 | \'nor:derwatt,'. 82 | \'nor:derweber,'. 83 | \'nor:electronvolt,'. 84 | \'nor:exa,'. 85 | \'nor:exad,'. 86 | \'nor:farad,'. 87 | \'nor:faradbase,'. 88 | \'nor:faradpermetre,'. 89 | \'nor:faradpermetrenp,'. 90 | \'nor:femto,'. 91 | \'nor:femtod,'. 92 | \'nor:fourth,'. 93 | \'nor:gal,'. 94 | \'nor:giga,'. 95 | \'nor:gigad,'. 96 | \'nor:gram,'. 97 | \'nor:graybase,'. 98 | \'nor:graypersecond,'. 99 | \'nor:graypersecondnp,'. 100 | \'nor:hectare,'. 101 | \'nor:hecto,'. 102 | \'nor:hectod,'. 103 | \'nor:henry,'. 104 | \'nor:henrybase,'. 105 | \'nor:henrypermetre,'. 106 | \'nor:henrypermetrenp,'. 107 | \'nor:hertz,'. 108 | \'nor:hertzbase,'. 109 | \'nor:hour,'. 110 | \'nor:joule,'. 111 | \'nor:joulebase,'. 112 | \'nor:joulepercubicmetre,'. 113 | \'nor:joulepercubicmetrenp,'. 114 | \'nor:jouleperkelvin,'. 115 | \'nor:jouleperkelvinnp,'. 116 | \'nor:jouleperkilogram,'. 117 | \'nor:jouleperkilogramkelvin,'. 118 | \'nor:jouleperkilogramkelvinnp,'. 119 | \'nor:jouleperkilogramnp,'. 120 | \'nor:joulepermole,'. 121 | \'nor:joulepermolekelvin,'. 122 | \'nor:joulepermolekelvinnp,'. 123 | \'nor:joulepermolenp,'. 124 | \'nor:joulepersquaremetre,'. 125 | \'nor:joulepersquaremetrenp,'. 126 | \'nor:joulepertesla,'. 127 | \'nor:jouleperteslanp,'. 128 | \'nor:katal,'. 129 | \'nor:katalbase,'. 130 | \'nor:katalpercubicmetre,'. 131 | \'nor:katalpercubicmetrenp,'. 132 | \'nor:kelvin,'. 133 | \'nor:kilo,'. 134 | \'nor:kilod,'. 135 | \'nor:kilogram,'. 136 | \'nor:kilogrammetrepersecond,'. 137 | \'nor:kilogrammetrepersecondnp,'. 138 | \'nor:kilogrammetrepersquaresecond,'. 139 | \'nor:kilogrammetrepersquaresecondnp,'. 140 | \'nor:kilogrampercubicmetre,'. 141 | \'nor:kilogrampercubicmetrecoulomb,'. 142 | \'nor:kilogrampercubicmetrecoulombnp,'. 143 | \'nor:kilogrampercubicmetrenp,'. 144 | \'nor:kilogramperkilomole,'. 145 | \'nor:kilogramperkilomolenp,'. 146 | \'nor:kilogrampermetre,'. 147 | \'nor:kilogrampermetrenp,'. 148 | \'nor:kilogrampersecond,'. 149 | \'nor:kilogrampersecondcubicmetre,'. 150 | \'nor:kilogrampersecondcubicmetrenp,'. 151 | \'nor:kilogrampersecondnp,'. 152 | \'nor:kilogrampersquaremetre,'. 153 | \'nor:kilogrampersquaremetrenp,'. 154 | \'nor:kilogrampersquaremetresecond,'. 155 | \'nor:kilogrampersquaremetresecondnp,'. 156 | \'nor:kilogramsquaremetre,'. 157 | \'nor:kilogramsquaremetrenp,'. 158 | \'nor:kilogramsquaremetrepersecond,'. 159 | \'nor:kilogramsquaremetrepersecondnp,'. 160 | \'nor:kilowatthour,'. 161 | \'nor:liter,'. 162 | \'nor:litre,'. 163 | \'nor:lumen,'. 164 | \'nor:lumenbase,'. 165 | \'nor:lux,'. 166 | \'nor:luxbase,'. 167 | \'nor:mega,'. 168 | \'nor:megad,'. 169 | \'nor:meter,'. 170 | \'nor:metre,'. 171 | \'nor:metrepersecond,'. 172 | \'nor:metrepersecondnp,'. 173 | \'nor:metrepersquaresecond,'. 174 | \'nor:metrepersquaresecondnp,'. 175 | \'nor:micro,'. 176 | \'nor:microd,'. 177 | \'nor:milli,'. 178 | \'nor:millid,'. 179 | \'nor:minute,'. 180 | \'nor:mole,'. 181 | \'nor:molepercubicmetre,'. 182 | \'nor:molepercubicmetrenp,'. 183 | \'nor:nano,'. 184 | \'nor:nanod,'. 185 | \'nor:neper,'. 186 | \'nor:newton,'. 187 | \'nor:newtonbase,'. 188 | \'nor:newtonmetre,'. 189 | \'nor:newtonpercubicmetre,'. 190 | \'nor:newtonpercubicmetrenp,'. 191 | \'nor:newtonperkilogram,'. 192 | \'nor:newtonperkilogramnp,'. 193 | \'nor:newtonpermetre,'. 194 | \'nor:newtonpermetrenp,'. 195 | \'nor:newtonpersquaremetre,'. 196 | \'nor:newtonpersquaremetrenp,'. 197 | \'nor:NoAMS,'. 198 | \'nor:no@qsk,'. 199 | \'nor:ohm,'. 200 | \'nor:ohmbase,'. 201 | \'nor:ohmmetre,'. 202 | \'nor:one,'. 203 | \'nor:paminute,'. 204 | \'nor:pascal,'. 205 | \'nor:pascalbase,'. 206 | \'nor:pascalsecond,'. 207 | \'nor:pasecond,'. 208 | \'nor:per,'. 209 | \'nor:period@active,'. 210 | \'nor:persquaremetresecond,'. 211 | \'nor:persquaremetresecondnp,'. 212 | \'nor:peta,'. 213 | \'nor:petad,'. 214 | \'nor:pico,'. 215 | \'nor:picod,'. 216 | \'nor:power,'. 217 | \'nor:@qsk,'. 218 | \'nor:quantityskip,'. 219 | \'nor:rad,'. 220 | \'nor:radian,'. 221 | \'nor:radianbase,'. 222 | \'nor:radianpersecond,'. 223 | \'nor:radianpersecondnp,'. 224 | \'nor:radianpersquaresecond,'. 225 | \'nor:radianpersquaresecondnp,'. 226 | \'nor:reciprocal,'. 227 | \'nor:rem,'. 228 | \'nor:roentgen,'. 229 | \'nor:rp,'. 230 | \'nor:rpcubed,'. 231 | \'nor:rpcubic,'. 232 | \'nor:rpcubicmetreperkilogram,'. 233 | \'nor:rpcubicmetrepersecond,'. 234 | \'nor:rperminute,'. 235 | \'nor:rpersecond,'. 236 | \'nor:rpfourth,'. 237 | \'nor:rpsquare,'. 238 | \'nor:rpsquared,'. 239 | \'nor:rpsquaremetreperkilogram,'. 240 | \'nor:second,'. 241 | \'nor:siemens,'. 242 | \'nor:siemensbase,'. 243 | \'nor:sievert,'. 244 | \'nor:sievertbase,'. 245 | \'nor:square,'. 246 | \'nor:squared,'. 247 | \'nor:squaremetre,'. 248 | \'nor:squaremetrepercubicmetre,'. 249 | \'nor:squaremetrepercubicmetrenp,'. 250 | \'nor:squaremetrepercubicsecond,'. 251 | \'nor:squaremetrepercubicsecondnp,'. 252 | \'nor:squaremetreperkilogram,'. 253 | \'nor:squaremetrepernewtonsecond,'. 254 | \'nor:squaremetrepernewtonsecondnp,'. 255 | \'nor:squaremetrepersecond,'. 256 | \'nor:squaremetrepersecondnp,'. 257 | \'nor:squaremetrepersquaresecond,'. 258 | \'nor:squaremetrepersquaresecondnp,'. 259 | \'nor:steradian,'. 260 | \'nor:steradianbase,'. 261 | \'nor:tera,'. 262 | \'nor:terad,'. 263 | \'nor:tesla,'. 264 | \'nor:teslabase,'. 265 | \'nor:ton,'. 266 | \'nor:tonne,'. 267 | \'nor:unit,'. 268 | \'nor:unitskip,'. 269 | \'nor:usk,'. 270 | \'nor:volt,'. 271 | \'nor:voltbase,'. 272 | \'nor:voltpermetre,'. 273 | \'nor:voltpermetrenp,'. 274 | \'nor:watt,'. 275 | \'nor:wattbase,'. 276 | \'nor:wattpercubicmetre,'. 277 | \'nor:wattpercubicmetrenp,'. 278 | \'nor:wattperkilogram,'. 279 | \'nor:wattperkilogramnp,'. 280 | \'nor:wattpermetrekelvin,'. 281 | \'nor:wattpermetrekelvinnp,'. 282 | \'nor:wattpersquaremetre,'. 283 | \'nor:wattpersquaremetrenp,'. 284 | \'nor:wattpersquaremetresteradian,'. 285 | \'nor:wattpersquaremetresteradiannp,'. 286 | \'nor:weber,'. 287 | \'nor:weberbase,'. 288 | \'nor:yocto,'. 289 | \'nor:yoctod,'. 290 | \'nor:yotta,'. 291 | \'nor:yottad,'. 292 | \'nor:zepto,'. 293 | \'nor:zeptod,'. 294 | \'nor:zetta,'. 295 | \'nor:zettad' 296 | 297 | let g:TeX_package_option_SIunits = 298 | \'amssymb,'. 299 | \'binary,'. 300 | \'cdot,'. 301 | \'derived,'. 302 | \'derivedinbase,'. 303 | \'Gray,'. 304 | \'mediumqspace,'. 305 | \'mediumspace,'. 306 | \'noams,'. 307 | \'pstricks,'. 308 | \'squaren,'. 309 | \'textstyle,'. 310 | \'thickqspace,'. 311 | \'thickspace,'. 312 | \'thinqspace,'. 313 | \'thinspace' 314 | 315 | " vim:ft=vim:ff=unix: 316 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/accents: -------------------------------------------------------------------------------- 1 | if exists("accents_package_file") 2 | finish 3 | endif 4 | let accents_package_file = 1 5 | 6 | let g:TeX_package_option_accents = 7 | \ 'nonscript,' 8 | \.'single' 9 | 10 | let g:TeX_package_accents = 11 | \ 'bra:grave,' 12 | \.'bra:acute,' 13 | \.'bra:check,' 14 | \.'bra:breve,' 15 | \.'bra:bar,' 16 | \.'bra:ring,' 17 | \.'bra:hat,' 18 | \.'bra:dot,' 19 | \.'bra:tilde,' 20 | \.'bra:undertilde,' 21 | \.'bra:ddot,' 22 | \.'bra:dddot,' 23 | \.'bra:ddddot,' 24 | \.'bra:vec,' 25 | \.'brd:accentset,' 26 | \.'brd:underaccent' 27 | 28 | " vim:ft=vim:ff=unix: 29 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/acromake: -------------------------------------------------------------------------------- 1 | if exists("acromake_package_file") 2 | finish 3 | endif 4 | let acromake_package_file = 1 5 | 6 | let g:TeX_package_option_acromake = '' 7 | 8 | let g:TeX_package_acromake = 'brs:acromake{<++>}{<++>}{<++>}' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/afterpage: -------------------------------------------------------------------------------- 1 | if exists("afterpage_package_file") 2 | finish 3 | endif 4 | let afterpage_package_file = 1 5 | 6 | let g:TeX_package_option_afterpage = '' 7 | 8 | let g:TeX_package_afterpage = 'bra:afterpage' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/alltt: -------------------------------------------------------------------------------- 1 | if exists("alltt_package_file") 2 | finish 3 | endif 4 | let alltt_package_file = 1 5 | 6 | let g:TeX_package_option_alltt = '' 7 | 8 | let g:TeX_package_alltt = 'env:alltt' 9 | 10 | syn region texZone start="\\begin{alltt}" end="\\end{alltt}\|%stopzone\>" fold 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/amsmath: -------------------------------------------------------------------------------- 1 | if exists("amsmath_package_file") 2 | finish 3 | endif 4 | let amsmath_package_file = 1 5 | 6 | let g:TeX_package_option_amsmath = 7 | \ 'centertags,' 8 | \.'tbtags,' 9 | \.'sumlimits,' 10 | \.'nosumlimits,' 11 | \.'intlimits,' 12 | \.'nointlimits,' 13 | \.'namelimits,' 14 | \.'nonamelimits,' 15 | \.'leqno,' 16 | \.'reqno,' 17 | \.'fleqno' 18 | 19 | let g:TeX_package_amsmath = 20 | \ 'sbr:Environments,' 21 | \.'env:equation,' 22 | \.'env:equation*,' 23 | \.'env:align,' 24 | \.'env:align*,' 25 | \.'env:gather,' 26 | \.'env:gather*,' 27 | \.'env:flalign,' 28 | \.'env:flalign*,' 29 | \.'env:multline,' 30 | \.'env:multline*,' 31 | \.'ens:alignat:{<+arg1+>}{<+arg2+>},' 32 | \.'env:alignat,' 33 | \.'ens:alignat*:{<+arg1+>}{<+arg2+>},,' 34 | \.'env:alignat*,' 35 | \.'env:subequations,' 36 | \.'env:subarray,' 37 | \.'env:split,' 38 | \.'env:cases,' 39 | \.'sbr:Matrices,' 40 | \.'env:matrix,' 41 | \.'env:pmatrix,' 42 | \.'env:bmatrix,' 43 | \.'env:Bmatrix,' 44 | \.'env:vmatrix,' 45 | \.'env:Vmatrix,' 46 | \.'env:smallmatrix,' 47 | \.'bra:hdotsfor,' 48 | \.'sbr:Dots,' 49 | \.'dotsc,' 50 | \.'dotsb,' 51 | \.'dotsm,' 52 | \.'dotsi,' 53 | \.'dotso,' 54 | \.'sbr:ItalicGreek,' 55 | \.'nor:varGamma,' 56 | \.'nor:varDelta,' 57 | \.'nor:varTheta,' 58 | \.'nor:varLambda,' 59 | \.'nor:varXi,' 60 | \.'nor:varPi,' 61 | \.'nor:varSigma,' 62 | \.'nor:varUpsilon,' 63 | \.'nor:varPhi,' 64 | \.'nor:varPsi,' 65 | \.'nor:varOmega,' 66 | \.'sbr:Mod,' 67 | \.'nor:mod,' 68 | \.'nor:bmod,' 69 | \.'nor:pmod,' 70 | \.'nor:pod,' 71 | \.'sbr:CreatingSymbols,' 72 | \.'brd:overset,' 73 | \.'brd:underset,' 74 | \.'brd:sideset,' 75 | \.'sbr:Fractions,' 76 | \.'brd:frac,' 77 | \.'brd:dfrac,' 78 | \.'brd:tfrac,' 79 | \.'brd:cfrac,' 80 | \.'brd:binom,' 81 | \.'brd:dbinom,' 82 | \.'brd:tbinom,' 83 | \.'brs:genfrac{<+ldelim+>}{<+rdelim+>}{<+thick+>}{<+style+>}{<+numer+>}{<+denom+>},' 84 | \.'sbr:Commands,' 85 | \.'nob:smash,' 86 | \.'bra:substack,' 87 | \.'bra:tag,' 88 | \.'bra:tag*,' 89 | \.'nor:notag,' 90 | \.'bra:raisetag,' 91 | \.'bra:shoveleft,' 92 | \.'bra:shoveright,' 93 | \.'bra:intertext,' 94 | \.'bra:text,' 95 | \.'nor:displaybreak,' 96 | \.'noo:displaybreak,' 97 | \.'noo:allowdisplaybreaks,' 98 | \.'nor:nobreakdash,' 99 | \.'brs:numberwithin{<+env+>}{<+parent+>},' 100 | \.'bra:leftroot,' 101 | \.'bra:uproot,' 102 | \.'bra:boxed,' 103 | \.'brs:DeclareMathSymbol{<++>}{<++>}{<++>}{<++>},' 104 | \.'bra:eqref' 105 | 106 | " vim:ft=vim:ff=unix: 107 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/amsthm: -------------------------------------------------------------------------------- 1 | if exists("amsthm_package_file") 2 | finish 3 | endif 4 | let amsthm_package_file = 1 5 | 6 | let TeX_package_option_amsthm = '' 7 | 8 | let TeX_package_amsthm = 9 | \ 'env:proof,' 10 | \.'nor:swapnumbers,' 11 | \.'brd:newtheorem,' 12 | \.'brd:newtheorem*,' 13 | \.'nor:theoremstyle{plain},' 14 | \.'nor:theoremstyle{definition},' 15 | \.'nor:theoremstyle{remark},' 16 | \.'nor:newtheoremstyle,' 17 | \.'nor:qedsymbol,' 18 | \.'nor:qed,' 19 | \.'nor:qedhere' 20 | 21 | " vim:ft=vim:ff=unix: 22 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/amsxtra: -------------------------------------------------------------------------------- 1 | if exists("amsxtra_package_file") 2 | finish 3 | endif 4 | let amsxtra_package_file = 1 5 | 6 | let g:TeX_package_option_amsxtra = '' 7 | 8 | let g:TeX_package_amsxtra = 9 | \ 'nor:sphat,' 10 | \.'nor:sptilde' 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/arabic: -------------------------------------------------------------------------------- 1 | if exists("arabic_package_file") 2 | finish 3 | endif 4 | let arabic_package_file = 1 5 | 6 | let g:TeX_package_option_arabic = '' 7 | 8 | let g:TeX_package_arabic = 'bra:arabicnumeral' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/array: -------------------------------------------------------------------------------- 1 | if exists("array_package_file") 2 | finish 3 | endif 4 | let array_package_file = 1 5 | 6 | let g:TeX_package_option_array = '' 7 | 8 | let g:TeX_package_array = 9 | \ 'brs:newcolumntype{<+type+>}[<+no+>]{<+preamble+>},' 10 | \.'arraycolsep,' 11 | \.'tabcolsep,' 12 | \.'arrayrulewidth,' 13 | \.'doublerulesep,' 14 | \.'arraystretch,' 15 | \.'extrarowheight' 16 | 17 | " vim:ft=vim:ff=unix: 18 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/babel: -------------------------------------------------------------------------------- 1 | if exists("babel_package_file") 2 | finish 3 | endif 4 | let babel_package_file = 1 5 | 6 | " This package sets some language specific options. 7 | " Since it needs to find out which options the user used with the babel 8 | " package, it needs to wait till latex-suite is done scanning packages. It 9 | " then catches the LatexSuiteScannedPackages event which 10 | " Tex_pack_updateall() throws at which time g:Tex_pack_detected and 11 | " g:Tex_babel_options contain the necessary information. 12 | 13 | let g:TeX_package_option_babel = 14 | \ 'afrikaans,' 15 | \.'bahasa,' 16 | \.'basque,' 17 | \.'breton,' 18 | \.'bulgarian,' 19 | \.'catalan,' 20 | \.'croatian,' 21 | \.'chech,' 22 | \.'danish,' 23 | \.'dutch,' 24 | \.'english,USenglish,american,UKenglish,british,canadian,' 25 | \.'esperanto,' 26 | \.'estonian,' 27 | \.'finnish,' 28 | \.'french,francais,canadien,acadian,' 29 | \.'galician,' 30 | \.'austrian,german,germanb,ngerman,naustrian,' 31 | \.'greek,polutonikogreek,' 32 | \.'hebrew,' 33 | \.'magyar,hungarian,' 34 | \.'icelandic,' 35 | \.'irish,' 36 | \.'italian,' 37 | \.'latin,' 38 | \.'lowersorbian,' 39 | \.'samin,' 40 | \.'norsk,nynorsk,' 41 | \.'polish,' 42 | \.'portuges,portuguese,brazilian,brazil,' 43 | \.'romanian,' 44 | \.'russian,' 45 | \.'scottish,' 46 | \.'spanish,' 47 | \.'slovak,' 48 | \.'slovene,' 49 | \.'swedish,' 50 | \.'serbian,' 51 | \.'turkish,' 52 | \.'ukrainian,' 53 | \.'uppersorbian,' 54 | \.'welsh' 55 | 56 | let g:TeX_package_babel = 57 | \ 'bra:selectlanguage,' 58 | \.'env:otherlanguage,' 59 | \.'env:otherlanguage*,' 60 | \.'env:hyphenrules,' 61 | \.'brd:foreignlanguage,' 62 | \.'spe:iflanguage{<+name+>}{<+true+>}{<+false+>},' 63 | \.'languagename,' 64 | \.'bra:useshorthands,' 65 | \.'brd:defineshorthand,' 66 | \.'brd:aliasshorthand,' 67 | \.'bra:languageshorthans,' 68 | \.'bra:shorthandon,' 69 | \.'bra:shorthandoff,' 70 | \.'brd:languageattribute' 71 | 72 | " vim:ft=vim:ff=unix: 73 | if exists('s:doneOnce') 74 | finish 75 | endif 76 | let s:doneOnce = 1 77 | 78 | augroup LatexSuite 79 | au LatexSuite User LatexSuiteScannedPackages 80 | \ call Tex_Debug('babel: catching LatexSuiteScannedPackages event') | 81 | \ call s:SetQuotes() 82 | augroup END 83 | 84 | let s:path = expand(':p:h') 85 | 86 | " SetQuotes: sets quotes for various languages {{{ 87 | " Description: 88 | function! SetQuotes() 89 | if g:Tex_package_detected =~ '\' 90 | if g:Tex_babel_options =~ '\' 91 | exec 'so '.s:path.'/german' 92 | elseif g:Tex_babel_options =~ '\' 93 | exec 'so '.s:path.'/ngerman' 94 | endif 95 | endif 96 | endfunction " }}} 97 | 98 | " vim:ft=vim:ff=unix: 99 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/bar: -------------------------------------------------------------------------------- 1 | if exists("bar_package_file") 2 | finish 3 | endif 4 | let bar_package_file = 1 5 | 6 | let g:TeX_package_option_bar = '' 7 | 8 | let g:TeX_package_bar = 9 | \ 'env:barenv,' 10 | \.'brs:bar{<+height+>}{<+index+>}[<+desc+>],' 11 | \.'hlineon,' 12 | \.'brs:legend{<+index+>}{<+text+>},' 13 | \.'bra:setdepth,' 14 | \.'bra:sethspace,' 15 | \.'brs:setlinestyle{<+solid-dotted+>},' 16 | \.'brs:setnumberpos{<+empty-axis-down-inside-outside-up+>},' 17 | \.'bra:setprecision,' 18 | \.'bra:setstretch,' 19 | \.'bra:setstyle,' 20 | \.'bra:setwidth,' 21 | \.'brs:setxaxis{<+w1+>}{<+w2+>}{<+step+>},' 22 | \.'brs:setyaxis[<+n+>]{<+w1+>}{<+w2+>}{<+step+>},' 23 | \.'brs:setxname[<+lrbt+>]{<+etiquette+>},' 24 | \.'brs:setyname[<+lrbt+>]{<+etiquette+>},' 25 | \.'brs:setxvaluetyp{<+day-month+>}' 26 | 27 | " vim:ft=vim:ff=unix: 28 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/biblatex: -------------------------------------------------------------------------------- 1 | " Biblatex package support v 0.1 2010-02-17 2 | " This file has been written by 3 | " Andreas Wagner 4 | " based on the documentation of 5 | " biblatex 0.8e, July 4 2009. 6 | " It can be used, modified and distributed according to the vim license. 7 | 8 | 9 | if exists("biblatex_package_file") 10 | finish 11 | endif 12 | let biblatex_package_file = 1 13 | 14 | let g:TeX_package_option_biblatex = 15 | \ 'style=,' 16 | \.'citestyle=,' 17 | \.'bibstyle=,' 18 | \.'natbib=,' 19 | \.'sorting=,' 20 | \.'sortlos=,' 21 | \.'sortcites=,' 22 | \.'maxnames=,' 23 | \.'minnames=,' 24 | \.'maxitems=,' 25 | \.'minitems=,' 26 | \.'autocite=,' 27 | \.'autopunct=,' 28 | \.'babel=,' 29 | \.'block=,' 30 | \.'hyperref=,' 31 | \.'backref=,' 32 | \.'indexing=,' 33 | \.'loadfiles=,' 34 | \.'refsection=,' 35 | \.'refsegment=,' 36 | \.'citereset=,' 37 | \.'abbreviate=,' 38 | \.'date=,' 39 | \.'urldate=,' 40 | \.'defernums=,' 41 | \.'punctfont=,' 42 | \.'arxiv=,' 43 | \.'backend=,' 44 | \.'mincrossrefs=,' 45 | \.'bibencoding=,' 46 | \.'useauthor=,' 47 | \.'useeditor=,' 48 | \.'usetranslator=,' 49 | \.'useprefix=,' 50 | \.'skipbib=,' 51 | \.'skiplos=,' 52 | \.'skiplab=,' 53 | \.'dataonly=,' 54 | \.'pagetracker=,' 55 | \.'citetracker=,' 56 | \.'ibidtracker=,' 57 | \.'idemtracker=,' 58 | \.'opcittracker=,' 59 | \.'loccittracker=,' 60 | \.'firstinits=,' 61 | \.'terseinits=,' 62 | \.'labelalpha=,' 63 | \.'labelnumber=,' 64 | \.'labelyear=,' 65 | \.'singletitle=,' 66 | \.'uniquename=,' 67 | \.'openbib' 68 | 69 | let g:TeX_package_biblatex = 70 | \ 'sbr:preamble,' 71 | \.'bra:ExecuteBibliographyOptions{<+key=value+>},' 72 | \.'bra:Bibliography{<+file+>},' 73 | \.'sbr:localization,' 74 | \.'brd:DefineBibliographyStrings{<+lang+>}{<+definitions+>},' 75 | \.'brd:DefineBibliographyExtras{<+lang+>}{<+code+>},' 76 | \.'brd:UndefineBibliographyExtras{<+lang+>}{<+code+>},' 77 | \.'brd:DefineHyphenationExceptions{<+lang+>}{<+text+>},' 78 | \.'bra:NewBibliographyString{<+key+>},' 79 | \.'sbr:main_commands,' 80 | \.'brs:cite[<+prenote+>][<+postnote+>]{<+key+>},' 81 | \.'brs:Cite[<+prenote+>][<+postnote+>]{<+key+>},' 82 | \.'brs:cite*[<+prenote+>][<+postnote+>]{<+key+>},' 83 | \.'brs:parencite[<+prenote+>][<+postnote+>]{<+key+>},' 84 | \.'brs:Parencite[<+prenote+>][<+postnote+>]{<+key+>},' 85 | \.'brs:parencite*[<+prenote+>][<+postnote+>]{<+key+>},' 86 | \.'brs:footcite[<+prenote+>][<+postnote+>]{<+key+>},' 87 | \.'brs:Footcite[<+prenote+>][<+postnote+>]{<+key+>},' 88 | \.'brs:textcite[<+prenote+>][<+postnote+>]{<+key+>},' 89 | \.'brs:Textcite[<+prenote+>][<+postnote+>]{<+key+>},' 90 | \.'bra:supercite{<+key+>},' 91 | \.'brs:autocite[<+prenote+>][<+postnote+>]{<+key+>},' 92 | \.'brs:Autocite[<+prenote+>][<+postnote+>]{<+key+>},' 93 | \.'brs:autocite*[<+prenote+>][<+postnote+>]{<+key+>},' 94 | \.'brs:Autocite*[<+prenote+>][<+postnote+>]{<+key+>},' 95 | \.'sbr:multicites,' 96 | \.'brs:cites(<+prenote+>)(<+postnote+>)[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>},' 97 | \.'brs:Cites(<+prenote+>)(<+postnote+>)[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>},' 98 | \.'brs:parencites(<+prenote+>)(<+postnote+>)[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>},' 99 | \.'brs:Parencites(<+prenote+>)(<+postnote+>)[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>},' 100 | \.'brs:footcites(<+prenote+>)(<+postnote+>)[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>},' 101 | \.'brs:Footcites(<+prenote+>)(<+postnote+>)[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>},' 102 | \.'brs:textcites(<+prenote+>)(<+postnote+>)[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>},' 103 | \.'brs:Textcites(<+prenote+>)(<+postnote+>)[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>},' 104 | \.'brs:supercites(<+prenote+>)(<+postnote+>){<+key+>}{<+key+>},' 105 | \.'brs:autocites(<+prenote+>)(<+postnote+>)[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>},' 106 | \.'brs:Autocites(<+prenote+>)(<+postnote+>)[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+prenote+>][<+postnote+>]{<+key+>},' 107 | \.'sbr:text_commands,' 108 | \.'brs:citeauthor[<+prenote+>][<+postnote+>]{<+key+>},' 109 | \.'brs:Citeauthor[<+prenote+>][<+postnote+>]{<+key+>},' 110 | \.'brs:citetitle[<+prenote+>][<+postnote+>]{<+key+>},' 111 | \.'brs:citetitle*[<+prenote+>][<+postnote+>]{<+key+>},' 112 | \.'brs:citeyear[<+prenote+>][<+postnote+>]{<+key+>},' 113 | \.'brs:citeurl[<+prenote+>][<+postnote+>]{<+key+>},' 114 | \.'sbr:special_commands,' 115 | \.'bra:nocite{<+key+>},' 116 | \.'nor:citereset,' 117 | \.'nor:citereset*,' 118 | \.'nor:mancite,' 119 | \.'brs:fullcite[<+prenote+>][<+postnote+>]{<+key+>},' 120 | \.'brs:footfullcite[<+prenote+>][<+postnote+>]{<+key+>},' 121 | \.'brs:volcite[<+prenote+>]{<+volume+>}[<+page+>]{<+key+>},' 122 | \.'brs:Volcite[<+prenote+>]{<+volume+>}[<+page+>]{<+key+>},' 123 | \.'brs:pvolcite[<+prenote+>]{<+volume+>}[<+page+>]{<+key+>},' 124 | \.'brs:Pvolcite[<+prenote+>]{<+volume+>}[<+page+>]{<+key+>},' 125 | \.'brs:fvolcite[<+prenote+>]{<+volume+>}[<+page+>]{<+key+>},' 126 | \.'brs:Fvolcite[<+prenote+>]{<+volume+>}[<+page+>]{<+key+>},' 127 | \.'brs:tvolcite[<+prenote+>]{<+volume+>}[<+page+>]{<+key+>},' 128 | \.'brs:Tvolcite[<+prenote+>]{<+volume+>}[<+page+>]{<+key+>},' 129 | \.'brs:avolcite[<+prenote+>]{<+volume+>}[<+page+>]{<+key+>},' 130 | \.'brs:Avolcite[<+prenote+>]{<+volume+>}[<+page+>]{<+key+>},' 131 | \.'brs:notecite[<+prenote+>][<+postnote+>]{<+key+>},' 132 | \.'brs:Notecite[<+prenote+>][<+postnote+>]{<+key+>},' 133 | \.'brs:pnotecite[<+prenote+>][<+postnote+>]{<+key+>},' 134 | \.'brs:Pnotecite[<+prenote+>][<+postnote+>]{<+key+>},' 135 | \.'brs:fnotecite[<+prenote+>][<+postnote+>]{<+key+>},' 136 | \.'brs:Fnotecite[<+prenote+>][<+postnote+>]{<+key+>},' 137 | \.'brs:citename[<+prenote+>][<+postnote+>]{<+key+>}[<+format+>]{<+list+>},' 138 | \.'brs:citelist[<+prenote+>][<+postnote+>]{<+key+>}[<+format+>]{<+list+>},' 139 | \.'brs:citefield[<+prenote+>][<+postnote+>]{<+key+>}[<+format+>]{<+field+>},' 140 | \.'sbr:sorting,' 141 | \.'eno:refsection[<+bibfiles+>],' 142 | \.'noo:newrefsection[<+bibfiles+>],' 143 | \.'eno:refsegment[<+bibfiles+>],' 144 | \.'noo:newsegment[<+bibfiles+>],' 145 | \.'bra:DeclareBibliographyCategory{<+category+>},' 146 | \.'brd:addtocategory{<+category+>}{<+key+>},' 147 | \.'brd:defbibheading{<+name+>}{<+code+>},' 148 | \.'brd:defbibnote{<+name+>}{<+text+>},' 149 | \.'bra:segment,' 150 | \.'bra:type,' 151 | \.'bra:keyword,' 152 | \.'bra:category,' 153 | \.'sbr:endmatter,' 154 | \.'noo:printbibliography[<+key=value+>],' 155 | \.'noo:printshorthands[<+key=value+>],' 156 | \.'noo:bibbysection[<+key=value+>],' 157 | \.'noo:bibbysegment[<+key=value+>],' 158 | \.'noo:bibbycategory[<+key=value+>]' 159 | 160 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/bm: -------------------------------------------------------------------------------- 1 | if exists("bm_package_file") 2 | finish 3 | endif 4 | let bm_package_file = 1 5 | 6 | let g:TeX_package_option_bm = '' 7 | 8 | let g:TeX_package_bm = 'bra:bm' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/bophook: -------------------------------------------------------------------------------- 1 | if exists("bophook_package_file") 2 | finish 3 | endif 4 | let bophook_package_file = 1 5 | 6 | let g:TeX_package_option_bophook = '' 7 | 8 | let g:TeX_package_bophook = 9 | \ 'bra:AtBeginPage,' 10 | \.'bra:PageLayout' 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/boxedminipage: -------------------------------------------------------------------------------- 1 | if exists("boxedminipage_package_file") 2 | finish 3 | endif 4 | let boxedminipage_package_file = 1 5 | 6 | let g:TeX_package_option_boxedminipage = '' 7 | 8 | let g:TeX_package_boxedminipage = 'ens:boxedminipage:[<+pos+>]{<+size+>}' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/caption2: -------------------------------------------------------------------------------- 1 | if exists("caption2_package_file") 2 | finish 3 | endif 4 | let caption2_package_file = 1 5 | 6 | let g:TeX_package_option_caption2 = 7 | \ 'scriptsize,' 8 | \.'footnotesize,' 9 | \.'small,' 10 | \.'normalsize,' 11 | \.'large,' 12 | \.'Large,' 13 | \.'up,' 14 | \.'it,' 15 | \.'sl,' 16 | \.'sc,' 17 | \.'md,' 18 | \.'bf,' 19 | \.'rm,' 20 | \.'sf,' 21 | \.'tt,' 22 | \.'ruled,' 23 | \.'boxed,' 24 | \.'centerlast,' 25 | \.'anne,' 26 | \.'center,' 27 | \.'flushleft,' 28 | \.'flushright,' 29 | \.'oneline,' 30 | \.'nooneline,' 31 | \.'hang,' 32 | \.'isu,' 33 | \.'indent,' 34 | \.'longtable' 35 | 36 | let g:TeX_package_caption2 = 37 | \ 'bra:captionsize,' 38 | \.'bra:captionfont,' 39 | \.'bra:captionlabelfont,' 40 | \.'bra:setcaptionmargin,' 41 | \.'bra:setcaptionwidth' 42 | 43 | " vim:ft=vim:ff=unix: 44 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/cases: -------------------------------------------------------------------------------- 1 | if exists("cases_package_file") 2 | finish 3 | endif 4 | let cases_package_file = 1 5 | 6 | let g:TeX_package_option_cases = '' 7 | 8 | let g:TeX_package_cases = 9 | \ 'ens:numcases:{<+label+>},' 10 | \.'ens:subnumcases:{<+label+>}' 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/ccaption: -------------------------------------------------------------------------------- 1 | if exists("ccaption_package_file") 2 | finish 3 | endif 4 | let ccaption_package_file = 1 5 | 6 | let g:TeX_package_option_ccaption = '' 7 | 8 | let g:TeX_package_ccaption = 9 | \ 'bra:contcaption,' 10 | \.'bra:legend,' 11 | \.'bra:namedlegend,' 12 | \.'abovelegendskip,' 13 | \.'belowlegendskip,' 14 | \.'brd:newfixedcaption,' 15 | \.'brd:renewfixedcaption,' 16 | \.'brd:providefixedcaption,' 17 | \.'brs:newfloatenv[<+counter+>]{<+name+>}{<+ext+>}{<+etiq+>},' 18 | \.'brd:listfloats' 19 | 20 | " vim:ft=vim:ff=unix: 21 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/changebar: -------------------------------------------------------------------------------- 1 | if exists("changebar_package_file") 2 | finish 3 | endif 4 | let changebar_package_file = 1 5 | 6 | let g:TeX_package_option_changebar = 7 | \ 'DVItoLN03,' 8 | \.'dvitoln03,' 9 | \.'DVItoPS,' 10 | \.'dvitops,' 11 | \.'DVIps,' 12 | \.'dvips,' 13 | \.'emTeX,' 14 | \.'emtex,' 15 | \.'textures,' 16 | \.'Textures,' 17 | \.'outerbars,' 18 | \.'innerbars,' 19 | \.'leftbars,' 20 | \.'rightbars,' 21 | \.'traceon,' 22 | \.'traceoff' 23 | 24 | let g:TeX_package_changebar = 25 | \ 'ens:changebar:[<+thickness+>],' 26 | \.'noo:cbstart,' 27 | \.'cbend,' 28 | \.'cbdelete,' 29 | \.'changebarwidth,' 30 | \.'deletebarwidth,' 31 | \.'changebarsep,' 32 | \.'spe:changebargrey,' 33 | \.'nochangebars' 34 | 35 | " vim:ft=vim:ff=unix: 36 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/chapterbib: -------------------------------------------------------------------------------- 1 | if exists("chapterbib_package_file") 2 | finish 3 | endif 4 | let chapterbib_package_file = 1 5 | 6 | let g:TeX_package_option_chapterbib = 7 | \ 'sectionbib,' 8 | \.'rootbib,' 9 | \.'gather,' 10 | \.'duplicate' 11 | 12 | let g:TeX_package_chapterbib = 13 | \ 'env:cbunit,' 14 | \.'brd:sectionbib,' 15 | \.'bra:cbinput,' 16 | \.'sep:redefine,' 17 | \.'bra:citeform,' 18 | \.'bra:citepunct,' 19 | \.'bra:citeleft,' 20 | \.'bra:citeright,' 21 | \.'bra:citemid,' 22 | \.'bra:citedash' 23 | 24 | " vim:ft=vim:ff=unix: 25 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/cite: -------------------------------------------------------------------------------- 1 | if exists("cite_package_file") 2 | finish 3 | endif 4 | let cite_package_file = 1 5 | 6 | let g:TeX_package_option_cite = 7 | \ 'verbose,' 8 | \.'nospace,' 9 | \.'space,' 10 | \.'nosort,' 11 | \.'sort,' 12 | \.'noadjust' 13 | 14 | let g:TeX_package_cite = 15 | \ 'bra:cite,' 16 | \.'bra:citen,' 17 | \.'bra:citenum,' 18 | \.'bra:citeonline,' 19 | \.'bra:nocite,' 20 | \.'sep:redefine,' 21 | \.'bra:citeform,' 22 | \.'bra:citepunct,' 23 | \.'bra:citeleft,' 24 | \.'bra:citeright,' 25 | \.'bra:citemid,' 26 | \.'bra:citedash' 27 | 28 | syn region texRefZone matchgroup=texStatement start="\\citen\([tp]\*\=\)\={" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter 29 | syn region texRefZone matchgroup=texStatement start="\\citenum\([tp]\*\=\)\={" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter 30 | syn region texRefZone matchgroup=texStatement start="\\citeonline\([tp]\*\=\)\={" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter 31 | 32 | " vim:ft=vim:ff=unix: 33 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/color: -------------------------------------------------------------------------------- 1 | if exists("color_package_file") 2 | finish 3 | endif 4 | let color_package_file = 1 5 | 6 | let g:TeX_package_option_color = 7 | \ 'monochrome,' 8 | \.'debugshow,' 9 | \.'dvips,' 10 | \.'xdvi,' 11 | \.'dvipdf,' 12 | \.'pdftex,' 13 | \.'dvipsone,' 14 | \.'dviwindo,' 15 | \.'emtex,' 16 | \.'dviwin,' 17 | \.'oztex,' 18 | \.'textures,' 19 | \.'pctexps,' 20 | \.'pctexwin,' 21 | \.'pctexhp,' 22 | \.'pctex32,' 23 | \.'truetex,' 24 | \.'tcidvi,' 25 | \.'dvipsnames,' 26 | \.'nodvipsnames,' 27 | \.'usenames' 28 | 29 | let g:TeX_package_color = 30 | \ 'brs:definecolor{<++>}{<++>}{<++>},' 31 | \.'brs:DefineNamedColor{<++>}{<++>}{<++>}{<++>},' 32 | \.'bra:color,' 33 | \.'nob:color,' 34 | \.'brd:textcolor,' 35 | \.'brs:textcolor[<++>]{<++>}{<++>},' 36 | \.'brd:colorbox,' 37 | \.'brs:colorbox[<++>]{<++>}{<++>},' 38 | \.'brs:fcolorbox{<++>}{<++>}{<++>},' 39 | \.'brs:fcolorbox[<++>]{<++>}{<++>}{<++>},' 40 | \.'brd:pagecolor,' 41 | \.'nob:pagecolor' 42 | 43 | " vim:ft=vim:ff=unix: 44 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/comma: -------------------------------------------------------------------------------- 1 | if exists("comma_package_file") 2 | finish 3 | endif 4 | let comma_package_file = 1 5 | 6 | let g:TeX_package_option_comma = '' 7 | 8 | let g:TeX_package_comma = 9 | \ 'bra:commaform,' 10 | \.'bra:commaformtoken' 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/csquotes: -------------------------------------------------------------------------------- 1 | " Csquotes package support v 0.1 2010-02-17 2 | " This file has been written by 3 | " Andreas Wagner 4 | " based on the documentation of 5 | " csquotes 4.4a, July 4 2009 6 | " It can be used, modified and distributed according to the vim license. 7 | 8 | 9 | if exists("csquotes_package_file") 10 | finish 11 | endif 12 | let csquotes_package_file = 1 13 | 14 | let g:TeX_package_option_csquotes = 15 | \ 'strict=,' 16 | \.'babel=,' 17 | \.'maxlevel=,' 18 | \.'style=,' 19 | \.'danish=,' 20 | \.'english=,' 21 | \.'french=,' 22 | \.'german=,' 23 | \.'italian=,' 24 | \.'norwegian=,' 25 | \.'portuguese=,' 26 | \.'spanish=,' 27 | \.'swedish=' 28 | 29 | let g:TeX_package_csquotes = 30 | \ 'sbr:basic,' 31 | \.'bra:enquote{<+text+>},' 32 | \.'bra:enquote*{<+text+>},' 33 | \.'brs:textquote[<+cite+>][<+punct+>]{<+text+>},' 34 | \.'brs:textquote*[<+cite+>][<+punct+>]{<+text+>},' 35 | \.'brs:blockquote[<+cite+>][<+punct+>]{<+text+>},' 36 | \.'sbr:foreign_text,' 37 | \.'brd:foreignquote{<+lang+>}{<+text+>},' 38 | \.'brd:foreignquote*{<+lang+>}{<+text+>},' 39 | \.'brd:hyphenquote{<+lang+>}{<+text+>},' 40 | \.'brd:hyphenquote*{<+lang+>}{<+text+>},' 41 | \.'brs:foreigntextquote{<+lang+>}[<+cite+>][<+punct+>]{<+text+>},' 42 | \.'brs:foreigntextquote*{<+lang+>}[<+cite+>][<+punct+>]{<+text+>},' 43 | \.'brs:hyphentextquote{<+lang+>}[<+cite+>][<+punct+>]{<+text+>},' 44 | \.'brs:hyphentextquote*{<+lang+>}[<+cite+>][<+punct+>]{<+text+>},' 45 | \.'brs:foreignblockquote{<+lang+>}[<+cite+>][<+punct+>]{<+text+>},' 46 | \.'brs:hyphenblockquote{<+lang+>}[<+cite+>][<+punct+>]{<+text+>},' 47 | \.'sbr:active_quotes,' 48 | \.'bra:MakeOuterQuote{<+character+>},' 49 | \.'bra:MakeInnerQuote{<+character+>},' 50 | \.'brd:MakeAutoQuote{<+opening_character+>}{<+closing_character+>},' 51 | \.'brd:MakeAutoQuote*{<+opening_character+>}{<+closing_character+>},' 52 | \.'brs:MakeForeignQuote{<+lang+>}{<+opening_character+>}{<+closing_character+>},' 53 | \.'brs:MakeForeignQuote*{<+lang+>}{<+opening_character+>}{<+closing_character+>},' 54 | \.'brs:MakeHyphenQuote{<+lang+>}{<+opening_character+>}{<+closing_character+>},' 55 | \.'brs:MakeHyphenQuote*{<+lang+>}{<+opening_character+>}{<+closing_character+>},' 56 | \.'brs:MakeBlockQuote{<+opening_character+>}{<+delimiter+>}{<+closing_character+>},' 57 | \.'brs:MakeForeignBlockQuote{<+lang+>}{<+opening_character+>}{<+delimiter+>}{<+closing_character+>},' 58 | \.'brs:MakeHyphenBlockQuote{<+lang+>}{<+opening_character+>}{<+delimiter+>}{<+closing_character+>},' 59 | \.'nor:EnableQuote,' 60 | \.'nor:DisableQuotes,' 61 | \.'nor:VerbatimQuotes,' 62 | \.'nor:DeleteQuotes,' 63 | \.'sbr:automatic_citation,' 64 | \.'brs:textcquote[<+prenote+>][<+postnote+>]{<+key+>}[<+punct+>]{<+text+>},' 65 | \.'brs:textcquote*[<+prenote+>][<+postnote+>]{<+key+>}[<+punct+>]{<+text+>},' 66 | \.'brs:foreigntextcquote{<+lang+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+punct+>]{<+text+>},' 67 | \.'brs:foreigntextcquote*{<+lang+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+punct+>]{<+text+>},' 68 | \.'brs:hyphentextcquote{<+lang+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+punct+>]{<+text+>},' 69 | \.'brs:hyphentextcquote*{<+x+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+punct+>]{<+text+>},' 70 | \.'brs:blockcquote[<+prenote+>][<+postnote+>]{<+key+>}[<+punct+>]{<+text+>},' 71 | \.'brs:foreignblockcquote{<+lang+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+punct+>]{<+text+>},' 72 | \.'brs:hyphenblockcquote{<+lang+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+punct+>]{<+text+>},' 73 | \.'sbr:display_quotes,' 74 | \.'ens:displayquote:[<+cite+>][<+punct+>],' 75 | \.'ens:foreigndisplayquote:{<+lang+>}[<+cite+>][<+punct+>],' 76 | \.'ens:hyphendisplayquote:{<+lang+>}[<+cite+>][<+punct+>],' 77 | \.'ens:displaycquote:[<+prenote+>][<+postnote+>]{<+key+>}[<+punct+>],' 78 | \.'ens:foreigndisplaycquote:{<+lang+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+punct+>],' 79 | \.'ens:hyphendisplaycquote:{<+lang+>}[<+prenote+>][<+postnote+>]{<+key+>}[<+punct+>],' 80 | \.'sbr:config,' 81 | \.'nob:setquotestyle,' 82 | \.'nor:setquotestyle*,' 83 | \.'brs:DeclareQuoteStyle[<+variant+>]{<+style+>}[<+outer_init+>][<+inner_init+>]{<+opening_outer_mark+>}[<+middle_outer_mark+>]{<+closing_outer_mark+>}[<+kern+>]{<+opening_inner_mark+>}[<+middle_inner_mark+>]{<+closing_inner_mark+>},' 84 | \.'brs:DeclareQuoteAlias[<+variant+>]{<+style+>}{<+alias+>},' 85 | \.'bra:DeclareQuoteOption{<+style+>},' 86 | \.'bra:ExecuteQuoteOptions{<+key=value+>},' 87 | \.'brs:DeclarePlainStyle{<+opening_outer_mark+>}{<+closing_outer_mark+>}{<+opening_inner_mark+>}{<+closing_inner_mark+>},' 88 | \.'bra:SetBlockThreshold{<+integer+>},' 89 | \.'bra:SetBlockEnvironment{<+environment+>},' 90 | \.'bra:SetCiteCommand{<+command+>},' 91 | \.'sbr:helper_expressions,' 92 | \.'brd:ifblockquote,' 93 | \.'brd:ifquotepunct,' 94 | \.'brd:ifquoteterm,' 95 | \.'brd:ifquotecolon,' 96 | \.'brd:ifquotecomma,' 97 | \.'brd:ifquoteexcmlam,' 98 | \.'brd:ifquotequestion,' 99 | \.'brd:ifquotesemicolon,' 100 | \.'brs:ifstringblank{<+string+>}{<+true+>}{<+false+>}' 101 | 102 | let g:TeX_SmartQuoteOpen = "\\enquote\{" 103 | let g:TeX_SmartQuoteClose = "\}" 104 | 105 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/deleq: -------------------------------------------------------------------------------- 1 | if exists("deleq_package_file") 2 | finish 3 | endif 4 | let deleq_package_file = 1 5 | 6 | let g:TeX_package_option_deleq = '' 7 | 8 | let g:TeX_package_deleq = 9 | \.'env:deqn,' 10 | \.'env:ddeqn,' 11 | \.'env:deqarr,' 12 | \.'env:ddeqar,' 13 | \.'env:deqrarr,' 14 | \.'nor:nydeqno,' 15 | \.'nor:heqno,' 16 | \.'bra:reqno,' 17 | \.'bra:rndeqno,' 18 | \.'bra:rdeqno,' 19 | \.'nob:eqreqno,' 20 | \.'nob:deqreqno,' 21 | \.'nob:ddeqreqno,' 22 | \.'bra:arrlabel,' 23 | \.'nor:where,' 24 | \.'bra:remtext,' 25 | \.'nor:nydeleqno,' 26 | \.'nor:deleqno,' 27 | \.'nor:jotbaseline' 28 | 29 | if !exists("tex_no_math") 30 | syn region texMathZoneA start="\\begin\s*{\s*deqn\*\s*}" end="\\end\s*{\s*deqn\*\s*}" keepend fold contains=@texMathZoneGroup 31 | syn region texMathZoneB start="\\begin\s*{\s*ddeqn\*\s*}" end="\\end\s*{\s*ddeqn\*\s*}" keepend fold contains=@texMathZoneGroup 32 | syn region texMathZoneC start="\\begin\s*{\s*deqarr\s*}" end="\\end\s*{\s*deqarr\s*}" keepend fold contains=@texMathZoneGroup 33 | syn region texMathZoneD start="\\begin\s*{\s*ddeqar\s*}" end="\\end\s*{\s*ddeqar\s*}" keepend fold contains=@texMathZoneGroup 34 | syn region texMathZoneE start="\\begin\s*{\s*deqrarr\*\s*}" end="\\end\s*{\s*deqrarr\*\s*}" keepend fold contains=@texMathZoneGroup 35 | endif 36 | " vim:ft=vim:ff=unix:noet:ts=4: 37 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/drftcite: -------------------------------------------------------------------------------- 1 | if exists("drftcite_package_file") 2 | finish 3 | endif 4 | let drftcite_package_file = 1 5 | 6 | let g:TeX_package_option_drftcite = 7 | \ 'verbose,' 8 | \.'nospace,' 9 | \.'space,' 10 | \.'breakcites,' 11 | \.'manualsort,' 12 | \.'tt,' 13 | \.'shownumbers,' 14 | \.'nocitecount' 15 | 16 | let g:TeX_package_drftcite = 17 | \ 'bra:cite,' 18 | \.'bra:citen,' 19 | \.'sep:redefine,' 20 | \.'bra:citeform,' 21 | \.'bra:citepunct,' 22 | \.'bra:citeleft,' 23 | \.'bra:citeright,' 24 | \.'bra:citemid,' 25 | \.'bra:citedash' 26 | 27 | syn region texRefZone matchgroup=texStatement start="\\citen\([tp]\*\=\)\={" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter 28 | 29 | " vim:ft=vim:ff=unix: 30 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/dropping: -------------------------------------------------------------------------------- 1 | if exists("dropping_package_file") 2 | finish 3 | endif 4 | let dropping_package_file = 1 5 | 6 | let g:TeX_package_option_dropping = '' 7 | 8 | let g:TeX_package_dropping = 9 | \ 'brs:bigdrop{<+indent+>}{<+big+>}{<+font+>}{<+text+>},' 10 | \.'brs:dropping[<+indent+>]{<+big+>}{<+text+>}' 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/enumerate: -------------------------------------------------------------------------------- 1 | if exists("enumerate_package_file") 2 | finish 3 | endif 4 | let enumerate_package_file = 1 5 | 6 | let g:TeX_package_option_enumerate = '' 7 | 8 | let g:TeX_package_enumerate = 'ens:enumerate:[<+prefix+>]' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/eqlist: -------------------------------------------------------------------------------- 1 | if exists("eqlist_package_file") 2 | finish 3 | endif 4 | let eqlist_package_file = 1 5 | 6 | let g:TeX_package_option_eqlist = '' 7 | 8 | let g:TeX_package_eqlist = 9 | \ 'env:eqlist,' 10 | \.'env:eqlist*,' 11 | \.'env:Eqlist,' 12 | \.'env:Eqlist*,' 13 | \.'sep:modificators,' 14 | \.'eqlistinit,' 15 | \.'eqliststarinit,' 16 | \.'eqlistinitpar,' 17 | \.'eqlistlabel' 18 | 19 | " vim:ft=vim:ff=unix: 20 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/eqparbox: -------------------------------------------------------------------------------- 1 | if exists("eqparbox_package_file") 2 | finish 3 | endif 4 | let eqparbox_package_file = 1 5 | 6 | let g:TeX_package_option_eqparbox = '' 7 | 8 | let g:TeX_package_eqparbox = 9 | \ 'brs:eqparbox[<+pos+>][<+height+>][<+inner-pos+>]{<+tag+>}{<+text+>},' 10 | \.'bra:eqboxwidth' 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/everyshi: -------------------------------------------------------------------------------- 1 | if exists("everyshi_package_file") 2 | finish 3 | endif 4 | let everyshi_package_file = 1 5 | 6 | let g:TeX_package_option_everyshi = '' 7 | 8 | let g:TeX_package_everyshi = 'bra:EveryShipOut' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/exmpl: -------------------------------------------------------------------------------- 1 | if exists("exmpl_package_file") 2 | finish 3 | endif 4 | let exmpl_package_file = 1 5 | 6 | " Author: Mikolaj Machowski 7 | " Date: 10.04.2002 8 | " Example plugin for packages in latexSuite 9 | " 10 | 11 | " This variable creates Options submenu in package menu. Even when no options are 12 | " given for this package it HAS to exist in form 13 | " let TeX_package_option_exmpl = "" 14 | " Options and commands are delimited with comma , 15 | 16 | let g:TeX_package_option_exmpl = "OpcjaA=,OpcjaB,OpcjaC" 17 | 18 | " Most command should have some definition before. Package menu system can 19 | " recognize type of command and behave in good manner: 20 | " env: (environment) creates simple environment template 21 | " \begin{command} 22 | " x <- cursor here 23 | " \end{command} 24 | " 25 | " bra: (brackets) useful when inserting brackets commands 26 | " \command{x}<<>> <- cursor at x, and placeholders as in other menu entries 27 | " 28 | " nor: (normal) nor: and pla: are `highlighted' in menu with `'' 29 | " \command 30 | " 31 | " pla: (plain) 32 | " command 33 | " 34 | " spe: (special) 35 | " command <-literal insertion of command, in future here should go 36 | " commands with special characters 37 | " 38 | " sep: (separator) creates separator. Good for aesthetics and usability :) 39 | " 40 | " Command can be also given with no prefix:. The result is 41 | " \command (as in nor: but without ) 42 | 43 | 44 | let g:TeX_package_exmpl = "env:AEnvFirst,env:aEnvSec,env:BThi," 45 | \ . "sep:a,env:zzzz," 46 | \ . "bra:aBraFirst,bra:bBraSec,bra:cBraThi," 47 | \ . "sep:b," 48 | \ . "nor:aNorPri,nor:bNorSec,nor:cNorTer," 49 | \ . "sep:c," 50 | \ . "pla:aPla1,pla:bPla2,pla:cPla3," 51 | \ . "sep:d," 52 | \ . "spe:aSpe1,spe:bSpe2,spe:cSpe3," 53 | \ . "sep:e," 54 | \ . "aNo1,bNo2,cNo3" 55 | " vim:ft=vim 56 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/fixme: -------------------------------------------------------------------------------- 1 | " Fixme package support v 0.1 2010-02-17 2 | " This file has been written by 3 | " Andreas Wagner 4 | " based on the documentation of 5 | " fixme November 28 2007 6 | " It can be used, modified and distributed according to the vim license. 7 | 8 | 9 | if exists("fixme_package_file") 10 | finish 11 | endif 12 | let fixme_package_file = 1 13 | 14 | let g:TeX_package_option_fixme = 15 | \ 'draft,' 16 | \.'final,' 17 | \.'silent,' 18 | \.'nosilent,' 19 | \.'inline,' 20 | \.'margin,' 21 | \.'marginclue,' 22 | \.'footnote,' 23 | \.'index,' 24 | \.'noinline,' 25 | \.'nomargin,' 26 | \.'nomarginclue,' 27 | \.'nofootnote,' 28 | \.'noindex' 29 | 30 | let g:TeX_package_fixme = 31 | \ 'sbr:simple,' 32 | \.'nob:fixme[<+layout+>]{<+note+>},' 33 | \.'nob:fxnote[<+layout+>]{<+note+>},' 34 | \.'nob:fxwarning[<+layout+>]{<+note+>},' 35 | \.'nob:fxerror[<+layout+>]{<+note+>},' 36 | \.'sbr:environments,' 37 | \.'eno:afixme[<+summary+>],' 38 | \.'eno:anfxnote[<+summary+>],' 39 | \.'eno:anfxwarning[<+summary+>],' 40 | \.'eno:anfxerror[<+summary+>],' 41 | \.'sbr:other,' 42 | \.'nor:listoffixmes' 43 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/flafter: -------------------------------------------------------------------------------- 1 | if exists("flafter_package_file") 2 | finish 3 | endif 4 | let flafter_package_file = 1 5 | 6 | let g:TeX_package_option_flafter = '' 7 | 8 | let g:TeX_package_flafter = 'noo:suppressfloats,noo:suppress' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/float: -------------------------------------------------------------------------------- 1 | if exists("float_package_file") 2 | finish 3 | endif 4 | let float_package_file = 1 5 | 6 | let g:TeX_package_option_float = '' 7 | 8 | let g:TeX_package_float = 9 | \ 'bra:floatstyle,' 10 | \.'brs:newfloat{<++>}{<++>}{<++>}[<++>],' 11 | \.'brd:floatname,' 12 | \.'brd:listof,' 13 | \.'bra:restylefloat,' 14 | \.'brd:floatplacement' 15 | 16 | " vim:ft=vim:ff=unix: 17 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/floatflt: -------------------------------------------------------------------------------- 1 | if exists("floatflt_package_file") 2 | finish 3 | endif 4 | let floatflt_package_file = 1 5 | 6 | let g:TeX_package_option_floatflt = 'rflt,lflt,vflt' 7 | 8 | let g:TeX_package_floatflt = 9 | \ 'ens:floatingfigure:[<+loc+>]{<+spec+>},' 10 | \.'ens:floatingtable:[<+loc+>]{<+spec+>}' 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/fn2end: -------------------------------------------------------------------------------- 1 | if exists("fn2end_package_file") 2 | finish 3 | endif 4 | let fn2end_package_file = 1 5 | 6 | let g:TeX_package_option_fn2end = '' 7 | 8 | let g:TeX_package_fn2end = 'makeendnotes,theendnotes' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/footmisc: -------------------------------------------------------------------------------- 1 | if exists("footmisc_package_file") 2 | finish 3 | endif 4 | let footmisc_package_file = 1 5 | 6 | let g:TeX_package_option_footmisc = 7 | \ 'bottom,' 8 | \.'flushmargin,' 9 | \.'marginal,' 10 | \.'multiple,' 11 | \.'norule,' 12 | \.'para,' 13 | \.'perpage,' 14 | \.'splitrule,' 15 | \.'stable,' 16 | \.'symbol,' 17 | \.'symbol+' 18 | 19 | let g:TeX_package_footmisc = '' 20 | 21 | " vim:ft=vim:ff=unix: 22 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/geometry: -------------------------------------------------------------------------------- 1 | if exists("geometry_package_file") 2 | finish 3 | endif 4 | let geometry_package_file = 1 5 | 6 | let g:TeX_package_option_geometry = 7 | \ 'sbr:Boolean,' 8 | \.'verbose,' 9 | \.'landscape,' 10 | \.'portrait,' 11 | \.'twoside,' 12 | \.'includemp,' 13 | \.'reversemp,' 14 | \.'reversemarginpar,' 15 | \.'nohead,' 16 | \.'nofoot,' 17 | \.'noheadfoot,' 18 | \.'dvips,' 19 | \.'pdftex,' 20 | \.'vtex,' 21 | \.'truedimen,' 22 | \.'reset,' 23 | \.'sbr:BooleanDimensions,' 24 | \.'a0paper,' 25 | \.'a1paper,' 26 | \.'a2paper,' 27 | \.'a3paper,' 28 | \.'a4paper,' 29 | \.'a5paper,' 30 | \.'a6paper,' 31 | \.'b0paper,' 32 | \.'b1paper,' 33 | \.'b2paper,' 34 | \.'b3paper,' 35 | \.'b4paper,' 36 | \.'b5paper,' 37 | \.'b6paper,' 38 | \.'letterpaper,' 39 | \.'executivepaper,' 40 | \.'legalpaper,' 41 | \.'sbr:SingleValueOption,' 42 | \.'paper=,' 43 | \.'papername=,' 44 | \.'paperwidth=,' 45 | \.'paperheight=,' 46 | \.'width=,' 47 | \.'totalwidth=,' 48 | \.'height=,' 49 | \.'totalheight=,' 50 | \.'left=,' 51 | \.'lmargin=,' 52 | \.'right=,' 53 | \.'rmargin=,' 54 | \.'top=,' 55 | \.'tmargin=,' 56 | \.'bottom=,' 57 | \.'bmargin=,' 58 | \.'hscale=,' 59 | \.'vscale=,' 60 | \.'textwidth=,' 61 | \.'textheight=,' 62 | \.'marginparwidth=,' 63 | \.'marginpar=,' 64 | \.'marginparsep=,' 65 | \.'headheight=,' 66 | \.'head=,' 67 | \.'headsep=,' 68 | \.'footskip=,' 69 | \.'hoffset=,' 70 | \.'voffset=,' 71 | \.'twosideshift=,' 72 | \.'mag=,' 73 | \.'columnsep=,' 74 | \.'footnotesep=,' 75 | \.'sbr:TwoValueOptions,' 76 | \.'papersize={<++>},' 77 | \.'total={<++>},' 78 | \.'body={<++>},' 79 | \.'text={<++>},' 80 | \.'scale={<++>},' 81 | \.'hmargin={<++>},' 82 | \.'vmargin={<++>},' 83 | \.'margin={<++>},' 84 | \.'offset={<++>},' 85 | \.'sbr:ThreeValueOptions,' 86 | \.'hdivide={<++>},' 87 | \.'vdivide={<++>},' 88 | \.'divide={<++>}' 89 | 90 | let g:TeX_package_geometry = 91 | \ 'bra:geometry' 92 | 93 | " vim:ft=vim:ff=unix: 94 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/german: -------------------------------------------------------------------------------- 1 | if exists("german_package_file") 2 | finish 3 | endif 4 | let german_package_file = 1 5 | 6 | let g:TeX_package_german = '' 7 | let g:TeX_package_option_german = '' 8 | " For now just define the smart quotes. 9 | let b:Tex_SmartQuoteOpen = '"`' 10 | let b:Tex_SmartQuoteClose = "\"'" 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/graphicx: -------------------------------------------------------------------------------- 1 | if exists("graphicx_package_file") 2 | finish 3 | endif 4 | let graphicx_package_file = 1 5 | 6 | let g:TeX_package_option_graphicx = 7 | \ 'sbr:Drivers,' 8 | \.'xdvi,' 9 | \.'dvipdf,' 10 | \.'dvipdfm,' 11 | \.'pdftex,' 12 | \.'dvipsone,' 13 | \.'dviwindo,' 14 | \.'emtex,' 15 | \.'dviwin,' 16 | \.'oztex,' 17 | \.'textures,' 18 | \.'pctexps,' 19 | \.'pctexwin,' 20 | \.'pctexhp,' 21 | \.'pctex32,' 22 | \.'truetex,' 23 | \.'tcidvi,' 24 | \.'vtex,' 25 | \.'sbr:Rest,' 26 | \.'debugshow,' 27 | \.'draft,' 28 | \.'final,' 29 | \.'hiderotate,' 30 | \.'hiresbb,' 31 | \.'hidescale,' 32 | \.'unknownkeysallowed,' 33 | \.'unknownkeyserror' 34 | 35 | let g:TeX_package_graphicx = 36 | \ 'sbr:Includegraphics,' 37 | \.'brs:includegraphics[<++>]{<++>},' 38 | \.'spe:height=,' 39 | \.'spe:width=,' 40 | \.'spe:keepaspectratio=,' 41 | \.'spe:totalheight=,' 42 | \.'spe:angle=,' 43 | \.'spe:scale=,' 44 | \.'spe:origin=,' 45 | \.'spe:clip,' 46 | \.'spe:bb=,' 47 | \.'spe:viewport=,' 48 | \.'spe:trim=,' 49 | \.'spe:draft,' 50 | \.'spe:hiresbb,' 51 | \.'spe:type=,' 52 | \.'spe:ext=,' 53 | \.'spe:read=,' 54 | \.'spe:command=,' 55 | \.'sbr:Rotatebox,' 56 | \.'brs:rotatebox[<++>]{<++>}{<++>},' 57 | \.'spe:origin=,' 58 | \.'spe:x=,' 59 | \.'spe:y=,' 60 | \.'spe:units=,' 61 | \.'sbr:Rest,' 62 | \.'brs:scalebox{<++>}[<++>]{<++>},' 63 | \.'brs:resizebox{<++>}{<++>}{<++>},' 64 | \.'brs:resizebox*{<++>}{<++>}{<++>},' 65 | \.'bra:DeclareGraphicsExtensions,' 66 | \.'brs:DeclareGraphicsRule{<++>}{<++>}{<++>}{<++>},' 67 | \.'bra:graphicspath' 68 | 69 | " vim:ft=vim:ff=unix: 70 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/graphpap: -------------------------------------------------------------------------------- 1 | if exists("graphpap_package_file") 2 | finish 3 | endif 4 | let graphpap_package_file = 1 5 | 6 | let g:TeX_package_option_graphpap = '' 7 | 8 | let g:TeX_package_graphpap = 'brs:graphpaper[<+step+>](<+x1,y1+>)(<+x2,y2+>)' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/harpoon: -------------------------------------------------------------------------------- 1 | if exists("harpoon_package_file") 2 | finish 3 | endif 4 | let harpoon_package_file = 1 5 | 6 | let g:TeX_package_option_harpoon = '' 7 | 8 | let g:TeX_package_harpoon = 9 | \ 'bra:overleftharp,' 10 | \.'bra:overrightharp,' 11 | \.'bra:overleftharpdown,' 12 | \.'bra:overrightharpdown,' 13 | \.'bra:underleftharp,' 14 | \.'bra:underrightharp,' 15 | \.'bra:underleftharpdown,' 16 | \.'bra:underrightharpdown' 17 | 18 | " vim:ft=vim:ff=unix: 19 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/hhline: -------------------------------------------------------------------------------- 1 | if exists("hhline_package_file") 2 | finish 3 | endif 4 | let hhline_package_file = 1 5 | 6 | let g:TeX_package_option_hhline = '' 7 | 8 | let g:TeX_package_hhline = 9 | \ 'bra:hhline,' 10 | \.'sep:a,' 11 | \.'spe:=,' 12 | \.'spe:-,' 13 | \.'spe:~,' 14 | \."spe:\\\|," 15 | \.'spe::,' 16 | \.'spe:#,' 17 | \.'spe:t,' 18 | \.'spe:b,' 19 | \.'spe:*' 20 | 21 | " vim:ft=vim:ff=unix: 22 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/histogram: -------------------------------------------------------------------------------- 1 | if exists("histogram_package_file") 2 | finish 3 | endif 4 | let histogram_package_file = 1 5 | 6 | let g:TeX_package_option_histogram = '' 7 | 8 | let g:TeX_package_histogram = 9 | \ 'histogram,' 10 | \.'noverticallines,' 11 | \.'verticallines' 12 | 13 | " vim:ft=vim:ff=unix: 14 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/hyperref: -------------------------------------------------------------------------------- 1 | if exists("hyperref_package_file") 2 | finish 3 | endif 4 | let hyperref_package_file = 1 5 | 6 | let g:TeX_package_option_hyperref = 7 | \ '4=,' 8 | \.'a4paper,' 9 | \.'a5paper,' 10 | \.'anchorcolor=,' 11 | \.'b5paper,' 12 | \.'backref=,' 13 | \.'baseurl={<++>},' 14 | \.'bookmarks=,' 15 | \.'bookmarksnumbered=,' 16 | \.'bookmarksopen=,' 17 | \.'bookmarksopenlevel=,' 18 | \.'bookmarkstype=,' 19 | \.'breaklinks=,' 20 | \.'citebordercolor=,' 21 | \.'citecolor=,' 22 | \.'colorlinks=,' 23 | \.'debug=,' 24 | \.'draft,' 25 | \.'dvipdf,' 26 | \.'dvipdfm,' 27 | \.'dvips,' 28 | \.'dvipsone,' 29 | \.'dviwindo,' 30 | \.'executivepaper,' 31 | \.'extension=,' 32 | \.'filebordercolor=,' 33 | \.'filecolor=,' 34 | \.'frenchlinks=,' 35 | \.'hyperfigures=,' 36 | \.'hyperindex=,' 37 | \.'hypertex,' 38 | \.'hypertexnames=,' 39 | \.'implicit=,' 40 | \.'latex2html,' 41 | \.'legalpaper,' 42 | \.'letterpaper,' 43 | \.'linkbordercolor=,' 44 | \.'linkcolor=,' 45 | \.'linktocpage=,' 46 | \.'menubordercolor=,' 47 | \.'menucolor=,' 48 | \.'naturalnames,' 49 | \.'nesting=,' 50 | \.'pageanchor=,' 51 | \.'pagebackref=,' 52 | \.'pagebordercolor=,' 53 | \.'pagecolor=,' 54 | \.'pdfauthor={<++>},' 55 | \.'pdfborder=,' 56 | \.'pdfcenterwindow=,' 57 | \.'pdfcreator={<++>},' 58 | \.'pdffitwindow,' 59 | \.'pdfhighlight=,' 60 | \.'pdfkeywords={<++>},' 61 | \.'pdfmenubar=,' 62 | \.'pdfnewwindow=,' 63 | \.'pdfpagelabels=,' 64 | \.'pdfpagelayout=,' 65 | \.'pdfpagemode=,' 66 | \.'pdfpagescrop=,' 67 | \.'pdfpagetransition=,' 68 | \.'pdfproducer={<++>},' 69 | \.'pdfstartpage={<++>},' 70 | \.'pdfstartview={<++>},' 71 | \.'pdfsubject={<++>},' 72 | \.'pdftex,' 73 | \.'pdftitle={<++>},' 74 | \.'pdftoolbar=,' 75 | \.'pdfusetitle=,' 76 | \.'pdfview,' 77 | \.'pdfwindowui=,' 78 | \.'plainpages=,' 79 | \.'ps2pdf,' 80 | \.'raiselinks=,' 81 | \.'runbordercolor,' 82 | \.'tex4ht,' 83 | \.'textures,' 84 | \.'unicode=,' 85 | \.'urlbordercolor=,' 86 | \.'urlcolor=,' 87 | \.'verbose=,' 88 | \.'vtex' 89 | 90 | let g:TeX_package_hyperref = 91 | \ 'sbr:Preamble,' 92 | \.'bra:hypersetup,' 93 | \.'wwwbrowser,' 94 | \.'sbr:Links,' 95 | \.'bra:hyperbaseurl,' 96 | \.'brs:href{<+URL+>}{<+text+>},' 97 | \.'bra:hyperimage,' 98 | \.'brs:hyperdef{<+category+>}{<+name+>}{<+text+>},' 99 | \.'brs:hyperref{<+URL+>}{<+category+>}{<+name+>}{<+text+>},' 100 | \.'brs:hyperlink{<+name+>}{<+text+>},' 101 | \.'brs:hypertarget{<+name+>}{<+text+>},' 102 | \.'bra:url,' 103 | \.'bra:htmladdnormallink,' 104 | \.'brs:Acrobatmenu{<+option+>}{<+tekst+>},' 105 | \.'brs:pdfbookmark[<++>]{<++>}{<++>},' 106 | \.'bra:thispdfpagelabel,' 107 | \.'sbr:Forms,' 108 | \.'env:Form,' 109 | \.'sep:Forms1,' 110 | \.'brs:TextField[<+parameters+>]{<+label+>},' 111 | \.'brs:CheckBox[<+parameters+>]{<+label+>},' 112 | \.'brs:ChoiceMenu[<+parameters+>]{<+label+>}{<+choices+>},' 113 | \.'brs:PushButton[<+parameters+>]{<+label+>},' 114 | \.'brs:Submit[<+parameters+>]{<+label+>},' 115 | \.'brs:Reset[<+parameters+>]{<+label+>},' 116 | \.'sep:Forms2,' 117 | \.'brs:LayoutTextField{<+label+>}{<+field+>},' 118 | \.'brs:LayoutChoiceField{<+label+>}{<+field+>},' 119 | \.'brs:LayoutCheckboxField{<+label+>}{<+field+>},' 120 | \.'sep:Forms3,' 121 | \.'brs:MakeRadioField{<+width+>}{<+height+>},' 122 | \.'brs:MakeCheckField{<+width+>}{<+height+>},' 123 | \.'brs:MakeTextField{<+width+>}{<+height+>},' 124 | \.'brs:MakeChoiceField{<+width+>}{<+height+>},' 125 | \.'brs:MakeButtonField{<+text+>},' 126 | \.'sbr:Parameters,' 127 | \.'spe:accesskey,' 128 | \.'spe:align,' 129 | \.'spe:backgroundcolor,' 130 | \.'spe:bordercolor,' 131 | \.'spe:bordersep,' 132 | \.'spe:borderwidth,' 133 | \.'spe:charsize,' 134 | \.'spe:checked,' 135 | \.'spe:color,' 136 | \.'spe:combo,' 137 | \.'spe:default,' 138 | \.'spe:disabled,' 139 | \.'spe:height,' 140 | \.'spe:hidden,' 141 | \.'spe:maxlen,' 142 | \.'spe:menulength,' 143 | \.'spe:multiline,' 144 | \.'spe:name,' 145 | \.'spe:onblur,' 146 | \.'spe:onchange,' 147 | \.'spe:onclick,' 148 | \.'spe:ondblclick,' 149 | \.'spe:onfocus,' 150 | \.'spe:onkeydown,' 151 | \.'spe:onkeypress,' 152 | \.'spe:onkeyup,' 153 | \.'spe:onmousedown,' 154 | \.'spe:onmousemove,' 155 | \.'spe:onmouseout,' 156 | \.'spe:onmouseover,' 157 | \.'spe:onmouseup,' 158 | \.'spe:onselect,' 159 | \.'spe:password,' 160 | \.'spe:popdown,' 161 | \.'spe:radio,' 162 | \.'spe:readonly,' 163 | \.'spe:tabkey,' 164 | \.'spe:value,' 165 | \.'spe:width' 166 | 167 | " vim:ft=vim:ff=unix: 168 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/ifthen: -------------------------------------------------------------------------------- 1 | if exists("ifthen_package_file") 2 | finish 3 | endif 4 | let ifthen_package_file = 1 5 | 6 | let g:TeX_package_option_ifthen = '' 7 | 8 | let g:TeX_package_ifthen = 9 | \ 'brs:ifthenelse{<++>}{<++>}{<++>},' 10 | \.'brd:equal,' 11 | \.'bra:boolean,' 12 | \.'bra:lengthtest,' 13 | \.'bra:isodd,' 14 | \.'brd:whiledo,' 15 | \.'bra:newboolean,' 16 | \.'brd:setboolean,' 17 | \.'nor:and,' 18 | \.'nor:or,' 19 | \.'nor:not' 20 | 21 | " vim:ft=vim:ff=unix: 22 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/inputenc: -------------------------------------------------------------------------------- 1 | if exists("inputenc_package_file") 2 | finish 3 | endif 4 | let inputenc_package_file = 1 5 | 6 | let g:TeX_package_option_inputenc = 7 | \ 'ascii,' 8 | \.'latin1,' 9 | \.'latin2,' 10 | \.'latin3,' 11 | \.'latin4,' 12 | \.'latin5,' 13 | \.'latin9,' 14 | \.'decmulti,' 15 | \.'cp850,' 16 | \.'cp852,' 17 | \.'cp437,' 18 | \.'cp437de,' 19 | \.'cp865,' 20 | \.'applemac,' 21 | \.'next,' 22 | \.'ansinew,' 23 | \.'cp1250,' 24 | \.'cp1252' 25 | 26 | let g:TeX_package_inputenc = 27 | \ 'bra:inputencoding' 28 | 29 | " vim:ft=vim:ff=unix: 30 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/letterspace: -------------------------------------------------------------------------------- 1 | if exists("letterspace_package_file") 2 | finish 3 | endif 4 | let letterspace_package_file = 1 5 | 6 | let g:TeX_package_option_letterspace = '' 7 | 8 | let g:TeX_package_letterspace = 'nor:letterspace' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/lineno: -------------------------------------------------------------------------------- 1 | if exists("lineno_package_file") 2 | finish 3 | endif 4 | let lineno_package_file = 1 5 | 6 | let g:TeX_package_option_lineno = 7 | \ 'left,' 8 | \.'right,' 9 | \.'switch,' 10 | \.'switch*,' 11 | \.'pagewise,' 12 | \.'running,' 13 | \.'modulo,' 14 | \.'mathlines,' 15 | \.'displaymath,' 16 | \.'hyperref' 17 | 18 | let g:TeX_package_lineno = 19 | \ 'sbr:Environments,' 20 | \.'env:linenumbers,' 21 | \.'env:linenumbers*,' 22 | \.'env:numquote,' 23 | \.'env:numquote*,' 24 | \.'env:numquotation,' 25 | \.'env:numquotation*,' 26 | \.'env:bframe,' 27 | \.'env:linenomath,' 28 | \.'env:linenomath*,' 29 | \.'bra:linelabel,' 30 | \.'sbr:Commands,' 31 | \.'nor:linenumbers,' 32 | \.'nor:linenumbers*,' 33 | \.'noo:linenumbers,' 34 | \.'nor:nolinenumbers,' 35 | \.'nor:runninglinenumbers,' 36 | \.'nor:runninglinenumbers*,' 37 | \.'noo:runninglinenumbers,' 38 | \.'nor:pagewiselinenumbers,' 39 | \.'nor:resetlinenumber,' 40 | \.'noo:resetlinenumber,' 41 | \.'nor:setrunninglinenumbers,' 42 | \.'nor:setpagewiselinenumbers,' 43 | \.'nor:switchlinenumbers,' 44 | \.'nor:switchlinenumbers*,' 45 | \.'nor:leftlinenumbers,' 46 | \.'nor:leftlinenumbers*,' 47 | \.'nor:rightlinenumbers,' 48 | \.'nor:rightlinenumbers*,' 49 | \.'nor:runningpagewiselinenumbers,' 50 | \.'nor:realpagewiselinenumbers,' 51 | \.'nor:modulolinenumbers,' 52 | \.'noo:modulolinenumbers,' 53 | \.'nor:linenumberdisplaymath,' 54 | \.'nor:nolinenumberdisplaymath,' 55 | \.'nor:thelinenumber,' 56 | \.'nob:linerefp,' 57 | \.'nob:linerefr,' 58 | \.'nob:lineref' 59 | 60 | " vim:ft=vim:ff=unix: 61 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/longtable: -------------------------------------------------------------------------------- 1 | if exists("longtable_package_file") 2 | finish 3 | endif 4 | let longtable_package_file = 1 5 | 6 | let g:TeX_package_option_longtable = 7 | \ 'errorshow,' 8 | \.'pausing,' 9 | \.'set,' 10 | \.'final' 11 | 12 | let g:TeX_package_longtable = 13 | \ 'sbr:Commands,' 14 | \.'nor:setlongtables,' 15 | \.'bra:LTleft,' 16 | \.'bra:LTright,' 17 | \.'bra:LTpre,' 18 | \.'bra:LTpost,' 19 | \.'bra:LTchunksize,' 20 | \.'bra:LTcapwidth,' 21 | \.'bra:LTcapwidth,' 22 | \.'sbr:Longtable,' 23 | \.'env:longtable,' 24 | \.'sep:lt,' 25 | \.'nor:endhead,' 26 | \.'nor:endfirsthead,' 27 | \.'nor:endfoot,' 28 | \.'nor:endlastfoot,' 29 | \.'nor:kill,' 30 | \.'bra:caption,' 31 | \.'nob:caption,' 32 | \.'bra:caption*,' 33 | \.'nor:newpage' 34 | 35 | " vim:ft=vim:ts=4:sw=4:noet:ff=unix: 36 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/lscape: -------------------------------------------------------------------------------- 1 | if exists("lscape_package_file") 2 | finish 3 | endif 4 | let lscape_package_file = 1 5 | 6 | let g:TeX_package_option_lscape = '' 7 | 8 | let g:TeX_package_lscape = 'env:landscape' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/manyfoot: -------------------------------------------------------------------------------- 1 | if exists("manyfoot_package_file") 2 | finish 3 | endif 4 | let manyfoot_package_file = 1 5 | 6 | let g:TeX_package_option_manyfoot = 'para' 7 | 8 | let g:TeX_package_manyfoot = 9 | \ 'bra:newfootnote,bra:newfootnote[para],' 10 | \.'bra:footnoteA,bra:footnoteB,' 11 | \.'bra:FootnoteA,bra:FootnoteB,' 12 | \.'bra:Footnotemark,bra:Footnotetext,' 13 | \.'SplitNote' 14 | 15 | " vim:ft=vim:ff=unix: 16 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/moreverb: -------------------------------------------------------------------------------- 1 | if exists("moreverb_package_file") 2 | finish 3 | endif 4 | let moreverb_package_file = 1 5 | 6 | let g:TeX_package_option_moreverb = '' 7 | 8 | let g:TeX_package_moreverb = 9 | \ 'ens:verbatimwrite:{<++>},' 10 | \.'ens:verbatimtab:[<++>],' 11 | \.'ens:listing:[<+step+>]{<+number+>},' 12 | \.'ens:listing*:[<+step+>]{<+number+>},' 13 | \.'env:boxedverbatim,' 14 | \.'bra:verbatimtabsize,' 15 | \.'bra:listingoffset,' 16 | \.'brs:listinginput[<++>]{<++>}{<++>},' 17 | \.'brs:verbatimtabinput[<++>]{<++>}' 18 | 19 | let g:Tex_completion_explorer = g:Tex_completion_explorer.'verbatimtabinput,' 20 | 21 | syn region texZone start="\\begin{verbatimwrite}" end="\\end{verbatimwrite}\|%stopzone\>" fold 22 | syn region texZone start="\\begin{verbatimtab}" end="\\end{verbatimtab}\|%stopzone\>" fold 23 | syn region texZone start="\\begin{boxedverbatim}" end="\\end{boxedverbatim}\|%stopzone\>" fold 24 | syn region texZone start="\\begin{listing}" end="\\end{listing}\|%stopzone\>" fold 25 | syn region texZone start="\\begin{listing*}" end="\\end{listing*}\|%stopzone\>" fold 26 | 27 | 28 | " vim:ft=vim:ff=unix: 29 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/multibox: -------------------------------------------------------------------------------- 1 | if exists("multibox_package_file") 2 | finish 3 | endif 4 | let multibox_package_file = 1 5 | 6 | let g:TeX_package_option_multibox = '' 7 | 8 | let g:TeX_package_multibox = 'multimake,multiframe' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/multicol: -------------------------------------------------------------------------------- 1 | if exists("multicol_package_file") 2 | finish 3 | endif 4 | let multicol_package_file = 1 5 | 6 | let g:TeX_package_option_multicol = '' 7 | 8 | let g:TeX_package_multicol = 9 | \ 'ens:multicols:{<+cols+>}[<+text+>][<+sep+>],' 10 | \.'columnbreak,' 11 | \.'premulticols,' 12 | \.'postmulticols,' 13 | \.'multicolsep,' 14 | \.'columnsep,' 15 | \.'linewidth,' 16 | \.'columnseprule,' 17 | \.'flushcolumnt,' 18 | \.'raggedcolumns,' 19 | \.'unbalanced' 20 | 21 | " vim:ft=vim:ff=unix: 22 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/newalg: -------------------------------------------------------------------------------- 1 | if exists("newalg_package_file") 2 | finish 3 | endif 4 | let newalg_package_file = 1 5 | 6 | let g:TeX_package_option_newalg = '' 7 | 8 | let g:TeX_package_newalg = 9 | \ 'ens:algorithm:{<+name+>}{<++>},' 10 | \.'ens:IF:{<+cond+>},' 11 | \.'ens:FOR:{<+loop+>},' 12 | \.'ens:WHILE:{<+cond+>},' 13 | \.'bra:ERROR,' 14 | \.'nor:ELSE,' 15 | \.'nor:RETURN,' 16 | \.'nor:NIL,' 17 | \.'nor:TO,' 18 | \.'bra:CALL,' 19 | \.'bra:text,' 20 | \.'env:REPEAT,' 21 | \.'env:SWITCH,' 22 | \.'nor:=,' 23 | \.'bra:item,' 24 | \.'nor:algkey' 25 | 26 | " vim:ft=vim:ff=unix: 27 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/ngerman: -------------------------------------------------------------------------------- 1 | if exists("ngerman_package_file") 2 | finish 3 | endif 4 | let ngerman_package_file = 1 5 | 6 | let g:TeX_package_ngerman = '' 7 | let g:TeX_package_option_ngerman = '' 8 | " For now just define the smart quotes. 9 | let b:Tex_SmartQuoteOpen = '"`' 10 | let b:Tex_SmartQuoteClose = "\"'" 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/numprint: -------------------------------------------------------------------------------- 1 | if exists("numprint_package_file") 2 | finish 3 | endif 4 | let numprint_package_file = 1 5 | 6 | let g:TeX_package_option_numprint = '' 7 | 8 | let g:TeX_package_numprint = 9 | \ 'bra:numprint,' 10 | \.'nob:numprint,' 11 | \.'bra:thousandsep,' 12 | \.'bra:decimalsign,' 13 | \.'bra:productsign,' 14 | \.'bra:unitseparator,' 15 | \.'brd:expnumprint,' 16 | \.'global' 17 | 18 | " vim:ft=vim:ff=unix: 19 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/oldstyle: -------------------------------------------------------------------------------- 1 | if exists("oldstyle_package_file") 2 | finish 3 | endif 4 | let oldstyle_package_file = 1 5 | 6 | let g:TeX_package_option_oldstyle = '' 7 | 8 | let g:TeX_package_oldstyle = 9 | \ 'bra:textos,' 10 | \.'bra:mathos' 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/outliner: -------------------------------------------------------------------------------- 1 | if exists("outliner_package_file") 2 | finish 3 | endif 4 | let outliner_package_file = 1 5 | 6 | let g:TeX_package_option_outliner = '' 7 | 8 | let g:TeX_package_outliner = 9 | \ 'env:Outline,' 10 | \.'bra:Level,' 11 | \.'bra:SetBaseLevel,' 12 | \.'sep:preamble,' 13 | \.'bra:OutlinePageBreaks,' 14 | \.'bra:OutlinePageBreaks,' 15 | \.'bra:OutlineLevelStart,' 16 | \.'bra:OutlineLevelCont,' 17 | \.'bra:OutlineLevelEnd' 18 | 19 | " vim:ft=vim:ff=unix: 20 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/overcite: -------------------------------------------------------------------------------- 1 | if exists("overcite_package_file") 2 | finish 3 | endif 4 | let overcite_package_file = 1 5 | 6 | let g:TeX_package_option_overcite = 7 | \ 'verbose,' 8 | \.'ref,' 9 | \.'nospace,' 10 | \.'space,' 11 | \.'nosort,' 12 | \.'sort,' 13 | \.'nomove,' 14 | \.'noadjust' 15 | 16 | let g:TeX_package_overcite = 17 | \ 'bra:cite,' 18 | \.'bra:citen,' 19 | \.'bra:citenum,' 20 | \.'bra:citeonline,' 21 | \.'bra:nocite,' 22 | \.'sep:redefine,' 23 | \.'bra:citeform,' 24 | \.'bra:citepunct,' 25 | \.'bra:citeleft,' 26 | \.'bra:citeright,' 27 | \.'bra:citemid,' 28 | \.'bra:citedash' 29 | 30 | syn region texRefZone matchgroup=texStatement start="\\citen\([tp]\*\=\)\={" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter 31 | syn region texRefZone matchgroup=texStatement start="\\citenum\([tp]\*\=\)\={" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter 32 | syn region texRefZone matchgroup=texStatement start="\\citeonline\([tp]\*\=\)\={" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter 33 | 34 | " vim:ft=vim:ff=unix: 35 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/pagenote: -------------------------------------------------------------------------------- 1 | " Pagenote package support v 0.1 2010-02-17 2 | " This file has been written by 3 | " Andreas Wagner 4 | " based on the documentation of 5 | " pagenote 27 September 2004 6 | " It can be used, modified and distributed according to the vim license. 7 | 8 | 9 | if exists("pagenote_package_file") 10 | finish 11 | endif 12 | let pagenote_package_file = 1 13 | 14 | let g:TeX_package_option_pagenote = 15 | \ 'continuous,' 16 | \.'page' 17 | 18 | let g:TeX_package_pagenote = 19 | \ 'sbr:preamble,' 20 | \.'nor:makepagenote,' 21 | \.'sbr:regular,' 22 | \.'nob:pagenote[<+lemma+>]{<+note+>},' 23 | \.'sbr:end,' 24 | \.'nor:printnotes,' 25 | \.'nor:printnotes*' 26 | 27 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/parallel: -------------------------------------------------------------------------------- 1 | if exists("parallel_package_file") 2 | finish 3 | endif 4 | let parallel_package_file = 1 5 | 6 | let g:TeX_package_option_parallel = '' 7 | 8 | let g:TeX_package_parallel = 9 | \ 'env:Parallel,' 10 | \.'bra:ParallelLText,' 11 | \.'bra:ParallelRText,' 12 | \.'nor:ParallelPar,' 13 | \.'nor:tolerance' 14 | 15 | " vim:ft=vim:ff=unix: 16 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/plain: -------------------------------------------------------------------------------- 1 | if exists("plain_package_file") 2 | finish 3 | endif 4 | let plain_package_file = 1 5 | 6 | let g:TeX_package_option_plain = '' 7 | 8 | let g:TeX_package_plain = 'env:plain' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/plates: -------------------------------------------------------------------------------- 1 | if exists("plates_package_file") 2 | finish 3 | endif 4 | let plates_package_file = 1 5 | 6 | let g:TeX_package_option_plates = 'figures,onefloatperpage,memoir' 7 | 8 | let g:TeX_package_plates = 9 | \ 'env:plate,' 10 | \.'listofplates,' 11 | \.'ProcessPlates,' 12 | \.'bra:setplatename,' 13 | \.'bra:setplatename,' 14 | \.'bra:atBeginPlates' 15 | 16 | " vim:ft=vim:ff=unix: 17 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/polski: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcf/vim-latex/a939dbb881e53c595092d925a275ea63962b3890/ftplugin/latex-suite/packages/polski -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/psgo: -------------------------------------------------------------------------------- 1 | if exists("psgo_package_file") 2 | finish 3 | endif 4 | let psgo_package_file = 1 5 | 6 | let g:TeX_package_option_psgo = '' 7 | 8 | let g:TeX_package_psgo = 9 | \ 'env:psgogoard,' 10 | \.'env:psgoboard*,' 11 | \.'brs:stone{<+color+>}{<+letter+>}{<+number+>},' 12 | \.'brs:stone[<+marker+>]{<+color+>}{<+letter+>}{<+number+>},' 13 | \.'brs:move{<+letter+>}{<+number+>},' 14 | \.'brs:move*{<+letter+>}{<+number+>},' 15 | \.'brs:goline{<+letter1+>}{<+number1+>}{<+letter2+>}{<+number2+>},' 16 | \.'brs:goarrow{<+letter1+>}{<+number1+>}{<+letter2+>}{<+number2+>},' 17 | \.'sbr:Markers,' 18 | \.'brs:markpos{<+marker+>}{<+letter+>}{<+number+>},' 19 | \.'markma,' 20 | \.'marktr,' 21 | \.'markcr,' 22 | \.'marksq,' 23 | \.'bra:marklb,' 24 | \.'marksl,' 25 | \.'markdd' 26 | 27 | " vim:ft=vim:ff=unix: 28 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/schedule: -------------------------------------------------------------------------------- 1 | if exists("schedule_package_file") 2 | finish 3 | endif 4 | let schedule_package_file = 1 5 | 6 | let g:TeX_package_option_schedule = '' 7 | 8 | let g:TeX_package_schedule = 9 | \ 'ens:schedule:[<+title+>],' 10 | \.'bra:CellHeight,' 11 | \.'bra:CellWidth,' 12 | \.'bra:TimeRange,' 13 | \.'bra:SubUnits,' 14 | \.'bra:BeginOn,' 15 | \.'bra:TextSize,' 16 | \.'nor:FiveDay,' 17 | \.'nor:SevenDay,' 18 | \.'brs:NewAppointment{<+name+>}{<+bg+>}{<+fg+>}' 19 | 20 | " vim:ft=vim:ff=unix: 21 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/textfit: -------------------------------------------------------------------------------- 1 | if exists("textfit_package_file") 2 | finish 3 | endif 4 | let textfit_package_file = 1 5 | 6 | let g:TeX_package_option_textfit = '' 7 | 8 | let g:TeX_package_textfit = 9 | \ 'brd:scaletowidth,' 10 | \.'brd:scaletoheight' 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/times: -------------------------------------------------------------------------------- 1 | if exists("times_package_file") 2 | finish 3 | endif 4 | let times_package_file = 1 5 | 6 | let g:TeX_package_option_times = '' 7 | 8 | let g:TeX_package_times = '' 9 | 10 | " vim:ft=vim:ff=unix: 11 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/tipa: -------------------------------------------------------------------------------- 1 | if exists("tipa_package_file") 2 | finish 3 | endif 4 | let tipa_package_file = 1 5 | 6 | let g:TeX_package_option_tipa = 7 | \ 'T1,' 8 | \.'noenc,' 9 | \.'tone,' 10 | \.'extra,' 11 | \.'safe' 12 | 13 | let g:TeX_package_tipa = 14 | \ 'sbr:Common,' 15 | \.'bra:textipa,' 16 | \.'env:IPA,' 17 | \.'tipaencoding,' 18 | \.'bra:super,' 19 | \.'nor:ipabar,' 20 | \.'brd:tipalowaraccent,' 21 | \.'brd:tipaupperaccent,' 22 | \.'brd:tipaLowaraccent,' 23 | \.'brd:tipaUpperaccent,' 24 | \.'brd:ipaclap,' 25 | \.'sbr:VowelsandConsonants,' 26 | \.'nor:textturna,' 27 | \.'nor:textrhooka,' 28 | \.'nor:textlhookfour,' 29 | \.'nor:textscripta,' 30 | \.'nor:textturnscripta,' 31 | \.'nor:textinvscripta,' 32 | \.'ae,' 33 | \.'nor:textaolig,' 34 | \.'nor:textsca,' 35 | \.'nor:textinvsca,' 36 | \.'nor:textscaolig,' 37 | \.'nor:textturnv,' 38 | \.'nor:textsoftsign,' 39 | \.'nor:texthardsign,' 40 | \.'nor:texthtb,' 41 | \.'nor:textscb,' 42 | \.'nor:textcrb,' 43 | \.'nor:textbarb,' 44 | \.'nor:textbeta,' 45 | \.'nor:textbarc,' 46 | \.'nor:texthtc,' 47 | \.'bra:v,' 48 | \.'bra:c,' 49 | \.'nor:textctc,' 50 | \.'nor:textstretchc,' 51 | \.'nor:textstretchcvar,' 52 | \.'nor:textctstretchc,' 53 | \.'nor:textctstretchcvar,' 54 | \.'nor:textcrd,' 55 | \.'nor:textbard,' 56 | \.'nor:texthtd,' 57 | \.'nor:textrtaild,' 58 | \.'nor:texthtrtaild,' 59 | \.'nor:textctd,' 60 | \.'nor:textfrhookd,' 61 | \.'nor:textfrhookdvar,' 62 | \.'nor:textdblig,' 63 | \.'nor:textdzlig,' 64 | \.'nor:textdctzlig,' 65 | \.'nor:textdyoghlig,' 66 | \.'nor:textctdctzlig,' 67 | \.'nor:textscdelta,' 68 | \.'nor:dh,' 69 | \.'nor:textrhooke,' 70 | \.'nor:textschwa,' 71 | \.'nor:textrhookschwa,' 72 | \.'nor:textreve,' 73 | \.'nor:textsce,' 74 | \.'nor:textepsilon,' 75 | \.'nor:textrhookepsilon,' 76 | \.'nor:textcloseepsilon,' 77 | \.'nor:textrevepsilon,' 78 | \.'nor:textrhookrevepsilon,' 79 | \.'nor:textcloserevepsilon,' 80 | \.'nor:textscf,' 81 | \.'nor:textscriptg,' 82 | \.'nor:textbarg,' 83 | \.'nor:textcrg,' 84 | \.'nor:texthtg,' 85 | \.'nor:textg,' 86 | \.'nor:textscg,' 87 | \.'nor:texthtscg,' 88 | \.'nor:textgamma,' 89 | \.'nor:textgrgamma,' 90 | \.'nor:textfrtailgamma,' 91 | \.'nor:textbktailgamma,' 92 | \.'nor:textbabygamma,' 93 | \.'nor:textramshorns,' 94 | \.'nor:texthvlig,' 95 | \.'nor:textcrh,' 96 | \.'nor:texthth,' 97 | \.'nor:textrtailhth,' 98 | \.'nor:textheng,' 99 | \.'nor:texththeng,' 100 | \.'nor:textturnh,' 101 | \.'nor:textsch,' 102 | \.'nor:i,' 103 | \.'nor:textbari,' 104 | \.'nor:textiota,' 105 | \.'nor:textlhti,' 106 | \.'nor:textlhtlongi,' 107 | \.'nor:textvibyi,' 108 | \.'nor:textraisevibyi,' 109 | \.'nor:textsci,' 110 | \.'nor:j,' 111 | \.'nor:textctj,' 112 | \.'nor:textctjvar,' 113 | \.'nor:textscj,' 114 | \.'bra:v,' 115 | \.'nor:textbardotlessj,' 116 | \.'nor:textObardotlessj,' 117 | \.'nor:texthtbardotlessj,' 118 | \.'nor:texthtbardotlessjvar,' 119 | \.'nor:texthtk,' 120 | \.'nor:textturnk,' 121 | \.'nor:textsck,' 122 | \.'nor:textturnsck,' 123 | \.'nor:textltilde,' 124 | \.'nor:textbarl,' 125 | \.'nor:textbeltl,' 126 | \.'nor:textrtaill,' 127 | \.'nor:textlyoghlig,' 128 | \.'nor:textOlyoghlig,' 129 | \.'nor:textscl,' 130 | \.'nor:textrevscl,' 131 | \.'nor:textlambda,' 132 | \.'nor:textcrlambda,' 133 | \.'nor:textltailm,' 134 | \.'nor:textturnm,' 135 | \.'nor:textturnmrleg,' 136 | \.'nor:texthmlig,' 137 | \.'nor:textscm,' 138 | \.'nor:textnrleg,' 139 | \.'~,' 140 | \.'nor:textltailn,' 141 | \.'nor:textfrbarn,' 142 | \.'nor:ng,' 143 | \.'nor:textrtailn,' 144 | \.'nor:textctn,' 145 | \.'nor:textnrleg,' 146 | \.'nor:textscn,' 147 | \.'nor:textbullseye,' 148 | \.'nor:textObullseye,' 149 | \.'nor:textbaro,' 150 | \.'nor:o,' 151 | \.'nor:textfemale,' 152 | \.'nor:textuncrfemale,' 153 | \.'nor:oe,' 154 | \.'nor:textscoelig,' 155 | \.'nor:textopeno,' 156 | \.'nor:textrhookopeno,' 157 | \.'nor:textturncelig,' 158 | \.'nor:textomega,' 159 | \.'nor:textinvomega,' 160 | \.'nor:textscomega,' 161 | \.'nor:textcloseomega,' 162 | \.'nor:textlhookp,' 163 | \.'nor:textscp,' 164 | \.'nor:textwynn,' 165 | \.'nor:textthorn,' 166 | \.'nor:textthornvari,' 167 | \.'nor:textthornvarii,' 168 | \.'nor:textthornvariii,' 169 | \.'nor:textthornvariv,' 170 | \.'nor:texthtp,' 171 | \.'nor:textphi,' 172 | \.'nor:texthtq,' 173 | \.'nor:textqplig,' 174 | \.'nor:textscq,' 175 | \.'nor:textfishhookr,' 176 | \.'nor:textlonglegr,' 177 | \.'nor:textrtailr,' 178 | \.'nor:textturnr,' 179 | \.'nor:textturnrrtail,' 180 | \.'nor:textturnlonglegr,' 181 | \.'nor:textscr,' 182 | \.'nor:textinvscr,' 183 | \.'nor:textrevscr,' 184 | \.'bra:v,' 185 | \.'nor:textrtails,' 186 | \.'nor:textesh,' 187 | \.'nor:textdoublebaresh,' 188 | \.'nor:textctesh,' 189 | \.'nor:textlooptoprevesh,' 190 | \.'nor:texthtt,' 191 | \.'nor:textlhookt,' 192 | \.'nor:textrtailt,' 193 | \.'nor:textfrhookt,' 194 | \.'nor:textctturnt,' 195 | \.'nor:texttctclig,' 196 | \.'nor:texttslig,' 197 | \.'nor:textteshlig,' 198 | \.'nor:textturnt,' 199 | \.'nor:textctt,' 200 | \.'nor:textcttctclig,' 201 | \.'nor:texttheta,' 202 | \.'nor:textbaru,' 203 | \.'nor:textupsilon,' 204 | \.'nor:textscu,' 205 | \.'nor:textturnscu,' 206 | \.'nor:textscriptv,' 207 | \.'nor:textturnw,' 208 | \.'nor:textchi,' 209 | \.'nor:textturny,' 210 | \.'nor:textscy,' 211 | \.'nor:textlhtlongy,' 212 | \.'nor:textvibyy,' 213 | \.'nor:textcommatailz,' 214 | \.'bra:v,' 215 | \.'nor:textctz,' 216 | \.'nor:textrtailz,' 217 | \.'nor:textcrtwo,' 218 | \.'nor:textturntwo,' 219 | \.'nor:textyogh,' 220 | \.'nor:textbenttailyogh,' 221 | \.'nor:textrevyogh,' 222 | \.'nor:textctyogh,' 223 | \.'nor:textturnthree,' 224 | \.'nor:textglotstop,' 225 | \.'nor:textraiseglotstop,' 226 | \.'nor:textbarglotstop,' 227 | \.'nor:textinvglotstop,' 228 | \.'nor:textcrinvglotstop,' 229 | \.'nor:textctinvglotstop,' 230 | \.'nor:textrevglotstop,' 231 | \.'nor:textturnglotstop,' 232 | \.'nor:textbarrevglotstop,' 233 | \.'nor:textpipe,' 234 | \.'nor:textpipevar,' 235 | \.'nor:textdoublebarpipe,' 236 | \.'nor:textdoublebarpipevar,' 237 | \.'nor:textdoublepipevar,' 238 | \.'nor:textdoublepipe,' 239 | \.'nor:textdoublebarslash,' 240 | \.'sbr:Suprasegmentals,' 241 | \.'nor:textprimstress,' 242 | \.'nor:textsecstress,' 243 | \.'nor:textlengthmark,' 244 | \.'nor:texthalflength,' 245 | \.'nor:textvertline,' 246 | \.'nor:textdoublevertline,' 247 | \.'bra:textbottomtiebar,' 248 | \.'nor:textdownstep,' 249 | \.'nor:textupstep,' 250 | \.'nor:textglobfall,' 251 | \.'nor:textglobrise,' 252 | \.'nor:textspleftarrow,' 253 | \.'nor:textdownfullarrow,' 254 | \.'nor:textupfullarrow,' 255 | \.'nor:textsubrightarrow,' 256 | \.'nor:textsubdoublearrow,' 257 | \.'sbr:AccentsandDiacritics,' 258 | \.'`,' 259 | \."'," 260 | \.'^,' 261 | \.'~,' 262 | \.'",' 263 | \.'bra:H,' 264 | \.'bra:r,' 265 | \.'bra:v,' 266 | \.'bra:u,' 267 | \.'=,' 268 | \.'.,' 269 | \.'bra:c,' 270 | \.'bra:textpolhook,' 271 | \.'nor:textrevpolhook{o,' 272 | \.'bra:textdoublegrave,' 273 | \.'bra:textsubgrave,' 274 | \.'bra:textsubacute,' 275 | \.'bra:textsubcircum,' 276 | \.'bra:textroundcap,' 277 | \.'bra:textacutemacron,' 278 | \.'bra:textgravemacron,' 279 | \.'bra:textvbaraccent,' 280 | \.'bra:textdoublevbaraccent,' 281 | \.'bra:textgravedot,' 282 | \.'bra:textdotacute,' 283 | \.'bra:textcircumdot,' 284 | \.'bra:texttildedot,' 285 | \.'bra:textbrevemacron,' 286 | \.'bra:textringmacron,' 287 | \.'bra:textacutewedge,' 288 | \.'bra:textdotbreve,' 289 | \.'bra:textsubbridge,' 290 | \.'bra:textinvsubbridge,' 291 | \.'sbr:SubscriptSquare,' 292 | \.'bra:textsubrhalfring,' 293 | \.'bra:textsublhalfring,' 294 | \.'bra:textsubw,' 295 | \.'bra:textoverw,' 296 | \.'bra:textseagull,' 297 | \.'bra:textovercross,' 298 | \.'bra:textsubplus,' 299 | \.'bra:textraising,' 300 | \.'bra:textlowering,' 301 | \.'bra:textadvancing,' 302 | \.'bra:textretracting,' 303 | \.'bra:textsubtilde,' 304 | \.'bra:textsubumlaut,' 305 | \.'bra:textsubring,' 306 | \.'bra:textsubwedge,' 307 | \.'bra:textsubbar,' 308 | \.'bra:textsubdot,' 309 | \.'bra:textsubarch,' 310 | \.'bra:textsyllabic,' 311 | \.'bra:textsuperimposetilde,' 312 | \.'nor:textcorner,' 313 | \.'nor:textopencorner,' 314 | \.'nor:textrhoticity,' 315 | \.'nor:textceltpal,' 316 | \.'nor:textlptr,' 317 | \.'nor:textrptr,' 318 | \.'nor:textrectangle,' 319 | \.'nor:textretractingvar,' 320 | \.'bra:texttoptiebar,' 321 | \.'nor:textrevapostrophe,' 322 | \.'nor:texthooktop,' 323 | \.'nor:textrthook,' 324 | \.'nor:textrthooklong,' 325 | \.'nor:textpalhook,' 326 | \.'nor:textpalhooklong,' 327 | \.'nor:textpalhookvar,' 328 | \.'bra:textsuperscript,' 329 | \.'sbr:ToneLetters,' 330 | \.'bra:tone,' 331 | \.'bra:stone,' 332 | \.'bra:rtone,' 333 | \.'nor:tone{55},' 334 | \.'nor:tone{44},' 335 | \.'nor:tone{33},' 336 | \.'nor:tone{22},' 337 | \.'nor:tone{11},' 338 | \.'nor:tone{51},' 339 | \.'nor:tone{15},' 340 | \.'nor:tone{45},' 341 | \.'nor:tone{12},' 342 | \.'nor:tone{454},' 343 | \.'sbr:DiacriticsExtIPA,' 344 | \.'bra:spreadlips,' 345 | \.'bra:overbridge,' 346 | \.'bra:bibridge,' 347 | \.'bra:subdoublebar,' 348 | \.'bra:subdoublevert,' 349 | \.'bra:subcorner,' 350 | \.'bra:whistle,' 351 | \.'bra:sliding,' 352 | \.'bra:crtilde,' 353 | \.'bra:dottedtilde,' 354 | \.'bra:doubletilde,' 355 | \.'bra:partvoiceless,' 356 | \.'bra:inipartvoiceless,' 357 | \.'bra:finpartvoiceless,' 358 | \.'bra:partvoice,' 359 | \.'bra:inipartvoice,' 360 | \.'bra:finpartvoice,' 361 | \.'bra:sublptr,' 362 | \.'bra:subrptr' 363 | 364 | " vim:ft=vim:ff=unix: 365 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/ulem: -------------------------------------------------------------------------------- 1 | if exists("ulem_package_file") 2 | finish 3 | endif 4 | let ulem_package_file = 1 5 | 6 | let g:TeX_package_option_ulem = 7 | \ 'normalem,' 8 | \.'ULforem,' 9 | \.'normalbf,' 10 | \.'UWforbf' 11 | 12 | let g:TeX_package_ulem = 13 | \ 'bra:uwave,' 14 | \.'bra:uline,' 15 | \.'bra:uuline,' 16 | \.'bra:sout,' 17 | \.'bra:xout,' 18 | \.'ULthickness,' 19 | \.'ULdepth' 20 | 21 | " vim:ft=vim:ff=unix: 22 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/url: -------------------------------------------------------------------------------- 1 | if exists("url_package_file") 2 | finish 3 | endif 4 | let url_package_file = 1 5 | 6 | let g:TeX_package_option_url = 7 | \ 'hyphens,' 8 | \.'obeyspaces,' 9 | \.'spaces,' 10 | \.'T1' 11 | 12 | let g:TeX_package_url = 13 | \ 'bra:urlstyle,' 14 | \.'bra:url,' 15 | \.'bra:path,' 16 | \.'bra:urldef' 17 | 18 | " TODO uncomment if you figure out 19 | " 1. how to get this syn command to work every time instead of only the 20 | " first time this file is sourced. 21 | " syn region texZone start="\\url{" end="}\|%stopzone\>" 22 | " syn region texZone start="\\path{" end="}\|%stopzone\>" 23 | 24 | " vim:ft=vim:ff=unix: 25 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/verbatim: -------------------------------------------------------------------------------- 1 | if exists("verbatim_package_file") 2 | finish 3 | endif 4 | let verbatim_package_file = 1 5 | 6 | let g:TeX_package_option_verbatim = '' 7 | 8 | let g:TeX_package_verbatim = 9 | \ 'env:comment,' 10 | \.'env:verbatim,' 11 | \.'env:verbatim*,' 12 | \.'bra:verbatiminput,' 13 | \.'bra:verbatiminput' 14 | 15 | syn region texZone start="\\begin{comment}" end="\\end{comment}\|%stopzone\>" fold 16 | syn region texZone start="\\begin{verbatim}" end="\\end{verbatim}\|%stopzone\>" fold 17 | 18 | " vim:ft=vim:ff=unix: 19 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/packages/version: -------------------------------------------------------------------------------- 1 | if exists("version_package_file") 2 | finish 3 | endif 4 | let version_package_file = 1 5 | 6 | let g:TeX_package_option_version = '' 7 | 8 | let g:TeX_package_version = 9 | \ 'bra:includeversion,' 10 | \.'bra:excludeversion' 11 | 12 | " vim:ft=vim:ff=unix: 13 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/projecttemplate.vim: -------------------------------------------------------------------------------- 1 | " Project name 2 | " let g:projName = '' 3 | " 4 | " Project files 5 | " let g:projFiles = '' 6 | 7 | 8 | " Vim settings/maps/abbrs specific for this project 9 | 10 | " Modeline for this file 11 | " vim:fdm=marker:ff=unix:noet:ts=4:sw=4:ft=vim 12 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/pytools.py: -------------------------------------------------------------------------------- 1 | import string, vim, re, os, glob 2 | # catFile: assigns a local variable retval to the contents of a file {{{ 3 | def catFile(filename): 4 | try: 5 | file = open(filename) 6 | lines = ''.join(file.readlines()) 7 | file.close() 8 | except: 9 | lines = '' 10 | 11 | # escape double quotes and backslashes before quoting the string so 12 | # everything passes throught. 13 | vim.command("""let retval = "%s" """ % re.sub(r'"|\\', r'\\\g<0>', lines)) 14 | return lines 15 | 16 | # }}} 17 | # isPresentInFile: check if regexp is present in the file {{{ 18 | def isPresentInFile(regexp, filename): 19 | try: 20 | fp = open(filename) 21 | fcontents = string.join(fp.readlines(), '') 22 | fp.close() 23 | if re.search(regexp, fcontents): 24 | vim.command('let retval = 1') 25 | return 1 26 | else: 27 | vim.command('let retval = 0') 28 | return None 29 | except: 30 | vim.command('let retval = 0') 31 | return None 32 | 33 | # }}} 34 | # deleteFile: deletes a file if present {{{ 35 | # If the file does not exist, check if its a filepattern rather than a 36 | # filename. If its a pattern, then deletes all files matching the 37 | # pattern. 38 | def deleteFile(filepattern): 39 | if os.path.exists(filepattern): 40 | try: 41 | os.remove(filepattern) 42 | except: 43 | vim.command('let retval = -1') 44 | else: 45 | if glob.glob(filepattern): 46 | for filename in glob.glob(filepattern): 47 | os.remove(filename) 48 | else: 49 | vim.command('let retval = -1') 50 | 51 | # }}} 52 | # vim:fdm=marker:ff=unix:noet:ts=4:sw=4:nowrap 53 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/smartspace.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " File: smartspace.vim 3 | " Author: Carl Muller 4 | " Created: Fri Dec 06 12:00 AM 2002 PST 5 | " 6 | " Description: 7 | " Maps the key in insert mode so that mathematical formulaes are 8 | " always kept on the same line. i.e, $$'s dont get broken across multiple 9 | " lines. 10 | "============================================================================= 11 | 12 | " Avoid reinclusion or if the user doesn't want us. 13 | if exists('b:done_smartspace') 14 | \ || (exists('g:Tex_SmartKeySpace') && !g:Tex_SmartKeySpace) 15 | finish 16 | endif 17 | let b:done_smartspace = 1 18 | 19 | " Smart space relies on taking over vim's insertion of carriage returns in 20 | " order to keep $$'s on the same line. The only way to get vim not to break 21 | " lines is to set tw=0. 22 | " 23 | " NOTE: setting tw != 0 will break smartspace 24 | " the user's 'tw' setting is still respected in the insert mode. 25 | " However, normal mode actions which rely on 'tw' such as gqap will be 26 | " broken because of the faulty 'tw' setting. 27 | let b:tw = &l:tw 28 | setlocal tw=0 29 | 30 | inoremap :call TexFill(b:tw)a 31 | 32 | " Do not redefine the function. 33 | if exists('*s:TexFill') 34 | finish 35 | endif 36 | 37 | " TexFormatLine: format line retaining $$'s on the same line. {{{ 38 | function! s:TexFill(width) 39 | if a:width != 0 && col(".") > a:width 40 | " For future use, record the current line and the number of the current column 41 | let current_line = getline(".") 42 | let current_column = col(".") 43 | exe "normal! a##\" 44 | call TexFormatLine(a:width,current_line,current_column) 45 | exe "normal! ?##\2s\" 46 | " Remove ## from the search history. 47 | call histdel("/", -1)|let @/=histget("/", -1) 48 | endif 49 | endfunction 50 | 51 | " }}} 52 | function! s:TexFormatLine(width, current_line, current_column) " {{{ 53 | " get the first non-blank character. 54 | let first = matchstr(getline('.'), '\S') 55 | normal! $ 56 | let length = col('.') 57 | let go = 1 58 | while length > a:width+2 && go 59 | let between = 0 60 | let string = strpart(getline('.'), 0, a:width) 61 | " Count the dollar signs 62 | let number_of_dollars = 0 63 | let evendollars = 1 64 | let counter = 0 65 | while counter <= a:width-1 66 | " Pay attention to '$$'. 67 | if string[counter] == '$' && string[counter-1] != '$' 68 | let evendollars = 1 - evendollars 69 | let number_of_dollars = number_of_dollars + 1 70 | endif 71 | let counter = counter + 1 72 | endwhile 73 | " Get ready to split the line. 74 | exe 'normal! ' . (a:width + 1) . '|' 75 | if evendollars 76 | " Then you are not between dollars. 77 | exe "normal! ?\\$\\+\\| \W" 78 | else 79 | " Then you are between dollars. 80 | normal! F$ 81 | if col(".") == 1 || getline('.')[col(".")-1] != "$" 82 | let go = 0 83 | endif 84 | endif 85 | if first == '$' && number_of_dollars == 1 86 | let go = 0 87 | else 88 | exe "normal! i\\$" 89 | " get the first non-blank character. 90 | let first = matchstr(getline('.'), '\S') 91 | endif 92 | let length = col(".") 93 | endwhile 94 | if go == 0 && strpart(a:current_line, 0, a:current_column) =~ '.*\$.*\$.*' 95 | exe "normal! ^f$a\\" 96 | call TexFormatLine(a:width, a:current_line, a:current_column) 97 | endif 98 | endfunction 99 | 100 | " }}} 101 | 102 | " vim:fdm=marker:ts=4:sw=4:noet 103 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/templates.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " File: templates.vim 3 | " Author: Gergely Kontra 4 | " (minor modifications by Srinath Avadhanula) 5 | " (plus other modifications by Mikolaj Machowski) 6 | " Version: 1.0 7 | " Created: Tue Apr 23 05:00 PM 2002 PST 8 | " 9 | " Description: functions for handling templates in latex-suite/templates 10 | " directory. 11 | "============================================================================= 12 | 13 | let s:path = fnameescape(expand(":p:h")) 14 | 15 | " SetTemplateMenu: sets up the menu for templates {{{ 16 | function! SetTemplateMenu() 17 | let flist = Tex_FindInRtp('', 'templates') 18 | let i = 1 19 | while 1 20 | let fname = Tex_Strntok(flist, ',', i) 21 | if fname == '' 22 | break 23 | endif 24 | exe "amenu ".g:Tex_TemplatesMenuLocation."&".i.":".fname." ". 25 | \":call ReadTemplate('".fname."')" 26 | let i = i + 1 27 | endwhile 28 | endfunction 29 | 30 | if g:Tex_Menus 31 | call SetTemplateMenu() 32 | endif 33 | 34 | " }}} 35 | " ReadTemplate: reads in the template file from the template directory. {{{ 36 | function! ReadTemplate(...) 37 | if a:0 > 0 38 | let filename = a:1 39 | else 40 | let filelist = Tex_FindInRtp('', 'templates') 41 | let filename = 42 | \ Tex_ChooseFromPrompt("Choose a template file:\n" . 43 | \ Tex_CreatePrompt(filelist, 2, ',') . 44 | \ "\nEnter number or name of file :", 45 | \ filelist, ',') 46 | endif 47 | 48 | let fname = Tex_FindInRtp(filename.'.tex', 'templates', ':p') 49 | call Tex_Debug("0read ".fname, 'templates') 50 | 51 | silent! exe "0read ".fname 52 | 53 | " The first line of the file contains the specifications of what the 54 | " placeholder characters and the other special characters are. 55 | let pattern = '\v(\S+)\t(\S+)\t(\S+)\t(\S+)' 56 | 57 | let s:phsTemp = substitute(getline(1), pattern, '\1', '') 58 | let s:pheTemp = substitute(getline(1), pattern, '\2', '') 59 | let s:exeTemp = substitute(getline(1), pattern, '\3', '') 60 | let s:comTemp = substitute(getline(1), pattern, '\4', '') 61 | 62 | 0 d_ 63 | 64 | call s:ProcessTemplate() 65 | call Tex_pack_updateall(1) 66 | 67 | " Do not handle the placeholders here. Let IMAP_PutTextWithMovement do it 68 | " because it handles UTF-8 character substitutions etc. Therefore delete 69 | " the text into @a and paste it using IMAP_PutTextWithMovement(). 70 | let _a = @a 71 | normal! ggVG"ax 72 | 73 | let _fo = &fo 74 | " Since IMAP_PutTextWithMovement simulates the key-presses, leading 75 | " indendatation can get duplicated in strange ways if ``fo`` is non-empty. 76 | " NOTE: the indentexpr thingie is still respected with an empty fo so that 77 | " environments etc are properly indented. 78 | set fo= 79 | 80 | call Tex_Debug("normal! i\=IMAP_PutTextWithMovement(@a, '".s:phsTemp."', '".s:pheTemp."')\", 'templates') 81 | exec "normal! i\=IMAP_PutTextWithMovement(@a, '".s:phsTemp."', '".s:pheTemp."')\" 82 | 83 | let &fo = _fo 84 | let @a = _a 85 | 86 | call Tex_Debug('phs = '.s:phsTemp.', phe = '.s:pheTemp.', exe = '.s:exeTemp.', com = '.s:comTemp, 'templates') 87 | 88 | endfunction 89 | 90 | " }}} 91 | " ProcessTemplate: processes the special characters in template file. {{{ 92 | " This implementation follows from Gergely Kontra's 93 | " mu-template.vim 94 | " http://vim.sourceforge.net/scripts/script.php?script_id=222 95 | function! ProcessTemplate() 96 | if exists('s:phsTemp') && s:phsTemp != '' 97 | 98 | exec 'silent! %s/^'.s:comTemp.'\(\_.\{-}\)'.s:comTemp.'$/\=Compute(submatch(1))/ge' 99 | exec 'silent! %s/'.s:exeTemp.'\(.\{-}\)'.s:exeTemp.'/\=Exec(submatch(1))/ge' 100 | exec 'silent! g/'.s:comTemp.s:comTemp.'/d' 101 | 102 | " A function only puts one item into the search history... 103 | call Tex_CleanSearchHistory() 104 | endif 105 | endfunction 106 | 107 | function! Exec(what) 108 | exec 'return '.a:what 109 | endfunction 110 | 111 | " Back-Door to trojans !!! 112 | function! Compute(what) 113 | exe a:what 114 | if exists('s:comTemp') 115 | return s:comTemp.s:comTemp 116 | else 117 | return '' 118 | endif 119 | endfunction 120 | 121 | " }}} 122 | " Command definitions {{{ 123 | if v:version >= 602 124 | com! -complete=custom,Tex_CompleteTemplateName -nargs=? TTemplate :call ReadTemplate() 125 | \| :startinsert 126 | 127 | " Tex_CompleteTemplateName: for completing names in TTemplate command {{{ 128 | " Description: get list of template names with Tex_FindInRtp(), remove full path 129 | " and return list of names separated with newlines. 130 | " 131 | function! Tex_CompleteTemplateName(A,P,L) 132 | " Get name of macros from all runtimepath directories 133 | let tmplnames = Tex_FindInRtp('', 'templates') 134 | " Separate names with \n not , 135 | let tmplnames = substitute(tmplnames,',','\n','g') 136 | return tmplnames 137 | endfunction 138 | " }}} 139 | 140 | else 141 | com! -nargs=? TTemplate :call ReadTemplate() 142 | \| :startinsert 143 | 144 | endif 145 | 146 | " }}} 147 | 148 | " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 149 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/templates/IEEEtran.tex: -------------------------------------------------------------------------------- 1 | <+ +> !comp! !exe! 2 | %% Based on in the ieee package available from CTAN, 3 | %% I have changed the options so that most useful ones are clubbed together, 4 | %% Have a look at to understand the function of each package. 5 | 6 | %% This code is offered as-is - no warranty - user assumes all risk. 7 | %% Free to use, distribute and modify. 8 | 9 | % *** Authors should verify (and, if needed, correct) their LaTeX system *** 10 | % *** with the testflow diagnostic prior to trusting their LaTeX platform *** 11 | % *** with production work. IEEE's font choices can trigger bugs that do *** 12 | % *** not appear when using other class files. *** 13 | % Testflow can be obtained at: 14 | % http://www.ctan.org/tex-archive/macros/latex/contrib/supported/IEEEtran/testflow 15 | 16 | % File: !comp!expand("%:p:t")!comp! 17 | % Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! 18 | % Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! 19 | % 20 | \documentclass[journal]{IEEEtran} 21 | 22 | \usepackage{cite, graphicx, subfigure, amsmath} 23 | \interdisplaylinepenalty=2500 24 | 25 | % *** Do not adjust lengths that control margins, column widths, etc. *** 26 | % *** Do not use packages that alter fonts (such as pslatex). *** 27 | % There should be no need to do such things with IEEEtran.cls V1.6 and later. 28 | 29 | <++> 30 | % correct bad hyphenation here 31 | \hyphenation{<+op-tical net-works semi-conduc-tor+>} 32 | 33 | 34 | \begin{document} 35 | % 36 | % paper title 37 | \title{<+Skeleton of IEEEtran.cls for Journals in VIM-Latex+>} 38 | % 39 | % 40 | % author names and IEEE memberships 41 | % note positions of commas and nonbreaking spaces ( ~ ) LaTeX will not break 42 | % a structure at a ~ so this keeps an author's name from being broken across 43 | % two lines. 44 | % use \thanks{} to gain access to the first footnote area 45 | % a separate \thanks must be used for each paragraph as LaTeX2e's \thanks 46 | % was not built to handle multiple paragraphs 47 | \author{<+Sumit Bhardwaj+>~\IEEEmembership{<+Student~Member,~IEEE,+>} 48 | <+John~Doe+>,~\IEEEmembership{<+Fellow,~OSA,+>} 49 | <+and~Jane~Doe,+>~\IEEEmembership{<+Life~Fellow,~IEEE+>}}% <-this % stops a space 50 | \thanks{<+Manuscript received January 20, 2002; revised August 13, 2002. 51 | This work was supported by the IEEE.+>}% <-this % stops a space 52 | \thanks{<+S. Bhardwaj is with the Indian Institute of Technology, Delhi.+>} 53 | % 54 | % The paper headers 55 | \markboth{<+Journal of VIM-\LaTeX\ Class Files,~Vol.~1, No.~8,~August~2002+>}{ 56 | <+Bhardwaj \MakeLowercase{\textit{et al.}+>}: <+Skeleton of IEEEtran.cls for Journals in VIM-Latex+>} 57 | % The only time the second header will appear is for the odd numbered pages 58 | % after the title page when using the twoside option. 59 | 60 | 61 | % If you want to put a publisher's ID mark on the page 62 | % (can leave text blank if you just want to see how the 63 | % text height on the first page will be reduced by IEEE) 64 | %\pubid{0000--0000/00\$00.00~\copyright~2002 IEEE} 65 | 66 | % use only for invited papers 67 | %\specialpapernotice{(Invited Paper)} 68 | 69 | % make the title area 70 | \maketitle 71 | 72 | 73 | \begin{abstract} 74 | <+The abstract goes here.+> 75 | \end{abstract} 76 | 77 | \begin{keywords} 78 | <+IEEEtran, journal, \LaTeX, paper, template, VIM, VIM-\LaTeX+>. 79 | \end{keywords} 80 | 81 | \section{Introduction} 82 | \PARstart{<+T+>}{<+his+>} <+demo file is intended to serve as a ``starter file" 83 | for IEEE journal papers produced under \LaTeX\ using IEEEtran.cls version 84 | 1.6 and later.+> 85 | % You must have at least 2 lines in the paragraph with the drop letter 86 | % (should never be an issue) 87 | <+May all your publication endeavors be successful.+> 88 | 89 | % needed in second column of first page if using \pubid 90 | %\pubidadjcol 91 | 92 | % trigger a \newpage just before the given reference 93 | % number - used to balance the columns on the last page 94 | % adjust value as needed - may need to be readjusted if 95 | % the document is modified later 96 | %\IEEEtriggeratref{8} 97 | % The "triggered" command can be changed if desired: 98 | %\IEEEtriggercmd{\enlargethispage{-5in}} 99 | 100 | % references section 101 | 102 | %\bibliographystyle{IEEEtran.bst} 103 | %\bibliography{IEEEabrv,../bib/paper} 104 | \begin{thebibliography}{1} 105 | 106 | \bibitem{IEEEhowto:kopka} 107 | H.~Kopka and P.~W. Daly, \emph{A Guide to {\LaTeX}}, 3rd~ed.\hskip 1em plus 108 | 0.5em minus 0.4em\relax Harlow, England: Addison-Wesley, 1999. 109 | 110 | \end{thebibliography} 111 | 112 | % biography section 113 | % 114 | \begin{biography}{Sumit Bhardwaj} 115 | Biography text here. 116 | \end{biography} 117 | 118 | % if you will not have a photo 119 | \begin{biographynophoto}{John Doe} 120 | Biography text here. 121 | \end{biographynophoto} 122 | 123 | % insert where needed to balance the two columns on the last page 124 | %\newpage 125 | 126 | \begin{biographynophoto}{Jane Doe} 127 | Biography text here. 128 | \end{biographynophoto} 129 | 130 | % You can push biographies down or up by placing 131 | % a \vfill before or after them. The appropriate 132 | % use of \vfill depends on what kind of text is 133 | % on the last page and whether or not the columns 134 | % are being equalized. 135 | 136 | %\vfill 137 | 138 | % Can be used to pull up biographies so that the bottom of the last one 139 | % is flush with the other column. 140 | %\enlargethispage{-5in} 141 | 142 | \end{document} 143 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/templates/article.tex: -------------------------------------------------------------------------------- 1 | <+ +> !comp! !exe! 2 | % File: !comp!expand("%:p:t")!comp! 3 | % Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! 4 | % Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! 5 | % 6 | \documentclass[a4paper]{article} 7 | \begin{document} 8 | <++> 9 | \end{document} 10 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/templates/report.tex: -------------------------------------------------------------------------------- 1 | <+ +> !comp! !exe! 2 | % File: !comp!expand("%")!comp! 3 | % Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! 4 | % Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! 5 | % 6 | \documentclass[a4paper]{report} 7 | \begin{document} 8 | <++> 9 | \end{document} 10 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/templates/report_two_column.tex: -------------------------------------------------------------------------------- 1 | <+ +> !comp! !exe! 2 | % File: !comp!expand("%:p:t")!comp! 3 | % Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! 4 | % Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp! 5 | % 6 | \documentclass[a4paper,twocolumn]{report} 7 | \begin{document} 8 | <++> 9 | \end{document} 10 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/texmenuconf.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " File: texmenuconf.vim 3 | " Author: Srinath Avadhanula 4 | " Copyright: Vim charityware license. :help license 5 | " Description: 6 | " 7 | "============================================================================= 8 | 9 | " Paths, crucial for functions 10 | let s:path = fnameescape(expand(":p:h")) 11 | let s:up_path = fnameescape(expand(":p:h:h")) 12 | let s:mainmenuname = g:Tex_MenuPrefix.'S&uite.' 13 | let s:mapleader = exists('mapleader') ? mapleader : "\\" 14 | 15 | " This glboal variable is incremented each time a top-level latex-suite menu 16 | " is created. We should always use this variable for setting the locations of 17 | " newly created top-level menus. 18 | let g:Tex_NextMenuLocation = g:Tex_MainMenuLocation 19 | 20 | " The templates and macros menus are always nested within the main latex-suit 21 | " menu. 22 | let g:Tex_TemplatesMenuLocation = g:Tex_MainMenuLocation.'.20 '.s:mainmenuname.'&Templates.' 23 | let g:Tex_MacrosMenuLocation = g:Tex_MainMenuLocation.'.20 '.s:mainmenuname.'&Macros.' 24 | 25 | " The packages menu can either be a child of the main menu or be a top-level 26 | " menu by itself. 27 | if g:Tex_NestPackagesMenu 28 | let g:Tex_PackagesMenuLocation = (g:Tex_MainMenuLocation).'.10 '.s:mainmenuname.'&Packages.' 29 | else 30 | let g:Tex_PackagesMenuLocation = (g:Tex_NextMenuLocation).'.10 '.g:Tex_MenuPrefix.'Packages.' 31 | let g:Tex_NextMenuLocation = g:Tex_NextMenuLocation + 1 32 | endif 33 | 34 | " Environments are always a top-level menu. 35 | let g:Tex_EnvMenuLocation = (g:Tex_NextMenuLocation).'.20 '.g:Tex_MenuPrefix.'E&nvironments.' 36 | let g:Tex_NextMenuLocation = g:Tex_NextMenuLocation + 1 37 | 38 | " Elements are always a top-level menu. 39 | " If we choose to nest elements, then the top-level &TeX-Elements menu 40 | " contains 41 | " otherwise, the Fonts, Counters and Dimensions menus become top-level menus. 42 | if g:Tex_NestElementMenus 43 | let g:Tex_ElementsMenuLocation = (g:Tex_NextMenuLocation).'.20 '.g:Tex_MenuPrefix.'E&lements.' 44 | else 45 | let g:Tex_ElementsMenuLocation = (g:Tex_NextMenuLocation).'.20 '.g:Tex_MenuPrefix 46 | endif 47 | let g:Tex_NextMenuLocation = g:Tex_NextMenuLocation + 1 48 | 49 | 50 | " Set up the compiler/viewer menus. {{{ 51 | " 52 | if has('gui_running') && g:Tex_Menus 53 | exec 'anoremenu '.g:Tex_MainMenuLocation.'.25 '. s:mainmenuname.'-sepsuite0- :' 54 | 55 | " menus for compiling / viewing etc. 56 | exec 'anoremenu '.g:Tex_MainMenuLocation.'.30 '.s:mainmenuname.'&Compile'.s:mapleader.'ll'. 57 | \' :silent! call Tex_RunLaTeX()' 58 | exec 'anoremenu '.g:Tex_MainMenuLocation.'.40 '.s:mainmenuname.'&View'.s:mapleader.'lv'. 59 | \' :silent! call Tex_ViewLaTeX()' 60 | exec 'anoremenu '.g:Tex_MainMenuLocation.'.50 '.s:mainmenuname.'&Search'.s:mapleader.'ls'. 61 | \' :silent! call ForwardSearchLaTeX()' 62 | exec 'anoremenu '.g:Tex_MainMenuLocation.'.60 '.s:mainmenuname.'&Target\ Format:TTarget'. 63 | \' :call SetTeXTarget()' 64 | exec 'anoremenu '.g:Tex_MainMenuLocation.'.70 '.s:mainmenuname.'&Compiler\ Target:TCTarget'. 65 | \' :call Tex_SetTeXCompilerTarget("Compile", "")' 66 | exec 'anoremenu '.g:Tex_MainMenuLocation.'.80 '.s:mainmenuname.'&Viewer\ Target:TVTarget'. 67 | \' :call Tex_SetTeXCompilerTarget("View", "")' 68 | exec 'anoremenu '.g:Tex_MainMenuLocation.'.90 '.s:mainmenuname.'Set\ &Ignore\ Level:TCLevel'. 69 | \' :TCLevel' 70 | exec 'imenu '.g:Tex_MainMenuLocation.'.100 '.s:mainmenuname.'C&omplete\ Ref/Cite'. 71 | \' Tex_Completion' 72 | exec 'anoremenu '.g:Tex_MainMenuLocation.'.110 '.s:mainmenuname.'-sepsuite1- :' 73 | " refreshing folds 74 | if g:Tex_Folding 75 | exec 'anoremenu '.g:Tex_MainMenuLocation.'.120 '.s:mainmenuname.'&Refresh\ Folds'.s:mapleader.'rf'. 76 | \' :call MakeTexFolds(1)' 77 | exec 'anoremenu '.g:Tex_MainMenuLocation.'.130 '.s:mainmenuname.'-sepsuite2- :' 78 | endif 79 | endif 80 | 81 | " }}} 82 | 83 | " ============================================================================== 84 | " MenuConf: configure the menus as compact/extended, with/without math 85 | " ============================================================================== 86 | function! Tex_MenuConfigure(type, action) " {{{ 87 | let menuloc = s:mainmenuname.'Configure\ Menu.' 88 | if a:type == 'math' 89 | if a:action == 1 90 | let g:Tex_MathMenus = 1 91 | exe 'source '.s:path.'/mathmacros.vim' 92 | exe 'amenu disable '.menuloc.'Add\ Math\ Menu' 93 | exe 'amenu enable '.menuloc.'Remove\ Math\ Menu' 94 | elseif a:action == 0 95 | call Tex_MathMenuRemove() 96 | exe 'amenu enable '.menuloc.'Add\ Math\ Menu' 97 | exe 'amenu disable '.menuloc.'Remove\ Math\ Menu' 98 | endif 99 | elseif a:type == 'elements' 100 | if a:action == 'expand' 101 | let g:Tex_ElementsMenuLocation = '80.20 '.g:Tex_MenuPrefix 102 | exe 'amenu disable '.menuloc.'Expand\ Elements' 103 | exe 'amenu enable '.menuloc.'Compress\ Elements' 104 | elseif a:action == 'nest' 105 | let g:Tex_ElementsMenuLocation = '80.20 '.g:Tex_MenuPrefix.'Elements.' 106 | exe 'amenu enable '.menuloc.'Expand\ Elements' 107 | exe 'amenu disable '.menuloc.'Compress\ Elements' 108 | endif 109 | exe 'source '.fnameescape(s:path.'/elementmacros.vim') 110 | elseif a:type == 'packages' 111 | if a:action == 1 112 | let g:Tex_PackagesMenu = 1 113 | exe 'source '.s:path.'/packages.vim' 114 | exe 'amenu disable '.menuloc.'Load\ Packages\ Menu' 115 | endif 116 | endif 117 | endfunction 118 | 119 | " }}} 120 | 121 | " configuration menu. 122 | if g:Tex_Menus 123 | exe 'amenu '.g:Tex_MainMenuLocation.'.900 '.s:mainmenuname.'Configure\ Menu.Add\ Math\ Menu :call Tex_MenuConfigure("math", 1)' 124 | exe 'amenu '.g:Tex_MainMenuLocation.'.900 '.s:mainmenuname.'Configure\ Menu.Remove\ Math\ Menu :call Tex_MenuConfigure("math", 0)' 125 | exe 'amenu '.g:Tex_MainMenuLocation.'.900 '.s:mainmenuname.'Configure\ Menu.Expand\ Elements :call Tex_MenuConfigure("elements", "expand")' 126 | exe 'amenu '.g:Tex_MainMenuLocation.'.900 '.s:mainmenuname.'Configure\ Menu.Compress\ Elements :call Tex_MenuConfigure("elements", "nest")' 127 | exe 'amenu '.g:Tex_MainMenuLocation.'.900 '.s:mainmenuname.'Configure\ Menu.Load\ Packages\ Menu :call Tex_MenuConfigure("packages", 1)' 128 | endif 129 | 130 | " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 131 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/texproject.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " File: texproject.vim 3 | " Author: Mikolaj Machowski 4 | " Version: 1.0 5 | " Created: Wen Apr 16 05:00 PM 2003 6 | " 7 | " Description: Handling tex projects. 8 | "============================================================================= 9 | 10 | let s:path = fnameescape(expand(":p:h")) 11 | 12 | command! -nargs=0 TProjectEdit :call Tex_ProjectEdit() 13 | 14 | " Tex_ProjectEdit: Edit project file " {{{ 15 | " Description: If project file exists (*.latexmain) open it in window created 16 | " with ':split', if no create ':new' window and read there 17 | " project template 18 | " 19 | function! s:Tex_ProjectEdit() 20 | 21 | let file = expand("%:p") 22 | let mainfname = Tex_GetMainFileName() 23 | if glob(mainfname.'.latexmain') != '' 24 | exec 'split '.fnameescape(mainfname.'.latexmain') 25 | else 26 | echohl WarningMsg 27 | echomsg "Master file not found." 28 | echomsg " :help latex-master-file" 29 | echomsg "for more information" 30 | echohl None 31 | endif 32 | 33 | endfunction " }}} 34 | " Tex_ProjectLoad: loads the .latexmain file {{{ 35 | " Description: If a *.latexmain file exists, then sources it 36 | function! Tex_ProjectLoad() 37 | let s:origdir = fnameescape(getcwd()) 38 | exe 'cd '.fnameescape(expand('%:p:h')) 39 | 40 | if glob(Tex_GetMainFileName(':p').'.latexmain') != '' 41 | call Tex_Debug("Tex_ProjectLoad: sourcing [".Tex_GetMainFileName().".latexmain]", "proj") 42 | exec 'source '.fnameescape(Tex_GetMainFileName().'.latexmain') 43 | endif 44 | 45 | exe 'cd '.s:origdir 46 | endfunction " }}} 47 | 48 | augroup LatexSuite 49 | au LatexSuite User LatexSuiteFileType 50 | \ call Tex_Debug("texproject.vim: catching LatexSuiteFileType event", "proj") | 51 | \ call Tex_ProjectLoad() 52 | augroup END 53 | 54 | " vim:fdm=marker:ff=unix:noet:ts=4:sw=4 55 | -------------------------------------------------------------------------------- /ftplugin/latex-suite/texrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcf/vim-latex/a939dbb881e53c595092d925a275ea63962b3890/ftplugin/latex-suite/texrc -------------------------------------------------------------------------------- /ftplugin/latex-suite/version.vim: -------------------------------------------------------------------------------- 1 | " Tex_Version: returns a string which gives the current version number of latex-suite 2 | " Description: 3 | " Each time a bug fix/addition is done in any source file in latex-suite, 4 | " not just this file, the number below has to be incremented by the author. 5 | " This will ensure that there is a single 'global' version number for all of 6 | " latex-suite. 7 | " 8 | " If a change is done in the doc/ directory, i.e an addition/change in the 9 | " documentation, then this number should NOT be incremented. 10 | " 11 | " Latex-suite will follow a 3-tier system of versioning just as Vim. A 12 | " version number will be of the form: 13 | " 14 | " X.Y.ZZ 15 | " 16 | " 'X' will only be incremented for a major over-haul or feature addition. 17 | " 'Y' will be incremented for significant changes which do not qualify 18 | " as major. 19 | " 'ZZ' will be incremented for bug-fixes and very trivial additions such 20 | " as adding an option etc. Once ZZ reaches 50, then Y will be 21 | " incremented and ZZ will be reset to 01. Each time we have a 22 | " version number of the form X.Y.01, then we'll make a release on 23 | " vim.sf.net and also create a cvs tag at that point. We'll try to 24 | " "stabilize" that version by releasing a few pre-releases and then 25 | " keep that as a stable point. 26 | function! Tex_Version() 27 | return "Latex-Suite: version 1.8.23" 28 | endfunction 29 | 30 | com! -nargs=0 TVersion echo Tex_Version() 31 | -------------------------------------------------------------------------------- /ftplugin/tex_latexSuite.vim: -------------------------------------------------------------------------------- 1 | " LaTeX filetype 2 | " Language: LaTeX (ft=tex) 3 | " Maintainer: Srinath Avadhanula 4 | " Email: srinath@fastmail.fm 5 | 6 | if !exists('s:initLatexSuite') 7 | let s:initLatexSuite = 1 8 | exec 'so '.fnameescape(expand(':p:h').'/latex-suite/main.vim') 9 | 10 | silent! do LatexSuite User LatexSuiteInitPost 11 | endif 12 | 13 | silent! do LatexSuite User LatexSuiteFileType 14 | -------------------------------------------------------------------------------- /latextags: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | foreach $fname (@ARGV) { 4 | $tags = `fgrep \\label $fname`; 5 | @tagsList = split('\n', $tags); 6 | foreach $tag (@tagsList) { 7 | $tag =~ /.*\\label{([^}]*)}/; 8 | $tagName = $1; 9 | print "$tagName\t$fname\t/label{$tagName}/\n"; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ltags: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # Author: Dimitri Antoniou 3 | # usage: ltags filename 4 | # handles: \label and \cite{ } with one or more arguments 5 | # fails if arguments of cite spread over more than one line 6 | # also searches in files that are \include or \input in the main file 7 | 8 | # get main LaTeX source file from command line: 9 | $mainfile = shift; 10 | 11 | # get names of included files and store them in an array 12 | open MAIN, $mainfile or die "$!" ; 13 | @mainfile=
; 14 | @allsrcfiles = map{ /^\\(?:input|include){(.*?)}/ } @mainfile; 15 | unshift @allsrcfiles, $mainfile; 16 | 17 | # loop over all source files 18 | for $srcfile (@allsrcfiles) { 19 | # if \input{fname} append .tex to fname 20 | unless ( $srcfile =~ m/\.tex/ ) { $srcfile = $srcfile . "\.tex" } 21 | open SRC, $srcfile or die "$!" ; 22 | # store contents of source file in array @texfile 23 | @texfile=; 24 | 25 | # store lines with \label and \cite (or \citeonline) in arrays 26 | @labelList = grep{ /\\label{/ } @texfile; 27 | @citeList = grep{ /\\(cite|citeonline){/ } @texfile; 28 | 29 | # see if we use an external database; if yes, store its name in $bibfile 30 | ($dbase) = grep{ /^\\bibliography{/ } @texfile; 31 | if ($dbase) { 32 | $dbase =~ m/\\bibliography{(.*?)}/; 33 | $bibfile = $1; 34 | } 35 | 36 | # write \bibitem in tags file 37 | @mrefs=(); 38 | @refs=(); 39 | @multirefs=(); 40 | foreach (@citeList) { 41 | while ( m/\\(?:cite|citeonline){(.*?)}/g ) { 42 | $refs = $1; 43 | # if \cite has more than one argument, split them: 44 | if ($refs =~ /,/) { 45 | @mrefs = split /,/, $refs; 46 | # there might be more than one \cite in a line: 47 | push (@multirefs, @mrefs); 48 | } 49 | else { 50 | @refs = ($refs); 51 | push (@multirefs, @refs); 52 | } 53 | } 54 | # in BibTeX, format is @ARTICLE{Name, }; in source file, \bibitem{Name} 55 | for $ref (@multirefs) { 56 | if ( $dbase ) { 57 | push @unsorttag, "$ref\t$bibfile\t/{$ref,/\n" 58 | } 59 | else { 60 | push @unsorttag, "$ref\t$srcfile\t/bibitem{$ref}/\n" 61 | } 62 | } 63 | } 64 | 65 | # write \label in tag file 66 | foreach (@labelList) { 67 | m/\\label{(.*?)}/; 68 | push @unsorttag, "$1\t$srcfile\t/label{$1}/\n"; 69 | } 70 | } 71 | 72 | # sort tag file; then, eliminate duplicates 73 | @sortedtag = sort @unsorttag; 74 | %seen = (); 75 | @uniqtag = grep { ! $seen{$_} ++ } @sortedtag; 76 | 77 | open(TAGS, "> tags"); 78 | print TAGS @uniqtag; 79 | -------------------------------------------------------------------------------- /plugin/filebrowser.vim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jcf/vim-latex/a939dbb881e53c595092d925a275ea63962b3890/plugin/filebrowser.vim -------------------------------------------------------------------------------- /plugin/libList.vim: -------------------------------------------------------------------------------- 1 | " File: libList.vim 2 | " Last Change: 2001 Dec 10 3 | " Maintainer: Gontran BAERTS 4 | " Version: 0.1 5 | " 6 | " Please don't hesitate to correct my english :) 7 | " Send corrections to 8 | " 9 | "----------------------------------------------------------------------------- 10 | " Description: libList.vim is a set of functions to work with lists or one 11 | " level arrays. 12 | " 13 | "----------------------------------------------------------------------------- 14 | " To Enable: Normally, this file will reside in your plugins directory and be 15 | " automatically sourced. 16 | " 17 | "----------------------------------------------------------------------------- 18 | " Usage: Lists are strings variable with values separated by g:listSep 19 | " character (comma" by default). You may redefine g:listSep variable as you 20 | " wish. 21 | " 22 | " Here are available functions : 23 | " 24 | " - AddListItem( array, newItem, index ) : 25 | " Add item "newItem" to array "array" at "index" position 26 | " - GetListItem( array, index ) : 27 | " Return item at "index" position in array "array" 28 | " - GetListMatchItem( array, pattern ) : 29 | " Return item matching "pattern" in array "array" 30 | " - GetListCount( array ) : 31 | " Return the number of items in array "array" 32 | " - RemoveListItem( array, index ) : 33 | " Remove item at "index" position from array "array" 34 | " - ReplaceListItem( array, index, item ) : 35 | " Remove item at "index" position by "item" in array "array" 36 | " - ExchangeListItems( array, item1Index, item2Index ) : 37 | " Exchange item "item1Index" with item "item2Index" in array "array" 38 | " - QuickSortList( array, beg, end ) : 39 | " Return array "array" with items between "beg" and "end" sorted 40 | " 41 | " Example: 42 | " let mylist="" 43 | " echo GetListCount( mylist ) " --> 0 44 | " let mylist = AddListItem( mylist, "One", 0 ) " mylist == "One" 45 | " let mylist = AddListItem( mylist, "Three", 1 ) " mylist == "One,Three" 46 | " let mylist = AddListItem( mylist, "Two", 1 ) " mylist == "One,Two,Three" 47 | " echo GetListCount( mylist ) " --> 3 48 | " echo GetListItem( mylist, 2 ) " --> Three 49 | " echo GetListMatchItem( mylist, "w" ) " --> two 50 | " echo GetListMatchItem( mylist, "e" ) " --> One 51 | " let mylist = RemoveListItem( mylist, 2 ) " mylist == "One,Two" 52 | " echo GetListCount( mylist ) " --> 2 53 | " let mylist = ReplaceListItem( mylist, 0, "Three" ) " mylist == "Three,Two" 54 | " let mylist = ExchangeListItems( mylist, 0, 1 ) " mylist == "Two,Three" 55 | " let mylist = AddListItem( mylist, "One", 0 ) " mylist == "One,Two,Three" 56 | " let mylist = QuickSortList( mylist, 0, GetListCount(mylist)-1 ) 57 | " " mylist == "One,Three,Two" 58 | " 59 | "----------------------------------------------------------------------------- 60 | " Updates: 61 | " in version 0.1 62 | " - First version 63 | 64 | " Has this already been loaded ? 65 | if exists("loaded_libList") 66 | finish 67 | endif 68 | let loaded_libList=1 69 | 70 | "** 71 | " Separator: 72 | " You may change the separator character et any time. 73 | "** 74 | let g:listSep = "," 75 | 76 | "** 77 | "AddListItem: 78 | " Add new item at given position. 79 | " First item index is 0 (zero). 80 | "Parameters: 81 | " - array : Array/List (string of values) which receives the new item. 82 | " - newItem : String containing the item value to add. 83 | " - index : Integer indicating the position at which the new item is added. 84 | " It must be greater than or equals to 0 (zero). 85 | "Return: 86 | "String containing array values, including newItem. 87 | "** 88 | function AddListItem( array, newItem, index ) 89 | if a:index == 0 90 | if a:array == "" 91 | return a:newItem 92 | endif 93 | return a:newItem . g:listSep . a:array 94 | endif 95 | return substitute( a:array, '\(\%(^\|' . g:listSep . '\)[^' . g:listSep . ']\+\)\{' . a:index . '\}', '\0' . g:listSep . a:newItem , "" ) 96 | endfunction 97 | 98 | "** 99 | "GetListItem: 100 | " Get item at given position. 101 | "Parameters: 102 | " - array : Array/List (string of values). 103 | " - index : Integer indicating the position of item to return. 104 | " It must be greater than or equals to 0 (zero). 105 | "Return: 106 | "String representing the item. 107 | "** 108 | function GetListItem( array, index ) 109 | if a:index == 0 110 | return matchstr( a:array, '^[^' . g:listSep . ']\+' ) 111 | else 112 | return matchstr( a:array, "[^" . g:listSep . "]\\+", matchend( a:array, '\(\%(^\|' . g:listSep . '\)[^' . g:listSep . ']\+\)\{' . a:index . '\}' . g:listSep ) ) 113 | endif 114 | endfunction 115 | 116 | "** 117 | "GetListMatchItem: 118 | " Get the first item matching given pattern. 119 | "Parameters: 120 | " - array : Array/List (string of values). 121 | " - pattern : Regular expression to match with items. 122 | " Avoid to use ^, $ and listSep characters in pattern, unless you 123 | " know what you do. 124 | "Return: 125 | "String representing the first item that matches the pattern. 126 | "** 127 | function GetListMatchItem( array, pattern ) 128 | return matchstr( a:array, '[^' . g:listSep . ']*' . a:pattern . '[^' . g:listSep . ']*' ) 129 | endfunction 130 | 131 | "** 132 | "ReplaceListItem: 133 | " Replace item at given position by a new one. 134 | "Parameters: 135 | " - array : Array/List (string of values). 136 | " - index : Integer indicating the position of item to replace. 137 | " It must be greater than or equals to 0 (zero). 138 | " - item : String containing the new value of the replaced item. 139 | "Return: 140 | "String containing array values. 141 | "** 142 | function ReplaceListItem( array, index, item ) 143 | if a:index == 0 144 | return substitute( a:array, '^[^' .g:listSep. ']\+', a:item, "" ) 145 | else 146 | return substitute( a:array, '\(\%(\%(^\|' . g:listSep . '\)[^' . g:listSep . ']\+\)\{' . a:index . '\}\)' . g:listSep . '[^' . g:listSep . ']\+', '\1' . g:listSep . a:item , "" ) 147 | endif 148 | endfunction 149 | 150 | "** 151 | "RemoveListItem: 152 | " Remove item at given position. 153 | "Parameters: 154 | " - array : Array/List (string of values) from which remove an item. 155 | " - index : Integer indicating the position of item to remove. 156 | " It must be greater than or equals to 0 (zero). 157 | "Return: 158 | "String containing array values, except the removed one. 159 | "** 160 | function RemoveListItem( array, index ) 161 | if a:index == 0 162 | return substitute( a:array, '^[^' .g:listSep. ']\+\(' . g:listSep . '\|$\)', "", "" ) 163 | else 164 | return substitute( a:array, '\(\%(\%(^\|' . g:listSep . '\)[^' . g:listSep . ']\+\)\{' . a:index . '\}\)' . g:listSep . '[^' . g:listSep . ']\+', '\1', "" ) 165 | endif 166 | endfunction 167 | 168 | "** 169 | "ExchangeListItems: 170 | " Exchange item at position item1Index with item at position item2Index. 171 | "Parameters: 172 | " - array : Array/List (string of values). 173 | " - item1index : Integer indicating the position of the first item to exchange. 174 | " It must be greater than or equals to 0 (zero). 175 | " - item2index : Integer indicating the position of the second item to 176 | " exchange. It must be greater than or equals to 0 (zero). 177 | "Return: 178 | "String containing array values. 179 | "** 180 | function ExchangeListItems( array, item1Index, item2Index ) 181 | let item1 = GetListItem( a:array, a:item1Index ) 182 | let array = ReplaceListItem( a:array, a:item1Index, GetListItem( a:array, a:item2Index ) ) 183 | return ReplaceListItem( array, a:item2Index, item1 ) 184 | endfunction 185 | 186 | "** 187 | "GetListCount: 188 | " Number of items in array. 189 | "Parameters: 190 | " - array : Array/List (string of values). 191 | "Return: 192 | "Integer representing the number of items in array. 193 | "Index of last item is GetListCount(array)-1. 194 | "** 195 | function GetListCount( array ) 196 | if a:array == "" | return 0 | endif 197 | let pos = 0 198 | let cnt = 0 199 | while pos != -1 200 | let pos = matchend( a:array, g:listSep, pos ) 201 | let cnt = cnt + 1 202 | endwhile 203 | return cnt 204 | endfunction 205 | 206 | "** 207 | "QuickSortList: 208 | " Sort array. 209 | "Parameters: 210 | " - array : Array/List (string of values). 211 | " - beg : Min index of the range of items to sort. 212 | " - end : Max index of the range of items to sort. 213 | "Return: 214 | "String containing array values with indicated range of items sorted. 215 | "** 216 | function QuickSortList( array, beg, end ) 217 | let array = a:array 218 | let pivot = GetListItem( array, a:beg ) 219 | let l = a:beg 220 | let r = a:end 221 | while l < r 222 | while GetListItem( array, r ) > pivot 223 | let r = r - 1 224 | endwhile 225 | if l != r 226 | let array = ReplaceListItem( array, l, GetListItem( array, r ) ) 227 | let array = ReplaceListItem( array, r, pivot ) 228 | let l = l + 1 229 | endif 230 | 231 | while GetListItem( array, l ) < pivot 232 | let l = l + 1 233 | endwhile 234 | if l != r 235 | let array = ReplaceListItem( array, r, GetListItem( array, l ) ) 236 | let array = ReplaceListItem( array, l, pivot ) 237 | let r = r - 1 238 | endif 239 | endwhile 240 | if a:beg < l-1 241 | let array = QuickSortList( array, a:beg, l-1 ) 242 | endif 243 | if a:end > l+1 244 | let array = QuickSortList( array, l+1, a:end ) 245 | endif 246 | return array 247 | endfunction 248 | 249 | 250 | -------------------------------------------------------------------------------- /plugin/remoteOpen.vim: -------------------------------------------------------------------------------- 1 | " File: remoteOpen.vim 2 | " Author: Srinath Avadhanula 3 | " $Id: remoteOpen.vim 1080 2010-01-26 22:02:34Z tmaas $ 4 | " 5 | " Description: 6 | " Often times, an external program needs to open a file in gvim from the 7 | " command line. However, it will not know if the file is already opened in a 8 | " previous vim session. It is not sufficient to simply specify 9 | " 10 | " gvim --remote-silent 11 | " 12 | " because this simply opens up in the first remote gvim session it 13 | " sees. This script provides a command RemoteOpen which is meant to be used 14 | " from the command line as follows: 15 | " 16 | " gvim -c ":RemoteOpen + " 17 | " 18 | " where is the line-number you wish to open to. What will 19 | " happen is that a new gvim will start up and enquire from all previous 20 | " sessions if is already open in any of them. If it is, then it 21 | " will edit the file in that session and bring it to the foreground and itself 22 | " quit. Otherwise, it will not quit and instead open up the file for editing 23 | " at . 24 | " 25 | " This was mainly created to be used with Yap (the dvi previewer in miktex), 26 | " so you can specify the program for "inverse search" as specified above. 27 | " This ensures that the inverse search uses the correct gvim each time. 28 | " 29 | " Ofcourse, this requires vim with +clientserver. If not, then RemoteOpen just 30 | " opens in the present session. 31 | 32 | " Enclose in single quotes so it can be passed as a function argument. 33 | com! -nargs=1 RemoteOpen :call RemoteOpen('') 34 | com! -nargs=? RemoteInsert :call RemoteInsert('') 35 | 36 | " RemoteOpen: open a file remotely (if possible) {{{ 37 | " Description: checks all open vim windows to see if this file has been opened 38 | " anywhere and if so, opens it there instead of in this session. 39 | function! RemoteOpen(arglist) 40 | 41 | " First construct line number and filename from argument. a:arglist is of 42 | " the form: 43 | " +10 c:\path\to\file 44 | " or just 45 | " c:\path\to\file 46 | if a:arglist =~ '^\s*+\d\+' 47 | let linenum = matchstr(a:arglist, '^\s*+\zs\d\+\ze') 48 | let filename = matchstr(a:arglist, '^\s*+\d\+\s*\zs.*\ze') 49 | else 50 | let linenum = 1 51 | let filename = matchstr(a:arglist, '^\s*\zs.*\ze') 52 | endif 53 | let filename = escape(filename, ' ') 54 | call Tex_Debug("linenum = ".linenum.', filename = '.filename, "ropen") 55 | 56 | " If there is no clientserver functionality, then just open in the present 57 | " session and return 58 | if !has('clientserver') 59 | call Tex_Debug("-clientserver, opening locally and returning", "ropen") 60 | exec "e ".filename 61 | exec linenum 62 | normal! zv 63 | return 64 | endif 65 | 66 | " Otherwise, loop through all available servers 67 | let servers = serverlist() 68 | " If there are no servers, open file locally. 69 | if servers == '' 70 | call Tex_Debug("no open servers, opening locally", "ropen") 71 | exec "e ".filename 72 | exec linenum 73 | let g:Remote_Server = 1 74 | normal! zv 75 | return 76 | endif 77 | 78 | let i = 1 79 | let server = s:Strntok(servers, "\n", i) 80 | let targetServer = v:servername 81 | 82 | while server != '' 83 | " Find out if there was any server which was used by remoteOpen before 84 | " this. If a new gvim session was ever started via remoteOpen, then 85 | " g:Remote_Server will be set. 86 | if remote_expr(server, 'exists("g:Remote_Server")') 87 | let targetServer = server 88 | endif 89 | 90 | " Ask each server if that file is being edited by them. 91 | let bufnum = remote_expr(server, "bufnr('".filename."')") 92 | " If it is... 93 | if bufnum != -1 94 | " ask the server to edit that file and come to the foreground. 95 | " set a variable g:Remote_Server to indicate that this server 96 | " session has at least one file opened via RemoteOpen 97 | let targetServer = server 98 | break 99 | end 100 | 101 | let i = i + 1 102 | let server = s:Strntok(servers, "\n", i) 103 | endwhile 104 | 105 | " If none of the servers have the file open, then open this file in the 106 | " first server. This has the advantage if yap tries to make vim open 107 | " multiple vims, then at least they will all be opened by the same gvim 108 | " server. 109 | call remote_send(targetServer, 110 | \ "\\". 111 | \ ":let g:Remote_Server = 1\". 112 | \ ":drop ".filename."\". 113 | \ ":".linenum."\zv" 114 | \ ) 115 | call remote_foreground(targetServer) 116 | " quit this vim session 117 | if v:servername != targetServer 118 | q 119 | endif 120 | endfunction " }}} 121 | " RemoteInsert: inserts a \cite'ation remotely (if possible) {{{ 122 | " Description: 123 | function! RemoteInsert(...) 124 | 125 | let citation = matchstr(argv(0), "\\[InsText('.cite{\\zs.\\{-}\\ze}');\\]") 126 | if citation == "" 127 | q 128 | endif 129 | 130 | " Otherwise, loop through all available servers 131 | let servers = serverlist() 132 | 133 | let i = 1 134 | let server = s:Strntok(servers, "\n", i) 135 | let targetServer = v:servername 136 | 137 | while server != '' 138 | if remote_expr(server, 'exists("g:Remote_WaitingForCite")') 139 | call remote_send(server, citation . "\") 140 | call remote_foreground(server) 141 | if v:servername != server 142 | q 143 | else 144 | return 145 | endif 146 | endif 147 | 148 | let i = i + 1 149 | let server = s:Strntok(servers, "\n", i) 150 | endwhile 151 | 152 | q 153 | 154 | endfunction " }}} 155 | " Strntok: extract the n^th token from a list {{{ 156 | " example: Strntok('1,23,3', ',', 2) = 23 157 | fun! Strntok(s, tok, n) 158 | return matchstr( a:s.a:tok[0], '\v(\zs([^'.a:tok.']*)\ze['.a:tok.']){'.a:n.'}') 159 | endfun 160 | 161 | " }}} 162 | 163 | " vim:ft=vim:ts=4:sw=4:noet:fdm=marker:commentstring=\"\ %s:nowrap 164 | --------------------------------------------------------------------------------