[OS X TeX] Automatic labeling for references

Alain Schremmer schremmer.alain at gmail.com
Fri Apr 4 21:28:55 EDT 2008

1) The package{titleref} lets me say, for instance, "We already saw
in 4.5 Local Graphs that …" but only once I have put a label after
\section{Local Graphs}.

Is there a way to generate these labels automatically?

For instance, is there a way to have a \newcommand{\CHAPTER} and a
\newcommand{\SECTION} in such a way that, for instance, \SECTION
writes, for instance, \section{ }\label{392} where 392 was
automatically filled in given that there already were 391 labels?

2) Same question for labeling \theorem

Hopeful regards.
--schremmer