>From e51d65d2b5e10dcf4bd4f5970010c0cded292f0e Mon Sep 17 00:00:00 2001 From: Akira Yokosawa <akiyks@xxxxxxxxx> Date: Mon, 18 Jul 2016 08:41:12 +0900 Subject: [PATCH] qqz: Modify back link target at end of QQA to the end of QQ This commit modifies the target of back link at the end of QQA (white box) to the end of corresponding QQ in the main text. This change enables you to easily reach the text following a (possibly long) QQ by clicking a white box at the end of the QQA. Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- qqz.sty | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qqz.sty b/qqz.sty index 0c97df9..4505f8c 100644 --- a/qqz.sty +++ b/qqz.sty @@ -20,6 +20,7 @@ %% Akira Yokosawa <akiyks@xxxxxxxxx> # improvement of cross-link \newcounter{quickquizctr}[chapter] +\newcounter{quickquizctrE}[chapter] \newcounter{quickquizctrC}[section] \newcommand*{\theHNum}{\arabic{chapter}.\arabic{quickquizctr}} \newcommand{\QuickQuizAnswerChapter}{\textbf{Unknown QuickQAC!!!}} @@ -33,7 +34,10 @@ \newcommand{\QuickQuiz}[1]{ \refstepcounter{quickquizctr} \QuickQHeading{QQ}{QQA}{\thechapter.\thequickquizctr}} -\newcommand{\QuickQuizAnswer}[1]{\hyperref[QQA.\thechapter.\thequickquizctr]{\rule{7pt}{7pt}}} +\newcommand{\QuickQuizAnswer}[1]{% + \refstepcounter{quickquizctrE}% + \hyperref[QQA.\thechapter.\thequickquizctr]{\rule{7pt}{7pt}}% + \label{QQE.\thechapter.\thequickquizctrE}} \newcommand{\QuickQuizEnd}{} % To create a macro referencing the previously defined quick quiz: @@ -84,7 +88,7 @@ \noindent\textbf{Answer:} \\ } \newcommand{\QuickE}{% - \hyperref[QQ.\QuickQuizAnswerChapter.\thequickquizctrC]{\ding{113}} + \hyperref[QQE.\QuickQuizAnswerChapter.\thequickquizctrC]{\ding{113}} \vspace{1.5\baselineskip} } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html