Re: [Vim-latex-devel] Re: new dir for bibliography?
Brought to you by:
srinathava,
tmaas
From: Mikolaj M. <mi...@wp...> - 2003-04-08 19:16:43
|
On Tue, Apr 08, 2003 at 01:33:50PM +0200, Luc Hermitte wrote: Thanks for your reply. Knowing there is no sense to put effort in grep issue I investigated how exactly LaTeX deals with bibliography files. Results are encouraging. There can be only one \bibliography command in file. It can be list of files with exact paths (no dealing with TEXINPUTS) separated with commas. We have only to find \bibliography and iterate through list and grep this files looking for bibkeys. This is easy. If there is no \bibliography we will grep current directory looking for *.bib and *.bbl files. No need for special variable. Also we should check MainFile if there is \bibliography command. But should we check it only if in current file this command doesn't exist? I think yes. But... Ok small "algorithm" Check if \bibliography exists in this file Yes No Grep files from list Grep files in directory \ / Y Grepadd current file for bibitem{ Check if in packages list is chapterbib Yes Check if current file is main file Yes No END Check if \bibliography exists in mainfile Yes No Grepadd files in list Grepadd files in dir of mainfile \ / Y Grepadd mainfile for bibitem{ The only problem I see is with .bbl files mentioned by Srinath. \include accepts only .tex files . In addition grepping *.bbl files (as is now) will grep half-products of regular bib files. I will change grep 'bibitem{' *.bbl into grep 'bibitem{ *.tex Is it right? Diagram above will change slightly but it is easy to imagine, I will not draw it again. > > call <SID>Tex_c_window_setup() > Where is this function defined ? tex/texviewer.vim Thanks again for your research. m. |