So I've been writing my exam in Overleaf Latex (new to Latex) and I'm experienced three kinds of problems. I'll just simply state the problems then show a picture with more details:
First problem: I would like to change my font for all my references to "Times New Roman". (Purple ring)
Second problem: I would like to move the second row and rest of the rows to the red line so it aligns with the first line. (Red arrow)
Third problem: I would like to get rid of the black boxes I guess randomly in my references. (Blue arrow)
As general setup I currently work with:
\documentclass[draft]{article}
%but will change this to \documentclass[a4paper,oneside,swedish]{article} once everything is done correctly.
I use:
\usepackage[
backend = biber,
style = authoryear-comp,
citestyle = apa,
sorting=nyc,
isbn=true,
doi=true,
dashed=false,
maxbibnames=99,
uniquenames=init,
giveninits
]{biblatex}
For the first problem I have imported some .tff files for Times New Roman and applied them for a custom font like this (Files are included in the folder "Typsnitt") and they are working in normal text.
\newfontfamily\timesRoman[
Path = Typsnitt/,
Extension = .ttf,
BoldItalicFont = timesbi,
BoldFont = timesbd,
ItalicFont = timesi,
]{times}
I've also changed title and institution in references with the following:
\DeclareFieldFormat*{title}{\timesRoman\textit{#1}}
\DeclareFieldFormat{institution}{\timesRoman\textit{#1}}
And changing the size of my references with the following:
\renewcommand*{\bibfont}{\parskip=12pt\small}
For the second problem I've tried solutions like:
\setlength{\bibleftmargin}{0mm}
\setlength{\bibindent}{0mm}
But also with a list which I'm a little bit worried that this only work with natbib:
\defbibenvironment{bibliography}
{\list{}{%
\setlength\bibleftmargin=0mm
\setlength\bibindent=0mm
}}
{\endlist}
{\item}
As for the third problem my worries is that something is wrong with hyperlinks but I'm not sure. Here is my setup for that:
\hypersetup{
colorlinks = true,
linkcolor={black!50!black},
citecolor={black!50!black},
urlcolor={black!80!black}
}
I have and I've been looking a bit at this but I guess this solution is for natbib only since they use \begin{thebibliography}{0}
and
\end{thebibliography}
and not
\printbibliography
which I use.
Would be glad if someone have a good input for all this problems Kind regards
EDIT: So sorry if I used multiple questions but I thought I could wrap all my questions in with one picture (which I also forgot to include).
EDIT2: Big thanks to moewe and Skillmon for fixing my problem! First problem was solved with this:
\newcommand*{\bibfont}{\parskip=12pt\normalfont\small}
Second problem solved with this:
\setlength{\bibhang}{0pt}
Third problem solved with this:
\documentclass[a4paper,oneside,swedish]{article}
draft
option from your\documentclass
the black boxes will disappear.\newcommand*{\bibfont}{\normalfont\normalsize}
. This should reset the font to the global defaults. If the bibliography uses a different font than the rest of the document, this suggests your complete document is not written in the default font. I suggest you change the defaults, so that this is the case (how you do sthat I can't say without an MWE, I'm afraid).draft
option: tex.stackexchange.com/q/61286/35864. Fix the overfull/underfull boxes and remove thedraft
option from\documentclass[draft]{article}
.\setlength{\bibhang}{0pt}
should do that. Unless you have a large\bibitemsep
I would avoid this, since it makes it quite hard to tell where a new entry starts.