BibTeX, biblatex and biberbiblatex | Underlining Fields in Bibliography

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
dsdrake
Posts: 1
Joined: Wed Aug 03, 2011 5:10 pm

biblatex | Underlining Fields in Bibliography

Post by dsdrake »

Hi,

A report I'm writing requires that certain bibliography fields (e.g. book titles) are underlined. I know that some people frown on this, but in this case I have no choice - these are specific requirements for submission.

I first tried this:

Code: Select all

\DeclareFieldFormat[book]{title}{\underline{#1}}
This worked, but I don't need to repeat here the problems with \underline - it encloses everything in a horizontal box, no wrapping allowed, so long book titles don't work right.

I then tried \uline from ulem, this solves the wrapping/layout problem, but unfortunately the text is double-underlined. Why is this, and how can I avoid it? I would like a single underline only.

Thanks.

Minimal example:

Code: Select all

\documentclass[a4paper,12pt]{book}
\usepackage[normalem]{ulem}
\usepackage[style=authoryear,abbreviate=true,maxnames=2]{biblatex}
\bibliography{refs}
\DeclareFieldFormat[book]{title}{\uline{#1}}

\begin{document}

\textcite{foo}

\printbibliography

\end{document}
and refs.bib:

Code: Select all

@book{foo,
	title = "Book Title",
	author = "Book Author",
	year = "2011",
}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply