[NTG-context] ctags and ConTeXt

Mon Feb 26 08:01:40 CET 2007

On Sun, 11 Feb 2007, Aditya Mahajan wrote:

> Hi,
>
> I am wondering how others manage a large list of reference labels in
> ConTeXt. I use Vim as an editor and it supports ctags. ctags is a
> utility that is basically for supporting tags in programs (initially
> only for C, and hence the name), but can be used relatively easily
> with LaTeX. Basically, ctags creates a tag file with the format
>
> <tag-name> <tag-file> <tag-regex>
>
> (for details see http://ctags.sourceforge.net/FORMAT)

I have a rudimentary support that is running. I have modified the
writereference command so that it also writes the correct information
to the tags file. It is almost working. I just need to figure out how
to write a literal tab to a file? I tried

\immediate\write\file {tag^^I file^^I /:line_no/}

but this only writes a space. ctags expects \t to be present between
tag and file name.

Secondly (this is not that important), can TeX write to a file without
any extension? Traditionally the tags file is just named `tags'