0

I am forced to use an official template for a CV, which wraps everything inside tabular environments (the rationale, I assume, being to reproduce exactly the dimensions and looks of an alternative Word template).

Anyway, the part that I'm struggling with is to include a bibliography spanning multiple pages. Is there a way to tell biblatex to insert page breaks after N items, or maybe a smarter version of longtable that does it automatically?

Here's an example where the content overflows,

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage[backend=bibtex,style=numeric]{biblatex}
\usepackage{longtable, tabu}
\tabuDisableCommands{\def\autocite{}}
\addbibresource{biblatex-examples.bib}
\begin{document}

\nocite{*}
\begin{longtabu}{|X|}
\hline
\printbibliography
\end{longtabu}
\end{document}

Edit: to clarify, I have to put everything within a frame of specific width and appearance. All the sections are typically wrapped in something like,

\begin{center}\begin{tabular}{|l|l|}
\hline \multicolumn{1}{|>{\columncolor[gray]{.8}}p{9.8 cm}}{{\bf 1e.   Total years research experience:}}   & \multicolumn{1}{|p{6.1 cm}|}{\hfill{}  \normalfont{
    xx years (PhD excluded)}}   \\
\hline
\end{tabular}\end{center}

It doesn't matter what exact environment I use (I only send the pdf output), but the frame and margins must be consistent.

  • you are using longtabu rather than longtable but either way it can not break within a single cell, you need to make each item be a separate row, but a longtable with one column does nothing, just put \end{longtable} before the bibliography and \begin{longtable} after it – David Carlisle Nov 15 '17 at 21:18
  • I still need the frame and size consistent with the rest of the document that uses tabular environments for every section (see edit). It is true that a one-column table is a bit useless, so I guess I only need to fake the appearance of a tabular environment for this particular section. – baptiste Nov 15 '17 at 21:39
1

Imho there is not really possible to squeeze \printbibliography inside a longtable: There are lots of groupings involved and they clash with the grouping of tabular cells. If you want a frame around the bibliography, use tcolorbox. It can be easily adapted to all sorts of looks:

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage[style=numeric]{biblatex}
\usepackage{longtable, tabu}
\tabuDisableCommands{\def\autocite{}}
\addbibresource{biblatex-examples.bib}
\usepackage[many]{tcolorbox}


\begin{document}

\nocite{*}
\begin{tcolorbox}[enhanced jigsaw,opacityback=0,sharp corners,breakable]
  \printbibliography
\end{tcolorbox}

\end{document}
  • I like the idea but the output I get from running this is not good: first, a blank page, then enhanced jigsaw,opacityback=0,sharp corners,breakable verbatim, and most importantly, the content doesn't change page (overflows) – baptiste Nov 16 '17 at 0:35
  • @baptiste, a small typo, change it to [enhanced jigsaw,opacityback=0,sharp corners,breakable] (square brackets instead of curly ones). – gusbrs Nov 16 '17 at 0:44
  • Sorry about the typo ;-). gusbrs is right: it should be brackets. – Ulrike Fischer Nov 16 '17 at 7:48

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.