For example, assume I wanted a certain reference "fig: structure vs. tree" so \ref{<F9>}:
> fig: structure vs. tree
Pressing return on the ">" one gets \ref{fig:} and not the desired \ref{fig: structure vs. tree}?
I believe the answer is an error in $VIM/addons/ftplugin/outline.py, unfortunately I don't speak python.
Please help me get this functionality. I realize that as I am dealing with a patched outline I may be on my own but perhaps you can give me suggestions.
--- vim-latexsuite_20060325.orig/ftplugin/latex-suite/outline.py 2006-03-21 20:29:35.000000000 +0100 +++ vim-latexsuite/ftplugin/latex-suite/outline.py 2006-04-28 13:30:03.000000000 +0200 @@ -11,20 +11,28 @@ import sys import StringIO -# getFileContents {{{ -def getFileContents(argin, ext=''): - if type(argin) is str: - fname = argin + ext +# includeFile {{{ +def includeFile(fname): + if type(fname) is not str: + fname = fname.group(3) + + (root, ext) = os.path.splitext(fname) + + if not ext: + return getFileContents(fname + '.tex') else: - fname = argin.group(3) + ext + return getFileContents(fname) +# }}} +# getFileContents {{{ +def getFileContents(fname): # This longish thing is to make sure that all files are converted into # \n seperated lines. contents = '\n'.join(open(fname).read().splitlines()) # TODO what are all the ways in which a tex file can include another? pat = re.compile(r'^\\(@?)(include|input){(.*?)}', re.M) - contents = re.sub(pat, lambda input: getFileContents(input, ext), contents) + contents = re.sub(pat, includeFile, contents) return ('%%==== FILENAME: %s' % fname) + '\n' + contents @@ -166,8 +174,7 @@ if head: os.chdir(head) - [root, ext] = os.path.splitext(tail) - contents = getFileContents(root, ext) + contents = getFileContents(fname) nonempty = stripComments(contents) lineinfo = addFileNameAndNumber(nonempty)
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Vim-latex-devel mailing list Vim-latex-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vim-latex-devel