I am writing lecture notes where the title page numbering is set to gobble, the toc pages are in roman and the lectures pages are in arabic.
The problem is specifically on the 1st lecture page. I have a citation on the page. But its bib item on the bibliography section is back-referencing to the title page. The other citations that are not on the 1st page are not having this issue.
Here's the MWE of my lecture notes:
\documentclass[a4paper]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \input{setup/preamble}
% basics
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{url}
\usepackage{hyperref}
\hypersetup{
colorlinks,
linkcolor={black},
citecolor={black},
urlcolor={blue!80!black},
% backref=true,
% pagebackref=true
}
% Page Margins
\usepackage[
margin=2.8cm,
% top=2.8cm, bottom=2.8cm,
% left=1in, right=1in,
% headheight=14.5pt
]{geometry}
% \usepackage{graphicx}
% \usepackage{float}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{lipsum}
% bibliography
\usepackage[
backend=biber,
backref=true,
style=numeric,
sortcites=true,
sorting=none,
defernumbers=true
]{biblatex} % bibliography % https://www.overleaf.com/learn/latex/bibliography_management_with_biblatex
\usepackage{xurl} % handling the urls in bib file and it should be loaded after loading biblatex
%% Change formatting of back references % https://tex.stackexchange.com/a/606518/114006
\DefineBibliographyStrings{english}{
backrefpage={p.},
% backrefpage={},
backrefpages={pp.}
% backrefpages={
}
\renewcommand*{\finentrypunct}{}
\usepackage{xpatch}
% \DeclareFieldFormat{backrefparens}{\mkbibparens{#1\addperiod}}
\DeclareFieldFormat{backrefparens}{\raisebox{-4pt}{\scriptsize{\mkbibparens{#1}}}}
\xpatchbibmacro{pageref}{parens}{backrefparens}{}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{filecontents}{ref.bib}
@book{arnold2013mathematical,
title = {Mathematical {{Methods}} of {{Classical Mechanics}}},
author = {Arnold, Vladimir I},
date = {2013},
series = {Graduate {{Texts}} in {{Mathematics}}},
volume = {60},
publisher = {{Springer Science & Business Media}}
}
@article{yang1954conservation,
title = {Conservation of {{Isotopic Spin}} and {{Isotopic Gauge Invariance}}},
author = {Yang, Chen N and Mills, Robert L},
date = {1954-10-01},
journaltitle = {Physical Review},
shortjournal = {Phys. Rev.},
volume = {96},
number = {1},
pages = {191--195},
doi = {10.1103/PhysRev.96.191}
}
\end{filecontents}
\addbibresource{ref.bib}
\title{Lecture Notes}
\author{me}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\maketitle
\pagenumbering{gobble}
% \input{preface}
\newpage
\pagenumbering{roman}
\pdfbookmark{\contentsname}{toc}
\setcounter{tocdepth}{0}
\tableofcontents
\newpage
\pagenumbering{arabic}
% start lectures
\chapter{Sat, Mar 18, 2023}
\lipsum[1] \cite{arnold2013mathematical}
\lipsum \cite{yang1954conservation}
% \intput{endpage}
% Bibliography
\printbibheading[heading=bibintoc, title={\protect\numberline{}Recommended Resources}] % https://tex.stackexchange.com/a/222961/114006
\printbibliography[type=book,heading=subbibliography,title={Books}] % https://www.overleaf.com/learn/latex/Articles/Getting_started_with_BibLaTeX
\printbibliography[nottype=book,heading=subbibliography,title={Others}]
\end{document}
hyperreflast, it can cause strange issues when it isn't. Put it last out of the packages and see if your issue persists – JamesT Jul 03 '23 at 13:04\pagenumbering{gobble}looks like a neat trick to get an empty page style but with hyperref it is bad as you still have two pages with number one. Either ensure that you have different page numbers everywhere or supress anchors on the the title page with theNoHyperenvironment. – Ulrike Fischer Jul 03 '23 at 14:26I tried using
– raf Jul 03 '23 at 15:15NoHyperenvironment and it fixed the issue on this MWE. But it's not suitable for my main document (https://github.com/rafisics/lecture-notes-template) because it has hyperlinks in titlepage/preface.