The following is from the help:
:h 'spellfile'
string (default empty), local to buffer
Name of the word list file where words are added for the |zg|
and |zw| commands.
:h spell-load
Vim searches for spell files in the "spell" subdirectory of the
directories in 'runtimepath' ... Only the first file is loaded
... If this succeeds then additionally files with the name
LL.EEE.add.spl are loaded. All the ones that are found are
used.
LL the language name
EEE the value of 'encoding'
=> what you want should be possible.
You could add to ~/.vim/after/ftplugin/tex.vim:
let b:spellfile = expand('%:p:h'). '/myspell.latin1.add'
if filereadable(b:spellfile)
let &l:spf = b:spellfile
else
setl spf=
endif
This lets each tex file use the spell file myspell.latin1.add from its
directory. Example assumes encoding "latin1", and that setting the
option does not create the spell file yet ...
or (with b:undo_ftplugin):
let b:spellfile = expand('%:p:h'). '/myspell.latin1.add'
if filereadable(b:spellfile)
let &l:spf = b:spellfile
let b:undo_ftplugin .= '|setl spf<'
endif
let b:undo_ftplugin .= '|unlet! b:spellfile'
(warning: almost untested)
Vim automatically creates the .spl files.
--
Andy