Hi, everyone
  I have made a patch about this problem. It just subtitute all the
'-' with '_'.  I use vimgrep to find Tex_.*_options. Only find it is
used in package file. So I think this is pretty safe.

  Hope the maintainer can upload it to the git.

  Thanks.

Regards.
Zhou YiChao.

PATCH:
diff -u latex-suite_old/main.vim latex-suite/main.vim
--- latex-suite_old/main.vim    2011-02-15 04:27:48 +0800
+++ latex-suite/main.vim        2011-04-20 20:55:56 +0800
@@ -313,6 +313,16 @@
 endfun

 " }}}
+
+" Tex_StrTurnHyphen: Replace all the - to _. Let package unicode-math be {{{
+" unicode_math in order to get no error message. ('-' is not allowed as a
+" variable character.)
+fun! Tex_StrTurnHyphen(s)
+       return substitute(a:s, '-', '_', 'g')
+endfun
+
+" }}}
+
 " Tex_CreatePrompt: creates a prompt string {{{
 " Description:
 " Arguments:

diff -u latex-suite_old/packages.vim latex-suite/packages.vim
--- latex-suite_old/packages.vim        2011-02-15 04:27:48 +0800
+++ latex-suite/packages.vim    2011-04-20 20:49:31 +0800
@@ -386,7 +386,7 @@
                " which contains a list of the options.
                let j = 1
                while Tex_Strntok(@a, ',', j) != ''
-                       let g:Tex_{Tex_Strntok(@a, ',', j)}_options = options
+                       let g:Tex_{Tex_StrTurnHyphen(Tex_Strntok(@a, ',', 
j))}_options = options
                        let j = j + 1
                endwhile


On Wed, Mar 30, 2011 at 10:35 PM, Zhou Yi Chao
<broken.zhou.anot...@gmail.com> wrote:
>
> Hi, everyone
>
> It seems that it is package.vim line 389 cause the problem. When 
> \usepackage{unicode-math}, it will do "let g:Tex_unicode-math_options = 
> .....". But vim doesn't allow "-" in it variable name. So the error occurs. 
> I'm not familiar with what is the role of g:Tex_unicode-math_options so I 
> can't fix it.

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Vim-latex-devel mailing list
Vim-latex-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel

Reply via email to