I defined a new paragraph with one counter in this way: \def\newparagraph{\paragraph{\counter}}
Is there a way to release this kind of label?
\label{\value{chapter}.\value{\counter}}
You surely can do
\newcounter{leo}
\newcommand{\newparagraph}{%
\refstepcounter{leo}%
\paragraph{\theleo}%
\label{\thechapter.\theleo}%
}
but the label will serve no purpose whatsoever.
Suppose that, at one point when writing the document, your \newparagraph
gets the number 4.1
(second numbered paragraph in chapter 4). You'll happily refer to it by \ref{4.1}
. The next day, you decide that, after all, there should be another numbered paragraph before the already written one. You'll need to chase down all \ref{4.1}
(and the ones of the form 4.x
) in order to change them for reflecting the current situation.
The next day you (or your thesis advisor) decide that, after all, the two numbered paragraphs should be merged into one. And so on and so forth.
Do, instead,
\newcounter{leo}
\newcommand{\newparagraph}{%
\refstepcounter{leo}%
\paragraph{\theleo}%
}
and use
\newparagraph\label{wonderful} This is my wonderful paragraph
so you can refer to it by \ref{wonderful}
.
\label{2.3}
. I need no label then :-(\counter
works in\value
then it must be the name of a counter, so expand to something likesection
orfootnote
etc, so\newparagraph
always makes a section heading with the same text, the name of a counter????