2

Is there a way to (robustly) push biblatex footnote citations to the margin?

I tried

\usepackage{sidenotes}
\renewcommand*{\footnote}[1]{\sidenote{#1}}

but I get sometimes ugly effects as shown in the MWE:

enter image description here

% !TEX TS-program = xelatex
% !TEX encoding = UTF-8 Unicode
% !TeX TXS-program:bibliography = txs:///biber
\documentclass[a4paper,twoside]{scrbook}

% packages
\usepackage{blindtext}
\usepackage{hyperref}

% bib-file
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
  @book{Knu86,
    author = {Knuth, Donald E.},
    year = {1986},
    title = {The \TeX book},
  }
    @BOOK{KandR,
      AUTHOR    = {Kernighan, Brian W. and Ritchie, Dennis M.},
      TITLE     = {{The C Programming Language Second Edition}},
      PUBLISHER = {Prentice-Hall, Inc.},
      YEAR      = {1988},
    }  
@article{greenwade93,
    author  = "George D. Greenwade",
    title   = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
    year    = "1993",
    journal = "TUGBoat",
    volume  = "14",
    number  = "3",
    pages   = "342--351"
}

@book{goossens93,
    author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
    title     = "The LaTeX Companion",
    year      = "1993",
    publisher = "Addison-Wesley",
    address   = "Reading, Massachusetts"
}   
\end{filecontents}

% biber
\usepackage[backend=biber,bibencoding=utf8,
    bibstyle=philosophy-classic,
    citestyle=authortitle-icomp,
    hyperref,
    firstinits=true,    
    isbn=false,
    dashed=false,
    backref,
    sortcites=true, 
    url=false, 
    doi=false, 
    dateabbrev=false,
    scauthorsbib=true,  
]{biblatex}
\addbibresource{\jobname}

% layout
\usepackage[a4paper,
    showframe,
    top=3cm,
    bottom=3cm,
    innermargin=2.5cm,
    textwidth=336pt,
    textheight=750pt,
    marginparwidth=5cm,
    marginparsep=1cm,
    heightrounded,
]{geometry}

% footnotes to sidenote
\usepackage{sidenotes}
\renewcommand*{\footnote}[1]{\sidenote{#1}}


% doc
\begin{document}
\blindtext
\autocite{Knu86}
\autocite{Knu86}
\autocite{Knu86}
\blindtext[3]
sed elit sit amet ante lobortis sollicitudin. Praesent
blandit blandit mauris. Praesent lectus tellus, aliquet aliquam, luctus
a, egestas a, turpis. Mauris lacinia lorem sit amet ipsum. Nunc ia lorem sit amet 
pis. Mauris lacinia lorem sit amet ipsum. Nunc ia lorem sit amet  sit amet  lorem sit
\autocite{KandR,greenwade93,goossens93}

\printbibliography
\end{document}
Manuel Schmidt
  • 3,537
  • 1
  • 19
  • 33

1 Answers1

2

I don't know if this will solve all such issues, but simply adding

\usepackage{marginfix}

package solves the problem in your MWE at least.

Sidenote: with some exceptions -- see Which packages should be loaded after hyperref instead of before? -- hyperref should be the last package in your preamble.

enter image description here

\documentclass[a4paper,twoside]{scrbook}

% packages
\usepackage{blindtext}

% bib-file
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
  @book{Knu86,
    author = {Knuth, Donald E.},
    year = {1986},
    title = {The \TeX book},
  }
    @BOOK{KandR,
      AUTHOR    = {Kernighan, Brian W. and Ritchie, Dennis M.},
      TITLE     = {{The C Programming Language Second Edition}},
      PUBLISHER = {Prentice-Hall, Inc.},
      YEAR      = {1988},
    }  
@article{greenwade93,
    author  = "George D. Greenwade",
    title   = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
    year    = "1993",
    journal = "TUGBoat",
    volume  = "14",
    number  = "3",
    pages   = "342--351"
}

@book{goossens93,
    author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
    title     = "The LaTeX Companion",
    year      = "1993",
    publisher = "Addison-Wesley",
    address   = "Reading, Massachusetts"
}   
\end{filecontents}

% biber
\usepackage[backend=biber,bibencoding=utf8,
    bibstyle=philosophy-classic,
    citestyle=authortitle-icomp,
    hyperref,
    firstinits=true,    
    isbn=false,
    dashed=false,
    backref,
    sortcites=true, 
    url=false, 
    doi=false, 
    dateabbrev=false,
    scauthorsbib=true,  
]{biblatex}
\addbibresource{\jobname}

% layout
\usepackage[a4paper,
    showframe,
    top=3cm,
    bottom=3cm,
    innermargin=2.5cm,
    textwidth=336pt,
    textheight=750pt,
    marginparwidth=5cm,
    marginparsep=1cm,
    heightrounded,
]{geometry}

% footnotes to sidenote
\usepackage{sidenotes,marginfix}
\renewcommand*{\footnote}[1]{\sidenote{#1}}

\usepackage{hyperref}

% doc
\begin{document}
\blindtext
\autocite{Knu86}
\autocite{Knu86}
\autocite{Knu86}
\blindtext[3]
sed elit sit amet ante lobortis sollicitudin. Praesent
blandit blandit mauris. Praesent lectus tellus, aliquet aliquam, luctus
a, egestas a, turpis. Mauris lacinia lorem sit amet ipsum. Nunc ia lorem sit amet 
pis. Mauris lacinia lorem sit amet ipsum. Nunc ia lorem sit amet  sit amet  lorem sit
\autocite{KandR,greenwade93,goossens93}

\printbibliography
\end{document}
Torbjørn T.
  • 206,688