# Dash instead of author name on first entry of even page in the bibliography

I'm finishing a document in the book class, using biblatex with authoryear style. I'm also using the default behavior of the style to let biblatex replace repeated author names in different entries with a dash.

Usually, when printing the bibliography, biblatex reprints the author name on the top of an even page, even when it continues a series of repeated instances of the same author entries from the previous page. Which is important, otherwise the reader must go back one page to know the author of that entry.

However, in one instance of my document, this behavior fails. Apparently, what happens is that the last entry of the previous (odd) page is broken and extends to the following (even) page and thus the following entry, which is the first whole one in the (even) page, has the author name replaced with a dash. As a matter of fact, as I'm working with a long list of references of the same author, I get a whole pair of facing pages with just dashes and no author names.

I'm aware that I could recur to the option dashed=false and make the issue vanish. But I'd like to keep the dash substitution if possible. Any ideas on how to solve or circumvent this problem?

Edit: As requested in the comments I include a MWE of the problem:

\documentclass{book}

\usepackage[papersize={140mm,210mm}, inner=26mm, outer=18mm, top=15mm, bottom=48mm]{geometry}
\usepackage[bibstyle=authoryear,citestyle=authoryear-comp,backend=biber,sorting=nyt]{biblatex}
\usepackage{filecontents}

\begin{filecontents*}{MWE.bib}
@book{AndoFisherSimon1963,
keywords = {Simon},
author = {Albert Ando and Franklin Fisher and Herbert A. Simon},
title = {Essays on the structure of social science models},
date = {1963},
publisher = {The MIT Press},
location = {Cambridge, MA},
langid = {english},
}

@article{HawkinsSimon1949,
keywords = {Simon},
author = {David Hawkins and Herbert A. Simon},
title = {Note: Some conditions of macroeconomic stability},
journaltitle = {Econometrica},
date = {1949},
volume = {17},
pages = {245--248},
langid = {english},
}

@book{HMMS1960,
keywords = {Simon},
author = {Charles C. Holt and Franco Modigliani and John F. Muth and Herbert A. Simon},
title = {Planning production, inventories, and work force},
date = {1960},
publisher = {Prentice-Hall},
location = {Englewood Cliffs},
langid = {english},
}

@book{MarchSimon1958,
keywords = {Simon},
author = {James G. March and Herbert A. Simon},
title = {Organizations},
date = {1958},
publisher = {John Wiley and Sons},
location = {New York},
langid = {english},
}

@book{NewellSimon1972,
keywords = {Simon},
author = {Allen Newell and Herbert A. Simon},
title = {Human problem solving},
date = {1972},
publisher = {Prentice-Hall},
location = {Englewood Cliffs, NJ},
langid = {english},
}

@book{Simon1947,
keywords = {Simon},
author = {Herbert A. Simon},
date = {1947},
subtitle = {A study of decision-making processes in administrative organization},
edition = {1\textsuperscript{st} ed.},
publisher = {The Macmillan Company},
location = {New York},
langid = {english},
}

@article{Simon1952,
keywords = {Simon},
author = {Herbert A. Simon},
title = {On the definition of the causal relation},
journaltitle = {Journal of Philosophy},
date = {1952},
volume = {49},
month = {July 31},
pages = {517-528},
langid = {english},
}

@book{Simon1957,
keywords = {Simon},
author = {Herbert A. Simon},
title = {Models of man, social and rational},
date = {1957},
subtitle = {Mathematical essays on rational human behavior in a social setting},
publisher = {John Wiley and Sons},
location = {New York},
langid = {english},
}

@inbook{Simon1953a,
keywords = {Simon},
author = {Herbert A. Simon},
title = {Causal ordering and identifiability},
booktitle = {Studies in econometric method},
date = {1953},
editor = {W. C. Hood and J. C. Koopmas},
publisher = {Wiley},
location = {New York},
langid = {english},
}

@article{Simon1953b,
keywords = {Simon},
author = {Herbert A. Simon},
title = {Notes on the observation and measurement of political power},
journaltitle = {Journal of Politics},
date = {1953},
volume = {15},
month = {November},
pages = {500--516},
langid = {english},
}

@article{Simon1954a,
keywords = {Simon},
author = {Herbert A. Simon},
title = {Spurious correlation: a causal interpretation},
journaltitle = {Journal of the American Statistical Association},
date = {1954},
volume = {49},
month = {September},
pages = {467--479},
langid = {english},
}
\end{filecontents*}

\begin{document}

\nocite{*}

\chapter*{Referências\markboth{\MakeUppercase{Referências}}{}}
\printbibliography[heading=subbibintoc,title={Trabalhos de Herbert A.\ Simon}, keyword=Simon]

