2

I have two questions/problems for which I couldn't find any solution:

1) For some reason, I cannot use the same code for these two internet sources:

@misc{EvansHBR,
author = {Evans, David S. and Schmalensee, R.},
title = {Why Winner-Takes-All Thinking Doesn't Apply to the Platform Economy},
howpublished = {https://hbr.org/2016/05/why-winner-takes-all-thinking-doesnt-apply-to-silicon-valley},
year = {2016},
note = {[2016.11.03]}

and

@misc{EC1,
author = {{European Commission}},
title = {Prohibition Decision (Art. 101 Ex 81)},
howpublished = {\url{http://ec.europa.eu/competition/antitrust/cases/dec_docs/34579/34579_1889_2.pdf}},
year = {2007},
note = {[2016.12.15]}

Notice how the second one has \url in howpublished. When I try to remove it (and the appropriate { and }), I get this error: enter image description here

If possible, I would like to remove the URL from all my internet sources, as this makes the text stand out in a way which I don't like. Any ideas what is causing this error?

This is what I use:

\documentclass[12pt]{article}
\usepackage{natbib,setspace,amsmath,graphicx,float}
\usepackage{url}
\usepackage{changepage}
\usepackage{natbib}
\usepackage{times} 
\onehalfspacing

\begin{document}
\bibliography{sqwg2}
\bibliographystyle{apalike}
\end{document}

And here the .bib file.

  • 1
    If you use biblatex you should use url = {https://hbr.org/2016/05/why-winner-takes-all-thinking-doesnt-apply-to-silicon-valley}, If you don't like how the URLs stand out because they are in typewriter font use something like \urlstyle{same} (see here for more on this). (You should always treat URLs as URLs!) For your second question I would need to see a full MWE of your document - the solution (and whether mergedate is available) depends very much on the style you use. – moewe Dec 22 '16 at 8:11
  • 1
    Also: For future reference: try and ask only one question per question. The two issues you raise here are only tangentially related and could easily be separated into two questions making it easier for others with the same problem to find the solution and for those trying to help you answer the question if they can only answer one. – moewe Dec 22 '16 at 8:12
  • Thanks for splitting off the other question. It would still be great to have a full MWE so we can see what biblatex style you use and check that our solutions work. – moewe Dec 22 '16 at 8:20
  • Thank you @moewe - I edited the question and will open another one for the 2nd question. Regarding the url = {hbr.org/2016/05/why-winner-takes-all-thinking-doesn‌​t-apply-to-silicon-v‌​alley}, when I use this, it ignores the "url" entry. Full MWE is coming, will need to filter a lot of things I think, since a lot it not needed for the bibtex. – Malganas Dec 22 '16 at 8:22
  • Please clarify if you use biblatex (as your tagging and title both suggest) or if you are using BibTeX (note the absence of 'la') as your last comment and the picture of the error message seem to suggest. If you really use BibTeX and not biblatex, please retag your question accordingly and correct the title. My answer below assumed you use biblatex, I will remove or edit it if it is not applicable. – moewe Dec 22 '16 at 8:32
6

You shouldn't have bare URLs lying round in your document. URLs may contains special characters that cause problems for TeX. Your first example URL is fine, but the second one contains _ which is special for TeX.

So with your bibliography style and the howpublished field you definitely need the \url{...} (from the url package) in the second example, and you should have it in the first example as well.

@misc{EvansHBR,
  author       = {Evans, David S. and Schmalensee, R.},
  title        = {Why Winner-Takes-All Thinking Doesn't Apply to the Platform Economy},
  year         = {2016},
  howpublished = {\url{https://hbr.org/2016/05/why-winner-takes-all-thinking-doesnt-apply-to-silicon-valley} [{2016-11-03]},
}

@misc{EC1,
  author       = {{European Commission}},
  title        = {Prohibition Decision (Art. 101 Ex 81)},
  year         = {2007},
  howpublished = {\url{http://ec.europa.eu/competition/antitrust/cases/dec_docs/34579/34579_1889_2.pdf} [2016-12-15]},
}

If you were to use biblatex, however, you shouldn't use howpublished for the URL and note for the date of access. biblatex has dedicated fields for URLs, DOIs and the access date: doi, url, urldate, ... Those fields should contain the bare URI without additional markup. In particular there you should not use \url.

@misc{EvansHBR,
  author  = {Evans, David S. and Schmalensee, R.},
  title   = {Why Winner-Takes-All Thinking Doesn't Apply to the Platform Economy},
  year    = {2016},
  url     = {https://hbr.org/2016/05/why-winner-takes-all-thinking-doesnt-apply-to-silicon-valley},
  urldate = {2016-11-03},
}

@misc{EC1,
  author  = {{European Commission}},
  title   = {Prohibition Decision (Art. 101 Ex 81)},
  year    = {2007},
  url     = {http://ec.europa.eu/competition/antitrust/cases/dec_docs/34579/34579_1889_2.pdf},
  urldate = {2016-12-15},
}

If you don't like the typewriter font you get for URLs by default, refer to Why are URLs typeset with monospace fonts by default? and use for example \urlstyle{same}.

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.