1
\documentclass[ebook,12pt,oneside,openany]{memoir}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{xurl}
\usepackage{lipsum}

\usepackage[backend = biber,url= false,style=numeric,sorting=none, natbib=true]{biblatex}
\addbibresource{test.bib}

\usepackage[hyperindex=true]{hyperref}
\hypersetup{
    colorlinks   = true, %Colours links instead of ugly boxes
    urlcolor     = blue, %Colour for external hyperlinks
    linkcolor    = blue, %Colour of internal links
    citecolor   = red %Colour of citations
}
\title{Test}
\author{Author}
\date{}

\begin{document}
    \maketitle  
    \frontmatter    
    \tableofcontents \newpage   
    \mainmatter     
    \pagenumbering{arabic}
    \chapter{New Chapter}
    \lipsum
    \newpage
    I am citing a book\cite{ABC:2019} that contains \footnote{sample footnote}.
    \printbibliography  
    \backmatter     
\end{document}

test.bib file is as follows.

@book{ABC:2019,
    author={ABC},
    title={Test},
    publisher={T},
    year={2019}
}

I am using tex4ebook for creating epub file. When bib entry is clicked, the first page of chapter opens up instead of bibliography.

.mk4 file is

Make:add("biber","biber ${input}")
Make:htlatex {}

Make:biber {}

Make:htlatex {}
Make:htlatex {}

.cfg file is

\Preamble{xhtml}
\makeatletter
\@ifpackageloaded{hyperref}{%
\ifHy@hyperfootnotes
\newcounter{Hfootnote}
\fi
}{}
\makeatother
\begin{document}
\EndPreamble

On the other hand, if I remove \footnote{} from "I am citing a book\cite{ABC:2019} that contains \footnote{sample footnote}" line, bib entry hyperlink works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.