I have been using LaTeX for a while, but this is my first post.
I would like to make a numbered "Exercise" environment that generates (via the hyperref package) a corresponding bookmark "Exercise #_" in the PDF output file.
I know how to define the envioronment and how to manually create a bookmark. But what is tripping me up is
Linking the bookmark creation to the \begin{exercise} command
Matching the bookmark title with the environment title (e.g. "Exercise 5").
Thank you in advance for any advice on this issue.
works nicely to name and number exercises, but I would like pdfLaTeX to make a bookmark called "Exercise #whatever," (I don't care if the name "blaBlaBla" shows up) as it does for the \section command. Ideally, the solution would work even if I changed the numbering level of the environment (e.g. "2.2" instead of "2").
I would wrap another environment around the one defined through »\newtheorem« and use hyperref's »\pdfbookmark[<level>]{<name>}{<label>}« inside it. Something like