答案1
定义提示,使其具有标签。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{xcolor}
\usepackage{hyperref}
\hypersetup{
colorlinks,
linkcolor=blue!60,
}
\theoremstyle{definition}
\newtheorem{problem}{Problem}[section]
\newtheorem{hint}{Hint}
\ExplSyntaxOn
\NewDocumentCommand{\addhints}{m}
{
\unskip
\space
\mbox
{
\footnotesize
\textbf{Hints:}~
\clist_map_inline:nn { #1 } { \ref{##1}~ }
\unskip
}
}
\ExplSyntaxOff
\begin{document}
\section{Problems}
\begin{problem}
Show that for something we have something else. \addhints{ab,uv}
\end{problem}
\section{Hints}
\begin{hint}\label{ab}
Remember that $1+1=2$
\end{hint}
\begin{hint}\label{cd}
Some complicated and useless hint.
\end{hint}
\begin{hint}\label{uv}
This hint is very useful.
\end{hint}
\end{document}