2

I am new to latex and trying to make the document. I am using the biblatex to create Bibliography chapter. I am able to get the bibliography list but for some reason the displayed url comes with spaces in Bibliography due to which the URL do not act as the hyperlink. Although when URLs are short such as https://google.com then it works correctly as the URL is displayed in single line but when the URL spans multiple lines then they do not work.

Also I am facing one more issue when I click on the [1 p.1] in the cited section it does not take me to the bibliography section for some reason. Can someone please help me know to resolve the issue. I tried searching but could not find the resolution hence posting the same.

My bibliography example:

@misc{1,
    AUTHOR      =   "John Mortimer Logsdon",
    TITLE       =   "Why space science and exploration benefit everyone",
    MONTH       =   "August",
    YEAR        =   "1998",
    url         =   "https://www.researchgate.net/publication/222505708_Why_space_science_and_exploration_benefit_everyone",
    urldate     =   "2020-08-25",
},

I have used the packages \usepackage{hyperref} and \usepackage[hyphens]{url} and \usepackage{url} but still no luck.

Following is my code, I am just posting the sample code as I am using the template provided my advisor for making the document.

\documentclass[a4paper,
               final,
               draft,
%               oneside,    % einseitiges Layout für kleinere Arbeiten
               12pt]{book}
\usepackage{url}
\usepackage[
  backend=biber,
  style=ieee,
  urldate=long, 
  dateabbrev=false
]{biblatex}
\addbibresource{literatur.bib} 
\usepackage{hyperref}
\usepackage[a-1b]{pdfx}

\begin{document} It stars with one thing, I don't know why \cite[p.~1]{1}. \end{document}

The URL looks something like this in Bibliography section: enter image description here

https:/ /www. researchgate.net /publication/ 222505708_ Why_ space_science _and_exploration_benefit_everyone
  • 3
    Have you tried turning off the "draft" option? That might disable the links. – gmvh Oct 09 '20 at 13:47
  • You mean in the overleaf compile FAST (draft)? Actually I tried downloading the PDF then tried to access them but still no luck the links either do not work or they work only till certain chapraters where there is no spaces due to which I get page not found error. – BATMAN_2008 Oct 09 '20 at 13:50
  • 1
    I mean in the \documentclass. – gmvh Oct 09 '20 at 13:51
  • 1
    @gmvh Thanks a lot man. Removing the draft worked. I was searching from about 1 hour. Tried all sort of things. Thanks again. – BATMAN_2008 Oct 09 '20 at 14:11
  • 3
    If the draft option is turned on, hyperref does not generate any links. If you can click the URL and are sent to some site then that is a heuristic in your PDF viewer and not a hyperref feature. It is not inconceivable that the heuristics don't get this URL right due to the line breaks. If you remove the draft option, hyperref becomes active, does its thing and properly links the URL. – moewe Oct 09 '20 at 14:29
  • 1
    Note that in any case it is odd to give both the final and draft option at the same time. In a way final is the opposite of draft. (Though I would use neither in the actual final version of my document unless explicitly required by some odd configuration.) – moewe Oct 09 '20 at 14:30
  • Thanks @moewe What does FINAL do actually is there any difference if I remove both of them and just keep \documentclass[a4paper,12pt]{book}? Also, I am seeing one more problem my even page contents are a bit left aligned compared to odd page contents which are properly center aligned. Since I am using the template provided already I am unable to figure out what exactly is wrong. – BATMAN_2008 Oct 09 '20 at 15:36
  • In this example final does nothing, since it is overridden by the draft that comes later. I'd just remove both and be done with it. That is usually the best course of action. But if you have a very weird setup, load odd configuration code you have no control over or have to use badly coded packages, you may need final after all. – moewe Oct 09 '20 at 15:43
  • 1
    By default (i.e. unless you use oneside), book should use a setup for two-sided printing with mirrored margins for even and odd pages (larger outer margin and smaller inner margin). If you don't want that (e.g. because you don't print your document or only print it one-sided), you may want to activate the oneside option. See also https://tex.stackexchange.com/q/482568/35864 – moewe Oct 09 '20 at 15:44
  • @moewe Thanks for the response. I checked answer, I was having \\ for adding the space between paragraph which I removed now and my header consists of one \documentclass[a4paper,12pt]{book} but still I am seeing that even pages are centred properly and odd pages are little bit left-aligned. Am I missing something from your answer? I feel like I have checked and corrected everything. – BATMAN_2008 Oct 09 '20 at 19:08
  • In that case I'm out of ideas for now. I suggest you to ask a new question with a short example document that reproduces the effect you are seeing. – moewe Oct 10 '20 at 07:33
  • @gmvh Do you want to type up a quick answer here, so the question can be marked as solved? – moewe Oct 10 '20 at 09:36
  • @moewe ok, done. – gmvh Oct 10 '20 at 13:45

1 Answers1

4

The problem is with the "draft" option to \documentclass, which disables links in hyperref.

gmvh
  • 345