1

I am using biblatex-ext and longtable for typesetting a bib-based references table. For a better overview, I want to seperate the individual rows with rules and print a bold rule at the bottom as well. Due to aesthetic reasons, I reformatted the reoccuring rules as well and made them thinner and grey.

Unfortuately, the row seperator rule is also printed after the last row, just before the extra bottom rule:

current output result

From the biblatex-ext manual, there is no obvious option to distinguis any rows (e.g. even/odd rows): \defbibtabular{⟨name⟩}{⟨begin code⟩}{⟨end code⟩}{⟨row code⟩}.

How can I either

  • rearrange the whole rule-formatting code such that it fits into the biblatex-ext-tabular environment or
  • detect whether the row is the last row in the table (and hence omit the rule output) to avoid the double line at the end of my table?

MWE:

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel,csquotes}
\usepackage[backend=biber, style=authoryear]{biblatex}
\usepackage{biblatex-ext-tabular}

\usepackage{longtable,array,booktabs} \usepackage{xcolor,colortbl}

\defbibtabular{bibtabular} {\begin{longtable}{@{}lll@{}} \toprule \textbf{Author} & \textbf{Title} & \textbf{Year}\ \midrule[\heavyrulewidth]\endhead% \arrayrulecolor{black!30}%--prepare color for all midrules } {\arrayrulecolor{black}\bottomrule \end{longtable}} {\anchorlang{\usebibmacro{author/editor+others}} & \plainlang{\usebibmacro{title}} & \plainlang{\printdate} \\midrule[0.3pt]}

\begin{filecontents}{\jobname.bib} @Book{Miller1832a, author = {John Miller}, title = {Elementary book}, year = {1832}, } @inbook{Smith1744a, author = {Daniel Smith}, booktitle = {Collection of important articles}, title = {Noteworthy Article}, year = {1744},
} \end{filecontents
} \addbibresource{\jobname.bib}

\begin{document} \nocite{*} \printbibtabular \end{document}

PS: This MWE is copied (and modified) from here

kromuchi
  • 2,187

1 Answers1

0

I dirty fix would be to add another last (and empty) row, but with negative row height such that the bold bottomrule line is just printed above the thin gray midrule line. It's not a nice solution, but it works:

enter image description here

Here the patched MWE (just must run it 2 or 3 times for the final result):

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel,csquotes}
\usepackage[backend=biber, style=authoryear]{biblatex}
\usepackage{biblatex-ext-tabular}

\usepackage{longtable,array,booktabs} \usepackage{xcolor,colortbl}

\defbibtabular{bibtabular} {\begin{longtable}{@{}lll@{}} \toprule \textbf{Author} & \textbf{Title} & \textbf{Year}\ \midrule[\heavyrulewidth]\endhead% \arrayrulecolor{black!30}%--prepare color for all midrules } {\[-0.6cm]\arrayrulecolor{black}\bottomrule \end{longtable}} {\anchorlang{\usebibmacro{author/editor+others}} & \plainlang{\usebibmacro{title}} & \plainlang{\printdate} \\midrule[0.3pt]}

\begin{filecontents}{\jobname.bib} @Book{Miller1832a, author = {John Miller}, title = {Elementary book}, year = {1832}, } @inbook{Smith1744a, author = {Daniel Smith}, booktitle = {Collection of important articles}, title = {Noteworthy Article}, year = {1744},
} \end{filecontents
} \addbibresource{\jobname.bib}

\begin{document} \nocite{*} \printbibtabular \end{document}

kromuchi
  • 2,187