Ramon Flores wrote:
Em Sexta, 16 de Fevereiro de 2007 17:36, o Richard Heck escreveu:
This looks to be more a LaTeX issue than a layout issue. Instead of

\addtocounter{exemplo}{1}

use

\refstepcounter{exemplo}

The latter both steps the counter and makes it the target for
cross-references. Otherwise, the target remains whatever it was,
probably section, which is why you're seeing the "1".

Thanks Richard. You are right, and now my layout works almost well.

The remanent problem is that when making a cross reference of an "exemplo" it apears only a number, corresponding to the exemplo counter. Ex:

. . . As we seen in exemple 3

But I would like that the number of the chapter were also writen. Ex:

. . . As we seen in exemple 2.3
(3rd example of the second chapter).

Something lacks, but what?
Replace \newcounter{exemplo} with something like
\newcounter{exemplo}[chapter]
It will now be reset whenever "chapter" is incremented,
you probably want that. (Or if you don't - drop the [chapter] part)

\ref will use \theexemplo to print the number, so
redefine it something like
\renewcommand{\theexemplo}{\thechapter [EMAIL PROTECTED] [EMAIL PROTECTED]

Now your references will print 2.1, 2.2, 2.3 and so on for
"exemplos" in chapter 2.

Helge Hafting

Reply via email to