Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to print the bibliography (using biblatex) inside the fullwidth environment. But when I place the \printbibliography command inside the fullwidth environment, every line other than the very first gets indented.

As far I as can tell, biblatex prints bibliographies as follows:

  1. The first line of each item is flushed left.

  2. Any other line of each item is indented using \bibhang.

If I simply place \printbibliography at the end of my file, I get the expected behavior:

Default behavior<code>\printbibliography</code>

If instead I place it inside a fulldiwth environment, every line in the bibliography other than the first one gets indented the same amount.

Here's a minimal example

\documentclass[nobib]{tufte-handout} 
\usepackage[style=authoryear-comp]{biblatex} 
\begin{filecontents*}{mybib5.bib} 
@MISC{Volkmann, 
  author = {Volkmann, Albert}, 
  title = {My Title}, 
  year = {2005}, 
  addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.} 
} 

@MISC{Caesar, 
  author = {Caesar, Gaius J.}, 
  title = {My long title}, 
  year = {2005}, 
  addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.} 
} 

\end{filecontents*} 
\title{Test} 
\author{Me} 
\bibliography{mybib5} 
\begin{document} 
\maketitle 
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut  aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \cite{Volkmann,Caesar} 

\begin{fullwidth} 
\printbibliography 
\end{fullwidth} 
\end{document} 

The output looks like so: Odd behavior: biblatex and fullwidth environment

If I set \parindent to 0pt right before \printbibliography, I get the same result. If instead I set \bibhang to 0pt right before \printbibliography, so that

\begin{fullwidth}
\printbibliography
\end{bibliography}

is replaced by:

\begin{fullwidth}
\bibhang=0pt
\printbibliography
\end{bibliography}

no line in the bibliography is indented:

After setting <code>\bibhang</code> to 0pt

What I can't get is the default behavior (first line of each item flushed left, every additional line indented) within the fullwidth environment.

Any thoughts?

UPDATE: I'm using version 3.5.2 of tufte-common.def.

share|improve this question
1  
My biblatex and natbib hate each other, so I can't even compile this, sorry. :) –  Frg Mar 1 '12 at 0:04
    
Might want to add that you're using a revised copy of tufe-common.def. What class layout options are you actually using? The twoside and symmetric settings complicate the problem. –  Audrey Mar 2 '12 at 17:27
    
Good point, @Audrey. Yeah, I'm using v. 3.5.2. I was not using any options; this was the behavior after compiling the files above with a clean install of v. 3.5.2. –  apc Mar 2 '12 at 22:54
add comment

1 Answer 1

up vote 8 down vote accepted

With the default tufte-latex layout, you can just extend the right margin inside the bibliography environment.

\documentclass[nobib]{tufte-handout}
\usepackage{hyphenat}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear-comp,autocite=footnote]{biblatex}

\defbibenvironment{bibliography}
  {\list{}{%
     \leftmargin\bibhang
     \itemindent-\leftmargin
     \advance\rightmargin-\marginparwidth
     \advance\rightmargin-\marginparsep
     \itemsep\bibitemsep
     \parsep\bibparsep}}
  {\endlist}
  {\item}

\addbibresource{biblatex-examples.bib}
\begin{document}
Filler text \autocite{companion,ctan,markey,aristotle:poetics,aristotle:rhetoric}.
\printbibliography
\end{document}

enter image description here

With the layout settings twoside,symmetric something like tufte-latex's fullwidth environment is needed, but it won't work if the bibliography breaks across pages. For a single bibliography contained in one page, the following should give you proper indentation inside the fullwidth environment.

\defbibenvironment{bibliography}
  {\list{}{%
     \leftmargin\bibhang
     \itemindent-\leftmargin
     \listparindent\itemindent
     \parsep\bibparsep}}
  {\endlist}
  {\item}

The more general case can be handled using the mdframed package and some spacing trickery with \AtEveryBibitem.

\documentclass[nobib,twoside,symmetric]{tufte-handout}
\usepackage{hyphenat}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear-comp]{biblatex}
\usepackage{mdframed}

\newmdenv[skipabove=3.5ex plus 1ex minus .2ex,% Equal to section title spacing
  innerleftmargin=0pt,innerrightmargin=0pt,%
  innerbottommargin=0pt,innertopmargin=0pt,linewidth=0pt,innermargin=0pt,%
  outermargin=\dimexpr-\marginparwidth-\marginparsep\relax]{mdfullwidth}

\defbibenvironment{bibliography}
  {\list{}{\parsep\bibparsep}}
  {\endlist}
  {\item}

\AtEveryBibitem{\hskip-\bibhang}

\addbibresource{biblatex-examples.bib}
\begin{document}
\null\vfill
One of the most prominent and distinctive features of this style is the
extensive use of sidenotes.\footcite{companion,ctan,markey,aristotle:rhetoric} There is a wide margin to provide ample room for sidenotes and small figures. Any footnotes will automatically be converted to sidenotes.
\begin{mdfullwidth}
\printbibliography[type=online]
\end{mdfullwidth}
\pagebreak
One of the most prominent and distinctive features of this style is the
extensive use of sidenotes.\footcite{companion,ctan,markey,aristotle:poetics} There is a wide margin to provide ample room for sidenotes and small figures. Any footnotes will automatically be converted to sidenotes.
\begin{mdfullwidth}
\printbibliography[nottype=online]
\end{mdfullwidth}
\end{document}

enter image description here enter image description here

share|improve this answer
    
Works like a charm. Thanks! –  apc Mar 6 '12 at 17:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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