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: 56
Joined: Fri Jun 10, 2022 12:27 pm

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

Post by byn »

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 15410 times
How do I rectify this?

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

Ben.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

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

Post by rais »

byn wrote:I tried both ways, using the \usepackage{subfigure}, got same error
"passing the subfigure option to package tocloft" is usually done by

Code: Select all

\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: 56
Joined: Fri Jun 10, 2022 12:27 pm

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

Post by byn »

I still get the same error.
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

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

Post by rais »

This one throws the error

Code: Select all

! LaTeX Error: Command \c@lofdepth already defined.
               Or name \end... illegal, see p.192 of the manual.
:

Code: Select all

\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:

Code: Select all

\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:

Code: Select all

\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: 56
Joined: Fri Jun 10, 2022 12:27 pm

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

Post by byn »

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: 419
Joined: Sun Nov 16, 2014 8:51 pm

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

Post by rais »

Don't try to load tocloft more than once...
Instead, modify the line

Code: Select all

\usepackage[titles]{tocloft}
in your main.tex file to

Code: Select all

\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: 56
Joined: Fri Jun 10, 2022 12:27 pm

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

Post by byn »

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.

Code: Select all

\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.
Post Reply