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 am using a latex template found here; https://drive.google.com/file/d/14TM5ME ... sp=sharing
which adheres to school guide however, I am having trouble with the following.
1. Changing bibliography styles to author year even when I define it in the main.tex file on line 13
\usepackage[round]{natbib} % Author year There is an error here
2. I am not able to use hyperref package with this class even when it is defined on lines 16 to 32 with code below;

Code: Select all

\usepackage{hyperref}   % There is an error here with using hyperref
\usepackage{cleveref}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{booktabs}
\usepackage{lineno}
\urlstyle{same}
%\usepackage{cite}
\hypersetup{
colorlinks=true,
breaklinks=true,
linkcolor=blue,
filecolor=green,
urlcolor=blue,
citecolor=blue,
bookmarksopen=true
}
\hypersetup{breaklinks=true}
Also some of the bibliography entries in references.bib have hyprefs to them and I would like to have these compile when the whole template compiles.


The attached template here is without figures but I am using .eps figures for fig1 and fig2, these are available on the google drive template here; https://drive.google.com/file/d/14TM5ME ... sp=sharing

The class file for this template is of the file name; thesismodify.cls


The aim is to have all this compile with pdflatex. I look forward to your assistance fixing this.
Attachments
template-TeX.zip
This is the TeX template, for fig1 and fig2, you can add anyfigs with .eps extensions. I couldnt upload it with the figures but the google drive template has everything all together.
(14.5 KiB) Downloaded 562 times
Last edited by Stefan Kottwitz on Fri Jun 10, 2022 2:13 pm, edited 1 time in total.
Reason: code marked

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

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

Post by Stefan Kottwitz »

Hi Ben,

in the file

there is an error here:

\renewcommand{\thepage}{\roman{page} \par
}


The \par is within \thepage that way. Move the closing brace, change it to:

\renewcommand{\thepage}{\roman{page}} \par

Regarding the bibliography: for K1 you have the line

TITLE = "\href{ }{{Continued fractions}",

You have an opening brace that's not closed. You don't need 2 anyway. Change it to

TITLE = "\href{ }{Continued fractions}",

Same for Apos.

Then it seems that natbib cannot work with the abbrv style. Instead, try for example

\bibliographystyle{apalike}

or any other you like, run bibtex and latex again.

Stefan
LaTeX.org admin
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 »

Dear Stefan,
Thank you for your response. I have made those changes but I am compiling using a make file attached and it seems I am not able to compile to due to the error. Please see attachment.
Make-file-error.PNG
Make-file-error.PNG (45.89 KiB) Viewed 19211 times
The code for the make file is here

INFILENAME = main

outfile:
latex ${INFILENAME}.tex
bibtex ${INFILENAME}.aux
latex ${INFILENAME}.tex
latex ${INFILENAME}.tex
dvips -Ppdf -G0 -ta4 ${INFILENAME}.dvi
ps2pdf -dCompatibilityLevel=1.4 -dMAxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sPAPERSIZE=a4 ${INFILENAME}.ps

Second question is that using hyperref, I would like to define the TOC and List of tables and figures using a different color while the citations, figures and references still have different colors. How would I define that.

Thanks,
Ben.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

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

Post by Stefan Kottwitz »

I would go with pdfLaTeX instead of using the way via DVI.

Such as:

Code: Select all

INFILENAME = main

outfile:
	pdflatex ${INFILENAME}.tex
	bibtex ${INFILENAME}.aux	
	pdflatex ${INFILENAME}.tex
	pdflatex ${INFILENAME}.tex
LaTeX (TeX Live) can automatically convert eps files. Or add to your preamble:

Code: Select all

\usepackage{epstopdf}
\epstopdfsetup{update}
The hyperref coloring and how to change it is explained in the hyperref manual (colorlinks, urlcolor, citecolor etc.) but if you want it more fancy than it's available, it may be difficult. Also, not sure what value coloring in various colors could really add. Finally, compare the appearance of your thesis to a good book. Do they use different colors for references to tables or figures, or do they say in normal black text font what it is instead of coloring, such as "see figure 1.2" or "see table 2.3"? For a serious looking thesis, I would do it in the same way as very serious good books.

Stefan
LaTeX.org admin
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 »

Thank you. It works.
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 »

Dear Stefan,

The eps to pdf on the make file creates an error. I am running it using the emacs editor and the update is giving an error as below;
Make-file-error-2.PNG
Make-file-error-2.PNG (29.48 KiB) Viewed 19199 times
How could I fix this.

Thanks,
Ben.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

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

Post by Stefan Kottwitz »

You can remove this line with \epstopdfsetup,

Stefan
LaTeX.org admin
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 did remove it as shown here;
error1.PNG
error1.PNG (2.58 KiB) Viewed 19191 times
But it gives a fatal error and no output.
error2.PNG
error2.PNG (3.67 KiB) Viewed 19191 times
Ben.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

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

Post by Stefan Kottwitz »

What TeX distribution (version, year) do you use? When did you install or update it? Can you post your .log file here, as attachment?

Stefan
LaTeX.org admin
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 am using Emacs that comes with the Cygwin distribution for windows and my log file is attached.

If you have any other specific instructions for running the make file on a windows console, I would like to have instructions for that.

Ben.
Attachments
main.log
(16.6 KiB) Downloaded 551 times
Post Reply