On Fri, Jul 31, 2020 at 06:40:15AM +0900, Akira Yokosawa wrote: > >From 7b56ddf382f836201b9e88e2f7b185fae422314e Mon Sep 17 00:00:00 2001 > From: Akira Yokosawa <akiyks@xxxxxxxxx> > Date: Fri, 31 Jul 2020 00:18:58 +0900 > Subject: [PATCH 1/2] qqz.sty: Add page number to the QQZ heading for 'nq' build > > Excerpt of Paul's message: > > For a printed book, would it make sense to put the page number of the > quick-quiz source (the location of the little box containing "QQ" and > the quick-quiz number) into each answer? Or after each question? > > This commit adds the page number at the right-hand side of quiz heading > in framed box. It is also a hyperlink to the little box in the text. Looks great, thank you!!! Queued and pushed. Thanx, Paul > Suggested-by: Paul E. McKenney <paulmck@xxxxxxxxxx> > Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> > --- > qqz.sty | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/qqz.sty b/qqz.sty > index 6d87e192..897d1ab6 100644 > --- a/qqz.sty > +++ b/qqz.sty > @@ -59,6 +59,8 @@ > \newcommand{\QuickQuizAnswerChapter}{\textbf{Unknown QuickQAC!!!}} > > \newcommand{\QuickQHeading}[3]{\hyperref[#2.#3]{\textbf{Quick Quiz #3:}}\label{#1.#3}} > +\newcommand{\QuickQHeadingPage}[3]{\hyperref[#2.#3]{\textbf{Quick Quiz #3:}}\label{#1.#3}% > + \hfill\raisebox{0.5ex}{\footnotesize\fbox{p.\pageref{#2.#3}}}} > \newcommand{\QuickQHeadingLight}[3]{\scriptsize QQ~\hyperref[#2.#3]{#3}\label{#1.#3}} > \newcommand{\QuickQHeadingBegin}[3]{\scriptsize QQ~\hyperref[#2.#3]{#3}\label{#1.#3},} > \newcommand{\QuickQHeadingMiddle}[3]{\scriptsize\hyperref[#2.#3]{{ #3}}\label{#1.#3},} > @@ -219,7 +221,7 @@ > \newcommand{\QuickQ}[1]{ > \begin{tcolorbox}[breakable] > \refstepcounter{quickquizctrC} > - \QuickQHeading{QQA}{QQ}{\QuickQuizAnswerChapter.\thequickquizctrC} \\ > + \QuickQHeadingPage{QQA}{QQ}{\QuickQuizAnswerChapter.\thequickquizctrC}\\ > } > > \newcommand{\QuickA}[1]{% > -- > 2.17.1 >