\end{document}


Under this MWE I get the same issue:

• I know it might be a pain with a long document, but could you possible come up with an MWE that reproduces the issue? You might want to have a look at the pagetracker option, especially the values page and spread. – moewe May 12 '16 at 16:02
• Thank you for your comment @moewe. I tried to change the pagetracker option. With the page value I did get the author name on the first entry of the next (odd) page. But no change at all with either value on the even page in question. I'll edit the post to include a MWE. – gusbrs May 12 '16 at 16:57
• Looks like all the \textcites in your bibliography are the culprits. The citation to Simon (1957) in the first line of your screenshot is the first citation/bib item on that page, so the next line that starts is not treated as being the first on the page. – moewe May 13 '16 at 5:18
• You are correct. I substituted the \textcite of the problematic entry for the corresponding plain text and the problem vanished. And that offers me a nice and simple workaround. Thanks! Still, I do not quite get why should the \textcite count as the first bibliography entry in the page. – gusbrs May 13 '16 at 10:33
• Mhh, yes the page tracking mechanism tracks citations and bibliography entries alike. In this instance that really is counter-intuitive. You can of course file a feature request/bug report with the biblatex maintainer and ask for his input (on the biblatex github). Be aware though, that calls to citation commands in the bibliography are often seen as a bit "meh" and that use of other features such as the related field could be preferable here. – moewe May 13 '16 at 12:15

biblatex's page tracker tracks citations and bibliography entries alike. In your problematic example you will find that the entry that goes over to the next page contains a citation. This citation will be the first biblatex instance on that page so that the first bibliography entry entirely on that page is not recognised as the first instance on that page.

Using \cite commands in the bibliography is often considered a bit "meh". In this case you could probably work around using \textcite using the related feature (you would have to find a way to give the pages explicitly).

• I will say though that I can see a point in tracking citations and bibliography items separately for the page tracker, so that could be worth a feature request, if it comes up more often. I have no idea though how easy that could be implemented. – moewe May 16 '16 at 7:38
• I addressed the problem by changing the way I was making references, so that I no longer needed the \cite s in the bibliography. The result is more correct but perhaps less elegant. I do agree, though, that it would be convenient to separate the page tracker for citations and bib items. After all, even though \cite commands in the bibliography may not fit in the "best practices" I see no reason why they should be excluded in principle. That said, I'd be willing to file a feature request at biblatex github if you think the issue is worth it. (I'm sort of a newbie, I rely on your opinion). – gusbrs May 17 '16 at 12:29
• @gusbrs I'm not sure whether it is worth it, that is up for the developers to decide. You can certainly ask them for it, but don't be disappointed if they don't deem it worth the work. – moewe May 17 '16 at 12:33

That's a pretty bad problem. Hopefully someone will come up with a way to fix it automatically once and for all. For now you could declare an entry option as a workaround, like this:

\documentclass{book}

\usepackage[papersize={140mm,210mm}, inner=26mm, outer=18mm, top=15mm, bottom=48mm]{geometry}
\usepackage[bibstyle=authoryear,citestyle=authoryear-comp,backend=biber,sorting=nyt]{biblatex}
\usepackage{filecontents}

\begin{filecontents*}{MWE.bib}
@book{AndoFisherSimon1963,
keywords = {Simon},
author = {Albert Ando and Franklin Fisher and Herbert A. Simon},
title = {Essays on the structure of social science models},
date = {1963},
publisher = {The MIT Press},
location = {Cambridge, MA},
langid = {english},
}

@article{HawkinsSimon1949,
keywords = {Simon},
author = {David Hawkins and Herbert A. Simon},
title = {Note: Some conditions of macroeconomic stability},
journaltitle = {Econometrica},
date = {1949},
volume = {17},
pages = {245--248},
langid = {english},
}

@book{HMMS1960,
keywords = {Simon},
author = {Charles C. Holt and Franco Modigliani and John F. Muth and Herbert A. Simon},
title = {Planning production, inventories, and work force},
date = {1960},
publisher = {Prentice-Hall},
location = {Englewood Cliffs},
langid = {english},
}

@book{MarchSimon1958,
keywords = {Simon},
author = {James G. March and Herbert A. Simon},
title = {Organizations},
date = {1958},
publisher = {John Wiley and Sons},
location = {New York},
langid = {english},
}

@book{NewellSimon1972,
keywords = {Simon},
author = {Allen Newell and Herbert A. Simon},
title = {Human problem solving},
date = {1972},
publisher = {Prentice-Hall},
location = {Englewood Cliffs, NJ},
langid = {english},
}

