# [OS X TeX] Autocompletion with \includes

Adam Maxwell amaxwell at mac.com
Wed Jul 12 19:34:31 EDT 2006


On Wednesday, July 12, 2006, at 03:45PM, Michael S. Hanson <mshanson at wesleyan.edu> wrote:

>	I have several tables that I am placing at the end of a master LaTeX
>document with \include{} commands.  In these files are \label{}
>commands.  However, the autocompletion in TeXShop (the [F5] key) does
>not find these labels, for example with a \ref{} command.  Have
>others been able to get this setup to work?  I am using TeXShop 2.09c
>on a PowerMac G5 with OS X 10.4.6.  (I also have BibDesk 1.2.6
>installed, if that matters.)  Thanks in advance for any assistance.

If you're using BibDesk's completion plugin for this, it doesn't look at \included files for \ref completion.  Sorry.  Read on for the gory details.

There are a number of issues with this; it would involve parsing the master file to find the included files, determining the encoding to use (guesswork), and then parsing each included file to find the \label commands.  This is doable, but it would only work in the master file, and is likely to be really slow.

I think the iTeXMac2 wrapper structure could go a long ways towards solving this problem, since it maintains a property list of all files associated with a given project (and presumably their encoding).