Exercise 1. Do this (Link to Hint) (Link to Solution)
and then the solutions page would have
Solution 1. This is the solution. (Link to Original Problem)
The code that I tried to throw together is as follows
Code: Select all
\theoremstyle{definition}
\newtheorem{exer}{Exercise}
\newtheorem{sol}{Solution}
\newcounter{exercises}
\newcounter{solutions}
\setcounter{exercises}{0}
\setcounter{solutions}{0}
\newcommand{\ex}{ %to start an exercise
\begin{exer}
\hypertarget{\value{exercises}-exer}{}
}
\newcommand{\eex}{ % to end an exercise
\hyperlink{\value{exercises}-sol}{Solution}
\end{exer}
\addtocounter{exercises}{1}
}
\newcommand{\so}{ % start a solution
\begin{sol}
\hypertarget{\value{solutions}-sol}{}
}
\newcommand{\eso}{ % end a solution
\hyperlink{\value{solutions}-exer}{Exercise}
\end{sol}
\addtocounter{solutions}{1}
}
Thanks.