文章预览
问题选自:https://ask.latexstudio.net/ask/question/17295.html 以下是MWE,可以编译出具备双向跳转功能的PDF文件。 \documentclass[12pt]{ctexart} \usepackage{tcolorbox} \usepackage{lipsum} \usepackage[hidelinks]{hyperref} \newcounter{question}[section] \renewcommand\theHquestion{\thesection-\thequestion} \newcommand{\labelquestion}{ \refstepcounter{question}% \label{Question\arabic{section}-\arabic{question}} } \newcommand{\question}[1]{ \indent\labelquestion \hyperref[{Answer\arabic{section}-\arabic{question}}]{\textbf{\thesection-\thequestion}\hskip .2cm} } \newcounter{answer}[section] \renewcommand\theHanswer{\thesection-\theanswer} \newcommand{\labelanswer}{ \refstepcounter{answer}% \label{Answer\arabic{section}-\arabic{answer}} } \newcommand{\answer}{ \indent\labelanswer \hyperref[{Question\arabic{section}-\arabic{answer}}]{\textbf{\thesection-\theanswer}\hskip .2cm} } \begin{document} \section{这是第一章节} \q
………………………………