General ⇒ hyperref causing problems with \subfloat
hyperref causing problems with \subfloat
\usepackage[bookmarks=true,%
bookmarksopen=true,%
bookmarksnumbered=true,%
colorlinks=true,%
linkcolor=blue]{hyperref}
to the document preamble, I get this error:
! Use of \caption@@setkeys doesn't match its definition.
\text@command #1->\def \reserved@a {
#1}\ifx \reserved@a \@empty \let \check@...
l.10768 \subfloat
{
Does anyone have any suggestions?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
hyperref causing problems with \subfloat
hyperref causing problems with \subfloat
\documentclass[a4paper]{lloydbook}
\usepackage[bookmarks=true,%
bookmarksopen=true,%
bookmarksnumbered=true,%
colorlinks=true,%
linkcolor=blue]{hyperref}
\usepackage{subfig}
\makeatletter
\renewcommand{\thesubsection}{\thesection\@arabic\c@subsection}
\renewcommand{\thefigure}{\thesubsection\textit{\@alph\c@figure}}
\makeatother
\begin{document}
\begin{figure}[htbp]
\begin{center}
\subfloat{
\begin{tabular}[t]{r|ccc}
$\land$ & 1 & 2 & 3\\\hline
*1 & 1 & 2 & 3\\
2 & 2 & 2 & 3\\
3 & 3 & 3 & 3\\
\end{tabular}
}
\end{center}
\caption{{\L}ukasiewicz's 3-Valued Tables}
\label{orig_fig_2.11a}
\end{figure}
\end{document}
The problem disappears if I comment out the command
\renewcommand{\thefigure}{\thesubsection\textit{\@alph\c@figure}}
But what if I don't want to do that?
hyperref causing problems with \subfloat
My apologies, I didn't provide the style file lloydbook.cls. But the problem is replicable with the standard book class.Zardoz wrote:Ok, here it is:\documentclass[a4paper]{lloydbook}
hyperref causing problems with \subfloat
Just add
Code: Select all
\renewcommand\theHsubfigure{\theHfigure.\arabic{subfigure}}
(An alternative would be using the subcaption package instead of the subfig package, which hopefully has no problems with hyperref: http://www.ctan.org/tex-archive/macros/ ... b/caption/ . The very recent version 1.0 has also a \subfloat command inside which emulates the \subfloat command of the subfig package.)