From b4e19b5fbee12741366bcdd41c32154eabf1ec25 Mon Sep 17 00:00:00 2001
From: n-peugnet <n.peugnet@free.fr>
Date: Sat, 6 Nov 2021 17:36:31 +0100
Subject: add backrefs and move hyperrefs as the last usepackage

---
 pdf/doc.tex | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

(limited to 'pdf/doc.tex')

diff --git a/pdf/doc.tex b/pdf/doc.tex
index cf68fd7..fff6414 100644
--- a/pdf/doc.tex
+++ b/pdf/doc.tex
@@ -35,11 +35,6 @@
 	emphstyle=\color{identifier}, % sets color for comments
 }
 
-% Hyperlinks
-\usepackage{xurl}                % allow word break for url wrapping
-\usepackage[hidelinks]{hyperref} % create invisible clickable links
-\usepackage{doi}                 % add links to doi urls
-
 % Appendices
 \usepackage{appendix}
 \renewcommand{\appendixname}{Annexe}
@@ -71,6 +66,25 @@
 % Acronyms
 \usepackage[printonlyused,footnote]{acronym}
 
+% Hyperlinks
+\usepackage{xurl}                % allow word break for url wrapping
+\usepackage[
+  hidelinks,                     % invisible links
+  pagebackref=true               % linkback to citations from bibliography
+]{hyperref}                      % create clickable links
+\usepackage{doi}                 % add links to doi urls
+
+% Backrefs in the bibliography for french
+\renewcommand{\backrefalt}[4]{
+\ifcase #1 {}
+  \or \emph{Cité page #2}
+  \else \emph{Cité pages #2}
+\fi
+}
+% Backref separators for french
+\renewcommand{\backreftwosep}{ et~}
+\renewcommand{\backreflastsep}{, et~}
+
 % Style
 \setlength{\parskip}{.3em} % space between paragraphs
 
-- 
cgit v1.2.3

