这个问题来自这个帖子使用 tex4ht 的 minilot 和 minilof. 使用 tex4ebook 编译时,生成 minilot 和 minilof 时 hyperref 包似乎存在问题:
梅威瑟:
\documentclass{book}
\usepackage{mwe}
\usepackage[ngerman]{babel}
\usepackage{hyperref}
\hypersetup{%
linktocpage=true,
breaklinks=true,
colorlinks=true,
citecolor=black,
linkcolor=black,
urlcolor=black,
pdfpagemode=UseThumbs,
pdftitle={thetitle},
pdfauthor={theAuthor},
pdfsubject={thetitle},
pdfkeywords={thekeywords},
}
\makeatletter
\g@addto@macro\UrlBreaks{\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i%
\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w%
\do\x\do\y\do\z\do\&\do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9\do\0}
\def\do@url@hyp{\do\-}
\makeatother
\addto\extrasngerman{
\def\subsectionautorefname{Kap.}
\def\figureautorefname{Abb.}
\def\tableautorefname{Tab.}
\def\chapterautorefname{Kap.}
\def\sectionautorefname{Kap.}
\def\subsectionautorefname{Kap.}
}
\usepackage[nohints]{minitoc}
\mtcselectlanguage{german}
\mtcsettitle{minitoc}{}
\mtcsettitle{minilof}{}
\mtcsettitle{minilot}{}
\mtcsetfeature{minitoc}{open}{\vspace{1cm}}
\nomtcrule
\nomlfrule
\nomltrule
\tightmtctrue
\begin{document}
\dominitoc
\dominilof
\dominilot
\doparttoc
\fakelistoffigures
\fakelistoftables
\ifdefined\HCode\else
\tableofcontents
\fi
\chapter{chapter 1}
\minitoc
\section{Table}
\begin{table}[ht!]
\centering
\caption{a table}
\label{a table}
\begin{tabular}{ll}
test & test
\end{tabular}
\end{table}
\begin{table}[ht!]
\centering
\caption{a table2}
\label{a table}
\begin{tabular}{ll}
test & test
\end{tabular}
\end{table}
\begin{table}[ht!]
\centering
\caption{a table3}
\label{a table}
\begin{tabular}{ll}
test & test
\end{tabular}
\end{table}
\begin{figure}
\caption{Sample figure}
\end{figure}
\begin{figure}
\caption{Sample figure2}
\end{figure}
\begin{figure}
\caption{Sample figure3}
\end{figure}
\section{LOT}
\minilot
\section{LOF}
\minilof
\end{document}
如果我取消注释该包,则使用 pdflatex 进行编译时会出错,因为有多个 bib 文件需要该包。有没有办法让 hyperref 与 tex4ebook/minitoc 一起工作,或者您是否有解决方法?