The object of my question is learning how to remove the numbering that lies adjacent to a new environment after its been called while being able to reference the counter number later using \ref
. I've been looking for answers but it seems that everyone wants this numbering while I don't. I understand that I can use \addtocounter{Problem}
, but I'd like something automated so that I don't have to worry about that every section or chapter. Any help would be greatly appreciated.
\documentclass{book}
\usepackage{nameref}
\newcounter{Problem}[chapter]
\renewcommand{\theProblem}{\thechapter.\arabic{homework}}
\newenvironment{Problem}[1][]{
\refstepcounter{Problem}
\paragraph{PROBLEM \theProblem~ #1}%
}
{
(end of problem)
}%
\begin{document}
\chapter{New Chapter}
\begin{Problem}[A]
\label{Issue}
I want the problem number on the left to be hidden when using \nameref.
\end{homework}
I'm trying to hide the number when using \nameref{Issue}
\end{document}
I'm sorry, I forgot to include that I am trying to hide the problem number when using \nameref.
\ref
? – egreg Jan 21 '15 at 21:57\theProblem
from yourProblem
environment definition... But there is little value in referencing something that doesn't have a corresponding number. Unless, of course, you might be interested in referencing the problem by some literal description. – Werner Jan 21 '15 at 21:58