textmate/latex.tmbundle

Problem when including an xfig-generated file

odapg opened this issue · 1 comments

odapg commented

Including an xfig-generated file (typically a "figure.pdftex_t" or "figure.pdf_t" file) seems to break the "Label Based on Current Word" and "Citation Based on Current Word" commands. If you have somewhere in your LaTeX file a line like:

\input{figure.pdf_t}

then triggering the above commands yields the error "Could not locate any file named : figure.pdf_t".

I managed to circumvent the problem by modifying the "set_defaults" method in "latex.rb": one can change the regular expression that allows to ignore the \include/\input commands with a hash so that it ignores the files ending with "_t" as well. Something like

/^[^%]*(?:\include|\input)\s*\{([^(\}\\#|\_t)]*)}/

in place of

/^[^%]*(?:\\include|\\input)\s*\{([^}\\#]*)\}/

But I am not sure that this is optimal; could something analogous be included in the next commits?

Sorry for the (very very) late respone. Hopefully commit 344b6aa should fix the problem. If it does not, then please feel free to reopen this issue.