@book{Simon1947,
keywords = {Simon},
author = {Herbert A. Simon},
date = {1947},
subtitle = {A study of decision-making processes in administrative organization},
edition = {1\textsuperscript{st} ed.},
publisher = {The Macmillan Company},
location = {New York},
langid = {english},
}

@article{Simon1952,
keywords = {Simon},
author = {Herbert A. Simon},
title = {On the definition of the causal relation},
journaltitle = {Journal of Philosophy},
date = {1952},
volume = {49},
month = {July 31},
pages = {517-528},
langid = {english},
}

@book{Simon1957,
keywords = {Simon},
author = {Herbert A. Simon},
title = {Models of man, social and rational},
date = {1957},
subtitle = {Mathematical essays on rational human behavior in a social setting},
publisher = {John Wiley and Sons},
location = {New York},
langid = {english},
}

@inbook{Simon1953a,
keywords = {Simon},
author = {Herbert A. Simon},
title = {Causal ordering and identifiability},
booktitle = {Studies in econometric method},
date = {1953},
editor = {W. C. Hood and J. C. Koopmas},
publisher = {Wiley},
location = {New York},
langid = {english},
}

@article{Simon1953b,
keywords = {Simon},
author = {Herbert A. Simon},
title = {Notes on the observation and measurement of political power},
journaltitle = {Journal of Politics},
date = {1953},
volume = {15},
month = {November},
pages = {500--516},
langid = {english},
options = {repeatauthor},
}

@article{Simon1954a,
keywords = {Simon},
author = {Herbert A. Simon},
title = {Spurious correlation: a causal interpretation},
journaltitle = {Journal of the American Statistical Association},
date = {1954},
volume = {49},
month = {September},
pages = {467--479},
langid = {english},
}
\end{filecontents*}

\newtoggle{repeatauthor}%
\DeclareEntryOption[boolean]{repeatauthor}[true]{%
\settoggle{repeatauthor}{#1}}%

\makeatletter
\renewbibmacro*{bbx:dashcheck}[2]{%
\ifboolexpr{
test {\iffieldequals{fullhash}{\bbx@lasthash}}
and
not test \iffirstonpage
and
not test {\iftoggle{repeatauthor}}
and
(
not bool {bbx@inset}
or
test {\iffieldequalstr{entrysetcount}{1}}
)
}
{#1}
{#2}}
\makeatother

\begin{document}

\nocite{*}

\chapter*{Referências\markboth{\MakeUppercase{Referências}}{}}
\printbibliography[heading=subbibintoc,title={Trabalhos de Herbert A.\ Simon}, keyword=Simon]

\end{document}


I declared a new repeatauthor entry option and redefined bbx:dashcheck to consider that when deciding if it should show the dash or not. Then you can use options = {repeatauthor} in specific entries to, well, repeat the author, instead of showing the dash. It's not a great solution, since you'll have to check each page to see if the problem happens and then add the option to the relevant entries… and then if you add a new entry you'll have to check every page again, because it might change the whole thing. But it's better than nothing for now.

• By the way, I just finished writing a biblatex style for ABNT rules, in case you're interested. I added a repeatfields entry option to account for exceptional cases like this one. (Although ABNT's rules are awful and if you can avoid them you're better off.) – dbmrq May 12 '16 at 20:24
• thank you very much for your answer. I get the idea of your suggestion, and it looks promising. But somehow I wasn't able to run the code. I get Missing \begin{document}. error at the \DeclareEntryOption line and Illegal parameter number in definition of \settoggle{repeatauthor}{#1} error as well. – gusbrs May 13 '16 at 1:15
• That's weird, it compiles perfectly here. Are your packages up to date? I just checked biblatex 3.3's release notes and it says "the \Declare*Option commands have a new optional argument when using biber which declares the datatype of the option"… so maybe that could be the problem. Try updating biblatex or maybe remove the part that says [boolean] in \DeclareEntryOption. – dbmrq May 13 '16 at 2:41
• I'm on a linux (Mint) system, so I expect my TeX packages to be up to date as far as the repositories go. In any case, it did work as intended without [boolean]. However, @moewe's comment offered a simpler and safer solution, even though it is still a workaround. As for "safer", consider the setting of a document with multiple reference sections drawing from a single .bib file (it is my case). If this entry is cited in other reference sections, it might cause problems in their corresponding bibliographies. Still, it is a clever solution and I thank you very much for that! – gusbrs May 13 '16 at 11:08
• As for your ABNT project, @danielbmarques, it's a nice tip and a nice work. I'm not using it in this document, but I'll keep it for future reference. One never knows when he's gonna need it here in "jaboticaba" land. Thanks! – gusbrs May 13 '16 at 11:11