I looked around for a long time but did not find any solution for that. On my Unix system (Ubuntu), using LaTeX-suite, I need to escape some characters in file names for compilation, say parenthesis (,) and comma ,.
I modified a bit my compilation script following LaTex-vim cannot compile files with spaces in name and now spaces are indeed escaped. The problem is that fnameescape() does not escape commas or parenthesis.
Is there any way I could add ( ) and , as new characters to be escaped by that function ?
If not, is there any way I can change my line
let mainfname = fnameescape(Tex_GetMainFileName(':p:t'))
in compiler.vim to also escape commas and parenthesis ?
Thanks a lot !
EDIT : Here is a temporary solution I found, seems to work but since I'm not an expert it might lead to further problems at some point. For the moment, it worked with the following filename
DM8 - Devoir libre (fonctions, probas).tex
In ftplugin/latex-suite/compiler.vim at line 112 I added the two times three subsitute() lines by hand :
if exists('b:fragmentFile')
let mainfname = fnameescape(expand('%:p:t'))
let mainfname = substitute(mainfname,'(', '\\(','g')
let mainfname = substitute(mainfname,')', '\\)','g')
let mainfname = substitute(mainfname,',', '\\,','g')
call Tex_CD(expand('%:p:h'))
else
let mainfname = fnameescape(Tex_GetMainFileName(':p:t'))
let mainfname = substitute(mainfname,'(', '\\(','g')
let mainfname = substitute(mainfname,')', '\\)','g')
let mainfname = substitute(mainfname,',', '\\,','g')
escape()
function, to escape custom characters.