# [TxMt] TODO bundle, add \ref{} item

Fri Jul 27 09:02:22 UTC 2007

Hi Baptiste,

> Working on a big latex project, I find the TODO bundle very useful
> for custom notes. Now I would like to add a TODO item which scans
> the project for the regular expression /\ref{}/ , that is an empty
> reference, and list them together with a few words of the paragraph
> they belong to. I just don't understand regular expressions well
> enough to do that!

Something like

/\\ref\{\s*\}/

in the Pattern section of the preferences ought to be enough. The
double backslash gives a "real" backslash (it's usually used to
escape other characters, such as the "\s*" to denote any amount of
space between the braces above, or conversely, again as above, to
indicate a *literal* brace). Having the "\s*" inside the braces means
that if you accidentally leave blank space inside it'll still be
flagged.

Cheers,
Paul