LaTeX forum ⇒ Theses, Books, Title pagesBibliography not compatible with author year and hyperefs not working with class file.

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
byn
Posts: 24
Joined: Fri Jun 10, 2022 12:27 pm

Bibliography not compatible with author year and hyperefs not working with class file.

Postby byn » Tue Jun 14, 2022 4:04 am

I tried both ways, using the \usepackage{subfigure}, got same error and using the package, \usepackage{subfig} fot this error;
subfig.PNG
subfig.PNG (2.27 KiB) Viewed 187 times


How do I rectify this?

Also my question about the appendices, and deleting blank pages, when inserting landscape pages.

Ben.

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net
LaTeX Beginner's Guide LaTeX Cookbook
rais
Posts: 320
Joined: Sun Nov 16, 2014 8:51 pm

Bibliography not compatible with author year and hyperefs not working with class file.

Postby rais » Tue Jun 14, 2022 7:02 pm

byn wrote:I tried both ways, using the \usepackage{subfigure}, got same error

"passing the subfigure option to package tocloft" is usually done by
\usepackage[subfigure]{tocloft}

byn wrote: and using the package, \usepackage{subfig} fot this error;
subfig.PNG

How do I rectify this?

I didn't specify that the subfig package would provide the same commands as the subfigure package did. I did give you a direct link to its documentation, though.

KR
Rainer

byn
Posts: 24
Joined: Fri Jun 10, 2022 12:27 pm

Bibliography not compatible with author year and hyperefs not working with class file.

Postby byn » Tue Jun 14, 2022 8:05 pm

I still get the same error.

rais
Posts: 320
Joined: Sun Nov 16, 2014 8:51 pm

Bibliography not compatible with author year and hyperefs not working with class file.

Postby rais » Thu Jun 16, 2022 6:28 pm

This one throws the error
! LaTeX Error: Command \c@lofdepth already defined.
               Or name \end... illegal, see p.192 of the manual.
:
\documentclass{article}
\usepackage{graphicx}
\usepackage{tocloft}
\usepackage{subfigure}
\begin{document}
\begin{figure}[h]
\centering
\subfigure[Subfigure caption 1]
{\includegraphics[width=135pt,height=135pt]{example-image-a}
\label{fig:sub1}
}
\subfigure[Subfigure caption 2]{ \includegraphics[width=135pt,height=135pt]{example-image-b}
\label{fig:sub2}}
\end{figure}
\end{document}

This one doesn't:
\documentclass{article}
\usepackage{graphicx}
\usepackage[subfigure]{tocloft}
\usepackage{subfigure}
\begin{document}
\begin{figure}[h]
\centering
\subfigure[Subfigure caption 1]
{\includegraphics[width=135pt,height=135pt]{example-image-a}
\label{fig:sub1}
}
\subfigure[Subfigure caption 2]{ \includegraphics[width=135pt,height=135pt]{example-image-b}
\label{fig:sub2}}
\end{figure}
\end{document}

nor does this one:
\documentclass{article}
\usepackage{graphicx}
\usepackage{tocloft}
\usepackage{subfig}
\begin{document}
\begin{figure}[h]
\centering
\subfloat[Subfigure caption 1]
{\includegraphics[width=135pt,height=135pt]{example-image-a}
\label{fig:sub1}
}
\subfloat[Subfigure caption 2]{ \includegraphics[width=135pt,height=135pt]{example-image-b}
\label{fig:sub2}}
\end{figure}
\end{document}

KR
Rainer

byn
Posts: 24
Joined: Fri Jun 10, 2022 12:27 pm

Bibliography not compatible with author year and hyperefs not working with class file.

Postby byn » Thu Jun 16, 2022 8:02 pm

I still have an error with my template. This works outside my template but merging it in my template still gives the same error.

rais
Posts: 320
Joined: Sun Nov 16, 2014 8:51 pm

Bibliography not compatible with author year and hyperefs not working with class file.

Postby rais » Thu Jun 16, 2022 9:08 pm

Don't try to load tocloft more than once...
Instead, modify the line
\usepackage[titles]{tocloft}
in your main.tex file to
\usepackage[subfigure,titles]{tocloft}

Then again, I have no idea what exactly you did try...
Perhaps try to shrink your template down to a Infominimal working example so you can demonstrate your problem--if the stuff above doesn't help, that is.

KR
Rainer

byn
Posts: 24
Joined: Fri Jun 10, 2022 12:27 pm

Bibliography not compatible with author year and hyperefs not working with class file.

Postby byn » Fri Jun 17, 2022 1:26 am

The template is here; https://drive.google.com/file/d/14TM5ME ... sp=sharing

and my questions are here;

I installed TeXlive and TeXstudio as the editor. It is working fine however I have some errors when it comes to including subfigures from the code below, even when the class is defined, \usepackage{subfigure}, it gives a conflicting error with the class.

\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\subfigure[Subfigure caption 1]
{\includegraphics[width=135pt,height=135pt]{fig1.eps}
\label{fig:sub1}
}
\subfigure[Subfigure caption 2]{ \includegraphics[width=135pt,height=135pt]{fig2.eps}
\label{fig:sub2}}
\subfigure[Subfigure caption 3] {\includegraphics[width=135pt,height=135pt]{fig1.eps}
\label{fig:sub3}}

\vspace{-0.35cm}
\end{minipage}\\

\begin{minipage}{\linewidth}
\centering
\subfigure[Subfigure caption 4]
{\includegraphics[width=135pt,height=135pt]{fig1.eps}
\label{fig:sub4}
}
\subfigure[Subfigure caption 5]{ \includegraphics[width=135pt,height=135pt]{fig2.eps}
\label{fig:sub5}}
\subfigure[Subfigure caption 6] {\includegraphics[width=135pt,height=135pt]{fig1.eps}
\label{fig:sub6}}

\vspace{-0.35cm}
\end{minipage}%
\caption{Caption of the figure} \label{fig:subfigure}

\end{figure}

Problem 2 is with including tables in appendix as landscape , gives an error with class and doesnt compile even when \usepackage{longtable} is defined. See code below.

\begin{landscape}
\begin{longtable}{p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{5cm}p{4cm}p{5cm}}
\caption{Caption}
\label{label}\\
\hline
\textbf{Chapter}&\textbf{Page}&\textbf{Figure
No.}&\textbf{Caption}&\textbf{Legend}&\textbf{Graph
Type}&\textbf{Description}&\textbf{Data} &\textbf{Comments} \\
\hline
\endfirsthead
\hline
\textbf{Chapter}&\textbf{Page}&\textbf{Figure No.}&\textbf{Caption}&\textbf{Legend}&\textbf{Graph Type}&\textbf{Description}&\textbf{Data}
&\textbf{Comments} \\
\hline
\endhead
\hline \multicolumn{9}{r}{\emph{Continued on next page}}
\endfoot
%\hline
\endlastfoot

...
data...
& & & & & & & & \\
...

\end{longtable}
\end{landscape}


Third problem is when I create other landscapes in appendix, it creates empty pages, how do you get rid of this?



Ben.


Return to “Theses, Books, Title pages”

Who is online

Users browsing this forum: No registered users and 4 guests