I need the package pagenote
to get endnotes with pagenumbers refering in the print version of the pdf with pdflatex. With tex4ebook
I need to get this pagenotes accordingly, but without pagenumbers, and with hyperlinks to get from the epub text content to the endnote/pagenote at the end of the epub, and vice versa. In addition it should be possible to get into bibliography when cited an author.
With the follow MWE I get good result for the pdf print version. But when converting it into epub with tex4ebook, the links between endnote/pagenote in text document and at the end of the epub document lacks functionality and the pagenumbers are shown like in the print version pdf file.
\documentclass[11pt,a4paper]{report}
\usepackage{ebgaramond-maths}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{tex4ebook}
\ifdefined\HCode
\usepackage[hyperfootnotes=true,
pdfauthor={Autor},
pdftitle={Titel},
pdfkeywords={Philosophy}]{hyperref}
\else\fi
\usepackage[sortlocale=auto,bibstyle=authoryear,citestyle=authortitle-ticomp]{biblatex}
\addbibresource{biblatex-examples.bib}
\usepackage[continuous,page]{pagenote}
\makepagenote
\let\footnote=\pagenote
\usepackage{csquotes}
\begin{document}
\section{Beginn einer Freundschaft}
"`Ein zitierter Satz eines Autors."'\footcite{sigfridsson}
\clearpage
\section{Fortsetzung einer Freundschaft}
"`Ein weiterer, zitierter Satz."'\footfullcite{sigfridsson}
\clearpage
\section{Kür einer Freundschaft}
Etwas mit Fußnote/Pagenote.\footnote{A footnote that should become a pagenote, respectively a hyperref at the end of the ebook/epub file.}
\clearpage
\printnotes
\clearpage
\printbibliography
\end{document}
What should be done to get in the ebook a hyperref functionality for the pagenotes?
Edit 1:
Option hyperfootnotes
in package hyperref
added and package csquotes
. But still no hyperfootnotes/pagenotes in epub visible. Instead the following warning during tex4ebook run:
Package biblatex Warning: Patching footnotes failed.
(biblatex) Footnote detection will not work.
Does anybody know what to do?
Edit 2
The following has been successfully with pdflatex compiled after answer 1. When using the package pagenote
(with pagenote.4ht file by Michal in answer 1) with bibliography
and indexing
an Undefined control sequence
occurs if it is compiled with
tex4ebook -a debug -c configfile.cfg -e buildfile.mk4 -m index Sourcefile.tex
The LaTeX file Sourcefile.tex
shows like this as a MWE:
\documentclass[11pt,a4paper]{report}
\usepackage{ebgaramond-maths}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{tex4ebook}
\ifdefined\HCode
\usepackage[xindy,noautomatic]{imakeidx}
\else
\usepackage[]{imakeidx}
\fi
\makeindex
\ifdefined\HCode
\usepackage[hyperfootnotes=true,hyperindex=true,
pdfauthor={Autor},
pdftitle={Titel},
pdfkeywords={Philosophy}]{hyperref}
\else\fi
\usepackage[sortlocale=auto,bibstyle=authoryear,citestyle=authortitle-ticomp]{biblatex}
\addbibresource{biblatex-examples.bib}
\usepackage[continuous,page]{pagenote}
\makepagenote
\let\footnote=\pagenote
\newcommand*{\addtonotesnewcommand}[1]{\addtonotes{\vspace*{0.7\baselineskip}\noindent\textsc{\vspace*{0.35\baselineskip}\large #1}}}
\renewcommand*{\notesname}{Anmerkungen und Verweise}
\usepackage{csquotes}
\renewcommand{\thesection}{\arabic{section}}
\begin{document}
\section{Beginn einer Freundschaft}
\addtonotesnewcommand{\thesection. Beginn einer Freundschaft}
"`Ein zitierter Satz eines Autors.\index{Autor}"'\footcite{sigfridsson}
\clearpage
\section{Fortsetzung einer Freundschaft}
\addtonotesnewcommand{\thesection. Fortsetzung einer Freundschaft}
"`Ein weiterer, zitierter Satz.\index{Satz}"'\footfullcite{sigfridsson}
\clearpage
\section{Kür einer Freundschaft}
\addtonotesnewcommand{\thesection. Kür einer Freundschaft}
Etwas\index{Etwas} mit Fußnote/Pagenote.\footnote{A footnote that should become a pagenote}
\clearpage
\printnotes
\clearpage
\printindex
\clearpage
\printbibliography
\end{document}
And this is the problem:
Kapitel 1.
(./Testdocument_pagenote.ent
! Undefined control sequence.
l.1 ...Ct \relax \let \prOteCt \relax \Protect \gl
:removeindenttrue \unhbox ...
Without indexing the answer 1 here works best with tex4ebook. What can be done?