I want to make a reference in my thesis work and I want to make a link to a source using \textit

Jeffrey Hinton(2012)  
\textit{Neural Networks for Machine Learning}
[\textit{Lecture 3.4 — The backpropagation algorithm}] 

But it transformes https://github.com/mebusy/notes/blob/master/dev_notes/NeuralNetworks.md link(which is correct) to this one https://github.com/mebusy/notes/blob/master/devnotes=NeuralNetworks:md (which is incorrect. How can I fix it?

EDIT: I added \url, but then he link doesn't work:

Jeffrey Hinton(2012)  
\textit{Neural Networks for Machine Learning}
[\textit{Lecture 3.4 — The backpropagation algorithm}] 
\\\textit{\url https://github.com/mebusy/notes/blob/master/dev_notes/NeuralNetworks.md} 
  • 5
    Links should be typeset with url's/hyperref's \url command. If you insist on writing URLs in italic, set \urlstyle{same} and put an \textit around it (see tex.stackexchange.com/q/53962/35864) – moewe Jun 13 '18 at 20:24
  • @moewe I updated the post. Please have a look – Daniel Yefimov Jun 13 '18 at 20:27
  • 4
    \url is not a switch. It takes the URL as an argument (between curly braces): \textit{\url{https://github.com/mebusy/notes/blob/master/dev_notes/NeuralNetworks.md}} – moewe Jun 13 '18 at 20:28

Here's how I would rework your setup. It's basically identical to what @moewe suggests in earlier comments. Note that it's important to load both the url and the hyperref package.

enter image description here

\usepackage[colorlinks,urlcolor=blue]{hyperref} % choose a suitable color for URLs


Jeffrey Hinton (2012)  
\textit{Neural Networks for Machine Learning. 
Lecture 3.4---The backpropagation algorithm} \\ 


Incidentally, the reason

\textit{\url https:... }

doesn't work is that \url expects to get a braces-delimited argument. Because you fail to provide these braces, the argument of \url ends up being the single letter h, not the entire URL string.

  • 1
    That space in Jeffrey Hinton (2012) was much needed. And the Unicode em-dash in Lecture 3.4 — The also made me cringe... (although that might just be old habits) – moewe Jun 13 '18 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.