>From 440b3f3bbdd2dc212e7f277c950338f22529f532 Mon Sep 17 00:00:00 2001 From: Akira Yokosawa <akiyks@xxxxxxxxx> Date: Fri, 6 Mar 2020 00:05:09 +0900 Subject: [PATCH 2/6] qqz.sty: Fix position of \goodbreak for accuracy of hyperlinks Commit 9e256de3262f ("qqz.sty: Permit column/page break in front of Quick Quiz heading") put \goodbreak after \refstepcounter{}. This caused backward hyperlinks to QQZs at the top of pages/columns to point the bottom of the previous pages/columns. Fix this by placing \goodbreak in front of \refstepcounter{}. Fixes: 9e256de3262f ("qqz.sty: Permit column/page break in front of Quick Quiz heading") Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- qqz.sty | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qqz.sty b/qqz.sty index 9b2aed8e..cc394160 100644 --- a/qqz.sty +++ b/qqz.sty @@ -33,8 +33,8 @@ \label{#1} } \newcommand{\QuickQuiz}[1]{ - \refstepcounter{quickquizctr} - \goodbreak\QuickQHeading{QQ}{QQA}{\thechapter.\thequickquizctr}} + \goodbreak\refstepcounter{quickquizctr}% + \QuickQHeading{QQ}{QQA}{\thechapter.\thequickquizctr}} \newcommand{\QuickQuizAnswer}[1]{% \refstepcounter{quickquizctrE}% \hyperref[QQA.\thechapter.\thequickquizctr]{\rule{7pt}{7pt}}% -- 2.17.1