2

I have following problem:

in my main.bib I have this article:

@article{tableviewvideo,
  title={Swift UITableView Tutorial with Custom Cells - Beginner Series},
  author={Allen, S},
  year={2017},
  journal={YouTube, https://www.youtube.com/watch?v=FtO5QT2D_H8&t}
}

Here yous see how I overcame two problems:

  1. "[...]O5QT2D_[...]" inside the URL is a underscore LaTeX can't handle these as I found out so I replaced that with "\_", that works fine so far.
  2. Next Error I get just after that in the same URL the following "&"-symbol. Did same thing also "\&" then it works.

So these errors are resolved, but by resolving these two you get another two errors which I hope somebody can help me with:

  1. Because of the "\_" it gets displayed as a real underscore in the PDF, but if you click the link in the PDF the link ends there where the "\" begins, so it doesn't work. Also when you copy the link and paste it you get the full link but without the "_" but a whitespace (" "), which again messes up the link. Although printed out these issues are non-existent.
  2. When using "\&" it doesn't throw an error anymore but you get this weird icon below (1) as "&" sign which I do not recognize, how to overcome this?

This weird icon replaces the "\&":

The Symbol You get with "\&"

Can someone help me resolve these annyoing errors. It's really strange and difficult to find out.

Thanks in advance!

2
  • 2
    Welcome to TeX.SX! This is happening because you are using an URL in an article title, which doesn't make much sense. Use the url field in your bib entry and then the URL will be properly formatted. Also, don't use @article because that's not an article. Try @online or @misc. And the weird symbol you see is an italic & (try \textit{\&} in the document to see). Again, this symbol should disappear once you use the proper field for the URL Feb 6, 2020 at 18:41
  • @PhelypeOleinik - The OP's setup suffers from an even deeper-seated problem: It's not appropriate to use the @article entry type for the entry at hand. I've posted an answer in which I propose the OP use the @misc entry type instead -- and place the URL string in a field called url.
    – Mico
    Feb 6, 2020 at 19:06

2 Answers 2

3

Using the @article entry type for the entry at hand is not appropriate. The @article entry type should be used exclusively for pieces published in scholarly journals. Sorry, but YouTube does not -- or at least not yet! -- qualify as a scholarly journal.

I therefore suggest you use the @misc entry type, as follows:

@misc{tableviewvideo,
  title  = {Swift {UITableView} Tutorial with Custom Cells---{Beginner} Series},
  author = {Allen, Sean},
  year   = {2017},
  howpublished={YouTube},
  url    = {https://www.youtube.com/watch?v=FtO5QT2D_H8&t},
}

This setup assumes that your document employs either biblatex or BibTeX along with a bibliography style which recognizes a field called url. If that is not the case, I suggest you change the field to

  note   = {\url{https://www.youtube.com/watch?v=FtO5QT2D_H8&t}},

and load either the url or, better yet, the xurl package; the latter package allows arbitrary line breaks in URL strings.

1
  • 1
    Thank you very much! Worked well!
    – Bot Raid
    Feb 7, 2020 at 16:59
1

You need to use the hyperref package, and state your URLs by using \url{...}. That gives you links in your PDF, and furthermore allows you to write e.g. '_' and '%' normally

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .