4

I made my bibliography using Biblatex:

\usepackage[backend=bibtex]{biblatex}

and it works fine except that all of the @MISC entries, which I use to cite websites, are all italicized. This would have been fine, except that the URLs cited are italicized as well, which looks horrible. Is there a simple way (package options?) to make Biblatex stop italicizing the entire entry?

Minimal Working Example:

\documentclass{article}
\usepackage[backend=bibtex]{biblatex}
\addbibresource{Bibliography.bib}
\begin{document}
Cite Book, \cite{Book}

Cite Misc, \cite{Misc}
\printbibliography
\end{document}

The file Bibliography.bib contains:

@book{Book,
  author    = {Author},
  title     = {Title},
  publisher = {Publisher},
  year      = {2014},
}

@misc{Misc,
  title = {``Title'' by Author (\url{http://tex.stackexchange.com/})}
}

The above produces:

enter image description here

I would like the entire of citation [2] to be \upshape.

Edit:

Thanks to musicman's suggestion I managed to make the URLs print upright using:

\appto{\biburlsetup}{\renewcommand*{\UrlFont}{\upshape\ttfamily}}

But it still clashes with the rest of the bibliography @MISC entry, which is italicized. Is there a way to make the whole thing not italicized?

I have also tried

\appto{\bibfont}{\upshape}

and also

\renewcommand{\bibfont}{\upshape}

But neither have any effect.

Possible Solution:

The crux of being able to make the URLs print upright seems to be the manipulation of \UrlFont:

\renewcommand*{\UrlFont}{\upshape\ttfamily}

However I cannot find \UrlFont inside the Biblatex documentation. Could there be a similar hidden command that controls the bibliography entry's font?

lockstep
  • 250,273
Herng Yi
  • 615

2 Answers2

13

Why do you write all data in the field title?

@misc{Misc, title = {``Title'' by Author (\url{https://tex.stackexchange.com/})} }

Split it up like your other bib-entry:

@misc{something,
title = {Title},
author = {author},
url = {http://text.stackexchange.com}
}

Then you can format your title (quotes instead of italic) with:

\DeclareFieldFormat{title}{\mkbibquote{#1}}

If you want to format the title for the @misc-type only, you write:

\DeclareFieldFormat[misc]{title}{\mkbibquote{#1}}

Also consider to switch to biber-backend.

musicman
  • 3,559
3

You are misusing the bibfields for the @Misc. Putting everything in title means that it gets italicised. You should really be using title, author and url.

Sample output

\documentclass{article}
\usepackage[backend=bibtex]{biblatex}
\addbibresource{Bibliography.bib}
\begin{document}
Cite Book, \cite{Book}

Cite Misc, \cite{Misc}

Cite Misc2, \cite{Misc2}
\printbibliography
\end{document}

with Bibliography.bib

@Book{Book,
  author =   {Author},
  title =    {Title},
  publisher =    {Publisher},
  year =     2014
}

@Misc{Misc,
  title =    {Title},
  author =   {Author},
  url =      {http://tex.stackexchange.com/}
}

@Misc{Misc2,
  note =     {``Title'' by Author
                  (\url{http://tex.stackexchange.com/})}
}

If you really want to force the formatting, you can use note instead of title, as in the Misc2 example above, but I would not recommend that.

Andrew Swann
  • 95,762