>From 58779425864798ce510aad617746f3b3360868bc Mon Sep 17 00:00:00 2001 From: Akira Yokosawa <akiyks@xxxxxxxxx> Date: Sat, 11 Jan 2020 18:29:59 +0900 Subject: [PATCH 5/6] Use unbreakable endash in \clnrefrange{}{} Using a shortcut macro "\==" instead of a plain endash ("--") can prevent widowing of the 2nd cross reference. NOTE: cleveref's \crefrangeconjunction macro could also be changed as well to change the behavior of \crefrange and \Crefrange commands. However, such a change would end up in large under/over fill where generated cross-references are more than a few characters long. Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- perfbook.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perfbook.tex b/perfbook.tex index 38272761..e8610a34 100644 --- a/perfbook.tex +++ b/perfbook.tex @@ -236,8 +236,8 @@ } \newcommand{\clnref}[1]{\clnrefp{#1}{line}} \newcommand{\Clnref}[1]{\clnrefp{#1}{Line}} -\newcommand{\clnrefrange}[2]{lines~\lnref{#1}--\lnref{#2}} -\newcommand{\Clnrefrange}[2]{Lines~\lnref{#1}--\lnref{#2}} +\newcommand{\clnrefrange}[2]{lines~\lnref{#1}\==\lnref{#2}} +\newcommand{\Clnrefrange}[2]{Lines~\lnref{#1}\==\lnref{#2}} \newcommand{\clnrefthro}[2]{lines~\lnref{#1} through~\lnref{#2}} \newcommand{\Clnrefthro}[2]{Lines~\lnref{#1} through~\lnref{#2}} \newcommand{\pararef}[1]{Paragraph ``\nameref{#1}'' on Page~\pageref{#1}} -- 2.17.1